def deserialize(self, string):
        '''
        Add code to deserialize this step from string.  This method should
        implement the opposite of 'serialize'.
        '''
        self._state.deserialize(string)

        d = ConfigureDialog(self._state)
        self._configured = d.validate()
    def deserialize(self, string):
        '''
        Add code to deserialize this step from disk. Parses a json string
        given by mapclient
        '''
        self._config.update(json.loads(string))

        d = ConfigureDialog()
        d.identifierOccursCount = self._identifierOccursCount
        d.setConfig(self._config)
        self._configured = d.validate()
 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', '')
     if s.value('verbose', '')=='True':
         self._state._verbose = True
     else:
         self._state._verbose = False
     s.endGroup()
     d = ConfigureDialog(self._state)
     self._configured = d.validate()
 def configure(self):
     d = ConfigureDialog(self._state, QtGui.QApplication.activeWindow().currentWidget())
     d.setModal(True)
     if d.exec_():
         self._state = d.getState()
         
     self._configured = d.validate()
     if self._configured and self._configuredObserver:
         self._configuredObserver()
 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()
示例#6
0
    def deserialize(self, string):
        '''
        Add code to deserialize this step from disk. Parses a json string
        given by mapclient
        '''
        self._config.update(json.loads(string))

        d = ConfigureDialog()
        d.identifierOccursCount = self._identifierOccursCount
        d.setConfig(self._config)
        self._configured = d.validate()
    def configure(self):

        dlg = ConfigureDialog()
        dlg.identifierOccursCount = self._identifierOccursCount
        dlg.setConfig(self._config)
        dlg.validate()
        dlg.setModal(True)
        
        if dlg.exec_():
            self._config = dlg.getConfig()
        
        self._configured = dlg.validate()
        self._configuredObserver()
示例#8
0
    def configure(self):

        dlg = ConfigureDialog(self._main_window)
        dlg.identifierOccursCount = self._identifierOccursCount
        dlg.setConfig(self._config)
        dlg.validate()
        dlg.setModal(True)

        if dlg.exec_():
            self._config = dlg.getConfig()

        self._configured = dlg.validate()
        self._configuredObserver()