[][src]Struct qt_widgets::QDateEdit

#[repr(C)]
pub struct QDateEdit { /* fields omitted */ }

The QDateEdit class provides a widget for editing dates based on the QDateTimeEdit widget.

C++ class: QDateEdit.

C++ documentation:

The QDateEdit class provides a widget for editing dates based on the QDateTimeEdit widget.

Many of the properties and functions provided by QDateEdit are implemented in QDateTimeEdit. These are the relevant properties of this class:

  • date holds the date displayed by the widget.
  • minimumDate defines the minimum (earliest) date that can be set by the user.
  • maximumDate defines the maximum (latest) date that can be set by the user.
  • displayFormat contains a string that is used to format the date displayed in the widget.

Methods

impl QDateEdit[src]

pub fn user_date_changed(&self) -> Signal<(*const QDate,)>[src]

Returns a built-in Qt signal QDateEdit::userDateChanged that can be passed to qt_core::Signal::connect.

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QDateEdit::metaObject() const.

pub unsafe fn from_q_widget(
    parent: impl CastInto<MutPtr<QWidget>>
) -> CppBox<QDateEdit>
[src]

Constructs an empty date editor with a parent.

Calls C++ function: [constructor] void QDateEdit::QDateEdit(QWidget* parent = …).

C++ documentation:

Constructs an empty date editor with a parent.

pub unsafe fn from_q_date_q_widget(
    date: impl CastInto<Ref<QDate>>,
    parent: impl CastInto<MutPtr<QWidget>>
) -> CppBox<QDateEdit>
[src]

Constructs an empty date editor with a parent. The date is set to date.

Calls C++ function: [constructor] void QDateEdit::QDateEdit(const QDate& date, QWidget* parent = …).

C++ documentation:

Constructs an empty date editor with a parent. The date is set to date.

pub unsafe fn new() -> CppBox<QDateEdit>[src]

The QDateEdit class provides a widget for editing dates based on the QDateTimeEdit widget.

Calls C++ function: [constructor] void QDateEdit::QDateEdit().

C++ documentation:

The QDateEdit class provides a widget for editing dates based on the QDateTimeEdit widget.

Many of the properties and functions provided by QDateEdit are implemented in QDateTimeEdit. These are the relevant properties of this class:

  • date holds the date displayed by the widget.
  • minimumDate defines the minimum (earliest) date that can be set by the user.
  • maximumDate defines the maximum (latest) date that can be set by the user.
  • displayFormat contains a string that is used to format the date displayed in the widget.

pub unsafe fn from_q_date(date: impl CastInto<Ref<QDate>>) -> CppBox<QDateEdit>[src]

Constructs an empty date editor with a parent. The date is set to date.

Calls C++ function: [constructor] void QDateEdit::QDateEdit(const QDate& date).

C++ documentation:

Constructs an empty date editor with a parent. The date is set to date.

pub unsafe fn qt_metacall(
    &mut self,
    arg1: Call,
    arg2: c_int,
    arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]

Calls C++ function: virtual int QDateEdit::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(
    &mut self,
    arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]

Calls C++ function: virtual void* QDateEdit::qt_metacast(const char* arg1).

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn tr(
    s: impl CastInto<Ptr<c_char>>,
    c: impl CastInto<Ptr<c_char>>,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QDateEdit::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: impl CastInto<Ptr<c_char>>,
    c: impl CastInto<Ptr<c_char>>,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QDateEdit::trUtf8(const char* s, const char* c, int n).

Methods from Deref<Target = QDateTimeEdit>

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.

C++ documentation:

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.

C++ documentation:

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.

C++ documentation:

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.

C++ documentation:

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)

See also date and time.

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.

C++ documentation:

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)

See also time and dateTime.

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.

C++ documentation:

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)

See also date and dateTime.

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.

C++ documentation:

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) -> MutPtr<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.

C++ documentation:

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(&mut self)[src]

Reimplemented from QAbstractSpinBox::clear().

Calls C++ function: virtual void QDateTimeEdit::clear().

C++ documentation:

Reimplemented from QAbstractSpinBox::clear().

pub unsafe fn clear_maximum_date(&mut self)[src]

This property holds the maximum date of the date time edit

Calls C++ function: void QDateTimeEdit::clearMaximumDate().

C++ documentation:

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(&mut self)[src]

This property holds the maximum datetime of the date time edit

Calls C++ function: void QDateTimeEdit::clearMaximumDateTime().

C++ documentation:

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(&mut self)[src]

This property holds the maximum time of the date time edit

Calls C++ function: void QDateTimeEdit::clearMaximumTime().

C++ documentation:

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(&mut self)[src]

This property holds the minimum date of the date time edit

Calls C++ function: void QDateTimeEdit::clearMinimumDate().

C++ documentation:

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(&mut self)[src]

This property holds the minimum datetime of the date time edit

Calls C++ function: void QDateTimeEdit::clearMinimumDateTime().

C++ documentation:

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(&mut self)[src]

This property holds the minimum time of the date time edit

Calls C++ function: void QDateTimeEdit::clearMinimumTime().

C++ documentation:

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.

C++ documentation:

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.

C++ documentation:

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.

C++ documentation:

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)

See also time and dateTime.

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.

C++ documentation:

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)

See also date and time.

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.

C++ documentation:

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):

FormatResult
dd.MM.yyyy02.07.1969
MMM d yyJul 2 69
MMMM d yyJuly 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.

C++ documentation:

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(&mut self, event: impl CastInto<MutPtr<QEvent>>) -> bool[src]

Reimplemented from QObject::event().

Calls C++ function: virtual bool QDateTimeEdit::event(QEvent* event).

C++ documentation:

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.

C++ documentation:

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.

C++ documentation:

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.

C++ documentation:

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.

C++ documentation:

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.

C++ documentation:

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.

C++ documentation:

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 qt_metacall(
    &mut self,
    arg1: Call,
    arg2: c_int,
    arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]

Calls C++ function: virtual int QDateTimeEdit::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(
    &mut self,
    arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<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.

C++ documentation:

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.

C++ documentation:

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.

C++ documentation:

Returns the text from the given section.

See also currentSection().

pub unsafe fn set_calendar_popup(&mut self, enable: bool)[src]

This property holds the current calendar pop-up show mode.

Calls C++ function: void QDateTimeEdit::setCalendarPopup(bool enable).

C++ documentation:

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(
    &mut self,
    calendar_widget: impl CastInto<MutPtr<QCalendarWidget>>
)
[src]

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).

C++ documentation:

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(&mut self, section: Section)[src]

This property holds the current section of the spinbox setCurrentSection()

Calls C++ function: void QDateTimeEdit::setCurrentSection(QDateTimeEdit::Section section).

C++ documentation:

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(&mut self, index: c_int)[src]

This property holds the current section index of the spinbox

Calls C++ function: void QDateTimeEdit::setCurrentSectionIndex(int index).

C++ documentation:

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(&mut 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).

C++ documentation:

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)

See also time and dateTime.

pub unsafe fn set_date_range(
    &mut self,
    min: impl CastInto<Ref<QDate>>,
    max: impl CastInto<Ref<QDate>>
)
[src]

Convenience function to set minimum and maximum date with one function call.

Calls C++ function: void QDateTimeEdit::setDateRange(const QDate& min, const QDate& max).

C++ documentation:

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(&mut 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).

C++ documentation:

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)

See also date and time.

pub unsafe fn set_date_time_range(
    &mut self,
    min: impl CastInto<Ref<QDateTime>>,
    max: impl CastInto<Ref<QDateTime>>
)
[src]

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).

C++ documentation:

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(&mut 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).

C++ documentation:

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):

FormatResult
dd.MM.yyyy02.07.1969
MMM d yyJul 2 69
MMMM d yyJuly 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(&mut 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).

C++ documentation:

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(
    &mut 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).

C++ documentation:

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(&mut 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).

C++ documentation:

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(&mut 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).

C++ documentation:

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(
    &mut 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).

C++ documentation:

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(&mut 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).

C++ documentation:

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(&mut 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).

C++ documentation:

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(&mut 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).

C++ documentation:

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)

See also date and dateTime.

pub unsafe fn set_time_range(
    &mut self,
    min: impl CastInto<Ref<QTime>>,
    max: impl CastInto<Ref<QTime>>
)
[src]

Convenience function to set minimum and maximum time with one function call.

Calls C++ function: void QDateTimeEdit::setTimeRange(const QTime& min, const QTime& max).

C++ documentation:

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(&mut 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).

C++ documentation:

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.

C++ documentation:

Reimplemented from QWidget::sizeHint().

pub unsafe fn step_by(&mut self, steps: c_int)[src]

Reimplemented from QAbstractSpinBox::stepBy().

Calls C++ function: virtual void QDateTimeEdit::stepBy(int steps).

C++ documentation:

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.

C++ documentation:

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)

See also date and dateTime.

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.

C++ documentation:

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)

Trait Implementations

impl CppDeletable for QDateEdit[src]

unsafe fn delete(&mut self)[src]

Destructor.

Calls C++ function: virtual [destructor] void QDateEdit::~QDateEdit().

C++ documentation:

Destructor.

impl Deref for QDateEdit[src]

type Target = QDateTimeEdit

The resulting type after dereferencing.

fn deref(&self) -> &QDateTimeEdit[src]

Calls C++ function: QDateTimeEdit* static_cast<QDateTimeEdit*>(QDateEdit* ptr).

impl DerefMut for QDateEdit[src]

fn deref_mut(&mut self) -> &mut QDateTimeEdit[src]

Calls C++ function: QDateTimeEdit* static_cast<QDateTimeEdit*>(QDateEdit* 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).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QDateTimeEdit>) -> MutPtr<QDateEdit>[src]

Calls C++ function: QDateEdit* dynamic_cast<QDateEdit*>(QDateTimeEdit* ptr).

impl DynamicCast<QDateEdit> for QAbstractSpinBox[src]

unsafe fn dynamic_cast(ptr: Ptr<QAbstractSpinBox>) -> Ptr<QDateEdit>[src]

Calls C++ function: QDateEdit* dynamic_cast<QDateEdit*>(QAbstractSpinBox* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QAbstractSpinBox>) -> MutPtr<QDateEdit>[src]

Calls C++ function: QDateEdit* dynamic_cast<QDateEdit*>(QAbstractSpinBox* ptr).

impl DynamicCast<QDateEdit> for QWidget[src]

unsafe fn dynamic_cast(ptr: Ptr<QWidget>) -> Ptr<QDateEdit>[src]

Calls C++ function: QDateEdit* dynamic_cast<QDateEdit*>(QWidget* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QWidget>) -> MutPtr<QDateEdit>[src]

Calls C++ function: QDateEdit* dynamic_cast<QDateEdit*>(QWidget* ptr).

impl DynamicCast<QDateEdit> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QDateEdit>[src]

Calls C++ function: QDateEdit* dynamic_cast<QDateEdit*>(QObject* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QObject>) -> MutPtr<QDateEdit>[src]

Calls C++ function: QDateEdit* dynamic_cast<QDateEdit*>(QObject* ptr).

impl DynamicCast<QDateEdit> for QPaintDevice[src]

unsafe fn dynamic_cast(ptr: Ptr<QPaintDevice>) -> Ptr<QDateEdit>[src]

Calls C++ function: QDateEdit* dynamic_cast<QDateEdit*>(QPaintDevice* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QPaintDevice>) -> MutPtr<QDateEdit>[src]

Calls C++ function: QDateEdit* dynamic_cast<QDateEdit*>(QPaintDevice* 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).

unsafe fn static_downcast_mut(ptr: MutPtr<QDateTimeEdit>) -> MutPtr<QDateEdit>[src]

Calls C++ function: QDateEdit* static_cast<QDateEdit*>(QDateTimeEdit* ptr).

impl StaticDowncast<QDateEdit> for QAbstractSpinBox[src]

unsafe fn static_downcast(ptr: Ptr<QAbstractSpinBox>) -> Ptr<QDateEdit>[src]

Calls C++ function: QDateEdit* static_cast<QDateEdit*>(QAbstractSpinBox* ptr).

unsafe fn static_downcast_mut(
    ptr: MutPtr<QAbstractSpinBox>
) -> MutPtr<QDateEdit>
[src]

Calls C++ function: QDateEdit* static_cast<QDateEdit*>(QAbstractSpinBox* ptr).

impl StaticDowncast<QDateEdit> for QWidget[src]

unsafe fn static_downcast(ptr: Ptr<QWidget>) -> Ptr<QDateEdit>[src]

Calls C++ function: QDateEdit* static_cast<QDateEdit*>(QWidget* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QWidget>) -> MutPtr<QDateEdit>[src]

Calls C++ function: QDateEdit* static_cast<QDateEdit*>(QWidget* ptr).

impl StaticDowncast<QDateEdit> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QDateEdit>[src]

Calls C++ function: QDateEdit* static_cast<QDateEdit*>(QObject* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QObject>) -> MutPtr<QDateEdit>[src]

Calls C++ function: QDateEdit* static_cast<QDateEdit*>(QObject* ptr).

impl StaticDowncast<QDateEdit> for QPaintDevice[src]

unsafe fn static_downcast(ptr: Ptr<QPaintDevice>) -> Ptr<QDateEdit>[src]

Calls C++ function: QDateEdit* static_cast<QDateEdit*>(QPaintDevice* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QPaintDevice>) -> MutPtr<QDateEdit>[src]

Calls C++ function: QDateEdit* static_cast<QDateEdit*>(QPaintDevice* ptr).

impl StaticUpcast<QAbstractSpinBox> for QDateEdit[src]

unsafe fn static_upcast(ptr: Ptr<QDateEdit>) -> Ptr<QAbstractSpinBox>[src]

Calls C++ function: QAbstractSpinBox* static_cast<QAbstractSpinBox*>(QDateEdit* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QDateEdit>) -> MutPtr<QAbstractSpinBox>[src]

Calls C++ function: QAbstractSpinBox* static_cast<QAbstractSpinBox*>(QDateEdit* 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).

unsafe fn static_upcast_mut(ptr: MutPtr<QDateEdit>) -> MutPtr<QDateTimeEdit>[src]

Calls C++ function: QDateTimeEdit* static_cast<QDateTimeEdit*>(QDateEdit* ptr).

impl StaticUpcast<QObject> for QDateEdit[src]

unsafe fn static_upcast(ptr: Ptr<QDateEdit>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QDateEdit* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QDateEdit>) -> MutPtr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QDateEdit* ptr).

impl StaticUpcast<QPaintDevice> for QDateEdit[src]

unsafe fn static_upcast(ptr: Ptr<QDateEdit>) -> Ptr<QPaintDevice>[src]

Calls C++ function: QPaintDevice* static_cast<QPaintDevice*>(QDateEdit* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QDateEdit>) -> MutPtr<QPaintDevice>[src]

Calls C++ function: QPaintDevice* static_cast<QPaintDevice*>(QDateEdit* ptr).

impl StaticUpcast<QWidget> for QDateEdit[src]

unsafe fn static_upcast(ptr: Ptr<QDateEdit>) -> Ptr<QWidget>[src]

Calls C++ function: QWidget* static_cast<QWidget*>(QDateEdit* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QDateEdit>) -> MutPtr<QWidget>[src]

Calls C++ function: QWidget* static_cast<QWidget*>(QDateEdit* ptr).

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.