#include <qdatetimeparser_p.h>
|
enum | Context { FromString
, DateTimeEdit
} |
|
enum | Section {
NoSection = 0x00000
, AmPmSection = 0x00001
, MSecSection = 0x00002
, SecondSection = 0x00004
,
MinuteSection = 0x00008
, Hour12Section = 0x00010
, Hour24Section = 0x00020
, TimeZoneSection = 0x00040
,
HourSectionMask = (Hour12Section | Hour24Section)
, TimeSectionMask
, DaySection = 0x00100
, MonthSection = 0x00200
,
YearSection = 0x00400
, YearSection2Digits = 0x00800
, YearSectionMask = YearSection | YearSection2Digits
, DayOfWeekSectionShort = 0x01000
,
DayOfWeekSectionLong = 0x02000
, DayOfWeekSectionMask = DayOfWeekSectionShort | DayOfWeekSectionLong
, DaySectionMask = DaySection | DayOfWeekSectionMask
, DateSectionMask = DaySectionMask | MonthSection | YearSectionMask
,
Internal = 0x10000
, FirstSection = 0x20000 | Internal
, LastSection = 0x40000 | Internal
, CalendarPopupSection = 0x80000 | Internal
} |
|
enum | State { Invalid
, Intermediate
, Acceptable
} |
|
enum | AmPm { AmText
, PmText
} |
|
enum | FieldInfoFlag { Numeric = 0x01
, FixedWidth = 0x02
, AllowPartial = 0x04
, Fraction = 0x08
} |
|
|
| QDateTimeParser (QMetaType::Type t, Context ctx, QCalendar cal=QCalendar()) |
|
virtual | ~QDateTimeParser () |
|
StateNode | parse (const QString &input, int position, const QDateTime &defaultValue, bool fixup) const |
|
bool | fromString (const QString &text, QDate *date, QTime *time, int baseYear=QLocale::DefaultTwoDigitBaseYear) const |
|
bool | fromString (const QString &text, QDateTime *datetime, int baseYear) const |
|
bool | parseFormat (QStringView format) |
|
FieldInfo | fieldInfo (int index) const |
|
void | setDefaultLocale (const QLocale &loc) |
|
virtual QString | displayText () const |
|
void | setCalendar (QCalendar calendar) |
| Sets cal as the calendar to use.
|
|
Definition at line 43 of file qdatetimeparser_p.h.
◆ AmPm
◆ Context
◆ FieldInfoFlag
◆ Section
Enumerator |
---|
NoSection | |
AmPmSection | |
MSecSection | |
SecondSection | |
MinuteSection | |
Hour12Section | |
Hour24Section | |
TimeZoneSection | |
HourSectionMask | |
TimeSectionMask | |
DaySection | |
MonthSection | |
YearSection | |
YearSection2Digits | |
YearSectionMask | |
DayOfWeekSectionShort | |
DayOfWeekSectionLong | |
DayOfWeekSectionMask | |
DaySectionMask | |
DateSectionMask | |
Internal | |
FirstSection | |
LastSection | |
CalendarPopupSection | |
Definition at line 56 of file qdatetimeparser_p.h.
◆ State
◆ QDateTimeParser()
◆ ~QDateTimeParser()
QDateTimeParser::~QDateTimeParser |
( |
| ) |
|
|
virtual |
◆ absoluteMax()
◆ absoluteMin()
int QDateTimeParser::absoluteMin |
( |
int | s | ) |
const |
|
protected |
◆ cursorPosition()
virtual int QDateTimeParser::cursorPosition |
( |
| ) |
const |
|
inlineprotectedvirtual |
◆ displayText()
virtual QString QDateTimeParser::displayText |
( |
| ) |
const |
|
inlinevirtual |
◆ fieldInfo()
QDateTimeParser::FieldInfo QDateTimeParser::fieldInfo |
( |
int | index | ) |
const |
◆ fromString() [1/2]
◆ fromString() [2/2]
bool QDateTimeParser::fromString |
( |
const QString & | text, |
|
|
QDateTime * | datetime, |
|
|
int | baseYear ) const |
◆ getDigit()
int QDateTimeParser::getDigit |
( |
const QDateTime & | t, |
|
|
int | index ) const |
|
protected |
◆ getMaximum()
◆ getMinimum()
◆ locale()
virtual QLocale QDateTimeParser::locale |
( |
| ) |
const |
|
inlineprotectedvirtual |
◆ parse()
◆ parseFormat()
bool QDateTimeParser::parseFormat |
( |
QStringView | newFormat | ) |
|
Parses the format newFormat. If successful, returns true
and sets up the format. Else keeps the old format and returns false
.
Definition at line 430 of file qdatetimeparser.cpp.
◆ sectionMaxSize()
int QDateTimeParser::sectionMaxSize |
( |
int | index | ) |
const |
|
protected |
◆ sectionNode()
◆ sectionPos() [1/2]
int QDateTimeParser::sectionPos |
( |
int | sectionIndex | ) |
const |
|
protected |
◆ sectionPos() [2/2]
int QDateTimeParser::sectionPos |
( |
SectionNode | sn | ) |
const |
|
protected |
◆ sectionSize()
int QDateTimeParser::sectionSize |
( |
int | sectionIndex | ) |
const |
|
protected |
◆ sectionText()
QString QDateTimeParser::sectionText |
( |
int | sectionIndex | ) |
const |
|
protected |
◆ sectionType()
◆ setCalendar()
◆ setDefaultLocale()
void QDateTimeParser::setDefaultLocale |
( |
const QLocale & | loc | ) |
|
|
inline |
◆ setDigit()
bool QDateTimeParser::setDigit |
( |
QDateTime & | v, |
|
|
int | index, |
|
|
int | newVal ) const |
|
protected |
◆ skipToNextSection() [1/2]
bool QDateTimeParser::skipToNextSection |
( |
int | section, |
|
|
const QDateTime & | current, |
|
|
const QString & | sectionText ) const |
|
inlineprotected |
◆ skipToNextSection() [2/2]
bool QDateTimeParser::skipToNextSection |
( |
int | index, |
|
|
const QDateTime & | current, |
|
|
QStringView | text ) const |
|
protected |
◆ stateName()
◆ QDTPUnitTestParser
friend class QDTPUnitTestParser |
|
friend |
◆ cachedDay
int QDateTimeParser::cachedDay = -1 |
|
mutableprotected |
◆ calendar
◆ context
◆ currentSectionIndex
◆ defaultCenturyStart
◆ defaultLocale
QLocale QDateTimeParser::defaultLocale |
|
protected |
◆ display
◆ displayFormat
QString QDateTimeParser::displayFormat |
|
protected |
◆ FirstSectionIndex
int QDateTimeParser::FirstSectionIndex = -2 |
|
staticconstexpr |
◆ fixday
bool QDateTimeParser::fixday = false |
|
protected |
◆ LastSectionIndex
int QDateTimeParser::LastSectionIndex = -3 |
|
staticconstexpr |
◆ m_text
◆ NoSectionIndex
◆ parserType
◆ sectionNodes
◆ separators
The documentation for this class was generated from the following files: