2016-05-23 13:40:01 +10:00
|
|
|
/** \ingroup gui
|
|
|
|
* \class QgsDateTimeSearchWidgetWrapper
|
|
|
|
* Wraps a date/time edit widget for searching.
|
|
|
|
* \note Added in version 2.16
|
2016-05-23 07:28:09 +10:00
|
|
|
*/
|
2016-05-23 13:40:01 +10:00
|
|
|
|
2016-05-23 07:28:09 +10:00
|
|
|
class QgsDateTimeSearchWidgetWrapper : QgsSearchWidgetWrapper
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include <qgsdatetimesearchwidgetwrapper.h>
|
|
|
|
%End
|
|
|
|
public:
|
|
|
|
|
|
|
|
public:
|
2016-05-23 13:40:01 +10:00
|
|
|
|
|
|
|
/** Constructor for QgsDateTimeSearchWidgetWrapper.
|
|
|
|
* @param vl associated vector layer
|
|
|
|
* @param fieldIdx index of associated field
|
|
|
|
* @param parent parent widget
|
|
|
|
*/
|
2017-05-02 07:21:20 +02:00
|
|
|
explicit QgsDateTimeSearchWidgetWrapper( QgsVectorLayer *vl, int fieldIdx, QWidget *parent /TransferThis/ = 0 );
|
2016-05-23 13:40:01 +10:00
|
|
|
|
|
|
|
/** 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;
|
|
|
|
|
2016-05-23 07:28:09 +10:00
|
|
|
bool applyDirectly();
|
|
|
|
QString expression();
|
|
|
|
QVariant value() const;
|
|
|
|
FilterFlags supportedFlags() const;
|
|
|
|
FilterFlags defaultFlags() const;
|
|
|
|
virtual QString createExpression( FilterFlags flags ) const;
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
|
|
virtual void clearWidget();
|
|
|
|
virtual void setEnabled( bool enabled );
|
|
|
|
|
|
|
|
protected:
|
2017-05-01 18:13:15 +02:00
|
|
|
QWidget *createWidget( QWidget *parent );
|
|
|
|
void initWidget( QWidget *editor );
|
2016-05-23 07:28:09 +10:00
|
|
|
|
|
|
|
protected slots:
|
|
|
|
void setExpression( QString exp );
|
|
|
|
};
|