My Project
SourceInterface.h
1 /*
2  * Copyright 2013 Canonical Ltd.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation; version 3.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authors:
17  * MichaƂ Sawicz <michal.sawicz@canonical.com>
18  */
19 
20 
21 #ifndef UNITY_SHELL_NOTIFICATIONS_SOURCEINTERFACE_H
22 #define UNITY_SHELL_NOTIFICATIONS_SOURCEINTERFACE_H
23 
24 #include <unity/SymbolExport.h>
25 
26 #include <QtCore/QObject>
27 
28 namespace unity
29 {
30 
31 namespace shell
32 {
33 
34 namespace notifications
35 {
36 
37 
38 class ModelInterface;
39 
46 class UNITY_API SourceInterface : public QObject
47 {
48  Q_OBJECT
49 
56  Q_PROPERTY(unity::shell::notifications::ModelInterface* model READ model WRITE setModel NOTIFY modelChanged)
57 
58 protected:
60  explicit SourceInterface(QObject* parent = 0) : QObject(parent) { }
62 
63 public:
64  virtual ~SourceInterface() { }
65 
67  virtual ModelInterface* model() const = 0;
68  virtual void setModel(ModelInterface* model) = 0;
70 
71 Q_SIGNALS:
77  void modelChanged(ModelInterface* model);
78 };
79 
80 } // namespace notifications
81 
82 } // namespace shell
83 
84 } // namespace unity
85 
86 #endif // UNITY_SHELL_NOTIFICATIONS_SOURCEINTERFACE_H
A source of notifications.
Definition: SourceInterface.h:46
A list of notifications to be displayed.
Definition: ModelInterface.h:47
Top-level namespace for all things Unity-related.
Definition: Version.h:37