16#ifndef QGSVALUERELATIONWIDGETWRAPPER_H
17#define QGSVALUERELATIONWIDGETWRAPPER_H
19#include <QTableWidget>
40class QgsFilteredTableWidget :
public QWidget
52 QgsFilteredTableWidget( QWidget *parent,
bool showSearch,
bool displayGroupName );
54 bool eventFilter( QObject *watched, QEvent *event )
override;
59 QStringList selection()
const;
64 void checkItems(
const QStringList &checked );
74 void setIndeterminateState();
79 void setEnabledTable(
const bool enabled );
84 void setColumnCount(
const int count );
89 int rowCount()
const {
return mTableWidget->rowCount(); }
96 void itemChanged( QTableWidgetItem *item );
99 void filterStringChanged(
const QString &filterString );
100 void itemChanged_p( QTableWidgetItem *item );
101 QTableWidgetItem *item(
const int row,
const int column )
const {
return mTableWidget->item( row, column ); }
103 int mColumnCount = 1;
105 QTableWidget *mTableWidget =
nullptr;
106 bool mEnabledTable =
true;
107 QVector<QPair<QgsValueRelationFieldFormatter::ValueRelationItem, Qt::CheckState>> mCache;
108 bool mDisplayGroupName =
false;
110 friend class TestQgsValueRelationWidgetWrapper;
154 QVariant
value()
const override;
167 bool valid()
const override;
181 void widgetValueChanged(
const QString &attribute,
const QVariant &newValue,
bool attributeChanged );
194 void emitValueChangedInternal(
const QString &value );
197 void updateValues(
const QVariant &value,
const QVariantList & = QVariantList() )
override;
204 int columnCount()
const;
207 QMetaType::Type fkType()
const;
212 QComboBox *mComboBox =
nullptr;
213 QgsFilteredTableWidget *mTableWidget =
nullptr;
214 QLineEdit *mLineEdit =
nullptr;
215 int mSubWidgetSignalBlocking = 0;
220 bool mEnabled =
true;
224 friend class TestQgsValueRelationWidgetWrapper;
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
QLineEdit subclass with built in support for clearing the widget's value and handling custom null val...
Represents a vector layer which manages a vector based data sets.