QGIS API Documentation  2.14.0-Essen
qgsvaluemapsearchwidgetwrapper.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsvaluemapsearchwidgetwrapper.h
3  --------------------------------------
4  Date : 21.5.2015
5  Copyright : (C) 2015 Karolina Alexiou
6  Email : carolinegr at gmail dot com
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 #ifndef QGSVALUEMAPSEARCHWIDGETWRAPPER_H
17 #define QGSVALUEMAPSEARCHWIDGETWRAPPER_H
18 
19 #include "qgssearchwidgetwrapper.h"
20 #include <QComboBox>
21 
30 {
31  Q_OBJECT
32  public:
33  explicit QgsValueMapSearchWidgetWrapper( QgsVectorLayer* vl, int fieldIdx, QWidget* parent = nullptr );
34  bool applyDirectly() override;
35  QString expression() override;
36  bool valid() const override;
37 
38  protected:
39  QWidget* createWidget( QWidget* parent ) override;
40  void initWidget( QWidget* editor ) override;
41 
42  protected slots:
43  void setExpression( QString exp ) override;
44 
45  private slots:
46  void comboBoxIndexChanged( int idx );
47 
48  private:
49  QComboBox * mComboBox;
50 };
51 
52 #endif // QGSVALUEMAPSEARCHWIDGETWRAPPER_H
Manages an editor widget Widget and wrapper share the same parent.
virtual void setExpression(QString value)=0
virtual QString expression()=0
Will be used to access the widget&#39;s value.
Wraps a value map search widget.
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 void initWidget(QWidget *editor)
This method should initialize the editor widget with runtime data.
virtual bool applyDirectly()=0
If this is true, then this search widget should take effect directly when its expression changes...
Represents a vector layer which manages a vector based data sets.