Ejemplo n.º 1
0
 def show_para(self, title, view, para, on_handle=None, on_ok=None, on_cancel=None, preview=False, modal=True):
     dialog = ParaDialog(self, title)
     dialog.init_view(view, para, preview, modal=modal, app=self)
     dialog.Bind('cancel', on_cancel)
     dialog.Bind('parameter', on_handle)
     dialog.Bind('commit', on_ok)
     return dialog.show()
Ejemplo n.º 2
0
 def show_para(self, title, para, view, on_handle=None, on_ok=None, 
     on_cancel=None, on_help=None, preview=False, modal=True):
     on_help = lambda x=None:self.show_md(x or 'No Document!', title)
     dialog = ParaDialog(self, title)
     dialog.init_view(view, para, preview, modal=modal, app=self)
     dialog.Bind('cancel', on_cancel)
     dialog.Bind('parameter', on_handle)
     dialog.Bind('commit', on_ok)
     dialog.Bind('help', on_help)
     return dialog.show()
Ejemplo n.º 3
0
 def on_open(self, event):
     self.camera = devices[self.com_devices.GetValue()]()
     if not self.camera.view is None:
         dialog = ParaDialog(self, self.camera.name)
         view, para = self.camera.view, self.camera.para.copy()
         dialog.init_view(view, para, False)
         if dialog.show():
             self.camera.para.update(para)
             self.camera.open()
     else:
         self.camera.open()
Ejemplo n.º 4
0
 def show_para(self, title, para, view, on_handle=None, on_ok=None, 
     on_cancel=None, on_help=None, preview=False, modal=True):
     lang = ConfigManager.get('language')
     dic = DictManager.get(name=title, tag=lang)
     doc = DocumentManager.get(title, tag=lang)
     doc = doc or DocumentManager.get(title, tag='English')
     on_help = lambda x=doc:self.show_md(x or 'No Document!', title)
     dialog = ParaDialog(self, title)
     dialog.init_view(view, para, preview, modal=modal, app=self)
     self.translate(dic)(dialog)
     dialog.Bind('cancel', on_cancel)
     dialog.Bind('parameter', on_handle)
     dialog.Bind('commit', on_ok)
     dialog.Bind('help', on_help)
     return dialog.show()
Ejemplo n.º 5
0
 def show_para(self,
               title,
               view,
               para,
               on_handle=None,
               on_ok=None,
               on_cancel=None,
               on_help=None,
               preview=False,
               modal=True):
     lang = Source.manager('config').get('language')
     dic = Source.manager('dictionary').get(name=title, tag=lang)
     dialog = ParaDialog(self, title, dic or {})
     dialog.init_view(view, para, preview, modal=modal, app=self)
     dialog.Bind('cancel', on_cancel)
     dialog.Bind('parameter', on_handle)
     dialog.Bind('commit', on_ok)
     dialog.Bind('help', on_help)
     return dialog.show()
Ejemplo n.º 6
0
 def on_config(self, event):
     dialog = ParaDialog(self, self.camera.name)
     view, para = self.camera.view, self.camera.para.copy()
     dialog.init_view(view, para, False)
     if dialog.show(): self.camera.para.update(para)