LauncherItemInterface.h
/*
* Copyright 2013-2106 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/>.
*/
#ifndef LOMIRI_SHELL_LAUNCHER_LAUNCHERITEM_H
#define LOMIRI_SHELL_LAUNCHER_LAUNCHERITEM_H
#include <lomiri/SymbolExport.h>
#include <QtCore/QObject>
namespace lomiri
{
namespace shell
{
namespace launcher
{
class QuickListModelInterface;
class LOMIRI_API LauncherItemInterface: public QObject
{
Q_OBJECT
Q_PROPERTY(QString appId READ appId CONSTANT)
Q_PROPERTY(QString name READ name NOTIFY nameChanged)
Q_PROPERTY(QString icon READ icon NOTIFY iconChanged)
Q_PROPERTY(QStringList keywords READ keywords NOTIFY keywordsChanged)
Q_PROPERTY(uint popularity READ popularity NOTIFY popularityChanged)
Q_PROPERTY(bool pinned READ pinned NOTIFY pinnedChanged)
Q_PROPERTY(bool running READ running NOTIFY runningChanged)
Q_PROPERTY(bool recent READ recent NOTIFY recentChanged)
Q_PROPERTY(int progress READ progress NOTIFY progressChanged)
Q_PROPERTY(int count READ count NOTIFY countChanged)
Q_PROPERTY(bool countVisible READ countVisible NOTIFY countVisibleChanged)
Q_PROPERTY(bool focused READ focused NOTIFY focusedChanged)
Q_PROPERTY(bool alerting READ alerting NOTIFY alertingChanged)
Q_PROPERTY(int surfaceCount READ surfaceCount NOTIFY surfaceCountChanged)
Q_PROPERTY(lomiri::shell::launcher::QuickListModelInterface* quickList READ quickList CONSTANT)
protected:
LauncherItemInterface(QObject *parent = 0): QObject(parent) {}
public:
virtual ~LauncherItemInterface() {}
virtual QString appId() const = 0;
virtual QString name() const = 0;
virtual QString icon() const = 0;
virtual QStringList keywords() const = 0;
virtual uint popularity() const = 0;
virtual bool pinned() const = 0;
virtual bool running() const = 0;
virtual bool recent() const = 0;
virtual int progress() const = 0;
virtual int count() const = 0;
virtual bool countVisible() const = 0;
virtual bool focused() const = 0;
virtual bool alerting() const = 0;
virtual int surfaceCount() const = 0;
virtual lomiri::shell::launcher::QuickListModelInterface *quickList() const = 0;
Q_SIGNALS:
void nameChanged(const QString &name);
void iconChanged(const QString &icon);
void keywordsChanged(const QStringList &keywords);
void popularityChanged(uint popularity);
void pinnedChanged(bool pinned);
void runningChanged(bool running);
void recentChanged(bool running);
void progressChanged(int progress);
void countChanged(int count);
void countVisibleChanged(bool countVisible);
void focusedChanged(bool focused);
void alertingChanged(bool alerting);
void surfaceCountChanged(int surfaceCount);
};
} // namespace launcher
} // namespace shell
} // namespace lomiri
#endif // LOMIRI_SHELL_LAUNCHER_LAUNCHERITEMINTERFACE_H
lomiri::shell::launcher::LauncherItemInterface
An item presented in the launcher.
Definition: LauncherItemInterface.h:41
lomiri::shell::launcher::QuickListModelInterface
A model containing QuickList actions for an application in the launcher.
Definition: QuickListModelInterface.h:45
lomiri
Top-level namespace for all things Lomiri-related.
Definition: Version.h:38