2 Copyright (c) 2007 Volker Krause <vkrause@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.
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 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 the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 #ifndef AKONADICONSOLE_BROWSERWIDGET_H
21 #define AKONADICONSOLE_BROWSERWIDGET_H
23 #include <ui_browserwidget_itemview.h>
24 #include <ui_browserwidget_contentview.h>
26 #include <AkonadiCore/collection.h>
27 #include <AkonadiCore/item.h>
28 #include <AkonadiWidgets/etmviewstatesaver.h>
33 class QStandardItemModel
;
39 class AkonadiBrowserModel
;
41 template <typename T
> class KViewStateMaintainer
;
48 class StandardActionManager
;
51 class StatisticsProxyModel
;
54 class BrowserWidget
: public QWidget
59 explicit BrowserWidget(KXmlGuiWindow
*xmlGuiWindow
, QWidget
*parent
= Q_NULLPTR
);
67 void itemActivated(const QModelIndex
&index
);
68 void itemFetchDone(KJob
*job
);
71 void saveResult(KJob
*job
);
74 void setItem(const Akonadi::Item
&item
);
75 void dumpToXmlResult(KJob
*job
);
77 void updateItemFetchScope();
79 void contentViewChanged();
81 void tagViewContextMenuRequested(const QPoint
&pos
);
82 void tagViewDoubleClicked(const QModelIndex
&index
);
83 void addSubTagRequested();
84 void addTagRequested();
85 void editTagRequested();
86 void removeTagRequested();
90 Akonadi::Collection
currentCollection() const;
92 Akonadi::ChangeRecorder
*mBrowserMonitor
;
93 AkonadiBrowserModel
*mBrowserModel
;
94 Akonadi::EntityTreeView
*mCollectionView
;
95 Akonadi::StatisticsProxyModel
*statisticsProxyModel
;
96 Ui::ItemViewWidget itemUi
;
97 Ui::ContentViewWidget contentUi
;
98 Akonadi::Item mCurrentItem
;
99 QStandardItemModel
*mAttrModel
;
100 Akonadi::StandardActionManager
*mStdActionManager
;
101 Akonadi::Monitor
*mMonitor
;
102 KViewStateMaintainer
<Akonadi::ETMViewStateSaver
> *m_stateMaintainer
;
103 KToggleAction
*mCacheOnlyAction
;
105 Akonadi::TagModel
*mTagModel
;