Languages/Python/PyKDE Knotify Tutorial
Development/Tutorials/Python/PyKDE_KNotify_Tutorial
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 |
Abstract
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.
Further plans
To add the Notification part also to this tutorial.
Instruction
We start with a minimal KDE Appliciation (Using PyKDE4):
- ! /usr/bin/python
- -*- coding: utf-8 -*-
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 = "[email protected]"
aboutData = KAboutData (appName, catalog, programName, version, description,
license, copyright, text, homePage, bugEmail)
KCmdLineArgs.init (sys.argv, aboutData)
app = KApplication ()