2
* Copyright (C) 2011 Canonical, Ltd.
5
* Ugo Riboni <ugo.riboni@canonical.com>
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; version 3.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
25
#include "launcheritem.h"
27
#include <QAbstractListModel>
30
class Workspaces : public LauncherItem
36
Workspaces(const Workspaces& other);
40
virtual bool active() const;
41
virtual bool running() const;
42
virtual int windowCount() const;
43
virtual bool urgent() const;
44
virtual QString name() const;
45
virtual QString icon() const;
46
virtual bool launching() const;
49
Q_INVOKABLE virtual void activate();
50
Q_INVOKABLE virtual void createMenuActions();
53
Q_DECLARE_METATYPE(Workspaces*)
55
/* This class wouldn't be necessary if the launcher were able
56
to accept single LauncherItems instad of only groups of
57
LauncherItems in a list model. */
58
class WorkspacesList : public QAbstractListModel
63
WorkspacesList(QObject* parent = 0);
66
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
67
int rowCount(const QModelIndex& parent = QModelIndex()) const;
70
Workspaces* m_workspaces;
73
#endif // WORKSPACES_H