akonadi
entitylistview.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef AKONADI_ENTITYLISTVIEW_H
00023 #define AKONADI_ENTITYLISTVIEW_H
00024
00025 #include "akonadi_export.h"
00026
00027 #include <QtGui/QListView>
00028
00029 class KXMLGUIClient;
00030 class QDragMoveEvent;
00031
00032 namespace Akonadi
00033 {
00034
00035 class Collection;
00036 class Item;
00037
00075 class AKONADI_EXPORT EntityListView : public QListView
00076 {
00077 Q_OBJECT
00078
00079 public:
00085 explicit EntityListView( QWidget *parent = 0 );
00086
00095 explicit EntityListView( KXMLGUIClient *xmlGuiClient, QWidget *parent = 0 );
00096
00100 virtual ~EntityListView();
00101
00109 void setXmlGuiClient( KXMLGUIClient *xmlGuiClient );
00110
00114 virtual void setModel( QAbstractItemModel * model );
00115
00116 Q_SIGNALS:
00123 void clicked( const Akonadi::Collection &collection );
00124
00131 void clicked( const Akonadi::Item &item );
00132
00139 void doubleClicked( const Akonadi::Collection &collection );
00140
00147 void doubleClicked( const Akonadi::Item &item );
00148
00155 void currentChanged( const Akonadi::Collection &collection );
00156
00163 void currentChanged( const Akonadi::Item &item );
00164
00165 protected:
00166 using QListView::currentChanged;
00167 virtual void dragMoveEvent( QDragMoveEvent *event );
00168 virtual void dropEvent( QDropEvent *event );
00169 virtual void contextMenuEvent( QContextMenuEvent *event );
00170 virtual void startDrag( Qt::DropActions supportedActions );
00171
00172 private:
00173
00174 class Private;
00175 Private * const d;
00176
00177 Q_PRIVATE_SLOT( d, void itemClicked( const QModelIndex& ) )
00178 Q_PRIVATE_SLOT( d, void itemDoubleClicked( const QModelIndex& ) )
00179 Q_PRIVATE_SLOT( d, void itemCurrentChanged( const QModelIndex& ) )
00180
00181 };
00182
00183 }
00184
00185 #endif