Ejemplo n.º 1
0
    def __init__(self, parent):
        super(ConfigWindow, self).__init__(parent)

        self.ui = Ui_Configure()
        self.ui.setupUi(self)
        self.settings = QtCore.QSettings()
        self.resetConfig()

        self.connect(self, SIGNAL("accepted()"), self.saveConfig)
        self.connect(self, SIGNAL("rejected()"), self.resetConfig)
Ejemplo n.º 2
0
class ConfigWindow(QtGui.QDialog):
    def __init__(self, parent):
        super(ConfigWindow, self).__init__(parent)

        self.ui = Ui_Configure()
        self.ui.setupUi(self)
        self.settings = QtCore.QSettings()
        self.resetConfig()

        self.connect(self, SIGNAL("accepted()"), self.saveConfig)
        self.connect(self, SIGNAL("rejected()"), self.resetConfig)

    def saveConfig(self):
        self.settings.setValue("maxhistory", QtCore.QVariant(self.ui.maxHistorySB.value()))

    def resetConfig(self):
        self.ui.maxHistorySB.setValue(self.settings.value("maxhistory", QVariant(100)).toInt()[0])
Ejemplo n.º 3
0
class ConfigWindow(QtGui.QDialog):
    def __init__(self, parent):
        super(ConfigWindow, self).__init__(parent)

        self.ui = Ui_Configure()
        self.ui.setupUi(self)
        self.settings = QtCore.QSettings()
        self.resetConfig()

        self.connect(self, SIGNAL("accepted()"), self.saveConfig)
        self.connect(self, SIGNAL("rejected()"), self.resetConfig)

    def saveConfig(self):
        self.settings.setValue("maxhistory",
                               QtCore.QVariant(self.ui.maxHistorySB.value()))

    def resetConfig(self):
        self.ui.maxHistorySB.setValue(
            self.settings.value("maxhistory", QVariant(100)).toInt()[0])
Ejemplo n.º 4
0
    def __init__(self, parent):
        super(ConfigWindow, self).__init__(parent)

        self.ui = Ui_Configure()
        self.ui.setupUi(self)
        self.settings = QtCore.QSettings()
        self.resetConfig()

        self.connect(self, SIGNAL("accepted()"), self.saveConfig)
        self.connect(self, SIGNAL("rejected()"), self.resetConfig)