def __init__(self, *args): BaseWidget.__init__(self, *args) # Hardware objects ---------------------------------------------------- # Internal values ----------------------------------------------------- # Properties ---------------------------------------------------------- # Signals ------------------------------------------------------------- # Slots --------------------------------------------------------------- self.define_slot("populate_widget", ({})) # Graphic elements ---------------------------------------------------- self.tab_widget = QtImport.QTabWidget(self) self.osc_results_widget = AdvancedResultsWidget(self.tab_widget) self.mesh_results_widget = AdvancedResultsWidget(self.tab_widget) self.tab_widget.addTab(self.osc_results_widget, "Osc") self.tab_widget.addTab(self.mesh_results_widget, "Mesh") # Layout -------------------------------------------------------------- _main_vlayout = QtImport.QHBoxLayout(self) _main_vlayout.addWidget(self.tab_widget) _main_vlayout.setSpacing(0) _main_vlayout.setContentsMargins(0, 0, 0, 0) # SizePolicies -------------------------------------------------------- # Qt signal/slot connections ------------------------------------------ # Other --------------------------------------------------------------- self.osc_results_widget.hit_map_widget._hit_map_tools_widget.setHidden( True) self.osc_results_widget.hit_map_widget._summary_gbox.setHidden(True) self.mesh_results_widget.hit_map_widget._hit_map_tools_widget.setHidden( True) self.mesh_results_widget.hit_map_widget._summary_gbox.setHidden(True)
def __init__(self, *args): BaseWidget.__init__(self, *args) # Hardware objects ---------------------------------------------------- # Internal values ----------------------------------------------------- # Properties ---------------------------------------------------------- self.add_property( "level", "combo", ("NOT SET", "INFO", "WARNING", "ERROR"), "NOT SET" ) self.add_property("showDebug", "boolean", True) self.add_property("appearance", "combo", ("list", "tabs"), "tabs") self.add_property("enableFeedback", "boolean", True) self.add_property("emailAddresses", "string", "") self.add_property("fromEmailAddress", "string", "") self.add_property("maxLogLines", "integer", -1) self.add_property("autoSwitchTabs", "boolean", False) self.add_property("myTabLabel", "string", "") # Signals ------------------------------------------------------------- self.define_signal("incUnreadMessagesSignal", ()) self.define_signal("resetUnreadMessagesSignal", ()) # Slots --------------------------------------------------------------- self.define_slot("clearLog", ()) self.define_slot("tabSelected", ()) # Graphic elements ---------------------------------------------------- self.tab_widget = QtImport.QTabWidget(self) self.details_log = CustomTreeWidget(self.tab_widget, "Errors and warnings") self.info_log = CustomTreeWidget(self.tab_widget, "Information") self.debug_log = CustomTreeWidget(self.tab_widget, "Debug") self.feedback_log = Submitfeedback( self.tab_widget, self["emailAddresses"], "Submit feedback" ) self.tab_widget.addTab( self.details_log, Icons.load_icon("Caution"), "Errors and warnings" ) self.tab_widget.addTab(self.info_log, Icons.load_icon("Inform"), "Information") self.tab_widget.addTab(self.debug_log, Icons.load_icon("Hammer"), "Debug") self.tab_widget.addTab( self.feedback_log, Icons.load_icon("Envelope"), "Submit feedback" ) # Layout -------------------------------------------------------------- _main_vlayout = QtImport.QVBoxLayout(self) _main_vlayout.addWidget(self.tab_widget) _main_vlayout.setSpacing(0) _main_vlayout.setContentsMargins(2, 2, 2, 2) # SizePolicies -------------------------------------------------------- self.setSizePolicy(QtImport.QSizePolicy.Minimum, QtImport.QSizePolicy.Expanding) # Qt signal/slot connections ------------------------------------------ # Other --------------------------------------------------------------- self.tab_levels = { logging.NOTSET: self.info_log, logging.DEBUG: self.info_log, logging.INFO: self.info_log, logging.WARNING: self.info_log, logging.ERROR: self.info_log, logging.CRITICAL: self.info_log, } self.filter_level = logging.NOTSET # Register to GUI log handler GUILogHandler.GUILogHandler().register(self)