Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / workspace / plasma / applets / kickoff / core / favoritesmodel.h
blob73b30046c3e084a8c036ec06d1fb12b07bc00cb5
1 /*
2 Copyright 2007 Robert Knight <robertknight@gmail.com>
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
20 #ifndef FAVORITESMODEL_H
21 #define FAVORITESMODEL_H
24 #include "core/kickoffmodel.h"
26 namespace Kickoff
29 /**
30 * A model which provides an ordered list of 'favorite' items chosen by the user.
31 * The items may represent documents, folders, applications, devices or anything else
32 * identified by a URL.
34 * The information persists between sessions.
36 class FavoritesModel : public KickoffModel
38 Q_OBJECT
40 public:
41 FavoritesModel(QObject *parent);
42 virtual ~FavoritesModel();
44 /** Add a new item for @p url to the user's favorites list. */
45 static void add(const QString& url);
46 /** Remove the item associated with @p url from the user's favorites list. */
47 static void remove(const QString& url);
48 /** Returns true if @p url is in the list of the user's favorite URLs. */
49 static bool isFavorite(const QString& url);
51 private:
52 class Private;
53 Private * const d;
58 #endif // FAVORITESMODEL_H