Skip to content
Permalink
Browse files

SIP file for new date time edit

  • Loading branch information
3nids committed Sep 1, 2014
1 parent 834c630 commit 5c5deec4a0e8a3fd85d3742f45ae9b3a78ee5eb0
Showing with 40 additions and 1 deletion.
  1. +1 −0 python/gui/gui.sip
  2. +38 −0 python/gui/qgsdatetimeedit.sip
  3. +1 −1 src/gui/editorwidgets/qgsdatetimeedit.h
@@ -39,6 +39,7 @@
%Include qgscolorschemelist.sip
%Include qgscomposerview.sip
%Include qgscredentialdialog.sip
%Include qgsdatetimeedit.sip
%Include qgsdetaileditemdata.sip
%Include qgsdetaileditemdelegate.sip
%Include qgsdialog.sip
@@ -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 );
};
@@ -34,7 +34,7 @@ class GUI_EXPORT QgsDateTimeEdit : public QDateTimeEdit

//! determines if the widget allows setting null date/time.
void setAllowNull( bool allowNull );
bool allowNull() {return mAllowNull;}
bool allowNull() const {return mAllowNull;}

/**
* @brief setDateTime set the date time in the widget and handles null date times.

0 comments on commit 5c5deec

Please sign in to comment.
You can’t perform that action at this time.