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

korganizer

  • sources
  • kde-4.12
  • kdepim
  • korganizer
actionmanager.h
Go to the documentation of this file.
1 /*
2  This file is part of KOrganizer.
3 
4  Copyright (c) 2002 Mike Pilone <mpilone@slac.com>
5  Copyright (c) 2002 Don Sanders <sanders@kde.org>
6  Copyright (c) 2003,2004 Cornelius Schumacher <schumacher@kde.org>
7  Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
8  Copyright (c) 2005 Rafal Rzepecki <divide@users.sourceforge.net>
9 
10  This program is free software; you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation; either version 2 of the License, or
13  (at your option) any later version.
14 
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License along
21  with this program; if not, write to the Free Software Foundation, Inc.,
22  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 
24  As a special exception, permission is given to link this program
25  with any edition of Qt, and distribute the resulting executable,
26  without including the source code for Qt in the source distribution.
27 */
28 
29 #ifndef KORG_ACTIONMANAGER_H
30 #define KORG_ACTIONMANAGER_H
31 
32 #include "korganizer_export.h"
33 #include "korganizer/part.h"
34 
35 #include <Akonadi/Item>
36 #include <Akonadi/Calendar/ETMCalendar>
37 
38 #include <KUrl>
39 #include <KViewStateMaintainer>
40 
41 #include <QObject>
42 
43 class AkonadiCollectionView;
44 class CalendarView;
45 class KOWindowList;
46 namespace KOrg {
47  class HTMLExportSettings;
48 }
49 
50 namespace Akonadi {
51  class ETMViewStateSaver;
52 }
53 
54 class KAction;
55 class KMenuBar;
56 class KSelectAction;
57 class KTemporaryFile;
58 class KToggleAction;
59 
66 class KORGANIZERPRIVATE_EXPORT ActionManager : public QObject
67 {
68  Q_OBJECT
69  public:
70  ActionManager( KXMLGUIClient *client, CalendarView *widget,
71  QObject *parent, KOrg::MainWindow *mainWindow,
72  bool isPart, KMenuBar *menuBar = 0 );
73  virtual ~ActionManager();
74 
76  void init();
77 
78  CalendarView *view() const { return mCalendarView; }
79 
83  void createCalendarAkonadi();
84 
85  public slots:
86  bool importURL( const KUrl &url, bool merge);
87 
89  bool saveURL();
90 
92  bool saveAsURL( const KUrl &kurl );
93 
98  void exportHTML();
99 
106  void exportHTML( KOrg::HTMLExportSettings *settings, bool autoMode = false );
107  void toggleMenubar( bool dontShowWarning = false );
108 
109  public:
111  KUrl url() const { return mURL; }
112 
114  static KOrg::MainWindow *findInstance( const KUrl &url );
115 
117  bool openURL( const QString &url );
118 
120  bool mergeURL( const QString &url );
121 
123  bool saveAsURL( const QString &url );
124 
126  QString getCurrentURLasString() const;
127 
134  virtual bool deleteIncidence( Akonadi::Item::Id id, bool force = false );
135 
136  bool editIncidence( Akonadi::Item::Id id );
137 
142  bool addIncidence( const QString &ical );
143  //bool addIncidence( const Akonadi::Item::Id &ical );
144 
145  bool showIncidence( Akonadi::Item::Id id );
146 
152  bool showIncidenceContext( Akonadi::Item::Id id );
153 
159  bool handleCommandLine();
160 
161  public slots:
162  void openEventEditor( const QString &);
163  void openEventEditor( const QString &summary,
164  const QString &description,
165  const QStringList &attachments );
166  void openEventEditor( const QString &summary,
167  const QString &description,
168  const QStringList &attachments,
169  const QStringList &attendees );
170  void openEventEditor( const QString &summary,
171  const QString &description,
172  const QString &uri,
173  const QString &file,
174  const QStringList &attendees,
175  const QString &attachmentMimetype );
176  void openEventEditor( const QString &summary,
177  const QString &description,
178  const QStringList &attachmentUris,
179  const QStringList &attendees,
180  const QStringList &attachmentMimetypes,
181  bool attachmentIsInline );
182  void openTodoEditor( const QString &);
183  void openTodoEditor( const QString &summary,
184  const QString &description,
185  const QStringList &attachments );
186  void openTodoEditor( const QString &summary,
187  const QString &description,
188  const QStringList &attachments,
189  const QStringList &attendees );
190  void openTodoEditor( const QString &summary,
191  const QString &description,
192  const QString &uri,
193  const QString &file,
194  const QStringList &attendees,
195  const QString &attachmentMimetype );
196  void openTodoEditor( const QString &summary,
197  const QString &description,
198  const QStringList &attachmentUris,
199  const QStringList &attendees,
200  const QStringList &attachmentMimetypes,
201  bool attachmentIsInline );
202 
203  void openJournalEditor( const QDate &date );
204  void openJournalEditor( const QString &text, const QDate &date );
205  void openJournalEditor( const QString &text );
206 
207  void showJournalView();
208  void showTodoView();
209  void showEventView();
210 
211  void goDate( const QDate &);
212  void goDate( const QString &);
213  void showDate( const QDate &date );
214 
215  public:
216  QString localFileName();
217 
218  bool queryClose();
219 
220  signals:
224  //void actionNewMainWindow( const KUrl &url = KUrl() );
225  void toggleMenuBar();
231  void configChanged();
232 
233  public slots:
238  void updateConfig();
239 
240  void processIncidenceSelection( const Akonadi::Item &item, const QDate &date );
241  void keyBindings();
242 
247  void readSettings();
248 
252  void writeSettings();
253 
254  /* Session management */
255  void saveProperties( KConfigGroup & );
256  void readProperties( const KConfigGroup & );
257 
258  void loadParts();
259 
260  void importCalendar( const KUrl &url );
261 
262  protected slots:
263  void setItems( const QStringList &, int );
264 
266  void checkAutoExport();
267 
269  //void file_new();
270 
272  void file_open();
273 
278  void file_open( const KUrl &url );
279 
281  void file_icalimport();
282 
284  void file_import();
285 
287  void file_archive();
288 
290  void configureDateTime();
291 
293  void showTip();
294 
296  void showTipOnStart();
297 
298  void downloadNewStuff();
299 
300  void toggleDateNavigator();
301  void toggleTodoView();
302  void toggleEventViewer();
303  void toggleResourceView();
304 
306  void slotAutoArchivingSettingsModified();
307 
309  void slotAutoArchive();
310 
311  void setTitle();
312 
313  void updateUndoRedoActions();
314 
315  protected:
317  KUrl getSaveURL();
318 
322  QWidget *dialogParent();
323 
324  private slots:
325  void handleExportJobResult( KJob * );
326  void dumpText( const QString & ); // only for debugging purposes
327 
328  void slotDefaultResourceChanged( const Akonadi::Collection & );
329  void slotResourcesAddedRemoved();
330 
331  void slotNewEvent();
332  void slotNewTodo();
333  void slotNewSubTodo();
334  void slotNewJournal();
335 
336  void slotMergeFinished(bool success, int total);
337  void slotNewResourceFinished(bool);
338 
339 
340  private:
341  class ActionStringsVisitor;
342 
343  void restoreCollectionViewSetting();
345  void initActions();
346  void enableIncidenceActions( bool enable );
347  Akonadi::ETMCalendar::Ptr calendar() const;
348 
349  Akonadi::Collection selectedCollection() const;
350 
351  KOrg::Part::List mParts; // List of parts loaded
352  KUrl mURL; // URL of calendar file
353  QString mFile; // Local name of calendar file
354  QString mLastUrl; // URL of last loaded calendar.
355 
356  KTemporaryFile *mTempFile;
357  QTimer *mAutoExportTimer; // used if calendar is to be autoexported
358  QTimer *mAutoArchiveTimer; // used for the auto-archiving feature
359 
360  // list of all existing KOrganizer instances
361  static KOWindowList *mWindowList;
362 
363  KToggleAction *mDateNavigatorShowAction;
364  KToggleAction *mTodoViewShowAction;
365  KToggleAction *mCollectionViewShowAction;
366  KToggleAction *mEventViewerShowAction;
367 
368  KToggleAction *mHideMenuBarAction;
369 
370  KAction *mImportAction;
371 
372  KAction *mNewEventAction;
373  KAction *mNewTodoAction;
374  KAction *mNewSubtodoAction;
375  KAction *mNewJournalAction;
376  KAction *mConfigureViewAction;
377 
378  KAction *mShowIncidenceAction;
379  KAction *mEditIncidenceAction;
380  KAction *mDeleteIncidenceAction;
381 
382  KAction *mCutAction;
383  KAction *mCopyAction;
384  KAction *mDeleteAction;
385  KAction *mNextXDays;
386  KAction *mPublishEvent;
387  KAction *mForwardEvent;
388 
389  KAction *mSendInvitation;
390  KAction *mSendCancel;
391  KAction *mSendStatusUpdate;
392 
393  KAction *mRequestChange;
394  KAction *mRequestUpdate;
395 
396  KAction *mUndoAction;
397  KAction *mRedoAction;
398  KMenuBar *mMenuBar;
399 
400  KSelectAction *mFilterAction;
401 
402  KXMLGUIClient *mGUIClient;
403  KActionCollection *mACollection;
404  CalendarView *mCalendarView;
405  KOrg::MainWindow *mMainWindow;
406  bool mIsPart;
407  bool mHtmlExportSync;
408 
409  AkonadiCollectionView *mCollectionView;
410  KViewStateMaintainer<Akonadi::ETMViewStateSaver> *mCollectionViewStateSaver;
411  KViewStateMaintainer<Akonadi::ETMViewStateSaver> *mCollectionSelectionModelStateSaver;
412  QSet<KOrg::HTMLExportSettings*> mSettingsToFree;
413 };
414 
415 #endif
KOrg::HTMLExportSettings
Definition: htmlexportsettings.h:12
QWidget
KOWindowList
This class manages a list of KOrganizer instances, each associated with a window displaying a calenda...
Definition: kowindowlist.h:44
QObject
KOrg::Part::List
QList< Part * > List
Definition: part.h:47
CalendarView
This is the main calendar widget.
Definition: calendarview.h:99
ActionManager::view
CalendarView * view() const
Definition: actionmanager.h:78
KORGANIZERPRIVATE_EXPORT
#define KORGANIZERPRIVATE_EXPORT
Definition: korganizer_export.h:35
KOrg::MainWindow
interface for korganizer main window
Definition: mainwindow.h:44
korganizer_export.h
ActionManager
The ActionManager creates all the actions in KOrganizer.
Definition: actionmanager.h:66
AkonadiCollectionView
This class provides a view of calendar resources.
Definition: akonadicollectionview.h:67
ActionManager::url
KUrl url() const
Get current URL.
Definition: actionmanager.h:111
KJob
part.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:56:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

korganizer

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

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

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