summaryrefslogtreecommitdiff
path: root/nephilim/plugins/Systray.py
diff options
context:
space:
mode:
Diffstat (limited to 'nephilim/plugins/Systray.py')
-rw-r--r--nephilim/plugins/Systray.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/nephilim/plugins/Systray.py b/nephilim/plugins/Systray.py
index 2411309..749a0c6 100644
--- a/nephilim/plugins/Systray.py
+++ b/nephilim/plugins/Systray.py
@@ -16,7 +16,7 @@
# along with Nephilim. If not, see <http://www.gnu.org/licenses/>.
#
-from PyQt4 import QtGui, QtCore
+from PyQt5 import QtGui, QtWidgets, QtCore
from ..plugin import Plugin
from ..common import sec2min, APPNAME, appIcon, expand_tags
@@ -40,14 +40,14 @@ class Systray(Plugin):
"""This class listens for systray-wheel events"""
def eventFilter(self, object, event):
if type(event)==QtGui.QWheelEvent:
- numDegrees=event.delta() / 8
+ numDegrees=event.angleDelta().y() / 8
numSteps=5*numDegrees/15
self.plugin.mpclient.set_volume(self.plugin.mpclient.status['volume'] + numSteps)
event.accept()
return True
return False
- self.o = QtGui.QSystemTrayIcon(QtGui.QIcon(appIcon), self.parent())
+ self.o = QtWidgets.QSystemTrayIcon(QtGui.QIcon(appIcon), self.parent())
self.eventObj=SystrayWheelEventObject()
self.eventObj.plugin = self
self.o.installEventFilter(self.eventObj)
@@ -99,9 +99,9 @@ class Systray(Plugin):
def __init__(self, plugin):
Plugin.SettingsWidget.__init__(self, plugin)
- self.format = QtGui.QLineEdit(self.settings.value(self.plugin.name + '/format'))
+ self.format = QtWidgets.QLineEdit(self.settings.value(self.plugin.name + '/format'))
- self.setLayout(QtGui.QVBoxLayout())
+ self.setLayout(QtWidgets.QVBoxLayout())
self._add_widget(self.format, 'Tooltip format')
def save_settings(self):