16#ifndef QGSVALUERELATIONWIDGETWRAPPER_H
17#define QGSVALUERELATIONWIDGETWRAPPER_H
19#include <QTableWidget>
40class QgsFilteredTableWidget :
public QWidget
51 QgsFilteredTableWidget( QWidget *parent,
bool showSearch );
53 bool eventFilter( QObject *watched, QEvent *event )
override;
58 QStringList selection()
const;
63 void checkItems(
const QStringList &checked );
73 void setIndeterminateState();
78 void setEnabledTable(
const bool enabled );
83 void setColumnCount(
const int count );
88 int rowCount()
const {
return mTableWidget->rowCount(); }
95 void itemChanged( QTableWidgetItem *item );
98 void filterStringChanged(
const QString &filterString );
99 void itemChanged_p( QTableWidgetItem *item );
100 QTableWidgetItem *item(
const int row,
const int column )
const {
return mTableWidget->item( row, column ); }
102 int mColumnCount = 1;
104 QTableWidget *mTableWidget =
nullptr;
105 bool mEnabledTable =
true;
106 QVector<QPair<QgsValueRelationFieldFormatter::ValueRelationItem, Qt::CheckState>> mCache;
107 friend class TestQgsValueRelationWidgetWrapper;
151 QVariant
value()
const override;
164 bool valid()
const override;
178 void widgetValueChanged(
const QString &attribute,
const QVariant &newValue,
bool attributeChanged );
191 void emitValueChangedInternal(
const QString &value );
194 void updateValues(
const QVariant &value,
const QVariantList & = QVariantList() )
override;
201 int columnCount()
const;
204 QVariant::Type fkType()
const;
210 QgsFilteredTableWidget *mTableWidget =
nullptr;
211 QLineEdit *mLineEdit =
nullptr;
216 bool mEnabled =
true;
220 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.