akonadi
collectionview.h
00001 /* 00002 Copyright (c) 2006 - 2007 Volker Krause <vkrause@kde.org> 00003 00004 This library is free software; you can redistribute it and/or modify it 00005 under the terms of the GNU Library General Public License as published by 00006 the Free Software Foundation; either version 2 of the License, or (at your 00007 option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, but WITHOUT 00010 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00011 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00012 License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to the 00016 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00017 02110-1301, USA. 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 //@cond PRIVATE 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 //@endcond 00152 }; 00153 00154 } 00155 00156 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu May 10 2012 22:18:31 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu May 10 2012 22:18:31 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.