当前位置: 首页>>代码示例>>Python>>正文


Python KAboutData.addAuthor方法代码示例

本文整理汇总了Python中PyKDE4.kdecore.KAboutData.addAuthor方法的典型用法代码示例。如果您正苦于以下问题:Python KAboutData.addAuthor方法的具体用法?Python KAboutData.addAuthor怎么用?Python KAboutData.addAuthor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyKDE4.kdecore.KAboutData的用法示例。


在下文中一共展示了KAboutData.addAuthor方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: main

# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import addAuthor [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_()
开发者ID:Ascaf0,项目名称:synaptiks,代码行数:28,代码来源:try_touchpad_config_widget.py

示例2: createApp

# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import addAuthor [as 别名]
def createApp (args=sys.argv):
    #########################################
    # all the bureaucratic init of a KDE App
    # the appName must not contain any chars besides a-zA-Z0-9_
    # because KMainWindowPrivate::polish() calls QDBusConnection::sessionBus().registerObject()
    # see QDBusUtil::isValidCharacterNoDash()
    appName     = "satyr"
    catalog     = ""
    programName = ki18n ("satyr")                 #ki18n required here
    version     = "0.5.0"
    description = ki18n ("I need a media player that thinks about music the way I think about it. This is such a program.")         #ki18n required here
    license     = KAboutData.License_GPL
    copyright   = ki18n ("(c) 2009, 2010 Marcos Dione")    #ki18n required here
    text        = ki18n ("none")                    #ki18n required here
    homePage    = "http://savannah.nongnu.org/projects/satyr/"
    bugEmail    = "[email protected]"

    aboutData   = KAboutData (appName, catalog, programName, version, description,
                                license, copyright, text, homePage, bugEmail)

    # ki18n required for first two addAuthor () arguments
    aboutData.addAuthor (ki18n ("Marcos Dione"), ki18n ("design and implementation"))
    aboutData.addAuthor (ki18n ("Sebastián Álvarez"), ki18n ("features, bugfixes and testing"))

    KCmdLineArgs.init (args, aboutData)
    options= KCmdLineOptions ()
    options.add ("s").add ("skin <skin-name>", ki18n ("skin"), "")
    options.add ("+path", ki18n ("paths to your music collections"))
    KCmdLineArgs.addCmdLineOptions (options)

    app= App ()
    args= KCmdLineArgs.parsedArgs ()

    return app, args
开发者ID:StyXman,项目名称:satyr,代码行数:36,代码来源:__init__.py

示例3: main

# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import addAuthor [as 别名]
def main():
    global app, aboutData

    import setproctitle
    setproctitle.setproctitle("iosshy")

    from PyQt4.QtCore import QCoreApplication, QTranslator, QLocale, QSettings
    from PyQt4.QtGui import QApplication, QSystemTrayIcon, QImage

    from tunneldialog import TunnelDialog

    try:
        from PyKDE4.kdecore import ki18n, KAboutData, KCmdLineArgs
        from PyKDE4.kdeui import KApplication, KIcon

        aboutData = KAboutData(
            name, #appName
            name, #catalogName
            ki18n(name), #programName
            version,
            ki18n(description), #shortDescription
            KAboutData.License_BSD, #licenseKey
            ki18n("© 2010 Massimiliano Torromeo"), #copyrightStatement
            ki18n(""), #text
            url #homePageAddress
        )
        aboutData.setBugAddress("http://github.com/mtorromeo/iosshy/issues")
        aboutData.addAuthor(
            ki18n("Massimiliano Torromeo"), #name
            ki18n("Main developer"), #task
            "[email protected]" #email
        )
        aboutData.setProgramLogo(QImage(":icons/network-server.png"))

        KCmdLineArgs.init(sys.argv, aboutData)

        app = KApplication()
        app.setWindowIcon(KIcon("network-server"))

        if app.isSessionRestored():
            sys.exit(0)
    except ImportError:
        app = QApplication(sys.argv)
        app.setOrganizationName("MTSoft")
        app.setApplicationName(name)


    if QSystemTrayIcon.isSystemTrayAvailable():
        translator = QTranslator()
        qmFile = "tunneller_%s.qm" % QLocale.system().name()
        if os.path.isfile(qmFile):
            translator.load(qmFile)
        app.installTranslator(translator)

        dialog = TunnelDialog()
        sys.exit(app.exec_())
    else:
        print "System tray not available. Exiting."
        sys.exit(1)
开发者ID:sassman,项目名称:iosshy,代码行数:61,代码来源:application.py

示例4: __init__

# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import addAuthor [as 别名]
    def __init__(self):
        
        aboutData = KAboutData(APP_NAME, CATALOG, PROGRAM_NAME, VERSION, DESCRIPTION,
                                    LICENSE, COPYRIGHT, TEXT, HOMEPAGE, BUG_EMAIL)

        aboutData.addAuthor(ki18n("Chris Dekter"), ki18n("Developer"), "[email protected]", "")
        aboutData.addAuthor(ki18n("Sam Peterson"), ki18n("Original developer"), "[email protected]", "")
        aboutData.setProgramIconName(common.ICON_FILE)
        self.aboutData = aboutData

        aboutData_py3 = KAboutData(APP_NAME, CATALOG, PROGRAM_NAME_PY3, VERSION, DESCRIPTION_PY3,
                                    LICENSE, COPYRIGHT_PY3, TEXT, HOMEPAGE_PY3, BUG_EMAIL_PY3)
        aboutData_py3.addAuthor(ki18n("GuoCi"), ki18n("Python 3 port maintainer"), "[email protected]", "")
        aboutData_py3.addAuthor(ki18n("Chris Dekter"), ki18n("Developer"), "[email protected]", "")
        aboutData_py3.addAuthor(ki18n("Sam Peterson"), ki18n("Original developer"), "[email protected]", "")
        aboutData_py3.setProgramIconName(common.ICON_FILE)
        self.aboutData_py3 = aboutData_py3
        
        KCmdLineArgs.init(sys.argv, aboutData)
        options = KCmdLineOptions()
        options.add("l").add("verbose", ki18n("Enable verbose logging"))
        options.add("c").add("configure", ki18n("Show the configuration window on startup"))
        KCmdLineArgs.addCmdLineOptions(options)
        args = KCmdLineArgs.parsedArgs()
        
        
        self.app = KApplication()
        
        try:
            # Create configuration directory
            if not os.path.exists(CONFIG_DIR):
                os.makedirs(CONFIG_DIR)
            # Initialise logger
            rootLogger = logging.getLogger()
            rootLogger.setLevel(logging.DEBUG)
            
            if args.isSet("verbose"):
                handler = logging.StreamHandler(sys.stdout)
            else:
                handler = logging.handlers.RotatingFileHandler(LOG_FILE, 
                                        maxBytes=MAX_LOG_SIZE, backupCount=MAX_LOG_COUNT)
                handler.setLevel(logging.INFO)
            
            handler.setFormatter(logging.Formatter(LOG_FORMAT))
            rootLogger.addHandler(handler)
            
            
            if self.__verifyNotRunning():
                self.__createLockFile()
                
            self.initialise(args.isSet("configure"))
            
        except Exception as e:
            self.show_error_dialog(i18n("Fatal error starting AutoKey.\n") + str(e))
            logging.exception("Fatal error starting AutoKey: " + str(e))
            sys.exit(1)
开发者ID:adragomir,项目名称:autokey-py3,代码行数:58,代码来源:qtapp.py

示例5: make_about_data

# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import addAuthor [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
开发者ID:adaptee,项目名称:synaptiks,代码行数:40,代码来源:__init__.py

示例6: MakeAboutData

# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import addAuthor [as 别名]
def MakeAboutData():
  appName     = "language-selector"
  catalog     = ""
  programName = ki18n ("Language Selector")
  version     = "0.3.4"
  description = ki18n ("Language Selector")
  license     = KAboutData.License_GPL
  copyright   = ki18n ("(c) 2008 Canonical Ltd")
  text        = ki18n ("none")
  homePage    = "https://launchpad.net/language-selector"
  bugEmail    = ""

  aboutData   = KAboutData (appName, catalog, programName, version, description, license, copyright, text, homePage, bugEmail)
  aboutData.addAuthor(ki18n("Michael Vogt"), ki18n("Developer"))
  aboutData.addAuthor(ki18n("Jonathan Riddell"), ki18n("Developer"))
  aboutData.addAuthor(ki18n("Harald Sitter"), ki18n("Developer"))
  aboutData.addAuthor(ki18n("Romain Perier"), ki18n("Developer"))
  
  return aboutData
开发者ID:wzssyqa,项目名称:language-selector-im-config,代码行数:21,代码来源:QtLanguageSelector.py

示例7: ki18n

# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import addAuthor [as 别名]
#

# Package Manager Version String
version = "3.0.3"
PACKAGE = "Package Manager"

# PyKDE4 Imports
from PyKDE4.kdecore import ki18n, ki18nc, KAboutData

# Application Data
appName     = "package-manager"
catalog     = appName
programName = ki18n(PACKAGE)
description = ki18n(PACKAGE)
license     = KAboutData.License_GPL
copyright   = ki18n("(c) 2009-2010 TUBITAK/UEKAE")
text        = ki18n(None)
homePage    = "http://developer.pardus.org.tr/projects/package-manager"
bugEmail    = "[email protected]"
aboutData   = KAboutData(appName, catalog, programName, version,
                         description, license, copyright, text,
                         homePage, bugEmail)

# Authors
aboutData.addAuthor(ki18n("Gökmen Göksel"), ki18n("Developer"))
aboutData.addAuthor(ki18n("Faik Uygur"), ki18n("First Author"))
aboutData.setTranslator(ki18nc("NAME OF TRANSLATORS", "Your names"),
                        ki18nc("EMAIL OF TRANSLATORS", "Your emails"))
aboutData.setProgramIconName(":/data/package-manager.png")

开发者ID:SamiBabat,项目名称:playground,代码行数:31,代码来源:about.py

示例8: Copyright

# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import addAuthor [as 别名]
#
# Copyright (C) 2006-2009 TUBITAK/UEKAE
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
#

# PyKDE
from PyKDE4.kdecore import KAboutData, ki18n

# Application Data
appName     = "kaptan"
programName = ki18n("Kaptan")
modName     = "kaptan"
version     = "5.1.1"
description = ki18n("Kaptan")
license     = KAboutData.License_GPL
copyright   = ki18n("Pisilinux Community")
text        = ki18n(" ")
homePage    = "https://github.com/pisilinux/project"
bugEmail    = "[email protected]"
catalog     = appName
aboutData   = KAboutData(appName, catalog, programName, version, description, license, copyright, text, homePage, bugEmail)

# Author(s)
aboutData.addAuthor(ki18n("Pisi Linux Admins"), ki18n("Current Maintainer"))
开发者ID:PisiLinuxRepos,项目名称:project,代码行数:32,代码来源:about.py

示例9: ki18n

# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import addAuthor [as 别名]
#!/usr/bin/python
# -*- coding: utf-8 -*-

# PyKDE
from PyKDE4.kdecore import KAboutData, ki18n

# Application Data
appName     = "profiler"
programName = ki18n("Profiler Desktop")
modName     = "profiler"
version     = "1.0"
description = ki18n("Profiler Desktop")
license     = KAboutData.License_GPL
copyright   = ki18n("(c) 2010-2015 blackPanther OS (froked Kaptan)")
text        = ki18n("blackPanther OS Profiler Wizard")
homePage    = "http://www.blackpantheros.eu"
bugEmail    = "[email protected]"
catalog     = appName
aboutData   = KAboutData(appName, catalog, programName, version, description, license, copyright, text, homePage, bugEmail)

# Author(s)
aboutData.addAuthor(ki18n("Charles Barcza, Miklos Horvath"), ki18n("Current Maintainer"))
开发者ID:blackPantherOS,项目名称:applications,代码行数:24,代码来源:about.py

示例10: ki18n

# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import addAuthor [as 别名]
#!/usr/bin/python
# -*- coding: utf-8 -*-
#

from PyKDE4.kdecore import KAboutData, ki18n

appName = "puma"
modName = "puma"
programName = ki18n("Puma")
version = "0.0.1"
description = ki18n("PUMA")
license = KAboutData.License_GPL
copyright = ki18n("(c) 2009 TUBITAK/UEKAE")
text = ki18n(" ")
homePage = "http://www.pardus.org.tr/eng/projects"
bugEmail = "[email protected]"
catalog = appName
aboutData = KAboutData(appName, catalog, programName, version, description, license, copyright, text, homePage, bugEmail)

# Author(s)
aboutData.addAuthor(ki18n("Cihan Okyay"), ki18n("Current Maintainer"))



开发者ID:dhirajkhatiwada1,项目名称:uludag,代码行数:23,代码来源:about.py

示例11: ki18n

# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import addAuthor [as 别名]
    programName = ki18n("Netkut")
    version     = VERSION
    description = ki18n("KDE netcut-like utility based on TuxCut code.")
    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()
    
开发者ID:go2n,项目名称:Netkut,代码行数:33,代码来源:netkut.py

示例12: ki18n

# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import addAuthor [as 别名]
# Package Manager Version String
version = "3.1"
PACKAGE = "Package Manager"

# PyKDE4 Imports
from PyKDE4.kdecore import ki18n, ki18nc, KAboutData

# Application Data
appName     = "package-manager"
catalog     = appName
programName = ki18n(PACKAGE)
description = ki18n(PACKAGE)
license     = KAboutData.License_GPL
copyright   = ki18n("(c) 2009-2010 TUBITAK/UEKAE")
text        = ki18n(None)
homePage    = "http://source.pisilinux.com/projects/package-manager"
bugEmail    = "[email protected]"
aboutData   = KAboutData(appName, catalog, programName, version,
                         description, license, copyright, text,
                         homePage, bugEmail)

# Authors
aboutData.addAuthor(ki18n("Onur Aslan <aslanon>"), ki18n("Qt Designer, New Developer"))
aboutData.addAuthor(ki18n("Gökmen Göksel"), ki18n("Old Developer"))
aboutData.addAuthor(ki18n("Faik Uygur"), ki18n("First Author"))
aboutData.setTranslator(ki18nc("NAME OF TRANSLATORS", "Your names"),
                        ki18nc("EMAIL OF TRANSLATORS", "Your emails"))
aboutData.setProgramIconName(":/data/package-manager.png")

开发者ID:aslanon,项目名称:pisilinux,代码行数:30,代码来源:about.py

示例13: ki18n

# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import addAuthor [as 别名]
import context as ctx
PACKAGE     = "Boot Manager"
appName     = "boot-manager"
version     = "3.0.0"
homePage    = "http://developer.pardus.org.tr/projects/boot-manager"
bugEmail    = "[email protected]"

if ctx.Pds.session == ctx.pds.Kde4:

    # PyKDE
    from PyKDE4.kdecore import KAboutData, ki18n, ki18nc

    # Application Data
    programName = ki18n(PACKAGE)
    description = ki18n(PACKAGE)
    license     = KAboutData.License_GPL
    copyright   = ki18n("(c) 2006-2011 TUBITAK/UEKAE")
    text        = ki18n(None)
    catalog     = appName
    aboutData   = KAboutData(appName, catalog, programName, version, description, license, copyright, text, homePage, bugEmail)

    # Author(s)
    aboutData.addAuthor(ki18n("Gökmen Göksel"), ki18n("Current Maintainer"))
    aboutData.addAuthor(ki18n("Bahadır Kandemir"), ki18n("First Developer"))
    aboutData.addAuthor(ki18n("Aydan Taşdemir"), ki18n("Pure Qt Support"))
    aboutData.setTranslator(ki18nc("NAME OF TRANSLATORS", "Your names"), ki18nc("EMAIL OF TRANSLATORS", "Your emails"))


    # Use this if icon name is different than appName
    aboutData.setProgramIconName("computer")
开发者ID:SamiBabat,项目名称:playground,代码行数:32,代码来源:about.py

示例14: or

# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import addAuthor [as 别名]
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# Please read the COPYING file.
#

# PyKDE
from PyKDE4.kdecore import KAboutData, ki18n

# Application Data
appName = "bugtool"
programName = ki18n("Bug Reporting Tool")
modName = "bugtool"
version = "4.0"
description = ki18n("Bug Reporting Tool")
license = KAboutData.License_GPL
copyright = ki18n("(c) 2005-2009 TUBITAK/UEKAE")
text = ki18n(" ")
homePage = "http://www.pardus.org.tr/eng/projects"
bugEmail = "[email protected]"
catalog = appName
aboutData = KAboutData(
    appName, catalog, programName, version, description, license, copyright, text, homePage, bugEmail
)

# Author(s)
aboutData.addAuthor(ki18n("Gsoc"), ki18n("Current Maintainer"))
开发者ID:hasanakgoz,项目名称:Pardus-2011-Svn-,代码行数:32,代码来源:about.py

示例15: standalone

# 需要导入模块: from PyKDE4.kdecore import KAboutData [as 别名]
# 或者: from PyKDE4.kdecore.KAboutData import addAuthor [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:
#.........这里部分代码省略.........
开发者ID:hersche,项目名称:MultiSms,代码行数:103,代码来源:standalone.py


注:本文中的PyKDE4.kdecore.KAboutData.addAuthor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。