Changeset View
Changeset View
Standalone View
Standalone View
kded/osdmanager.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright 2016 Sebastian Kügler <sebas@kde.org> | ||||
3 | * | ||||
4 | * This program is free software; you can redistribute it and/or modify | ||||
5 | * it under the terms of the GNU General Public License as published by | ||||
6 | * the Free Software Foundation; either version 2 of the License, or | ||||
7 | * (at your option) any later version. | ||||
8 | * | ||||
9 | * This program is distributed in the hope that it will be useful, | ||||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||||
12 | * GNU General Public License for more details. | ||||
13 | * | ||||
14 | * You should have received a copy of the GNU General Public License | ||||
15 | * along with this program; if not, write to the Free Software | ||||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||||
17 | */ | ||||
18 | | ||||
19 | #ifndef OSDM_H | ||||
20 | #define OSDM_H | ||||
21 | | ||||
22 | #include <QObject> | ||||
23 | #include <QString> | ||||
24 | #include <QMap> | ||||
25 | #include <QTimer> | ||||
26 | | ||||
27 | class QmlObject; | ||||
28 | | ||||
29 | namespace KScreen { | ||||
30 | | ||||
31 | class ConfigOperation; | ||||
32 | class Osd; | ||||
33 | class Output; | ||||
34 | | ||||
35 | class OsdManager : public QObject { | ||||
36 | Q_OBJECT | ||||
37 | Q_CLASSINFO("D-Bus Interface", "org.kde.kscreen.osdService") | ||||
38 | | ||||
39 | public: | ||||
40 | ~OsdManager() override; | ||||
41 | static OsdManager* self(); | ||||
42 | | ||||
43 | public Q_SLOTS: | ||||
44 | void showOutputIdentifiers(); | ||||
45 | void showOsd(const QString &icon, const QString &text); | ||||
46 | | ||||
47 | private: | ||||
48 | OsdManager(QObject *parent = nullptr); | ||||
49 | void slotIdentifyOutputs(KScreen::ConfigOperation *op); | ||||
50 | QMap<QString, KScreen::Osd*> m_osds; | ||||
51 | | ||||
52 | static OsdManager* s_instance; | ||||
53 | QTimer* m_cleanupTimer; | ||||
54 | }; | ||||
55 | | ||||
56 | } // ns | ||||
57 | #endif // OSDM_H |