class TileIndexDialog(QtGui.QDialog): def __init__(self): QtGui.QDialog.__init__(self) # Set up the user interface from Designer. self.ui = Ui_TileIndex() self.ui.setupUi(self) s = QSettings() self.ui.spinBoxWidth.setValue(s.value('TileIndexPlugin/previewWidth', 1000, type=int)) self.ui.checkBoxContext.setChecked(s.value('TileIndexPlugin/contextMenu', True, type=bool)) self.ui.checkBoxTransparent.setChecked(s.value('TileIndexPlugin/transparentFix', True, type=bool)) self.ui.groupBoxAttribute.setChecked(s.value('TileIndexPlugin/attribute', False, type=bool)) self.ui.lineEditAttribute.setText(s.value('TileIndexPlugin/attributeStr', '', type=str)) def accept(self): s = QSettings() s.setValue('TileIndexPlugin/previewWidth', self.ui.spinBoxWidth.value()) if not self.ui.checkBoxContext.isChecked(): s.setValue('TileIndexPlugin/contextMenu', False) else: s.remove('TileIndexPlugin/contextMenu') if not self.ui.checkBoxTransparent.isChecked(): s.setValue('TileIndexPlugin/transparentFix', False) else: s.remove('TileIndexPlugin/transparentFix') if self.ui.groupBoxAttribute.isChecked(): s.setValue('TileIndexPlugin/attribute', True) else: s.setValue('TileIndexPlugin/attribute', False) attrStr = self.ui.lineEditAttribute.text() if not attrStr.isNull(): s.setValue('TileIndexPlugin/attributeStr', attrStr) else: s.remove('TileIndexPlugin/attributeStr') QtGui.QDialog.accept(self)
def __init__(self): QtGui.QDialog.__init__(self) # Set up the user interface from Designer. self.ui = Ui_TileIndex() self.ui.setupUi(self) s = QSettings() self.ui.spinBoxWidth.setValue( s.value('TileIndexPlugin/previewWidth', 1000, type=int)) self.ui.checkBoxContext.setChecked( s.value('TileIndexPlugin/contextMenu', True, type=bool)) self.ui.checkBoxTransparent.setChecked( s.value('TileIndexPlugin/transparentFix', True, type=bool)) self.ui.groupBoxAttribute.setChecked( s.value('TileIndexPlugin/attribute', False, type=bool)) self.ui.lineEditAttribute.setText( s.value('TileIndexPlugin/attributeStr', '', type=str))
class TileIndexDialog(QtGui.QDialog): def __init__(self): QtGui.QDialog.__init__(self) # Set up the user interface from Designer. self.ui = Ui_TileIndex() self.ui.setupUi(self) s = QSettings() self.ui.spinBoxWidth.setValue( s.value('TileIndexPlugin/previewWidth', 1000, type=int)) self.ui.checkBoxContext.setChecked( s.value('TileIndexPlugin/contextMenu', True, type=bool)) self.ui.checkBoxTransparent.setChecked( s.value('TileIndexPlugin/transparentFix', True, type=bool)) self.ui.groupBoxAttribute.setChecked( s.value('TileIndexPlugin/attribute', False, type=bool)) self.ui.lineEditAttribute.setText( s.value('TileIndexPlugin/attributeStr', '', type=str)) def accept(self): s = QSettings() s.setValue('TileIndexPlugin/previewWidth', self.ui.spinBoxWidth.value()) if not self.ui.checkBoxContext.isChecked(): s.setValue('TileIndexPlugin/contextMenu', False) else: s.remove('TileIndexPlugin/contextMenu') if not self.ui.checkBoxTransparent.isChecked(): s.setValue('TileIndexPlugin/transparentFix', False) else: s.remove('TileIndexPlugin/transparentFix') if self.ui.groupBoxAttribute.isChecked(): s.setValue('TileIndexPlugin/attribute', True) else: s.setValue('TileIndexPlugin/attribute', False) attrStr = self.ui.lineEditAttribute.text() if not attrStr.isNull(): s.setValue('TileIndexPlugin/attributeStr', attrStr) else: s.remove('TileIndexPlugin/attributeStr') QtGui.QDialog.accept(self)
def __init__(self): QtGui.QDialog.__init__(self) # Set up the user interface from Designer. self.ui = Ui_TileIndex() self.ui.setupUi(self) s = QSettings() self.ui.spinBoxWidth.setValue(s.value('TileIndexPlugin/previewWidth', 1000, type=int)) self.ui.checkBoxContext.setChecked(s.value('TileIndexPlugin/contextMenu', True, type=bool)) self.ui.checkBoxTransparent.setChecked(s.value('TileIndexPlugin/transparentFix', True, type=bool)) self.ui.groupBoxAttribute.setChecked(s.value('TileIndexPlugin/attribute', False, type=bool)) self.ui.lineEditAttribute.setText(s.value('TileIndexPlugin/attributeStr', '', type=str))