digiKam
|
Public Types | |
enum | CalendarSystem { DefaultCalendar = 0 , GregorianCalendar = 1 , ChineseCalendar = 2 , CopticCalendar = 3 , EthiopicCalendar = 4 , EthiopicAmeteAlemCalendar = 5 , HebrewCalendar = 6 , IndianNationalCalendar = 7 , IslamicCalendar = 8 , IslamicCivilCalendar = 9 , ISO8601Calendar = 10 , JapaneseCalendar = 11 , JulianCalendar = 12 , PersianCalendar = 13 , ROCCalendar = 14 , ThaiCalendar = 15 , LastCalendar = ThaiCalendar } |
Public Member Functions | |
QDate | addDays (const QDate &date, int days) const |
QDate | addMonths (const QDate &date, int months) const |
QDate | addYears (const QDate &date, int years) const |
CalSystem::CalendarSystem | calendarSystem () const |
CalSystem (CalSystem::CalendarSystem calendar=CalSystem::DefaultCalendar) | |
QDate | date (int year, int dayOfYear) const |
QDate | date (int year, int month, int day) const |
bool | dateDifference (const QDate &fromDate, const QDate &toDate, int *years, int *months, int *days, int *direction) const |
int | day (const QDate &date) const |
int | dayOfWeek (const QDate &date) const |
int | dayOfWeek (int year, int month, int day) const |
int | dayOfYear (const QDate &date) const |
int | dayOfYear (int year, int month, int day) const |
qint64 | daysDifference (const QDate &fromDate, const QDate &toDate) const |
int | daysInMonth (const QDate &date) const |
int | daysInMonth (int year, int month) const |
int | daysInWeek () const |
int | daysInYear (const QDate &date) const |
int | daysInYear (int year) const |
QDate | earliestValidDate () const |
QDate | epoch () const |
QDate | firstDayOfMonth (const QDate &date) const |
QDate | firstDayOfMonth (int year, int month) const |
QDate | firstDayOfYear (const QDate &date) const |
QDate | firstDayOfYear (int year) const |
void | getDate (const QDate &date, int *year, int *month, int *day) const |
bool | isLeapYear (const QDate &date) const |
bool | isLeapYear (int year) const |
bool | isValid (const QDate &date) const |
bool | isValid (int year, int dayOfYear) const |
bool | isValid (int year, int month, int day) const |
QDate | lastDayOfMonth (const QDate &date) const |
QDate | lastDayOfMonth (int year, int month) const |
QDate | lastDayOfYear (const QDate &date) const |
QDate | lastDayOfYear (int year) const |
QDate | latestValidDate () const |
int | maximumDaysInMonth () const |
int | maximumDaysInYear () const |
int | maximumMonthsInYear () const |
int | month (const QDate &date) const |
int | monthsDifference (const QDate &fromDate, const QDate &toDate) const |
int | monthsInYear (const QDate &date) const |
int | monthsInYear (int year) const |
CalSystem & | operator= (const CalSystem &other) |
int | quarter (const QDate &date) const |
int | quarter (int year, int month, int day) const |
int | weekNumber (const QDate &date, int *yearNum=nullptr) const |
int | weekNumber (int year, int month, int day, int *yearNum=nullptr) const |
int | weeksInYear (const QDate &date) const |
int | weeksInYear (int year) const |
int | year (const QDate &date) const |
int | yearsDifference (const QDate &fromDate, const QDate &toDate) const |
~CalSystem () | |
|
explicit |
DigikamGenericCalendarPlugin::CalSystem::~CalSystem | ( | ) |
QDate DigikamGenericCalendarPlugin::CalSystem::addDays | ( | const QDate & | date, |
int | days | ||
) | const |
References date().
Referenced by weeksInYear().
QDate DigikamGenericCalendarPlugin::CalSystem::addMonths | ( | const QDate & | date, |
int | months | ||
) | const |
QDate DigikamGenericCalendarPlugin::CalSystem::addYears | ( | const QDate & | date, |
int | years | ||
) | const |
CalSystem::CalendarSystem DigikamGenericCalendarPlugin::CalSystem::calendarSystem | ( | ) | const |
QDate DigikamGenericCalendarPlugin::CalSystem::date | ( | int | year, |
int | dayOfYear | ||
) | const |
References dayOfYear(), isValid(), and year().
QDate DigikamGenericCalendarPlugin::CalSystem::date | ( | int | year, |
int | month, | ||
int | day | ||
) | const |
References day(), isValid(), month(), and year().
Referenced by addDays(), addMonths(), addYears(), DigikamGenericCalendarPlugin::CalTemplate::CalTemplate(), day(), dayOfWeek(), dayOfYear(), daysInMonth(), daysInYear(), firstDayOfMonth(), firstDayOfYear(), getDate(), DigikamGenericCalendarPlugin::CalSettings::getDayColor(), DigikamGenericCalendarPlugin::CalSettings::getDayDescr(), isLeapYear(), DigikamGenericCalendarPlugin::CalSettings::isSpecial(), isValid(), lastDayOfMonth(), lastDayOfYear(), month(), monthsInYear(), DigikamGenericCalendarPlugin::CalPainter::paint(), quarter(), weekNumber(), weeksInYear(), and year().
bool DigikamGenericCalendarPlugin::CalSystem::dateDifference | ( | const QDate & | fromDate, |
const QDate & | toDate, | ||
int * | years, | ||
int * | months, | ||
int * | days, | ||
int * | direction | ||
) | const |
Caters for Leap Months, but possibly not for Hebrew
References addMonths(), daysInMonth(), isValid(), month(), and yearsDifference().
int DigikamGenericCalendarPlugin::CalSystem::day | ( | const QDate & | date | ) | const |
References date(), and isValid().
Referenced by addMonths(), addYears(), date(), dayOfWeek(), dayOfYear(), getDate(), isValid(), quarter(), and weekNumber().
int DigikamGenericCalendarPlugin::CalSystem::dayOfWeek | ( | const QDate & | date | ) | const |
References date(), daysInWeek(), and isValid().
Referenced by dayOfWeek(), and weekNumber().
int DigikamGenericCalendarPlugin::CalSystem::dayOfWeek | ( | int | year, |
int | month, | ||
int | day | ||
) | const |
References date(), day(), dayOfWeek(), month(), and year().
int DigikamGenericCalendarPlugin::CalSystem::dayOfYear | ( | const QDate & | date | ) | const |
References date(), firstDayOfYear(), and isValid().
Referenced by date(), dayOfYear(), isValid(), and weekNumber().
int DigikamGenericCalendarPlugin::CalSystem::dayOfYear | ( | int | year, |
int | month, | ||
int | day | ||
) | const |
References date(), day(), dayOfYear(), month(), and year().
qint64 DigikamGenericCalendarPlugin::CalSystem::daysDifference | ( | const QDate & | fromDate, |
const QDate & | toDate | ||
) | const |
References isValid().
int DigikamGenericCalendarPlugin::CalSystem::daysInMonth | ( | const QDate & | date | ) | const |
References date(), isValid(), month(), and year().
Referenced by dateDifference(), isValid(), lastDayOfMonth(), and DigikamGenericCalendarPlugin::CalPainter::paint().
int DigikamGenericCalendarPlugin::CalSystem::daysInMonth | ( | int | year, |
int | month | ||
) | const |
int DigikamGenericCalendarPlugin::CalSystem::daysInWeek | ( | ) | const |
Referenced by dayOfWeek().
int DigikamGenericCalendarPlugin::CalSystem::daysInYear | ( | const QDate & | date | ) | const |
int DigikamGenericCalendarPlugin::CalSystem::daysInYear | ( | int | year | ) | const |
References year().
QDate DigikamGenericCalendarPlugin::CalSystem::earliestValidDate | ( | ) | const |
Referenced by isValid().
QDate DigikamGenericCalendarPlugin::CalSystem::epoch | ( | ) | const |
QDate DigikamGenericCalendarPlugin::CalSystem::firstDayOfMonth | ( | const QDate & | date | ) | const |
QDate DigikamGenericCalendarPlugin::CalSystem::firstDayOfMonth | ( | int | year, |
int | month | ||
) | const |
QDate DigikamGenericCalendarPlugin::CalSystem::firstDayOfYear | ( | const QDate & | date | ) | const |
References date(), isValid(), and year().
Referenced by dayOfYear().
QDate DigikamGenericCalendarPlugin::CalSystem::firstDayOfYear | ( | int | year | ) | const |
void DigikamGenericCalendarPlugin::CalSystem::getDate | ( | const QDate & | date, |
int * | year, | ||
int * | month, | ||
int * | day | ||
) | const |
References date(), day(), isValid(), month(), and year().
Referenced by firstDayOfMonth(), and lastDayOfMonth().
bool DigikamGenericCalendarPlugin::CalSystem::isLeapYear | ( | const QDate & | date | ) | const |
bool DigikamGenericCalendarPlugin::CalSystem::isLeapYear | ( | int | year | ) | const |
References year().
bool DigikamGenericCalendarPlugin::CalSystem::isValid | ( | const QDate & | date | ) | const |
References date(), earliestValidDate(), and latestValidDate().
Referenced by addMonths(), addYears(), date(), dateDifference(), day(), dayOfWeek(), dayOfYear(), daysDifference(), daysInMonth(), daysInYear(), firstDayOfYear(), getDate(), isLeapYear(), lastDayOfYear(), month(), monthsDifference(), monthsInYear(), quarter(), weekNumber(), weeksInYear(), year(), and yearsDifference().
bool DigikamGenericCalendarPlugin::CalSystem::isValid | ( | int | year, |
int | dayOfYear | ||
) | const |
References dayOfYear(), daysInYear(), and year().
bool DigikamGenericCalendarPlugin::CalSystem::isValid | ( | int | year, |
int | month, | ||
int | day | ||
) | const |
References day(), daysInMonth(), month(), and year().
QDate DigikamGenericCalendarPlugin::CalSystem::lastDayOfMonth | ( | const QDate & | date | ) | const |
References date(), daysInMonth(), getDate(), month(), and year().
QDate DigikamGenericCalendarPlugin::CalSystem::lastDayOfMonth | ( | int | year, |
int | month | ||
) | const |
References date(), daysInMonth(), month(), and year().
QDate DigikamGenericCalendarPlugin::CalSystem::lastDayOfYear | ( | const QDate & | date | ) | const |
References date(), isValid(), and year().
Referenced by weeksInYear().
QDate DigikamGenericCalendarPlugin::CalSystem::lastDayOfYear | ( | int | year | ) | const |
QDate DigikamGenericCalendarPlugin::CalSystem::latestValidDate | ( | ) | const |
Referenced by isValid().
int DigikamGenericCalendarPlugin::CalSystem::maximumDaysInMonth | ( | ) | const |
int DigikamGenericCalendarPlugin::CalSystem::maximumDaysInYear | ( | ) | const |
int DigikamGenericCalendarPlugin::CalSystem::maximumMonthsInYear | ( | ) | const |
int DigikamGenericCalendarPlugin::CalSystem::month | ( | const QDate & | date | ) | const |
References date(), and isValid().
Referenced by addMonths(), addYears(), date(), dateDifference(), dayOfWeek(), dayOfYear(), daysInMonth(), firstDayOfMonth(), getDate(), isValid(), lastDayOfMonth(), quarter(), and weekNumber().
int DigikamGenericCalendarPlugin::CalSystem::monthsDifference | ( | const QDate & | fromDate, |
const QDate & | toDate | ||
) | const |
Caters for Leap Months, but possibly not for Hebrew
References isValid(), and monthsInYear().
int DigikamGenericCalendarPlugin::CalSystem::monthsInYear | ( | const QDate & | date | ) | const |
References date(), isValid(), and year().
Referenced by DigikamGenericCalendarPlugin::CalTemplate::CalTemplate(), and monthsDifference().
int DigikamGenericCalendarPlugin::CalSystem::monthsInYear | ( | int | year | ) | const |
References year().
int DigikamGenericCalendarPlugin::CalSystem::quarter | ( | const QDate & | date | ) | const |
int DigikamGenericCalendarPlugin::CalSystem::quarter | ( | int | year, |
int | month, | ||
int | day | ||
) | const |
int DigikamGenericCalendarPlugin::CalSystem::weekNumber | ( | const QDate & | date, |
int * | yearNum = nullptr |
||
) | const |
int DigikamGenericCalendarPlugin::CalSystem::weekNumber | ( | int | year, |
int | month, | ||
int | day, | ||
int * | yearNum = nullptr |
||
) | const |
TODO: These are ISO weeks, may need to localise
References day(), dayOfWeek(), dayOfYear(), isValid(), month(), and year().
int DigikamGenericCalendarPlugin::CalSystem::weeksInYear | ( | const QDate & | date | ) | const |
int DigikamGenericCalendarPlugin::CalSystem::weeksInYear | ( | int | year | ) | const |
TODO: This is ISO weeks, may need to localise
References addDays(), lastDayOfYear(), weekNumber(), and year().
int DigikamGenericCalendarPlugin::CalSystem::year | ( | const QDate & | date | ) | const |
References date(), and isValid().
Referenced by addMonths(), addYears(), DigikamGenericCalendarPlugin::CalTemplate::CalTemplate(), date(), dayOfWeek(), dayOfYear(), daysInMonth(), daysInYear(), firstDayOfMonth(), firstDayOfYear(), getDate(), isLeapYear(), isValid(), lastDayOfMonth(), lastDayOfYear(), monthsInYear(), quarter(), weekNumber(), and weeksInYear().
int DigikamGenericCalendarPlugin::CalSystem::yearsDifference | ( | const QDate & | fromDate, |
const QDate & | toDate | ||
) | const |
Caters for Leap Months, but possibly not for Hebrew
References isValid().
Referenced by dateDifference().