CalendarEvents::CalendarEventsPlugin Class
Plugin for feeding events to a calendar instance. More...
- Header:
#include <CalendarEvents/CalendarEventsPlugin> - CMake:
find_package(KF6 REQUIRED COMPONENTS CalendarEvents)
target_link_libraries(mytarget PRIVATE KF6::CalendarEvents) - Inherits: QObject
List of all members, including inherited members
Public Types
Public Functions
- CalendarEventsPlugin(QObject *parent = nullptr)
- void loadEventsForDateRange(const QDate &startDate, const QDate &endDate)
Signals
- void alternateCalendarDateReady(const QHash<QDate, QCalendar::YearMonthDay> &data) (since 6.0)
- void dataReady(const QMultiHash<QDate, CalendarEvents::EventData> &data)
- void eventModified(const CalendarEvents::EventData &modifiedEvent)
- void eventRemoved(const QString &uid)
- void subLabelReady(const QHash<QDate, CalendarEvents::CalendarEventsPlugin::SubLabel> &data)
Detailed Description
Member Type Documentation
enum CalendarEventsPlugin::SubLabelPriority
| Constant | Value | Description |
|---|---|---|
CalendarEvents::CalendarEventsPlugin::SubLabelPriority::Low |
0 |
Usually used in alternate calendars |
CalendarEvents::CalendarEventsPlugin::SubLabelPriority::Default |
1 |
For holidays or normal events |
CalendarEvents::CalendarEventsPlugin::SubLabelPriority::High |
2 |
For flagged or marked events |
CalendarEvents::CalendarEventsPlugin::SubLabelPriority::Urgent |
3 |
Member Function Documentation
[explicit] CalendarEventsPlugin::CalendarEventsPlugin(QObject *parent = nullptr)
[signal, since 6.0] void CalendarEventsPlugin::alternateCalendarDateReady(const QHash<QDate, QCalendar::YearMonthDay> &data)
Emitted when the plugin has loaded the alternate dates
data A hash containing a QDate key from Gregorian calendar for the alternate date in the value, QDate.
This function was introduced in Qt 6.0.
[signal] void CalendarEventsPlugin::dataReady(const QMultiHash<QDate, CalendarEvents::EventData> &data)
Emitted when the plugin has loaded the events data
data A hash containing a QDate key for the event in the value, CalendarEvents::EventData, which holds all the details for the given event It's a multihash as there can be multiple events in the same day For multi-day events, insert just one with the key being the startdate of the event
[signal] void CalendarEventsPlugin::eventModified(const CalendarEvents::EventData &modifiedEvent)
Should be emitted when there is a modification of an event that was previously returned via the dataReady() signal
event The modified event data
[signal] void CalendarEventsPlugin::eventRemoved(const QString &uid)
Should be emitted when the plugin removes some event from its collection
uid The uid of the event that was removed
[pure virtual] void CalendarEventsPlugin::loadEventsForDateRange(const QDate &startDate, const QDate &endDate)
When this is called, the plugin should load all events data between those two date ranges. Once the data are ready, it should just emit the dataReady() signal. The range is usually one month
startDate the start of the range
endDate the end of the range
[signal] void CalendarEventsPlugin::subLabelReady(const QHash<QDate, CalendarEvents::CalendarEventsPlugin::SubLabel> &data)
Emitted when the plugin has loaded the sublabels
data A hash containing a QDate key for the sublabels in the value, SubLabel.