23 #include <QMessageBox> 24 #include <QPushButton> 34 for (
const QgsField &field : fields )
35 comboBox->addItem( field.name() );
37 if ( fields.isEmpty() )
39 buttonBox->button( QDialogButtonBox::Ok )->setDisabled(
true );
Class allowing to manage the auxiliary storage for a vector layer.
Container of fields for a vector layer.
static QgsGui * instance()
Returns a pointer to the singleton instance.
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.
int lookupField(const QString &fieldName) const
Looks up field's index from the field name.
QgsField field(int fieldIdx) const
Gets field at particular index (must be in range 0..N-1)
const QgsAuxiliaryStorage * auxiliaryStorage() const
Returns the current const auxiliary storage.
QgsNewAuxiliaryLayerDialog(QgsVectorLayer *layer, QWidget *parent=nullptr)
Constructor.
QgsAuxiliaryLayer * createAuxiliaryLayer(const QgsField &field, QgsVectorLayer *layer) const
Creates an auxiliary layer for a vector layer.
static QgsProject * instance()
Returns the QgsProject singleton instance.
static void enableAutoGeometryRestore(QWidget *widget, const QString &key=QString())
Register the widget to allow its position to be automatically saved and restored when open and closed...
Represents a vector layer which manages a vector based data sets.