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;
103 QgsFieldDomain *createFieldDomain(
const QString &name,
const QString &description, QMetaType::Type fieldType )
const override SIP_FACTORY;
104 bool isValid()
const override;
127 QgsFieldDomain *createFieldDomain(
const QString &name,
const QString &description, QMetaType::Type fieldType )
const override SIP_FACTORY;
128 bool isValid()
const override;
148 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
149 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
150 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole )
const override;
151 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole )
override;
152 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
153 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const override;
154 bool insertRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
155 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex() )
override;
162 void setValues(
const QList<QgsCodedValue> &values );
169 QList<QgsCodedValue>
values()
const {
return mValues; }
172 QList<QgsCodedValue> mValues;
196 QgsFieldDomain *createFieldDomain(
const QString &name,
const QString &description, QMetaType::Type fieldType )
const override SIP_FACTORY;
197 bool isValid()
const override;
241 bool isValid()
const;
291 void accept()
override;
295 void validityChanged(
bool isValid );
299 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.