15#ifndef QGSFIELDDOMAINWIDGET_H
16#define QGSFIELDDOMAINWIDGET_H
20#include "ui_qgsfielddomainwidgetbase.h"
21#include "ui_qgsrangedomainwidgetbase.h"
22#include "ui_qgsglobdomainwidgetbase.h"
23#include "ui_qgscodedvaluedomainwidgetbase.h"
26#include <QAbstractTableModel>
29class QDialogButtonBox;
106 QgsFieldDomain *createFieldDomain(
const QString &name,
const QString &description, QMetaType::Type fieldType )
const override SIP_FACTORY;
107 bool isValid()
const override;
132 QgsFieldDomain *createFieldDomain(
const QString &name,
const QString &description, QMetaType::Type fieldType )
const override SIP_FACTORY;
133 bool isValid()
const override;
154 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
155 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
156 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
157 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole )
override;
158 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
159 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const override;
160 bool insertRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
161 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
168 void setValues(
const QList< QgsCodedValue > &values );
175 QList< QgsCodedValue >
values()
const {
return mValues; }
179 QList<QgsCodedValue> mValues;
204 QgsFieldDomain *createFieldDomain(
const QString &name,
const QString &description, QMetaType::Type fieldType )
const override SIP_FACTORY;
205 bool isValid()
const override;
252 bool isValid()
const;
305 void accept()
override;
309 void validityChanged(
bool isValid );
313 QDialogButtonBox *mButtonBox =
nullptr;
FieldDomainType
Types of field domain.
Abstract base class for widgets which configure the extended properties of a QgsFieldDomain subclass.
virtual ~QgsAbstractFieldDomainWidget()
void changed()
Emitted whenever the field domain configuration in the widget changes.
virtual bool isValid() const =0
Returns true if the widget currently represents a valid field domain configuration.
virtual QgsFieldDomain * createFieldDomain(const QString &name, const QString &description, QMetaType::Type fieldType) const =0
Creates a new field domain using the properties from the widget.
virtual void setFieldDomain(const QgsFieldDomain *domain)=0
Sets the current field domain to show properties for in the widget.
A widget for configuration of the extended properties of a QgsCodedFieldDomain.
A table model for representing the values in a QgsCodedValue list.
QList< QgsCodedValue > values() const
Returns the values from the model.
A dialog for configuration of the properties of a QgsFieldDomain.
A widget for configuration of the properties of a QgsFieldDomain.
void validityChanged(bool isValid)
Emitted whenever the validity of the field domain configuration in the widget changes.
Base class for field domains.
A widget for configuration of the extended properties of a QgsGlobFieldDomain.
A widget for configuration of the extended properties of a QgsRangeFieldDomain.