akonadi/kmime
standardmailactionmanager.h
00001 /* 00002 This file is part of Akonadi Mail. 00003 00004 Copyright (c) 2009 - 2010 Tobias Koenig <tokoe@kde.org> 00005 00006 This library is free software; you can redistribute it and/or modify it 00007 under the terms of the GNU Library General Public License as published by 00008 the Free Software Foundation; either version 2 of the License, or (at your 00009 option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, but WITHOUT 00012 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00013 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public 00014 License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to the 00018 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00019 02110-1301, USA. 00020 */ 00021 00022 #ifndef AKONADI_STANDARDMAILACTIONMANAGER_H 00023 #define AKONADI_STANDARDMAILACTIONMANAGER_H 00024 00025 #include "akonadi-kmime_export.h" 00026 00027 #include <akonadi/standardactionmanager.h> 00028 00029 #include <QtCore/QObject> 00030 00031 class KAction; 00032 class KActionCollection; 00033 class KJob; 00034 class QItemSelectionModel; 00035 class QWidget; 00036 00037 namespace Akonadi { 00038 00039 class Item; 00040 00047 class AKONADI_KMIME_EXPORT StandardMailActionManager : public QObject 00048 { 00049 Q_OBJECT 00050 00051 public: 00055 enum Type { 00056 MarkMailAsRead = StandardActionManager::LastType + 1, 00057 MarkMailAsUnread, 00058 MarkMailAsImportant, 00059 MarkMailAsActionItem, 00060 MarkAllMailAsRead, 00061 MarkAllMailAsUnread, 00062 MarkAllMailAsImportant, 00063 MarkAllMailAsActionItem, 00064 MoveToTrash, 00065 MoveAllToTrash, 00066 RemoveDuplicates, 00067 EmptyAllTrash, 00068 EmptyTrash, 00069 LastType 00070 }; 00071 00078 explicit StandardMailActionManager( KActionCollection *actionCollection, QWidget *parent = 0 ); 00079 00083 ~StandardMailActionManager(); 00084 00090 void setCollectionSelectionModel( QItemSelectionModel *selectionModel ); 00091 00096 void setItemSelectionModel( QItemSelectionModel* selectionModel ); 00097 00103 KAction* createAction( Type type ); 00104 00110 KAction* createAction( StandardActionManager::Type type ); 00111 00116 void createAllActions(); 00117 00121 KAction* action( Type type ) const; 00122 00126 KAction* action( StandardActionManager::Type type ) const; 00127 00140 void setActionText( StandardActionManager::Type type, const KLocalizedString &text ); 00141 00149 void interceptAction( Type type, bool intercept = true ); 00150 00158 void interceptAction( StandardActionManager::Type type, bool intercept = true ); 00159 00164 Akonadi::Collection::List selectedCollections() const; 00165 00170 Akonadi::Item::List selectedItems() const; 00171 00178 void setFavoriteCollectionsModel( FavoriteCollectionsModel *favoritesModel ); 00179 00186 void setFavoriteSelectionModel( QItemSelectionModel *selectionModel ); 00187 00188 void setCollectionPropertiesPageNames( const QStringList &names ); 00189 00190 Akonadi::StandardActionManager* standardActionManager() const; 00191 Q_SIGNALS: 00197 void actionStateUpdated(); 00198 00199 private: 00200 //@cond PRIVATE 00201 class Private; 00202 Private* const d; 00203 00204 Q_PRIVATE_SLOT( d, void updateActions() ) 00205 Q_PRIVATE_SLOT( d, void slotMarkAs() ) 00206 Q_PRIVATE_SLOT( d, void slotMarkAllAs() ) 00207 Q_PRIVATE_SLOT( d, void slotMoveToTrash() ) 00208 Q_PRIVATE_SLOT( d, void slotMoveAllToTrash() ) 00209 Q_PRIVATE_SLOT( d, void slotRemoveDuplicates() ) 00210 Q_PRIVATE_SLOT( d, void slotEmptyAllTrash() ) 00211 Q_PRIVATE_SLOT( d, void slotEmptyTrash() ) 00212 //@endcond 00213 }; 00214 00215 } 00216 00217 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon May 14 2012 05:04:42 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon May 14 2012 05:04:42 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.