• Skip to content
  • Skip to link menu
Brand

API Documentation

  1. KDE API Reference
  2. KDE PIM
  3. Akonadi Mime
  • KDE Home
  • Contact Us

Quick Links

Skip menu "Akonadi Mime"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • File List
  • Related Pages

Class Picker

About

Akonadi Mime library

Maintainer
Daniel Vrátil
Supported platforms
Linux
Community
IRC: #kontact on Freenode
Mailing list: kde-pim
Use with CMake
find_package(KF5AkonadiMime)
target_link_libraries(yourapp KF5::AkonadiMime)
Use with QMake
QT += AkonadiMime 
Clone
git clone git://anongit.kde.org/akonadi-mime.git
Browse source
Akonadi Mime on cgit.kde.org

Akonadi Mime

  • kde
  • pim
  • akonadi-mime
  • src
standardmailactionmanager.h
1 /*
2  This file is part of Akonadi Mail.
3 
4  Copyright (c) 2009 - 2010 Tobias Koenig <[email protected]>
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-mime_export.h"
26 
27 #include <standardactionmanager.h>
28 
29 #include <QObject>
30 
31 class QAction;
32 class KActionCollection;
33 class KJob;
34 class QItemSelectionModel;
35 class QWidget;
36 
37 namespace Akonadi {
38 class Item;
39 
46 class AKONADI_MIME_EXPORT StandardMailActionManager : public QObject
47 {
48  Q_OBJECT
49 
50 public:
54  enum Type {
55  MarkMailAsRead = StandardActionManager::LastType + 1,
56  MarkMailAsUnread,
57  MarkMailAsImportant,
58  MarkMailAsActionItem,
59  MarkAllMailAsRead,
60  MarkAllMailAsReadRecursive,
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 = nullptr);
79 
83  ~StandardMailActionManager();
84 
92  void setCollectionSelectionModel(QItemSelectionModel *selectionModel);
93 
100  void setItemSelectionModel(QItemSelectionModel *selectionModel);
101 
109  QAction *createAction(Type type);
110 
117  QAction *createAction(StandardActionManager::Type type);
118 
123  void createAllActions();
124 
129  QAction *action(Type type) const;
130 
135  QAction *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  Q_REQUIRED_RESULT Akonadi::Collection::List selectedCollections() const;
178 
183  Q_REQUIRED_RESULT 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  //@endcond
219 };
220 }
221 
222 #endif
Akonadi::StandardActionManager::Type
Type
Akonadi::StandardMailActionManager::MarkMailAsActionItem
Marks a mail as action item.
Definition: standardmailactionmanager.h:58
QWidget
KActionCollection
Akonadi::StandardMailActionManager::MarkMailAsImportant
Marks a mail as important.
Definition: standardmailactionmanager.h:57
Akonadi::StandardActionManager
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:54
QObject
QStringList
Akonadi::StandardMailActionManager::EmptyTrash
Empties the trash folder, if a trash folder was selected.
Definition: standardmailactionmanager.h:68
Akonadi::StandardActionManager::LastType
LastType
Akonadi::StandardMailActionManager::MarkAllMailAsReadRecursive
Marks all mails in a folder and its subfolders as read.
Definition: standardmailactionmanager.h:60
Akonadi::StandardMailActionManager::MarkAllMailAsImportant
Marks all mails in a folder as important.
Definition: standardmailactionmanager.h:62
QVector
Akonadi::StandardMailActionManager
Manages emails specific actions for collection and item views.
Definition: standardmailactionmanager.h:46
Akonadi
Akonadi::StandardMailActionManager::MarkAllMailAsActionItem
Marks all mails in a folder as action item.
Definition: standardmailactionmanager.h:63
QAction
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:59
KJob
KLocalizedString
Akonadi::StandardMailActionManager::MarkMailAsUnread
Marks a mail as unread.
Definition: standardmailactionmanager.h:56
Akonadi::FavoriteCollectionsModel
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Fri Dec 13 2019 02:48:33 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

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