2
Copyright 2007 Robert Knight <robertknight@gmail.com>
3
Copyright 2007 Kevin Ottens <ervin@kde.org>
5
This library is free software; you can redistribute it and/or
6
modify it under the terms of the GNU Library General Public
7
License as published by the Free Software Foundation; either
8
version 2 of the License, or (at your option) any later version.
10
This library 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 GNU
13
Library General Public License for more details.
15
You should have received a copy of the GNU Library General Public License
16
along with this library; see the file COPYING.LIB. If not, write to
17
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
Boston, MA 02110-1301, USA.
24
#include "core/kickoff_export.h"
25
#include "core/kickoffproxymodel.h"
31
* Model which provides a tree of items for important system setup tools (eg. System Settings) ,
32
* folders (eg. the user's home folder and the local network) and fixed and removable storage.
34
class KICKOFF_EXPORT SystemModel : public KickoffProxyModel
39
/** Constructs a new SystemModel with the specified parent. */
40
SystemModel(QObject *parent = 0);
41
virtual ~SystemModel();
43
virtual QModelIndex mapFromSource(const QModelIndex &sourceIndex) const;
44
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const;
45
virtual QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
46
virtual QModelIndex parent(const QModelIndex &item) const;
47
virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
48
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
49
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
50
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
51
void refreshUsageInfo();
52
void stopRefreshingUsageInfo();
55
void refreshNextUsageInfo();
56
void reloadApplications();
57
void sourceDataChanged(const QModelIndex &start, const QModelIndex &end);
58
void sourceRowsAboutToBeInserted(const QModelIndex &parent, int start, int end);
59
void sourceRowsInserted(const QModelIndex &parent, int start, int end);
60
void sourceRowsAboutToBeRemoved(const QModelIndex &parent, int start, int end);
61
void sourceRowsRemoved(const QModelIndex &parent, int start, int end);
70
#endif // SYSTEMMODEL_H