The QgsDateTimeEdit class is a QDateTimeEdit with the capability of setting/reading null date/times.
More...
#include <qgsdatetimeedit.h>
The QgsDateTimeEdit class is a QDateTimeEdit with the capability of setting/reading null date/times.
- Warning
- You should use the signal valueChanged of this subclass rather than QDateTimeEdit::dateTimeChanged. If you consequently connect parent's dateTimeChanged signal and call dateTime() afterwards there is no warranty to have a proper NULL value handling.
Definition at line 32 of file qgsdatetimeedit.h.
◆ QgsDateTimeEdit()
QgsDateTimeEdit::QgsDateTimeEdit |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
◆ allowNull()
bool QgsDateTimeEdit::allowNull |
( |
| ) |
const |
|
inline |
◆ clear()
void QgsDateTimeEdit::clear |
( |
| ) |
|
|
override |
Set the current date as NULL.
- Note
- if the widget is not configured to accept NULL dates, this will have no effect
Definition at line 59 of file qgsdatetimeedit.cpp.
◆ dateTime()
QDateTime QgsDateTimeEdit::dateTime |
( |
| ) |
const |
dateTime returns the date time which can eventually be a null date/time
- Note
- since QDateTimeEdit::dateTime() is not virtual, dateTime must be called for QgsDateTimeEdit.
Definition at line 267 of file qgsdatetimeedit.cpp.
◆ focusOutEvent()
void QgsDateTimeEdit::focusOutEvent |
( |
QFocusEvent * |
event | ) |
|
|
overrideprotected |
◆ mousePressEvent()
void QgsDateTimeEdit::mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
◆ setAllowNull()
void QgsDateTimeEdit::setAllowNull |
( |
bool |
allowNull | ) |
|
Determines if the widget allows setting null date/time.
Definition at line 52 of file qgsdatetimeedit.cpp.
◆ setDateTime()
void QgsDateTimeEdit::setDateTime |
( |
const QDateTime & |
dateTime | ) |
|
setDateTime set the date time in the widget and handles null date times.
- Note
- since QDateTimeEdit::setDateTime() is not virtual, setDateTime must be called for QgsDateTimeEdit.
Definition at line 250 of file qgsdatetimeedit.cpp.
◆ setEmpty()
void QgsDateTimeEdit::setEmpty |
( |
| ) |
|
Resets the widget to show no value (ie, an "unknown" state).
- Since
- QGIS 2.16
Definition at line 86 of file qgsdatetimeedit.cpp.
◆ showEvent()
void QgsDateTimeEdit::showEvent |
( |
QShowEvent * |
event | ) |
|
|
overrideprotected |
◆ valueChanged
void QgsDateTimeEdit::valueChanged |
( |
const QDateTime & |
date | ) |
|
|
signal |
signal emitted whenever the value changes.
- Parameters
-
date | the new date/time value. |
◆ wheelEvent()
void QgsDateTimeEdit::wheelEvent |
( |
QWheelEvent * |
event | ) |
|
|
overrideprotected |
◆ allowNull
bool QgsDateTimeEdit::allowNull |
|
readwrite |
The documentation for this class was generated from the following files: