File: qgsdatetimeedit.sip.in

package info (click to toggle)
qgis 3.40.10%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,183,672 kB
  • sloc: cpp: 1,595,771; python: 372,544; xml: 23,474; sh: 3,761; perl: 3,664; ansic: 2,257; sql: 2,137; yacc: 1,068; lex: 577; javascript: 540; lisp: 411; makefile: 161
file content (294 lines) | stat: -rw-r--r-- 7,593 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/editorwidgets/qgsdatetimeedit.h                              *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/



class QgsDateTimeEdit : QDateTimeEdit
{
%Docstring(signature="appended")
The :py:class:`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 :py:func:`~dateTime` afterwards there is no guarantee that
   NULL values will be correctly handled).

.. seealso:: :py:class:`QgsDateEdit`

.. seealso:: :py:class:`QgsTimeEdit`
%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 :py:func:`~QgsDateTimeEdit.date` or :py:func:`~QgsDateTimeEdit.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).
%End

    QString nullRepresentation() const;
%Docstring
Returns the widget's NULL representation, which defaults to
:py:func:`QgsApplication.nullRepresentation()`.

.. seealso:: :py:func:`setNullRepresentation`

.. versionadded:: 3.14
%End

    void setNullRepresentation( const QString &null );
%Docstring
Sets the widget's ``null`` representation, which defaults to
:py:func:`QgsApplication.nullRepresentation()`.

.. seealso:: :py:func:`nullRepresentation`

.. versionadded:: 3.14
%End

    virtual bool event( QEvent *event );

%Docstring
Reimplemented to enable/disable the clear action depending on read-only
status

.. versionadded:: 3.34
%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 );





    void displayNull( bool updateCalendar = false );
%Docstring
write the null value representation to the line edit without changing
the value

:param updateCalendar: Flag if calendar is open and minimum date needs
                       to be set
%End

    virtual void emitValueChanged( const QVariant &value );
%Docstring
Emits the widget's correct value changed signal.
%End

    bool isNull() const;
%Docstring
Returns ``True`` if the widget is currently set to a null value
%End

  protected slots:


};


class QgsTimeEdit : QgsDateTimeEdit
{
%Docstring(signature="appended")
The :py:class:`QgsTimeEdit` class is a QTimeEdit widget with the
capability of setting/reading null date/times.

.. warning::

   You should use the signal timeValueChanged of this subclass
   rather than QDateTimeEdit.timeChanged. (If you consequently connect parent's
   timeChanged signal and call :py:func:`~time` afterwards there is no guarantee that
   NULL values will be correctly handled).

.. seealso:: :py:class:`QgsDateTimeEdit`

.. seealso:: :py:class:`QgsDateEdit`

.. versionadded:: 3.14
%End

%TypeHeaderCode
#include "qgsdatetimeedit.h"
%End
  public:
    explicit QgsTimeEdit( QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsTimeEdit. The current 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 setTime( const QTime &time );
%Docstring
Sets the ``time`` for the widget and handles null times.

.. note::

   Since QDateTimeEdit.setTime() is not virtual, setTime must be called for QgsTimeEdit.
%End

  signals:

    void timeValueChanged( const QTime &time );
%Docstring
Signal emitted whenever the time changes.
%End

  protected:
    virtual void emitValueChanged( const QVariant &value );

};

class QgsDateEdit : QgsDateTimeEdit
{
%Docstring(signature="appended")
The :py:class:`QgsDateEdit` class is a QDateEdit widget with the
capability of setting/reading null dates.

.. warning::

   You should use the signal dateValueChanged of this subclass
   rather than QDateTimeEdit.dateChanged. (If you consequently connect parent's
   dateChanged signal and call :py:func:`~date` afterwards there is no guarantee that
   NULL values will be correctly handled).

.. seealso:: :py:class:`QgsDateTimeEdit`

.. seealso:: :py:class:`QgsTimeEdit`

.. versionadded:: 3.14
%End

%TypeHeaderCode
#include "qgsdatetimeedit.h"
%End
  public:
    explicit QgsDateEdit( QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsDateEdit. The current 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 setDate( const QDate &date );
%Docstring
Sets the ``date`` for the widget and handles null dates.

.. note::

   Since QDateTimeEdit.setDate() is not virtual, setDate must be called for QgsDateEdit.
%End

  signals:

    void dateValueChanged( const QDate &date );
%Docstring
Signal emitted whenever the date changes.
%End

  protected:
    virtual void emitValueChanged( const QVariant &value );

};

/************************************************************************
 * This file has been generated automatically from                      *
 *                                                                      *
 * src/gui/editorwidgets/qgsdatetimeedit.h                              *
 *                                                                      *
 * Do not edit manually ! Edit header and run scripts/sipify.py again   *
 ************************************************************************/