Exemple #1
0
    def closeEvent(self, e):
        s = QSettings()
        s.beginWriteArray('Row', self.tableWidget.rowCount())
        #        for i,a in enumerate(self.objectList):
        #            s.setArrayIndex(i)
        #            a.saveSettings(s)

        for i, a in enumerate(self.objectList):
            s.setArrayIndex(i)
            s.setValue('dmmVisaCombo', a.getDmmVisaText())
            s.setValue('currentCombo', a.getCurrentText())
            s.setValue('thermometerCombo', a.getThermoText())

        s.endArray()
        for widget in self.settingsWidgets:
            saveWidgetToSettings(s, widget)
        super(mainWindow, self).closeEvent(e)
    def saveSettings(self):
        s = QSettings(OrganizationName, ApplicationName)
        s.setValue('geometry', self.saveGeometry())
        for w in self.settingsWidgets:
            saveWidgetToSettings(s, w)

        s.setValue('splitter1State', self.splitter1.saveState())
        s.setValue('splitter2State', self.splitter2.saveState())
        
        table = self.table
        nRows = table.rowCount()
        s.beginWriteArray('frequencyTable', nRows)
        w = self.tableCellWidget
        for row in range(nRows):
            s.setArrayIndex(row)
            s.setValue('active', w(row,'active').isChecked())
            s.setValue('f', w(row,'f').value())
            s.setValue('A', w(row,'A').value())
            s.setValue('phase', w(row,'phase').value())
            s.setValue('bw', w(row, 'bw').value())
            s.setValue('rollOff', w(row, 'order').value())
        s.endArray()
 def saveSettings(self):
     settings = QSettings()
     for widget in self.widgetsForSettings:
         saveWidgetToSettings(settings, widget)
Exemple #4
0
 def saveSettings(self):
     s = QSettings()
     for widget in self.settingsWidgets:
         saveWidgetToSettings(s, widget)
Exemple #5
0
 def saveSettings(self):
     s = QSettings(OrganizationName, ApplicationName)
     for w in self.settingsWidgets:
         saveWidgetToSettings(s, w)