File indexing completed on 2025-01-05 04:54:32
0001 /* 0002 This file is part of KOrganizer. 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: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0 0008 */ 0009 #pragma once 0010 0011 #include "baseview.h" 0012 #include <KCalendarCore/Incidence> // for KCalendarCore::DateList typedef 0013 0014 namespace EventViews 0015 { 0016 class JournalView; 0017 } 0018 0019 /** 0020 * This class provides a journal view. 0021 0022 * @short View for Journal components. 0023 * @author Cornelius Schumacher <schumacher@kde.org>, Reinhold Kainhofer <reinhold@kainhofer.com> 0024 * @see KOBaseView 0025 */ 0026 class KOJournalView : public KOrg::BaseView 0027 { 0028 Q_OBJECT 0029 public: 0030 explicit KOJournalView(QWidget *parent = nullptr); 0031 ~KOJournalView() override; 0032 0033 [[nodiscard]] int currentDateCount() const override; 0034 [[nodiscard]] Akonadi::Item::List selectedIncidences() override; 0035 0036 [[nodiscard]] KCalendarCore::DateList selectedIncidenceDates() override 0037 { 0038 return {}; 0039 } 0040 0041 void setModel(QAbstractItemModel *model) override; 0042 0043 void getHighlightMode(bool &highlightEvents, bool &highlightTodos, bool &highlightJournals) override; 0044 0045 [[nodiscard]] CalendarSupport::CalPrinterBase::PrintType printType() const override; 0046 0047 public Q_SLOTS: 0048 void updateView() override; 0049 void flushView() override; 0050 0051 void showDates(const QDate &start, const QDate &end, const QDate &preferredMonth = QDate()) override; 0052 void showIncidences(const Akonadi::Item::List &incidences, const QDate &date) override; 0053 0054 void changeIncidenceDisplay(const Akonadi::Item &incidence, Akonadi::IncidenceChanger::ChangeType) override; 0055 void setIncidenceChanger(Akonadi::IncidenceChanger *changer) override; 0056 void printJournal(const KCalendarCore::Journal::Ptr &journal, bool preview); 0057 0058 void calendarAdded(const Akonadi::CollectionCalendar::Ptr &calendar) override; 0059 void calendarRemoved(const Akonadi::CollectionCalendar::Ptr &calendar) override; 0060 0061 private: 0062 EventViews::JournalView *const mJournalView; 0063 };