diff --git a/python/gui/auto_generated/editorwidgets/qgsdatetimeedit.sip.in b/python/gui/auto_generated/editorwidgets/qgsdatetimeedit.sip.in index 77adaabe726..ef66832faf2 100644 --- a/python/gui/auto_generated/editorwidgets/qgsdatetimeedit.sip.in +++ b/python/gui/auto_generated/editorwidgets/qgsdatetimeedit.sip.in @@ -29,13 +29,23 @@ The QgsDateTimeEdit class is a QDateTimeEdit with the capability of setting/read explicit QgsDateTimeEdit( QWidget *parent /TransferThis/ = 0 ); %Docstring Constructor for QgsDateTimeEdit +The current date and time is used by default. +The widget is allowing null by default. %End void setAllowNull( bool allowNull ); %Docstring Determines if the widget allows setting null date/time. + +.. seealso:: :py:func:`allowNull` %End + bool allowNull() const; +%Docstring +If the widget allows setting null date/time. + +.. seealso:: :py:func:`setAllowNull` +%End void setDateTime( const QDateTime &dateTime ); %Docstring @@ -52,7 +62,11 @@ 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. + You mustn't call date() or time() because they can't return a NULL value. + +.. note:: + + since QDateTimeEdit.dateTime() is not virtual, dateTime must be called for QgsDateTimeEdit %End virtual void clear(); diff --git a/src/gui/editorwidgets/qgsdatetimeedit.h b/src/gui/editorwidgets/qgsdatetimeedit.h index cc6e44b33bd..973dafc98d0 100644 --- a/src/gui/editorwidgets/qgsdatetimeedit.h +++ b/src/gui/editorwidgets/qgsdatetimeedit.h @@ -36,11 +36,23 @@ class GUI_EXPORT QgsDateTimeEdit : public QDateTimeEdit public: - //! Constructor for QgsDateTimeEdit + /** + * Constructor for QgsDateTimeEdit + * The current date and time is used by default. + * The widget is allowing null by default. + */ explicit QgsDateTimeEdit( QWidget *parent SIP_TRANSFERTHIS = nullptr ); - //! Determines if the widget allows setting null date/time. + /** + * Determines if the widget allows setting null date/time. + * \see allowNull + */ void setAllowNull( bool allowNull ); + + /** + * If the widget allows setting null date/time. + * \see setAllowNull + */ bool allowNull() const {return mAllowNull;} /** @@ -51,7 +63,8 @@ class GUI_EXPORT QgsDateTimeEdit : public QDateTimeEdit /** * \brief 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. + * \note You mustn't call date() or time() because they can't return a NULL value. + * \note since QDateTimeEdit::dateTime() is not virtual, dateTime must be called for QgsDateTimeEdit */ QDateTime dateTime() const;