QGIS API Documentation  3.0.2-Girona (307d082)
qgsrelationaggregatesearchwidgetwrapper.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsrelationaggregatesearchwidget.h
3  -----------------------------
4  Date : Nov 2017
5  Copyright : (C) 2017 Matthias Kuhn
6  Email : [email protected]
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 
17 #ifndef QGSRELATIONAGGREGATESEARCHWIDGETWRAPPER_H
18 #define QGSRELATIONAGGREGATESEARCHWIDGETWRAPPER_H
19 
20 #include "qgis_gui.h"
21 #include "qgssearchwidgetwrapper.h"
22 #include "qgsattributeform.h"
23 
25 
36 {
37  Q_OBJECT
38 
39  public:
40 
44  explicit QgsRelationAggregateSearchWidgetWrapper( QgsVectorLayer *layer, QgsRelationWidgetWrapper *wrapper, QWidget *parent SIP_TRANSFERTHIS = nullptr );
45 
46  QString expression() const override;
47 
48  bool valid() const override;
49  QWidget *createWidget( QWidget *parent ) override;
50  bool applyDirectly() override;
51  void setExpression( const QString &value ) override;
52 
53  private:
54  QgsRelationWidgetWrapper *mWrapper = nullptr;
55  QgsAttributeForm *mAttributeForm = nullptr;
56 };
57 
58 #endif // QGSRELATIONAGGREGATESEARCHWIDGETWRAPPER_H
Shows a search widget on a filter form.
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:46
Search widget for the children of a relation.
virtual bool valid() const =0
Return true if the widget has been properly initialized.
virtual QWidget * createWidget(QWidget *parent)=0
This method should create a new widget with the provided parent.
virtual bool applyDirectly()=0
If this is true, then this search widget should take effect directly when its expression changes...
virtual QString expression() const =0
Will be used to access the widget's value.
virtual void setExpression(const QString &expression)=0
Set the expression which is currently used as filter for this widget.
Represents a vector layer which manages a vector based data sets.