Akonadi Contacts

standardcontactactionmanager.h
1 /*
2  This file is part of Akonadi Contact.
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_STANDARDCONTACTACTIONMANAGER_H
23 #define AKONADI_STANDARDCONTACTACTIONMANAGER_H
24 
25 #include "akonadi-contact_export.h"
26 
27 #include <standardactionmanager.h>
28 
29 #include <QObject>
30 
31 class QAction;
32 class KActionCollection;
34 class QWidget;
35 
36 namespace Akonadi {
37 class Item;
38 
45 class AKONADI_CONTACT_EXPORT StandardContactActionManager : public QObject
46 {
47  Q_OBJECT
48 
49 public:
53  enum Type {
54  CreateContact = StandardActionManager::LastType + 1,
57  LastType
58  };
59 
66  explicit StandardContactActionManager(KActionCollection *actionCollection, QWidget *parent = nullptr);
67 
72 
79  void setCollectionSelectionModel(QItemSelectionModel *selectionModel);
80 
86  void setItemSelectionModel(QItemSelectionModel *selectionModel);
87 
94  Q_REQUIRED_RESULT QAction *createAction(Type type);
95 
102  QAction *createAction(StandardActionManager::Type type);
103 
108  void createAllActions();
109 
113  QAction *action(Type type) const;
114 
119  QAction *action(StandardActionManager::Type type) const;
120 
133  void setActionText(StandardActionManager::Type type, const KLocalizedString &text);
134 
142  void interceptAction(Type type, bool intercept = true);
143 
151  void interceptAction(StandardActionManager::Type type, bool intercept = true);
152 
157  Q_REQUIRED_RESULT Akonadi::Collection::List selectedCollections() const;
158 
163  Q_REQUIRED_RESULT Akonadi::Item::List selectedItems() const;
164 
169  void setCollectionPropertiesPageNames(const QStringList &names);
170 
171 Q_SIGNALS:
177  void actionStateUpdated();
178 
179 private:
180  //@cond PRIVATE
181  class Private;
182  Private *const d;
183  //@endcond
184 };
185 }
186 
187 #endif
Edits the selected contact resp. contact group.
Manages contact specific actions for collection and item views.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Jul 4 2020 23:08:30 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.