korganizer Library API Documentation

CalendarView Class Reference

This is the main calendar widget. main calendar view widget. More...

#include <calendarview.h>

Inheritance diagram for CalendarView:

Inheritance graph
[legend]
Collaboration diagram for CalendarView:

Collaboration graph
[legend]
List of all members.

Public Slots

void updateConfig ()
void updateCategories ()
bool openCalendar (const QString &filename, bool merge=false)
bool saveCalendar (const QString &filename)
void closeCalendar ()
void archiveCalendar ()
void showIncidence ()
void editIncidence ()
bool editIncidence (const QString &uid)
void deleteIncidence ()
void newEvent (QDateTime, QDateTime, bool allDay=false)
void newEvent (QDateTime fh)
void newEvent (QDate dt)
void newEvent ()
void newEvent (const QString &)
void newEvent (const QString &summary, const QString &description, const QString &attachment)
void newEvent (const QString &summary, const QString &description, const QString &attachment, const QStringList &attendees)
void newFloatingEvent ()
void showIncidence (Incidence *)
bool editIncidence (Incidence *)
void deleteIncidence (Incidence *)
void editJournal (Journal *)
void deleteJournal (Journal *)
void showJournal (Journal *)
void editEvent (Event *)
void deleteEvent (Event *)
bool deleteEvent (const QString &uid)
void showEvent (Event *)
void editTodo (Todo *)
void showTodo (Todo *)
void newTodo ()
void newTodo (QDate date)
void newSubTodo ()
void newSubTodo (Todo *)
void deleteTodo (Todo *)
void recurTodo (Todo *)
void newTodo (const QString &)
void newTodo (const QString &summary, const QString &description, const QString &attachment)
void newTodo (const QString &summary, const QString &description, const QString &attachment, const QStringList &attendees)
void toggleAlarm (Incidence *)
void checkClipboard ()
void readSettings ()
void writeSettings ()
void readFilterSettings (KConfig *config)
void writeFilterSettings (KConfig *config)
void changeIncidenceDisplay (Incidence *, int)
void incidenceAdded (Incidence *)
void incidenceChanged (Incidence *oldEvent, Incidence *newEvent)
void incidenceChanged (Incidence *oldEvent, Incidence *newEvent, int what)
void incidenceToBeDeleted (Incidence *incidence)
void incidenceDeleted (Incidence *)
void startMultiModify (const QString &text)
void endMultiModify ()
void editCanceled (Incidence *)
void updateView (const QDate &start, const QDate &end)
void updateView ()
void updateUnmanagedViews ()
void edit_cut ()
void edit_copy ()
void edit_paste ()
void edit_options ()
void print ()
void printSetup ()
void printPreview ()
void exportICalendar ()
void exportVCalendar ()
void appointment_show ()
void appointment_edit ()
void appointment_delete ()
void action_mail ()
void todo_unsub ()
void takeOverEvent ()
void takeOverCalendar ()
bool isModified ()
void setModified (bool modified=true)
bool isReadOnly ()
void setReadOnly (bool readOnly=true)
void eventUpdated (Incidence *)
void schedule_publish (Incidence *incidence=0)
void schedule_request (Incidence *incidence=0)
void schedule_refresh (Incidence *incidence=0)
void schedule_cancel (Incidence *incidence=0)
void schedule_add (Incidence *incidence=0)
void schedule_reply (Incidence *incidence=0)
void schedule_counter (Incidence *incidence=0)
void schedule_declinecounter (Incidence *incidence=0)
void mailFreeBusy (int daysToPublish=30)
void uploadFreeBusy ()
void openAddressbook ()
void editFilters ()
void showFilter (bool visible)
void updateFilter ()
void filterEdited ()
void showIntro ()
void goDate (const QDate &date)
void goToday ()
void goNext ()
void goPrevious ()
void toggleExpand ()
void showLeftFrame (bool show=true)
void dialogClosing (Incidence *)
void lookForIncomingMessages ()
void lookForOutgoingMessages ()
void processMainViewSelection (Incidence *)
void processTodoListSelection (Incidence *)
void processIncidenceSelection (Incidence *)
void purgeCompleted ()
void slotCalendarChanged ()
void slotAutoArchivingSettingsModified ()
void importQtopia (const QString &categoriesFile, const QString &datebookFile, const QString &tasklistFile)
void showErrorMessage (const QString &)

Signals

void configChanged ()
void categoriesChanged ()
void closingDown ()
void closed (QWidget *)
void modifiedChanged (bool)
void readOnlyChanged (bool)
void changeNavStringPrev (const QString &)
void changeNavStringNext (const QString &)
void organizerEventsSelected (bool)
void groupEventsSelected (bool)
void incidenceSelected (Incidence *)
void todoSelected (bool)
void subtodoSelected (bool)
void dayPassed (QDate)
void pasteEnabled (bool)
void numIncomingChanged (int)
void numOutgoingChanged (int)
void statusMessage (const QString &)
void calendarViewExpanded (bool)
void autoArchivingSettingsModified ()

Public Member Functions

 CalendarView (QWidget *parent=0, const char *name=0)
void setCalendar (Calendar *)
Calendar * calendar ()
KOrg::History * history ()
KOViewManagerviewManager ()
KODialogManagerdialogManager ()
QDate startDate ()
QDate endDate ()
QWidgetStackviewStack ()
QWidgetleftFrame ()
NavigatorBar * navigatorBar ()
KOIncidenceEditoreditorDialog (Incidence *)
DateNavigatordateNavigator ()
void addView (KOrg::BaseView *)
void showView (KOrg::BaseView *)
void addExtension (CalendarViewExtension::Factory *)
Incidence * currentSelection ()
Incidence * selectedIncidence ()
int msgCalModified ()
void adaptNavigationUnits ()

Protected Slots

void showDates (const KCal::DateList &)

Protected Member Functions

void schedule (Scheduler::Method, Incidence *incidence=0)
int msgItemDelete ()
Todo * selectedTodo ()
void warningChangeFailed (Incidence *)

Detailed Description

This is the main calendar widget. main calendar view widget.

It provides the different vies on t he calendar data as well as the date navigator. It also handles synchronization of the different views and controls the different dialogs like preferences, event editor, search dialog etc.

Author:
Cornelius Schumacher

Definition at line 76 of file calendarview.h.


Constructor & Destructor Documentation

CalendarView::CalendarView QWidget parent = 0,
const char *  name = 0
 

Constructs a new calendar view widget.

Parameters:
parent parent window
name Qt internal widget object name

Definition at line 111 of file calendarview.cpp.

References QBoxLayout::addWidget(), checkClipboard(), configChanged(), KOViewManager::connectTodoView(), KOViewManager::connectView(), dayPassed(), goNext(), goPrevious(), incidenceSelected(), lookForIncomingMessages(), showDates(), and updateConfig().


Member Function Documentation

void CalendarView::showView KOrg::BaseView  )  [virtual]
 

changes the view to be the currently selected view

Implements KOrg::CalendarViewBase.

Definition at line 1868 of file calendarview.cpp.

References KOViewManager::showView().

void CalendarView::addExtension CalendarViewExtension::Factory *   ) 
 

Add calendar view extension widget.

CalendarView takes ownership of the objects created by the factory.

Definition at line 1873 of file calendarview.cpp.

Referenced by ActionManager::createCalendarResources().

Incidence * CalendarView::currentSelection  )  [virtual]
 

currentSelection() returns a pointer to the incidence selected in the current view

Implements KOrg::CalendarViewBase.

Definition at line 1880 of file calendarview.cpp.

References KOViewManager::currentSelection().

Referenced by action_mail(), selectedIncidence(), and takeOverEvent().

Incidence * CalendarView::selectedIncidence  ) 
 

Return a pointer to the incidence selected in the current view.

If there is no selection, return the selected todo from the todo list on the left

Definition at line 1928 of file calendarview.cpp.

References currentSelection(), and KOTodoView::selectedIncidences().

Referenced by appointment_delete(), appointment_edit(), appointment_show(), edit_copy(), and edit_cut().

void CalendarView::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 CalendarView(), and updateConfig().

void CalendarView::categoriesChanged  )  [signal]
 

Emitted when the categories were updated, and thus the categories editor dialog needs to reload the list of categories.

Referenced by updateCategories().

void CalendarView::closingDown  )  [signal]
 

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

Referenced by closeCalendar().

void CalendarView::closed QWidget  )  [signal]
 

emitted right before we die

void CalendarView::modifiedChanged bool   )  [signal]
 

Emitted when state of modified flag changes.

Referenced by setModified().

void CalendarView::readOnlyChanged bool   )  [signal]
 

Emitted when state of read-only flag changes.

Referenced by setReadOnly().

void CalendarView::changeNavStringPrev const QString  )  [signal]
 

Emitted when the unit of navigation changes.

Referenced by adaptNavigationUnits().

void CalendarView::organizerEventsSelected bool   )  [signal]
 

Emitted when state of events selection has changed and user is organizer.

void CalendarView::groupEventsSelected bool   )  [signal]
 

Emitted when state of events selection has changed and user is attendee.

void CalendarView::incidenceSelected Incidence *   )  [signal]
 

Emitted when an incidence gets selected.

If the selection is cleared the signal is emitted with 0 as argument.

Referenced by CalendarView().

void CalendarView::todoSelected bool   )  [signal]
 

Emitted, when a todoitem is selected or deselected.

the connected slots enables/disables the corresponding menu items

void CalendarView::dayPassed QDate   )  [signal]
 

Emitted, when a day changed (i.e.

korganizer was running at midnight). The argument is the new date

Referenced by CalendarView().

void CalendarView::pasteEnabled bool   )  [signal]
 

Emitted, when clipboard content changes.

Parameter indicates if paste is possible or not.

Referenced by checkClipboard().

void CalendarView::numIncomingChanged int   )  [signal]
 

Emitted, when the number of incoming messages has changed.

void CalendarView::numOutgoingChanged int   )  [signal]
 

Emitted, when the number of outgoing messages has changed.

void CalendarView::statusMessage const QString  )  [signal]
 

Send status message, which can e.g.

be displayed in the status bar.

void CalendarView::autoArchivingSettingsModified  )  [signal]
 

Emitted when auto-archiving options were modified.

void CalendarView::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 597 of file calendarview.cpp.

References configChanged(), and KOViewManager::raiseCurrentView().

Referenced by CalendarView().

void CalendarView::updateCategories  )  [virtual, slot]
 

Calendar configuration was changed, so refresh categories list.

Implements KOrg::CalendarViewBase.

Definition at line 2131 of file calendarview.cpp.

References categoriesChanged().

Referenced by openCalendar().

bool CalendarView::openCalendar const QString filename,
bool  merge = false
[slot]
 

Load calendar from file filename.

If merge is true, load calendar into existing one, if it is false, clear calendar, before loading. Return true, if calendar could be successfully loaded.

Definition at line 362 of file calendarview.cpp.

References KOTodoView::setDocumentId(), KODialogManager::setDocumentId(), KOViewManager::setDocumentId(), setModified(), and updateCategories().

Referenced by ActionManager::file_import(), and ActionManager::openURL().

bool CalendarView::saveCalendar const QString filename  )  [slot]
 

Save calendar data to file.

Return true if calendar could be successfully saved.

Definition at line 403 of file calendarview.cpp.

References KOViewManager::currentView(), and KOrg::BaseView::flushView().

Referenced by ActionManager::saveURL().

void CalendarView::closeCalendar  )  [slot]
 

Close calendar.

Clear calendar data and reset views to display an empty calendar.

Definition at line 423 of file calendarview.cpp.

References closingDown(), and setModified().

Referenced by ActionManager::file_close().

void CalendarView::archiveCalendar  )  [slot]
 

Archive old events of calendar.

Definition at line 435 of file calendarview.cpp.

References KODialogManager::showArchiveDialog().

Referenced by ActionManager::file_archive().

void CalendarView::newEvent QDateTime  ,
QDateTime  ,
bool  allDay = false
[slot]
 

create an editeventwin with supplied date/time, and if bool is true, make the event take all day.

Definition at line 900 of file calendarview.cpp.

References KODialogManager::connectTypeAhead(), KODialogManager::getEventEditor(), and KOEventEditor::newEvent().

void CalendarView::newEvent  )  [slot]
 

create new event without having a date hint.

Takes current date as default hint.

Definition at line 836 of file calendarview.cpp.

References KOViewManager::currentView(), KOrg::BaseView::eventDurationHint(), and DateNavigator::selectedDates().

void CalendarView::newEvent const QString  )  [slot]
 

Create new Event from given string.

Definition at line 876 of file calendarview.cpp.

References KODialogManager::connectTypeAhead(), KODialogManager::getEventEditor(), and KOEventEditor::newEvent().

void CalendarView::showIncidence Incidence *   )  [slot]
 

Create a read-only viewer dialog for the supplied incidence.

It calls the correct showXXX method

Definition at line 1960 of file calendarview.cpp.

Referenced by appointment_show().

bool CalendarView::editIncidence Incidence *   )  [slot]
 

Create an editor for the supplied incidence.

It calls the correct editXXX method

Definition at line 1968 of file calendarview.cpp.

Referenced by appointment_edit().

void CalendarView::deleteIncidence Incidence *   )  [slot]
 

Delete the supplied incidence.

It calls the correct deleteXXX method

Definition at line 1978 of file calendarview.cpp.

Referenced by appointment_delete().

void CalendarView::editJournal Journal *   )  [slot]
 

Create an editor for the supplied Journal.

Definition at line 1041 of file calendarview.cpp.

References KOJournalEditor::editIncidence(), KODialogManager::getJournalEditor(), KOIncidenceEditor::reload(), and showJournal().

void CalendarView::deleteJournal Journal *   )  [slot]
 

Delete the supplied journal.

Definition at line 1179 of file calendarview.cpp.

void CalendarView::showJournal Journal *   )  [slot]
 

Create a read-only viewer dialog for the supplied event.

Definition at line 1086 of file calendarview.cpp.

References KOEventViewerDialog::setJournal().

Referenced by editJournal().

void CalendarView::editEvent Event *   )  [slot]
 

Create an editor for the supplied event.

Definition at line 979 of file calendarview.cpp.

References KOEventEditor::editIncidence(), KODialogManager::getEventEditor(), KOIncidenceEditor::reload(), and showEvent().

void CalendarView::deleteEvent Event *   )  [slot]
 

Delete the supplied event.

Definition at line 1213 of file calendarview.cpp.

References KOViewManager::currentSelectionDate().

Referenced by deleteEvent(), and ActionManager::deleteEvent().

bool CalendarView::deleteEvent const QString uid  )  [slot]
 

Delete the event with the given unique ID.

Returns false, if event wasn't found.

Definition at line 1314 of file calendarview.cpp.

References deleteEvent().

void CalendarView::showEvent Event *   )  [slot]
 

Create a read-only viewer dialog for the supplied event.

Definition at line 1072 of file calendarview.cpp.

References KOEventViewerDialog::setEvent().

Referenced by editEvent().

void CalendarView::editTodo Todo *   )  [slot]
 

Create an editor dialog for a todo.

Definition at line 1010 of file calendarview.cpp.

References KOTodoEditor::editIncidence(), KODialogManager::getTodoEditor(), KOIncidenceEditor::reload(), and showTodo().

void CalendarView::showTodo Todo *   )  [slot]
 

Create a read-only viewer dialog for the supplied todo.

Definition at line 1079 of file calendarview.cpp.

References KOEventViewerDialog::setTodo().

Referenced by editTodo().

void CalendarView::newTodo  )  [slot]
 

create new todo

Definition at line 931 of file calendarview.cpp.

References KOViewManager::currentView(), KODialogManager::getTodoEditor(), KOrg::BaseView::isEventView(), KOTodoEditor::newTodo(), and DateNavigator::selectedDates().

void CalendarView::newTodo QDate  date  )  [slot]
 

create new todo, due on date

Definition at line 949 of file calendarview.cpp.

References KODialogManager::getTodoEditor(), and KOTodoEditor::newTodo().

void CalendarView::newSubTodo  )  [slot]
 

create new todo with a parent todo

Definition at line 956 of file calendarview.cpp.

void CalendarView::newSubTodo Todo *   )  [slot]
 

create new todo with a parent todo

Definition at line 962 of file calendarview.cpp.

References KODialogManager::getTodoEditor(), and KOTodoEditor::newTodo().

void CalendarView::deleteTodo Todo *   )  [slot]
 

Delete todo.

Definition at line 1135 of file calendarview.cpp.

void CalendarView::recurTodo Todo *   )  [slot]
 

Takes the todo's next occurence and marks the original as complete.

Definition at line 2099 of file calendarview.cpp.

void CalendarView::checkClipboard  )  [slot]
 

Check if clipboard contains vCalendar event.

The signal pasteEnabled() is emitted as result.

Definition at line 1754 of file calendarview.cpp.

References pasteEnabled().

Referenced by CalendarView().

void CalendarView::readSettings  )  [slot]
 

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

You have to call setCalendar before calling readSettings.

Definition at line 441 of file calendarview.cpp.

References readFilterSettings(), KOViewManager::readSettings(), KOTodoView::restoreLayout(), DateNavigator::selectDates(), DateNavigator::selectWeek(), and DateNavigator::selectWorkWeek().

Referenced by ActionManager::createCalendarLocal(), ActionManager::createCalendarResources(), and ActionManager::readSettings().

void CalendarView::writeSettings  )  [slot]
 

write current state to config file.

Definition at line 479 of file calendarview.cpp.

References KOTodoView::saveLayout(), DateNavigator::selectedDates(), writeFilterSettings(), and KOViewManager::writeSettings().

Referenced by ActionManager::writeSettings().

void CalendarView::readFilterSettings KConfig *  config  )  [slot]
 

read settings for calendar filters

Definition at line 508 of file calendarview.cpp.

Referenced by readSettings().

void CalendarView::writeFilterSettings KConfig *  config  )  [slot]
 

write settings for calendar filters

Definition at line 547 of file calendarview.cpp.

Referenced by writeSettings().

void CalendarView::changeIncidenceDisplay Incidence *  ,
int 
[slot]
 

passes on the message that an event has changed to the currently activated view so that it can make appropriate display changes.

Definition at line 673 of file calendarview.cpp.

References KOTodoView::changeIncidenceDisplay(), KOrg::BaseView::changeIncidenceDisplay(), KOViewManager::currentView(), KODialogManager::updateSearchDialog(), KOTodoView::updateView(), and KOrg::BaseView::updateView().

void CalendarView::edit_cut  )  [slot]
 

cut the current appointment to the clipboard

Definition at line 717 of file calendarview.cpp.

References selectedIncidence().

void CalendarView::edit_copy  )  [slot]
 

copy the current appointment(s) to the clipboard

Definition at line 741 of file calendarview.cpp.

References selectedIncidence().

void CalendarView::edit_paste  )  [slot]
 

paste the current vobject(s) in the clipboard buffer into calendar

Definition at line 774 of file calendarview.cpp.

References KOViewManager::agendaView(), DateNavigator::selectedDates(), KOAgendaView::selectedIsAllDay(), KOAgendaView::selectedIsSingleCell(), KOAgendaView::selectionEnd(), and KOAgendaView::selectionStart().

void CalendarView::edit_options  )  [slot]
 

edit viewing and configuration options.

Definition at line 830 of file calendarview.cpp.

References KODialogManager::showOptionsDialog().

void CalendarView::print  )  [slot]
 

Functions for printing, previewing a print, and setting up printing parameters.

Definition at line 1628 of file calendarview.cpp.

References KOViewManager::currentView(), CalPrinter::print(), KOrg::BaseView::printType(), and DateNavigator::selectedDates().

void CalendarView::exportICalendar  )  [slot]
 

Export as iCalendar file.

Definition at line 1658 of file calendarview.cpp.

void CalendarView::exportVCalendar  )  [slot]
 

Export as vCalendar file.

Definition at line 1669 of file calendarview.cpp.

void CalendarView::appointment_show  )  [slot]
 

pop up a dialog to show an existing appointment.

Definition at line 1093 of file calendarview.cpp.

References selectedIncidence(), and showIncidence().

void CalendarView::appointment_edit  )  [slot]
 

pop up an Appointment Dialog to edit an existing appointment.

Get information on the appointment from the list of unique IDs that is currently in the View, called currIds.

Definition at line 1102 of file calendarview.cpp.

References editIncidence(), and selectedIncidence().

void CalendarView::appointment_delete  )  [slot]
 

pop up dialog confirming deletion of currently selected event in the View.

Definition at line 1111 of file calendarview.cpp.

References deleteIncidence(), and selectedIncidence().

void CalendarView::action_mail  )  [slot]
 

mails the currently selected event to a particular user as a vCalendar attachment.

Definition at line 1353 of file calendarview.cpp.

References currentSelection(), KOViewManager::currentView(), KOrg::BaseView::isEventView(), and KOrg::BaseView::selectedIncidences().

void CalendarView::takeOverEvent  )  [slot]
 

Take ownership of selected event.

Definition at line 1815 of file calendarview.cpp.

References currentSelection().

void CalendarView::takeOverCalendar  )  [slot]
 

Take ownership of all events in calendar.

Definition at line 1829 of file calendarview.cpp.

bool CalendarView::isModified  )  [slot]
 

query whether or not the calendar is "dirty".

Definition at line 1614 of file calendarview.cpp.

Referenced by ActionManager::file_open(), ActionManager::saveCalendar(), ActionManager::saveModifiedURL(), and KOrganizer::setTitle().

void CalendarView::setModified bool  modified = true  )  [slot]
 

set the state of calendar.

Modified means "dirty", i.e. needing a save.

Definition at line 1593 of file calendarview.cpp.

References modifiedChanged().

Referenced by closeCalendar(), openCalendar(), ActionManager::openURL(), and ActionManager::saveURL().

bool CalendarView::isReadOnly  )  [slot]
 

query if the calendar is read-only.

Definition at line 1601 of file calendarview.cpp.

Referenced by KOrganizer::setTitle().

void CalendarView::setReadOnly bool  readOnly = true  )  [slot]
 

set state of calendar to read-only

Definition at line 1606 of file calendarview.cpp.

References readOnlyChanged().

void CalendarView::goDate const QDate date  )  [slot]
 

Move the current view date to the specified date.

Definition at line 571 of file calendarview.cpp.

References DateNavigator::selectDate().

void CalendarView::goToday  )  [slot]
 

Move the current view date to today.

Definition at line 576 of file calendarview.cpp.

References DateNavigator::selectToday().

void CalendarView::goNext  )  [slot]
 

Move to the next date(s) in the current view.

Definition at line 581 of file calendarview.cpp.

References KOViewManager::currentView(), DateNavigator::selectNext(), and DateNavigator::selectNextMonth().

Referenced by CalendarView().

void CalendarView::goPrevious  )  [slot]
 

Move to the previous date(s) in the current view.

Definition at line 589 of file calendarview.cpp.

References KOViewManager::currentView(), DateNavigator::selectPrevious(), and DateNavigator::selectPreviousMonth().

Referenced by CalendarView().

void CalendarView::lookForIncomingMessages  )  [slot]
 

Look for new messages in the inbox.

Definition at line 1998 of file calendarview.cpp.

References KODialogManager::incomingDialog().

Referenced by CalendarView().

void CalendarView::lookForOutgoingMessages  )  [slot]
 

Look for new messages in the outbox.

Definition at line 1992 of file calendarview.cpp.

References KODialogManager::outgoingDialog().

void CalendarView::showDates const KCal::DateList &   )  [protected, slot]
 

Select a view or adapt the current view to display the specified dates.

Definition at line 1767 of file calendarview.cpp.

References KOViewManager::currentView(), and KOViewManager::showAgendaView().

Referenced by CalendarView().

void CalendarView::adaptNavigationUnits  ) 
 

Adapt navigation units corresponding to step size of navigation of the current view.

Definition at line 1696 of file calendarview.cpp.

References changeNavStringPrev(), KOrg::BaseView::currentDateCount(), KOViewManager::currentView(), and KOrg::BaseView::isEventView().

Referenced by KOViewManager::showView().


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.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Apr 4 04:49:32 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003