add more spacing
[personal-kdebase.git] / workspace / plasma / applets / kickoff / core / systemmodel.h
blob9c272343573981d6551d96d78fdf60fb3477fd18
1 /*
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.
21 #ifndef SYSTEMMODEL_H
22 #define SYSTEMMODEL_H
24 #include "core/kickoff_export.h"
25 #include "core/kickoffproxymodel.h"
27 namespace Kickoff
30 /**
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
36 Q_OBJECT
38 public:
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;
51 private Q_SLOTS:
52 void startRefreshingUsageInfo();
53 void reloadApplications();
54 void freeSpaceInfoAvailable(const QString& mountPoint, quint64 kbSize,
55 quint64 kbUsed, quint64 kbAvailable);
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);
63 private:
64 class Private;
65 Private * const d;
70 #endif // SYSTEMMODEL_H