def saveSettings(self): if self.params.save_state: SettingsFactory.saveSettings( self, Setter(sizes_list=self.sizes(), _no_conv=True, objectName=self.params.objectName))
def chooseRootDirAction(self): SettingsFactory.loadSettings(self, Setter(rootDir=None)) rootDir = QFileDialog.getExistingDirectory(self, caption=self.chooseRootDirButton.text(), directory=self.rootDir) if rootDir: self.rootDir = rootDir + os.path.sep SettingsFactory.saveSettings(self, Setter(rootDir=self.rootDir)) self.rootDirLabel.setText(self.rootDir) self.reload()
def chooseRootDirAction(self): SettingsFactory.loadSettings(self, Setter(rootDir=None)) rootDir = QFileDialog.getExistingDirectory( self, caption=self.chooseRootDirButton.text(), directory=self.rootDir) if rootDir: self.rootDir = rootDir + os.path.sep SettingsFactory.saveSettings(self, Setter(rootDir=self.rootDir)) self.rootDirLabel.setText(self.rootDir) self.reload()
def __init__(self, parent, **params): get_or_put(params, 'orientation', Qt.Horizontal) self.params = Params(**params) QSplitter.__init__(self, self.params.orientation, parent=parent) prepareWidget(parent=parent, widget=self, **params) self.setHandleWidth(self.handleWidth() * 2) if self.params.save_state: SettingsFactory.loadSettings(self, Setter(sizes_list=None, _conv=QVariant.toPyObject, _conv_2level=self.conv2level, objectName=self.params.objectName ))
def __init__(self, parent, **params): get_or_put(params, 'orientation', Qt.Horizontal) self.params = Params(**params) QSplitter.__init__(self, self.params.orientation, parent=parent) prepareWidget(parent=parent, widget=self, **params) self.setHandleWidth(self.handleWidth() * 2) if self.params.save_state: SettingsFactory.loadSettings( self, Setter(sizes_list=None, _conv=QVariant.toPyObject, _conv_2level=self.conv2level, objectName=self.params.objectName))
def saveSettings(self): if self.params.save_state: SettingsFactory.saveSettings(self, Setter(sizes_list=self.sizes(), _no_conv=True, objectName=self.params.objectName))
def clearActivities(activity_group=None): SettingsFactory.clearSettings( ActivityManager.activity_group_id(activity_group))
def getActivities(activity_group=None): return SettingsFactory.getObjectsForGroup( ActivityManager.activity_group_id(activity_group))
def saveActivity(activity): SettingsFactory.saveObject(activity.activity_id, activity) SignalDispatcher.broadcastSignal(ADD_ACTIVITY_SIGNAL, activity)
def clearSettings(dargs): parent = dargs.get('parent', None) if AreYouSureWindow(parent, title='Clearing settings'): SettingsFactory.clearSettings(DEFAULT_SETTINGS_GROUP) InformationWindow(message="Settings cleared !")