@@ -1,62 +0,0 @@
1−/* Copyright (C) 2013 Canonical, Ltd.
2− *
3− * Authors:
4− * Michael Zanetti <michael.zanetti@canonical.com>
5− *
6− * This program is free software; you can redistribute it and/or modify
7− * it under the terms of the GNU General Public License as published by
8− * the Free Software Foundation; version 3.
9− *
10− * This program is distributed in the hope that it will be useful,
11− * but WITHOUT ANY WARRANTY; without even the implied warranty of
12− * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13− * GNU General Public License for more details.
14− *
15− * You should have received a copy of the GNU General Public License
16− * along with this program. If not, see <http://www.gnu.org/licenses/>.
17− */
18−
19−#ifndef APPLICATIONLISTMODEL_H
20−#define APPLICATIONLISTMODEL_H
21−
22−#include <QAbstractListModel>
23−
24−class ApplicationListModel: public QAbstractListModel
25−{
26− Q_OBJECT
27−public:
28− enum Roles {
29− RoleAppId = Qt::UserRole +1
30− };
31−
32− explicit ApplicationListModel(QObject *parent = 0);
33−
34− /**
35− * @brief Add an application to the list of applications.
36− * @param appId The ID of the application to be added.
37− */
38− void addApplication(const QString &appId, int index);
39−
40− /**
41− * @brief Remove an application from the list of applications.
42− * @param appId The ID of the application to be removed.
43− */
44− void removeApplication(const QString &appId);
45−
46− /**
47− * @brief Move an application within the list
48− * @param appId The ID of the application to be moved.
49− * @param newIndex The new position for the entry.
50− */
51− void moveApplication(const QString &appId, int newIndex);
52−
53−
54− int rowCount(const QModelIndex &parent = QModelIndex()) const;
55− QVariant data(const QModelIndex &index, int role) const;
56−
57−private:
58− QList<QString> m_list;
59−};
60−
61−#endif // APPLICATIONLISTMODEL_H
62−