diff options
Diffstat (limited to 'examples/systray.py')
-rw-r--r-- | examples/systray.py | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/examples/systray.py b/examples/systray.py index fa305b0..a4c3ff3 100644 --- a/examples/systray.py +++ b/examples/systray.py @@ -30,25 +30,36 @@ copyright holder. import sys from PyTQt.qt import TQLabel -from tdecore import TDEApplication, TDEIcon, TDEIconLoader +from tdecore import TDEAboutData, TDEApplication, TDECmdLineArgs, TDEIcon, TDEIconLoader from tdeui import TDEMainWindow, KSystemTray class MainWin (TDEMainWindow): def __init__ (self, *args): - apply (TDEMainWindow.__init__, (self,) + args) + TDEMainWindow.__init__(self, *args) #-------------------- main ------------------------------------------------ -appName = "template" -app = TDEApplication (sys.argv, appName) -mainWindow = MainWin (None, "main window") +description = b"A basic application template" +version = b"1.0" +aboutData = TDEAboutData (b"MyApp", b"MyApp",\ + version, description, TDEAboutData.License_GPL,\ + b"(C) 2003 whoever the author is") + +aboutData.addAuthor (b"author1", b"whatever they did", b"email@somedomain") +aboutData.addAuthor (b"author2", b"they did something else", b"another@email.address") + +TDECmdLineArgs.init (sys.argv, aboutData) + +TDECmdLineArgs.addCmdLineOptions ([(b"+files", b"File to open")]) + +app = TDEApplication () +mainWindow = MainWin(None, "main window") icons = TDEIconLoader () systray = KSystemTray (mainWindow) systray.setPixmap (icons.loadIcon("process-stop", TDEIcon.Desktop)) systray.show () -#mainWindow.show() app.exec_loop() |