File tree Expand file tree Collapse file tree 3 files changed +40
-1
lines changed Expand file tree Collapse file tree 3 files changed +40
-1
lines changed Original file line number Diff line number Diff line change 39
39
%Include qgscolorschemelist.sip
40
40
%Include qgscomposerview.sip
41
41
%Include qgscredentialdialog.sip
42
+ %Include qgsdatetimeedit.sip
42
43
%Include qgsdetaileditemdata.sip
43
44
%Include qgsdetaileditemdelegate.sip
44
45
%Include qgsdialog.sip
Original file line number Diff line number Diff line change
1
+
2
+ class QgsDateTimeEdit : QDateTimeEdit
3
+ {
4
+
5
+ %TypeHeaderCode
6
+ #include "qgsdatetimeedit.h"
7
+ %End
8
+
9
+
10
+ public:
11
+ explicit QgsDateTimeEdit( QWidget *parent /TransferThis/ = 0 );
12
+
13
+ //! determines if the widget allows setting null date/time.
14
+ void setAllowNull( bool allowNull );
15
+ bool allowNull() const;
16
+
17
+ /**
18
+ * @brief setDateTime set the date time in the widget and handles null date times.
19
+ * @note since QDateTimeEdit::setDateTime() is not virtual, setDateTime must be called for QgsDateTimeEdit.
20
+ */
21
+ void setDateTime( const QDateTime &dateTime );
22
+
23
+ /**
24
+ * @brief dateTime returns the date time which can eventually be a null date/time
25
+ * @note since QDateTimeEdit::dateTime() is not virtual, dateTime must be called for QgsDateTimeEdit.
26
+ */
27
+ QDateTime dateTime() const;
28
+
29
+ //! Set the current date as NULL
30
+ //! @note if the widget is not configured to accept NULL dates, this will have no effect
31
+ virtual void clear();
32
+
33
+
34
+ protected:
35
+ virtual void resizeEvent( QResizeEvent* event );
36
+
37
+ void mousePressEvent( QMouseEvent*event );
38
+ };
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class GUI_EXPORT QgsDateTimeEdit : public QDateTimeEdit
34
34
35
35
// ! determines if the widget allows setting null date/time.
36
36
void setAllowNull ( bool allowNull );
37
- bool allowNull () {return mAllowNull ;}
37
+ bool allowNull () const {return mAllowNull ;}
38
38
39
39
/* *
40
40
* @brief setDateTime set the date time in the widget and handles null date times.
You can’t perform that action at this time.
0 commit comments