示例#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._dataLocation = s.value('data', '')
     s.endGroup()
     d = ConfigureDialog(self._state)
     self._configured = d.validate()
示例#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()