File indexing completed on 2024-06-23 05:23:48
0001 /* 0002 SPDX-FileCopyrightText: 2023 Fushan Wen <qydwhotmail@gmail.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "abstractcalendarprovider.h" 0010 0011 /** 0012 * @brief An alternate calendar provider for Islamic/the Hijri calendar system. 0013 * 0014 * There are 3 kinds of Islamic calendars. 0015 * See https://cldr.unicode.org/development/development-process/design-proposals/islamic-calendar-types 0016 * for more details. 0017 */ 0018 class IslamicCalendarProvider : public AbstractCalendarProvider 0019 { 0020 Q_OBJECT 0021 0022 public: 0023 explicit IslamicCalendarProvider(QObject *parent, CalendarSystem::System calendarSystem, const QDate &startDate, const QDate &endDate, int dateOffset); 0024 ~IslamicCalendarProvider() override; 0025 0026 QCalendar::YearMonthDay fromGregorian(const QDate &date) const override; 0027 CalendarEvents::CalendarEventsPlugin::SubLabel subLabel(const QDate &date) const override; 0028 0029 private: 0030 const std::unique_ptr<class IslamicCalendarProviderPrivate> d; 0031 };