Skip to content
Permalink
Browse files

changed setMinimumEditDateTime to private.

  • Loading branch information
mj10777 committed Jul 13, 2017
1 parent b7ff59c commit 6434d8dce070eb38c9a09435082a5850ebdbe321
Showing with 15 additions and 26 deletions.
  1. +0 −12 python/gui/editorwidgets/qgsdatetimeedit.sip
  2. +15 −14 src/gui/editorwidgets/qgsdatetimeedit.h
@@ -30,18 +30,6 @@ Determines if the widget allows setting null date/time.
:rtype: bool
%End

void setMinimumEditDateTime();
%Docstring
Set the lowest Date that can be displayed with the Qt.ISODate format
- uses QDateTimeEdit.setMinimumDateTime (since Qt 4.4)
\note
- QDate and QDateTime does not support minus years for the Qt.ISODate format
-> returns empty (toString) or invalid (fromString) values
- QDateTimeEdit.setMinimumDateTime does not support dates < '0100-01-01'
-> it is not for us to wonder why [defined in qdatetimeparser_p.h]
.. versionadded:: 3.0
%End

void setDateTime( const QDateTime &dateTime );
%Docstring
setDateTime set the date time in the widget and handles null date times.
@@ -38,20 +38,6 @@ class GUI_EXPORT QgsDateTimeEdit : public QDateTimeEdit
void setAllowNull( bool allowNull );
bool allowNull() const {return mAllowNull;}

/** Set the lowest Date that can be displayed with the Qt::ISODate format
* - uses QDateTimeEdit::setMinimumDateTime (since Qt 4.4)
* \note
* - QDate and QDateTime does not support minus years for the Qt::ISODate format
* -> returns empty (toString) or invalid (fromString) values
* - QDateTimeEdit::setMinimumDateTime does not support dates < '0100-01-01'
* -> it is not for us to wonder why [defined in qdatetimeparser_p.h]
* \since QGIS 3.0
*/
void setMinimumEditDateTime()
{
setMinimumDateTime( QDateTime::fromString( "0100-01-01", Qt::ISODate ) );
}

/**
* \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.
@@ -96,6 +82,21 @@ class GUI_EXPORT QgsDateTimeEdit : public QDateTimeEdit
QLineEdit *mNullLabel = nullptr;
QToolButton *mClearButton = nullptr;

/** Set the lowest Date that can be displayed with the Qt::ISODate format
* - uses QDateTimeEdit::setMinimumDateTime (since Qt 4.4)
* \note
* - QDate and QDateTime does not support minus years for the Qt::ISODate format
* -> returns empty (toString) or invalid (fromString) values
* - QDateTimeEdit::setMinimumDateTime does not support dates < '0100-01-01'
* -> it is not for us to wonder why [defined in qdatetimeparser_p.h]
* \since QGIS 3.0
* \note not available in Python bindings
*/
void setMinimumEditDateTime()
{
setMinimumDateTime( QDateTime::fromString( "0100-01-01", Qt::ISODate ) );
}

};

#endif // QGSDATETIMEEDIT_H

0 comments on commit 6434d8d

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