QGIS API Documentation  2.12.0-Lyon
qgsvaluerelationsearchwidgetwrapper.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsvaluerelationwidgetwrapper.h
3  --------------------------------------
4  Date : 19.6.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 QGSVALUERELATIONSEARCHWIDGETWRAPPER_H
17 #define QGSVALUERELATIONSEARCHWIDGETWRAPPER_H
18 
21 
22 #include <QComboBox>
23 #include <QListWidget>
24 #include <QLineEdit>
25 
27 
49 {
50  Q_OBJECT
51 
52  public:
55 
56  public:
57  explicit QgsValueRelationSearchWidgetWrapper( QgsVectorLayer* vl, int fieldIdx, QWidget* parent = 0 );
58  bool applyDirectly() override;
59  QVariant value();
60 
61 
62  protected:
63  QWidget* createWidget( QWidget* parent ) override;
64  void initWidget( QWidget* editor ) override;
65 
66  public slots:
67  void valueChanged();
68 
69  private:
70  QComboBox* mComboBox;
71  QListWidget* mListWidget;
72  QLineEdit* mLineEdit;
73 
74  ValueRelationCache mCache;
75  QgsVectorLayer* mLayer;
76 
78 };
79 
80 #endif // QGSVALUERELATIONSEARCHWIDGETWRAPPER_H
QWidget * createWidget(QWidget *parent) override
This method should create a new widget with the provided parent.
void initWidget(QWidget *editor) override
This method should initialize the editor widget with runtime data.
bool applyDirectly() override
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.