def __init__(self, parent=None, devAddr=255, netid=0xB547, freq_channel=0, interval=255): """ Class constructor @param parent Parent object """ ConfigDialog.__init__(self, parent, title="Network settings") ## Configuration settings self.config = XmlNetwork(XmlSettings.network_file) ## SWAP device address self.devaddress = devAddr ## SWAP Network ID self.netid = netid ## Frequency channel self.freq_channel = freq_channel ## Periodic Tx interval self.interval = interval # Create widgets self._createControls() # Layout widgets self.doLayout() # Fit dialog size to its contents self.Fit()
def __init__(self, parent=None, message=None, wait_time=None): """ Class constructor @param parent Parent object @param message Message to be displayed @param wait_time Max time to wait for a response (in seconds) """ ConfigDialog.__init__(self, parent, title="Waiting...") pub.subscribe(self.cb_close, "close_wait") ## Message to be displayed self.message = message ## Max time to wait for a response (in seconds) self.wait_time = wait_time ## Timer self.timer = wx.Timer(self) self.Bind(wx.EVT_TIMER, self._cb_timedout, self.timer) ## Create widgets self._createControls() ## Layout widgets self.doLayout() ## Fit dialog size to its contents self.Fit()
def __init__(self, parent=None): """ Class constructor 'parent' Parent object """ ConfigDialog.__init__(self, parent, title="Device selector") # Create widgets self._createControls() # Fill list widget self._fillListWithDevices() # Layout widgets self.doLayout() # Fit dialog size to its contents self.Fit()
def __init__(self, ident, path): # init the StateSaver self.__backend = StateSaver(ident + "CONFIG") # may we save already, or is it too early? self.__may_save = False # ID for storing the configuration self.__ident = ident # the scripting environment with which the config interacts self.__scripting_environment = None ConfigDialog.__init__(self, path) self.set_property("title", _("Configuration"))
def __init__(self, path=""): self.__backend = DefaultStateSaver() ConfigDialog.__init__(self, path) self.set_property("title", _("Configuration")) self.set_banner(ICON, "<big>gDesklets Configuration</big>\n" "Version %s" % (VERSION,)) self._set_setter(self.__setter) self._set_getter(self.__getter) self._set_caller(self.__caller) self.build(((itype, settings) for (itype, settings, visible) in self.__ITEMS if visible)) self.__load_config() self.__read_cmd_line()
def __init__(self, parent=None, register=None): """ Class constructor 'parent' Parent object 'register' SWAP Register to be configured by this dialog """ ConfigDialog.__init__(self, parent, title=register.name) # Register to be configured # FIXME: parameters need to be cloned in order to not to alter the original ones self.parameters = register.parameters[:] # Create widgets self._createControls() # Layout widgets self.doLayout() # Fit dialog size to its contents self.Fit()
def __init__(self, parent=None, secu=0, password=0): """ Class constructor @param parent Parent object """ ConfigDialog.__init__(self, parent, title="Security settings") ## Configuration settings self.config = XmlNetwork(XmlSettings.network_file) ## Anti-playback self.playbk = secu & 0x01 == 0x01 ## Smart encryption self.smartencrypt = secu & 0x02 == 0x02 ## Encryption password self.password = password # Create widgets self._createControls() # Layout widgets self.doLayout() # Fit dialog size to its contents self.Fit()
def __init__(self, parent=None): """ Class constructor 'parent' Parent object """ ConfigDialog.__init__(self, parent, title="Serial port") # Configuration settings self.config = XmlSerial(XmlSettings.serial_file) # Name/path of the serial port self.portname = self.config.port # Serial port baud rate (in bps) self.portspeed = self.config.speed # Create widgets self._createControls() # Layout widgets self.doLayout() # Fit dialog size to its contents self.Fit() # Display dialog self.ShowModal() # Save data self._save()