Changeset View
Changeset View
Standalone View
Standalone View
src/knotification.cpp
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Line(s) | 46 | struct Q_DECL_HIDDEN KNotification::Private { | |||
---|---|---|---|---|---|
54 | QString iconName; | 54 | QString iconName; | ||
55 | QString defaultAction; | 55 | QString defaultAction; | ||
56 | QStringList actions; | 56 | QStringList actions; | ||
57 | QPixmap pixmap; | 57 | QPixmap pixmap; | ||
58 | ContextList contexts; | 58 | ContextList contexts; | ||
59 | NotificationFlags flags; | 59 | NotificationFlags flags; | ||
60 | QString componentName; | 60 | QString componentName; | ||
61 | QList<QUrl> urls; | 61 | QList<QUrl> urls; | ||
62 | KNotification::Urgency urgency; | ||||
62 | QVariantMap hints; | 63 | QVariantMap hints; | ||
63 | 64 | | |||
64 | QTimer updateTimer; | 65 | QTimer updateTimer; | ||
65 | bool needUpdate; | 66 | bool needUpdate; | ||
66 | 67 | | |||
67 | Private() : id(-1), ref(0), widget(nullptr), needUpdate(false) {} | 68 | Private() : id(-1), ref(0), widget(nullptr), urgency(KNotification::DefaultUrgency), needUpdate(false) {} | ||
68 | /** | 69 | /** | ||
69 | * recursive function that raise the widget. @p w | 70 | * recursive function that raise the widget. @p w | ||
70 | * | 71 | * | ||
71 | * @see raiseWidget() | 72 | * @see raiseWidget() | ||
72 | */ | 73 | */ | ||
73 | static void raiseWidget(QWidget *w); | 74 | static void raiseWidget(QWidget *w); | ||
74 | }; | 75 | }; | ||
75 | 76 | | |||
▲ Show 20 Lines • Show All 194 Lines • ▼ Show 20 Line(s) | 270 | { | |||
270 | return d->urls; | 271 | return d->urls; | ||
271 | } | 272 | } | ||
272 | 273 | | |||
273 | void KNotification::setUrls(const QList<QUrl> &urls) | 274 | void KNotification::setUrls(const QList<QUrl> &urls) | ||
274 | { | 275 | { | ||
275 | d->urls = urls; | 276 | d->urls = urls; | ||
276 | } | 277 | } | ||
277 | 278 | | |||
279 | KNotification::Urgency KNotification::urgency() const | ||||
280 | { | ||||
281 | return d->urgency; | ||||
282 | } | ||||
283 | | ||||
284 | void KNotification::setUrgency(Urgency urgency) | ||||
285 | { | ||||
286 | d->urgency = urgency; | ||||
287 | } | ||||
288 | | ||||
278 | void KNotification::activate(unsigned int action) | 289 | void KNotification::activate(unsigned int action) | ||
279 | { | 290 | { | ||
280 | switch (action) { | 291 | switch (action) { | ||
281 | case 0: | 292 | case 0: | ||
282 | emit activated(); | 293 | emit activated(); | ||
283 | break; | 294 | break; | ||
284 | case 1: | 295 | case 1: | ||
285 | emit action1Activated(); | 296 | emit action1Activated(); | ||
▲ Show 20 Lines • Show All 259 Lines • Show Last 20 Lines |