diff options
author | Anton Khirnov <wyskas@gmail.com> | 2009-03-07 11:38:26 +0100 |
---|---|---|
committer | Anton Khirnov <wyskas@gmail.com> | 2009-03-07 11:38:26 +0100 |
commit | c351b5c9f9f93b95cfa57c9bf10a6807e7f1b5f7 (patch) | |
tree | aadf0d4e4fc063834ed3ec1b2517abfae2450579 /nephilim/plugin.py | |
parent | 5443aedab5a1e4d54888a56720c0a9fcf6c98315 (diff) |
mpclient: use Qt signals/slots for events.
Diffstat (limited to 'nephilim/plugin.py')
-rw-r--r-- | nephilim/plugin.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/nephilim/plugin.py b/nephilim/plugin.py index dcbd1a0..86a379c 100644 --- a/nephilim/plugin.py +++ b/nephilim/plugin.py @@ -5,7 +5,7 @@ import logging import plugins from misc import * -class Plugin: +class Plugin(QtCore.QObject): _name = None _dock_widget = None _settings = None @@ -14,9 +14,9 @@ class Plugin: _parent = None _mpclient = None DEFAULTS = {} - LISTENERS = {} def __init__(self, parent, mpclient, name): + QtCore.QObject.__init__(self) self._name = name self._parent = parent self._mpclient = mpclient @@ -31,8 +31,6 @@ class Plugin: self._settings.setValue(key, QVariant(self.DEFAULTS[key])) self._settings.endGroup() - for event, listener in self.LISTENERS.iteritems(): - self._listeners.append([event, eval('self.%s'%listener)]) def name(self): return self._name |