16 #ifndef QGSDATETIMEEDIT_H 17 #define QGSDATETIMEEDIT_H 19 #include <QDateTimeEdit> 35 Q_PROPERTY(
bool allowNull READ allowNull WRITE setAllowNull )
50 void setAllowNull(
bool allowNull );
62 void setDateTime(
const QDateTime &dateTime );
69 QDateTime dateTime()
const;
75 void clear()
override;
89 void valueChanged(
const QDateTime &date );
92 void mousePressEvent( QMouseEvent *event )
override;
93 void focusOutEvent( QFocusEvent *event )
override;
94 void wheelEvent( QWheelEvent *event )
override;
95 void showEvent( QShowEvent *event )
override;
98 void changed(
const QDateTime &dateTime );
101 bool mAllowNull =
true;
102 bool mIsNull =
false;
103 bool mIsEmpty =
false;
104 bool mCurrentPressEvent =
false;
106 QString mOriginalStyleSheet = QString();
107 QAction *mClearAction;
109 void displayNull(
bool updateCalendar =
false );
112 void resetBeforeChange(
int delta );
125 void setMinimumEditDateTime()
127 setMinimumDateTime( QDateTime::fromString( QStringLiteral(
"0100-01-01" ), Qt::ISODate ) );
131 #endif // QGSDATETIMEEDIT_H
bool allowNull() const
If the widget allows setting null date/time.
The QgsDateTimeEdit class is a QDateTimeEdit with the capability of setting/reading null date/times...