Skip to content

Commit

Permalink
doxymentattion
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jan 5, 2018
1 parent d8cc285 commit 2528639
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
13 changes: 13 additions & 0 deletions python/gui/editorwidgets/qgsdatetimeedit.sip
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ class QgsDateTimeEdit : QDateTimeEdit
{
%Docstring
The QgsDateTimeEdit class is a QDateTimeEdit with the capability of setting/reading null date/times.

.. warning::

You should use the signal dateTimeChanged of this subclass QgsDateTimeEdit
rather than parent's one (QDateTimeEdit). If you consequently connect parent's
dateTimeChanged signal and call dateTime() afterwards there is no warranty to
have a proper NULL value handling.
%End

%TypeHeaderCode
Expand Down Expand Up @@ -66,7 +73,13 @@ Resets the widget to show no value (ie, an "unknown" state).
%End

signals:

void dateTimeChanged( const QDateTime &date );
%Docstring
reimplements QDateTimeEdit.dateTimeChanged signal
to properly handles NULL values.
@param date the new date/time value.
%End

protected:
virtual void mousePressEvent( QMouseEvent *event );
Expand Down
11 changes: 11 additions & 0 deletions src/gui/editorwidgets/qgsdatetimeedit.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
/**
* \ingroup gui
* \brief The QgsDateTimeEdit class is a QDateTimeEdit with the capability of setting/reading null date/times.
*
* \warning You should use the signal dateTimeChanged of this subclass QgsDateTimeEdit
* rather than parent's one (QDateTimeEdit). If you consequently connect parent's
* dateTimeChanged signal and call dateTime() afterwards there is no warranty to
* have a proper NULL value handling.
*/
class GUI_EXPORT QgsDateTimeEdit : public QDateTimeEdit
{
Expand Down Expand Up @@ -63,6 +68,12 @@ class GUI_EXPORT QgsDateTimeEdit : public QDateTimeEdit
void setEmpty();

signals:

/**
* reimplements QDateTimeEdit::dateTimeChanged signal
* to properly handles NULL values.
* @param date the new date/time value.
*/
void dateTimeChanged( const QDateTime &date );

protected:
Expand Down

0 comments on commit 2528639

Please sign in to comment.