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;
209 void updateValue(
const QVariant &value,
bool forceComboInsertion );
215 int columnCount()
const;
218 QMetaType::Type fkType()
const;
223 QComboBox *mComboBox =
nullptr;
224 QgsFilteredTableWidget *mTableWidget =
nullptr;
225 QLineEdit *mLineEdit =
nullptr;
226 int mSubWidgetSignalBlocking = 0;
230 bool mEnabled =
true;
234 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.