[−][src]Struct qt_widgets::QDateTimeEdit
The QDateTimeEdit class provides a widget for editing dates and times.
C++ class: QDateTimeEdit
.
The QDateTimeEdit class provides a widget for editing dates and times.
QDateTimeEdit allows the user to edit dates by using the keyboard or the arrow keys to increase and decrease date and time values. The arrow keys can be used to move from section to section within the QDateTimeEdit box. Dates and times appear in accordance with the format set; see setDisplayFormat().
QDateTimeEdit *dateEdit = new QDateTimeEdit(QDate::currentDate()); dateEdit->setMinimumDate(QDate::currentDate().addDays(-365)); dateEdit->setMaximumDate(QDate::currentDate().addDays(365)); dateEdit->setDisplayFormat("yyyy.MM.dd");
Here we've created a new QDateTimeEdit object initialized with today's date, and restricted the valid date range to today plus or minus 365 days. We've set the order to month, day, year.
The minimum value for QDateTimeEdit is 14 September 1752. You can change this by calling setMinimumDate(), taking into account that the minimum value for QDate is 2 January 4713BC.
Other useful functions are setMaximumDate(), setMinimumTime() and setMaximumTime().
Methods
impl QDateTimeEdit
[src]
pub fn date_time_changed(&self) -> Signal<(*const QDateTime,)>
[src]
This signal is emitted whenever the date or time is changed. The new date and time is passed in datetime.
Returns a built-in Qt signal QDateTimeEdit::dateTimeChanged
that can be passed to qt_core::Signal::connect
.
This signal is emitted whenever the date or time is changed. The new date and time is passed in datetime.
Note: Notifier signal for property dateTime.
pub fn time_changed(&self) -> Signal<(*const QTime,)>
[src]
This signal is emitted whenever the time is changed. The new time is passed in time.
Returns a built-in Qt signal QDateTimeEdit::timeChanged
that can be passed to qt_core::Signal::connect
.
This signal is emitted whenever the time is changed. The new time is passed in time.
Note: Notifier signal for property time.
pub fn date_changed(&self) -> Signal<(*const QDate,)>
[src]
This signal is emitted whenever the date is changed. The new date is passed in date.
Returns a built-in Qt signal QDateTimeEdit::dateChanged
that can be passed to qt_core::Signal::connect
.
This signal is emitted whenever the date is changed. The new date is passed in date.
Note: Notifier signal for property date.
pub fn slot_set_date_time(&self) -> Receiver<(*const QDateTime,)>
[src]
This property holds the QDateTime that is set in the QDateTimeEdit
Returns a built-in Qt slot QDateTimeEdit::setDateTime
that can be passed to qt_core::Signal::connect
.
This property holds the QDateTime that is set in the QDateTimeEdit
When setting this property the timespec of the QDateTimeEdit remains the same and the timespec of the new QDateTime is ignored.
By default, this property contains a date that refers to January 1, 2000 and a time of 00:00:00 and 0 milliseconds.
Access functions:
QDateTime | dateTime() const |
void | setDateTime(const QDateTime &dateTime) |
Notifier signal:
void | dateTimeChanged(const QDateTime &datetime) |
pub fn slot_set_date(&self) -> Receiver<(*const QDate,)>
[src]
This property holds the QDate that is set in the widget
Returns a built-in Qt slot QDateTimeEdit::setDate
that can be passed to qt_core::Signal::connect
.
This property holds the QDate that is set in the widget
By default, this property contains a date that refers to January 1, 2000.
Access functions:
QDate | date() const |
void | setDate(const QDate &date) |
Notifier signal:
void | dateChanged(const QDate &date) |
pub fn slot_set_time(&self) -> Receiver<(*const QTime,)>
[src]
This property holds the QTime that is set in the widget
Returns a built-in Qt slot QDateTimeEdit::setTime
that can be passed to qt_core::Signal::connect
.
This property holds the QTime that is set in the widget
By default, this property contains a time of 00:00:00 and 0 milliseconds.
Access functions:
QTime | time() const |
void | setTime(const QTime &time) |
Notifier signal:
void | timeChanged(const QTime &time) |
pub unsafe fn calendar(&self) -> CppBox<QCalendar>
[src]
cpp_lib_version="5.14.0"
only.Calls C++ function: QCalendar QDateTimeEdit::calendar() const
.
pub unsafe fn calendar_popup(&self) -> bool
[src]
This property holds the current calendar pop-up show mode.
Calls C++ function: bool QDateTimeEdit::calendarPopup() const
.
This property holds the current calendar pop-up show mode.
The calendar pop-up will be shown upon clicking the arrow button. This property is valid only if there is a valid date display format.
This property was introduced in Qt 4.2.
Access functions:
bool | calendarPopup() const |
void | setCalendarPopup(bool enable) |
See also setDisplayFormat().
pub unsafe fn calendar_widget(&self) -> QPtr<QCalendarWidget>
[src]
Returns the calendar widget for the editor if calendarPopup is set to true and (sections() & DateSections_Mask) != 0.
Calls C++ function: QCalendarWidget* QDateTimeEdit::calendarWidget() const
.
Returns the calendar widget for the editor if calendarPopup is set to true and (sections() & DateSections_Mask) != 0.
This function creates and returns a calendar widget if none has been set.
This function was introduced in Qt 4.4.
See also setCalendarWidget().
pub unsafe fn clear(&self)
[src]
Reimplemented from QAbstractSpinBox::clear().
Calls C++ function: virtual void QDateTimeEdit::clear()
.
Reimplemented from QAbstractSpinBox::clear().
pub unsafe fn clear_maximum_date(&self)
[src]
This property holds the maximum date of the date time edit
Calls C++ function: void QDateTimeEdit::clearMaximumDate()
.
This property holds the maximum date of the date time edit
When setting this property the minimumDate is adjusted if necessary to ensure that the range remains valid. If the date is not a valid QDate object, this function does nothing.
By default, this property contains a date that refers to December 31, 7999.
Access functions:
QDate | maximumDate() const |
void | setMaximumDate(const QDate &max) |
void | clearMaximumDate() |
See also minimumDate, minimumTime, maximumTime, and setDateRange().
pub unsafe fn clear_maximum_date_time(&self)
[src]
This property holds the maximum datetime of the date time edit
Calls C++ function: void QDateTimeEdit::clearMaximumDateTime()
.
This property holds the maximum datetime of the date time edit
When setting this property the minimumDateTime() is adjusted if necessary to ensure that the range remains valid. If the datetime is not a valid QDateTime object, this function does nothing.
The default maximumDateTime can be restored with clearMaximumDateTime().
By default, this property contains a date that refers to 31 December, 7999 and a time of 23:59:59 and 999 milliseconds.
This property was introduced in Qt 4.4.
Access functions:
QDateTime | maximumDateTime() const |
void | setMaximumDateTime(const QDateTime &dt) |
void | clearMaximumDateTime() |
See also minimumDateTime(), minimumTime(), maximumTime(), minimumDate(), maximumDate(), setDateTimeRange(), setDateRange(), setTimeRange(), clearMinimumDateTime(), clearMinimumDate(), clearMaximumDate(), clearMinimumTime(), and clearMaximumTime().
pub unsafe fn clear_maximum_time(&self)
[src]
This property holds the maximum time of the date time edit
Calls C++ function: void QDateTimeEdit::clearMaximumTime()
.
This property holds the maximum time of the date time edit
When setting this property, the minimumTime is adjusted if necessary to ensure that the range remains valid. If the time is not a valid QTime object, this function does nothing.
By default, this property contains a time of 23:59:59 and 999 milliseconds.
Access functions:
QTime | maximumTime() const |
void | setMaximumTime(const QTime &max) |
void | clearMaximumTime() |
See also minimumTime, minimumDate, maximumDate, and setTimeRange().
pub unsafe fn clear_minimum_date(&self)
[src]
This property holds the minimum date of the date time edit
Calls C++ function: void QDateTimeEdit::clearMinimumDate()
.
This property holds the minimum date of the date time edit
When setting this property the maximumDate is adjusted if necessary, to ensure that the range remains valid. If the date is not a valid QDate object, this function does nothing.
By default, this property contains a date that refers to September 14, 1752. The minimum date must be at least the first day in year 100, otherwise setMinimumDate() has no effect.
Access functions:
QDate | minimumDate() const |
void | setMinimumDate(const QDate &min) |
void | clearMinimumDate() |
See also minimumTime(), maximumTime(), and setDateRange().
pub unsafe fn clear_minimum_date_time(&self)
[src]
This property holds the minimum datetime of the date time edit
Calls C++ function: void QDateTimeEdit::clearMinimumDateTime()
.
This property holds the minimum datetime of the date time edit
When setting this property the maximumDateTime() is adjusted if necessary to ensure that the range remains valid. If the datetime is not a valid QDateTime object, this function does nothing.
The default minimumDateTime can be restored with clearMinimumDateTime()
By default, this property contains a date that refers to September 14, 1752 and a time of 00:00:00 and 0 milliseconds.
This property was introduced in Qt 4.4.
Access functions:
QDateTime | minimumDateTime() const |
void | setMinimumDateTime(const QDateTime &dt) |
void | clearMinimumDateTime() |
See also maximumDateTime(), minimumTime(), maximumTime(), minimumDate(), maximumDate(), setDateTimeRange(), setDateRange(), setTimeRange(), clearMaximumDateTime(), clearMinimumDate(), clearMaximumDate(), clearMinimumTime(), and clearMaximumTime().
pub unsafe fn clear_minimum_time(&self)
[src]
This property holds the minimum time of the date time edit
Calls C++ function: void QDateTimeEdit::clearMinimumTime()
.
This property holds the minimum time of the date time edit
When setting this property the maximumTime is adjusted if necessary, to ensure that the range remains valid. If the time is not a valid QTime object, this function does nothing.
By default, this property contains a time of 00:00:00 and 0 milliseconds.
Access functions:
QTime | minimumTime() const |
void | setMinimumTime(const QTime &min) |
void | clearMinimumTime() |
See also maximumTime, minimumDate, maximumDate, and setTimeRange().
pub unsafe fn current_section(&self) -> Section
[src]
This property holds the current section of the spinbox setCurrentSection()
Calls C++ function: QDateTimeEdit::Section QDateTimeEdit::currentSection() const
.
This property holds the current section of the spinbox setCurrentSection()
Access functions:
Section | currentSection() const |
void | setCurrentSection(Section section) |
pub unsafe fn current_section_index(&self) -> c_int
[src]
This property holds the current section index of the spinbox
Calls C++ function: int QDateTimeEdit::currentSectionIndex() const
.
This property holds the current section index of the spinbox
If the format is 'yyyy/MM/dd', the displayText is '2001/05/21', and the cursorPosition is 5, currentSectionIndex returns 1. If the cursorPosition is 3, currentSectionIndex is 0, and so on.
setCurrentSection()
This property was introduced in Qt 4.3.
Access functions:
int | currentSectionIndex() const |
void | setCurrentSectionIndex(int index) |
See also currentSection().
pub unsafe fn date(&self) -> CppBox<QDate>
[src]
This property holds the QDate that is set in the widget
Calls C++ function: QDate QDateTimeEdit::date() const
.
This property holds the QDate that is set in the widget
By default, this property contains a date that refers to January 1, 2000.
Access functions:
QDate | date() const |
void | setDate(const QDate &date) |
Notifier signal:
void | dateChanged(const QDate &date) |
pub unsafe fn date_time(&self) -> CppBox<QDateTime>
[src]
This property holds the QDateTime that is set in the QDateTimeEdit
Calls C++ function: QDateTime QDateTimeEdit::dateTime() const
.
This property holds the QDateTime that is set in the QDateTimeEdit
When setting this property the timespec of the QDateTimeEdit remains the same and the timespec of the new QDateTime is ignored.
By default, this property contains a date that refers to January 1, 2000 and a time of 00:00:00 and 0 milliseconds.
Access functions:
QDateTime | dateTime() const |
void | setDateTime(const QDateTime &dateTime) |
Notifier signal:
void | dateTimeChanged(const QDateTime &datetime) |
pub unsafe fn display_format(&self) -> CppBox<QString>
[src]
This property holds the format used to display the time/date of the date time edit
Calls C++ function: QString QDateTimeEdit::displayFormat() const
.
This property holds the format used to display the time/date of the date time edit
This format is described in QDateTime::toString() and QDateTime::fromString()
Example format strings (assuming that the date is 2nd of July 1969):
Format | Result |
---|---|
dd.MM.yyyy | 02.07.1969 |
MMM d yy | Jul 2 69 |
MMMM d yy | July 2 69 |
Note that if you specify a two digit year, it will be interpreted to be in the century in which the date time edit was initialized. The default century is the 21 (2000-2099).
If you specify an invalid format the format will not be set.
Access functions:
QString | displayFormat() const |
void | setDisplayFormat(const QString &format) |
See also QDateTime::toString() and displayedSections().
pub unsafe fn displayed_sections(&self) -> QFlags<Section>
[src]
This property holds the currently displayed fields of the date time edit
Calls C++ function: QFlags<QDateTimeEdit::Section> QDateTimeEdit::displayedSections() const
.
This property holds the currently displayed fields of the date time edit
Returns a bit set of the displayed sections for this format. setDisplayFormat(), displayFormat()
Access functions:
Sections | displayedSections() const |
pub unsafe fn event(&self, event: impl CastInto<Ptr<QEvent>>) -> bool
[src]
Reimplemented from QObject::event().
Calls C++ function: virtual bool QDateTimeEdit::event(QEvent* event)
.
Reimplemented from QObject::event().
pub unsafe fn maximum_date(&self) -> CppBox<QDate>
[src]
This property holds the maximum date of the date time edit
Calls C++ function: QDate QDateTimeEdit::maximumDate() const
.
This property holds the maximum date of the date time edit
When setting this property the minimumDate is adjusted if necessary to ensure that the range remains valid. If the date is not a valid QDate object, this function does nothing.
By default, this property contains a date that refers to December 31, 7999.
Access functions:
QDate | maximumDate() const |
void | setMaximumDate(const QDate &max) |
void | clearMaximumDate() |
See also minimumDate, minimumTime, maximumTime, and setDateRange().
pub unsafe fn maximum_date_time(&self) -> CppBox<QDateTime>
[src]
This property holds the maximum datetime of the date time edit
Calls C++ function: QDateTime QDateTimeEdit::maximumDateTime() const
.
This property holds the maximum datetime of the date time edit
When setting this property the minimumDateTime() is adjusted if necessary to ensure that the range remains valid. If the datetime is not a valid QDateTime object, this function does nothing.
The default maximumDateTime can be restored with clearMaximumDateTime().
By default, this property contains a date that refers to 31 December, 7999 and a time of 23:59:59 and 999 milliseconds.
This property was introduced in Qt 4.4.
Access functions:
QDateTime | maximumDateTime() const |
void | setMaximumDateTime(const QDateTime &dt) |
void | clearMaximumDateTime() |
See also minimumDateTime(), minimumTime(), maximumTime(), minimumDate(), maximumDate(), setDateTimeRange(), setDateRange(), setTimeRange(), clearMinimumDateTime(), clearMinimumDate(), clearMaximumDate(), clearMinimumTime(), and clearMaximumTime().
pub unsafe fn maximum_time(&self) -> CppBox<QTime>
[src]
This property holds the maximum time of the date time edit
Calls C++ function: QTime QDateTimeEdit::maximumTime() const
.
This property holds the maximum time of the date time edit
When setting this property, the minimumTime is adjusted if necessary to ensure that the range remains valid. If the time is not a valid QTime object, this function does nothing.
By default, this property contains a time of 23:59:59 and 999 milliseconds.
Access functions:
QTime | maximumTime() const |
void | setMaximumTime(const QTime &max) |
void | clearMaximumTime() |
See also minimumTime, minimumDate, maximumDate, and setTimeRange().
pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>
[src]
Calls C++ function: virtual const QMetaObject* QDateTimeEdit::metaObject() const
.
pub unsafe fn minimum_date(&self) -> CppBox<QDate>
[src]
This property holds the minimum date of the date time edit
Calls C++ function: QDate QDateTimeEdit::minimumDate() const
.
This property holds the minimum date of the date time edit
When setting this property the maximumDate is adjusted if necessary, to ensure that the range remains valid. If the date is not a valid QDate object, this function does nothing.
By default, this property contains a date that refers to September 14, 1752. The minimum date must be at least the first day in year 100, otherwise setMinimumDate() has no effect.
Access functions:
QDate | minimumDate() const |
void | setMinimumDate(const QDate &min) |
void | clearMinimumDate() |
See also minimumTime(), maximumTime(), and setDateRange().
pub unsafe fn minimum_date_time(&self) -> CppBox<QDateTime>
[src]
This property holds the minimum datetime of the date time edit
Calls C++ function: QDateTime QDateTimeEdit::minimumDateTime() const
.
This property holds the minimum datetime of the date time edit
When setting this property the maximumDateTime() is adjusted if necessary to ensure that the range remains valid. If the datetime is not a valid QDateTime object, this function does nothing.
The default minimumDateTime can be restored with clearMinimumDateTime()
By default, this property contains a date that refers to September 14, 1752 and a time of 00:00:00 and 0 milliseconds.
This property was introduced in Qt 4.4.
Access functions:
QDateTime | minimumDateTime() const |
void | setMinimumDateTime(const QDateTime &dt) |
void | clearMinimumDateTime() |
See also maximumDateTime(), minimumTime(), maximumTime(), minimumDate(), maximumDate(), setDateTimeRange(), setDateRange(), setTimeRange(), clearMaximumDateTime(), clearMinimumDate(), clearMaximumDate(), clearMinimumTime(), and clearMaximumTime().
pub unsafe fn minimum_time(&self) -> CppBox<QTime>
[src]
This property holds the minimum time of the date time edit
Calls C++ function: QTime QDateTimeEdit::minimumTime() const
.
This property holds the minimum time of the date time edit
When setting this property the maximumTime is adjusted if necessary, to ensure that the range remains valid. If the time is not a valid QTime object, this function does nothing.
By default, this property contains a time of 00:00:00 and 0 milliseconds.
Access functions:
QTime | minimumTime() const |
void | setMinimumTime(const QTime &min) |
void | clearMinimumTime() |
See also maximumTime, minimumDate, maximumDate, and setTimeRange().
pub unsafe fn from_q_widget(
parent: impl CastInto<Ptr<QWidget>>
) -> QBox<QDateTimeEdit>
[src]
parent: impl CastInto<Ptr<QWidget>>
) -> QBox<QDateTimeEdit>
Constructs an empty date time editor with a parent.
Calls C++ function: [constructor] void QDateTimeEdit::QDateTimeEdit(QWidget* parent = …)
.
Constructs an empty date time editor with a parent.
pub unsafe fn from_q_date_time_q_widget(
dt: impl CastInto<Ref<QDateTime>>,
parent: impl CastInto<Ptr<QWidget>>
) -> QBox<QDateTimeEdit>
[src]
dt: impl CastInto<Ref<QDateTime>>,
parent: impl CastInto<Ptr<QWidget>>
) -> QBox<QDateTimeEdit>
Constructs an empty date time editor with a parent. The value is set to datetime.
Calls C++ function: [constructor] void QDateTimeEdit::QDateTimeEdit(const QDateTime& dt, QWidget* parent = …)
.
Constructs an empty date time editor with a parent. The value is set to datetime.
pub unsafe fn from_q_date_q_widget(
d: impl CastInto<Ref<QDate>>,
parent: impl CastInto<Ptr<QWidget>>
) -> QBox<QDateTimeEdit>
[src]
d: impl CastInto<Ref<QDate>>,
parent: impl CastInto<Ptr<QWidget>>
) -> QBox<QDateTimeEdit>
Constructs an empty date time editor with a parent. The value is set to date.
Calls C++ function: [constructor] void QDateTimeEdit::QDateTimeEdit(const QDate& d, QWidget* parent = …)
.
Constructs an empty date time editor with a parent. The value is set to date.
pub unsafe fn from_q_time_q_widget(
t: impl CastInto<Ref<QTime>>,
parent: impl CastInto<Ptr<QWidget>>
) -> QBox<QDateTimeEdit>
[src]
t: impl CastInto<Ref<QTime>>,
parent: impl CastInto<Ptr<QWidget>>
) -> QBox<QDateTimeEdit>
Constructs an empty date time editor with a parent. The value is set to time.
Calls C++ function: [constructor] void QDateTimeEdit::QDateTimeEdit(const QTime& t, QWidget* parent = …)
.
Constructs an empty date time editor with a parent. The value is set to time.
pub unsafe fn new() -> QBox<QDateTimeEdit>
[src]
The QDateTimeEdit class provides a widget for editing dates and times.
Calls C++ function: [constructor] void QDateTimeEdit::QDateTimeEdit()
.
The QDateTimeEdit class provides a widget for editing dates and times.
QDateTimeEdit allows the user to edit dates by using the keyboard or the arrow keys to increase and decrease date and time values. The arrow keys can be used to move from section to section within the QDateTimeEdit box. Dates and times appear in accordance with the format set; see setDisplayFormat().
QDateTimeEdit *dateEdit = new QDateTimeEdit(QDate::currentDate()); dateEdit->setMinimumDate(QDate::currentDate().addDays(-365)); dateEdit->setMaximumDate(QDate::currentDate().addDays(365)); dateEdit->setDisplayFormat("yyyy.MM.dd");
Here we've created a new QDateTimeEdit object initialized with today's date, and restricted the valid date range to today plus or minus 365 days. We've set the order to month, day, year.
The minimum value for QDateTimeEdit is 14 September 1752. You can change this by calling setMinimumDate(), taking into account that the minimum value for QDate is 2 January 4713BC.
Other useful functions are setMaximumDate(), setMinimumTime() and setMaximumTime().
pub unsafe fn from_q_date_time(
dt: impl CastInto<Ref<QDateTime>>
) -> QBox<QDateTimeEdit>
[src]
dt: impl CastInto<Ref<QDateTime>>
) -> QBox<QDateTimeEdit>
Constructs an empty date time editor with a parent. The value is set to datetime.
Calls C++ function: [constructor] void QDateTimeEdit::QDateTimeEdit(const QDateTime& dt)
.
Constructs an empty date time editor with a parent. The value is set to datetime.
pub unsafe fn from_q_date(d: impl CastInto<Ref<QDate>>) -> QBox<QDateTimeEdit>
[src]
Constructs an empty date time editor with a parent. The value is set to date.
Calls C++ function: [constructor] void QDateTimeEdit::QDateTimeEdit(const QDate& d)
.
Constructs an empty date time editor with a parent. The value is set to date.
pub unsafe fn from_q_time(t: impl CastInto<Ref<QTime>>) -> QBox<QDateTimeEdit>
[src]
Constructs an empty date time editor with a parent. The value is set to time.
Calls C++ function: [constructor] void QDateTimeEdit::QDateTimeEdit(const QTime& t)
.
Constructs an empty date time editor with a parent. The value is set to time.
pub unsafe fn qt_metacall(
&self,
arg1: Call,
arg2: c_int,
arg3: *mut *mut c_void
) -> c_int
[src]
&self,
arg1: Call,
arg2: c_int,
arg3: *mut *mut c_void
) -> c_int
Calls C++ function: virtual int QDateTimeEdit::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3)
.
pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void
[src]
Calls C++ function: virtual void* QDateTimeEdit::qt_metacast(const char* arg1)
.
pub unsafe fn section_at(&self, index: c_int) -> Section
[src]
Returns the Section at index.
Calls C++ function: QDateTimeEdit::Section QDateTimeEdit::sectionAt(int index) const
.
Returns the Section at index.
If the format is 'yyyy/MM/dd', sectionAt(0) returns YearSection, sectionAt(1) returns MonthSection, and sectionAt(2) returns YearSection,
This function was introduced in Qt 4.3.
pub unsafe fn section_count(&self) -> c_int
[src]
This property holds the number of sections displayed. If the format is 'yyyy/yy/yyyy', sectionCount returns 3
Calls C++ function: int QDateTimeEdit::sectionCount() const
.
This property holds the number of sections displayed. If the format is 'yyyy/yy/yyyy', sectionCount returns 3
This property was introduced in Qt 4.3.
Access functions:
int | sectionCount() const |
pub unsafe fn section_text(&self, section: Section) -> CppBox<QString>
[src]
Returns the text from the given section.
Calls C++ function: QString QDateTimeEdit::sectionText(QDateTimeEdit::Section section) const
.
Returns the text from the given section.
See also currentSection().
pub unsafe fn set_calendar(&self, calendar: impl CastInto<Ref<QCalendar>>)
[src]
cpp_lib_version="5.14.0"
only.Calls C++ function: void QDateTimeEdit::setCalendar(QCalendar calendar)
.
pub unsafe fn set_calendar_popup(&self, enable: bool)
[src]
This property holds the current calendar pop-up show mode.
Calls C++ function: void QDateTimeEdit::setCalendarPopup(bool enable)
.
This property holds the current calendar pop-up show mode.
The calendar pop-up will be shown upon clicking the arrow button. This property is valid only if there is a valid date display format.
This property was introduced in Qt 4.2.
Access functions:
bool | calendarPopup() const |
void | setCalendarPopup(bool enable) |
See also setDisplayFormat().
pub unsafe fn set_calendar_widget(
&self,
calendar_widget: impl CastInto<Ptr<QCalendarWidget>>
)
[src]
&self,
calendar_widget: impl CastInto<Ptr<QCalendarWidget>>
)
Sets the given calendarWidget as the widget to be used for the calendar pop-up. The editor does not automatically take ownership of the calendar widget.
Calls C++ function: void QDateTimeEdit::setCalendarWidget(QCalendarWidget* calendarWidget)
.
Sets the given calendarWidget as the widget to be used for the calendar pop-up. The editor does not automatically take ownership of the calendar widget.
Note: calendarPopup must be set to true before setting the calendar widget.
This function was introduced in Qt 4.4.
See also calendarWidget() and calendarPopup.
pub unsafe fn set_current_section(&self, section: Section)
[src]
This property holds the current section of the spinbox setCurrentSection()
Calls C++ function: void QDateTimeEdit::setCurrentSection(QDateTimeEdit::Section section)
.
This property holds the current section of the spinbox setCurrentSection()
Access functions:
Section | currentSection() const |
void | setCurrentSection(Section section) |
pub unsafe fn set_current_section_index(&self, index: c_int)
[src]
This property holds the current section index of the spinbox
Calls C++ function: void QDateTimeEdit::setCurrentSectionIndex(int index)
.
This property holds the current section index of the spinbox
If the format is 'yyyy/MM/dd', the displayText is '2001/05/21', and the cursorPosition is 5, currentSectionIndex returns 1. If the cursorPosition is 3, currentSectionIndex is 0, and so on.
setCurrentSection()
This property was introduced in Qt 4.3.
Access functions:
int | currentSectionIndex() const |
void | setCurrentSectionIndex(int index) |
See also currentSection().
pub unsafe fn set_date(&self, date: impl CastInto<Ref<QDate>>)
[src]
This property holds the QDate that is set in the widget
Calls C++ function: [slot] void QDateTimeEdit::setDate(const QDate& date)
.
This property holds the QDate that is set in the widget
By default, this property contains a date that refers to January 1, 2000.
Access functions:
QDate | date() const |
void | setDate(const QDate &date) |
Notifier signal:
void | dateChanged(const QDate &date) |
pub unsafe fn set_date_range(
&self,
min: impl CastInto<Ref<QDate>>,
max: impl CastInto<Ref<QDate>>
)
[src]
&self,
min: impl CastInto<Ref<QDate>>,
max: impl CastInto<Ref<QDate>>
)
Convenience function to set minimum and maximum date with one function call.
Calls C++ function: void QDateTimeEdit::setDateRange(const QDate& min, const QDate& max)
.
Convenience function to set minimum and maximum date with one function call.
setDateRange(min, max);
is analogous to:
setMinimumDate(min); setMaximumDate(max);
If either min or max are not valid, this function does nothing.
See also setMinimumDate(), maximumDate(), setMaximumDate(), clearMinimumDate(), setMinimumTime(), maximumTime(), setMaximumTime(), clearMinimumTime(), and QDate::isValid().
pub unsafe fn set_date_time(&self, date_time: impl CastInto<Ref<QDateTime>>)
[src]
This property holds the QDateTime that is set in the QDateTimeEdit
Calls C++ function: [slot] void QDateTimeEdit::setDateTime(const QDateTime& dateTime)
.
This property holds the QDateTime that is set in the QDateTimeEdit
When setting this property the timespec of the QDateTimeEdit remains the same and the timespec of the new QDateTime is ignored.
By default, this property contains a date that refers to January 1, 2000 and a time of 00:00:00 and 0 milliseconds.
Access functions:
QDateTime | dateTime() const |
void | setDateTime(const QDateTime &dateTime) |
Notifier signal:
void | dateTimeChanged(const QDateTime &datetime) |
pub unsafe fn set_date_time_range(
&self,
min: impl CastInto<Ref<QDateTime>>,
max: impl CastInto<Ref<QDateTime>>
)
[src]
&self,
min: impl CastInto<Ref<QDateTime>>,
max: impl CastInto<Ref<QDateTime>>
)
Convenience function to set minimum and maximum date time with one function call.
Calls C++ function: void QDateTimeEdit::setDateTimeRange(const QDateTime& min, const QDateTime& max)
.
Convenience function to set minimum and maximum date time with one function call.
setDateTimeRange(min, max);
is analogous to:
setMinimumDateTime(min); setMaximumDateTime(max);
If either min or max are not valid, this function does nothing.
This function was introduced in Qt 4.4.
See also setMinimumDate(), maximumDate(), setMaximumDate(), clearMinimumDate(), setMinimumTime(), maximumTime(), setMaximumTime(), clearMinimumTime(), and QDateTime::isValid().
pub unsafe fn set_display_format(&self, format: impl CastInto<Ref<QString>>)
[src]
This property holds the format used to display the time/date of the date time edit
Calls C++ function: void QDateTimeEdit::setDisplayFormat(const QString& format)
.
This property holds the format used to display the time/date of the date time edit
This format is described in QDateTime::toString() and QDateTime::fromString()
Example format strings (assuming that the date is 2nd of July 1969):
Format | Result |
---|---|
dd.MM.yyyy | 02.07.1969 |
MMM d yy | Jul 2 69 |
MMMM d yy | July 2 69 |
Note that if you specify a two digit year, it will be interpreted to be in the century in which the date time edit was initialized. The default century is the 21 (2000-2099).
If you specify an invalid format the format will not be set.
Access functions:
QString | displayFormat() const |
void | setDisplayFormat(const QString &format) |
See also QDateTime::toString() and displayedSections().
pub unsafe fn set_maximum_date(&self, max: impl CastInto<Ref<QDate>>)
[src]
This property holds the maximum date of the date time edit
Calls C++ function: void QDateTimeEdit::setMaximumDate(const QDate& max)
.
This property holds the maximum date of the date time edit
When setting this property the minimumDate is adjusted if necessary to ensure that the range remains valid. If the date is not a valid QDate object, this function does nothing.
By default, this property contains a date that refers to December 31, 7999.
Access functions:
QDate | maximumDate() const |
void | setMaximumDate(const QDate &max) |
void | clearMaximumDate() |
See also minimumDate, minimumTime, maximumTime, and setDateRange().
pub unsafe fn set_maximum_date_time(&self, dt: impl CastInto<Ref<QDateTime>>)
[src]
This property holds the maximum datetime of the date time edit
Calls C++ function: void QDateTimeEdit::setMaximumDateTime(const QDateTime& dt)
.
This property holds the maximum datetime of the date time edit
When setting this property the minimumDateTime() is adjusted if necessary to ensure that the range remains valid. If the datetime is not a valid QDateTime object, this function does nothing.
The default maximumDateTime can be restored with clearMaximumDateTime().
By default, this property contains a date that refers to 31 December, 7999 and a time of 23:59:59 and 999 milliseconds.
This property was introduced in Qt 4.4.
Access functions:
QDateTime | maximumDateTime() const |
void | setMaximumDateTime(const QDateTime &dt) |
void | clearMaximumDateTime() |
See also minimumDateTime(), minimumTime(), maximumTime(), minimumDate(), maximumDate(), setDateTimeRange(), setDateRange(), setTimeRange(), clearMinimumDateTime(), clearMinimumDate(), clearMaximumDate(), clearMinimumTime(), and clearMaximumTime().
pub unsafe fn set_maximum_time(&self, max: impl CastInto<Ref<QTime>>)
[src]
This property holds the maximum time of the date time edit
Calls C++ function: void QDateTimeEdit::setMaximumTime(const QTime& max)
.
This property holds the maximum time of the date time edit
When setting this property, the minimumTime is adjusted if necessary to ensure that the range remains valid. If the time is not a valid QTime object, this function does nothing.
By default, this property contains a time of 23:59:59 and 999 milliseconds.
Access functions:
QTime | maximumTime() const |
void | setMaximumTime(const QTime &max) |
void | clearMaximumTime() |
See also minimumTime, minimumDate, maximumDate, and setTimeRange().
pub unsafe fn set_minimum_date(&self, min: impl CastInto<Ref<QDate>>)
[src]
This property holds the minimum date of the date time edit
Calls C++ function: void QDateTimeEdit::setMinimumDate(const QDate& min)
.
This property holds the minimum date of the date time edit
When setting this property the maximumDate is adjusted if necessary, to ensure that the range remains valid. If the date is not a valid QDate object, this function does nothing.
By default, this property contains a date that refers to September 14, 1752. The minimum date must be at least the first day in year 100, otherwise setMinimumDate() has no effect.
Access functions:
QDate | minimumDate() const |
void | setMinimumDate(const QDate &min) |
void | clearMinimumDate() |
See also minimumTime(), maximumTime(), and setDateRange().
pub unsafe fn set_minimum_date_time(&self, dt: impl CastInto<Ref<QDateTime>>)
[src]
This property holds the minimum datetime of the date time edit
Calls C++ function: void QDateTimeEdit::setMinimumDateTime(const QDateTime& dt)
.
This property holds the minimum datetime of the date time edit
When setting this property the maximumDateTime() is adjusted if necessary to ensure that the range remains valid. If the datetime is not a valid QDateTime object, this function does nothing.
The default minimumDateTime can be restored with clearMinimumDateTime()
By default, this property contains a date that refers to September 14, 1752 and a time of 00:00:00 and 0 milliseconds.
This property was introduced in Qt 4.4.
Access functions:
QDateTime | minimumDateTime() const |
void | setMinimumDateTime(const QDateTime &dt) |
void | clearMinimumDateTime() |
See also maximumDateTime(), minimumTime(), maximumTime(), minimumDate(), maximumDate(), setDateTimeRange(), setDateRange(), setTimeRange(), clearMaximumDateTime(), clearMinimumDate(), clearMaximumDate(), clearMinimumTime(), and clearMaximumTime().
pub unsafe fn set_minimum_time(&self, min: impl CastInto<Ref<QTime>>)
[src]
This property holds the minimum time of the date time edit
Calls C++ function: void QDateTimeEdit::setMinimumTime(const QTime& min)
.
This property holds the minimum time of the date time edit
When setting this property the maximumTime is adjusted if necessary, to ensure that the range remains valid. If the time is not a valid QTime object, this function does nothing.
By default, this property contains a time of 00:00:00 and 0 milliseconds.
Access functions:
QTime | minimumTime() const |
void | setMinimumTime(const QTime &min) |
void | clearMinimumTime() |
See also maximumTime, minimumDate, maximumDate, and setTimeRange().
pub unsafe fn set_selected_section(&self, section: Section)
[src]
Selects section. If section doesn't exist in the currently displayed sections, this function does nothing. If section is NoSection, this function will unselect all text in the editor. Otherwise, this function will move the cursor and the current section to the selected section.
Calls C++ function: void QDateTimeEdit::setSelectedSection(QDateTimeEdit::Section section)
.
Selects section. If section doesn't exist in the currently displayed sections, this function does nothing. If section is NoSection, this function will unselect all text in the editor. Otherwise, this function will move the cursor and the current section to the selected section.
This function was introduced in Qt 4.2.
See also currentSection().
pub unsafe fn set_time(&self, time: impl CastInto<Ref<QTime>>)
[src]
This property holds the QTime that is set in the widget
Calls C++ function: [slot] void QDateTimeEdit::setTime(const QTime& time)
.
This property holds the QTime that is set in the widget
By default, this property contains a time of 00:00:00 and 0 milliseconds.
Access functions:
QTime | time() const |
void | setTime(const QTime &time) |
Notifier signal:
void | timeChanged(const QTime &time) |
pub unsafe fn set_time_range(
&self,
min: impl CastInto<Ref<QTime>>,
max: impl CastInto<Ref<QTime>>
)
[src]
&self,
min: impl CastInto<Ref<QTime>>,
max: impl CastInto<Ref<QTime>>
)
Convenience function to set minimum and maximum time with one function call.
Calls C++ function: void QDateTimeEdit::setTimeRange(const QTime& min, const QTime& max)
.
Convenience function to set minimum and maximum time with one function call.
setTimeRange(min, max);
is analogous to:
setMinimumTime(min); setMaximumTime(max);
If either min or max are not valid, this function does nothing.
See also setMinimumDate(), maximumDate(), setMaximumDate(), clearMinimumDate(), setMinimumTime(), maximumTime(), setMaximumTime(), clearMinimumTime(), and QTime::isValid().
pub unsafe fn set_time_spec(&self, spec: TimeSpec)
[src]
This property holds the current timespec used by the date time edit.
Calls C++ function: void QDateTimeEdit::setTimeSpec(Qt::TimeSpec spec)
.
This property holds the current timespec used by the date time edit.
This property was introduced in Qt 4.4.
Access functions:
Qt::TimeSpec | timeSpec() const |
void | setTimeSpec(Qt::TimeSpec spec) |
pub unsafe fn size_hint(&self) -> CppBox<QSize>
[src]
Reimplemented from QWidget::sizeHint().
Calls C++ function: virtual QSize QDateTimeEdit::sizeHint() const
.
Reimplemented from QWidget::sizeHint().
pub unsafe fn static_meta_object() -> Ref<QMetaObject>
[src]
Returns a reference to the staticMetaObject
field.
pub unsafe fn step_by(&self, steps: c_int)
[src]
Reimplemented from QAbstractSpinBox::stepBy().
Calls C++ function: virtual void QDateTimeEdit::stepBy(int steps)
.
Reimplemented from QAbstractSpinBox::stepBy().
pub unsafe fn time(&self) -> CppBox<QTime>
[src]
This property holds the QTime that is set in the widget
Calls C++ function: QTime QDateTimeEdit::time() const
.
This property holds the QTime that is set in the widget
By default, this property contains a time of 00:00:00 and 0 milliseconds.
Access functions:
QTime | time() const |
void | setTime(const QTime &time) |
Notifier signal:
void | timeChanged(const QTime &time) |
pub unsafe fn time_spec(&self) -> TimeSpec
[src]
This property holds the current timespec used by the date time edit.
Calls C++ function: Qt::TimeSpec QDateTimeEdit::timeSpec() const
.
This property holds the current timespec used by the date time edit.
This property was introduced in Qt 4.4.
Access functions:
Qt::TimeSpec | timeSpec() const |
void | setTimeSpec(Qt::TimeSpec spec) |
pub unsafe fn tr(
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
[src]
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
Calls C++ function: static QString QDateTimeEdit::tr(const char* s, const char* c, int n)
.
pub unsafe fn tr_utf8(
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
[src]
s: *const c_char,
c: *const c_char,
n: c_int
) -> CppBox<QString>
Calls C++ function: static QString QDateTimeEdit::trUtf8(const char* s, const char* c, int n)
.
Methods from Deref<Target = QAbstractSpinBox>
pub fn slot_step_up(&self) -> Receiver<()>
[src]
Steps up by one linestep Calling this slot is analogous to calling stepBy(1);
Returns a built-in Qt slot QAbstractSpinBox::stepUp
that can be passed to qt_core::Signal::connect
.
pub fn slot_step_down(&self) -> Receiver<()>
[src]
Steps down by one linestep Calling this slot is analogous to calling stepBy(-1);
Returns a built-in Qt slot QAbstractSpinBox::stepDown
that can be passed to qt_core::Signal::connect
.
pub fn slot_select_all(&self) -> Receiver<()>
[src]
Selects all the text in the spinbox except the prefix and suffix.
Returns a built-in Qt slot QAbstractSpinBox::selectAll
that can be passed to qt_core::Signal::connect
.
Selects all the text in the spinbox except the prefix and suffix.
pub fn slot_clear(&self) -> Receiver<()>
[src]
Clears the lineedit of all text but prefix and suffix.
Returns a built-in Qt slot QAbstractSpinBox::clear
that can be passed to qt_core::Signal::connect
.
Clears the lineedit of all text but prefix and suffix.
pub fn editing_finished(&self) -> Signal<()>
[src]
This signal is emitted editing is finished. This happens when the spinbox loses focus and when enter is pressed.
Returns a built-in Qt signal QAbstractSpinBox::editingFinished
that can be passed to qt_core::Signal::connect
.
This signal is emitted editing is finished. This happens when the spinbox loses focus and when enter is pressed.
pub unsafe fn alignment(&self) -> QFlags<AlignmentFlag>
[src]
This property holds the alignment of the spin box
Calls C++ function: QFlags<Qt::AlignmentFlag> QAbstractSpinBox::alignment() const
.
This property holds the alignment of the spin box
Possible Values are Qt::AlignLeft, Qt::AlignRight, and Qt::AlignHCenter.
By default, the alignment is Qt::AlignLeft
Attempting to set the alignment to an illegal flag combination does nothing.
Access functions:
Qt::Alignment | alignment() const |
void | setAlignment(Qt::Alignment flag) |
See also Qt::Alignment.
pub unsafe fn button_symbols(&self) -> ButtonSymbols
[src]
This property holds the current button symbol mode
Calls C++ function: QAbstractSpinBox::ButtonSymbols QAbstractSpinBox::buttonSymbols() const
.
This property holds the current button symbol mode
The possible values can be either UpDownArrows
or PlusMinus
. The default is UpDownArrows
.
Note that some styles might render PlusMinus and UpDownArrows identically.
Access functions:
ButtonSymbols | buttonSymbols() const |
void | setButtonSymbols(ButtonSymbols bs) |
See also ButtonSymbols.
pub unsafe fn clear(&self)
[src]
Clears the lineedit of all text but prefix and suffix.
Calls C++ function: virtual [slot] void QAbstractSpinBox::clear()
.
Clears the lineedit of all text but prefix and suffix.
pub unsafe fn correction_mode(&self) -> CorrectionMode
[src]
This property holds the mode to correct an Intermediate value if editing finishes
Calls C++ function: QAbstractSpinBox::CorrectionMode QAbstractSpinBox::correctionMode() const
.
This property holds the mode to correct an Intermediate value if editing finishes
The default mode is QAbstractSpinBox::CorrectToPreviousValue.
This property was introduced in Qt 4.2.
Access functions:
CorrectionMode | correctionMode() const |
void | setCorrectionMode(CorrectionMode cm) |
See also acceptableInput, validate(), and fixup().
pub unsafe fn event(&self, event: impl CastInto<Ptr<QEvent>>) -> bool
[src]
Reimplemented from QObject::event().
Calls C++ function: virtual bool QAbstractSpinBox::event(QEvent* event)
.
Reimplemented from QObject::event().
pub unsafe fn fixup(&self, input: impl CastInto<Ref<QString>>)
[src]
This virtual function is called by the QAbstractSpinBox if the input is not validated to QValidator::Acceptable when Return is pressed or interpretText() is called. It will try to change the text so it is valid. Reimplemented in the various subclasses.
Calls C++ function: virtual void QAbstractSpinBox::fixup(QString& input) const
.
This virtual function is called by the QAbstractSpinBox if the input is not validated to QValidator::Acceptable when Return is pressed or interpretText() is called. It will try to change the text so it is valid. Reimplemented in the various subclasses.
pub unsafe fn has_acceptable_input(&self) -> bool
[src]
This property holds whether the input satisfies the current validation
Calls C++ function: bool QAbstractSpinBox::hasAcceptableInput() const
.
This property holds whether the input satisfies the current validation
This property was introduced in Qt 4.2.
Access functions:
bool | hasAcceptableInput() const |
See also validate(), fixup(), and correctionMode.
pub unsafe fn has_frame(&self) -> bool
[src]
This property holds whether the spin box draws itself with a frame
Calls C++ function: bool QAbstractSpinBox::hasFrame() const
.
This property holds whether the spin box draws itself with a frame
If enabled (the default) the spin box draws itself inside a frame, otherwise the spin box draws itself without any frame.
Access functions:
bool | hasFrame() const |
void | setFrame(bool) |
pub unsafe fn input_method_query(
&self,
arg1: InputMethodQuery
) -> CppBox<QVariant>
[src]
&self,
arg1: InputMethodQuery
) -> CppBox<QVariant>
Reimplemented from QWidget::inputMethodQuery().
Calls C++ function: virtual QVariant QAbstractSpinBox::inputMethodQuery(Qt::InputMethodQuery arg1) const
.
Reimplemented from QWidget::inputMethodQuery().
pub unsafe fn interpret_text(&self)
[src]
This function interprets the text of the spin box. If the value has changed since last interpretation it will emit signals.
Calls C++ function: void QAbstractSpinBox::interpretText()
.
This function interprets the text of the spin box. If the value has changed since last interpretation it will emit signals.
pub unsafe fn is_accelerated(&self) -> bool
[src]
This property holds whether the spin box will accelerate the frequency of the steps when pressing the step Up/Down buttons.
Calls C++ function: bool QAbstractSpinBox::isAccelerated() const
.
This property holds whether the spin box will accelerate the frequency of the steps when pressing the step Up/Down buttons.
If enabled the spin box will increase/decrease the value faster the longer you hold the button down.
This property was introduced in Qt 4.2.
Access functions:
bool | isAccelerated() const |
void | setAccelerated(bool on) |
pub unsafe fn is_group_separator_shown(&self) -> bool
[src]
This property holds whether a thousands separator is enabled. By default this property is false.
Calls C++ function: bool QAbstractSpinBox::isGroupSeparatorShown() const
.
This property holds whether a thousands separator is enabled. By default this property is false.
This property was introduced in Qt 5.3.
Access functions:
bool | isGroupSeparatorShown() const |
void | setGroupSeparatorShown(bool shown) |
pub unsafe fn is_read_only(&self) -> bool
[src]
This property holds whether the spin box is read only.
Calls C++ function: bool QAbstractSpinBox::isReadOnly() const
.
This property holds whether the spin box is read only.
In read-only mode, the user can still copy the text to the clipboard, or drag and drop the text; but cannot edit it.
The QLineEdit in the QAbstractSpinBox does not show a cursor in read-only mode.
Access functions:
bool | isReadOnly() const |
void | setReadOnly(bool r) |
See also QLineEdit::readOnly.
pub unsafe fn keyboard_tracking(&self) -> bool
[src]
This property holds whether keyboard tracking is enabled for the spinbox.
Calls C++ function: bool QAbstractSpinBox::keyboardTracking() const
.
This property holds whether keyboard tracking is enabled for the spinbox.
If keyboard tracking is enabled (the default), the spinbox emits the valueChanged() signal while the new value is being entered from the keyboard.
E.g. when the user enters the value 600 by typing 6, 0, and 0, the spinbox emits 3 signals with the values 6, 60, and 600 respectively.
If keyboard tracking is disabled, the spinbox doesn't emit the valueChanged() signal while typing. It emits the signal later, when the return key is pressed, when keyboard focus is lost, or when other spinbox functionality is used, e.g. pressing an arrow key.
This property was introduced in Qt 4.3.
Access functions:
bool | keyboardTracking() const |
void | setKeyboardTracking(bool kt) |
pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>
[src]
Calls C++ function: virtual const QMetaObject* QAbstractSpinBox::metaObject() const
.
pub unsafe fn minimum_size_hint(&self) -> CppBox<QSize>
[src]
Reimplemented from QWidget::minimumSizeHint().
Calls C++ function: virtual QSize QAbstractSpinBox::minimumSizeHint() const
.
Reimplemented from QWidget::minimumSizeHint().
pub unsafe fn qt_metacall(
&self,
arg1: Call,
arg2: c_int,
arg3: *mut *mut c_void
) -> c_int
[src]
&self,
arg1: Call,
arg2: c_int,
arg3: *mut *mut c_void
) -> c_int
Calls C++ function: virtual int QAbstractSpinBox::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3)
.
pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void
[src]
Calls C++ function: virtual void* QAbstractSpinBox::qt_metacast(const char* arg1)
.
pub unsafe fn select_all(&self)
[src]
Selects all the text in the spinbox except the prefix and suffix.
Calls C++ function: [slot] void QAbstractSpinBox::selectAll()
.
Selects all the text in the spinbox except the prefix and suffix.
pub unsafe fn set_accelerated(&self, on: bool)
[src]
This property holds whether the spin box will accelerate the frequency of the steps when pressing the step Up/Down buttons.
Calls C++ function: void QAbstractSpinBox::setAccelerated(bool on)
.
This property holds whether the spin box will accelerate the frequency of the steps when pressing the step Up/Down buttons.
If enabled the spin box will increase/decrease the value faster the longer you hold the button down.
This property was introduced in Qt 4.2.
Access functions:
bool | isAccelerated() const |
void | setAccelerated(bool on) |
pub unsafe fn set_alignment(&self, flag: QFlags<AlignmentFlag>)
[src]
This property holds the alignment of the spin box
Calls C++ function: void QAbstractSpinBox::setAlignment(QFlags<Qt::AlignmentFlag> flag)
.
This property holds the alignment of the spin box
Possible Values are Qt::AlignLeft, Qt::AlignRight, and Qt::AlignHCenter.
By default, the alignment is Qt::AlignLeft
Attempting to set the alignment to an illegal flag combination does nothing.
Access functions:
Qt::Alignment | alignment() const |
void | setAlignment(Qt::Alignment flag) |
See also Qt::Alignment.
pub unsafe fn set_button_symbols(&self, bs: ButtonSymbols)
[src]
This property holds the current button symbol mode
Calls C++ function: void QAbstractSpinBox::setButtonSymbols(QAbstractSpinBox::ButtonSymbols bs)
.
This property holds the current button symbol mode
The possible values can be either UpDownArrows
or PlusMinus
. The default is UpDownArrows
.
Note that some styles might render PlusMinus and UpDownArrows identically.
Access functions:
ButtonSymbols | buttonSymbols() const |
void | setButtonSymbols(ButtonSymbols bs) |
See also ButtonSymbols.
pub unsafe fn set_correction_mode(&self, cm: CorrectionMode)
[src]
This property holds the mode to correct an Intermediate value if editing finishes
Calls C++ function: void QAbstractSpinBox::setCorrectionMode(QAbstractSpinBox::CorrectionMode cm)
.
This property holds the mode to correct an Intermediate value if editing finishes
The default mode is QAbstractSpinBox::CorrectToPreviousValue.
This property was introduced in Qt 4.2.
Access functions:
CorrectionMode | correctionMode() const |
void | setCorrectionMode(CorrectionMode cm) |
See also acceptableInput, validate(), and fixup().
pub unsafe fn set_frame(&self, arg1: bool)
[src]
This property holds whether the spin box draws itself with a frame
Calls C++ function: void QAbstractSpinBox::setFrame(bool arg1)
.
This property holds whether the spin box draws itself with a frame
If enabled (the default) the spin box draws itself inside a frame, otherwise the spin box draws itself without any frame.
Access functions:
bool | hasFrame() const |
void | setFrame(bool) |
pub unsafe fn set_group_separator_shown(&self, shown: bool)
[src]
This property holds whether a thousands separator is enabled. By default this property is false.
Calls C++ function: void QAbstractSpinBox::setGroupSeparatorShown(bool shown)
.
This property holds whether a thousands separator is enabled. By default this property is false.
This property was introduced in Qt 5.3.
Access functions:
bool | isGroupSeparatorShown() const |
void | setGroupSeparatorShown(bool shown) |
pub unsafe fn set_keyboard_tracking(&self, kt: bool)
[src]
This property holds whether keyboard tracking is enabled for the spinbox.
Calls C++ function: void QAbstractSpinBox::setKeyboardTracking(bool kt)
.
This property holds whether keyboard tracking is enabled for the spinbox.
If keyboard tracking is enabled (the default), the spinbox emits the valueChanged() signal while the new value is being entered from the keyboard.
E.g. when the user enters the value 600 by typing 6, 0, and 0, the spinbox emits 3 signals with the values 6, 60, and 600 respectively.
If keyboard tracking is disabled, the spinbox doesn't emit the valueChanged() signal while typing. It emits the signal later, when the return key is pressed, when keyboard focus is lost, or when other spinbox functionality is used, e.g. pressing an arrow key.
This property was introduced in Qt 4.3.
Access functions:
bool | keyboardTracking() const |
void | setKeyboardTracking(bool kt) |
pub unsafe fn set_read_only(&self, r: bool)
[src]
This property holds whether the spin box is read only.
Calls C++ function: void QAbstractSpinBox::setReadOnly(bool r)
.
This property holds whether the spin box is read only.
In read-only mode, the user can still copy the text to the clipboard, or drag and drop the text; but cannot edit it.
The QLineEdit in the QAbstractSpinBox does not show a cursor in read-only mode.
Access functions:
bool | isReadOnly() const |
void | setReadOnly(bool r) |
See also QLineEdit::readOnly.
pub unsafe fn set_special_value_text(&self, txt: impl CastInto<Ref<QString>>)
[src]
This property holds the special-value text
Calls C++ function: void QAbstractSpinBox::setSpecialValueText(const QString& txt)
.
This property holds the special-value text
If set, the spin box will display this text instead of a numeric value whenever the current value is equal to minimum(). Typical use is to indicate that this choice has a special (default) meaning.
For example, if your spin box allows the user to choose a scale factor (or zoom level) for displaying an image, and your application is able to automatically choose one that will enable the image to fit completely within the display window, you can set up the spin box like this:
QSpinBox *zoomSpinBox = new QSpinBox; zoomSpinBox->setRange(0, 1000); zoomSpinBox->setSingleStep(10); zoomSpinBox->setSuffix("%"); zoomSpinBox->setSpecialValueText(tr("Automatic")); zoomSpinBox->setValue(100);
The user will then be able to choose a scale from 1% to 1000% or select "Auto" to leave it up to the application to choose. Your code must then interpret the spin box value of 0 as a request from the user to scale the image to fit inside the window.
All values are displayed with the prefix and suffix (if set), except for the special value, which only shows the special value text. This special text is passed in the QSpinBox::valueChanged() signal that passes a QString.
To turn off the special-value text display, call this function with an empty string. The default is no special-value text, i.e. the numeric value is shown as usual.
If no special-value text is set, specialValueText() returns an empty string.
Access functions:
QString | specialValueText() const |
void | setSpecialValueText(const QString &txt) |
pub unsafe fn set_wrapping(&self, w: bool)
[src]
This property holds whether the spin box is circular.
Calls C++ function: void QAbstractSpinBox::setWrapping(bool w)
.
This property holds whether the spin box is circular.
If wrapping is true stepping up from maximum() value will take you to the minimum() value and vica versa. Wrapping only make sense if you have minimum() and maximum() values set.
QSpinBox *spinBox = new QSpinBox(this); spinBox->setRange(0, 100); spinBox->setWrapping(true); spinBox->setValue(100); spinBox->stepBy(1); // value is 0
Access functions:
bool | wrapping() const |
void | setWrapping(bool w) |
See also QSpinBox::minimum() and QSpinBox::maximum().
pub unsafe fn size_hint(&self) -> CppBox<QSize>
[src]
Reimplemented from QWidget::sizeHint().
Calls C++ function: virtual QSize QAbstractSpinBox::sizeHint() const
.
Reimplemented from QWidget::sizeHint().
pub unsafe fn special_value_text(&self) -> CppBox<QString>
[src]
This property holds the special-value text
Calls C++ function: QString QAbstractSpinBox::specialValueText() const
.
This property holds the special-value text
If set, the spin box will display this text instead of a numeric value whenever the current value is equal to minimum(). Typical use is to indicate that this choice has a special (default) meaning.
For example, if your spin box allows the user to choose a scale factor (or zoom level) for displaying an image, and your application is able to automatically choose one that will enable the image to fit completely within the display window, you can set up the spin box like this:
QSpinBox *zoomSpinBox = new QSpinBox; zoomSpinBox->setRange(0, 1000); zoomSpinBox->setSingleStep(10); zoomSpinBox->setSuffix("%"); zoomSpinBox->setSpecialValueText(tr("Automatic")); zoomSpinBox->setValue(100);
The user will then be able to choose a scale from 1% to 1000% or select "Auto" to leave it up to the application to choose. Your code must then interpret the spin box value of 0 as a request from the user to scale the image to fit inside the window.
All values are displayed with the prefix and suffix (if set), except for the special value, which only shows the special value text. This special text is passed in the QSpinBox::valueChanged() signal that passes a QString.
To turn off the special-value text display, call this function with an empty string. The default is no special-value text, i.e. the numeric value is shown as usual.
If no special-value text is set, specialValueText() returns an empty string.
Access functions:
QString | specialValueText() const |
void | setSpecialValueText(const QString &txt) |
pub unsafe fn step_by(&self, steps: c_int)
[src]
Virtual function that is called whenever the user triggers a step. The steps parameter indicates how many steps were taken, e.g. Pressing Qt::Key_Down will trigger a call to stepBy(-1), whereas pressing Qt::Key_Prior will trigger a call to stepBy(10).
Calls C++ function: virtual void QAbstractSpinBox::stepBy(int steps)
.
Virtual function that is called whenever the user triggers a step. The steps parameter indicates how many steps were taken, e.g. Pressing Qt::Key_Down will trigger a call to stepBy(-1), whereas pressing Qt::Key_Prior will trigger a call to stepBy(10).
If you subclass QAbstractSpinBox you must reimplement this function. Note that this function is called even if the resulting value will be outside the bounds of minimum and maximum. It's this function's job to handle these situations.
pub unsafe fn step_down(&self)
[src]
Steps down by one linestep Calling this slot is analogous to calling stepBy(-1);
Calls C++ function: [slot] void QAbstractSpinBox::stepDown()
.
pub unsafe fn step_up(&self)
[src]
Steps up by one linestep Calling this slot is analogous to calling stepBy(1);
Calls C++ function: [slot] void QAbstractSpinBox::stepUp()
.
pub unsafe fn text(&self) -> CppBox<QString>
[src]
This property holds the spin box's text, including any prefix and suffix
Calls C++ function: QString QAbstractSpinBox::text() const
.
This property holds the spin box's text, including any prefix and suffix
There is no default text.
Access functions:
QString | text() const |
pub unsafe fn validate(
&self,
input: impl CastInto<Ref<QString>>,
pos: *mut c_int
) -> State
[src]
&self,
input: impl CastInto<Ref<QString>>,
pos: *mut c_int
) -> State
This virtual function is called by the QAbstractSpinBox to determine whether input is valid. The pos parameter indicates the position in the string. Reimplemented in the various subclasses.
Calls C++ function: virtual QValidator::State QAbstractSpinBox::validate(QString& input, int& pos) const
.
This virtual function is called by the QAbstractSpinBox to determine whether input is valid. The pos parameter indicates the position in the string. Reimplemented in the various subclasses.
pub unsafe fn wrapping(&self) -> bool
[src]
This property holds whether the spin box is circular.
Calls C++ function: bool QAbstractSpinBox::wrapping() const
.
This property holds whether the spin box is circular.
If wrapping is true stepping up from maximum() value will take you to the minimum() value and vica versa. Wrapping only make sense if you have minimum() and maximum() values set.
QSpinBox *spinBox = new QSpinBox(this); spinBox->setRange(0, 100); spinBox->setWrapping(true); spinBox->setValue(100); spinBox->stepBy(1); // value is 0
Access functions:
bool | wrapping() const |
void | setWrapping(bool w) |
See also QSpinBox::minimum() and QSpinBox::maximum().
Trait Implementations
impl CppDeletable for QDateTimeEdit
[src]
unsafe fn delete(&self)
[src]
Destructor.
Calls C++ function: virtual [destructor] void QDateTimeEdit::~QDateTimeEdit()
.
Destructor.
impl Deref for QDateTimeEdit
[src]
type Target = QAbstractSpinBox
The resulting type after dereferencing.
fn deref(&self) -> &QAbstractSpinBox
[src]
Calls C++ function: QAbstractSpinBox* static_cast<QAbstractSpinBox*>(QDateTimeEdit* ptr)
.
impl DynamicCast<QDateEdit> for QDateTimeEdit
[src]
unsafe fn dynamic_cast(ptr: Ptr<QDateTimeEdit>) -> Ptr<QDateEdit>
[src]
Calls C++ function: QDateEdit* dynamic_cast<QDateEdit*>(QDateTimeEdit* ptr)
.
impl DynamicCast<QDateTimeEdit> for QAbstractSpinBox
[src]
unsafe fn dynamic_cast(ptr: Ptr<QAbstractSpinBox>) -> Ptr<QDateTimeEdit>
[src]
Calls C++ function: QDateTimeEdit* dynamic_cast<QDateTimeEdit*>(QAbstractSpinBox* ptr)
.
impl DynamicCast<QDateTimeEdit> for QWidget
[src]
unsafe fn dynamic_cast(ptr: Ptr<QWidget>) -> Ptr<QDateTimeEdit>
[src]
Calls C++ function: QDateTimeEdit* dynamic_cast<QDateTimeEdit*>(QWidget* ptr)
.
impl DynamicCast<QDateTimeEdit> for QObject
[src]
unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QDateTimeEdit>
[src]
Calls C++ function: QDateTimeEdit* dynamic_cast<QDateTimeEdit*>(QObject* ptr)
.
impl DynamicCast<QDateTimeEdit> for QPaintDevice
[src]
unsafe fn dynamic_cast(ptr: Ptr<QPaintDevice>) -> Ptr<QDateTimeEdit>
[src]
Calls C++ function: QDateTimeEdit* dynamic_cast<QDateTimeEdit*>(QPaintDevice* ptr)
.
impl DynamicCast<QTimeEdit> for QDateTimeEdit
[src]
unsafe fn dynamic_cast(ptr: Ptr<QDateTimeEdit>) -> Ptr<QTimeEdit>
[src]
Calls C++ function: QTimeEdit* dynamic_cast<QTimeEdit*>(QDateTimeEdit* ptr)
.
impl StaticDowncast<QDateEdit> for QDateTimeEdit
[src]
unsafe fn static_downcast(ptr: Ptr<QDateTimeEdit>) -> Ptr<QDateEdit>
[src]
Calls C++ function: QDateEdit* static_cast<QDateEdit*>(QDateTimeEdit* ptr)
.
impl StaticDowncast<QDateTimeEdit> for QAbstractSpinBox
[src]
unsafe fn static_downcast(ptr: Ptr<QAbstractSpinBox>) -> Ptr<QDateTimeEdit>
[src]
Calls C++ function: QDateTimeEdit* static_cast<QDateTimeEdit*>(QAbstractSpinBox* ptr)
.
impl StaticDowncast<QDateTimeEdit> for QWidget
[src]
unsafe fn static_downcast(ptr: Ptr<QWidget>) -> Ptr<QDateTimeEdit>
[src]
Calls C++ function: QDateTimeEdit* static_cast<QDateTimeEdit*>(QWidget* ptr)
.
impl StaticDowncast<QDateTimeEdit> for QObject
[src]
unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QDateTimeEdit>
[src]
Calls C++ function: QDateTimeEdit* static_cast<QDateTimeEdit*>(QObject* ptr)
.
impl StaticDowncast<QDateTimeEdit> for QPaintDevice
[src]
unsafe fn static_downcast(ptr: Ptr<QPaintDevice>) -> Ptr<QDateTimeEdit>
[src]
Calls C++ function: QDateTimeEdit* static_cast<QDateTimeEdit*>(QPaintDevice* ptr)
.
impl StaticDowncast<QTimeEdit> for QDateTimeEdit
[src]
unsafe fn static_downcast(ptr: Ptr<QDateTimeEdit>) -> Ptr<QTimeEdit>
[src]
Calls C++ function: QTimeEdit* static_cast<QTimeEdit*>(QDateTimeEdit* ptr)
.
impl StaticUpcast<QAbstractSpinBox> for QDateTimeEdit
[src]
unsafe fn static_upcast(ptr: Ptr<QDateTimeEdit>) -> Ptr<QAbstractSpinBox>
[src]
Calls C++ function: QAbstractSpinBox* static_cast<QAbstractSpinBox*>(QDateTimeEdit* ptr)
.
impl StaticUpcast<QDateTimeEdit> for QTimeEdit
[src]
unsafe fn static_upcast(ptr: Ptr<QTimeEdit>) -> Ptr<QDateTimeEdit>
[src]
Calls C++ function: QDateTimeEdit* static_cast<QDateTimeEdit*>(QTimeEdit* ptr)
.
impl StaticUpcast<QDateTimeEdit> for QDateEdit
[src]
unsafe fn static_upcast(ptr: Ptr<QDateEdit>) -> Ptr<QDateTimeEdit>
[src]
Calls C++ function: QDateTimeEdit* static_cast<QDateTimeEdit*>(QDateEdit* ptr)
.
impl StaticUpcast<QObject> for QDateTimeEdit
[src]
unsafe fn static_upcast(ptr: Ptr<QDateTimeEdit>) -> Ptr<QObject>
[src]
Calls C++ function: QObject* static_cast<QObject*>(QDateTimeEdit* ptr)
.
impl StaticUpcast<QPaintDevice> for QDateTimeEdit
[src]
unsafe fn static_upcast(ptr: Ptr<QDateTimeEdit>) -> Ptr<QPaintDevice>
[src]
Calls C++ function: QPaintDevice* static_cast<QPaintDevice*>(QDateTimeEdit* ptr)
.
impl StaticUpcast<QWidget> for QDateTimeEdit
[src]
unsafe fn static_upcast(ptr: Ptr<QDateTimeEdit>) -> Ptr<QWidget>
[src]
Calls C++ function: QWidget* static_cast<QWidget*>(QDateTimeEdit* ptr)
.
Auto Trait Implementations
impl RefUnwindSafe for QDateTimeEdit
impl Send for QDateTimeEdit
impl Sync for QDateTimeEdit
impl Unpin for QDateTimeEdit
impl UnwindSafe for QDateTimeEdit
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,