diff options
author | jerous <jerous@gmail.com> | 2008-06-12 01:31:27 +0200 |
---|---|---|
committer | jerous <jerous@gmail.com> | 2008-06-12 01:32:08 +0200 |
commit | a97bd77f927c1c34787bdc5e23bdac17e24225a4 (patch) | |
tree | 78e7ca7d9bc56f7e895b2ab1b4b326fac3a06bdd /plugins/Systray.py | |
parent | d948985110a4c1350a2fc114f520eac36c795ba1 (diff) |
loading dynamically all plugins in ./plugins/*.py
Diffstat (limited to 'plugins/Systray.py')
-rw-r--r-- | plugins/Systray.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/Systray.py b/plugins/Systray.py new file mode 100644 index 0000000..5f0f38f --- /dev/null +++ b/plugins/Systray.py @@ -0,0 +1,19 @@ +from PyQt4 import QtGui +from clMonty import monty +from clPlugin import * +from misc import * + +class pluginSystray(Plugin): + o=None + def __init__(self, winMain): + Plugin.__init__(self, winMain, 'Systray') + + self.o=QtGui.QSystemTrayIcon(appIcon, winMain) + self.o.show() + winMain.connect(self.o, QtCore.SIGNAL('activated (QSystemTrayIcon::ActivationReason)') + , self.onSysTrayClick) + def getInfo(self): + return "Display the montypc icon in the systray." + + def onSysTrayClick(self, reason): + self.getWinMain().setVisible(not(self.getWinMain().isVisible())) |