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;
85MonthItem *MonthViewPrivate::loadCalendarIncidences(const Akonadi::CollectionCalendar::Ptr &calendar, const QDateTime &startDt, const QDateTime &endDt)
96 if (!q->preferences()->showTodosMonthView() && occurIter.incidence()->type() == KCalendarCore::Incidence::TypeTodo) {
99 if (!q->preferences()->showJournalsMonthView() && occurIter.incidence()->type() == KCalendarCore::Incidence::TypeJournal) {
115 MonthItem *manager = new IncidenceMonthItem(scene, calendar, item, occurIter.incidence(), occurIter.occurrenceStartDate().toLocalTime().date());
180void MonthViewPrivate::calendarIncidenceDeleted(const KCalendarCore::Incidence::Ptr &incidence, const KCalendarCore::Calendar *calendar)
210 d->fullView->isChecked() ? d->fullView->setToolTip(i18nc("@info:tooltip", "Display calendar in a normal size"))
221 minusMonth->setWhatsThis(i18nc("@info:whatsthis", "Click this button and the view will be scrolled back in time by 1 month."));
228 minusWeek->setWhatsThis(i18nc("@info:whatsthis", "Click this button and the view will be scrolled back in time by 1 week."));
235 plusWeek->setWhatsThis(i18nc("@info:whatsthis", "Click this button and the view will be scrolled forward in time by 1 week."));
242 plusMonth->setWhatsThis(i18nc("@info:whatsthis", "Click this button and the view will be scrolled forward in time by 1 month."));
256 connect(d->scene, &MonthScene::showIncidencePopupSignal, this, &MonthView::showIncidencePopupSignal);
262 connect(d->scene, &MonthScene::showNewEventPopupSignal, this, &MonthView::showNewEventPopupSignal);
541 for (QDate date = actualStartDateTime().date(); date <= actualEndDateTime().date(); date = date.addDays(1)) {
548 auto *newItemToReselect = d->loadCalendarIncidences(calendar, actualStartDateTime(), actualEndDateTime());
561 MonthItem *holidayItem = new HolidayMonthItem(d->scene, h.observedStartDate(), h.observedEndDate(), h.name());
567 std::sort(d->scene->mManagerList.begin(), d->scene->mManagerList.end(), MonthItem::greaterThan);
qint64 Id
Id id() const
bool isValid() const
bool hasPayload() const
EventView is the abstract base class from which all other calendar views for event data are derived.
Definition eventview.h:69
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:518
void newEventSignal()
instructs the receiver to create a new event in given collection.
void datesSelected(const KCalendarCore::DateList &datelist)
when the view changes the dates that are selected in one way or another, this signal is emitted.
Changes changes() const
Returns if there are pending changes and a redraw is needed.
Definition eventview.cpp:528
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:189
Akonadi::Item::List selectedIncidences() const override
Definition monthview.cpp:491
bool eventDurationHint(QDateTime &startDt, QDateTime &endDt, bool &allDay) const override
Sets the default start/end date/time for new events.
Definition monthview.cpp:346
void showDates(const QDate &start, const QDate &end, const QDate &preferedMonth=QDate()) override
Definition monthview.cpp:470
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:478
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)
void unregisterObserver(CalendarObserver *observer)
TypeJournal
NonWorkday
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
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
QDate date() const const
bool isValid() const const
void setDate(QDate date)
void setTime(QTime time)
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)
T qobject_cast(QObject *object)
Key_PageUp
bool isActive() const const
void start()
void timeout()
virtual bool event(QEvent *event) override
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
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.