Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/notificationapplet.h
Show All 20 Lines | |||||
21 | 21 | | |||
22 | #pragma once | 22 | #pragma once | ||
23 | 23 | | |||
24 | #include <Plasma/Applet> | 24 | #include <Plasma/Applet> | ||
25 | 25 | | |||
26 | class QQuickItem; | 26 | class QQuickItem; | ||
27 | class QString; | 27 | class QString; | ||
28 | class QRect; | 28 | class QRect; | ||
29 | class QWindow; | ||||
29 | 30 | | |||
30 | class NotificationApplet : public Plasma::Applet | 31 | class NotificationApplet : public Plasma::Applet | ||
31 | { | 32 | { | ||
32 | Q_OBJECT | 33 | Q_OBJECT | ||
33 | 34 | | |||
34 | Q_PROPERTY(bool dragActive READ dragActive NOTIFY dragActiveChanged) | 35 | Q_PROPERTY(bool dragActive READ dragActive NOTIFY dragActiveChanged) | ||
35 | Q_PROPERTY(int dragPixmapSize READ dragPixmapSize WRITE setDragPixmapSize NOTIFY dragPixmapSizeChanged) | 36 | Q_PROPERTY(int dragPixmapSize READ dragPixmapSize WRITE setDragPixmapSize NOTIFY dragPixmapSizeChanged) | ||
36 | 37 | | |||
Show All 17 Lines | 40 | public: | |||
54 | 55 | | |||
55 | QWindow *focussedPlasmaDialog() const; | 56 | QWindow *focussedPlasmaDialog() const; | ||
56 | 57 | | |||
57 | Q_INVOKABLE void setSelectionClipboardText(const QString &text); | 58 | Q_INVOKABLE void setSelectionClipboardText(const QString &text); | ||
58 | 59 | | |||
59 | Q_INVOKABLE bool isPrimaryScreen(const QRect &rect) const; | 60 | Q_INVOKABLE bool isPrimaryScreen(const QRect &rect) const; | ||
60 | 61 | | |||
61 | Q_INVOKABLE QString iconNameForUrl(const QUrl &url) const; | 62 | Q_INVOKABLE QString iconNameForUrl(const QUrl &url) const; | ||
63 | Q_INVOKABLE void forceActivateWindow(QWindow *window); | ||||
62 | 64 | | |||
63 | signals: | 65 | signals: | ||
64 | void dragActiveChanged(); | 66 | void dragActiveChanged(); | ||
65 | void dragPixmapSizeChanged(); | 67 | void dragPixmapSizeChanged(); | ||
66 | void focussedPlasmaDialogChanged(); | 68 | void focussedPlasmaDialogChanged(); | ||
67 | 69 | | |||
68 | private slots: | 70 | private slots: | ||
69 | void doDrag(QQuickItem *item, const QUrl &url, const QPixmap &pixmap); | 71 | void doDrag(QQuickItem *item, const QUrl &url, const QPixmap &pixmap); | ||
70 | 72 | | |||
71 | private: | 73 | private: | ||
72 | bool m_dragActive = false; | 74 | bool m_dragActive = false; | ||
73 | int m_dragPixmapSize = 48; // Bound to units.iconSizes.large in main.qml | 75 | int m_dragPixmapSize = 48; // Bound to units.iconSizes.large in main.qml | ||
74 | 76 | | |||
75 | }; | 77 | }; |