-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
|
||
class QgsDateTimeEdit : QDateTimeEdit | ||
{ | ||
|
||
%TypeHeaderCode | ||
#include "qgsdatetimeedit.h" | ||
%End | ||
|
||
|
||
public: | ||
explicit QgsDateTimeEdit( QWidget *parent /TransferThis/ = 0 ); | ||
|
||
//! determines if the widget allows setting null date/time. | ||
void setAllowNull( bool allowNull ); | ||
bool allowNull() const; | ||
|
||
/** | ||
* @brief setDateTime 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. | ||
*/ | ||
void setDateTime( const QDateTime &dateTime ); | ||
|
||
/** | ||
* @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. | ||
*/ | ||
QDateTime dateTime() const; | ||
|
||
//! Set the current date as NULL | ||
//! @note if the widget is not configured to accept NULL dates, this will have no effect | ||
virtual void clear(); | ||
|
||
|
||
protected: | ||
virtual void resizeEvent( QResizeEvent* event ); | ||
|
||
void mousePressEvent( QMouseEvent*event ); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters