Пример #1
0
class Widget(QtGui.QWidget, Screen):
    title = i18n("ksuperkey")
    desc = i18n("Enable / Disable ksuperkey")

    screenSettings = {}
    screenSettings["hasChanged"] = False

    def __init__(self, *args):
        QtGui.QWidget.__init__(self, None)
        self.ui = Ui_ksuperkeyWidget()
        self.ui.setupUi(self)
        self.ksuperkey = KSuperKey()

        # set initial states
        self.ui.enableKsuperkey.setChecked(self.ksuperkey.isEnabled())

    def applySettings(self):
        if self.ui.enableKsuperkey.isChecked():
            self.ksuperkey.enable()
        else:
            self.ksuperkey.disable()

    def shown(self):
        pass

    def execute(self):
        self.applySettings()
        return True
Пример #2
0
    def __init__(self, *args):
        QtGui.QWidget.__init__(self, None)
        self.ui = Ui_ksuperkeyWidget()
        self.ui.setupUi(self)
        self.ksuperkey = KSuperKey()

        # set initial states
        self.ui.enableKsuperkey.setChecked(self.ksuperkey.isEnabled())