16 #ifndef QGSATTRIBUTETABLECONFIG_H
17 #define QGSATTRIBUTETABLECONFIG_H
25 #include "qgis_core.h"
91 QVector<QgsAttributeTableConfig::ColumnConfig> columns()
const;
110 sipRes = sipCpp->size();
119 int mapVisibleColumnToIndex(
int visibleColumn )
const;
125 void setColumns(
const QVector<QgsAttributeTableConfig::ColumnConfig> &columns );
138 bool actionWidgetVisible()
const;
143 void setActionWidgetVisible(
bool visible );
158 void writeXml( QDomNode &node )
const;
163 void readXml(
const QDomNode &node );
168 QString sortExpression()
const;
173 void setSortExpression(
const QString &sortExpression );
182 int columnWidth(
int column )
const;
191 int columnWidth(
int column )
const;
194 if ( a0 < 0 || a0 >= sipCpp->size() )
196 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
201 return PyLong_FromLong( sipCpp->columnWidth( a0 ) );
215 void setColumnWidth(
int column,
int width );
225 void setColumnWidth(
int column,
int width );
227 if ( a0 < 0 || a0 >= sipCpp->size() )
229 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
234 sipCpp->setColumnWidth( a0, a1 );
246 bool columnHidden(
int column )
const;
255 bool columnHidden(
int column )
const;
258 if ( a0 < 0 || a0 >= sipCpp->size() )
260 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
265 return PyBool_FromLong( sipCpp->columnHidden( a0 ) );
279 void setColumnHidden(
int column,
bool hidden );
289 void setColumnHidden(
int column,
bool hidden );
291 if ( a0 < 0 || a0 >= sipCpp->size() )
293 PyErr_SetString( PyExc_IndexError, QByteArray::number( a0 ) );
298 sipCpp->setColumnHidden( a0, a1 );
307 Qt::SortOrder sortOrder()
const;
313 void setSortOrder( Qt::SortOrder sortOrder );
327 QVector<ColumnConfig> mColumns;
328 ActionWidgetStyle mActionWidgetStyle = DropDown;
329 QString mSortExpression;
330 Qt::SortOrder mSortOrder = Qt::AscendingOrder;
This is a container for configuration of the attribute table.
Type
The type of an attribute table column.
@ Field
This column represents a field.
ActionWidgetStyle
The style of the action widget in the attribute table.
@ ButtonList
A list of buttons.
QgsAttributeTableConfig()=default
Constructor for QgsAttributeTableConfig.
Container of fields for a vector layer.
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Q_DECLARE_METATYPE(QgsMeshTimeSettings)
Defines the configuration of a column in the attribute table.
ColumnConfig()=default
Constructor for ColumnConfig.
QString name
The name of the attribute if this column represents a field.