16 #ifndef QGSDATETIMEEDIT_H 17 #define QGSDATETIMEEDIT_H 19 #include <QDateTimeEdit> 35 Q_PROPERTY(
bool allowNull READ allowNull WRITE setAllowNull )
43 void setAllowNull(
bool allowNull );
50 void setDateTime(
const QDateTime &dateTime );
56 QDateTime dateTime()
const;
62 void clear()
override;
76 void valueChanged(
const QDateTime &date );
79 void mousePressEvent( QMouseEvent *event )
override;
80 void focusOutEvent( QFocusEvent *event )
override;
81 void wheelEvent( QWheelEvent *event )
override;
82 void showEvent( QShowEvent *event )
override;
85 void changed(
const QDateTime &dateTime );
88 bool mAllowNull =
true;
90 bool mIsEmpty =
false;
91 bool mCurrentPressEvent =
false;
93 QString mOriginalStyleSheet = QString();
94 QAction *mClearAction;
96 void displayNull(
bool updateCalendar =
false );
99 void resetBeforeChange(
int delta );
112 void setMinimumEditDateTime()
114 setMinimumDateTime( QDateTime::fromString( QStringLiteral(
"0100-01-01" ), Qt::ISODate ) );
118 #endif // QGSDATETIMEEDIT_H
The QgsDateTimeEdit class is a QDateTimeEdit with the capability of setting/reading null date/times...