16 #ifndef QGSDATETIMEEDIT_H 17 #define QGSDATETIMEEDIT_H 19 #include <QDateTimeEdit> 35 Q_PROPERTY(
bool allowNull READ allowNull WRITE setAllowNull )
51 void setAllowNull(
bool allowNull );
63 void setDateTime(
const QDateTime &dateTime );
70 QDateTime dateTime()
const;
88 void clear()
override;
102 void valueChanged(
const QDateTime &date );
105 void mousePressEvent( QMouseEvent *event )
override;
106 void focusOutEvent( QFocusEvent *event )
override;
107 void focusInEvent( QFocusEvent *event )
override;
108 void wheelEvent( QWheelEvent *event )
override;
109 void showEvent( QShowEvent *event )
override;
112 void changed(
const QDateTime &dateTime );
115 bool mAllowNull =
true;
116 bool mIsNull =
false;
117 bool mIsEmpty =
false;
118 bool mCurrentPressEvent =
false;
120 QString mOriginalStyleSheet = QString();
121 QAction *mClearAction;
127 void displayNull(
bool updateCalendar =
false );
132 void displayCurrentDate();
135 void resetBeforeChange(
int delta );
148 void setMinimumEditDateTime()
150 setMinimumDateTime( QDateTime::fromString( QStringLiteral(
"0100-01-01" ), Qt::ISODate ) );
153 friend class TestQgsDateTimeEdit;
156 #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...