KWidgetsAddons
ktimecombobox.cpp
240 if (!m_warningShown && !q->isValid() && (m_options & KTimeComboBox::WarnOnInvalid) == KTimeComboBox::WarnOnInvalid) {
246 warnMsg = KTimeComboBox::tr("Time cannot be earlier than %1", "@info").arg(formatTime(m_minTime));
253 warnMsg = KTimeComboBox::tr("Time cannot be later than %1", "@info").arg(formatTime(m_maxTime));
438void KTimeComboBox::setTimeList(QList<QTime> timeList, const QString &minWarnMsg, const QString &maxWarnMsg)
KTimeComboBox(QWidget *parent=nullptr)
Create a new KTimeComboBox widget.
Definition ktimecombobox.cpp:264
void setTimeListInterval(int minutes)
Set the interval between times able to be selected from the drop-down.
Definition ktimecombobox.cpp:407
@ ForceTime
Any set or entered time will be forced to one of the drop-down times.
Definition ktimecombobox.h:41
@ WarnOnInvalid
Show a warning box on focus out if the user enters an invalid time.
Definition ktimecombobox.h:42
@ EditTime
Allow the user to manually edit the time in the combo line edit.
Definition ktimecombobox.h:39
QLocale::FormatType displayFormat() const
Return the currently set time format.
Definition ktimecombobox.cpp:388
void resetMinimumTime()
Reset the minimum time to the default of 00:00:00.000.
Definition ktimecombobox.cpp:346
void setMaximumTime(const QTime &maxTime, const QString &maxWarnMsg=QString())
Set the maximum allowed time.
Definition ktimecombobox.cpp:356
void resetMaximumTime()
Reset the maximum time to the default of 23:59:59.999.
Definition ktimecombobox.cpp:361
virtual void assignTime(const QTime &time)
Assign the time for the widget.
Definition ktimecombobox.cpp:306
void resetTimeRange()
Reset the minimum and maximum time to the default values.
Definition ktimecombobox.cpp:383
void setTimeRange(const QTime &minTime, const QTime &maxTime, const QString &minWarnMsg=QString(), const QString &maxWarnMsg=QString())
Set the minimum and maximum time range.
Definition ktimecombobox.cpp:366
void timeEntered(const QTime &time)
Signal if the time has been manually entered or selected by the user.
void setDisplayFormat(QLocale::FormatType format)
Sets the time format to display.
Definition ktimecombobox.cpp:393
QList< QTime > timeList() const
Return the list of times able to be selected in the drop-down.
Definition ktimecombobox.cpp:426
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 ktimecombobox.cpp:438
void setMinimumTime(const QTime &minTime, const QString &minWarnMsg=QString())
Set the minimum allowed time.
Definition ktimecombobox.cpp:341
void timeChanged(const QTime &time)
Signal if the time has been changed either manually by the user or programmatically.
void timeEdited(const QTime &time)
Signal if the time is being manually edited by the user.
void error(QWidget *parent, const QString &text, const QString &title, Options options)
Display an "Error" dialog.
Definition kmessagebox.cpp:807
NoInsert
AdjustToContents
void activated(int index)
void addItem(const QIcon &icon, const QString &text, const QVariant &userData)
void clear()
count
void setCurrentIndex(int index)
void editTextChanged(const QString &text)
void setEditable(bool editable)
virtual bool event(QEvent *event) override
virtual void focusInEvent(QFocusEvent *e) override
virtual void focusOutEvent(QFocusEvent *e) override
virtual void hidePopup()
void setInsertPolicy(InsertPolicy policy)
QVariant itemData(int index, int role) const const
virtual void keyPressEvent(QKeyEvent *e) override
QLineEdit * lineEdit() const const
void setMaxVisibleItems(int maxItems)
virtual void mousePressEvent(QMouseEvent *e) override
virtual void resizeEvent(QResizeEvent *e) override
virtual void showPopup()
void setSizeAdjustPolicy(SizeAdjustPolicy policy)
virtual void wheelEvent(QWheelEvent *e) override
cursorPosition
void setInputMask(const QString &inputMask)
void setReadOnly(bool)
void setText(const QString &)
void append(QList< T > &&value)
bool isEmpty() const const
void reserve(qsizetype size)
FormatType
QString amText() const const
QString pmText() const const
QString toString(QDate date, FormatType format) const const
Q_EMITQ_EMIT
bool blockSignals(bool block)
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 & append(QChar ch)
QString arg(Args &&... args) const const
qsizetype indexOf(QChar ch, qsizetype from, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
qsizetype length() const const
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
CaseInsensitive
Key_Down
void keyEvent(KeyAction action, QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier, int delay)
QTime addSecs(int s) const const
int hour() const const
bool isValid(int h, int m, int s, int ms)
int secsTo(QTime t) const const
QTime toTime() const const
locale
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.