File indexing completed on 2024-06-09 05:15:51

0001 /*
0002   This file is part of the KOrganizer interfaces.
0003 
0004   SPDX-FileCopyrightText: 2001 Cornelius Schumacher <schumacher@kde.org>
0005   SPDX-FileCopyrightText: 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
0006 
0007   SPDX-License-Identifier: LGPL-2.0-or-later
0008 */
0009 
0010 #pragma once
0011 
0012 #include "baseview.h"
0013 
0014 #include <Akonadi/CollectionCalendar>
0015 #include <Akonadi/ETMCalendar>
0016 
0017 namespace KOrg
0018 {
0019 /**
0020   @short interface for main calendar view widget
0021   @author Cornelius Schumacher
0022 */
0023 class CalendarViewBase : public QWidget
0024 {
0025 public:
0026     explicit CalendarViewBase(QWidget *parent)
0027         : QWidget(parent)
0028     {
0029     }
0030 
0031     ~CalendarViewBase() override = default;
0032 
0033     virtual Akonadi::ETMCalendar::Ptr calendar() const = 0;
0034     virtual Akonadi::IncidenceChanger *incidenceChanger() const = 0;
0035 
0036     virtual Akonadi::CollectionCalendar::Ptr calendarForCollection(const Akonadi::Collection &collection) = 0;
0037 
0038     virtual QDate startDate() = 0;
0039     virtual QDate endDate() = 0;
0040 
0041     virtual Akonadi::Item currentSelection() = 0;
0042 
0043     virtual void addView(KOrg::BaseView *) = 0;
0044 
0045     /** changes the view to be the currently selected view */
0046     virtual void showView(KOrg::BaseView *) = 0;
0047 
0048     virtual bool editIncidence(const Akonadi::Item &item, bool isCounter = false) = 0;
0049 
0050 public Q_SLOTS:
0051     virtual void updateView() = 0;
0052 
0053 Q_SIGNALS:
0054     virtual void newIncidenceChanger(Akonadi::IncidenceChanger *) = 0;
0055 };
0056 }