22 #include <QMessageBox> 23 #include <QPushButton> 32 for (
const QgsField &field : fields )
33 comboBox->addItem( field.name() );
35 if ( fields.isEmpty() )
37 buttonBox->button( QDialogButtonBox::Ok )->setDisabled(
true );
int lookupField(const QString &fieldName) const
Looks up field's index from the field name.
const QgsAuxiliaryStorage * auxiliaryStorage() const
Returns the current const auxiliary storage.
Class allowing to manage the auxiliary storage for a vector layer.
Container of fields for a vector layer.
void setAuxiliaryLayer(QgsAuxiliaryLayer *layer=nullptr)
Sets the current auxiliary layer.
QgsFields fields() const FINAL
Returns the list of fields of this layer.
Encapsulate a field in an attribute table or data source.
QgsNewAuxiliaryLayerDialog(QgsVectorLayer *layer, QWidget *parent=nullptr)
Constructor.
static QgsProject * instance()
Returns the QgsProject singleton instance.
Represents a vector layer which manages a vector based data sets.
QgsField field(int fieldIdx) const
Gets field at particular index (must be in range 0..N-1)
QgsAuxiliaryLayer * createAuxiliaryLayer(const QgsField &field, QgsVectorLayer *layer) const
Creates an auxiliary layer for a vector layer.