QGIS/python/core/layout/qgslayouttablecolumn.sip

230 lines
6.6 KiB
Plaintext
Raw Normal View History

2017-11-21 13:17:10 +10:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayouttablecolumn.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2017-11-22 18:36:51 +10:00
class QgsLayoutTableColumn : QObject
2017-11-21 13:17:10 +10:00
{
%Docstring
2017-12-15 10:36:55 -04:00
Stores properties of a column for a QgsLayoutTable. Some properties of aQgsLayoutTableColumn
are applicable only in certain contexts. For instance, the attribute and setAttribute methods only
have an effect for QgsLayoutItemAttributeTables, and have no effect for QgsLayoutItemTextTables.
2017-11-21 13:17:10 +10:00
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgslayouttablecolumn.h"
%End
public:
QgsLayoutTableColumn( const QString &heading = QString() );
%Docstring
2017-12-15 10:36:55 -04:00
Constructor for QgsLayoutTableColumn.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param heading: column heading
2017-11-21 13:17:10 +10:00
%End
bool writeXml( QDomElement &columnElem, QDomDocument &doc ) const;
%Docstring
2017-12-15 10:36:55 -04:00
Writes the column's properties to xml for storage.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param columnElem: an existing QDomElement in which to store the column's properties.
:param doc: QDomDocument for the destination xml.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`readXml()`
2017-11-21 13:17:10 +10:00
%End
bool readXml( const QDomElement &columnElem );
%Docstring
2017-12-15 10:36:55 -04:00
Reads the column's properties from xml.
2017-12-15 21:36:08 -04:00
:param columnElem: a QDomElement holding the column's desired properties.
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`writeXml()`
2017-11-21 13:17:10 +10:00
%End
double width() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the width for the column in mm,
or 0 if column width is automatically calculated.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setWidth()`
2017-11-21 13:17:10 +10:00
%End
void setWidth( const double width );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the width for a column in mm. Set the ``width`` to 0 if the column width is to be automatically calculated.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`width()`
2017-11-21 13:17:10 +10:00
%End
QString heading() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the heading for a column, which is the value displayed in the column's
header cell.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setHeading()`
2017-11-21 13:17:10 +10:00
%End
void setHeading( const QString &heading );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``heading`` for a column, which is the value displayed in the column's
header cell.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`heading()`
2017-11-21 13:17:10 +10:00
%End
Qt::AlignmentFlag hAlignment() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the horizontal alignment for a column, which controls the alignment
used for drawing column values within cells.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setHAlignment()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`vAlignment()`
2017-11-21 13:17:10 +10:00
%End
void setHAlignment( Qt::AlignmentFlag alignment );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the horizontal ``alignment`` for a column, which controls the alignment
used for drawing column values within cells.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`hAlignment()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setVAlignment()`
2017-11-21 13:17:10 +10:00
%End
Qt::AlignmentFlag vAlignment() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the vertical alignment for a column, which controls the alignment
used for drawing column values within cells.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setVAlignment()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`hAlignment()`
2017-11-21 13:17:10 +10:00
%End
void setVAlignment( Qt::AlignmentFlag alignment );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the vertical ``alignment`` for a column, which controls the alignment
used for drawing column values within cells.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`vAlignment()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setHAlignment()`
2017-11-21 13:17:10 +10:00
%End
QString attribute() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the attribute name or expression used for the column's values. This property
is only used when the column is part of a QgsLayoutItemAttributeTable.
2017-11-21 13:17:10 +10:00
.. note::
only applicable when used in a QgsLayoutItemAttributeTable
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setAttribute()`
2017-11-21 13:17:10 +10:00
%End
void setAttribute( const QString &attribute );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the ``attribute`` name or expression used for the column's values. This property
is only used when the column is part of a QgsLayoutItemAttributeTable.
2017-11-21 13:17:10 +10:00
.. note::
only applicable when used in a QgsLayoutItemAttributeTable
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`attribute()`
2017-11-21 13:17:10 +10:00
%End
Qt::SortOrder sortOrder() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the sort order for the column. This property is only used when the column
is part of a QgsLayoutItemAttributeTable and when sortByRank is > 0.
2017-11-21 13:17:10 +10:00
.. note::
only applicable when used in a QgsLayoutItemAttributeTable
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setSortOrder()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`sortByRank()`
2017-11-21 13:17:10 +10:00
%End
void setSortOrder( Qt::SortOrder order );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the sort ``order`` for the column. This property is only used when the column
is part of a QgsLayoutItemAttributeTable and when sortByRank() is > 0.
2017-11-21 13:17:10 +10:00
.. note::
only applicable when used in a QgsLayoutItemAttributeTable
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`sortOrder()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setSortByRank()`
2017-11-21 13:17:10 +10:00
%End
int sortByRank() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns the sort rank for the column. If the sort rank is > 0 then the column
will be sorted in the table. The sort rank specifies the priority given to the
column when the table is sorted by multiple columns, with lower sort ranks
having higher priority. This property is only used when the column
is part of a QgsLayoutItemAttributeTable.
2017-11-21 13:17:10 +10:00
2017-12-15 10:36:55 -04:00
If sort rank is <= 0 then the column is not being sorted.
2017-11-21 13:17:10 +10:00
.. note::
only applicable when used in a QgsLayoutItemAttributeTable
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setSortByRank()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`sortOrder()`
2017-11-21 13:17:10 +10:00
%End
void setSortByRank( int rank );
%Docstring
2017-12-15 10:36:55 -04:00
Sets the sort ``rank`` for the column. If the sort rank is > 0 then the column
will be sorted in the table. The sort rank specifies the priority given to the
column when the table is sorted by multiple columns, with lower sort ranks
having higher priority. This property is only used when the column
is part of a QgsComposerAttributeTable.
If the sort ``rank`` is <= 0 then the column is not being sorted.
2017-11-21 13:17:10 +10:00
.. note::
only applicable when used in a QgsLayoutItemAttributeTable
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`sortByRank()`
2017-12-15 10:36:55 -04:00
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setSortOrder()`
2017-11-21 13:17:10 +10:00
%End
QgsLayoutTableColumn *clone() /Factory/;
%Docstring
2017-12-15 10:36:55 -04:00
Creates a duplicate column which is a deep copy of this column.
:return: a new QgsLayoutTableColumn with same properties as this column.
2017-11-21 13:17:10 +10:00
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/layout/qgslayouttablecolumn.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/