Eventviews

timelineview.h
1/*
2 SPDX-FileCopyrightText: 2007 Till Adam <adam@kde.org>
3 SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
4 SPDX-FileCopyrightText: 2010 Andras Mantia <andras@kdab.com>
5
6 SPDX-License-Identifier: GPL-2.0-or-later WITH Qt-Commercial-exception-1.0
7*/
8#pragma once
9
10#include "eventview.h"
11
12#include <Akonadi/Item>
13
14#include <QDateTime>
15
16#include <memory>
17
18namespace EventViews
19{
20class TimelineViewPrivate;
21
22/**
23 This class provides a view showing which blocks of time are occupied by events
24 in the user's calendars.
25*/
26class EVENTVIEWS_EXPORT TimelineView : public EventView
27{
28 Q_OBJECT
29public:
30 /**
31 * Create a TimelineView.
32 * @param preferences Preferences object for user-configurable aspects of the view.
33 */
34 explicit TimelineView(const EventViews::PrefsPtr &preferences, QWidget *parent = nullptr);
35
36 /**
37 * @deprecated Use TimelineView(const EventViews::PrefsPtr &preferences, QWidget *parent = nullptr)
38 */
39 explicit TimelineView(QWidget *parent = nullptr);
40
41 ~TimelineView() override;
42
43 [[nodiscard]] Akonadi::Item::List selectedIncidences() const override;
44 [[nodiscard]] KCalendarCore::DateList selectedIncidenceDates() const override;
45 [[nodiscard]] int currentDateCount() const override;
46
47 // ensure start and end are valid before calling this.
48 void showDates(const QDate &, const QDate &, const QDate &preferredMonth = QDate()) override;
49
50 // Unused.
51 /** @deprecated Use EventView::startDateTime. */
52 [[deprecated("Use EventView::startDateTime.")]] [[nodiscard]] QDate startDate() const;
53
54 // Unused.
55 /** @deprecated Use EventView::endDateTime. */
56 [[deprecated("Use EventView::endDateTime.")]] [[nodiscard]] QDate endDate() const;
57
58 void showIncidences(const Akonadi::Item::List &incidenceList, const QDate &date) override;
59 void updateView() override;
60 virtual void changeIncidenceDisplay(const Akonadi::Item &incidence, int mode);
61 [[nodiscard]] bool eventDurationHint(QDateTime &startDt, QDateTime &endDt, bool &allDay) const override;
62
63Q_SIGNALS:
64 void showNewEventPopupSignal();
65 void showIncidencePopupSignal(const Akonadi::CollectionCalendar::Ptr &, const Akonadi::Item &, const QDate &);
66
67protected:
68 bool eventFilter(QObject *object, QEvent *event) override;
69
70private:
71 std::unique_ptr<TimelineViewPrivate> const d;
72};
73} // namespace EventViews
EventView is the abstract base class from which all other calendar views for event data are derived.
Definition eventview.h:69
This class provides a view showing which blocks of time are occupied by events in the user's calendar...
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 Mon Nov 18 2024 12:07:11 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.