From a97bd77f927c1c34787bdc5e23bdac17e24225a4 Mon Sep 17 00:00:00 2001 From: jerous Date: Thu, 12 Jun 2008 01:31:27 +0200 Subject: loading dynamically all plugins in ./plugins/*.py --- plugins/Systray.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plugins/Systray.py (limited to 'plugins/Systray.py') 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())) -- cgit v1.2.3