-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathutils.py
More file actions
32 lines (22 loc) · 839 Bytes
/
utils.py
File metadata and controls
32 lines (22 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/python
# -*- coding: utf-8 -*-
from PyQt5.QtCore import QObject, Q_CLASSINFO, pyqtSlot
from PyQt5.QtDBus import QDBusAbstractAdaptor
class ServerAdaptor(QDBusAbstractAdaptor):
""" This provides the DBus adaptor to the outside world"""
Q_CLASSINFO("D-Bus Interface", "sevanteri.TabletShortcuts")
Q_CLASSINFO("D-Bus Introspection",
'<interface name="sevanteri.TabletShortcuts">\n'
' <method name="hideshow" />\n'
'</interface>\n')
def __init__(self, parent, app):
super().__init__(parent)
self.app = app
@pyqtSlot()
def hideshow(self):
self.app.showView()
class MyDBUSServer(QObject):
def __init__(self, app):
QObject.__init__(self)
self.__dbusAdaptor = ServerAdaptor(self, app)
self.app = app