Exemplo n.º 1
0
 def deserialize(self, location):
     configuration_file = os.path.join(location, getConfigFilename(self._state._identifier))
     s = QtCore.QSettings(configuration_file, QtCore.QSettings.IniFormat)
     s.beginGroup('state')
     self._state._identifier = s.value('identifier', '')
     self._state._elementLocation = s.value('element', '')
     self._state._nodeLocation = s.value('node', '')
     s.endGroup()
     d = ConfigureDialog(self._state)
     self._configured = d.validate()
Exemplo n.º 2
0
    def configure(self):
        d = ConfigureDialog(self._state)
        d.setModal(True)
        if d.exec_():
            self._state = d.getState()
            self.serialize(self._location)

        self._configured = d.validate()
        if self._configured and self._configuredObserver:
            self._configuredObserver()