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 class KXMLGUIClient;
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 KDE_DEPRECATED ItemView( KXmlGuiWindow *xmlGuiWindow, QWidget *parent = 0 );
00081
00091 explicit ItemView( KXMLGUIClient *xmlGuiClient, QWidget *parent = 0 );
00092
00096 virtual ~ItemView();
00097
00104 KDE_DEPRECATED void setXmlGuiWindow( KXmlGuiWindow *xmlGuiWindow );
00105
00112 void setXmlGuiClient( KXMLGUIClient *xmlGuiClient );
00113
00114
00115 virtual void setModel( QAbstractItemModel * model );
00116
00117 Q_SIGNALS:
00124 void activated( const Akonadi::Item &item );
00125
00132 void currentChanged( const Akonadi::Item &item );
00133
00141 void clicked( const Akonadi::Item &item );
00142
00150 void doubleClicked( const Akonadi::Item &item );
00151
00152 protected:
00153 using QTreeView::currentChanged;
00154 void contextMenuEvent( QContextMenuEvent *event );
00155
00156 private:
00157
00158 class Private;
00159 Private * const d;
00160
00161 Q_PRIVATE_SLOT( d, void itemActivated( const QModelIndex& ) )
00162 Q_PRIVATE_SLOT( d, void itemCurrentChanged( const QModelIndex& ) )
00163 Q_PRIVATE_SLOT( d, void itemClicked( const QModelIndex& ) )
00164 Q_PRIVATE_SLOT( d, void itemDoubleClicked( const QModelIndex& ) )
00165
00166 };
00167
00168 }
00169
00170 #endif