def getIconPath(icon, group=KIcon.Desktop): packageIconPath = KGlobal.iconLoader().iconPath("package", group) if not icon: return packageIconPath iconPath = KGlobal.iconLoader().iconPath(icon, group, True) # icon metadata may exist in the package but the pixmap may not # exists on the system yet for any to be installed package. if not iconPath: return packageIconPath else: return iconPath
def __init__(self, parent = None, comar = None, name= None): COMARDialogUI.__init__(self, parent, name) self.realLoc = "" il = KGlobal.iconLoader() self.pbFile.setIconSet(il.loadIconSet("fileopen", KIcon.Toolbar)) self.connect(self.btnOk, SIGNAL("clicked()"), self, SLOT("accept()")) self.connect(self.btnCancel, SIGNAL("clicked()"), self, SLOT("reject()")) self.connect(self.pbFile, SIGNAL("clicked()"), self.slotFile) if comar: self.cbProvides.setCurrentText(comar[0]) self.leFile.setText(comar[1])
def __init__(self, parent = None, patch = None, name = None): PatchDialogUI.__init__(self, parent, name) self.realLoc = "" self.connect(self.btnOk, SIGNAL("clicked()"), self, SLOT("accept()")) self.connect(self.btnCancel, SIGNAL("clicked()"), self, SLOT("reject()")) self.connect(self.pbPatch, SIGNAL("clicked()"), self.slotPatch) il = KGlobal.iconLoader() self.pbPatch.setIconSet(il.loadIconSet("fileopen", KIcon.Toolbar)) if patch: self.niLevel.setValue(int(patch[0])) self.cbType.setCurrentText(patch[1]) self.lePatch.setText(patch[2])
def __init__(self, parent=None, comar=None, name=None): COMARDialogUI.__init__(self, parent, name) self.realLoc = "" il = KGlobal.iconLoader() self.pbFile.setIconSet(il.loadIconSet("fileopen", KIcon.Toolbar)) self.connect(self.btnOk, SIGNAL("clicked()"), self, SLOT("accept()")) self.connect(self.btnCancel, SIGNAL("clicked()"), self, SLOT("reject()")) self.connect(self.pbFile, SIGNAL("clicked()"), self.slotFile) if comar: self.cbProvides.setCurrentText(comar[0]) self.leFile.setText(comar[1])
def __init__(self, parent = None, file = None, name= None): AdditionalFileDialogUI.__init__(self, parent, name) self.realLoc = "" il = KGlobal.iconLoader() self.pbFile.setIconSet(il.loadIconSet("fileopen", KIcon.Toolbar)) self.connect(self.btnOk, SIGNAL("clicked()"), self, SLOT("accept()")) self.connect(self.btnCancel, SIGNAL("clicked()"), self, SLOT("reject()")) if file: self.cbOwner.setCurrentText(file[0]) self.lePermission.setText(file[1]) self.leTarget.setText(file[2]) self.leFile.setText(file[3]) self.connect(self.pbFile, SIGNAL("clicked()"), self.slotFile)
def __init__(self, parent=None, file=None, name=None): AdditionalFileDialogUI.__init__(self, parent, name) self.realLoc = "" il = KGlobal.iconLoader() self.pbFile.setIconSet(il.loadIconSet("fileopen", KIcon.Toolbar)) self.connect(self.btnOk, SIGNAL("clicked()"), self, SLOT("accept()")) self.connect(self.btnCancel, SIGNAL("clicked()"), self, SLOT("reject()")) if file: self.cbOwner.setCurrentText(file[0]) self.lePermission.setText(file[1]) self.leTarget.setText(file[2]) self.leFile.setText(file[3]) self.connect(self.pbFile, SIGNAL("clicked()"), self.slotFile)
def getKDELocale(): KGlobal.config().setGroup("Locale") return KGlobal.config().readEntry("Language", "tr")
#!/usr/bin/python # -*- coding: utf-8 -*- import sys from kdecore import KApplication, KAboutData, KCmdLineArgs, KGlobal, KIcon from qt import QObject, SIGNAL, SLOT from pakito.gui.mainwindow import MainWindow def I18N_NOOP(x): return x name = "Pakito" version = "0.3" mail = "*****@*****.**" description = I18N_NOOP("A tool for accelerating package making process") if __name__ == "__main__": about = KAboutData(name.lower(), name, version, description, KAboutData.License_GPL_V2, "(C) Gökçen Eraslan 2007", None, None, mail) about.addAuthor("Gökçen Eraslan", None, mail) KCmdLineArgs.init(sys.argv, about) app = KApplication() programLogo = KGlobal.iconLoader().loadIcon("pisikga", KIcon.Desktop) about.setProgramLogo(programLogo.convertToImage()) QObject.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()")) pac = MainWindow(None, name) app.setMainWidget(pac) pac.show() app.exec_loop()
def getIconSize(): KGlobal.config().setGroup("DesktopIcons") return KGlobal.config().readNumEntry("Size", 48)
def loadIconSet(name, group=KIcon.Toolbar): return KGlobal.iconLoader().loadIconSet(name, group)
def loadIcon(name, group=KIcon.Desktop): return KGlobal.iconLoader().loadIcon(name, group)
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from kdecore import KApplication, KAboutData, KCmdLineArgs, KGlobal, KIcon from qt import QObject, SIGNAL, SLOT from pakito.gui.mainwindow import MainWindow def I18N_NOOP(x): return x name = "Pakito" version = "0.3" mail = "*****@*****.**" description = I18N_NOOP("A tool for accelerating package making process") if __name__ == "__main__": about = KAboutData(name.lower(), name, version, description, KAboutData.License_GPL_V2, "(C) Gökçen Eraslan 2007", None, None, mail) about.addAuthor("Gökçen Eraslan", None, mail) KCmdLineArgs.init(sys.argv, about) app = KApplication() programLogo = KGlobal.iconLoader().loadIcon("pisikga", KIcon.Desktop) about.setProgramLogo(programLogo.convertToImage()) QObject.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()")) pac = MainWindow(None, name) app.setMainWidget(pac) pac.show() app.exec_loop()
def getKDELocale(): return str(KGlobal.locale().language())