2
* Copyright 2015 Canonical Ltd.
4
* This file is part of address-book-service.
6
* sync-monitor is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 3.
10
* contact-service-app is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20
#include <QtCore/QString>
21
#include <QtCore/QObject>
23
#include <libnotify/notify.h>
25
class ABNotifyMessage : public QObject
29
ABNotifyMessage(bool singleMessage, QObject *parent = 0);
32
void show(const QString &title, const QString &msg, const QString &iconName);
33
void askYesOrNo(const QString &title, const QString &msg, const QString &iconName);
34
int closedReason() const;
37
void questionAccepted();
38
void questionRejected();
42
NotifyNotification *m_notification;
44
static int m_instanceCount;
46
static void onQuestionAccepted(NotifyNotification *notification,
48
ABNotifyMessage *self);
49
static void onQuestionRejected(NotifyNotification *notification,
51
ABNotifyMessage *self);
52
static void onNotificationClosed(NotifyNotification *notification,
53
ABNotifyMessage *self);