Exemplo n.º 1
0
class ConfigIcon(QtGui.QWidget):

    def __init__(self, config):
        QtGui.QWidget.__init__(self)
        self.ui = Ui_configIcon()
        self.ui.setupUi(self)
        self.parseConf(config)

    def parseConf(self, config):
        self.ui.spinInterval.setValue(int(config.readEntry("pollinterval", QVariant("5")).toInt()[0]))
        self.ui.checkTraffic.setChecked(config.readEntry("showtraffic", QVariant("true")).toBool())
        self.ui.checkWifi.setChecked(config.readEntry("showwifi", QVariant("true")).toBool())
        self.ui.checkStatus.setChecked(config.readEntry("showstatus", QVariant("true")).toBool())
        self.ui.checkBattery.setChecked(config.readEntry("followsolid", QVariant("true")).toBool())

    def writeConf(self, config):
        config.writeEntry("showtraffic", QVariant(self.ui.checkTraffic.isChecked()))
        config.writeEntry("showwifi", QVariant(self.ui.checkWifi.isChecked()))
        config.writeEntry("showstatus", QVariant(self.ui.checkStatus.isChecked()))
        config.writeEntry("followsolid", QVariant(self.ui.checkBattery.isChecked()))
        config.writeEntry("pollinterval", QVariant(self.ui.spinInterval.value()))
Exemplo n.º 2
0
class ConfigIcon(QtGui.QWidget):

    def __init__(self, config):
        QtGui.QWidget.__init__(self)
        self.ui = Ui_configIcon()
        self.ui.setupUi(self)
        self.parseConf(config)

    def parseConf(self, config):
        self.ui.spinInterval.setValue(int(config.readEntry("pollinterval", QVariant("5")).toInt()[0]))
        self.ui.checkTraffic.setChecked(config.readEntry("showtraffic", QVariant("true")).toBool())
        self.ui.checkWifi.setChecked(config.readEntry("showwifi", QVariant("true")).toBool())
        self.ui.checkStatus.setChecked(config.readEntry("showstatus", QVariant("true")).toBool())
        self.ui.checkBattery.setChecked(config.readEntry("followsolid", QVariant("true")).toBool())

    def writeConf(self, config):
        config.writeEntry("showtraffic", QVariant(self.ui.checkTraffic.isChecked()))
        config.writeEntry("showwifi", QVariant(self.ui.checkWifi.isChecked()))
        config.writeEntry("showstatus", QVariant(self.ui.checkStatus.isChecked()))
        config.writeEntry("followsolid", QVariant(self.ui.checkBattery.isChecked()))
        config.writeEntry("pollinterval", QVariant(self.ui.spinInterval.value()))
Exemplo n.º 3
0
 def __init__(self, config):
     QtGui.QWidget.__init__(self)
     self.ui = Ui_configIcon()
     self.ui.setupUi(self)
     self.parseConf(config)
Exemplo n.º 4
0
 def __init__(self, config):
     QtGui.QWidget.__init__(self)
     self.ui = Ui_configIcon()
     self.ui.setupUi(self)
     self.parseConf(config)