KHolidays
holidayregion.cpp
205 regionName = QCoreApplication::translate("HolidayRegion", "Germany, Brandenburg", "German region");
209 regionName = QCoreApplication::translate("HolidayRegion", "Germany, Baden-Wuerttemberg", "German region");
213 regionName = QCoreApplication::translate("HolidayRegion", "Germany, Mecklenburg-Hither Pomerania", "German region");
215 regionName = QCoreApplication::translate("HolidayRegion", "Germany, Lower Saxony", "German region");
217 regionName = QCoreApplication::translate("HolidayRegion", "Germany, North Rhine-Westphalia", "German region");
219 regionName = QCoreApplication::translate("HolidayRegion", "Germany, Rhineland-Palatinate", "German region");
221 regionName = QCoreApplication::translate("HolidayRegion", "Germany, Schleswig-Holstein", "German region");
223 regionName = QCoreApplication::translate("HolidayRegion", "Germany, Saarland", "German region");
227 regionName = QCoreApplication::translate("HolidayRegion", "Germany, Saxony-Anhalt", "German region");
229 regionName = QCoreApplication::translate("HolidayRegion", "Germany, Thuringia", "German region");
252 regionName = QCoreApplication::translate("HolidayRegion", "South Australia", "Australian Region");
254 regionName = QCoreApplication::translate("HolidayRegion", "Northern Territory", "Australian Region");
256 regionName = QCoreApplication::translate("HolidayRegion", "Australian Capital Territory", "Australian Region");
258 regionName = QCoreApplication::translate("HolidayRegion", "Western Australia", "Australian Region");
262 regionName = QCoreApplication::translate("HolidayRegion", "Republic of Srpska", "Bosnian and Herzegovinian Region");
265 regionName = QLocale::territoryToString(QLocale::codeToTerritory(country)) + QLatin1String(" (") + subdivision + QLatin1Char(')');
334 tempName = QCoreApplication::translate("HolidayRegion", "%1 - %2", "Holiday file display name, %1 = region name, %2 = holiday type")
384Holiday::List HolidayRegion::rawHolidays(const QDate &startDate, const QDate &endDate, const QString &category) const
402Holiday::List HolidayRegion::rawHolidaysWithAstroSeasons(const QDate &startDate, const QDate &endDate) const
447 if (holidayId.size() < 2 || country.size() < 2 || (country.size() > 2 && country[2] != QLatin1Char('-'))) {
458 // e.g. US or US-CA for California, so we can try match on both but an exact match has priority.
461 // Locale language can have a country code embedded in it e.g. en_GB, which we can try to use if
499 if (!maybeCountry(aRegionCode, localeCountry) && !maybeCountry(aRegionCode, localeLanguageCountry)) {
522 } else if (!regionSubdivisionCountry.isEmpty() && regionSubdivisionCountry == localeSubdivision && regionLanguage == localeLanguage) {
526 } else if (!regionSubdivisionCountry.isEmpty() && regionSubdivisionCountry == localeSubdivision) {
530 } else if (!localeLanguageCountry.isEmpty() && regionCountry == localeLanguageCountry && regionLanguage == localeLanguage) {
538 } else if (!regionSubdivisionCountry.isEmpty() && !localeLanguageCountry.isEmpty() && regionSubdivisionCountry == localeLanguageCountry
bool isHoliday(const QDate &date) const
Checks whether there is any holiday defined for a date.
Definition holidayregion.cpp:429
Holiday::List rawHolidays(const QDate &startDate, const QDate &endDate) const
Definition holidayregion.cpp:393
static QString defaultRegionCode(const QString &country=QString(), const QString &language=QString())
Definition holidayregion.cpp:453
bool isValid() const
Returns whether the instance contains any holiday data.
Definition holidayregion.cpp:373
HolidayRegion(const QString ®ionCode=QString())
Creates a new Holiday Region object for a given standard Region Code.
Definition holidayregion.cpp:118
Holiday::List rawHolidaysWithAstroSeasons(const QDate &startDate, const QDate &endDate) const
Definition holidayregion.cpp:402
static QStringList regionCodes()
Definition holidayregion.cpp:135
HolidayRegion & operator=(const HolidayRegion &)
Assignment operator.
void init(KXmlGuiWindow *window, KGameDifficulty *difficulty=nullptr)
QStringView country(QStringView ifopt)
QString translate(const char *context, const char *sourceText, const char *disambiguation, int n)
void append(QList< T > &&value)
const_reference at(qsizetype i) const const
iterator begin()
qsizetype count() const const
iterator end()
bool isEmpty() const const
void push_back(parameter_type value)
void reserve(qsizetype size)
Territory codeToTerritory(QStringView territoryCode)
QString languageToCode(Language language, LanguageCodeTypes codeTypes)
QString territoryToCode(Territory territory)
QString territoryToString(Territory territory)
LocateDirectory
GenericDataLocation
QStringList locateAll(StandardLocation type, const QString &fileName, LocateOptions options)
QString arg(Args &&... args) const const
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
QString left(qsizetype n) const const
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
QString toLower() const const
QStringView left(qsizetype length) const const
bool isEmpty() const const
qsizetype size() const const
bool startsWith(QChar ch) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:55:49 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:55:49 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.