20 #ifndef KDATETIMEEDIT_H
21 #define KDATETIMEEDIT_H
25 #include <QtGui/QWidget>
30 class KDateTimeEditPrivate;
37 Q_PROPERTY(
QDate date READ date WRITE setDate NOTIFY dateChanged USER
true)
38 Q_PROPERTY(
QTime time READ time WRITE setTime NOTIFY timeChanged USER true)
39 Q_PROPERTY(
int timeListInterval READ timeListInterval WRITE setTimeListInterval)
40 Q_PROPERTY(Options options READ options WRITE setOptions)
51 ShowCalendar = 0x00001,
54 ShowTimeSpec = 0x00008,
59 SelectCalendar = 0x00100,
62 SelectTimeSpec = 0x00800,
64 DateKeywords = 0x02000,
66 WarnOnInvalid = 0x08000
68 Q_DECLARE_FLAGS(Options,
Option)
85 Options options() const;
101 KLocale::CalendarSystem calendarSystem() const;
144 QList<
KLocale::CalendarSystem> calendarSystemsList() const;
167 KLocale::DateFormat dateDisplayFormat() const;
185 KLocale::TimeFormatOptions timeDisplayFormat() const;
192 int timeListInterval() const;
219 bool isValid() const;
237 bool isValidDate() const;
245 bool isNullDate() const;
254 bool isValidTime() const;
262 bool isNullTime() const;
273 void dateTimeEntered(const
KDateTime &dateTime);
283 void dateTimeChanged(const
KDateTime &dateTime);
292 void dateTimeEdited(const
KDateTime &dateTime);
299 void calendarEntered(
KLocale::CalendarSystem calendarSystem);
307 void calendarChanged(
KLocale::CalendarSystem calendarSystem);
316 void dateEntered(const QDate &date);
326 void dateChanged(const QDate &date);
335 void dateEdited(const QDate &date);
344 void timeEntered(const
QTime &time);
354 void timeChanged(const
QTime &time);
363 void timeEdited(const
QTime &time);
370 void timeSpecEntered(const
KDateTime::Spec &spec);
378 void timeSpecChanged(const
KDateTime::Spec &spec);
387 void setOptions(Options options);
394 void setDateTime(const
KDateTime &dateTime);
403 void setCalendarSystem(
KLocale::CalendarSystem calendarSystem);
419 void setDate(const QDate &date);
426 void setTime(const
QTime &time);
433 void setTimeSpec(const
KDateTime::Spec &spec);
447 void setDateTimeRange(const
KDateTime &minDateTime,
450 const QString &maxWarnMsg = QString());
455 void resetDateTimeRange();
468 void setMinimumDateTime(const
KDateTime &minDateTime, const QString &minWarnMsg = QString());
473 void resetMinimumDateTime();
486 void setMaximumDateTime(const
KDateTime &maxDateTime, const QString &maxWarnMsg = QString());
491 void resetMaximumDateTime();
500 void setDateDisplayFormat(
KLocale::DateFormat format);
507 void setCalendarSystemsList(
QList<
KLocale::CalendarSystem> calendars);
524 void setDateMap(
QMap<QDate, QString> dateMap);
533 void setTimeDisplayFormat(
KLocale::TimeFormatOptions formatOptions);
554 void setTimeListInterval(
int minutes);
574 const QString &minWarnMsg = QString(),
575 const QString &maxWarnMsg = QString());
582 void setTimeZones(const
KTimeZones::ZoneMap &zones);
599 virtual
void assignDateTime(const
KDateTime &dateTime);
609 virtual
void assignDate(const QDate &date);
619 void assignCalendarSystem(
KLocale::CalendarSystem calendarSystem);
629 virtual
void assignTime(const
QTime &time);
639 void assignTimeSpec(const
KDateTime::Spec &spec);
643 friend class KDateTimeEditPrivate;
644 KDateTimeEditPrivate *const d;
646 Q_PRIVATE_SLOT(d,
void selectCalendar(
int))
647 Q_PRIVATE_SLOT(d,
void enterCalendar(
KLocale::CalendarSystem))
648 Q_PRIVATE_SLOT(d,
void selectTimeZone(
int))
649 Q_PRIVATE_SLOT(d,
void enterTimeZone(const QString&))
652 Q_DECLARE_OPERATORS_FOR_FLAGS(KDateTimeEdit::Options)
654 #endif // KDATETIMEEDIT_H
Option
Options provided by the widget.