korganizer Library API Documentation

ActionManager Class Reference

The ActionManager creates all the actions in KOrganizer. More...

#include <actionmanager.h>

Inheritance diagram for ActionManager:

QObject List of all members.

Public Slots

void updateConfig ()
void setDestinationPolicy ()
void processIncidenceSelection (Incidence *)
void keyBindings ()
void readSettings ()
void writeSettings ()
void saveProperties (KConfig *)
void readProperties (KConfig *)
void loadParts ()
void importResource (const QString &url)

Signals

void actionNew (const KURL &url=KURL())
void actionKeyBindings ()
void configChanged ()
void closingDown ()
void filterActivated (int)

Public Methods

 ActionManager (KXMLGUIClient *client, CalendarView *widget, QObject *parent, KOrg::MainWindow *mainWindow, bool isPart)
virtual ~ActionManager ()
void init ()
CalendarViewview () const
void createCalendarLocal ()
void createCalendarResources ()
void saveCalendar ()
bool saveResourceCalendar ()
bool openURL (const KURL &url, bool merge=false)
bool mergeURL (const KURL &url)
bool saveURL ()
bool saveAsURL (const KURL &kurl)
bool saveModifiedURL ()
KURL url () const
bool openURL (QString url)
bool mergeURL (QString url)
bool saveAsURL (QString url)
void closeURL ()
QString getCurrentURLasString () const
virtual bool deleteEvent (QString uid)
bool eventRequest (QString request, QCString receiver, QString ical)
bool eventReply (QString ical)
virtual ResourceRequestReply resourceRequest (const QValueList< QPair< QDateTime, QDateTime > > &busy, const QCString &resource, const QString &vCalIn)
void openEventEditor (QString)
void openEventEditor (QString summary, QString description, QString attachment)
void openTodoEditor (QString)
void openTodoEditor (QString summary, QString description, QString attachment)
void showTodoView ()
void showEventView ()
QString localFileName ()
bool queryClose ()

Static Public Methods

KOrg::MainWindowfindInstance (const KURL &url)

Protected Slots

void file_new ()
void file_open ()
void file_openRecent (const KURL &url)
void file_import ()
void file_merge ()
void file_revert ()
void file_archive ()
void file_save ()
void file_saveas ()
void file_close ()
void configureDateTime ()
void showTip ()
void showTipOnStart ()
void downloadNewStuff ()
void uploadNewStuff ()
void toggleFilterView ()
void checkAutoSave ()
void configureDateTimeFinished (KProcess *)
void setTitle ()
void updateUndoAction (const QString &)
void updateRedoAction (const QString &)

Protected Methods

KURL getSaveURL ()
void initCalendar (Calendar *cal)

Detailed Description

The ActionManager creates all the actions in KOrganizer.

This class is shared between the main application and the part so all common actions are in one location. It also provides DCOP interface[s].

Definition at line 65 of file actionmanager.h.


Member Function Documentation

void ActionManager::init  
 

Peform initialization that requires this* to be full constructed.

void ActionManager::createCalendarLocal  
 

Create Calendar object based on local file and set it on the view.

Definition at line 145 of file actionmanager.cpp.

References CalendarView::readSettings(), and CalendarView::setCalendar().

void ActionManager::createCalendarResources  
 

Create Calendar object based on the resource framework and set it on the view.

Definition at line 154 of file actionmanager.cpp.

References CalendarView::addExtension(), configChanged(), QObject::connect(), CalendarView::readSettings(), CalendarView::setCalendar(), and updateConfig().

void ActionManager::saveCalendar  
 

Save calendar to disk.

Definition at line 1341 of file actionmanager.cpp.

References CalendarView::isModified(), saveAsURL(), saveURL(), and url().

Referenced by checkAutoSave().

bool ActionManager::saveResourceCalendar  
 

Save the resource based calendar.

Return false if an error occured and the user decidec to not ignore the error. Otherwise it returns true.

Definition at line 1358 of file actionmanager.cpp.

bool ActionManager::openURL const KURL &    url,
bool    merge = false
 

Open calendar file from URL.

Merge into current calendar, if merge is true.

Definition at line 734 of file actionmanager.cpp.

References QString::arg(), CalendarView::openCalendar(), KOrg::MainWindow::showStatusMessage(), QWidget::topLevelWidget(), and url().

Referenced by file_merge(), file_open(), file_openRecent(), file_revert(), mergeURL(), KOrganizer::openURL(), and openURL().

bool ActionManager::mergeURL const KURL &    url
 

Merge calendar file from URL to current calendar.

Referenced by KOrganizer::mergeURL().

bool ActionManager::saveURL  
 

Save calendar file to URL of current calendar.

Definition at line 784 of file actionmanager.cpp.

References QDate::addDays(), QDate::addMonths(), CalendarView::calendar(), QDate::currentDate(), QString::length(), QString::replace(), QString::right(), CalendarView::saveCalendar(), CalendarView::setModified(), KOrg::MainWindow::showStatusMessage(), QTimer::start(), QTimer::stop(), and QWidget::topLevelWidget().

Referenced by file_save(), saveAsURL(), saveCalendar(), saveModifiedURL(), and KOrganizer::saveURL().

bool ActionManager::saveAsURL const KURL &    kurl
 

Save calendar file to URL.

Definition at line 897 of file actionmanager.cpp.

References saveURL(), and url().

Referenced by file_saveas(), KOrganizer::saveAsURL(), saveAsURL(), saveCalendar(), and saveModifiedURL().

bool ActionManager::saveModifiedURL  
 

Save calendar if it is modified by the user.

Ask user what to do.

Definition at line 942 of file actionmanager.cpp.

References getSaveURL(), CalendarView::isModified(), saveAsURL(), saveURL(), QWidget::topLevelWidget(), and url().

Referenced by file_close().

KURL ActionManager::url   const [inline]
 

Get current URL.

Definition at line 114 of file actionmanager.h.

Referenced by checkAutoSave(), file_merge(), file_open(), file_openRecent(), file_saveas(), findInstance(), KOrganizer::getCurrentURL(), getSaveURL(), openURL(), saveAsURL(), saveCalendar(), saveModifiedURL(), and KOrganizer::setTitle().

KOrg::MainWindow * ActionManager::findInstance const KURL &    url [static]
 

Is there a instance with this URL?

Definition at line 1103 of file actionmanager.cpp.

References KOWindowList::defaultInstance(), KOWindowList::findInstance(), and url().

Referenced by file_open(), and file_openRecent().

bool ActionManager::openURL QString    url
 

Open calendar file from URL.

Definition at line 1124 of file actionmanager.cpp.

References openURL().

bool ActionManager::mergeURL QString    url
 

Open calendar file from URL.

Definition at line 1129 of file actionmanager.cpp.

References openURL().

bool ActionManager::saveAsURL QString    url
 

Save calendar file to URL.

Definition at line 1134 of file actionmanager.cpp.

References saveAsURL().

void ActionManager::closeURL  
 

Close calendar file opened from URL.

Definition at line 777 of file actionmanager.cpp.

References file_close().

Referenced by KOrganizer::closeURL().

QString ActionManager::getCurrentURLasString   const
 

Get current URL as QString.

Definition at line 1139 of file actionmanager.cpp.

Referenced by KOrganizer::getCurrentURLasString().

bool ActionManager::deleteEvent QString    uid [virtual]
 

Delete event with the given unique id from current calendar.

Definition at line 1144 of file actionmanager.cpp.

References CalendarView::deleteEvent().

Referenced by KOrganizer::deleteEvent().

bool ActionManager::eventRequest QString    request,
QCString    receiver,
QString    ical
 

Handle incoming event scheduling.

Definition at line 1149 of file actionmanager.cpp.

bool ActionManager::eventReply QString    ical
 

Handle event replies.

Definition at line 1157 of file actionmanager.cpp.

void ActionManager::actionNew const KURL &    url = KURL() [signal]
 

Emitted when the "New" action is activated.

Referenced by file_new(), and file_open().

void ActionManager::actionKeyBindings   [signal]
 

Emitted when the "Configure Key Bindings" action is activated.

void ActionManager::configChanged   [signal]
 

When change is made to options dialog, the topwidget will catch this and emit this signal which notifies all widgets which have registered for notification to update their settings.

Referenced by createCalendarResources().

void ActionManager::closingDown   [signal]
 

Emitted when the topwidget is closing down, so that any attached child windows can also close.

void ActionManager::filterActivated int    [signal]
 

Announce filter selection changes.

void ActionManager::updateConfig   [slot]
 

Options dialog made a changed to the configuration.

we catch this and notify all widgets which need to update their configuration.

Definition at line 1047 of file actionmanager.cpp.

References checkAutoSave(), QTimer::isActive(), QTimer::start(), and QTimer::stop().

Referenced by createCalendarResources().

void ActionManager::readSettings   [slot]
 

Using the KConfig associated with the kapp variable, read in the settings from the config file.

Definition at line 562 of file actionmanager.cpp.

References CalendarView::readSettings().

Referenced by KOrganizer::readSettings().

void ActionManager::writeSettings   [slot]
 

Write current state to config file.

Definition at line 572 of file actionmanager.cpp.

References CalendarView::writeSettings().

Referenced by KOrganizer::writeSettings().

void ActionManager::file_new   [protected, slot]
 

open new window.

Definition at line 583 of file actionmanager.cpp.

References actionNew().

void ActionManager::file_open   [protected, slot]
 

open a file, load it into the calendar.

Definition at line 588 of file actionmanager.cpp.

References actionNew(), findInstance(), QString::isEmpty(), CalendarView::isModified(), openURL(), KOrg::MainWindow::topLevelWidget(), QWidget::topLevelWidget(), url(), and QWidget::winId().

void ActionManager::file_openRecent const KURL &    url [protected, slot]
 

open a file from the list of recent files.

Definition at line 613 of file actionmanager.cpp.

References findInstance(), openURL(), KOrg::MainWindow::topLevelWidget(), url(), and QWidget::winId().

void ActionManager::file_import   [protected, slot]
 

import a calendar from another program like ical.

Definition at line 625 of file actionmanager.cpp.

References QFile::exists(), QString::fromLatin1(), QDir::homeDirPath(), CalendarView::openCalendar(), and QWidget::topLevelWidget().

void ActionManager::file_merge   [protected, slot]
 

open a calendar and add the contents to the current calendar.

Definition at line 682 of file actionmanager.cpp.

References openURL(), QWidget::topLevelWidget(), and url().

void ActionManager::file_revert   [protected, slot]
 

revert to saved.

Definition at line 695 of file actionmanager.cpp.

References openURL().

void ActionManager::file_archive   [protected, slot]
 

delete or archive old entries in your calendar for speed/space.

Definition at line 690 of file actionmanager.cpp.

References CalendarView::archiveCalendar().

void ActionManager::file_save   [protected, slot]
 

save a file with the current fileName.

Definition at line 709 of file actionmanager.cpp.

References CalendarView::calendar(), file_saveas(), KOrg::MainWindow::hasDocument(), and saveURL().

void ActionManager::file_saveas   [protected, slot]
 

save a file under a (possibly) different filename.

Definition at line 700 of file actionmanager.cpp.

References getSaveURL(), saveAsURL(), and url().

Referenced by file_save().

void ActionManager::file_close   [protected, slot]
 

close a file, prompt for save if changes made.

Definition at line 722 of file actionmanager.cpp.

References CalendarView::closeCalendar(), and saveModifiedURL().

Referenced by closeURL().

void ActionManager::configureDateTime   [protected, slot]
 

Open kcontrol module for configuring date and time formats.

Definition at line 1078 of file actionmanager.cpp.

References QObject::connect(), and QWidget::topLevelWidget().

void ActionManager::showTip   [protected, slot]
 

Show tip of the day.

Definition at line 1093 of file actionmanager.cpp.

References QWidget::topLevelWidget().

void ActionManager::showTipOnStart   [protected, slot]
 

Show tip of the day.

Definition at line 1098 of file actionmanager.cpp.

References QWidget::topLevelWidget().

void ActionManager::checkAutoSave   [protected, slot]
 

called by the autoSaveTimer to automatically save the calendar.

Definition at line 1030 of file actionmanager.cpp.

References saveCalendar(), and url().

Referenced by updateConfig().

KURL ActionManager::getSaveURL   [protected]
 

Get URL for saving.

Opens FileDialog.

Definition at line 980 of file actionmanager.cpp.

References QString::right(), QWidget::topLevelWidget(), and url().

Referenced by file_saveas(), and saveModifiedURL().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for korganizer Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:38:31 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003