Changeset View
Changeset View
Standalone View
Standalone View
lib/mpris2/mpris2service.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | Gwenview: an image viewer | ||||
3 | Copyright 2018 Friedrich W. H. Kossebau <kossebau@kde.org> | ||||
4 | | ||||
5 | This program is free software; you can redistribute it and/or | ||||
6 | modify it under the terms of the GNU General Public License | ||||
7 | as published by the Free Software Foundation; either version 2 | ||||
8 | of the License, or (at your option) any later version. | ||||
9 | | ||||
10 | This program is distributed in the hope that it will be useful, | ||||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
13 | GNU General Public License for more details. | ||||
14 | | ||||
15 | You should have received a copy of the GNU General Public License | ||||
16 | along with this program; if not, write to the Free Software | ||||
17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
18 | */ | ||||
19 | | ||||
20 | #ifndef MPRIS2SERVICE_H | ||||
21 | #define MPRIS2SERVICE_H | ||||
22 | | ||||
23 | #include <gwenviewlib_export.h> | ||||
24 | // Qt | ||||
25 | #include <QObject> | ||||
26 | #include <QString> | ||||
27 | | ||||
28 | class QAction; | ||||
29 | | ||||
30 | namespace Gwenview | ||||
31 | { | ||||
32 | class SlideShow; | ||||
33 | class ContextManager; | ||||
34 | | ||||
35 | class GWENVIEWLIB_EXPORT Mpris2Service : public QObject | ||||
36 | { | ||||
37 | Q_OBJECT | ||||
38 | | ||||
39 | public: | ||||
40 | Mpris2Service(SlideShow* slideShow, ContextManager* contextManager, | ||||
41 | QAction* toggleSlideShowAction, QAction* fullScreenAction, | ||||
42 | QAction* previousAction, QAction* nextAction, QObject* parent); | ||||
43 | ~Mpris2Service() override; | ||||
44 | | ||||
45 | private: | ||||
46 | void registerOnDBus(); | ||||
47 | void unregisterOnDBus(); | ||||
48 | | ||||
49 | void onLockScreenLockedChanged(bool isLocked); | ||||
50 | | ||||
51 | private: | ||||
52 | QString mMpris2ServiceName; | ||||
53 | }; | ||||
54 | | ||||
55 | } | ||||
56 | | ||||
57 | #endif |