Changeset View
Changeset View
Standalone View
Standalone View
kcms/launch/launchfeedback.h
- This file was added.
1 | /* | ||||
---|---|---|---|---|---|
2 | * Copyright (C) 2001 Rik Hemsley (rikkus) <rik@kde.org> | ||||
3 | * Copyright (C) 2017 Eike Hein <hein@kde.org> | ||||
4 | * | ||||
5 | * This program is free software; you can redistribute it and/or modify | ||||
6 | * it under the terms of the GNU General Public License as published by | ||||
7 | * the Free Software Foundation; either version 2 of the License, or | ||||
8 | * (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 | */ | ||||
18 | | ||||
19 | #ifndef LAUNCHFEEDBACK_H | ||||
20 | #define LAUNCHFEEDBACK_H | ||||
21 | | ||||
22 | #include <KQuickAddons/ConfigModule> | ||||
23 | | ||||
24 | class LaunchFeedback : public KQuickAddons::ConfigModule | ||||
25 | { | ||||
26 | Q_OBJECT | ||||
27 | | ||||
28 | Q_PROPERTY(int busyCursorCurrentIndex READ busyCursorCurrentIndex WRITE setBusyCursorCurrentIndex NOTIFY busyCursorCurrentIndexChanged) | ||||
29 | | ||||
30 | Q_PROPERTY(bool taskManagerNotification READ taskManagerNotification WRITE setTaskManagerNotification NOTIFY taskManagerNotificationChanged) | ||||
31 | | ||||
32 | Q_PROPERTY(int notificationTimeout READ notificationTimeout WRITE setNotificationTimeout NOTIFY notificationTimeoutChanged) | ||||
33 | | ||||
34 | public: | ||||
35 | explicit LaunchFeedback(QObject* parent = 0, const QVariantList &list = QVariantList()); | ||||
36 | virtual ~LaunchFeedback(); | ||||
37 | | ||||
38 | int busyCursorCurrentIndex() const; | ||||
39 | void setBusyCursorCurrentIndex(int index); | ||||
40 | | ||||
41 | bool taskManagerNotification() const; | ||||
42 | void setTaskManagerNotification(bool enabled); | ||||
43 | | ||||
44 | int notificationTimeout() const; | ||||
45 | void setNotificationTimeout(int duration); | ||||
46 | | ||||
47 | public Q_SLOTS: | ||||
48 | void load(); | ||||
49 | void save(); | ||||
50 | void defaults(); | ||||
51 | | ||||
52 | Q_SIGNALS: | ||||
53 | void busyCursorCurrentIndexChanged() const; | ||||
54 | | ||||
55 | void taskManagerNotificationChanged() const; | ||||
56 | | ||||
57 | void notificationTimeoutChanged() const; | ||||
58 | | ||||
59 | private: | ||||
60 | void updateNeedsSave(); | ||||
61 | | ||||
62 | int m_busyCursorCurrentIndex; | ||||
63 | | ||||
64 | bool m_taskManagerNotification; | ||||
65 | | ||||
66 | int m_notificationTimeout; | ||||
67 | }; | ||||
68 | | ||||
69 | #endif |