KWidgetsAddons
kdatecombobox.cpp
42 void setDateRange(const QDate &minDate, const QDate &maxDate, const QString &minWarnMsg, const QString &maxWarnMsg);
64 , m_dateMenu(new KDatePickerPopup(KDatePickerPopup::DatePicker | KDatePickerPopup::Words, QDate::currentDate(), qq))
69 m_options = KDateComboBox::EditDate | KDateComboBox::SelectDate | KDateComboBox::DatePicker | KDateComboBox::DateKeywords;
141void KDateComboBoxPrivate::setDateRange(const QDate &minDate, const QDate &maxDate, const QString &minWarnMsg, const QString &maxWarnMsg)
184 if (!m_warningShown && !q->isValid() && (m_options & KDateComboBox::WarnOnInvalid) == KDateComboBox::WarnOnInvalid) {
190 warnMsg = KDateComboBox::tr("Date cannot be earlier than %1", "@info").arg(formatDate(m_minDate));
197 warnMsg = KDateComboBox::tr("Date cannot be later than %1", "@info").arg(formatDate(m_maxDate));
KDateComboBox(QWidget *parent=nullptr)
Create a new KDateComboBox widget.
Definition kdatecombobox.cpp:208
void setDisplayFormat(QLocale::FormatType format)
Sets the date format to display.
Definition kdatecombobox.cpp:337
void dateEdited(const QDate &date)
Signal if the date is being manually edited by the user.
@ EditDate
Allow the user to manually edit the date in the combo line edit.
Definition kdatecombobox.h:38
void setMinimumDate(const QDate &minDate, const QString &minWarnMsg=QString())
Set the minimum allowed date.
Definition kdatecombobox.cpp:291
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 kdatecombobox.cpp:351
void setMaximumDate(const QDate &maxDate, const QString &maxWarnMsg=QString())
Set the maximum allowed date.
Definition kdatecombobox.cpp:308
void resetDateRange()
Reset the minimum and maximum date to the default values.
Definition kdatecombobox.cpp:327
QMap< QDate, QString > dateMap() const
Return the map of dates listed in the drop-down and their displayed string forms.
Definition kdatecombobox.cpp:346
virtual void assignDate(const QDate &date)
Assign the date for the widget.
Definition kdatecombobox.cpp:256
void dateChanged(const QDate &date)
Signal if the date has been changed either manually by the user or programmatically.
void dateEntered(const QDate &date)
Signal if the date has been manually entered (by typing a date and losing focus, or pressing Enter) o...
QLocale::FormatType displayFormat() const
Return the currently set date display format.
Definition kdatecombobox.cpp:332
void setDateRange(const QDate &minDate, const QDate &maxDate, const QString &minWarnMsg=QString(), const QString &maxWarnMsg=QString())
Set the valid date range to be applied by isValid().
Definition kdatecombobox.cpp:320
void setDateRange(const QDate &minDate, const QDate &maxDate)
Sets the range of dates that can be accepted.
Definition kdatepickerpopup.cpp:178
void dateChanged(const QDate &date)
This signal is emitted whenever the user has selected a new date.
void error(QWidget *parent, const QString &text, const QString &title, Options options)
Display an "Error" dialog.
Definition kmessagebox.cpp:807
NoInsert
AdjustToContents
void addItem(const QIcon &icon, const QString &text, const QVariant &userData)
void clear()
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)
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
void setItemText(int index, const QString &text)
void setSizeAdjustPolicy(SizeAdjustPolicy policy)
QDate currentDate()
bool isValid(int year, int month, int day)
cursorPosition
void setReadOnly(bool)
void returnPressed()
void setText(const QString &)
FormatType
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)
void setX(int x)
void setY(int y)
int x() const const
int y() const const
int bottom() const const
int left() const const
int right() const const
int top() const const
geometry
QString arg(Args &&... args) const const
bool isEmpty() const const
QString & replace(QChar before, QChar after, Qt::CaseSensitivity cs)
Key_Down
void keyEvent(KeyAction action, QWidget *widget, Qt::Key key, Qt::KeyboardModifiers modifier, int delay)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
height
void hide()
locale
QPoint mapToGlobal(const QPoint &pos) const const
QScreen * screen() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:51 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:51 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.