From e00ea61be61ac333fe6cf97183d0a8f2543a8ca3 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 23 May 2016 13:40:01 +1000 Subject: [PATCH] Add missing docs --- .../qgscheckboxsearchwidgetwrapper.sip | 20 ++++++++++++++--- .../qgsdatetimesearchwidgetwrapper.sip | 20 ++++++++++++++--- .../qgscheckboxsearchwidgetwrapper.h | 22 ++++++++++++++++--- .../qgsdatetimesearchwidgetwrapper.h | 20 ++++++++++++++--- 4 files changed, 70 insertions(+), 12 deletions(-) diff --git a/python/gui/editorwidgets/qgscheckboxsearchwidgetwrapper.sip b/python/gui/editorwidgets/qgscheckboxsearchwidgetwrapper.sip index 5502a539a29..1ecfc24ec13 100644 --- a/python/gui/editorwidgets/qgscheckboxsearchwidgetwrapper.sip +++ b/python/gui/editorwidgets/qgscheckboxsearchwidgetwrapper.sip @@ -1,6 +1,9 @@ -/** - * Wraps a checkbox search widget. +/** \ingroup gui + * \class QgsCheckboxSearchWidgetWrapper + * Wraps a checkbox edit widget for searching. + * \note Added in version 2.16 */ + class QgsCheckboxSearchWidgetWrapper : QgsSearchWidgetWrapper { %TypeHeaderCode @@ -8,14 +11,25 @@ class QgsCheckboxSearchWidgetWrapper : QgsSearchWidgetWrapper %End public: + /** Constructor for QgsCheckboxSearchWidgetWrapper. + * @param vl associated vector layer + * @param fieldIdx index of associated field + * @param parent parent widget + */ explicit QgsCheckboxSearchWidgetWrapper( QgsVectorLayer* vl, int fieldIdx, QWidget* parent /TransferThis/ = nullptr ); + /** Returns a variant representing the current state of the widget. + * @note this will not be a boolean true or false value, it will instead + * be the values configured to represent checked and unchecked states in + * the editor widget configuration. + */ + QVariant value() const; + // QgsSearchWidgetWrapper interface public: bool applyDirectly(); QString expression(); bool valid() const; - QVariant value() const; FilterFlags supportedFlags() const; FilterFlags defaultFlags() const; virtual QString createExpression( FilterFlags flags ) const; diff --git a/python/gui/editorwidgets/qgsdatetimesearchwidgetwrapper.sip b/python/gui/editorwidgets/qgsdatetimesearchwidgetwrapper.sip index 3cae1cbde84..1ec4e6fa75c 100644 --- a/python/gui/editorwidgets/qgsdatetimesearchwidgetwrapper.sip +++ b/python/gui/editorwidgets/qgsdatetimesearchwidgetwrapper.sip @@ -1,6 +1,9 @@ -/** - * Wraps a date time search widget. +/** \ingroup gui + * \class QgsDateTimeSearchWidgetWrapper + * Wraps a date/time edit widget for searching. + * \note Added in version 2.16 */ + class QgsDateTimeSearchWidgetWrapper : QgsSearchWidgetWrapper { %TypeHeaderCode @@ -9,10 +12,21 @@ class QgsDateTimeSearchWidgetWrapper : QgsSearchWidgetWrapper public: public: + + /** Constructor for QgsDateTimeSearchWidgetWrapper. + * @param vl associated vector layer + * @param fieldIdx index of associated field + * @param parent parent widget + */ explicit QgsDateTimeSearchWidgetWrapper( QgsVectorLayer* vl, int fieldIdx, QWidget* parent /TransferThis/ = nullptr ); + + /** Returns a variant representing the current state of the widget, respecting + * the editor widget's configured field format for date/time values. + */ + bool valid() const; + bool applyDirectly(); QString expression(); - bool valid() const; QVariant value() const; FilterFlags supportedFlags() const; FilterFlags defaultFlags() const; diff --git a/src/gui/editorwidgets/qgscheckboxsearchwidgetwrapper.h b/src/gui/editorwidgets/qgscheckboxsearchwidgetwrapper.h index 59e43e6236a..80cc5ba6136 100644 --- a/src/gui/editorwidgets/qgscheckboxsearchwidgetwrapper.h +++ b/src/gui/editorwidgets/qgscheckboxsearchwidgetwrapper.h @@ -25,19 +25,35 @@ class QgsCheckboxWidgetFactory; -/** - * Wraps a checkbox search widget. +/** \ingroup gui + * \class QgsCheckboxSearchWidgetWrapper + * Wraps a checkbox edit widget for searching. + * \note Added in version 2.16 */ + class GUI_EXPORT QgsCheckboxSearchWidgetWrapper : public QgsSearchWidgetWrapper { Q_OBJECT public: + + /** Constructor for QgsCheckboxSearchWidgetWrapper. + * @param vl associated vector layer + * @param fieldIdx index of associated field + * @param parent parent widget + */ explicit QgsCheckboxSearchWidgetWrapper( QgsVectorLayer* vl, int fieldIdx, QWidget* parent = nullptr ); + + /** Returns a variant representing the current state of the widget. + * @note this will not be a boolean true or false value, it will instead + * be the values configured to represent checked and unchecked states in + * the editor widget configuration. + */ + QVariant value() const; + bool applyDirectly() override; QString expression() override; bool valid() const override; - QVariant value() const; FilterFlags supportedFlags() const override; FilterFlags defaultFlags() const override; virtual QString createExpression( FilterFlags flags ) const override; diff --git a/src/gui/editorwidgets/qgsdatetimesearchwidgetwrapper.h b/src/gui/editorwidgets/qgsdatetimesearchwidgetwrapper.h index fabae997a84..98966183eaf 100644 --- a/src/gui/editorwidgets/qgsdatetimesearchwidgetwrapper.h +++ b/src/gui/editorwidgets/qgsdatetimesearchwidgetwrapper.h @@ -25,19 +25,33 @@ class QgsDateTimeEditFactory; -/** - * Wraps a date time search widget. +/** \ingroup gui + * \class QgsDateTimeSearchWidgetWrapper + * Wraps a date/time edit widget for searching. + * \note Added in version 2.16 */ + class GUI_EXPORT QgsDateTimeSearchWidgetWrapper : public QgsSearchWidgetWrapper { Q_OBJECT public: + + /** Constructor for QgsDateTimeSearchWidgetWrapper. + * @param vl associated vector layer + * @param fieldIdx index of associated field + * @param parent parent widget + */ explicit QgsDateTimeSearchWidgetWrapper( QgsVectorLayer* vl, int fieldIdx, QWidget* parent = nullptr ); + + /** Returns a variant representing the current state of the widget, respecting + * the editor widget's configured field format for date/time values. + */ + QVariant value() const; + bool applyDirectly() override; QString expression() override; bool valid() const override; - QVariant value() const; FilterFlags supportedFlags() const override; FilterFlags defaultFlags() const override; virtual QString createExpression( FilterFlags flags ) const override;