mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-09 00:35:20 -05:00
Merge pull request #31855 from Gustry/datetime
update docstring about QgsDateTimeEdit with NULL values
This commit is contained in:
commit
3ff8ca5736
@ -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();
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user