Changeset View
Changeset View
Standalone View
Standalone View
applets/notifications/notificationapplet.cpp
Show All 27 Lines | |||||
28 | #include <QQuickItem> | 28 | #include <QQuickItem> | ||
29 | #include <QQuickWindow> | 29 | #include <QQuickWindow> | ||
30 | #include <QScreen> | 30 | #include <QScreen> | ||
31 | #include <QStyleHints> | 31 | #include <QStyleHints> | ||
32 | 32 | | |||
33 | #include <PlasmaQuick/Dialog> | 33 | #include <PlasmaQuick/Dialog> | ||
34 | 34 | | |||
35 | #include "filemenu.h" | 35 | #include "filemenu.h" | ||
36 | #include "globalshortcuts.h" | ||||
36 | #include "thumbnailer.h" | 37 | #include "thumbnailer.h" | ||
37 | 38 | | |||
38 | NotificationApplet::NotificationApplet(QObject *parent, const QVariantList &data) | 39 | NotificationApplet::NotificationApplet(QObject *parent, const QVariantList &data) | ||
39 | : Plasma::Applet(parent, data) | 40 | : Plasma::Applet(parent, data) | ||
40 | { | 41 | { | ||
41 | static bool s_typesRegistered = false; | 42 | static bool s_typesRegistered = false; | ||
42 | if (!s_typesRegistered) { | 43 | if (!s_typesRegistered) { | ||
43 | const char uri[] = "org.kde.plasma.private.notifications"; | 44 | const char uri[] = "org.kde.plasma.private.notifications"; | ||
44 | qmlRegisterType<FileMenu>(uri, 2, 0, "FileMenu"); | 45 | qmlRegisterType<FileMenu>(uri, 2, 0, "FileMenu"); | ||
46 | qmlRegisterType<GlobalShortcuts>(uri, 2, 0, "GlobalShortcuts"); | ||||
45 | qmlRegisterType<Thumbnailer>(uri, 2, 0, "Thumbnailer"); | 47 | qmlRegisterType<Thumbnailer>(uri, 2, 0, "Thumbnailer"); | ||
46 | qmlProtectModule(uri, 2); | 48 | qmlProtectModule(uri, 2); | ||
47 | s_typesRegistered = true; | 49 | s_typesRegistered = true; | ||
48 | } | 50 | } | ||
49 | 51 | | |||
50 | connect(qApp, &QGuiApplication::focusWindowChanged, this, &NotificationApplet::focussedPlasmaDialogChanged); | 52 | connect(qApp, &QGuiApplication::focusWindowChanged, this, &NotificationApplet::focussedPlasmaDialogChanged); | ||
51 | } | 53 | } | ||
52 | 54 | | |||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |