You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
904 B
33 lines
904 B
/* |
|
SPDX-FileCopyrightText: 2015 Martin Klapetek <mklapetek@kde.org> |
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later |
|
*/ |
|
|
|
#pragma once |
|
|
|
#include <CalendarEvents/CalendarEventsPlugin> |
|
#include <QObject> |
|
|
|
#include <KHolidays/HolidayRegion> |
|
#include <KSharedConfig> |
|
|
|
class HolidaysEventsPlugin : public CalendarEvents::CalendarEventsPlugin |
|
{ |
|
Q_OBJECT |
|
Q_PLUGIN_METADATA(IID "org.kde.CalendarEventsPlugin" FILE "holidayeventsplugin.json") |
|
Q_INTERFACES(CalendarEvents::CalendarEventsPlugin) |
|
|
|
public: |
|
explicit HolidaysEventsPlugin(QObject *parent = nullptr); |
|
~HolidaysEventsPlugin() override; |
|
|
|
void loadEventsForDateRange(const QDate &startDate, const QDate &endDate) override; |
|
|
|
private: |
|
QDate m_lastStartDate; |
|
QDate m_lastEndDate; |
|
QList<KHolidays::HolidayRegion *> m_regions; |
|
QMultiHash<QDate, CalendarEvents::EventData> m_lastData; |
|
KSharedConfig::Ptr m_config; |
|
};
|
|
|