def child_task(self):
        '''child process - this holds all the GUI elements'''
        mp_util.child_close_fds()
        from wx_loader import wx

        app = wx.App(False)
        app.frame = ChecklistFrame(state=self, title=self.title)
        app.frame.Show()
        app.MainLoop()
Beispiel #2
0
    def child_task(self):
        '''child process - this holds all the GUI elements'''
        mp_util.child_close_fds()
        from wx_loader import wx
        state = self

        self.app = wx.App(False)
        self.app.frame = MPImageFrame(state=self)
        self.app.frame.Show()
        self.app.MainLoop()
 def child_task(self):
     '''child process - this holds all the GUI elements'''
     self.parent_pipe_send.close()
     self.parent_pipe_recv.close()
     
     import wx_processguard
     from wx_loader import wx
     from wxconsole_ui import ConsoleFrame
     app = wx.App(False)
     app.frame = ConsoleFrame(state=self, title=self.title)
     app.frame.Show()
     app.MainLoop()
Beispiel #4
0
 def child_task(self):
     '''child process - this holds all the GUI elements'''
     self.parent_pipe_send.close()
     
     from wx_loader import wx
     from wxhorizon_ui import HorizonFrame
     # Create wx application
     app = wx.App(False)
     app.frame = HorizonFrame(state=self, title=self.title)
     app.frame.SetDoubleBuffered(True)
     app.frame.Show()
     app.MainLoop()
    def child_task(self):
        '''child process - this holds all the GUI elements'''
        from MAVProxy.modules.lib import mp_util
        import wx_processguard
        from wx_loader import wx
        from wxsettings_ui import SettingsDlg

        mp_util.child_close_fds()
        app = wx.App(False)
        dlg = SettingsDlg(self.settings)
        dlg.parent_pipe = self.parent_pipe
        dlg.ShowModal()
        dlg.Destroy()
Beispiel #6
0
 def call(self):
     '''show the dialog as a child process'''
     mp_util.child_close_fds()
     import wx_processguard
     from wx_loader import wx
     from wx.lib.agw.genericmessagedialog import GenericMessageDialog
     app = wx.App(False)
     # note! font size change is not working. I don't know why yet
     font = wx.Font(self.font_size, wx.MODERN, wx.NORMAL, wx.NORMAL)
     dlg = GenericMessageDialog(None, self.message, self.title, wx.ICON_INFORMATION|wx.OK)
     dlg.SetFont(font)
     dlg.ShowModal()
     app.MainLoop()
Beispiel #7
0
    def child_task(self):
        '''child process - this holds all the GUI elements'''
        mp_util.child_close_fds()

        import matplotlib
        import wx_processguard
        from wx_loader import wx
        from live_graph_ui import GraphFrame

        matplotlib.use('WXAgg')
        app = wx.App(False)
        app.frame = GraphFrame(state=self)
        app.frame.Show()
        app.MainLoop()
Beispiel #8
0
    def _parse_args(self, q, args, values):
        '''
        This is the heart of it all - overrides optparse.OptionParser.parse_args
        @param arg is irrelevant and thus ignored,
               it is here only for interface compatibility
        '''
        if wx.GetApp() is None:
            self.app = wx.App(False)

        # preprocess command line arguments and set to defaults
        option_values, args = self.SUPER.parse_args(self, args, values)
        for option in self.option_list:
            if option.dest and hasattr(option_values, option.dest):
                default = getattr(option_values, option.dest)
                if default is not None:
                    option.default = default

        dlg = OptparseDialog(option_parser=self, title=self.get_description())

        if args:
            dlg.args_ctrl.Value = ' '.join(args)

        dlg_result = dlg.ShowModal()
        if wx.ID_OK != dlg_result:
            raise UserCancelledError('User has canceled')

        if values is None:
            values = self.get_default_values()

        option_values, args = dlg.getOptionsAndArgs()

        for option, value in option_values.iteritems():
            if ('store_true' == option.action) and (value is False):
                setattr(values, option.dest, False)
                continue
            if ('store_false' == option.action) and (value is True):
                setattr(values, option.dest, False)
                continue

            if option.takes_value() is False:
                value = None

            option.process(option, value, values, self)

        q.put((values, args))