akonadi
collectiondialog.h
00001 /* 00002 Copyright 2008 Ingo Klöcker <kloecker@kde.org> 00003 Copyright 2010 Laurent Montel <montel@kde.org> 00004 00005 This library is free software; you can redistribute it and/or modify it 00006 under the terms of the GNU Library General Public License as published by 00007 the Free Software Foundation; either version 2 of the License, or (at your 00008 option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, but WITHOUT 00011 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00012 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00013 License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to the 00017 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00018 02110-1301, USA. 00019 */ 00020 00021 #ifndef AKONADI_COLLECTIONDIALOG_H 00022 #define AKONADI_COLLECTIONDIALOG_H 00023 00024 #include "akonadi_export.h" 00025 00026 #include <kdialog.h> 00027 00028 #include <akonadi/collection.h> 00029 00030 #include <QtGui/QAbstractItemView> 00031 00032 namespace Akonadi { 00033 00067 class AKONADI_EXPORT CollectionDialog : public KDialog 00068 { 00069 Q_OBJECT 00070 Q_DISABLE_COPY( CollectionDialog ) 00071 00072 public: 00073 /* @since 4.6 00074 */ 00075 enum CollectionDialogOption 00076 { 00077 None = 0, 00078 AllowToCreateNewChildCollection = 1 00079 }; 00080 00081 Q_DECLARE_FLAGS( CollectionDialogOptions, CollectionDialogOption ) 00082 00083 00084 00089 explicit CollectionDialog( QWidget *parent = 0 ); 00090 00102 explicit CollectionDialog( QAbstractItemModel *model, QWidget *parent = 0 ); 00103 00117 explicit CollectionDialog( CollectionDialogOptions options, QAbstractItemModel *model = 0, QWidget *parent = 0 ); 00118 00122 ~CollectionDialog(); 00123 00128 void setMimeTypeFilter( const QStringList &mimeTypes ); 00129 00133 QStringList mimeTypeFilter() const; 00134 00140 void setAccessRightsFilter( Collection::Rights rights ); 00141 00147 Collection::Rights accessRightsFilter() const; 00148 00154 void setDescription( const QString &text ); 00155 00161 void setDefaultCollection( const Collection &collection ); 00162 00168 void setSelectionMode( QAbstractItemView::SelectionMode mode ); 00169 00174 QAbstractItemView::SelectionMode selectionMode() const; 00175 00181 Akonadi::Collection selectedCollection() const; 00182 00186 Akonadi::Collection::List selectedCollections() const; 00187 00192 void changeCollectionDialogOptions( CollectionDialogOptions options ); 00193 00194 private: 00195 //@cond PRIVATE 00196 class Private; 00197 Private * const d; 00198 00199 Q_PRIVATE_SLOT( d, void slotCollectionAvailable( const QModelIndex& ) ) 00200 Q_PRIVATE_SLOT( d, void slotSelectionChanged() ) 00201 Q_PRIVATE_SLOT( d, void slotAddChildCollection() ) 00202 Q_PRIVATE_SLOT( d, void slotCollectionCreationResult(KJob* job) ) 00203 //@endcond 00204 }; 00205 00206 } // namespace Akonadi 00207 00208 #endif // AKONADI_COLLECTIONDIALOG_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu May 10 2012 22:18:30 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:30 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.