QGIS/python/core/auto_generated/qgsattributetableconfig.sip.in

202 lines
4.9 KiB
Plaintext
Raw Normal View History

2017-04-04 08:44:22 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsattributetableconfig.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsAttributeTableConfig
{
%Docstring
2017-12-15 10:36:55 -04:00
This is a container for configuration of the attribute table.
The configuration is specific for one vector layer.
.. versionadded:: 2.16
%End
2017-04-04 08:44:22 +02:00
%TypeHeaderCode
2017-04-04 08:44:22 +02:00
#include "qgsattributetableconfig.h"
%End
public:
2017-04-04 08:44:22 +02:00
enum Type
{
2017-04-04 08:44:22 +02:00
Field,
Action
};
struct ColumnConfig
{
ColumnConfig();
2017-04-04 08:44:22 +02:00
%Docstring
Constructor for ColumnConfig
%End
QgsAttributeTableConfig::Type type;
QString name; //!< The name of the attribute if this column represents a field
bool hidden;
int width;
};
2016-05-02 12:44:36 +02:00
enum ActionWidgetStyle
{
2017-04-04 08:44:22 +02:00
ButtonList,
DropDown
2016-05-02 12:44:36 +02:00
};
QgsAttributeTableConfig();
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsAttributeTableConfig.
%End
QVector<QgsAttributeTableConfig::ColumnConfig> columns() const;
2017-04-04 08:44:22 +02:00
%Docstring
Gets the list with all columns and their configuration.
2017-12-15 10:36:55 -04:00
The list order defines the order of appearance.
2017-04-04 08:44:22 +02:00
%End
bool isEmpty() const;
2017-04-04 08:44:22 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns true if the configuration is empty, ie it contains no columns.
2017-04-04 08:44:22 +02:00
%End
int mapVisibleColumnToIndex( int visibleColumn ) const;
2017-04-04 08:44:22 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Maps a visible column index to its original column index.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param visibleColumn: index of visible column
:return: corresponding index when hidden columns are considered
2017-04-04 08:44:22 +02:00
%End
void setColumns( const QVector<QgsAttributeTableConfig::ColumnConfig> &columns );
%Docstring
2017-12-15 10:36:55 -04:00
Set the list of columns visible in the attribute table.
The list order defines the order of appearance.
2017-04-04 08:44:22 +02:00
%End
void update( const QgsFields &fields );
%Docstring
2017-12-15 10:36:55 -04:00
Update the configuration with the given fields.
Any field which is present in the configuration but not present in the
parameter fields will be removed. Any field which is in the parameter
fields but not in the configuration will be appended.
2017-04-04 08:44:22 +02:00
%End
2016-05-02 12:44:36 +02:00
bool actionWidgetVisible() const;
2017-04-04 08:44:22 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns true if the action widget is visible
2017-04-04 08:44:22 +02:00
%End
2016-05-02 12:44:36 +02:00
void setActionWidgetVisible( bool visible );
2017-04-04 08:44:22 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Set if the action widget is visible
2017-04-04 08:44:22 +02:00
%End
2016-05-02 12:44:36 +02:00
ActionWidgetStyle actionWidgetStyle() const;
2017-04-04 08:44:22 +02:00
%Docstring
Gets the style of the action widget
2017-04-04 08:44:22 +02:00
%End
2016-05-02 12:44:36 +02:00
void setActionWidgetStyle( ActionWidgetStyle actionWidgetStyle );
2017-04-04 08:44:22 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Set the style of the action widget
2017-04-04 08:44:22 +02:00
%End
2016-05-02 12:44:36 +02:00
2017-04-04 08:44:22 +02:00
void writeXml( QDomNode &node ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Serialize to XML on layer save
2017-04-04 08:44:22 +02:00
%End
2017-04-04 08:44:22 +02:00
void readXml( const QDomNode &node );
%Docstring
2017-12-15 10:36:55 -04:00
Deserialize to XML on layer load
2017-04-04 08:44:22 +02:00
%End
QString sortExpression() const;
2017-04-04 08:44:22 +02:00
%Docstring
Gets the expression used for sorting.
2017-04-04 08:44:22 +02:00
%End
2017-04-04 08:44:22 +02:00
void setSortExpression( const QString &sortExpression );
%Docstring
2017-12-15 10:36:55 -04:00
Set the sort expression used for sorting.
2017-04-04 08:44:22 +02:00
%End
int columnWidth( int column ) const;
2017-04-04 08:44:22 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the width of a column, or -1 if column should use default width.
2017-12-15 21:36:08 -04:00
:param column: column index
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setColumnWidth`
2017-04-04 08:44:22 +02:00
%End
void setColumnWidth( int column, int width );
2017-04-04 08:44:22 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the width of a column.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param column: column index
:param width: column width in pixels, or -1 if column should use default width
.. seealso:: :py:func:`columnWidth`
2017-04-04 08:44:22 +02:00
%End
bool columnHidden( int column ) const;
2017-04-04 08:44:22 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns true if the specified column is hidden.
2017-12-15 21:36:08 -04:00
:param column: column index
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setColumnHidden`
2017-04-04 08:44:22 +02:00
%End
void setColumnHidden( int column, bool hidden );
2017-04-04 08:44:22 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets whether the specified column should be hidden.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param column: column index
:param hidden: set to true to hide column
.. seealso:: :py:func:`columnHidden`
2017-04-04 08:44:22 +02:00
%End
Qt::SortOrder sortOrder() const;
2017-04-04 08:44:22 +02:00
%Docstring
Gets the sort order
2017-12-15 10:36:55 -04:00
2017-04-04 08:44:22 +02:00
.. versionadded:: 2.16
%End
void setSortOrder( Qt::SortOrder sortOrder );
2017-04-04 08:44:22 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Set the sort order
2017-04-04 08:44:22 +02:00
.. versionadded:: 2.16
%End
bool hasSameColumns( const QgsAttributeTableConfig &other ) const;
%Docstring
Compare this configuration's columns name, type, and order to ``other``.
The column's width is not considered.
2017-04-04 08:44:22 +02:00
%End
bool operator!= ( const QgsAttributeTableConfig &other ) const;
};
2017-04-04 08:44:22 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsattributetableconfig.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/