Changeset View
Changeset View
Standalone View
Standalone View
applets/kicker/plugin/simplefavoritesmodel.h
- This file was moved from applets/kicker/plugin/favoritesmodel.h.
Show All 11 Lines | |||||
12 | * GNU General Public License for more details. * | 12 | * GNU General Public License for more details. * | ||
13 | * * | 13 | * * | ||
14 | * You should have received a copy of the GNU General Public License * | 14 | * You should have received a copy of the GNU General Public License * | ||
15 | * along with this program; if not, write to the * | 15 | * along with this program; if not, write to the * | ||
16 | * Free Software Foundation, Inc., * | 16 | * Free Software Foundation, Inc., * | ||
17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * | 17 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * | ||
18 | ***************************************************************************/ | 18 | ***************************************************************************/ | ||
19 | 19 | | |||
20 | #ifndef FAVORITESMODEL_H | 20 | #ifndef SIMPLEFAVORITESMODEL_H | ||
21 | #define FAVORITESMODEL_H | 21 | #define SIMPLEFAVORITESMODEL_H | ||
22 | 22 | | |||
23 | #include "abstractmodel.h" | 23 | #include "abstractmodel.h" | ||
24 | 24 | | |||
25 | #include <QPointer> | 25 | #include <QPointer> | ||
26 | 26 | | |||
27 | #include <KService> | 27 | #include <KService> | ||
28 | 28 | | |||
29 | class FavoritesModel : public AbstractModel | 29 | class SimpleFavoritesModel : public AbstractModel | ||
30 | { | 30 | { | ||
31 | Q_OBJECT | 31 | Q_OBJECT | ||
32 | 32 | | |||
33 | Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) | 33 | Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) | ||
34 | Q_PROPERTY(QStringList favorites READ favorites WRITE setFavorites NOTIFY favoritesChanged) | 34 | Q_PROPERTY(QStringList favorites READ favorites WRITE setFavorites NOTIFY favoritesChanged) | ||
35 | Q_PROPERTY(int maxFavorites READ maxFavorites WRITE setMaxFavorites NOTIFY maxFavoritesChanged) | 35 | Q_PROPERTY(int maxFavorites READ maxFavorites WRITE setMaxFavorites NOTIFY maxFavoritesChanged) | ||
36 | Q_PROPERTY(int dropPlaceholderIndex READ dropPlaceholderIndex WRITE setDropPlaceholderIndex NOTIFY dropPlaceholderIndexChanged) | 36 | Q_PROPERTY(int dropPlaceholderIndex READ dropPlaceholderIndex WRITE setDropPlaceholderIndex NOTIFY dropPlaceholderIndexChanged) | ||
37 | 37 | | |||
38 | public: | 38 | public: | ||
39 | explicit FavoritesModel(QObject *parent = 0); | 39 | explicit SimpleFavoritesModel(QObject *parent = 0); | ||
40 | ~FavoritesModel(); | 40 | ~SimpleFavoritesModel(); | ||
41 | 41 | | |||
42 | QString description() const Q_DECL_OVERRIDE; | 42 | QString description() const Q_DECL_OVERRIDE; | ||
43 | 43 | | |||
44 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; | 44 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const Q_DECL_OVERRIDE; | ||
45 | 45 | | |||
46 | int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; | 46 | int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE; | ||
47 | 47 | | |||
48 | Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE; | 48 | Q_INVOKABLE bool trigger(int row, const QString &actionId, const QVariant &argument) Q_DECL_OVERRIDE; | ||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |