Debian Codegraph @

online-accounts-service/src/notification.h

raw symbols SCIP
1 /*
2 * Copyright (C) 2014 Canonical Ltd.
3 *
4 * Contact: Alberto Mardegan <[email protected]>
5 *
6 * This file is part of lomiri-online-accounts-service
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License version 3, as published
10 * by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranties of
14 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #ifndef OAU_NOTIFICATION_H
22 #define OAU_NOTIFICATION_H
23
24 #include <QObject>
25
26 namespace OnlineAccountsUi {
27
28 class NotificationPrivate;
29 class Notification: public QObject
30 {
31 Q_OBJECT
32
33 public:
34 explicit Notification(const QString &summary,
35 const QString &body,
36 QObject *parent = 0);
37 ~Notification();
38
39 void addAction(const QString &action, const QString &label);
40 void setSnapDecision(bool snapDecision);
41
42 public Q_SLOTS:
43 void show();
44
45 Q_SIGNALS:
46 void actionInvoked(const QString &action);
47 void closed();
48
49 private:
50 NotificationPrivate *d_ptr;
51 Q_DECLARE_PRIVATE(Notification)
52 };
53
54 } // namespace
55
56 #endif // OAU_NOTIFICATION_H