mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-12 00:02:25 -04:00
134 lines
3.5 KiB
Plaintext
134 lines
3.5 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/gui/editorwidgets/qgsdatetimeedit.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
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 valueChanged of this subclass
|
|
rather than QDateTimeEdit.dateTimeChanged. 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
|
|
#include "qgsdatetimeedit.h"
|
|
%End
|
|
public:
|
|
|
|
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.
|
|
If allow null is disabled, you should check allowNull before getting values from the widget.
|
|
%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
|
|
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.
|
|
%End
|
|
|
|
QDateTime dateTime() const;
|
|
%Docstring
|
|
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.
|
|
%End
|
|
|
|
QTime time() const;
|
|
%Docstring
|
|
Returns the time which can be a null time.
|
|
|
|
.. versionadded:: 3.10
|
|
%End
|
|
|
|
QDate date() const;
|
|
%Docstring
|
|
Returns the date which can be a null date.
|
|
|
|
.. versionadded:: 3.10
|
|
%End
|
|
|
|
virtual void clear();
|
|
|
|
%Docstring
|
|
Set the current date as NULL.
|
|
|
|
.. note::
|
|
|
|
If the widget is not configured to accept NULL dates, this will have no effect.
|
|
%End
|
|
|
|
void setEmpty();
|
|
%Docstring
|
|
Resets the widget to show no value (ie, an "unknown" state).
|
|
|
|
.. versionadded:: 2.16
|
|
%End
|
|
|
|
signals:
|
|
|
|
void valueChanged( const QDateTime &date );
|
|
%Docstring
|
|
Signal emitted whenever the value changes.
|
|
|
|
:param date: The new date/time value.
|
|
%End
|
|
|
|
protected:
|
|
virtual void mousePressEvent( QMouseEvent *event );
|
|
|
|
virtual void focusOutEvent( QFocusEvent *event );
|
|
|
|
virtual void focusInEvent( QFocusEvent *event );
|
|
|
|
virtual void wheelEvent( QWheelEvent *event );
|
|
|
|
virtual void showEvent( QShowEvent *event );
|
|
|
|
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/gui/editorwidgets/qgsdatetimeedit.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|