Eventviews
monthview.cpp
44 MonthItem *loadCalendarIncidences(const Akonadi::CollectionCalendar::Ptr &calendar, const QDateTime &startDt, const QDateTime &endDt);
66 void calendarIncidenceDeleted(const KCalendarCore::Incidence::Ptr &incidence, const KCalendarCore::Calendar *calendar) override;
84MonthItem *MonthViewPrivate::loadCalendarIncidences(const Akonadi::CollectionCalendar::Ptr &calendar, const QDateTime &startDt, const QDateTime &endDt)
95 if (!q->preferences()->showTodosMonthView() && occurIter.incidence()->type() == KCalendarCore::Incidence::TypeTodo) {
98 if (!q->preferences()->showJournalsMonthView() && occurIter.incidence()->type() == KCalendarCore::Incidence::TypeJournal) {
114 MonthItem *manager = new IncidenceMonthItem(scene, calendar, item, occurIter.incidence(), occurIter.occurrenceStartDate().toLocalTime().date());
179void MonthViewPrivate::calendarIncidenceDeleted(const KCalendarCore::Incidence::Ptr &incidence, const KCalendarCore::Calendar *calendar)
209 d->fullView->isChecked() ? d->fullView->setToolTip(i18nc("@info:tooltip", "Display calendar in a normal size"))
220 minusMonth->setWhatsThis(i18nc("@info:whatsthis", "Click this button and the view will be scrolled back in time by 1 month."));
227 minusWeek->setWhatsThis(i18nc("@info:whatsthis", "Click this button and the view will be scrolled back in time by 1 week."));
234 plusWeek->setWhatsThis(i18nc("@info:whatsthis", "Click this button and the view will be scrolled forward in time by 1 week."));
241 plusMonth->setWhatsThis(i18nc("@info:whatsthis", "Click this button and the view will be scrolled forward in time by 1 month."));
255 connect(d->scene, &MonthScene::showIncidencePopupSignal, this, &MonthView::showIncidencePopupSignal);
259 connect(d->scene, qOverload<>(&MonthScene::newEventSignal), this, qOverload<>(&EventView::newEventSignal));
260 connect(d->scene, qOverload<const QDate &>(&MonthScene::newEventSignal), this, qOverload<const QDate &>(&EventView::newEventSignal));
262 connect(d->scene, &MonthScene::showNewEventPopupSignal, this, &MonthView::showNewEventPopupSignal);
577 for (QDate date = actualStartDateTime().date(); date <= actualEndDateTime().date(); date = date.addDays(1)) {
584 auto *newItemToReselect = d->loadCalendarIncidences(calendar, actualStartDateTime(), actualEndDateTime());
597 MonthItem *holidayItem = new HolidayMonthItem(d->scene, h.observedStartDate(), h.observedEndDate(), h.name());
603 std::sort(d->scene->mManagerList.begin(), d->scene->mManagerList.end(), MonthItem::greaterThan);
637 return actualStartDateTime().date().addDays(actualStartDateTime().date().daysTo(actualEndDateTime().date()) / 2);
qint64 Id
Id id() const
bool isValid() const
bool hasPayload() const
QList< Item > List
bool processKeyEvent(QKeyEvent *)
Handles key events, opens the new event dialog when enter is pressed, activates type ahead.
Definition eventview.cpp:337
virtual void setChanges(Changes changes)
Notifies the view that there are pending changes so a redraw is needed.
Definition eventview.cpp:526
void newEventSignal()
instructs the receiver to create a new event in given collection.
Changes changes() const
Returns if there are pending changes and a redraw is needed.
Definition eventview.cpp:536
virtual void setDateRange(const QDateTime &start, const QDateTime &end, const QDate &preferredMonth=QDate())
Definition eventview.cpp:297
QList< MonthItem * > mMonthItemList
This is used to get the height of the minimum height (vertical position) in the month cells.
Definition monthgraphicsitems.h:59
static bool greaterThan(const MonthItem *e1, const MonthItem *e2)
Compares two items to decide which to place in the view first.
Definition monthitem.cpp:217
QDate startDate() const
The start date of the incidence, generally realStartDate.
Definition monthitem.cpp:184
virtual QDate realStartDate() const =0
This is the real start date, usually the start date of the incidence.
QDateTime selectionStart() const override
Returns the start of the selection, or an invalid QDateTime if there is no selection or the view does...
Definition monthview.cpp:324
void setDateRange(const QDateTime &start, const QDateTime &end, const QDate &preferredMonth=QDate()) override
Definition monthview.cpp:339
MonthView(NavButtonsVisibility visibility=Visible, QWidget *parent=nullptr)
MonthView.
Definition monthview.cpp:188
Akonadi::Item::List selectedIncidences() const override
Definition monthview.cpp:527
bool eventDurationHint(QDateTime &startDt, QDateTime &endDt, bool &allDay) const override
Sets the default start/end date/time for new events.
Definition monthview.cpp:374
void showDates(const QDate &start, const QDate &end, const QDate &preferedMonth=QDate()) override
Definition monthview.cpp:506
QPair< QDateTime, QDateTime > actualDateRange(const QDateTime &start, const QDateTime &end, const QDate &preferredMonth=QDate()) const override
from the requested date range (passed via setDateRange()), calculates the adjusted date range actuall...
Definition monthview.cpp:514
QDateTime selectionEnd() const override
Returns the end of the selection, or an invalid QDateTime if there is no selection or the view doesn'...
Definition monthview.cpp:333
int currentDateCount() const override
Returns the number of currently shown dates.
Definition monthview.cpp:301
KCalendarCore::DateList selectedIncidenceDates() const override
Returns dates of the currently selected events.
Definition monthview.cpp:306
virtual void calendarIncidenceDeleted(const Incidence::Ptr &incidence, const Calendar *calendar)
QSharedPointer< Calendar > Ptr
void unregisterObserver(CalendarObserver *observer)
TypeJournal
QSharedPointer< Incidence > Ptr
QList< Holiday > List
NonWorkday
Q_SCRIPTABLE QString start(QString train="")
Q_SCRIPTABLE Q_NOREPLY void start()
QString i18nc(const char *context, const char *text, const TYPE &arg...)
AKONADI_CALENDAR_EXPORT KCalendarCore::Incidence::Ptr incidence(const Akonadi::Item &item)
Namespace EventViews provides facilities for displaying incidences, including events,...
Definition agenda.h:33
QList< QDate > DateList
bool isValid(QStringView ifopt)
KIOCORE_EXPORT QStringList list(const QString &fileClass)
const QList< QKeySequence > & end()
void clicked(bool checked)
QDate addDays(qint64 ndays) const const
qint64 daysTo(QDate d) const const
bool isValid(int year, int month, int day)
int month() const const
QDateTime startOfDay() const const
int year() const const
QDateTime addDays(qint64 ndays) const const
QDateTime currentDateTime()
QDate date() const const
bool isValid() const const
void setDate(QDate date)
void setTime(QTime time)
QTime time() const const
NoFrame
QIcon fromTheme(const QString &name)
void append(QList< T > &&value)
void reserve(qsizetype size)
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QObject * parent() const const
T qobject_cast(QObject *object)
Key_PageUp
QTime addSecs(int s) const const
bool isValid(int h, int m, int s, int ms)
int minute() const const
int second() const const
void timeout()
QWidget(QWidget *parent, Qt::WindowFlags f)
virtual bool event(QEvent *event) override
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Apr 25 2025 11:46:21 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Apr 25 2025 11:46:21 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.