typo found by Andrey Cherepanov
[kdepim.git] / akonadiconsole / browserwidget.h
blobff409ccc41678921eccc4697cbcd82b0015dc3f5
1 /*
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
17 02110-1301, USA.
20 #ifndef BROWSERWIDGET_H
21 #define BROWSERWIDGET_H
23 #include <config-akonadiconsole.h>
25 #include <ui_browserwidget_itemview.h>
26 #include <ui_browserwidget_contentview.h>
28 #include <akonadi/collection.h>
29 #include <akonadi/item.h>
31 #include <QtGui/QWidget>
33 class QModelIndex;
34 class QItemSelectionModel;
35 class QStandardItemModel;
37 class KJob;
38 class KXmlGuiWindow;
40 namespace Akonadi {
41 class CollectionView;
42 class CollectionModel;
43 class ItemModel;
44 class Job;
45 class StandardActionManager;
46 class Monitor;
49 class BrowserWidget: public QWidget
51 Q_OBJECT
53 public:
54 explicit BrowserWidget( KXmlGuiWindow *xmlGuiWindow, QWidget *parent = 0 );
56 public slots:
57 void dumpToXml();
59 private slots:
60 void collectionActivated( const QModelIndex &index );
61 void itemActivated( const QModelIndex &index );
62 void itemFetchDone( KJob *job );
63 void modelChanged();
64 void save();
65 void saveResult( KJob* job );
66 void addAttribute();
67 void delAttribute();
68 void setItem( const Akonadi::Item &item );
69 void dumpToXmlResult( KJob *job );
71 private:
72 Akonadi::CollectionModel *mCollectionModel;
73 Akonadi::CollectionView *mCollectionView;
74 Akonadi::ItemModel *mItemModel;
75 Ui::ItemViewWidget itemUi;
76 Ui::ContentViewWidget contentUi;
77 Akonadi::Collection::Id mCurrentCollection;
78 Akonadi::Item mCurrentItem;
79 QStandardItemModel *mAttrModel;
80 #ifdef NEPOMUK_FOUND
81 QStandardItemModel *mNepomukModel;
82 #endif
83 Akonadi::StandardActionManager *mStdActionManager;
84 Akonadi::Monitor *mMonitor;
87 #endif