QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
The QgsAggregateMappingModel holds mapping information for defining sets of aggregates of fields from a QgsFields object. More...
#include <qgsprocessingaggregatewidgets.h>
Classes | |
struct | Aggregate |
The Aggregate struct holds information about an aggregate column. More... | |
Public Types | |
enum class | ColumnDataIndex : int { SourceExpression , Aggregate , Delimiter , DestinationName , DestinationType , DestinationLength , DestinationPrecision } |
The ColumnDataIndex enum represents the column index for the view. More... | |
Public Member Functions | |
QgsAggregateMappingModel (const QgsFields &sourceFields=QgsFields(), QObject *parent=nullptr) | |
Constructs a QgsAggregateMappingModel from a set of sourceFields. | |
void | appendField (const QgsField &field, const QString &source=QString(), const QString &aggregate=QString()) |
Appends a new field to the model, with an optional source and aggregate. | |
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
QgsExpressionContextGenerator * | contextGenerator () const |
Returns the context generator with the source fields. | |
QVariant | data (const QModelIndex &index, int role) const override |
Qt::ItemFlags | flags (const QModelIndex &index) const override |
QVariant | headerData (int section, Qt::Orientation orientation, int role) const override |
QList< QgsAggregateMappingModel::Aggregate > | mapping () const |
Returns a list of Aggregate objects representing the current status of the model. | |
bool | moveDown (const QModelIndex &index) |
Moves up the field at index. | |
bool | moveUp (const QModelIndex &index) |
Moves down the field at index. | |
Q_ENUM (ColumnDataIndex) | |
bool | removeField (const QModelIndex &index) |
Removes the field at index from the model, returns true on success. | |
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
void | setBaseExpressionContextGenerator (const QgsExpressionContextGenerator *generator) |
Sets the base expression context generator, which will generate the expression contexts for expression based widgets used by the model. | |
bool | setData (const QModelIndex &index, const QVariant &value, int role) override |
void | setMapping (const QList< QgsAggregateMappingModel::Aggregate > &mapping) |
Sets the mapping to show in the model. | |
void | setSourceFields (const QgsFields &sourceFields) |
Set source fields to sourceFields. | |
QgsFields | sourceFields () const |
Returns a list of source fields. | |
The QgsAggregateMappingModel holds mapping information for defining sets of aggregates of fields from a QgsFields object.
Definition at line 41 of file qgsprocessingaggregatewidgets.h.
|
strong |
The ColumnDataIndex enum represents the column index for the view.
Enumerator | |
---|---|
SourceExpression | Expression. |
Aggregate | Aggregate name. |
Delimiter | Delimiter. |
DestinationName | Destination field name. |
DestinationType | Destination field type string. |
DestinationLength | Destination field length. |
DestinationPrecision | Destination field precision. |
Definition at line 51 of file qgsprocessingaggregatewidgets.h.
QgsAggregateMappingModel::QgsAggregateMappingModel | ( | const QgsFields & | sourceFields = QgsFields() , |
QObject * | parent = nullptr |
||
) |
Constructs a QgsAggregateMappingModel from a set of sourceFields.
A parent object can be also specified.
Definition at line 36 of file qgsprocessingaggregatewidgets.cpp.
void QgsAggregateMappingModel::appendField | ( | const QgsField & | field, |
const QString & | source = QString() , |
||
const QString & | aggregate = QString() |
||
) |
Appends a new field to the model, with an optional source and aggregate.
Definition at line 309 of file qgsprocessingaggregatewidgets.cpp.
|
override |
Definition at line 106 of file qgsprocessingaggregatewidgets.cpp.
QgsExpressionContextGenerator * QgsAggregateMappingModel::contextGenerator | ( | ) | const |
Returns the context generator with the source fields.
Definition at line 283 of file qgsprocessingaggregatewidgets.cpp.
|
override |
Definition at line 113 of file qgsprocessingaggregatewidgets.cpp.
|
override |
Definition at line 163 of file qgsprocessingaggregatewidgets.cpp.
|
override |
Definition at line 44 of file qgsprocessingaggregatewidgets.cpp.
QList< QgsAggregateMappingModel::Aggregate > QgsAggregateMappingModel::mapping | ( | ) | const |
Returns a list of Aggregate objects representing the current status of the model.
Definition at line 293 of file qgsprocessingaggregatewidgets.cpp.
bool QgsAggregateMappingModel::moveDown | ( | const QModelIndex & | index | ) |
Moves up the field at index.
Definition at line 343 of file qgsprocessingaggregatewidgets.cpp.
bool QgsAggregateMappingModel::moveUp | ( | const QModelIndex & | index | ) |
Moves down the field at index.
Definition at line 338 of file qgsprocessingaggregatewidgets.cpp.
QgsAggregateMappingModel::Q_ENUM | ( | ColumnDataIndex | ) |
bool QgsAggregateMappingModel::removeField | ( | const QModelIndex & | index | ) |
Removes the field at index from the model, returns true
on success.
Definition at line 323 of file qgsprocessingaggregatewidgets.cpp.
|
override |
Definition at line 99 of file qgsprocessingaggregatewidgets.cpp.
void QgsAggregateMappingModel::setBaseExpressionContextGenerator | ( | const QgsExpressionContextGenerator * | generator | ) |
Sets the base expression context generator, which will generate the expression contexts for expression based widgets used by the model.
Definition at line 288 of file qgsprocessingaggregatewidgets.cpp.
|
override |
Definition at line 174 of file qgsprocessingaggregatewidgets.cpp.
void QgsAggregateMappingModel::setMapping | ( | const QList< QgsAggregateMappingModel::Aggregate > & | mapping | ) |
Sets the mapping to show in the model.
Definition at line 298 of file qgsprocessingaggregatewidgets.cpp.
void QgsAggregateMappingModel::setSourceFields | ( | const QgsFields & | sourceFields | ) |
Set source fields to sourceFields.
Definition at line 255 of file qgsprocessingaggregatewidgets.cpp.
QgsFields QgsAggregateMappingModel::sourceFields | ( | ) | const |
Returns a list of source fields.
Definition at line 94 of file qgsprocessingaggregatewidgets.cpp.