~ubuntu-branches/ubuntu/raring/konversation/raring-proposed

« back to all changes in this revision

Viewing changes to .pc/debian-changes-1.3.1-1ubuntu2/src/notificationhandler.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-08-11 17:53:27 UTC
  • Revision ID: james.westby@ubuntu.com-20100811175327-vj8gal6554f0cdck
Tags: 1.3.1-1ubuntu2
* Add back correct debian/patches/series file, adds back in
  kubuntu_01_default_channels.diff message-indicator/0001-Adds-
  support-for-Message-Indicator.diff LP: #616422
* Remove obsolete debian/patches/kubuntu/ directory

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  This program is free software; you can redistribute it and/or modify
 
3
  it under the terms of the GNU General Public License as published by
 
4
  the Free Software Foundation; either version 2 of the License, or
 
5
  (at your option) any later version.
 
6
*/
 
7
 
 
8
/*
 
9
  copyright: (C) 2004 by Peter Simonsson
 
10
  email:     psn@linux.se
 
11
*/
 
12
 
 
13
#include "notificationhandler.h"
 
14
#include "common.h"
 
15
#include "chatwindow.h"
 
16
#include "application.h"
 
17
#include "mainwindow.h"
 
18
#include "viewcontainer.h"
 
19
#include "trayicon.h"
 
20
#include "server.h"
 
21
#include "config-konversation.h"
 
22
 
 
23
#include <QTextDocument>
 
24
 
 
25
#include <KNotification>
 
26
#include <KWindowSystem>
 
27
 
 
28
#ifdef HAVE_INDICATEQT
 
29
#include <qindicateindicator.h>
 
30
#include <qindicateserver.h>
 
31
 
 
32
class Indicator : public QIndicate::Indicator
 
33
{
 
34
    public:
 
35
        Indicator(QIndicate::Server* server)
 
36
        : QIndicate::Indicator(server)
 
37
        {}
 
38
 
 
39
        QPointer<ChatWindow> m_chatWin;
 
40
};
 
41
#endif
 
42
 
 
43
namespace Konversation
 
44
{
 
45
 
 
46
    NotificationHandler::NotificationHandler(Application* parent)
 
47
        : QObject(parent)
 
48
    {
 
49
        m_mainWindow = parent->getMainWindow();
 
50
        #ifdef HAVE_INDICATEQT
 
51
        m_indicateServer = QIndicate::Server::defaultInstance();
 
52
        m_indicateServer->setType("message.irc");
 
53
        QString appName = KGlobal::mainComponent().componentName();
 
54
        KService::Ptr service = KService::serviceByDesktopName(appName);
 
55
        if (service) {
 
56
            m_indicateServer->setDesktopFile(service->entryPath());
 
57
        } else {
 
58
            kWarning() << "Could not find desktop file for application";
 
59
        }
 
60
        connect(m_indicateServer, SIGNAL(serverDisplay()),
 
61
            SLOT(slotIndicateServerDisplay()));
 
62
        updateIndicateServer();
 
63
        m_mainWindow->installEventFilter(this);
 
64
        connect(Preferences::self(), SIGNAL(configChanged()),
 
65
            SLOT(updateIndicateServer()));
 
66
        #endif
 
67
    }
 
68
 
 
69
    NotificationHandler::~NotificationHandler()
 
70
    {
 
71
    }
 
72
 
 
73
    void NotificationHandler::message(ChatWindow* chatWin, const QString& fromNick, const QString& message)
 
74
    {
 
75
        if (!chatWin || !chatWin->notificationsEnabled())
 
76
            return;
 
77
 
 
78
        if (Preferences::self()->messageIndicatorShowChannel())
 
79
            addIndicator(chatWin, fromNick);
 
80
 
 
81
        if (Preferences::self()->disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway())
 
82
            return;
 
83
 
 
84
        QString cleanedMessage = removeIrcMarkup(message);
 
85
        QString forKNotify = Qt::escape(cleanedMessage);
 
86
 
 
87
        KNotification::event(QString::fromLatin1("message"), QString("<html>&lt;%1&gt; %2</html>").arg(fromNick).arg(forKNotify), QPixmap(), m_mainWindow);
 
88
 
 
89
        if(!Preferences::self()->trayNotifyOnlyOwnNick())
 
90
        {
 
91
            startTrayNotification(chatWin);
 
92
        }
 
93
 
 
94
 
 
95
        if(Preferences::self()->oSDShowChannel() &&
 
96
            (!m_mainWindow->isActiveWindow() || (chatWin != m_mainWindow->getViewContainer()->getFrontView())))
 
97
        {
 
98
            Application* konvApp = static_cast<Application*>(kapp);
 
99
            konvApp->osd->show('(' + chatWin->getName() + ") <" + fromNick + "> " + cleanedMessage);
 
100
        }
 
101
 
 
102
    }
 
103
 
 
104
    void NotificationHandler::nick(ChatWindow* chatWin, const QString& fromNick, const QString& message)
 
105
    {
 
106
        if (!chatWin || !chatWin->notificationsEnabled())
 
107
            return;
 
108
 
 
109
        if (Preferences::self()->messageIndicatorShowOwnNick())
 
110
            addIndicator(chatWin, fromNick);
 
111
 
 
112
        if (Preferences::self()->disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway())
 
113
            return;
 
114
 
 
115
        QString cleanedMessage = removeIrcMarkup(message);
 
116
        QString forKNotify = Qt::escape(cleanedMessage);
 
117
 
 
118
        KNotification::event(QString::fromLatin1("nick"), QString("<html>&lt;%1&gt; %2</html>").arg(fromNick).arg(forKNotify), QPixmap(), m_mainWindow);
 
119
 
 
120
        startTrayNotification(chatWin);
 
121
 
 
122
        Application* konvApp = static_cast<Application*>(kapp);
 
123
 
 
124
        if((Preferences::self()->oSDShowChannel() || Preferences::self()->oSDShowOwnNick()) &&
 
125
            (!m_mainWindow->isActiveWindow() ||
 
126
            (chatWin != m_mainWindow->getViewContainer()->getFrontView())))
 
127
        {
 
128
            konvApp->osd->show(i18n("[HighLight] (%1) &lt;%2&gt; %3",chatWin->getName(),fromNick,cleanedMessage));
 
129
        }
 
130
    }
 
131
 
 
132
    void NotificationHandler::queryMessage(ChatWindow* chatWin,
 
133
                                           const QString& fromNick, const QString& message)
 
134
    {
 
135
        if (!chatWin || !chatWin->notificationsEnabled())
 
136
            return;
 
137
 
 
138
        if (Preferences::self()->messageIndicatorShowQuery())
 
139
            addIndicator(chatWin, fromNick);
 
140
 
 
141
        if (Preferences::self()->disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway())
 
142
            return;
 
143
 
 
144
        QString cleanedMessage = removeIrcMarkup(message);
 
145
        QString forKNotify = Qt::escape(cleanedMessage);
 
146
 
 
147
        KNotification::event(QString::fromLatin1("queryMessage"), QString("<html>&lt;%1&gt; %2</html>").arg(fromNick).arg(forKNotify), QPixmap(), m_mainWindow);
 
148
 
 
149
        startTrayNotification(chatWin);
 
150
 
 
151
        Application* konvApp = static_cast<Application*>(kapp);
 
152
 
 
153
        if(Preferences::self()->oSDShowQuery() && (!m_mainWindow->isActiveWindow() ||
 
154
           (chatWin != m_mainWindow->getViewContainer()->getFrontView())))
 
155
        {
 
156
            konvApp->osd->show(i18n("[Query] &lt;%1&gt; %2",fromNick,cleanedMessage));
 
157
        }
 
158
    }
 
159
 
 
160
    void NotificationHandler::startTrayNotification(ChatWindow* chatWin)
 
161
    {
 
162
        if (!chatWin || !chatWin->notificationsEnabled())
 
163
            return;
 
164
 
 
165
        if (!chatWin->getServer() || (Preferences::self()->disableNotifyWhileAway() && chatWin->getServer()->isAway()))
 
166
            return;
 
167
 
 
168
        if (!m_mainWindow->isActiveWindow() && chatWin->getServer()->isConnected() && m_mainWindow->systemTrayIcon())
 
169
            m_mainWindow->systemTrayIcon()->startNotification();
 
170
 
 
171
    }
 
172
 
 
173
    void NotificationHandler::join(ChatWindow* chatWin, const QString& nick)
 
174
    {
 
175
        if (!chatWin || !chatWin->notificationsEnabled())
 
176
            return;
 
177
 
 
178
        if (Preferences::self()->disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway())
 
179
            return;
 
180
 
 
181
        KNotification::event(QString::fromLatin1("join"), i18n("%1 joined %2",nick, chatWin->getName()), QPixmap(), m_mainWindow);
 
182
 
 
183
        // OnScreen Message
 
184
        if(Preferences::self()->oSDShowChannelEvent() &&
 
185
            (!m_mainWindow->isActiveWindow() || (chatWin != m_mainWindow->getViewContainer()->getFrontView())))
 
186
        {
 
187
            Application* konvApp = static_cast<Application*>(kapp);
 
188
            konvApp->osd->show(i18n("%1 joined %2",nick, chatWin->getName()));
 
189
        }
 
190
    }
 
191
 
 
192
    void NotificationHandler::part(ChatWindow* chatWin, const QString& nick)
 
193
    {
 
194
        if (!chatWin || !chatWin->notificationsEnabled())
 
195
            return;
 
196
 
 
197
        if (Preferences::self()->disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway())
 
198
            return;
 
199
 
 
200
        KNotification::event(QString::fromLatin1("part"), i18n("%1 parted %2",nick, chatWin->getName()), QPixmap(), m_mainWindow);
 
201
 
 
202
        // OnScreen Message
 
203
        if(Preferences::self()->oSDShowChannelEvent() &&
 
204
            (!m_mainWindow->isActiveWindow() || (chatWin != m_mainWindow->getViewContainer()->getFrontView())))
 
205
        {
 
206
            Application* konvApp = static_cast<Application*>(kapp);
 
207
            konvApp->osd->show(i18n("%1 parted %2",nick, chatWin->getName()));
 
208
        }
 
209
    }
 
210
 
 
211
    void NotificationHandler::quit(ChatWindow* chatWin, const QString& nick)
 
212
    {
 
213
        if (!chatWin || !chatWin->notificationsEnabled())
 
214
            return;
 
215
 
 
216
        if (Preferences::self()->disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway())
 
217
            return;
 
218
 
 
219
        KNotification::event(QString::fromLatin1("part"), i18n("%1 quit %2",nick, chatWin->getServer()->getServerName()), QPixmap(), m_mainWindow);
 
220
    }
 
221
 
 
222
    void NotificationHandler::nickChange(ChatWindow* chatWin, const QString& oldNick, const QString& newNick)
 
223
    {
 
224
        if (!chatWin || !chatWin->notificationsEnabled())
 
225
            return;
 
226
 
 
227
        if (Preferences::self()->disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway())
 
228
            return;
 
229
 
 
230
        KNotification::event(QString::fromLatin1("nickchange"), i18n("%1 changed nickname to %2",oldNick, newNick), QPixmap(), m_mainWindow);
 
231
    }
 
232
 
 
233
    void NotificationHandler::dccIncoming(ChatWindow* chatWin, const QString& fromNick)
 
234
    {
 
235
        if (!chatWin || !chatWin->notificationsEnabled())
 
236
            return;
 
237
 
 
238
        if (Preferences::self()->disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway())
 
239
            return;
 
240
 
 
241
        KNotification::event(QString::fromLatin1("dcc_incoming"), i18n("%1 wants to send a file to you",fromNick), QPixmap(), m_mainWindow);
 
242
    }
 
243
 
 
244
    void NotificationHandler::dccError(ChatWindow* chatWin, const QString& error)
 
245
    {
 
246
        if (!chatWin || !chatWin->notificationsEnabled())
 
247
            return;
 
248
 
 
249
        if (Preferences::self()->disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway())
 
250
            return;
 
251
 
 
252
        KNotification::event(QString::fromLatin1("dcc_error"), i18n("An Error has occurred in a DCC transfer: %1",error), QPixmap(), m_mainWindow);
 
253
    }
 
254
 
 
255
    void NotificationHandler::dccTransferDone(ChatWindow* chatWin, const QString& file)
 
256
    {
 
257
        if (!chatWin || !chatWin->notificationsEnabled())
 
258
            return;
 
259
 
 
260
        if (Preferences::self()->disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway())
 
261
            return;
 
262
 
 
263
        KNotification::event(QString::fromLatin1("dcctransfer_done"), i18nc("%1 - filename","%1 File Transfer is complete",file), QPixmap(), m_mainWindow);
 
264
    }
 
265
 
 
266
    void NotificationHandler::mode(ChatWindow* chatWin, const QString& /*nick*/)
 
267
    {
 
268
        if (!chatWin || !chatWin->notificationsEnabled())
 
269
            return;
 
270
 
 
271
        if (Preferences::self()->disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway())
 
272
            return;
 
273
 
 
274
        KNotification *ev=new KNotification("mode", m_mainWindow);
 
275
        ev->sendEvent();
 
276
    }
 
277
 
 
278
    void NotificationHandler::query(ChatWindow* chatWin, const QString& fromNick)
 
279
    {
 
280
        if (!chatWin || !chatWin->notificationsEnabled())
 
281
            return;
 
282
 
 
283
        if (Preferences::self()->disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway())
 
284
            return;
 
285
 
 
286
        startTrayNotification(chatWin);
 
287
 
 
288
        KNotification *ev=new KNotification("query", m_mainWindow);
 
289
        ev->setText(i18n("%1 has started a conversation (query) with you.",fromNick));
 
290
        ev->sendEvent();
 
291
    }
 
292
 
 
293
    void NotificationHandler::nickOnline(ChatWindow* chatWin, const QString& nick)
 
294
    {
 
295
        if (!chatWin || !chatWin->notificationsEnabled())
 
296
            return;
 
297
 
 
298
        if (Preferences::self()->disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway())
 
299
            return;
 
300
 
 
301
        KNotification *ev=new KNotification("notify", m_mainWindow);
 
302
        ev->setText(i18n("%1 is online (%2).", nick, chatWin->getServer()->getServerName()));
 
303
        ev->sendEvent();
 
304
 
 
305
    }
 
306
 
 
307
    void NotificationHandler::nickOffline(ChatWindow* chatWin, const QString& nick)
 
308
    {
 
309
        if (!chatWin || !chatWin->notificationsEnabled())
 
310
            return;
 
311
 
 
312
        if (Preferences::self()->disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway())
 
313
            return;
 
314
 
 
315
        KNotification *ev=new KNotification("notify", m_mainWindow);
 
316
        ev->setText(i18n("%1 went offline (%2).", nick, chatWin->getServer()->getServerName()));
 
317
        ev->sendEvent();
 
318
 
 
319
    }
 
320
 
 
321
    void NotificationHandler::kick(ChatWindow* chatWin, const QString& channel,const QString& nick)
 
322
    {
 
323
        if (!chatWin || !chatWin->notificationsEnabled())
 
324
            return;
 
325
 
 
326
        if (Preferences::self()->disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway())
 
327
            return;
 
328
 
 
329
        KNotification *ev=new KNotification("kick", m_mainWindow);
 
330
        ev->setText(i18n("You are kicked by %1 from %2", nick, channel));
 
331
        ev->sendEvent();
 
332
 
 
333
    }
 
334
 
 
335
    void NotificationHandler::dccChat(ChatWindow* chatWin, const QString& nick)
 
336
    {
 
337
        if (!chatWin || !chatWin->notificationsEnabled())
 
338
            return;
 
339
 
 
340
        if (Preferences::self()->disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway())
 
341
            return;
 
342
 
 
343
        KNotification *ev=new KNotification("dccChat", m_mainWindow);
 
344
        ev->setText(i18n("%1 started a dcc chat with you", nick));
 
345
        ev->sendEvent();
 
346
 
 
347
    }
 
348
 
 
349
    void NotificationHandler::highlight(ChatWindow* chatWin, const QString& fromNick, const QString& message)
 
350
    {
 
351
        if (!chatWin || !chatWin->notificationsEnabled())
 
352
            return;
 
353
 
 
354
        if (Preferences::self()->disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway())
 
355
            return;
 
356
 
 
357
        startTrayNotification(chatWin);
 
358
 
 
359
        QString cleanedMessage = removeIrcMarkup(message);
 
360
        QString forKNotify = Qt::escape(cleanedMessage);
 
361
 
 
362
        if(fromNick.isEmpty())
 
363
            KNotification::event(QString::fromLatin1("highlight"), QString("<html>(%1) *** %2</html>").arg(chatWin->getName()).arg(forKNotify), QPixmap(), m_mainWindow);
 
364
        else
 
365
            KNotification::event(QString::fromLatin1("highlight"), QString("<html>(%1) &lt;%2&gt; %3</html>").arg(chatWin->getName()).arg(fromNick).arg(forKNotify), QPixmap(), m_mainWindow);
 
366
 
 
367
        if(Preferences::self()->oSDShowOwnNick() &&
 
368
            (!m_mainWindow->isActiveWindow() || (chatWin != m_mainWindow->getViewContainer()->getFrontView())))
 
369
        {
 
370
            Application* konvApp = static_cast<Application*>(kapp);
 
371
            // if there was no nick associated, this must be a command message, so don't try displaying
 
372
            // an empty nick in <>
 
373
            if(fromNick.isEmpty())
 
374
                konvApp->osd->show(i18n("[HighLight] (%1) *** %2",chatWin->getName(),cleanedMessage));
 
375
            // normal highlight message
 
376
            else
 
377
                konvApp->osd->show(i18n("[HighLight] (%1) &lt;%2&gt; %3",chatWin->getName(),fromNick,cleanedMessage));
 
378
        }
 
379
    }
 
380
 
 
381
    void NotificationHandler::connectionFailure(ChatWindow* chatWin, const QString& server)
 
382
    {
 
383
        if (!chatWin || !chatWin->notificationsEnabled())
 
384
            return;
 
385
 
 
386
        KNotification *ev=new KNotification("connectionFailure", m_mainWindow);
 
387
        ev->setText(i18n("Failed to connect to %1", server));
 
388
        ev->sendEvent();
 
389
 
 
390
    }
 
391
 
 
392
    void NotificationHandler::channelJoin(ChatWindow* chatWin, const QString& channel)
 
393
    {
 
394
        if (!chatWin || !chatWin->notificationsEnabled())
 
395
            return;
 
396
 
 
397
        if (Preferences::self()->disableNotifyWhileAway() && chatWin->getServer() && chatWin->getServer()->isAway())
 
398
            return;
 
399
 
 
400
        KNotification::event(QString::fromLatin1("channelJoin"), i18n("You have joined %1.",channel), QPixmap(), m_mainWindow);
 
401
    }
 
402
 
 
403
    void NotificationHandler::addIndicator(ChatWindow* chatWin, const QString& nick)
 
404
    {
 
405
        #ifdef HAVE_INDICATEQT
 
406
        ViewContainer* viewContainer = m_mainWindow->getViewContainer();
 
407
        if (m_mainWindow->isActiveWindow() && chatWin == viewContainer->getFrontView()) {
 
408
            // Do not show indicator if the user is already using this chat
 
409
            // window
 
410
            return;
 
411
        }
 
412
        Indicator* indicator = m_indicatorForChatWindow.value(chatWin);
 
413
        if (!indicator) {
 
414
            indicator = new Indicator(m_indicateServer);
 
415
            indicator->m_chatWin = chatWin;
 
416
            m_indicatorForChatWindow.insert(chatWin, indicator);
 
417
            connect(chatWin, SIGNAL(closing(ChatWindow*)), SLOT(deleteIndicatorForChatWindow(ChatWindow*)));
 
418
            connect(viewContainer, SIGNAL(viewChanged(ChatWindow*)), SLOT(deleteIndicatorForChatWindow(ChatWindow*)));
 
419
 
 
420
            connect(indicator, SIGNAL(display(QIndicate::Indicator*)), SLOT(slotIndicatorDisplay(QIndicate::Indicator*)));
 
421
            indicator->show();
 
422
        }
 
423
        QString name;
 
424
        if (chatWin->getType() == ChatWindow::Query) {
 
425
            name = nick;
 
426
        } else {
 
427
            name = QString("%1 (%2)").arg(chatWin->getName()).arg(nick);
 
428
        }
 
429
        indicator->setNameProperty(name);
 
430
        indicator->setTimeProperty(QDateTime::currentDateTime());
 
431
        indicator->setDrawAttentionProperty(true);
 
432
        #else
 
433
        Q_UNUSED(chatWin);
 
434
        Q_UNUSED(nick);
 
435
        #endif
 
436
    }
 
437
 
 
438
    void NotificationHandler::slotIndicatorDisplay(QIndicate::Indicator* _indicator)
 
439
    {
 
440
        #ifdef HAVE_INDICATEQT
 
441
        Indicator* indicator = static_cast<Indicator*>(_indicator);
 
442
        ChatWindow* chatWin = indicator->m_chatWin;
 
443
        m_indicatorForChatWindow.remove(chatWin);
 
444
        delete indicator;
 
445
 
 
446
        m_mainWindow->show();
 
447
        KWindowSystem::forceActiveWindow(m_mainWindow->winId());
 
448
        if (chatWin) {
 
449
            m_mainWindow->getViewContainer()->showView(chatWin);
 
450
            chatWin->adjustFocus();
 
451
        }
 
452
        #else
 
453
        Q_UNUSED(_indicator);
 
454
        #endif
 
455
    }
 
456
 
 
457
    void NotificationHandler::slotIndicateServerDisplay()
 
458
    {
 
459
        m_mainWindow->show();
 
460
        KWindowSystem::forceActiveWindow(m_mainWindow->winId());
 
461
    }
 
462
 
 
463
    void NotificationHandler::deleteIndicatorForChatWindow(ChatWindow* chatWin)
 
464
    {
 
465
        #ifdef HAVE_INDICATEQT
 
466
        delete m_indicatorForChatWindow.take(chatWin);
 
467
        #else
 
468
        Q_UNUSED(chatWin);
 
469
        #endif
 
470
    }
 
471
 
 
472
    bool NotificationHandler::eventFilter(QObject*, QEvent* event)
 
473
    {
 
474
        #ifdef HAVE_INDICATEQT
 
475
        if (event->type() == QEvent::WindowActivate) {
 
476
            ViewContainer* viewContainer = m_mainWindow->getViewContainer();
 
477
            QPointer<ChatWindow> chatWin = viewContainer->getFrontView();
 
478
            if (chatWin) {
 
479
                deleteIndicatorForChatWindow(chatWin);
 
480
            }
 
481
        }
 
482
        #else
 
483
        Q_UNUSED(event);
 
484
        #endif
 
485
        return false;
 
486
    }
 
487
 
 
488
    void NotificationHandler::updateIndicateServer()
 
489
    {
 
490
        #ifdef HAVE_INDICATEQT
 
491
        bool needServer = Preferences::self()->messageIndicatorShowOwnNick()
 
492
            || Preferences::self()->messageIndicatorShowChannel()
 
493
            || Preferences::self()->messageIndicatorShowQuery();
 
494
 
 
495
        if (needServer) {
 
496
            m_indicateServer->show();
 
497
        } else {
 
498
            m_indicateServer->hide();
 
499
        }
 
500
        #endif
 
501
    }
 
502
}
 
503
 
 
504
#include "notificationhandler.moc"