~macslow/unity/phablet-bootstrap-notifications

« back to all changes in this revision

Viewing changes to plugins/NotificationsBackend/action.h

  • Committer: Mirco Müller
  • Date: 2013-03-20 14:53:07 UTC
  • Revision ID: mirco.mueller@canonical.com-20130320145307-3a3ub1ydhsg5m1gp
Fixing compile-errors...

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include <QSharedPointer>
24
24
#include <QString>
25
25
 
26
 
//#include "include/notification.h"
 
26
#include "notification.h"
27
27
 
28
28
namespace unity
29
29
{
30
 
namespace notifications
31
 
{
32
 
        class Notification;
33
 
 
34
 
        class Action : public QObject
 
30
        namespace notifications
35
31
        {
36
 
                Q_OBJECT
37
 
 
38
 
                public:
39
 
                        Action(const QSharedPointer<Notification>& parent) 
40
 
                        : parent(parent)
41
 
                        {
42
 
                        }
43
 
 
44
 
                        Action(const Action& rhs) = delete;
45
 
                        Action& operator=(const Action& rhs) = delete;
46
 
 
47
 
                        virtual ~Action() {};
48
 
 
49
 
                        Q_INVOKABLE virtual void invoke() = 0;
50
 
                        Q_INVOKABLE virtual QString label() = 0; 
51
 
    
52
 
                protected:
53
 
                        QSharedPointer<Notification> accessParent() const;
54
 
 
55
 
                private:
56
 
                        QSharedPointer<Notification> parent;
57
 
        };
58
 
 
59
 
}
 
32
                class Notification;
 
33
 
 
34
                class Action : public QObject
 
35
                {
 
36
                        Q_OBJECT
 
37
 
 
38
                        public:
 
39
                                Action(const QSharedPointer<Notification>& parent) 
 
40
                                : parent(parent)
 
41
                                {
 
42
                                }
 
43
 
 
44
                                Action(const Action& rhs) = delete;
 
45
                                Action& operator=(const Action& rhs) = delete;
 
46
 
 
47
                                virtual ~Action() {};
 
48
 
 
49
                                Q_INVOKABLE virtual void invoke() = 0;
 
50
                                Q_INVOKABLE virtual QString label() = 0; 
 
51
            
 
52
                        protected:
 
53
                                QSharedPointer<Notification> accessParent() const;
 
54
 
 
55
                        private:
 
56
                                QSharedPointer<Notification> parent;
 
57
                };
 
58
        }
60
59
}
61
60
 
62
61
#endif // ACTION_H_