• Skip to content
  • Skip to link menu
KDE 4.7 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

akonadi

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   Q_SIGNALS:
00196     void actionStateUpdated();
00197 
00198   private:
00199     //@cond PRIVATE
00200     class Private;
00201     Private* const d;
00202 
00203     Q_PRIVATE_SLOT( d, void updateActions() )
00204     Q_PRIVATE_SLOT( d, void slotMarkAs() )
00205     Q_PRIVATE_SLOT( d, void slotMarkAllAs() )
00206     Q_PRIVATE_SLOT( d, void slotMoveToTrash() )
00207     Q_PRIVATE_SLOT( d, void slotMoveAllToTrash() )
00208     Q_PRIVATE_SLOT( d, void slotRemoveDuplicates() )
00209     Q_PRIVATE_SLOT( d, void slotEmptyAllTrash() )
00210     Q_PRIVATE_SLOT( d, void slotEmptyTrash() )
00211     //@endcond
00212 };
00213 
00214 }
00215 
00216 #endif

akonadi

Skip menu "akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Modules
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.5
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal