Changeset View
Changeset View
Standalone View
Standalone View
plugins/notifications/notification.h
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | 48 | public: | |||
---|---|---|---|---|---|
57 | QString iconPath() const { return m_iconPath; } | 57 | QString iconPath() const { return m_iconPath; } | ||
58 | bool dismissable() const { return m_dismissable; } | 58 | bool dismissable() const { return m_dismissable; } | ||
59 | QString replyId() const { return m_requestReplyId; } | 59 | QString replyId() const { return m_requestReplyId; } | ||
60 | bool hasIcon() const { return m_hasIcon; } | 60 | bool hasIcon() const { return m_hasIcon; } | ||
61 | void show(); | 61 | void show(); | ||
62 | bool silent() const { return m_silent; } | 62 | bool silent() const { return m_silent; } | ||
63 | void update(const NetworkPacket& np); | 63 | void update(const NetworkPacket& np); | ||
64 | bool isReady() const { return m_ready; } | 64 | bool isReady() const { return m_ready; } | ||
65 | KNotification* createKNotification(bool update, const NetworkPacket& np); | 65 | KNotification* createKNotification(const NetworkPacket& np); | ||
66 | 66 | | |||
67 | public Q_SLOTS: | 67 | public Q_SLOTS: | ||
68 | Q_SCRIPTABLE void dismiss(); | 68 | Q_SCRIPTABLE void dismiss(); | ||
69 | Q_SCRIPTABLE void reply(); | 69 | Q_SCRIPTABLE void reply(); | ||
70 | void closed(); | | |||
71 | 70 | | |||
72 | Q_SIGNALS: | 71 | Q_SIGNALS: | ||
73 | void dismissRequested(const QString& m_internalId); | 72 | void dismissRequested(const QString& m_internalId); | ||
74 | void replyRequested(); | 73 | void replyRequested(); | ||
75 | void ready(); | 74 | Q_SCRIPTABLE void ready(); | ||
albertvaka: Why Q_SCRIPTABLE? | |||||
76 | 75 | | |||
77 | private: | 76 | private: | ||
78 | QString m_internalId; | 77 | QString m_internalId; | ||
79 | QString m_appName; | 78 | QString m_appName; | ||
80 | QString m_ticker; | 79 | QString m_ticker; | ||
81 | QString m_title; | 80 | QString m_title; | ||
82 | QString m_text; | 81 | QString m_text; | ||
83 | QString m_iconPath; | 82 | QString m_iconPath; | ||
84 | QString m_requestReplyId; | 83 | QString m_requestReplyId; | ||
85 | bool m_dismissable; | 84 | bool m_dismissable; | ||
86 | bool m_hasIcon; | 85 | bool m_hasIcon; | ||
87 | KNotification* m_notification; | 86 | QPointer<KNotification> m_notification; | ||
88 | QDir m_imagesDir; | 87 | QDir m_imagesDir; | ||
89 | bool m_silent; | 88 | bool m_silent; | ||
90 | bool m_closed; | | |||
91 | QString m_payloadHash; | 89 | QString m_payloadHash; | ||
92 | bool m_ready; | 90 | bool m_ready; | ||
93 | 91 | | |||
94 | void parseNetworkPacket(const NetworkPacket& np); | 92 | void parseNetworkPacket(const NetworkPacket& np); | ||
95 | void loadIcon(const NetworkPacket& np); | 93 | void loadIcon(const NetworkPacket& np); | ||
96 | void applyIcon(); | 94 | void applyIcon(); | ||
97 | void applyNoIcon(); | 95 | void applyNoIcon(); | ||
98 | 96 | | |||
99 | static QMap<QString, FileTransferJob*> s_downloadsInProgress; | 97 | static QMap<QString, FileTransferJob*> s_downloadsInProgress; | ||
100 | }; | 98 | }; | ||
101 | 99 | | |||
102 | #endif | 100 | #endif |
Why Q_SCRIPTABLE?