Skip to content

Commit

Permalink
update docstrings in qgsdatetimeedit.h
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry authored and nyalldawson committed Oct 3, 2019
1 parent d61fab7 commit 3159d6f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
22 changes: 11 additions & 11 deletions python/gui/auto_generated/editorwidgets/qgsdatetimeedit.sip.in
Expand Up @@ -28,7 +28,7 @@ The QgsDateTimeEdit class is a QDateTimeEdit with the capability of setting/read

explicit QgsDateTimeEdit( QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsDateTimeEdit
Constructor for QgsDateTimeEdit.
The current date and time is used by default.
The widget is allowing null by default.
If allow null is disabled, you should check allowNull before getting values from the widget.
Expand All @@ -50,48 +50,48 @@ If the widget allows setting null date/time.

void setDateTime( const QDateTime &dateTime );
%Docstring
setDateTime set the date time in the widget and handles null date times.
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.
Since QDateTimeEdit.setDateTime() is not virtual, setDateTime must be called for QgsDateTimeEdit.
%End

QDateTime dateTime() const;
%Docstring
dateTime returns the date time which can be a null date/time
Returns the date time which can be a null date/time.

.. note::

Before QGIS 3.10, 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
Since QDateTimeEdit.dateTime() is not virtual, dateTime must be called for QgsDateTimeEdit.
%End

QTime time() const;
%Docstring
time returns the time which can be a null time.
Returns the time which can be a null time.

.. versionadded:: 3.10
%End

QDate date() const;
%Docstring
date returns the date which can be a null date.
Returns the date which can be a null date.

.. versionadded:: 3.10
%End

virtual void clear();

%Docstring
Set the current date as NULL
Set the current date as NULL.

.. note::

if the widget is not configured to accept NULL dates, this will have no effect
If the widget is not configured to accept NULL dates, this will have no effect.
%End

void setEmpty();
Expand All @@ -105,9 +105,9 @@ Resets the widget to show no value (ie, an "unknown" state).

void valueChanged( const QDateTime &date );
%Docstring
signal emitted whenever the value changes.
Signal emitted whenever the value changes.

:param date: the new date/time value.
:param date: The new date/time value.
%End

protected:
Expand Down
22 changes: 11 additions & 11 deletions src/gui/editorwidgets/qgsdatetimeedit.h
Expand Up @@ -37,7 +37,7 @@ 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.
* If allow null is disabled, you should check allowNull before getting values from the widget.
Expand All @@ -57,33 +57,33 @@ class GUI_EXPORT QgsDateTimeEdit : public QDateTimeEdit
bool allowNull() const {return mAllowNull;}

/**
* \brief 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.
* \brief 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.
*/
void setDateTime( const QDateTime &dateTime );

/**
* \brief dateTime returns the date time which can be a null date/time
* \brief Returns the date time which can be a null date/time.
* \note Before QGIS 3.10, 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
* \note Since QDateTimeEdit::dateTime() is not virtual, dateTime must be called for QgsDateTimeEdit.
*/
QDateTime dateTime() const;

/**
* \brief time returns the time which can be a null time.
* \brief Returns the time which can be a null time.
* \since QGIS 3.10
*/
QTime time() const;

/**
* \brief date returns the date which can be a null date.
* \brief Returns the date which can be a null date.
* \since QGIS 3.10
*/
QDate date() const;

/**
* Set the current date as NULL
* \note if the widget is not configured to accept NULL dates, this will have no effect
* Set the current date as NULL.
* \note If the widget is not configured to accept NULL dates, this will have no effect.
*/
void clear() override;

Expand All @@ -96,8 +96,8 @@ class GUI_EXPORT QgsDateTimeEdit : public QDateTimeEdit
signals:

/**
* signal emitted whenever the value changes.
* \param date the new date/time value.
* Signal emitted whenever the value changes.
* \param date The new date/time value.
*/
void valueChanged( const QDateTime &date );

Expand Down

0 comments on commit 3159d6f

Please sign in to comment.