akonadi
itemview.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef AKONADI_ITEM_VIEW
00021 #define AKONADI_ITEM_VIEW
00022
00023 #include "akonadi_export.h"
00024 #include <QtGui/QTreeView>
00025
00026 class KXmlGuiWindow;
00027
00028 namespace Akonadi {
00029
00030 class Item;
00031
00060 class AKONADI_EXPORT ItemView : public QTreeView
00061 {
00062 Q_OBJECT
00063
00064 public:
00070 explicit ItemView( QWidget *parent = 0 );
00071
00080 explicit ItemView( KXmlGuiWindow *xmlGuiWindow, QWidget *parent = 0 );
00081
00085 virtual ~ItemView();
00086
00093 void setXmlGuiWindow( KXmlGuiWindow *xmlGuiWindow );
00094
00095 virtual void setModel( QAbstractItemModel * model );
00096
00097 Q_SIGNALS:
00104 void activated( const Akonadi::Item &item );
00105
00112 void currentChanged( const Akonadi::Item &item );
00113
00114 protected:
00115 using QTreeView::currentChanged;
00116 void contextMenuEvent( QContextMenuEvent *event );
00117
00118 private:
00119
00120 class Private;
00121 Private * const d;
00122
00123 Q_PRIVATE_SLOT( d, void itemActivated( const QModelIndex& ) )
00124 Q_PRIVATE_SLOT( d, void itemCurrentChanged( const QModelIndex& ) )
00125
00126 };
00127
00128 }
00129
00130 #endif