Contents |
Languages: عربي | Asturianu | Català | Česky | Kaszëbsczi | Dansk | Deutsch | English | Esperanto | Español | Eesti | فارسی | Suomi | Français | Galego | Italiano | 日本語 | 한국어 | Norwegian | Polski | Português Brasileiro | Română | Русский | Svenska | Slovenčina | Slovenščina | српски | Türkçe | Tiếng Việt | Українська | 简体中文 | 繁體中文
| Tutorial Series | Python |
| Previous | None |
| What's Next | |
| Further Reading | Qt Signals and Slots in python, Introduction to PyQT4, Using PyKDE4 |
The aim of this tutorial is to give a sample class to include Notifications and Jobs to your own python programms, so the user can see what is going on (for example a backup system, that tells you that is backuping right now). It assumes a basic working knowledge of Python and PyKDE4. For now only the Job part is mentioned, 'cause that is the only part I've created right now.
To add the Notification part also to this tutorial.
We start with a minimal KDE Appliciation (Using PyKDE4):
if __name__ == "__main__":
import sys
from PyKDE4.kdecore import KCmdLineArgs, KAboutData, KLocalizedString, ki18n
from PyKDE4.kdeui import KApplication
appName = "default"
catalog = ""
programName = ki18n ("default")
version = "1.0"
description = ki18n ("Default Example")
license = KAboutData.License_GPL
copyright = ki18n ("(c) 2010 Sandro Knauß")
text = ki18n ("none")
homePage = "techbase.kde.org"
bugEmail = "bugs@sandroknauss.de"
aboutData = KAboutData (appName, catalog, programName, version, description,
license, copyright, text, homePage, bugEmail)
KCmdLineArgs.init (sys.argv, aboutData) app = KApplication ()