本文整理汇总了Python中PyKDE4.kdecore.KAboutData.addCredit方法的典型用法代码示例。如果您正苦于以下问题:Python KAboutData.addCredit方法的具体用法?Python KAboutData.addCredit怎么用?Python KAboutData.addCredit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyKDE4.kdecore.KAboutData
的用法示例。
在下文中一共展示了KAboutData.addCredit方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import addCredit [as 别名]
def main():
about = KAboutData(
b'synaptiks', '', ki18n('synaptiks'), str(synaptiks.__version__),
ki18n('touchpad management and configuration application'),
KAboutData.License_BSD,
ki18n('Copyright (C) 2009, 2010 Sebastian Wiesner'))
about.addAuthor(ki18n('Sebastian Wiesner'), ki18n('Maintainer'),
'[email protected]')
about.addCredit(ki18n('Valentyn Pavliuchenko'),
ki18n('Debian packaging, russian translation, '
'bug reporting and testing'),
'[email protected]')
about.setHomepage('http://synaptiks.lunaryorn.de/')
about.setOrganizationDomain('synaptiks.lunaryorn.de')
KCmdLineArgs.init(sys.argv, about)
app = KApplication()
window = KMainWindow()
touchpad = Touchpad.find_first(Display.from_qt())
config = TouchpadConfiguration(touchpad)
config_widget = TouchpadConfigurationWidget(config)
config_widget.configurationChanged.connect(
partial(print, 'config changed?'))
window.setCentralWidget(config_widget)
window.show()
app.exec_()
示例2: make_about_data
# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import addCredit [as 别名]
def make_about_data(description):
"""
Create an about data object describing synaptiks.
``description`` is a :class:`~PyKDE4.kdecore.KLocalizedString` containing a
description for the specific part of synaptiks, the created about data
object should describe.
Return a :class:`~PyKDE4.kdecore.KAboutData` object with the given
``description``.
"""
about = KAboutData(
b'synaptiks', '', ki18nc('Program name', 'synaptiks'),
str(synaptiks.__version__), description, KAboutData.License_BSD,
ki18nc('About data copyright',
# KLocalizedString doesn't deal well with unicode
b'Copyright © 2009, 2010, 2011 Sebastian Wiesner'))
about.setCustomAuthorText(
ki18nc('custom author text plain text',
'Please report bugs to the issue tracker at %1').subs(
synaptiks.ISSUE_TRACKER_URL),
ki18nc('@info custom author text rich text',
'Please report bugs to the '
'<link url="%1">issue tracker</link>.').subs(
synaptiks.ISSUE_TRACKER_URL))
about.setHomepage(synaptiks.WEBSITE_URL)
about.setOrganizationDomain('lunaryorn.de')
about.setTranslator(ki18nc('NAME OF TRANSLATORS', 'Your names'),
ki18nc('EMAIL OF TRANSLATORS', 'Your emails'))
about.addAuthor(ki18nc('author name', 'Sebastian Wiesner'),
ki18nc('author task', 'Maintainer'),
'[email protected]')
about.addCredit(ki18nc('credit name', 'Valentyn Pavliuchenko'),
ki18nc('credit task', 'Debian packaging, russian '
'translation, bug reporting and testing'),
'[email protected]')
return about
示例3: run
# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import addCredit [as 别名]
def run():
appName = "eclectus"
catalog = "eclectusqt"
programName = ki18n("Eclectus")
version = eclectusqt.__version__
description = ki18n("Han character dictionary")
license = KAboutData.License_GPL_V3
copyright = ki18n("(c) 2008-2009 Christoph Burgmer")
text = ki18n(
"Eclectus is a small Han character dictionary for learners.")
homePage = eclectusqt.__url__
bugEmail = "[email protected]"
bugAddress = "http://code.google.com/p/eclectus/issues/list"
aboutData = KAboutData(appName, catalog, programName, version, description,
license, copyright, text, homePage, bugEmail)
aboutData.addAuthor(ki18n("Christoph Burgmer"), ki18n("Developer"),
"[email protected]", "http://cburgmer.nfshost.com/")
aboutData.setCustomAuthorText(ki18n("Please use %1 to report bugs.")\
.subs(bugAddress),
ki18n('Please use %1 to report bugs.')\
.subs('<a href="%s">%s</a>' % (bugAddress, bugAddress)))
aboutData.addCredit(KLocalizedString(), ki18n("Arrr, Eclectus sits on the shoulders of some fine pirates:"))
aboutData.addCredit(ki18n("Jim Breen and contributors"), ki18n("EDICT"), '',
'http://www.csse.monash.edu.au/~jwb/j_edict.html')
aboutData.addCredit(ki18n("Paul Denisowski and current contributors"),
ki18n("CEDICT"), '', 'http://www.mdbg.net/chindict/chindict.php')
aboutData.addCredit(ki18n("HanDeDict team"), ki18n("HanDeDict"), '',
'http://www.chinaboard.de/chinesisch_deutsch.php')
aboutData.addCredit(ki18n("Tomoe developers"),
ki18n("Tomoe handwriting recognition"),
'[email protected]', 'http://tomoe.sourceforge.jp')
aboutData.addCredit(ki18n("Mathieu Blondel and the Tegaki contributors"),
ki18n("Tegaki handwriting recognition"),
u'mathieu ÂT mblondel DÔT org'.encode('utf8'),
'http://tegaki.sourceforge.net')
aboutData.addCredit(ki18n("Unicode Consortium and contributors"),
ki18n("Unihan database"), '', 'http://unicode.org/charts/unihan.html')
aboutData.addCredit(ki18n("Commons Stroke Order Project"),
ki18n("Stroke order pictures"), '',
'http://commons.wikimedia.org/wiki/Commons:Stroke_Order_Project')
aboutData.addCredit(ki18n("Tim Eyre, Ulrich Apel and the Wadoku Project"),
ki18n("Kanji stroke order font"), '',
'http://sites.google.com/site/nihilistorguk/')
aboutData.addCredit(
ki18n("Yue Tan, Wei Gao, Vion Nicolas and the Shtooka Project"),
ki18n("Pronunciation examples for Mandarin"), '',
'http://shtooka.net')
# find logo file, don't directly use util.getData(), KApplication not
# created yet
aboutLogoFile = u'/usr/share/kde4/apps/eclectus/eclectus_about.png'
if not os.path.exists(aboutLogoFile):
modulePath = os.path.dirname(os.path.abspath(__file__))
aboutLogoFile = os.path.join(modulePath, 'data', 'eclectus_about.png')
if not os.path.exists(aboutLogoFile):
aboutLogoFile = util.getData('eclectus_about.png')
if aboutLogoFile:
aboutData.setProgramLogo(QVariant(QImage(aboutLogoFile)))
KCmdLineArgs.init(sys.argv, aboutData)
# create applicaton
global g_app
g_app = KApplication()
# TODO how to access local .mo file?
#base = os.path.dirname(os.path.abspath(__file__))
#localeDir = os.path.join(base, "locale")
#print localeDir
#if os.path.exists(localeDir):
#print KGlobal.dirs().addResourceDir('locale', localeDir + '/', True)
#print KGlobal.dirs().findResource('locale', 'de/LC_MESSAGES/eclectusqt.mo')
# read config file and make global
global GeneralConfig
global DictionaryConfig
global PluginConfig
config = KConfig()
GeneralConfig = KConfigGroup(config, "General")
DictionaryConfig = KConfigGroup(config, "Dictionary")
PluginConfig = KConfigGroup(config, "Plugin")
# create main window
MainWindow().show()
# react to CTRL+C on the command line
signal.signal(signal.SIGINT, signal.SIG_DFL)
g_app.exec_()
示例4: ki18n
# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import addCredit [as 别名]
license = KAboutData.License_GPL_V3
copyright = ki18n("(C) 2011-2012 Sarwo Hadi Setyana")
text = ki18n("")
homepage = "http://bintang1992.wordpress.com/project/netkut"
bugEmail = "[email protected]"
aboutData = KAboutData(appName, catalogue, programName, version, description,
license, copyright, text, homepage, bugEmail)
# aboutData.addAuthor(ki18n("Sarwo Hadi Setyana"), ki18n("Author"),
# "[email protected]", "", "shsetyana")
aboutData.addAuthor(ki18n("Sarwo Hadi Setyana"), ki18n("Author"),
"[email protected]", "")
aboutData.addCredit(ki18n("Ahmed Atalla"), ki18n("TuxCut author"),
"[email protected]")
KCmdLineArgs.init(sys.argv, aboutData)
app = KApplication()
app.setWindowIcon(KIcon("edit-cut"))
netkut = Netkut()
netkut.mainWindow.show()
x = os.popen('whoami','r')
user = x.readline()
if user != 'root\n':
KMessageBox.error(None, "You must be root to run Netkut", "Error")
quit()
示例5: standalone
# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import addCredit [as 别名]
class standalone(KMainWindow):
def __init__(self, parent=None):
# QWidget.__init__(sip.simplewrapper)
KMainWindow.__init__(self, parent)
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
self.providerPluginManager = PluginManager("providerplugins","providerplugins", providerplugins.Provider.Provider)
self.providerpluginlist = self.providerPluginManager.getPluginClassList()
for provider in self.providerpluginlist:
self.ui.providerList.addItem(provider.getObjectname())
self.ui.providerList.setCurrentRow(0)
self.adressplugins = PluginManager("adressplugins","adressplugins", adressplugins.AdressPlugin.AdressPlugin)
self.adresspluginlist = self.adressplugins.getPluginClassList()
self.adressList = list()
for adressplugin in self.adresspluginlist:
for adress in adressplugin.getAdressList():
self.adressList.append(adress)
self.co = akonadi.Akonadi.Collection()
self.collectfetch = akonadi.Akonadi.CollectionFetchJob(akonadi.Akonadi.Collection().root(), akonadi.Akonadi.CollectionFetchJob.Recursive)
self.collectionFetcherScope = akonadi.Akonadi.CollectionFetchScope()
self.collectionFetcherScope.setContentMimeTypes(QStringList("text/directory"))
self.collectfetch.setFetchScope(self.collectionFetcherScope)
self.itemfetch = akonadi.Akonadi.ItemFetchJob(akonadi.Akonadi.Collection().root())
completion = KCompletion()
completion.setItems(self.adressList)
completion.setCompletionMode(KGlobalSettings.CompletionPopupAuto)
completion.setParent(self.ui.phonenr)
self.ui.phonenr.setCompletionObject(completion)
self.ui.contactList2.addItems(self.adressList)
self.aboutData = KAboutData (
"Multimobilewidget",
"blubb",
ki18n("Multimobilewidget"),
"0.1.0",
ki18n("Sends sms over the multimobileservice"),
KAboutData.License_GPL,
ki18n("(c) 2010"),
ki18n("This is a app could send sms over the multimobileservices. It's (should be) fully integrated in the kde-world!"),
"http://puzzle.ch",
"[email protected]"
)
self.aboutData.addAuthor(ki18n("Vinzenz Hersche"), ki18n(""), "[email protected]", "http://death-head.ch")
self.aboutData.addCredit(ki18n("#pyqt, #akonadi in freenode"), ki18n("Help on several beginnerproblems - thank you!"))
self.aboutData.addCredit(ki18n("Tschan Daniel"), ki18n("Helps on a akonadi-related signal/slot-question"))
self.ui.actionAbout.triggered.connect(self.onAboutClick)
self.ui.actionSettings.triggered.connect(self.onConfigClick)
self.ui.sendbutton.clicked.connect(self.onSendClick)
self.ui.smstext.textChanged.connect(self.onTextChanged)
self.itemfetch.result.connect(self.itemFetched)
self.collectfetch.collectionsReceived.connect(self.collectionFetched)
#self.connect(self.ui.actionAbout, SIGNAL("triggered()"), self.onAboutClick)
#self.connect(self.ui.actionSettings, SIGNAL("triggered()"), self.onConfigClick)
#self.connect(self.ui.sendbutton, SIGNAL("clicked()"), self.onSendClick)
#self.connect(self.ui.smstext, SIGNAL("textChanged()"), self.onTextChanged)
#self.connect(self.itemfetch, SIGNAL("result(KJob*)"), self.itemFetched)
#self.connect(self.collectfetch, SIGNAL("collectionsReceived(const Akonadi::Collection::List&)"), self.collectionFetched)
self.getLogin()
self.itemfetch.fetchScope().fetchFullPayload()
def itemFetched(self, blubb):
for item in blubb.items():
print str(item.mimeType())
def collectionFetched(self, thelist):
self.itemfetch.setCollection(thelist[0])
self.itemfetch.doStart()
def onConfigClick(self):
from config import config
self.startAssistant = config(self.providerPluginManager, self.adressplugins)
self.startAssistant.show()
self.connect(self.startAssistant, SIGNAL("finished(int)"), self.getLogin)
def onAboutClick(self):
self.kaboutUi = KAboutApplicationDialog(self.aboutData)
self.kaboutUi.show()
def onSendClick(self):
for provider in self.providerpluginlist:
if(provider.getObjectname() == self.ui.providerList.selectedItems()[0].text()):
sms = provider
if self.ui.smstext.toPlainText() != "":
if self.ui.phonenr.text() != "":
self.getLogin()
try:
sms.setConfig(self.config)
except Exception:
self.onConfigClick()
return
sms.clearNrs()
for nr in re.findall("(\+\d*)", self.ui.phonenr.text()):
sms.addNr(nr)
sms.setText(self.ui.smstext.toPlainText())
savenr = self.ui.phonenr.text()
try:
#.........这里部分代码省略.........