My Project
Loading...
Searching...
No Matches
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 LOMIRI_SHELL_NOTIFICATIONS_SOURCEINTERFACE_H
22#define LOMIRI_SHELL_NOTIFICATIONS_SOURCEINTERFACE_H
23
24#include <lomiri/SymbolExport.h>
25
26#include <QtCore/QObject>
27
28#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
29Q_MOC_INCLUDE("ModelInterface.h")
30#endif
31
32namespace lomiri
33{
34
35namespace shell
36{
37
38namespace notifications
39{
40
41
42class ModelInterface;
43
50class LOMIRI_API SourceInterface : public QObject
51{
52 Q_OBJECT
53
60 Q_PROPERTY(lomiri::shell::notifications::ModelInterface* model READ model WRITE setModel NOTIFY modelChanged)
61
62protected:
64 explicit SourceInterface(QObject* parent = 0) : QObject(parent) { }
66
67public:
68 virtual ~SourceInterface() { }
69
71 virtual ModelInterface* model() const = 0;
72 virtual void setModel(ModelInterface* model) = 0;
74
75Q_SIGNALS:
82};
83
84} // namespace notifications
85
86} // namespace shell
87
88} // namespace lomiri
89
90#endif // LOMIRI_SHELL_NOTIFICATIONS_SOURCEINTERFACE_H
A list of notifications to be displayed.
Definition ModelInterface.h:48
A source of notifications.
Definition SourceInterface.h:51
void modelChanged(ModelInterface *model)
Top-level namespace for all things Lomiri-related.
Definition Version.h:38