예제 #1
0
    def __init__(self, parent, mod_list, style):
        scrolledpanel.ScrolledPanel.__init__(self, parent, style=style)
        self.mod_list = mod_list
        self.log_server = servers.get_log_server()
        # module enable controls
        self.check_box_mod_list = []
        self.int_ctrl_mod_list = []
        self.log_group_mod_list = []
        for mod in mod_list:
            check_box = wx.CheckBox(self,
                                    -1,
                                    self.log_server.getdescription(mod),
                                    name=mod)
            colour = get_colour_for_log_with_index(self.mod_list.index(mod))
            check_box.SetForegroundColour(colour)
            self.check_box_mod_list.append(check_box)
            int_ctrl = intctrl.IntCtrl(parent=self,
                                       limited=True,
                                       value=0,
                                       min=0,
                                       max=99,
                                       size=(25, -1),
                                       style=wx.TE_RIGHT,
                                       name=mod)
            self.int_ctrl_mod_list.append(int_ctrl)
            log_group_button = wx.Button(self,
                                         -1,
                                         "Edit...",
                                         style=wx.BU_EXACTFIT,
                                         name=mod)
            self.log_group_mod_list.append(log_group_button)

        self.set_properties()
        self.__do_layout()
        self.__bind_events()
예제 #2
0
    def __init__(self, parent):
        togwin.ChildToggableDialog.__init__(self, "Log inspector", parent)
        self.log_server = servers.get_log_server()
        log_class_list = list(self.log_server.getlogclasses())
        class_and_description_list = []
        for each_class in log_class_list:
            class_and_description_list.append(
                (each_class, self.log_server.getdescription(each_class)))
        # ignore case when sorting on description
        class_and_description_list.sort(
            lambda x, y: cmp(x[1].lower(), y[1].lower()))
        sorted_log_class_list = []
        for each_tuple in class_and_description_list:
            sorted_log_class_list.append(each_tuple[0])
        self.log_output_panel = LogOutputPanel(self,
                                               sorted_log_class_list,
                                               style=wx.BORDER_SUNKEN)
        win = wx.SashLayoutWindow(self, -1)
        self.log_class_panel = ModEnablePanel(win,
                                              sorted_log_class_list,
                                              style=wx.BORDER_SUNKEN
                                              | wx.TAB_TRAVERSAL)
        self.log_class_sash = win

        self.__do_layout()
        self.__bind_events()
예제 #3
0
    def __init__(self, parent, log_class_list, style):
        wx.Panel.__init__(self, parent, style=style)
        self.log_class_list = log_class_list
        self.log_server = servers.get_log_server()
        # log update timer
        self.timer_log = wx.Timer(self)
        # controls
        self.list_ctrl_logs = wx.ListCtrl(self,
                                          -1,
                                          style=wx.LC_REPORT | wx.LC_NO_HEADER)
        self.list_ctrl_logs.InsertColumn(0, 'Log')
        self.button_pause = wx.ToggleButton(self, -1, "&Pause")
        self.button_clear = wx.Button(self, -1, "Clea&r")

        self.__do_layout()
        self.__bind_events()

        # Start the log update timer
        self.timer_log.Start(250)
예제 #4
0
    def __init__(self, parent, log_class_list, style):
        wx.Panel.__init__(self, parent, style=style)
        self.log_class_list = log_class_list
        self.log_server = servers.get_log_server()
        # log update timer
        self.timer_log = wx.Timer(self)
        # controls
        self.list_ctrl_logs = wx.ListCtrl(
                                    self, 
                                    -1, 
                                    style = wx.LC_REPORT | wx.LC_NO_HEADER
                                    )
        self.list_ctrl_logs.InsertColumn(0, 'Log')
        self.button_pause = wx.ToggleButton(self, -1, "&Pause")
        self.button_clear = wx.Button(self, -1, "Clea&r")

        self.__do_layout()
        self.__bind_events()

        # Start the log update timer
        self.timer_log.Start(250)
예제 #5
0
    def __init__(self, parent):
        togwin.ChildToggableDialog.__init__(
            self, 
            "Log inspector", 
            parent
            )
        self.log_server = servers.get_log_server()
        log_class_list = list ( self.log_server.getlogclasses() )
        class_and_description_list = []
        for each_class in log_class_list:
            class_and_description_list.append(
                ( each_class, self.log_server.getdescription(each_class) )
                )
        # ignore case when sorting on description
        class_and_description_list.sort(
            lambda x, y: cmp( x[1].lower(), y[1].lower() ) 
            )
        sorted_log_class_list = []
        for each_tuple in class_and_description_list:
            sorted_log_class_list.append(each_tuple[0])
        self.log_output_panel = LogOutputPanel(
                                            self, 
                                            sorted_log_class_list,
                                            style = wx.BORDER_SUNKEN
                                            )
        win = wx.SashLayoutWindow(
                    self, 
                    -1 
                    )
        self.log_class_panel = ModEnablePanel(
                                        win,
                                        sorted_log_class_list,
                                        style=wx.BORDER_SUNKEN|wx.TAB_TRAVERSAL
                                        )
        self.log_class_sash = win

        self.__do_layout()
        self.__bind_events()
예제 #6
0
    def __init__(self, parent, mod_list, style):
        scrolledpanel.ScrolledPanel.__init__(self, parent, style=style)
        self.mod_list = mod_list
        self.log_server = servers.get_log_server()
        # module enable controls
        self.check_box_mod_list = []
        self.int_ctrl_mod_list = []
        self.log_group_mod_list = []
        for mod in mod_list:
            check_box = wx.CheckBox(
                                self, 
                                -1, 
                                self.log_server.getdescription(mod), 
                                name=mod
                                )
            colour = get_colour_for_log_with_index(
                            self.mod_list.index(mod)
                            )
            check_box.SetForegroundColour(colour)
            self.check_box_mod_list.append(check_box)
            int_ctrl = intctrl.IntCtrl(
                            parent=self, limited=True, value=0, min=0, max=99,
                            size=(25, -1), style=wx.TE_RIGHT, name=mod
                            )
            self.int_ctrl_mod_list.append(int_ctrl)
            log_group_button = wx.Button(
                                            self, 
                                            -1, 
                                            "Edit...", 
                                            style=wx.BU_EXACTFIT, 
                                            name = mod
                                            )
            self.log_group_mod_list.append(log_group_button)

        self.set_properties()
        self.__do_layout()
        self.__bind_events()
예제 #7
0
 def get_log_server(self):
     return servers.get_log_server()
예제 #8
0
 def get_log_server(self):
     return servers.get_log_server()