Verified Commit f2a0de9a authored by Fushan Wen's avatar Fushan Wen 💬
Browse files

alternatecalendar: Maintain a list of calendar systems

As QCalendar only provides some calendar systems, we need to maintain
our own list of calendar systems.

CCBUG: 429892
parent c89698e3
/*
SPDX-FileCopyrightText: 2022 Fushan Wen <qydwhotmail@gmail.com>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include <QCalendar>
#include <QMetaType>
class CalendarSystem
{
Q_GADGET
public:
enum System {
Gregorian = static_cast<int>(QCalendar::System::Gregorian),
#ifndef QT_BOOTSTRAPPED
Julian = static_cast<int>(QCalendar::System::Julian),
Milankovic = static_cast<int>(QCalendar::System::Milankovic),
#endif
#if QT_CONFIG(jalalicalendar)
Jalali = static_cast<int>(QCalendar::System::Jalali),
#endif
#if QT_CONFIG(islamiccivilcalendar)
IslamicCivil = static_cast<int>(QCalendar::System::IslamicCivil),
#endif
};
Q_ENUM(System)
};
Q_DECLARE_METATYPE(CalendarSystem)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment