Eventviews

listview.h
1/*
2 SPDX-FileCopyrightText: 1999 Preston Brown <pbrown@kde.org>
3 SPDX-FileCopyrightText: 2000, 2001 Cornelius Schumacher <schumacher@kde.org>
4 SPDX-FileCopyrightText: 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.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 <memory>
13
14class KConfig;
15
16class QModelIndex;
17
18namespace EventViews
19{
20class ListViewPrivate;
21
22/**
23 This class provides a multi-column list view of events. It can
24 display events from one particular day or several days, it doesn't
25 matter.
26
27 @short multi-column list view of various events.
28 @author Preston Brown <pbrown@kde.org>
29 @see EventView
30*/
31class EVENTVIEWS_EXPORT ListView : public EventView
32{
33 Q_OBJECT
34public:
35 explicit ListView(QWidget *parent = nullptr, bool nonInteractive = false);
36 ~ListView() override;
37
38 [[nodiscard]] int currentDateCount() const override;
39 [[nodiscard]] Akonadi::Item::List selectedIncidences() const override;
40 [[nodiscard]] KCalendarCore::DateList selectedIncidenceDates() const override;
41
42 // Shows all incidences of the calendar
43 void showAll();
44
45 /**
46 * Read settings from the "ListView Layout" group of the configuration.
47 * @deprecated Use readSettings with a specific KConfigGroup.
48 */
49 void readSettings(KConfig *config);
50
51 /**
52 * Read settings from the given configuration group.
53 * @since 5.18.1
54 */
55 void readSettings(const KConfigGroup &cfgGroup);
56
57 /**
58 * Write settings to the "ListView Layout" group of the configuration.
59 * @deprecated Use writeSettings with a specific KConfigGroup.
60 */
61 void writeSettings(KConfig *config);
62
63 /**
64 * Write settings to the given configuration group.
65 * @since 5.18.1
66 */
67 void writeSettings(KConfigGroup &cfgGroup);
68
69 void clear();
70 QSize sizeHint() const override;
71
72public Q_SLOTS:
73 void updateView() override;
74
75 void showDates(const QDate &start, const QDate &end, const QDate &preferredMonth = QDate()) override;
76
77 void showIncidences(const Akonadi::Item::List &incidenceList, const QDate &date) override;
78
79 void clearSelection() override;
80
81 void changeIncidenceDisplay(const Akonadi::Item &, int);
82
83 void defaultItemAction(const QModelIndex &);
84 void defaultItemAction(const Akonadi::Item::Id id);
85
86 void popupMenu(const QPoint &);
87
88Q_SIGNALS:
89 void showNewEventPopupSignal();
90 void showIncidencePopupSignal(const Akonadi::CollectionCalendar::Ptr &, const Akonadi::Item &, const QDate &);
91
92protected Q_SLOTS:
93 void processSelectionChange();
94
95private:
96 EVENTVIEWS_NO_EXPORT void slotSortIndicatorChanged(int logicalIndex, Qt::SortOrder order);
97
98 std::unique_ptr<ListViewPrivate> const d;
99};
100}
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 multi-column list view of events.
Definition listview.h:32
Q_SCRIPTABLE Q_NOREPLY void start()
Namespace EventViews provides facilities for displaying incidences, including events,...
Definition agenda.h:33
SortOrder
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.