Loading...
Searching...
No Matches
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 UNITY_SHELL_LAUNCHER_LAUNCHERITEM_H
#define UNITY_SHELL_LAUNCHER_LAUNCHERITEM_H
#include <unity/SymbolExport.h>
#include <QtCore/QObject>
namespace unity
{
namespace shell
{
namespace launcher
{
class QuickListModelInterface;
class UNITY_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(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(unity::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 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 unity::shell::launcher::QuickListModelInterface *quickList() const = 0;
Q_SIGNALS:
void nameChanged(const QString &name);
void iconChanged(const QString &icon);
void keywordsChanged(const QStringList &keywords);
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 unity
#endif // UNITY_SHELL_LAUNCHER_LAUNCHERITEMINTERFACE_H
unity::shell::launcher::LauncherItemInterface
An item presented in the launcher.
Definition LauncherItemInterface.h:41
unity::shell::launcher::LauncherItemInterface::surfaceCount
int surfaceCount
The number of surfaces that this application entry has opened.
Definition LauncherItemInterface.h:121
unity::shell::launcher::LauncherItemInterface::alerting
bool alerting
The alerting state of the item.
Definition LauncherItemInterface.h:114
unity::shell::launcher::LauncherItemInterface::name
QString name
The user visible name of the item.
Definition LauncherItemInterface.h:52
unity::shell::launcher::LauncherItemInterface::running
bool running
A flag whether the application belonging to the icon is currently running or not.
Definition LauncherItemInterface.h:72
unity::shell::launcher::LauncherItemInterface::progress
int progress
The percentage of the progress bar shown on the item.
Definition LauncherItemInterface.h:85
unity::shell::launcher::LauncherItemInterface::quickList
unity::shell::launcher::QuickListModelInterface * quickList
The quick list menu contents for the item.
Definition LauncherItemInterface.h:130
unity::shell::launcher::LauncherItemInterface::pinned
bool pinned
A flag whether the item is pinned or not.
Definition LauncherItemInterface.h:67
unity::shell::launcher::LauncherItemInterface::recent
bool recent
A flag wheter the application is in the recently used applications list.
Definition LauncherItemInterface.h:77
unity::shell::launcher::LauncherItemInterface::focused
bool focused
The focused state of the item.
Definition LauncherItemInterface.h:107
unity::shell::launcher::LauncherItemInterface::count
int count
The number for the count emblem on the item.
Definition LauncherItemInterface.h:93
unity::shell::launcher::LauncherItemInterface::countVisible
bool countVisible
The visibility of the count emblem.
Definition LauncherItemInterface.h:100
unity::shell::launcher::LauncherItemInterface::keywords
QStringList keywords
The keywords for this item.
Definition LauncherItemInterface.h:62
unity::shell::launcher::LauncherItemInterface::icon
QString icon
The full path to the icon to be shown for the item.
Definition LauncherItemInterface.h:57
unity::shell::launcher::LauncherItemInterface::appId
QString appId
The appId of the application associated with the item.
Definition LauncherItemInterface.h:47
unity::shell::launcher::QuickListModelInterface
A model containing QuickList actions for an application in the launcher.
Definition QuickListModelInterface.h:45
unity
Top-level namespace for all things Unity-related.
Definition Version.h:38