~phablet-team/sync-monitor/trunk

« back to all changes in this revision

Viewing changes to src/notify-message.h

  • Committer: Renato Araujo Oliveira Filho
  • Date: 2014-04-09 19:49:30 UTC
  • mto: This revision was merged to the branch mainline in revision 30.
  • Revision ID: renato.filho@canonical.com-20140409194930-oy2z258gijrlkfvv
*Make sure that the first online account created is set as default account
*After removing a online account ask the user if he wants to keep the contacts or remove it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 */
18
18
 
19
19
#include <QtCore/QString>
20
 
 
21
 
class NotifyMessage
 
20
#include <QtCore/QObject>
 
21
 
 
22
#include <libnotify/notify.h>
 
23
 
 
24
class NotifyMessage : public QObject
22
25
{
 
26
    Q_OBJECT
23
27
public:
24
 
    void destroy();
 
28
    NotifyMessage(bool singleMessage, QObject *parent = 0);
 
29
    ~NotifyMessage();
 
30
 
25
31
    void show(const QString &title, const QString &msg, const QString &iconName);
26
 
 
27
 
    static NotifyMessage *instance();
 
32
    void askYesOrNo(const QString &title, const QString &msg, const QString &iconName);
 
33
 
 
34
Q_SIGNALS:
 
35
    void questionAccepted();
 
36
    void questionRejected();
 
37
    void messageClosed();
 
38
 
28
39
private:
29
 
    static NotifyMessage *m_instance;
30
 
 
31
 
    NotifyMessage();
32
 
    ~NotifyMessage();
 
40
    NotifyNotification *m_notification;
 
41
    bool m_singleMessage;
 
42
 
 
43
    static int m_instanceCount;
 
44
 
 
45
    static void onQuestionAccepted(NotifyNotification *notification,
 
46
                                   char *action,
 
47
                                   NotifyMessage *self);
 
48
    static void onQuestionRejected(NotifyNotification *notification,
 
49
                                   char *action,
 
50
                                   NotifyMessage *self);
 
51
    static void onNotificationClosed(NotifyNotification *notification,
 
52
                                     NotifyMessage *self);
33
53
};