A base model to hold the displaying or sortings columns used in a QgsLayoutAttributeTable.
More...
#include <qgslayoutattributeselectiondialog.h>
|
| | QgsLayoutAttributeTableColumnModelBase (QgsLayoutItemAttributeTable *table, QObject *parent=nullptr) |
| | Constructor for QgsLayoutAttributeTableColumnModel. More...
|
| |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
| |
| virtual QVector< QgsLayoutTableColumn > & | columns () const =0 |
| | To be reimplemented to provide the display or the sort columns. More...
|
| |
| QVariant | data (const QModelIndex &index, int role) const override |
| |
| virtual QList< Column > | displayedColumns () const =0 |
| | To be reimplemented to choose which column should be used by the model. More...
|
| |
| Qt::ItemFlags | flags (const QModelIndex &index) const override |
| |
| QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
| |
| QModelIndex | index (int row, int column, const QModelIndex &parent) const override |
| |
| bool | insertRows (int row, int count, const QModelIndex &parent=QModelIndex()) override |
| |
| bool | moveRow (int row, ShiftDirection direction) |
| | Moves the specified row up or down in the model. More...
|
| |
| QModelIndex | parent (const QModelIndex &child) const override |
| |
| bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) override |
| |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| |
| bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
| |
A base model to hold the displaying or sortings columns used in a QgsLayoutAttributeTable.
- Note
- This class is not a part of public API
- Since
- QGIS 3.14
Definition at line 53 of file qgslayoutattributeselectiondialog.h.
◆ Column
Available columns for the configuration table to be used by the model.
| Enumerator |
|---|
| Attribute | Attribute for a field or an expression.
|
| Heading | Defines the title of the column.
|
| Alignment | Defines the alignment of the column.
|
| Width | Defines the width of the column.
|
| SortOrder | Defines the sort order.
|
Definition at line 71 of file qgslayoutattributeselectiondialog.h.
◆ ShiftDirection
Controls whether a row/column is shifted up or down.
| Enumerator |
|---|
| ShiftUp | Shift the row/column up.
|
| ShiftDown | Shift the row/column down.
|
Definition at line 62 of file qgslayoutattributeselectiondialog.h.
◆ QgsLayoutAttributeTableColumnModelBase()
| QgsLayoutAttributeTableColumnModelBase::QgsLayoutAttributeTableColumnModelBase |
( |
QgsLayoutItemAttributeTable * |
table, |
|
|
QObject * |
parent = nullptr |
|
) |
| |
◆ columnCount()
| int QgsLayoutAttributeTableColumnModelBase::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
◆ columns()
◆ data()
| QVariant QgsLayoutAttributeTableColumnModelBase::data |
( |
const QModelIndex & |
index, |
|
|
int |
role |
|
) |
| const |
|
override |
◆ displayedColumns()
| virtual QList<Column> QgsLayoutAttributeTableColumnModelBase::displayedColumns |
( |
| ) |
const |
|
pure virtual |
◆ flags()
| Qt::ItemFlags QgsLayoutAttributeTableColumnModelBase::flags |
( |
const QModelIndex & |
index | ) |
const |
|
override |
◆ headerData()
| QVariant QgsLayoutAttributeTableColumnModelBase::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role = Qt::DisplayRole |
|
) |
| const |
|
override |
◆ index()
| QModelIndex QgsLayoutAttributeTableColumnModelBase::index |
( |
int |
row, |
|
|
int |
column, |
|
|
const QModelIndex & |
parent |
|
) |
| const |
|
override |
◆ insertRows()
| bool QgsLayoutAttributeTableColumnModelBase::insertRows |
( |
int |
row, |
|
|
int |
count, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| |
|
override |
◆ moveRow()
| bool QgsLayoutAttributeTableColumnModelBase::moveRow |
( |
int |
row, |
|
|
ShiftDirection |
direction |
|
) |
| |
Moves the specified row up or down in the model.
Used for rearranging the attribute tables columns.
- Returns
true if the move is allowed
- Parameters
-
| row | row in model representing attribute table column to move |
| direction | direction to move the attribute table column |
Definition at line 315 of file qgslayoutattributeselectiondialog.cpp.
◆ parent()
| QModelIndex QgsLayoutAttributeTableColumnModelBase::parent |
( |
const QModelIndex & |
child | ) |
const |
|
override |
◆ removeRows()
| bool QgsLayoutAttributeTableColumnModelBase::removeRows |
( |
int |
row, |
|
|
int |
count, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| |
|
override |
◆ rowCount()
| int QgsLayoutAttributeTableColumnModelBase::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
◆ setData()
| bool QgsLayoutAttributeTableColumnModelBase::setData |
( |
const QModelIndex & |
index, |
|
|
const QVariant & |
value, |
|
|
int |
role = Qt::EditRole |
|
) |
| |
|
override |
◆ mTable
The documentation for this class was generated from the following files: