Add missing docs

This commit is contained in:
Nyall Dawson 2016-05-23 13:40:01 +10:00
parent 02c0174d41
commit e00ea61be6
4 changed files with 70 additions and 12 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;