Eventviews

journalview.h
1/*
2 This file is part of KOrganizer.
3
4 SPDX-FileCopyrightText: 2001 Cornelius Schumacher <schumacher@kde.org>
5 SPDX-FileCopyrightText: 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6
7 SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0
8*/
9#pragma once
10
11#include "eventview.h"
12#include <Akonadi/IncidenceChanger>
13#include <KCalendarCore/Journal>
14
15class QScrollArea;
16
17namespace EventViews
18{
19class JournalDateView;
20
21/**
22 * This class provides a journal view.
23
24 * @short View for Journal components.
25 * @author Cornelius Schumacher <schumacher@kde.org>, Reinhold Kainhofer <reinhold@kainhofer.com>
26 * @see EventView
27 */
28class EVENTVIEWS_EXPORT JournalView : public EventView
29{
30 Q_OBJECT
31public:
32 explicit JournalView(QWidget *parent = nullptr);
33 ~JournalView() override;
34
35 [[nodiscard]] int currentDateCount() const override;
36 [[nodiscard]] Akonadi::Item::List selectedIncidences() const override;
37 [[nodiscard]] KCalendarCore::DateList selectedIncidenceDates() const override
38 {
39 return {};
40 }
41
42 void appendJournal(const Akonadi::Item &journal, const Akonadi::CollectionCalendar::Ptr &calendar, QDate dt);
43
44 /** documentation in baseview.h */
45 void getHighlightMode(bool &highlightEvents, bool &highlightTodos, bool &highlightJournals);
46
47 bool eventFilter(QObject *, QEvent *) override;
48
49public Q_SLOTS:
50 // Don't update the view when midnight passed, otherwise we'll have data loss (bug 79145)
51 void dayPassed(const QDate &) override
52 {
53 }
54
55 void updateView() override;
56 void flushView() override;
57
58 void showDates(const QDate &start, const QDate &end, const QDate &preferredMonth = QDate()) override;
59 void showIncidences(const Akonadi::Item::List &incidences, const QDate &date) override;
60
61 void changeIncidenceDisplay(const Akonadi::Item &incidence, Akonadi::IncidenceChanger::ChangeType);
62 void setIncidenceChanger(Akonadi::IncidenceChanger *changer) override;
63 void newJournal();
64Q_SIGNALS:
65 void flushEntries();
66 void setIncidenceChangerSignal(Akonadi::IncidenceChanger *);
67 void journalEdited(const Akonadi::Item &journal);
68 void journalDeleted(const Akonadi::Item &journal);
69 void printJournal(const KCalendarCore::Journal::Ptr &, bool preview);
70
71protected:
72 void clearEntries();
73
74private:
75 [[nodiscard]] Akonadi::CollectionCalendar::Ptr findCalendar(const KCalendarCore::Journal::Ptr &journal) const;
76
77 QScrollArea *mSA = nullptr;
78 QWidget *mCurrentWidget = nullptr;
80 Akonadi::IncidenceChanger *mChanger = nullptr;
81 // DateList mSelectedDates; // List of dates to be displayed
82};
83}
EventView is the abstract base class from which all other calendar views for event data are derived.
Definition eventview.h:67
This class provides a journal view.
Definition journalview.h:29
void getHighlightMode(bool &highlightEvents, bool &highlightTodos, bool &highlightJournals)
documentation in baseview.h
KCalendarCore::DateList selectedIncidenceDates() const override
Returns a list of the dates of selected events.
Definition journalview.h:37
Q_SCRIPTABLE Q_NOREPLY void start()
Namespace EventViews provides facilities for displaying incidences, including events,...
Definition agenda.h:33
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:12:29 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.