Changeset View
Changeset View
Standalone View
Standalone View
src/knotification.cpp
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Line(s) | 46 | struct KNotification::Private { | |||
---|---|---|---|---|---|
47 | QString eventId; | 47 | QString eventId; | ||
48 | int id; | 48 | int id; | ||
49 | int ref; | 49 | int ref; | ||
50 | 50 | | |||
51 | QWidget *widget; | 51 | QWidget *widget; | ||
52 | QString title; | 52 | QString title; | ||
53 | QString text; | 53 | QString text; | ||
54 | QString iconName; | 54 | QString iconName; | ||
55 | QString defaultAction; | ||||
55 | QStringList actions; | 56 | QStringList actions; | ||
56 | QPixmap pixmap; | 57 | QPixmap pixmap; | ||
57 | ContextList contexts; | 58 | ContextList contexts; | ||
58 | NotificationFlags flags; | 59 | NotificationFlags flags; | ||
59 | QString componentName; | 60 | QString componentName; | ||
60 | QList<QUrl> urls; | 61 | QList<QUrl> urls; | ||
61 | 62 | | |||
62 | QTimer updateTimer; | 63 | QTimer updateTimer; | ||
▲ Show 20 Lines • Show All 142 Lines • ▼ Show 20 Line(s) | 202 | { | |||
205 | 206 | | |||
206 | d->needUpdate = true; | 207 | d->needUpdate = true; | ||
207 | d->actions = as; | 208 | d->actions = as; | ||
208 | if (d->id >= 0) { | 209 | if (d->id >= 0) { | ||
209 | d->updateTimer.start(); | 210 | d->updateTimer.start(); | ||
210 | } | 211 | } | ||
211 | } | 212 | } | ||
212 | 213 | | |||
214 | void KNotification::setDefaultAction(const QString &defaultAction) | ||||
215 | { | ||||
216 | if (defaultAction == d->defaultAction) { | ||||
217 | return; | ||||
218 | } | ||||
219 | | ||||
220 | d->needUpdate = true; | ||||
221 | d->defaultAction = defaultAction; | ||||
222 | if (d->id >= 0) { | ||||
223 | d->updateTimer.start(); | ||||
224 | } | ||||
225 | } | ||||
226 | | ||||
227 | QString KNotification::defaultAction() const | ||||
228 | { | ||||
229 | return d->defaultAction; | ||||
230 | } | ||||
231 | | ||||
213 | KNotification::ContextList KNotification::contexts() const | 232 | KNotification::ContextList KNotification::contexts() const | ||
214 | { | 233 | { | ||
215 | return d->contexts; | 234 | return d->contexts; | ||
216 | } | 235 | } | ||
217 | 236 | | |||
218 | void KNotification::setContexts(const KNotification::ContextList &contexts) | 237 | void KNotification::setContexts(const KNotification::ContextList &contexts) | ||
219 | { | 238 | { | ||
220 | d->contexts = contexts; | 239 | d->contexts = contexts; | ||
▲ Show 20 Lines • Show All 278 Lines • Show Last 20 Lines |