Applets
favoritesmodel.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef FAVORITESMODEL_H
00021 #define FAVORITESMODEL_H
00022
00023 #include "core/kickoff_export.h"
00024 #include "core/kickoffmodel.h"
00025
00026 namespace Kickoff
00027 {
00028
00036 class KICKOFF_EXPORT FavoritesModel : public KickoffModel
00037 {
00038 Q_OBJECT
00039
00040 public:
00041 FavoritesModel(QObject *parent);
00042 virtual ~FavoritesModel();
00043
00045 static void add(const QString& url);
00047 static void remove(const QString& url);
00049 static void move(int startRow, int destRow);
00050 static int numberOfFavorites();
00051 static void sortFavorites(Qt::SortOrder order);
00052 static bool isFavorite(const QString& url);
00053
00054 virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action,
00055 int row, int column, const QModelIndex & parent);
00056
00057 public Q_SLOTS:
00058 void sortFavoritesAscending();
00059 void sortFavoritesDescending();
00060
00061 private:
00062 class Private;
00063 Private * const d;
00064 };
00065
00066 }
00067
00068 #endif // FAVORITESMODEL_H