23 #ifndef KORG_INTERFACES_BASEVIEW_H
24 #define KORG_INTERFACES_BASEVIEW_H
29 #include <Akonadi/Calendar/IncidenceChanger>
30 #include <Akonadi/Calendar/ETMCalendar>
31 #include <calendarviews/eventview.h>
33 #include <Akonadi/Collection>
34 #include <Akonadi/Item>
69 virtual void setCalendar(
const Akonadi::ETMCalendar::Ptr &cal );
73 virtual Akonadi::ETMCalendar::Ptr calendar();
80 virtual Akonadi::Item::List selectedIncidences() = 0;
87 virtual KCalCore::DateList selectedIncidenceDates() = 0;
107 virtual int currentDateCount()
const = 0;
112 virtual bool isEventView();
126 virtual void getHighlightMode(
bool &highlightEvents,
127 bool &highlightTodos,
128 bool &highlightJournals );
134 virtual bool usesFullWindow();
140 virtual bool supportsZoom();
146 virtual bool supportsDateRangeSelection();
148 virtual bool hasConfigurationDialog()
const;
150 virtual void showConfigurationDialog(
QWidget *parent );
152 QByteArray identifier()
const;
153 virtual void setIdentifier(
const QByteArray &identifier );
162 virtual void restoreConfig(
const KConfigGroup &configGroup );
171 virtual void saveConfig( KConfigGroup &configGroup );
178 virtual BaseView *viewAt(
const QPoint &p );
188 virtual void setDateRange(
const KDateTime &start,
const KDateTime &end,
189 const QDate &preferredMonth = QDate() );
191 KDateTime startDateTime()
const;
192 KDateTime endDateTime()
const;
194 KDateTime actualStartDateTime()
const;
195 KDateTime actualEndDateTime()
const;
212 virtual void showIncidences(
const Akonadi::Item::List &incidenceList,
const QDate &date ) = 0;
218 virtual void updateView() = 0;
219 virtual void dayPassed(
const QDate & );
224 virtual void setIncidenceChanger( Akonadi::IncidenceChanger *changer );
229 virtual void flushView();
234 virtual void changeIncidenceDisplay(
const Akonadi::Item &,
235 Akonadi::IncidenceChanger::ChangeType ) = 0;
241 virtual void updateConfig();
246 virtual void clearSelection();
252 virtual bool eventDurationHint( QDateTime &startDt, QDateTime &endDt,
bool &allDay );
255 void incidenceSelected(
const Akonadi::Item &,
const QDate );
260 void showIncidenceSignal(
const Akonadi::Item & );
267 void editIncidenceSignal(
const Akonadi::Item & );
274 void deleteIncidenceSignal(
const Akonadi::Item & );
279 void cutIncidenceSignal(
const Akonadi::Item & );
284 void copyIncidenceSignal(
const Akonadi::Item & );
289 void pasteIncidenceSignal();
294 void toggleAlarmSignal(
const Akonadi::Item & );
300 void toggleTodoCompletedSignal(
const Akonadi::Item & );
305 void copyIncidenceToResourceSignal(
const Akonadi::Item &,
const QString & );
310 void moveIncidenceToResourceSignal(
const Akonadi::Item &,
const QString & );
316 void dissociateOccurrencesSignal(
const Akonadi::Item &,
const QDate & );
318 void startMultiModify(
const QString & );
319 void endMultiModify();
325 void newEventSignal();
331 void newEventSignal(
const QDate & );
337 void newEventSignal(
const QDateTime & );
344 void newEventSignal(
const QDateTime &,
const QDateTime & );
346 void newTodoSignal(
const QDate & );
347 void newSubTodoSignal(
const Akonadi::Item & );
349 void newJournalSignal(
const QDate & );
358 virtual void setChanges( EventViews::EventView::Changes changes );
363 EventViews::EventView::Changes changes()
const;
369 virtual void doRestoreConfig(
const KConfigGroup &configGroup );
374 virtual void doSaveConfig( KConfigGroup &configGroup );
379 virtual void showDates(
const QDate &start,
const QDate &end,
380 const QDate &preferredMonth = QDate() ) = 0;
388 virtual QPair<KDateTime,KDateTime> actualDateRange(
389 const KDateTime &start,
390 const KDateTime &end,
391 const QDate &preferredMonth = QDate() )
const;
394 virtual void calendarReset();
402 friend class KOrg::BaseView::Private;
Akonadi::IncidenceChanger * mChanger
virtual bool supportsDateNavigation() const
Returns true if the view supports navigation through the date navigator ( selecting a date range...
#define KORGANIZER_INTERFACES_EXPORT
virtual Akonadi::Collection::Id collectionId() const
This class provides an interface for all views being displayed within the main calendar view...
virtual QDateTime selectionStart()
Returns the start of the selection, or an invalid QDateTime if there is no selection or the view does...
virtual QDateTime selectionEnd()
Returns the end of the selection, or an invalid QDateTime if there is no selection or the view doesn'...