korganizer

CalendarView Class Reference

#include <calendarview.h>

Inheritance diagram for CalendarView:

KOrg::CalendarViewBase KCal::Calendar::Observer

List of all members.


Detailed Description

This is the main calendar widget.

It provides the different views on the 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.

main calendar view widget

Author:
Cornelius Schumacher

Definition at line 81 of file calendarview.h.


Public Slots

void updateConfig (const QCString &)
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 ()
bool addIncidence (const QString &ical)
void connectIncidenceEditor (KOIncidenceEditor *)
void newEvent ()
void newEvent (const QDate &startDt)
void newEvent (const QDateTime &startDt)
void newEvent (const QDateTime &startDt, const QDateTime &EndDt, bool allDay=false)
void newEvent (const QString &summary, const QString &description=QString::null, const QStringList &attachment=QStringList(), const QStringList &attendees=QStringList(), const QStringList &attachmentMimetypes=QStringList(), bool inlineAttachment=false)
void newFloatingEvent ()
void showIncidence (Incidence *)
bool editIncidence (Incidence *incidence, bool isCounter=false)
void deleteIncidence (Incidence *, bool force=false)
void cutIncidence (Incidence *)
void copyIncidence (Incidence *)
void pasteIncidence ()
void deleteSubTodosIncidence (Todo *todo)
void deleteTodoIncidence (Todo *todo, bool force=false)
bool deleteEvent (Event *)
bool deleteTodo (Todo *)
bool deleteJournal (Journal *)
bool deleteIncidence (const QString &uid, bool force=false)
void newTodo ()
void newTodo (const QDate &date)
void newSubTodo ()
void newSubTodo (Todo *)
void newTodo (const QString &summary, const QString &description=QString::null, const QStringList &attachments=QStringList(), const QStringList &attendees=QStringList(), const QStringList &attachmentMimetypes=QStringList(), bool inlineAttachment=false, bool createTask=false)
void newJournal ()
void newJournal (const QDate &date)
void newJournal (const QString &text, const QDate &date=QDate())
void toggleAlarm (Incidence *)
void dissociateOccurrence (Incidence *, const QDate &)
void dissociateFutureOccurrence (Incidence *, const QDate &)
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, KOGlobals::WhatChanged modification)
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 exportWeb ()
void exportICalendar ()
void exportVCalendar ()
void appointment_show ()
void appointment_edit ()
void appointment_delete ()
void todo_unsub ()
bool todo_unsub (Todo *todo)
bool makeSubTodosIndependents ()
bool makeSubTodosIndependents (Todo *todo)
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 schedule_forward (Incidence *incidence=0)
void mailFreeBusy (int daysToPublish=30)
void uploadFreeBusy ()
void openAddressbook ()
void editFilters ()
void updateFilter ()
void showIntro ()
void showDateNavigator (bool)
void showTodoView (bool)
void showEventViewer (bool)
void goDate (const QDate &date)
void showDate (const QDate &date)
void goToday ()
void goNext ()
void goPrevious ()
void toggleExpand ()
void showLeftFrame (bool show=true)
void dialogClosing (Incidence *)
void processMainViewSelection (Incidence *incidence, const QDate &date)
void processTodoListSelection (Incidence *incidence, const QDate &date)
void processIncidenceSelection (Incidence *incidence, const QDate &date)
void purgeCompleted ()
void slotAutoArchivingSettingsModified ()
void showErrorMessage (const QString &)
void schedule (Scheduler::Method, Incidence *incidence)
void addIncidenceOn (Incidence *, const QDate &)
void moveIncidenceTo (Incidence *, const QDate &)
void filterActivated (int filterNum)
void resourcesChanged ()

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 *incidence, const QDate &date)
void todoSelected (bool)
void subtodoSelected (bool)
void dayPassed (const QDate &)
void cancelAttendees (Incidence *)
void pasteEnabled (bool)
void statusMessage (const QString &)
void calendarViewExpanded (bool)
void autoArchivingSettingsModified ()
void newIncidenceChanger (IncidenceChangerBase *)
void exportHTML (HTMLExportSettings *)
void newFilterListSignal (const QStringList &)
void selectFilterSignal (int)
void filterChanged ()

Public Member Functions

 CalendarView (QWidget *parent=0, const char *name=0)
void setCalendar (Calendar *)
Calendarcalendar ()
KOrg::History * history () const
KOViewManagerviewManager () const
KODialogManagerdialogManager () const
QWidgetStack * viewStack () const
QWidget * leftFrame () const
NavigatorBar * navigatorBar () const
DateNavigatordateNavigator () const
KOIncidenceEditoreditorDialog (Incidence *) const
IncidenceChangerBase * incidenceChanger () const
QDate startDate ()
QDate endDate ()
void addView (KOrg::BaseView *)
void showView (KOrg::BaseView *)
void addExtension (CalendarViewExtension::Factory *)
IncidencecurrentSelection ()
IncidenceselectedIncidence ()
QString currentFilterName () const
int msgCalModified ()
void adaptNavigationUnits ()
QDate activeDate (bool fallbackToToday=false)

Protected Slots

void showDates (const KCal::DateList &)

Protected Member Functions

void setIncidenceChanger (IncidenceChangerBase *changer)
int msgItemDelete (Incidence *incidence)
TodoselectedTodo ()
void warningChangeFailed (Incidence *)
void checkForFilteredChange (Incidence *incidence)
void dateTimesForNewEvent (QDateTime &startDt, QDateTime &endDt, bool &allDay)
KOEventEditornewEventEditor (const QDateTime &startDtParam=QDateTime(), const QDateTime &endDtParam=QDateTime(), bool allDayParam=false)

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 114 of file calendarview.cpp.


Member Function Documentation

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

changes the view to be the currently selected view

Implements KOrg::CalendarViewBase.

Definition at line 1828 of file calendarview.cpp.

void CalendarView::addExtension ( CalendarViewExtension::Factory *  factory  ) 

Add calendar view extension widget.

CalendarView takes ownership of the objects created by the factory.

Definition at line 1833 of file calendarview.cpp.

Incidence * CalendarView::currentSelection (  )  [virtual]

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

Implements KOrg::CalendarViewBase.

Definition at line 1885 of file calendarview.cpp.

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 1890 of file calendarview.cpp.

QString CalendarView::currentFilterName (  )  const

Returns the name of the current filter.

Definition at line 1758 of file calendarview.cpp.

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.

void CalendarView::categoriesChanged (  )  [signal]

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

void CalendarView::closingDown (  )  [signal]

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

void CalendarView::closed ( QWidget *   )  [signal]

emitted right before we die

void CalendarView::modifiedChanged ( bool   )  [signal]

Emitted when state of modified flag changes.

void CalendarView::readOnlyChanged ( bool   )  [signal]

Emitted when state of read-only flag changes.

void CalendarView::changeNavStringPrev ( const QString &   )  [signal]

Emitted when the unit of navigation changes.

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 incidence,
const QDate &  date 
) [signal]

Emitted when an incidence gets selected.

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

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 ( const QDate &   )  [signal]

Emitted, when a day changed (i.e.

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

void CalendarView::cancelAttendees ( Incidence  )  [signal]

Attendees were removed from this incidence.

Only the removed attendees are present in the incidence, so we just need to send a cancel messages to all attendees groupware messages are enabled at all.

void CalendarView::pasteEnabled ( bool   )  [signal]

Emitted, when clipboard content changes.

Parameter indicates if paste is possible or not.

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 ( const QCString &  receiver  )  [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 652 of file calendarview.cpp.

void CalendarView::updateCategories (  )  [virtual, slot]

Calendar configuration was changed, so refresh categories list.

Implements KOrg::CalendarViewBase.

Definition at line 2236 of file calendarview.cpp.

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 393 of file calendarview.cpp.

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

Save calendar data to file.

Return true if calendar could be successfully saved.

Definition at line 448 of file calendarview.cpp.

void CalendarView::closeCalendar (  )  [slot]

Close calendar.

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

Definition at line 468 of file calendarview.cpp.

void CalendarView::archiveCalendar (  )  [slot]

Archive old events of calendar.

Definition at line 480 of file calendarview.cpp.

bool CalendarView::addIncidence ( const QString &  ical  )  [slot]

Add an incidence to the active calendar.

Parameters:
ical A calendar in iCalendar format containing the incidence. The calendar must consist of a VCALENDAR component which contains the incidence (VEVENT, VTODO, VJOURNAL or VFREEBUSY) and optionally a VTIMEZONE component. If there is more than one incidence, only the first is added to KOrganizer's calendar.

Definition at line 1118 of file calendarview.cpp.

void CalendarView::newEvent (  )  [slot]

create new event without having a date hint.

Takes current date as default hint.

Definition at line 989 of file calendarview.cpp.

void CalendarView::newEvent ( const QDate &  startDt  )  [slot]

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

Definition at line 995 of file calendarview.cpp.

void CalendarView::newEvent ( const QString &  summary,
const QString &  description = QString::null,
const QStringList &  attachment = QStringList(),
const QStringList &  attendees = QStringList(),
const QStringList &  attachmentMimetypes = QStringList(),
bool  inlineAttachment = false 
) [slot]

Create new Event from given summary, description, attachment list and attendees list.

Definition at line 1013 of file calendarview.cpp.

void CalendarView::showIncidence ( Incidence incidence  )  [slot]

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

It calls the correct showXXX method

Definition at line 1937 of file calendarview.cpp.

bool CalendarView::editIncidence ( Incidence incidence,
bool  isCounter = false 
) [slot]

Create an editor for the supplied incidence.

It calls the correct editXXX method

Definition at line 1944 of file calendarview.cpp.

void CalendarView::deleteIncidence ( Incidence incidence,
bool  force = false 
) [slot]

Delete the supplied incidence.

It calls the correct deleteXXX method

Parameters:
force If true, all recurrences and sub-todos (if applicable) will be deleted without prompting for confirmation.

Definition at line 2052 of file calendarview.cpp.

void CalendarView::cutIncidence ( Incidence  )  [slot]

Cuts the selected incidence using the edit_cut() method.

Definition at line 1922 of file calendarview.cpp.

void CalendarView::copyIncidence ( Incidence  )  [slot]

Copies the selected incidence using the edit_copy() method.

Definition at line 1927 of file calendarview.cpp.

void CalendarView::pasteIncidence (  )  [slot]

Pastes the curren incidence using the edit_paste() method.

Definition at line 1932 of file calendarview.cpp.

void CalendarView::deleteSubTodosIncidence ( Todo todo  )  [slot]

Delete the supplied todo and all sub-todos.

Definition at line 1990 of file calendarview.cpp.

void CalendarView::deleteTodoIncidence ( Todo todo,
bool  force = false 
) [slot]

Delete the todo incidence, and its sub-to-dos.

Parameters:
todo The todo to delete.
force If true, all sub-todos will be deleted without prompting for confirmation.

Definition at line 2009 of file calendarview.cpp.

bool CalendarView::deleteEvent ( Event  )  [inline, slot]

Check if deleting the supplied event is allowed.

Definition at line 320 of file calendarview.h.

bool CalendarView::deleteTodo ( Todo  )  [inline, slot]

Check if deleting the todo is allowed.

Definition at line 322 of file calendarview.h.

bool CalendarView::deleteJournal ( Journal  )  [inline, slot]

Check if deleting the supplied journal is allowed.

Definition at line 324 of file calendarview.h.

bool CalendarView::deleteIncidence ( const QString &  uid,
bool  force = false 
) [slot]

Delete the incidence with the given unique ID.

Returns false, if event wasn't found.

Parameters:
uid The UID of the incidence to delete.
force If true, all recurrences and sub-todos (if applicable) will be deleted without prompting for confirmation.

Definition at line 1222 of file calendarview.cpp.

void CalendarView::newTodo (  )  [slot]

create new todo

Definition at line 1042 of file calendarview.cpp.

void CalendarView::newTodo ( const QDate &  date  )  [slot]

create new todo, due on date

Definition at line 1060 of file calendarview.cpp.

void CalendarView::newSubTodo (  )  [slot]

create new todo with a parent todo

Definition at line 1094 of file calendarview.cpp.

void CalendarView::newSubTodo ( Todo parentEvent  )  [slot]

create new todo with a parent todo

Definition at line 1100 of file calendarview.cpp.

void CalendarView::checkClipboard (  )  [slot]

Check if clipboard contains vCalendar event.

The signal pasteEnabled() is emitted as result.

Definition at line 1680 of file calendarview.cpp.

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 486 of file calendarview.cpp.

void CalendarView::writeSettings (  )  [slot]

write current state to config file.

Definition at line 525 of file calendarview.cpp.

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

read settings for calendar filters

Definition at line 554 of file calendarview.cpp.

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

write settings for calendar filters

Definition at line 591 of file calendarview.cpp.

void CalendarView::changeIncidenceDisplay ( Incidence incidence,
int  action 
) [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 816 of file calendarview.cpp.

void CalendarView::edit_cut (  )  [slot]

cut the current appointment to the clipboard

Definition at line 861 of file calendarview.cpp.

void CalendarView::edit_copy (  )  [slot]

copy the current appointment(s) to the clipboard

Definition at line 872 of file calendarview.cpp.

void CalendarView::edit_paste (  )  [slot]

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

Definition at line 886 of file calendarview.cpp.

void CalendarView::edit_options (  )  [slot]

edit viewing and configuration options.

Definition at line 943 of file calendarview.cpp.

void CalendarView::print (  )  [slot]

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

Definition at line 1528 of file calendarview.cpp.

void CalendarView::exportWeb (  )  [slot]

Export as HTML file.

Definition at line 1549 of file calendarview.cpp.

void CalendarView::exportICalendar (  )  [slot]

Export as iCalendar file.

Definition at line 1562 of file calendarview.cpp.

void CalendarView::exportVCalendar (  )  [slot]

Export as vCalendar file.

Definition at line 1581 of file calendarview.cpp.

void CalendarView::appointment_show (  )  [slot]

pop up a dialog to show an existing appointment.

Definition at line 1132 of file calendarview.cpp.

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 1141 of file calendarview.cpp.

void CalendarView::appointment_delete (  )  [slot]

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

Definition at line 1150 of file calendarview.cpp.

bool CalendarView::makeSubTodosIndependents (  )  [slot]

Make all sub-to-dos of todo independents, update the view.

Definition at line 1189 of file calendarview.cpp.

bool CalendarView::makeSubTodosIndependents ( Todo todo  )  [slot]

Make all sub-to-dos of todo independents, not update the view.

Definition at line 1201 of file calendarview.cpp.

void CalendarView::takeOverEvent (  )  [slot]

Take ownership of selected event.

Definition at line 1765 of file calendarview.cpp.

void CalendarView::takeOverCalendar (  )  [slot]

Take ownership of all events in calendar.

Definition at line 1779 of file calendarview.cpp.

bool CalendarView::isModified (  )  [slot]

query whether or not the calendar is "dirty".

Definition at line 1523 of file calendarview.cpp.

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

set the state of calendar.

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

Definition at line 1502 of file calendarview.cpp.

bool CalendarView::isReadOnly (  )  [slot]

query if the calendar is read-only.

Definition at line 1510 of file calendarview.cpp.

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

set state of calendar to read-only

Definition at line 1515 of file calendarview.cpp.

void CalendarView::updateFilter (  )  [slot]

Filter configuration changed.

Definition at line 1719 of file calendarview.cpp.

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

Move the current view date to the specified date.

Definition at line 617 of file calendarview.cpp.

void CalendarView::showDate ( const QDate &  date  )  [slot]

Show the given date without changing date selection length.

Definition at line 622 of file calendarview.cpp.

void CalendarView::goToday (  )  [slot]

Move the current view date to today.

Definition at line 631 of file calendarview.cpp.

void CalendarView::goNext (  )  [slot]

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

Definition at line 636 of file calendarview.cpp.

void CalendarView::goPrevious (  )  [slot]

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

Definition at line 644 of file calendarview.cpp.

void CalendarView::filterActivated ( int  filterNum  )  [slot]

A different filter was selected.

Definition at line 1744 of file calendarview.cpp.

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

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

Definition at line 1693 of file calendarview.cpp.

void CalendarView::adaptNavigationUnits (  ) 

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

Definition at line 1617 of file calendarview.cpp.

QDate CalendarView::activeDate ( bool  fallbackToToday = false  ) 

Returns the best guess at the current active date in the view.

Parameters:
fallbackToToday If guessing doesn't work, some views will prefer today to be returned instead of the first select date in the day matrix, Journal view for example.

Definition at line 357 of file calendarview.cpp.

void CalendarView::dateTimesForNewEvent ( QDateTime &  startDt,
QDateTime &  endDt,
bool &  allDay 
) [protected]

Adjust the given date/times by valid defaults (selection or configured defaults, if invalid values are given) and allow the view to adjust the type.

Definition at line 948 of file calendarview.cpp.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys