def __init__(self, *args): QtGui.QWidget.__init__(self, None) self.ui = Ui_searchWidget() self.ui.setupUi(self) # set initial states self.ui.checkBoxNepomuk.setChecked(True) # set signals self.ui.checkBoxNepomuk.connect(self.ui.checkBoxNepomuk, SIGNAL("toggled(bool)"), self.enableSearch)
class Widget(QtGui.QWidget, Screen): title = ki18n("Search") desc = ki18n("Enable / Disable Strigi Desktop Search") def __init__(self, *args): QtGui.QWidget.__init__(self, None) self.ui = Ui_searchWidget() self.ui.setupUi(self) # set initial states self.ui.checkBoxNepomuk.setChecked(True) # set signals self.ui.checkBoxNepomuk.connect(self.ui.checkBoxNepomuk, SIGNAL("toggled(bool)"), self.enableSearch) def enableSearch(self): if self.ui.showTray.isChecked(): self.ui.checkUpdate.setVisible(True) self.ui.updateInterval.setVisible(True) else: self.ui.checkUpdate.setChecked(False) self.ui.checkUpdate.setVisible(False) self.ui.checkUpdate.setCheckState(Qt.Unchecked) self.ui.updateInterval.setVisible(False) def updateSelected(self): #if self.ui.checkUpdate.isChecked(): # self.ui.updateInterval.setEnabled(True) #else: # self.ui.updateInterval.setEnabled(False) # TODO: Where are Nepomuk/Strigi settings stored? print "This part still needs to be written." def applySettings(self): # write selected configurations to future package-managerrc config = PMConfig() config.setSystemTray(QVariant(self.ui.showTray.isChecked())) config.setUpdateCheck(QVariant(self.ui.checkUpdate.isChecked())) config.setUpdateCheckInterval( QVariant(self.ui.updateInterval.value() * 60)) if self.ui.showTray.isChecked(): p = subprocess.Popen(["spun"], stdout=subprocess.PIPE) def shown(self): pass def execute(self): self.applySettings() return True
class Widget(QtGui.QWidget, Screen): title = ki18n("Search") desc = ki18n("Enable / Disable Strigi Desktop Search") def __init__(self, *args): QtGui.QWidget.__init__(self,None) self.ui = Ui_searchWidget() self.ui.setupUi(self) # set initial states self.ui.checkBoxNepomuk.setChecked(True) # set signals self.ui.checkBoxNepomuk.connect(self.ui.checkBoxNepomuk, SIGNAL("toggled(bool)"), self.enableSearch) def enableSearch(self): if self.ui.showTray.isChecked(): self.ui.checkUpdate.setVisible(True) self.ui.updateInterval.setVisible(True) else: self.ui.checkUpdate.setChecked(False) self.ui.checkUpdate.setVisible(False) self.ui.checkUpdate.setCheckState(Qt.Unchecked) self.ui.updateInterval.setVisible(False) def updateSelected(self): #if self.ui.checkUpdate.isChecked(): # self.ui.updateInterval.setEnabled(True) #else: # self.ui.updateInterval.setEnabled(False) # TODO: Where are Nepomuk/Strigi settings stored? print "This part still needs to be written." def applySettings(self): # write selected configurations to future package-managerrc config = PMConfig() #config.setSystemTray(QVariant(self.ui.showTray.isChecked())) #config.setUpdateCheck(QVariant(self.ui.checkUpdate.isChecked())) #config.setUpdateCheckInterval(QVariant(self.ui.updateInterval.value() * 60)) #if self.ui.showTray.isChecked(): # p = subprocess.Popen(["spun"], stdout=subprocess.PIPE) def shown(self): pass def execute(self): self.applySettings() return True
def __init__(self, *args): QtGui.QWidget.__init__(self,None) self.ui = Ui_searchWidget() self.ui.setupUi(self) # set initial states self.ui.checkBoxNepomuk.setChecked(True) # set signals self.ui.checkBoxNepomuk.connect(self.ui.checkBoxNepomuk, SIGNAL("toggled(bool)"), self.enableSearch)