KWidgetsAddons
kdatetimeedit.cpp
58 m_options = KDateTimeEdit::ShowDate | KDateTimeEdit::EditDate | KDateTimeEdit::SelectDate | KDateTimeEdit::ShowTime | KDateTimeEdit::EditTime
143 ui.m_calendarCombo->setVisible((m_options & KDateTimeEdit::ShowCalendar) == KDateTimeEdit::ShowCalendar);
144 ui.m_calendarCombo->setEnabled((m_options & KDateTimeEdit::SelectCalendar) == KDateTimeEdit::SelectCalendar);
171 ui.m_timeZoneCombo->addItem(KDateTimeEdit::tr("UTC", "@item:inlistbox UTC time zone"), QByteArray("UTC"));
172 ui.m_timeZoneCombo->addItem(KDateTimeEdit::tr("Floating", "@item:inlistbox No specific time zone"), QByteArray());
176 ui.m_timeZoneCombo->setVisible((m_options & KDateTimeEdit::ShowTimeZone) == KDateTimeEdit::ShowTimeZone);
177 ui.m_timeZoneCombo->setEnabled((m_options & KDateTimeEdit::SelectTimeZone) == KDateTimeEdit::SelectTimeZone);
202 if (!q->isValid() && (m_options & KDateTimeEdit::WarnOnInvalid) == KDateTimeEdit::WarnOnInvalid) {
210 // warnMsg = q->tr("Date and time cannot be earlier than %1", "@info").arg(formatDate(m_minDate));
211 warnMsg = KDateTimeEdit::tr("The entered date and time is before the minimum allowed date and time.", "@info");
221 warnMsg = KDateTimeEdit::tr("The entered date and time is after the maximum allowed date and time.", "@info");
485void KDateTimeEdit::setTimeList(QList<QTime> timeList, const QString &minWarnMsg, const QString &maxWarnMsg)
@ EditDate
Allow the user to manually edit the date in the combo line edit.
Definition kdatecombobox.h:38
void dateChanged(const QDate &date)
Signal if the date has been changed either manually by the user or programmatically.
void resetMinimumDateTime()
Reset the minimum date and time to the default.
Definition kdatetimeedit.cpp:397
virtual void assignDateTime(const QDateTime &dateTime)
Assign the date, time and time zone for the widget.
Definition kdatetimeedit.cpp:333
void setTimeZones(const QList< QTimeZone > &zones)
Set the time zones able to be selected.
Definition kdatetimeedit.cpp:495
void setDateMap(QMap< QDate, QString > dateMap)
Set the list of dates able to be selected from the drop-down and the string form to display for those...
Definition kdatetimeedit.cpp:455
void assignTimeZone(const QTimeZone &zone)
Assign the time zone for the widget.
Definition kdatetimeedit.cpp:381
bool isNullTime() const
Return if the current user input time is null.
Definition kdatetimeedit.cpp:305
void resetDateTimeRange()
Reset the minimum and maximum date and time to the default.
Definition kdatetimeedit.cpp:427
@ WarnOnInvalid
Show a warning on focus out if the date or time is invalid.
Definition kdatetimeedit.h:54
void dateChanged(const QDate &date)
Signal if the date has been changed either manually by the user or programmatically.
void setMinimumDateTime(const QDateTime &minDateTime, const QString &minWarnMsg=QString())
Set the minimum allowed date.
Definition kdatetimeedit.cpp:387
void timeZoneEntered(const QTimeZone &zone)
Signal if the time zone has been changed manually by the user.
void setMaximumDateTime(const QDateTime &maxDateTime, const QString &maxWarnMsg=QString())
Set the maximum allowed date.
Definition kdatetimeedit.cpp:402
QDateTime dateTime() const
Return the currently selected date, time and time zone.
Definition kdatetimeedit.cpp:258
virtual void assignTime(const QTime &time)
Assign the time for the widget.
Definition kdatetimeedit.cpp:364
QList< QLocale > calendarLocalesList() const
Returns the list of Calendar Locales displayed.
Definition kdatetimeedit.cpp:440
QList< QTime > timeList() const
Return the list of times able to be selected in the drop-down.
Definition kdatetimeedit.cpp:490
QLocale::FormatType timeDisplayFormat() const
Return the currently set time format.
Definition kdatetimeedit.cpp:470
void resetMaximumDateTime()
Reset the minimum date and time to the default.
Definition kdatetimeedit.cpp:412
KDateTimeEdit(QWidget *parent=nullptr)
Create a new KDateTimeEdit widget.
Definition kdatetimeedit.cpp:231
void setTimeList(QList< QTime > timeList, const QString &minWarnMsg=QString(), const QString &maxWarnMsg=QString())
Set the list of times able to be selected from the drop-down.
Definition kdatetimeedit.cpp:485
void timeChanged(const QTime &time)
Signal if the time has been changed either manually by the user or programmatically.
QLocale::FormatType dateDisplayFormat() const
Return the currently set date display format.
Definition kdatetimeedit.cpp:450
QDateTime minimumDateTime() const
Return the current minimum date and time.
Definition kdatetimeedit.cpp:392
virtual void assignDate(const QDate &date)
Assign the date for the widget.
Definition kdatetimeedit.cpp:349
void setDateDisplayFormat(QLocale::FormatType format)
Sets the date format to display.
Definition kdatetimeedit.cpp:445
void setCalendarLocalesList(const QList< QLocale > &calendarLocales)
Set the list of Calendar Locales to display.
Definition kdatetimeedit.cpp:432
QDateTime maximumDateTime() const
Return the current maximum date and time.
Definition kdatetimeedit.cpp:407
void dateTimeEntered(const QDateTime &dateTime)
Signal if the date or time has been manually entered by the user.
QMap< QDate, QString > dateMap() const
Return the map of dates listed in the drop-down and their displayed string forms.
Definition kdatetimeedit.cpp:460
void setDateTimeRange(const QDateTime &minDateTime, const QDateTime &maxDateTime, const QString &minWarnMsg=QString(), const QString &maxWarnMsg=QString())
Set the minimum and maximum date and time range.
Definition kdatetimeedit.cpp:417
void setTimeListInterval(int minutes)
Set the interval between times able to be selected from the drop-down.
Definition kdatetimeedit.cpp:475
void setDateTime(const QDateTime &dateTime)
Set the currently selected date, time and time zone.
Definition kdatetimeedit.cpp:323
bool isValidDate() const
Return if the current user input date is valid.
Definition kdatetimeedit.cpp:290
void calendarEntered(const QLocale &calendarLocale)
Signal if the Calendar Locale has been manually entered by the user.
void dateTimeChanged(const QDateTime &dateTime)
Signal if the date or time has been changed either manually by the user or programmatically.
bool isNullDate() const
Return if the current user input date is null.
Definition kdatetimeedit.cpp:295
void timeZoneChanged(const QTimeZone &zone)
Signal if the time zone has been changed either manually by the user or programmatically.
QList< QTimeZone > timeZones() const
Return the list of time zones able to be selected.
Definition kdatetimeedit.cpp:503
void setTimeDisplayFormat(QLocale::FormatType format)
Sets the time format to display.
Definition kdatetimeedit.cpp:465
bool isValidTime() const
Return if the current user input time is valid.
Definition kdatetimeedit.cpp:300
@ ForceTime
Any set or entered time will be forced to one of the drop-down times.
Definition ktimecombobox.h:41
@ EditTime
Allow the user to manually edit the time in the combo line edit.
Definition ktimecombobox.h:39
void timeChanged(const QTime &time)
Signal if the time has been changed either manually by the user or programmatically.
void error(QWidget *parent, const QString &text, const QString &title, Options options)
Display an "Error" dialog.
Definition kmessagebox.cpp:810
void activated(int index)
QDateTime currentDateTime()
QDate date() const const
bool isValid() const const
QTime time() const const
QTimeZone timeZone() const const
FormatType
Q_EMITQ_EMIT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
virtual bool eventFilter(QObject *watched, QEvent *event)
QString tr(const char *sourceText, const char *disambiguation, int n)
QString fromUtf8(QByteArrayView str)
bool isEmpty() const const
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
QList< QByteArray > availableTimeZoneIds()
bool isValid() const const
virtual bool event(QEvent *event) override
virtual void focusInEvent(QFocusEvent *event)
virtual void focusOutEvent(QFocusEvent *event)
locale
virtual void resizeEvent(QResizeEvent *event)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:59:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.