Пример #1
0
 def saveSettings(self):
     if self.params.save_state:
         SettingsFactory.saveSettings(
             self,
             Setter(sizes_list=self.sizes(),
                    _no_conv=True,
                    objectName=self.params.objectName))
Пример #2
0
    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()
Пример #3
0
    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()
Пример #4
0
 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
                        ))
Пример #5
0
 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))
Пример #6
0
 def saveSettings(self):
     if self.params.save_state:
         SettingsFactory.saveSettings(self,
                                      Setter(sizes_list=self.sizes(),
                                         _no_conv=True,
                                         objectName=self.params.objectName))
Пример #7
0
 def clearActivities(activity_group=None):
     SettingsFactory.clearSettings(
                         ActivityManager.activity_group_id(activity_group))
Пример #8
0
 def getActivities(activity_group=None):
     return SettingsFactory.getObjectsForGroup(
                         ActivityManager.activity_group_id(activity_group))
Пример #9
0
 def saveActivity(activity):
     SettingsFactory.saveObject(activity.activity_id, activity)
     SignalDispatcher.broadcastSignal(ADD_ACTIVITY_SIGNAL, activity)
Пример #10
0
def clearSettings(dargs):
    parent = dargs.get('parent', None)
    if AreYouSureWindow(parent, title='Clearing settings'):
        SettingsFactory.clearSettings(DEFAULT_SETTINGS_GROUP)
        InformationWindow(message="Settings cleared !")
Пример #11
0
 def clearActivities(activity_group=None):
     SettingsFactory.clearSettings(
         ActivityManager.activity_group_id(activity_group))
Пример #12
0
 def getActivities(activity_group=None):
     return SettingsFactory.getObjectsForGroup(
         ActivityManager.activity_group_id(activity_group))
Пример #13
0
 def saveActivity(activity):
     SettingsFactory.saveObject(activity.activity_id, activity)
     SignalDispatcher.broadcastSignal(ADD_ACTIVITY_SIGNAL, activity)