• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

akonadi/kmime

  • sources
  • kde-4.14
  • kdepimlibs
  • akonadi
  • kmime
standardmailactionmanager.h
1 /*
2  This file is part of Akonadi Mail.
3 
4  Copyright (c) 2009 - 2010 Tobias Koenig <tokoe@kde.org>
5 
6  This library is free software; you can redistribute it and/or modify it
7  under the terms of the GNU Library General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or (at your
9  option) any later version.
10 
11  This library is distributed in the hope that it will be useful, but WITHOUT
12  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
14  License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to the
18  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  02110-1301, USA.
20 */
21 
22 #ifndef AKONADI_STANDARDMAILACTIONMANAGER_H
23 #define AKONADI_STANDARDMAILACTIONMANAGER_H
24 
25 #include "akonadi-kmime_export.h"
26 
27 #include <akonadi/standardactionmanager.h>
28 
29 #include <QtCore/QObject>
30 
31 class KAction;
32 class KActionCollection;
33 class KJob;
34 class QItemSelectionModel;
35 class QWidget;
36 
37 namespace Akonadi {
38 
39 class Item;
40 
47 class AKONADI_KMIME_EXPORT StandardMailActionManager : public QObject
48 {
49  Q_OBJECT
50 
51 public:
55  enum Type {
56  MarkMailAsRead = StandardActionManager::LastType + 1,
57  MarkMailAsUnread,
58  MarkMailAsImportant,
59  MarkMailAsActionItem,
60  MarkAllMailAsRead,
61  MarkAllMailAsUnread,
62  MarkAllMailAsImportant,
63  MarkAllMailAsActionItem,
64  MoveToTrash,
65  MoveAllToTrash,
66  RemoveDuplicates,
67  EmptyAllTrash,
68  EmptyTrash,
69  LastType
70  };
71 
78  explicit StandardMailActionManager(KActionCollection *actionCollection, QWidget *parent = 0);
79 
83  ~StandardMailActionManager();
84 
92  void setCollectionSelectionModel(QItemSelectionModel *selectionModel);
93 
100  void setItemSelectionModel(QItemSelectionModel *selectionModel);
101 
109  KAction *createAction(Type type);
110 
117  KAction *createAction(StandardActionManager::Type type);
118 
123  void createAllActions();
124 
129  KAction *action(Type type) const;
130 
135  KAction *action(StandardActionManager::Type type) const;
136 
152  void setActionText(StandardActionManager::Type type, const KLocalizedString &text);
153 
161  void interceptAction(Type type, bool intercept = true);
162 
171  void interceptAction(StandardActionManager::Type type, bool intercept = true);
172 
177  Akonadi::Collection::List selectedCollections() const;
178 
183  Akonadi::Item::List selectedItems() const;
184 
192  void setFavoriteCollectionsModel(FavoriteCollectionsModel *favoritesModel);
193 
201  void setFavoriteSelectionModel(QItemSelectionModel *selectionModel);
202 
203  void setCollectionPropertiesPageNames(const QStringList &names);
204 
205  Akonadi::StandardActionManager *standardActionManager() const;
206 Q_SIGNALS:
212  void actionStateUpdated();
213 
214 private:
215  //@cond PRIVATE
216  class Private;
217  Private *const d;
218 
219  Q_PRIVATE_SLOT(d, void updateActions())
220  Q_PRIVATE_SLOT(d, void slotMarkAs())
221  Q_PRIVATE_SLOT(d, void slotMarkAllAs())
222  Q_PRIVATE_SLOT(d, void slotMoveToTrash())
223  Q_PRIVATE_SLOT(d, void slotMoveAllToTrash())
224  Q_PRIVATE_SLOT(d, void slotRemoveDuplicates())
225  Q_PRIVATE_SLOT(d, void slotEmptyAllTrash())
226  Q_PRIVATE_SLOT(d, void slotEmptyTrash())
227  Q_PRIVATE_SLOT(d, void slotJobFinished(KJob *))
228  //@endcond
229 };
230 
231 }
232 
233 #endif
Akonadi::StandardMailActionManager::MarkMailAsActionItem
Marks a mail as action item.
Definition: standardmailactionmanager.h:59
QWidget
Akonadi::StandardMailActionManager::MarkMailAsImportant
Marks a mail as important.
Definition: standardmailactionmanager.h:58
Akonadi::StandardMailActionManager::MarkAllMailAsUnread
Marks all mails in a folder as unread.
Definition: standardmailactionmanager.h:61
Akonadi::StandardMailActionManager::MoveToTrash
Move all selected messages and folders to trash.
Definition: standardmailactionmanager.h:64
Akonadi::StandardMailActionManager::Type
Type
Describes the supported actions.
Definition: standardmailactionmanager.h:55
QObject
QStringList
Akonadi::StandardMailActionManager::EmptyTrash
Empties the trash folder, if a trash folder was selected.
Definition: standardmailactionmanager.h:68
Akonadi::StandardMailActionManager::MarkAllMailAsImportant
Marks all mails in a folder as important.
Definition: standardmailactionmanager.h:62
Akonadi::StandardMailActionManager
Manages emails specific actions for collection and item views.
Definition: standardmailactionmanager.h:47
Akonadi::StandardMailActionManager::MarkAllMailAsActionItem
Marks all mails in a folder as action item.
Definition: standardmailactionmanager.h:63
Akonadi::StandardMailActionManager::EmptyAllTrash
Empties trash folders on all accounts.
Definition: standardmailactionmanager.h:67
Akonadi::StandardMailActionManager::RemoveDuplicates
Removes all duplicated messages.
Definition: standardmailactionmanager.h:66
Akonadi::StandardMailActionManager::MoveAllToTrash
Move all messages of the current folder to trash.
Definition: standardmailactionmanager.h:65
QItemSelectionModel
Akonadi::StandardMailActionManager::MarkAllMailAsRead
Marks all mails in a folder as read.
Definition: standardmailactionmanager.h:60
Akonadi::StandardMailActionManager::MarkMailAsUnread
Marks a mail as unread.
Definition: standardmailactionmanager.h:57
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:24 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi/kmime

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

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal