Loading...
Searching...
No Matches
SourceInterface.h
/*
* Copyright 2013 Canonical Ltd.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; version 3.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Authors:
* Michał Sawicz <michal.sawicz@canonical.com>
*/
#ifndef LOMIRI_SHELL_NOTIFICATIONS_SOURCEINTERFACE_H
#define LOMIRI_SHELL_NOTIFICATIONS_SOURCEINTERFACE_H
#include <lomiri/SymbolExport.h>
#include <QtCore/QObject>
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
Q_MOC_INCLUDE("ModelInterface.h")
#endif
namespace lomiri
{
namespace shell
{
namespace notifications
{
class ModelInterface;
class LOMIRI_API SourceInterface : public QObject
{
Q_OBJECT
Q_PROPERTY(lomiri::shell::notifications::ModelInterface* model READ model WRITE setModel NOTIFY modelChanged)
protected:
explicit SourceInterface(QObject* parent = 0) : QObject(parent) { }
public:
virtual ~SourceInterface() { }
virtual ModelInterface* model() const = 0;
virtual void setModel(ModelInterface* model) = 0;
Q_SIGNALS:
void modelChanged(ModelInterface* model);
};
} // namespace notifications
} // namespace shell
} // namespace lomiri
#endif // LOMIRI_SHELL_NOTIFICATIONS_SOURCEINTERFACE_H
lomiri::shell::notifications::ModelInterface
A list of notifications to be displayed.
Definition ModelInterface.h:48
lomiri::shell::notifications::SourceInterface
A source of notifications.
Definition SourceInterface.h:51
lomiri::shell::notifications::SourceInterface::model
lomiri::shell::notifications::ModelInterface * model
The model to which to send incoming notifications.
Definition SourceInterface.h:60
lomiri::shell::notifications::SourceInterface::modelChanged
void modelChanged(ModelInterface *model)
lomiri
Top-level namespace for all things Lomiri-related.
Definition Version.h:38