2
* Copyright (c) 2011 Laurent Montel <montel@kde.org>
4
* This library is free software; you can redistribute it and/or modify it
5
* under the terms of the GNU Library General Public License as published by
6
* the Free Software Foundation; either version 2 of the License, or (at your
7
* option) any later version.
8
* This library is distributed in the hope that it will be useful, but WITHOUT
9
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
11
* License for more details.
13
* You should have received a copy of the GNU Library General Public License
14
* along with this library; see the file COPYING.LIB. If not, write to the
15
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18
#ifndef RECENTCOLLECTIONACTION_P_H
19
#define RECENTCOLLECTIONACTION_P_H
21
#include <QStringList>
22
#include <QModelIndex>
23
#include <akonadi/collection.h>
24
#include <ksharedconfig.h>
27
class QAbstractItemModel;
30
* @short A class to manage recent selected folder.
32
* @author Montel Laurent <montel@kde.org>
37
class RecentCollectionAction : public QObject
42
* Creates a new collection recent action
44
explicit RecentCollectionAction(const QAbstractItemModel *model, QMenu *menu);
46
* Destroys the collection recent action.
48
~RecentCollectionAction();
51
* Add new collection. Will create a new item.
53
void addRecentCollection( Akonadi::Collection::Id id);
55
void cleanRecentCollection();
59
void fillRecentCollection();
60
QString actionName(QModelIndex index);
63
QStringList mListRecentCollection;
65
const QAbstractItemModel *mModel;
66
QAction *mRecentAction;
67
KSharedConfig::Ptr mAkonadiConfig;
71
#endif /* RECENTCOLLECTIONACTION_P_H */