akonadi
collectionview.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef AKONADI_COLLECTION_VIEW
00021 #define AKONADI_COLLECTION_VIEW
00022
00023 #include "akonadi_export.h"
00024 #include <QtGui/QTreeView>
00025
00026 class KXMLGUIClient;
00027 class KXmlGuiWindow;
00028 class QDragMoveEvent;
00029
00030 namespace Akonadi {
00031
00032 class Collection;
00033
00063 class AKONADI_EXPORT CollectionView : public QTreeView
00064 {
00065 Q_OBJECT
00066
00067 public:
00073 explicit CollectionView( QWidget *parent = 0 );
00074
00083 explicit KDE_DEPRECATED CollectionView( KXmlGuiWindow *xmlGuiWindow, QWidget *parent = 0 );
00084
00093 explicit CollectionView( KXMLGUIClient *xmlGuiClient, QWidget *parent = 0 );
00094
00098 virtual ~CollectionView();
00099
00106 KDE_DEPRECATED void setXmlGuiWindow( KXmlGuiWindow * xmlGuiWindow );
00107
00115 void setXmlGuiClient( KXMLGUIClient *xmlGuiClient );
00116
00117 virtual void setModel ( QAbstractItemModel * model );
00118
00119 Q_SIGNALS:
00126 void clicked( const Akonadi::Collection &collection );
00127
00134 void currentChanged( const Akonadi::Collection &collection );
00135
00136 protected:
00137 using QTreeView::currentChanged;
00138 virtual void dragMoveEvent( QDragMoveEvent *event );
00139 virtual void dragLeaveEvent( QDragLeaveEvent *event );
00140 virtual void dropEvent( QDropEvent *event );
00141 virtual void contextMenuEvent( QContextMenuEvent *event );
00142
00143 private:
00144
00145 class Private;
00146 Private * const d;
00147
00148 Q_PRIVATE_SLOT( d, void dragExpand() )
00149 Q_PRIVATE_SLOT( d, void itemClicked( const QModelIndex& ) )
00150 Q_PRIVATE_SLOT( d, void itemCurrentChanged( const QModelIndex& ) )
00151
00152 };
00153
00154 }
00155
00156 #endif