Changeset View
Changeset View
Standalone View
Standalone View
libnotificationmanager/notification_p.h
Show All 22 Lines | |||||
23 | #include <QDBusArgument> | 23 | #include <QDBusArgument> | ||
24 | #include <QDateTime> | 24 | #include <QDateTime> | ||
25 | #include <QScopedPointer> | 25 | #include <QScopedPointer> | ||
26 | #include <QImage> | 26 | #include <QImage> | ||
27 | #include <QList> | 27 | #include <QList> | ||
28 | #include <QString> | 28 | #include <QString> | ||
29 | #include <QUrl> | 29 | #include <QUrl> | ||
30 | 30 | | |||
31 | #include <KService> | ||||
32 | | ||||
31 | #include "notifications.h" | 33 | #include "notifications.h" | ||
32 | 34 | | |||
33 | namespace NotificationManager | 35 | namespace NotificationManager | ||
34 | { | 36 | { | ||
35 | 37 | | |||
36 | class Q_DECL_HIDDEN Notification::Private | 38 | class Q_DECL_HIDDEN Notification::Private | ||
37 | { | 39 | { | ||
38 | public: | 40 | public: | ||
39 | Private(); | 41 | Private(); | ||
40 | ~Private(); | 42 | ~Private(); | ||
41 | 43 | | |||
42 | static QString sanitize(const QString &text); | 44 | static QString sanitize(const QString &text); | ||
43 | static QImage decodeNotificationSpecImageHint(const QDBusArgument &arg); | 45 | static QImage decodeNotificationSpecImageHint(const QDBusArgument &arg); | ||
44 | static void sanitizeImage(QImage &image); | 46 | static void sanitizeImage(QImage &image); | ||
45 | 47 | | |||
46 | void loadImagePath(const QString &path); | 48 | void loadImagePath(const QString &path); | ||
47 | 49 | | |||
48 | static QString defaultComponentName(); | 50 | static QString defaultComponentName(); | ||
49 | static QSize maximumImageSize(); | 51 | static QSize maximumImageSize(); | ||
50 | 52 | | |||
53 | static KService::Ptr serviceForDesktopEntry(const QString &desktopEntry); | ||||
zzag: A bit off topic: is there any point for making this method static? You could get away with… | |||||
54 | | ||||
51 | void processHints(const QVariantMap &hints); | 55 | void processHints(const QVariantMap &hints); | ||
52 | 56 | | |||
53 | void setUrgency(Notifications::Urgency urgency); | 57 | void setUrgency(Notifications::Urgency urgency); | ||
54 | 58 | | |||
55 | uint id = 0; | 59 | uint id = 0; | ||
56 | QDateTime created; | 60 | QDateTime created; | ||
57 | QDateTime updated; | 61 | QDateTime updated; | ||
58 | 62 | | |||
Show All 35 Lines |
A bit off topic: is there any point for making this method static? You could get away with making serviceForDesktopEntry function static in the cpp file.