27 #ifndef KORG_CALENDARVIEW_H
28 #define KORG_CALENDARVIEW_H
33 #include <KCalCore/Incidence>
34 #include <KCalCore/Visitor>
35 #include <KCalCore/ScheduleMessage>
37 #include <akonadi/calendar/itiphandler.h>
39 #include <calendarsupport/messagewidget.h>
55 namespace CalendarSupport {
56 class IncidenceViewer;
59 namespace IncidenceEditorNG {
60 class IncidenceDialog;
65 class IncidenceChanger;
66 class CalendarClipboard;
121 return incidence->accept( *
this, incidence );
128 void setCalendar(
const Akonadi::ETMCalendar::Ptr & );
129 Akonadi::ETMCalendar::Ptr calendar()
const;
131 void showMessage(
const QString &message, KMessageWidget::MessageType);
133 Akonadi::History *history()
const;
139 QStackedWidget *
viewStack()
const {
return mRightFrame; }
152 void updateHighlightModes();
171 Akonadi::Item currentSelection();
177 Akonadi::Item selectedIncidence();
182 bool isFiltered()
const;
187 QString currentFilterName()
const;
193 void configChanged();
197 void categoriesChanged();
201 void categoryConfigChanged();
207 void modifiedChanged(
bool );
210 void readOnlyChanged(
bool );
213 void changeNavStringPrev(
const QString & );
214 void changeNavStringNext(
const QString & );
217 void organizerEventsSelected(
bool );
219 void groupEventsSelected(
bool );
224 void incidenceSelected(
const Akonadi::Item &incidence,
const QDate &date );
227 void todoSelected(
bool );
228 void subtodoSelected(
bool );
232 void dayPassed(
const QDate & );
238 void pasteEnabled(
bool );
240 void statusMessage(
const QString & );
242 void calendarViewExpanded(
bool );
245 void autoArchivingSettingsModified();
247 void newIncidenceChanger( Akonadi::IncidenceChanger * );
250 void filtersUpdated(
const QStringList &,
int );
251 void filterChanged();
257 void updateConfig(
const QByteArray & );
261 void updateCategories();
262 void handleIncidenceCreated(
const Akonadi::Item &item);
269 bool saveCalendar(
const QString &filename );
272 void archiveCalendar();
274 void newEvent(
const QDate & );
286 void newEvent(
const QDateTime &startDt );
288 void newEvent(
const QDateTime &startDt,
const QDateTime &EndDt,
bool allDay=
false );
294 void newEvent(
const QString &summary,
295 const QString &description=QString(),
296 const QStringList &attachment=QStringList(),
297 const QStringList &attendees=QStringList(),
298 const QStringList &attachmentMimetypes=QStringList(),
299 bool inlineAttachment=
false );
300 void newFloatingEvent();
304 void showIncidence(
const Akonadi::Item &item );
305 bool showIncidence( Akonadi::Item::Id
id );
306 void showIncidence();
313 void showIncidenceContext(
const Akonadi::Item &incidence );
314 bool showIncidenceContext( Akonadi::Item::Id
id );
317 bool editIncidence(
const Akonadi::Item &item,
bool isCounter =
false );
318 bool editIncidence( Akonadi::Item::Id
id );
319 void editIncidence();
328 bool deleteIncidence(
const Akonadi::Item &item,
bool force=
false );
329 bool deleteIncidence( Akonadi::Item::Id
id,
bool force=
false );
330 void deleteIncidence();
340 bool addIncidence(
const QString &ical );
341 bool addIncidence(
const KCalCore::Incidence::Ptr &incidence );
346 void cutIncidence(
const Akonadi::Item & );
351 void copyIncidence(
const Akonadi::Item & );
356 void pasteIncidence();
359 void deleteSubTodosIncidence (
const Akonadi::Item &todo );
366 void deleteTodoIncidence (
const Akonadi::Item &todo,
bool force=
false );
372 void newTodo(
const QDate &date );
375 void newTodo(
const Akonadi::Collection &collection );
381 void newSubTodo(
const Akonadi::Item &todo );
384 void newSubTodo(
const Akonadi::Collection &collection );
386 void newTodo(
const QString &summary,
const QString &description=QString(),
387 const QStringList &attachments=QStringList(),
388 const QStringList &attendees=QStringList(),
389 const QStringList &attachmentMimetypes=QStringList(),
390 bool inlineAttachment=
false );
393 void newJournal(
const QDate &date );
394 void newJournal(
const QString &text,
const QDate &date=QDate() );
395 void newJournal(
const Akonadi::Collection &collection );
397 void configureCurrentView();
399 void toggleAlarm(
const Akonadi::Item &incidence );
400 void toggleTodoCompleted(
const Akonadi::Item &incidence );
401 void copyIncidenceToResource(
const Akonadi::Item &incidence,
const QString &resourceId );
402 void moveIncidenceToResource(
const Akonadi::Item &incidence,
const QString &resourceId );
403 void dissociateOccurrences(
const Akonadi::Item &incidence,
const QDate &date );
409 void checkClipboard();
420 void writeSettings();
423 void readFilterSettings( KConfig *config );
426 void writeFilterSettings( KConfig *config );
430 void changeIncidenceDisplay(
const Akonadi::Item &incidence,
431 Akonadi::IncidenceChanger::ChangeType );
433 void slotCreateFinished(
int changeId,
434 const Akonadi::Item &item,
435 Akonadi::IncidenceChanger::ResultCode resultCode,
436 const QString &errorString );
438 void slotModifyFinished(
int changeId,
439 const Akonadi::Item &item,
440 Akonadi::IncidenceChanger::ResultCode resultCode,
441 const QString &errorString );
443 void slotDeleteFinished(
int changeId,
444 const QVector<Akonadi::Item::Id> &itemIdList,
445 Akonadi::IncidenceChanger::ResultCode resultCode,
446 const QString &errorString );
448 void startMultiModify(
const QString &text );
449 void endMultiModify();
451 void updateView(
const QDate &start,
const QDate &end,
452 const QDate &preferredMonth,
const bool updateTodos=
true );
455 void updateUnmanagedViews();
466 void onCutFinished();
482 void exportICalendar();
485 void exportVCalendar();
488 void appointment_show();
494 void appointment_edit();
500 void appointment_delete();
508 bool incidence_unsub(
const Akonadi::Item &item );
511 bool makeSubTodosIndependent( );
516 bool makeChildrenIndependent(
const Akonadi::Item &item );
519 void takeOverEvent();
522 bool isReadOnly()
const;
527 void setReadOnly(
bool readOnly=
true );
529 void eventUpdated(
const Akonadi::Item &incidence );
532 void schedule_publish(
const Akonadi::Item &incidence=Akonadi::Item() );
533 void schedule_request(
const Akonadi::Item &incidence=Akonadi::Item() );
534 void schedule_refresh(
const Akonadi::Item &incidence=Akonadi::Item() );
535 void schedule_cancel(
const Akonadi::Item &incidence=Akonadi::Item() );
536 void schedule_add(
const Akonadi::Item &incidence=Akonadi::Item() );
537 void schedule_reply(
const Akonadi::Item &incidence=Akonadi::Item() );
538 void schedule_counter(
const Akonadi::Item &incidence=Akonadi::Item() );
539 void schedule_declinecounter(
const Akonadi::Item &incidence=Akonadi::Item() );
540 void schedule_forward(
const Akonadi::Item &incidence=Akonadi::Item() );
541 void mailFreeBusy(
int daysToPublish=30 );
542 void uploadFreeBusy();
544 void openAddressbook();
552 void showDateNavigator(
bool );
553 void showTodoView(
bool );
554 void showEventViewer(
bool );
557 void goDate(
const QDate &date );
560 void showDate(
const QDate &date );
571 void showLeftFrame(
bool show=
true );
573 void dialogClosing(
const Akonadi::Item &incidence );
575 void processMainViewSelection(
const Akonadi::Item &incidence,
const QDate &date );
576 void processTodoListSelection(
const Akonadi::Item &incidence,
const QDate &date );
578 void processIncidenceSelection(
const Akonadi::Item &incidence,
const QDate &date );
580 void purgeCompleted();
584 void showErrorMessage(
const QString & );
585 void schedule( KCalCore::iTIPMethod,
const Akonadi::Item &incidence );
586 void addIncidenceOn(
const Akonadi::Item &incidence,
const QDate & );
587 void moveIncidenceTo(
const Akonadi::Item &incidence,
const QDate & );
588 void filterActivated(
int filterNum );
590 void resourcesChanged();
601 void selectWeek(
const QDate &week,
const QDate &preferredMonth );
609 void changeFullView(
bool fullView );
617 void showDates(
const KCalCore::DateList &,
const QDate &preferredMonth = QDate() );
620 int msgCalModified();
625 void adaptNavigationUnits();
633 QDate activeIncidenceDate();
645 QDate activeDate(
bool fallbackToToday =
false );
648 int msgItemDelete(
const Akonadi::Item &incidence );
650 Akonadi::Item selectedTodo();
651 IncidenceEditorNG::IncidenceDialog *incidenceDialog(
const Akonadi::Item &);
653 void warningChangeFailed(
const Akonadi::Item & );
654 void checkForFilteredChange(
const Akonadi::Item &incidence );
660 void dateTimesForNewEvent( QDateTime &startDt, QDateTime &endDt,
bool &allDay );
661 IncidenceEditorNG::IncidenceDialog *newEventEditor(
const KCalCore::Event::Ptr &event );
663 bool eventFilter(
QObject *watched, QEvent *event );
666 void onCheckableProxyAboutToToggle(
bool newState );
667 void onCheckableProxyToggled(
bool newState );
668 void onTodosPurged(
bool success,
int numDeleted,
int numIgnored);
672 Akonadi::Collection selectedCollection()
const;
673 Akonadi::Collection::List checkedCollections()
const;
675 void createPrinter();
677 void dissociateOccurrence(
const Akonadi::Item &incidence,
const QDate & ,
bool futureOccurrences);
685 Akonadi::Collection defaultCollection(
686 const QLatin1String &mimeType = QLatin1String(
"" ) )
const;
692 IncidenceEditorNG::IncidenceDialog *createIncidenceEditor(
693 const Akonadi::Item &item,
const Akonadi::Collection &collection = Akonadi::Collection() );
696 Akonadi::TodoPurger *mTodoPurger;
699 QSplitter *mLeftSplitter;
701 QStackedWidget *mRightFrame;
702 CalendarSupport::MessageWidget *mMessageWidget;
710 QList<CalendarViewExtension*> mExtensions;
712 Akonadi::ETMCalendar::Ptr mCalendar;
717 KVBox *mEventViewerBox;
718 CalendarSupport::IncidenceViewer *mEventViewer;
723 QList<KCalCore::CalFilter*> mFilters;
724 KCalCore::CalFilter *mCurrentFilter;
729 Akonadi::Item mSelectedIncidence;
733 Akonadi::IncidenceChanger *mChanger;
734 Akonadi::ITIPHandler *mITIPHandler;
735 QList<int> mMainSplitterSizes;
736 bool mSplitterSizesValid;
737 bool mCreatingEnabled;
739 Akonadi::CalendarClipboard *mCalendarClipboard;
virtual Akonadi::IncidenceChanger * incidenceChanger() const
QStackedWidget * viewStack() const
NavigatorBar * navigatorBar() const
bool act(KCalCore::IncidenceBase::Ptr &incidence, CalendarView *view)
KODialogManager * dialogManager() const
This is the main calendar widget.
DateNavigator * dateNavigator() const
CalendarViewExtension(QWidget *parent)
#define KORGANIZERPRIVATE_EXPORT
void slotAutoArchivingSettingsModified()
CalPrinter is a class for printing Calendars.
This class provides an interface for all views being displayed within the main calendar view...
This class provides a view of calendar resources.
QWidget * leftFrame() const
This class controls date navigation.
A KCheckableProxyModel that emits a signal before and after toggling.
This class manages the views of the calendar.
interface for main calendar view widget
KOViewManager * viewManager() const
This class manages the dialogs used by the calendar view.