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

akonadi

  • akonadi
  • calendar
standardcalendaractionmanager.h
1 /*
2  * Copyright (C) 2010 Casey Link <unnamedrambler@gmail.com>
3  * Copyright (C) 2010 Klaralvdalens Datakonsult AB, a KDAB Group company <info@kdab.net>
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_STANDARDCALENDARACTIONMANAGER_H
23 #define AKONADI_STANDARDCALENDARACTIONMANAGER_H
24 
25 #include "akonadi-calendar_export.h"
26 
27 #include <akonadi/standardactionmanager.h>
28 
29 #include <QtCore/QObject>
30 
31 //needed for windows ce, its defined somewhere
32 #undef CreateEvent
33 
34 class KAction;
35 class KActionCollection;
36 class QItemSelectionModel;
37 class QWidget;
38 
39 namespace Akonadi
40 {
41 
42 class Item;
49 class AKONADI_CALENDAR_EXPORT StandardCalendarActionManager : public QObject
50 {
51  Q_OBJECT
52 public:
56  enum Type {
57  CreateEvent = StandardActionManager::LastType + 1,
58  CreateTodo,
59  CreateSubTodo,
60  CreateJournal,
61  EditIncidence,
62  LastType
63  };
64 
71  explicit StandardCalendarActionManager( KActionCollection *actionCollection, QWidget *parent = 0 );
72 
76  ~StandardCalendarActionManager();
77 
84  void setCollectionSelectionModel( QItemSelectionModel *selectionModel );
85 
91  void setItemSelectionModel( QItemSelectionModel *selectionModel );
92 
99  KAction* createAction( Type type );
100 
107  KAction* createAction( StandardActionManager::Type type );
108 
113  void createAllActions();
114 
118  KAction* action( Type type ) const;
119 
124  KAction* action( StandardActionManager::Type type ) const;
125 
138  void setActionText( StandardActionManager::Type type, const KLocalizedString &text );
139 
147  void interceptAction( Type type, bool intercept = true );
148 
156  void interceptAction( StandardActionManager::Type type, bool intercept = true );
157 
162  Akonadi::Collection::List selectedCollections() const;
163 
168  Akonadi::Item::List selectedItems() const;
169 
173  void setContextText( StandardActionManager::Type type, StandardActionManager::TextContext context, const QString &text );
174 
178  void setContextText( StandardActionManager::Type type, StandardActionManager::TextContext context, const KLocalizedString &text );
179 
180  void setCollectionPropertiesPageNames( const QStringList &names );
181 
182 Q_SIGNALS:
188  void actionStateUpdated();
189 
190 private:
191  //@cond PRIVATE
192  class Private;
193  Private* const d;
194 
195  Q_PRIVATE_SLOT( d, void slotCreateEvent() )
196  Q_PRIVATE_SLOT( d, void slotCreateTodo() )
197  Q_PRIVATE_SLOT( d, void slotCreateSubTodo() )
198  Q_PRIVATE_SLOT( d, void slotCreateJournal() )
199  Q_PRIVATE_SLOT( d, void slotEditIncidence() )
200  Q_PRIVATE_SLOT( d, void updateActions() )
201  //@endcond
202 };
203 
204 }
205 
206 #endif
Akonadi::StandardActionManager::Type
Type
Describes the supported actions.
Definition: standardactionmanager.h:133
Akonadi::StandardActionManager::TextContext
TextContext
Describes the text context that can be customized.
Definition: standardactionmanager.h:177
Akonadi::StandardCalendarActionManager::CreateSubTodo
Creates a new sub-todo.
Definition: standardcalendaractionmanager.h:59
Akonadi::StandardCalendarActionManager
Manages calendar specific actions for collection and item views.
Definition: standardcalendaractionmanager.h:49
Akonadi::StandardCalendarActionManager::CreateJournal
Creates a new journal.
Definition: standardcalendaractionmanager.h:60
Akonadi::StandardCalendarActionManager::CreateTodo
Creates a new todo.
Definition: standardcalendaractionmanager.h:58
Akonadi::StandardActionManager::LastType
Marks last action.
Definition: standardactionmanager.h:171
Akonadi::StandardCalendarActionManager::EditIncidence
Edit currently selected event/todo/journal.
Definition: standardcalendaractionmanager.h:61
Akonadi::StandardCalendarActionManager::Type
Type
Describes the supported actions.
Definition: standardcalendaractionmanager.h:56
Akonadi::Collection::List
QList< Collection > List
Describes a list of collections.
Definition: collection.h:81
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Nov 26 2013 09:03:19 by doxygen 1.8.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

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

kdepimlibs-4.11.3 API Reference

Skip menu "kdepimlibs-4.11.3 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
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