56 #include "qplatformdefs.h" 57 #include "QtCore/qatomic.h" 58 #include "QtCore/qdatetime.h" 59 #include "QtCore/qstringlist.h" 60 #include "QtCore/qlocale.h" 61 #ifndef QT_BOOTSTRAPPED 62 # include "QtCore/qvariant.h" 64 #include "QtCore/qvector.h" 67 #define QDATETIMEEDIT_TIME_MIN QTime(0, 0, 0, 0) 68 #define QDATETIMEEDIT_TIME_MAX QTime(23, 59, 59, 999) 69 #define QDATETIMEEDIT_DATE_MIN QDate(100, 1, 1) 70 #define QDATETIMEEDIT_COMPAT_DATE_MIN QDate(1752, 9, 14) 71 #define QDATETIMEEDIT_DATE_MAX QDate(7999, 12, 31) 72 #define QDATETIMEEDIT_DATETIME_MIN QDateTime(QDATETIMEEDIT_DATE_MIN, QDATETIMEEDIT_TIME_MIN) 73 #define QDATETIMEEDIT_COMPAT_DATETIME_MIN QDateTime(QDATETIMEEDIT_COMPAT_DATE_MIN, QDATETIMEEDIT_TIME_MIN) 74 #define QDATETIMEEDIT_DATETIME_MAX QDateTime(QDATETIMEEDIT_DATE_MAX, QDATETIMEEDIT_TIME_MAX) 75 #define QDATETIMEEDIT_DATE_INITIAL QDate(2000, 1, 1) 110 #ifndef QT_BOOTSTRAPPED 120 : currentSectionIndex(-1),
display(0), cachedDay(-1), parserType(t),
124 first.type = FirstSection;
127 last.type = FirstSection;
146 AmPmSection = 0x00001,
147 MSecSection = 0x00002,
148 SecondSection = 0x00004,
149 MinuteSection = 0x00008,
150 Hour12Section = 0x00010,
151 Hour24Section = 0x00020,
152 TimeSectionMask = (AmPmSection|MSecSection|SecondSection|MinuteSection|Hour12Section|Hour24Section),
154 DaySection = 0x00100,
155 MonthSection = 0x00200,
156 YearSection = 0x00400,
157 YearSection2Digits = 0x00800,
158 DayOfWeekSection = 0x01000,
159 DateSectionMask = (DaySection|MonthSection|YearSection|YearSection2Digits|DayOfWeekSection),
160 FirstSection = 0x02000|Internal,
161 LastSection = 0x04000|Internal,
162 CalendarPopupSection = 0x08000|Internal,
165 FirstSectionIndex = -2,
166 LastSectionIndex = -3,
167 CalendarPopupIndex = -4
201 #ifndef QT_NO_DATESTRING 204 int sectionMaxSize(
int index)
const;
205 int sectionSize(
int index)
const;
206 int sectionMaxSize(
Section s,
int count)
const;
207 int sectionPos(
int index)
const;
212 QString sectionText(
int sectionIndex)
const;
216 int parseSection(
const QDateTime ¤tValue,
int sectionIndex,
QString &txt,
int &cursorPosition,
219 int absoluteMin(
int index)
const;
221 #ifndef QT_NO_DATESTRING 225 #ifndef QT_NO_TEXTDATE 226 int findMonth(
const QString &str1,
int monthstart,
int sectionIndex,
227 QString *monthName = 0,
int *used = 0)
const;
228 int findDay(
const QString &str1,
int intDaystart,
int sectionIndex,
229 QString *dayName = 0,
int *used = 0)
const;
231 int findAmPm(
QString &str1,
int index,
int *used = 0)
const;
232 int maxChange(
int s)
const;
233 bool potentialValue(
const QString &str,
int min,
int max,
int index,
234 const QDateTime ¤tValue,
int insert)
const;
235 bool skipToNextSection(
int section,
const QDateTime ¤t,
const QString §ionText)
const;
236 QString sectionName(
int s)
const;
237 QString stateName(
int s)
const;
239 QString sectionFormat(
int index)
const;
250 FieldInfo fieldInfo(
int index)
const;
283 TTime qt_symbian_QDateTime_To_TTime(
const QDateTime& datetime);
284 time_t qt_symbian_TTime_To_time_t(
const TTime&
time);
285 TTime qt_symbian_time_t_To_TTime(
time_t time);
286 #endif //Q_OS_SYMBIAN 288 #endif // QT_BOOTSTRAPPED 292 #endif // QDATETIME_P_H virtual QString displayText() const
Q_CORE_EXPORT bool operator==(const QDateTimeParser::SectionNode &s1, const QDateTimeParser::SectionNode &s2)
#define QT_END_NAMESPACE
This macro expands to.
virtual QLocale locale() const
#define Q_DECLARE_FLAGS(Flags, Enum)
The Q_DECLARE_FLAGS() macro expands to.
The QAtomicInt class provides platform-independent atomic operations on integers. ...
QVector< SectionNode > sectionNodes
The QDate class provides date functions.
The QString class provides a Unicode character string.
The QVector class is a template class that provides a dynamic array.
static QLocale system()
Returns a QLocale object initialized to the system locale.
The QTime class provides clock time functions.
#define QT_BEGIN_NAMESPACE
This macro expands to.
QVariant::Type parserType
Q_GUI_EXPORT EGLDisplay display()
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
The Q_DECLARE_OPERATORS_FOR_FLAGS() macro declares global operator|() functions for Flags...
The QStringList class provides a list of strings.
Type
This enum type defines the types of variable that a QVariant can contain.
void getUTC(QDate &outDate, QTime &outTime) const
The State element defines configurations of objects and properties.
virtual int cursorPosition() const
static QDateTime addMSecs(const QDateTime &dt, qint64 msecs)
QDateTimeParser(QVariant::Type t, Context ctx)
The QDateTime class provides date and time functions.
int utcOffset
The offset in seconds.
virtual ~QDateTimeParser()
Spec getLocal(QDate &outDate, QTime &outTime) const
QDateTimePrivate(const QDateTimePrivate &other)