QGIS/python/core/auto_generated/qgstablecell.sip.in
Nyall Dawson 761f594cca Improve api and UX for handling cell text formatting in manual tables,
by removing the checkbox for overridding text format and using the
"not set" state from the font button instead
2020-07-14 11:23:33 +10:00

205 lines
5.1 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgstablecell.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsTableCell
{
%Docstring
Encapsulates the contents and formatting of a single table cell.
.. versionadded:: 3.12
%End
%TypeHeaderCode
#include "qgstablecell.h"
%End
public:
QgsTableCell( const QVariant &content = QVariant() );
%Docstring
Constructor for QgsTableCell, with the specified ``content``.
%End
QgsTableCell( const QgsTableCell &other );
%Docstring
Copy constructor
%End
~QgsTableCell();
QVariant content() const;
%Docstring
Returns the cell's content.
.. seealso:: :py:func:`setContent`
%End
void setContent( const QVariant &content );
%Docstring
Sets the cell's ``content``.
.. seealso:: :py:func:`content`
%End
QColor backgroundColor() const;
%Docstring
Returns the cell's background color, or an invalid color if a default color should be used for the background.
.. seealso:: :py:func:`setBackgroundColor`
%End
void setBackgroundColor( const QColor &color );
%Docstring
Sets the cell's background ``color``.
Set an invalid ``color`` if a default color should be used for the background.
.. seealso:: :py:func:`backgroundColor`
%End
QColor foregroundColor() const;
%Docstring
Returns the cell's foreground color, or an invalid color if a default color should be used for the foreground.
.. seealso:: :py:func:`setForegroundColor`
%End
void setForegroundColor( const QColor &color );
%Docstring
Sets the cell's foreground ``color``.
Set an invalid ``color`` if a default color should be used for the foreground.
.. seealso:: :py:func:`foregroundColor`
%End
QgsTextFormat textFormat() const;
%Docstring
Returns the cell's text format.
.. note::
The text format will only be used if :py:func:`~QgsTableCell.hasTextFormat` returns ``True``.
.. seealso:: :py:func:`setTextFormat`
.. versionadded:: 3.16
%End
void setTextFormat( const QgsTextFormat &format );
%Docstring
Sets the cell's text ``format``.
.. note::
The text format will only be used if :py:func:`~QgsTableCell.hasTextFormat` returns ``True``.
.. seealso:: :py:func:`textFormat`
.. versionadded:: 3.16
%End
const QgsNumericFormat *numericFormat() const;
%Docstring
Returns the numeric format used for numbers in the cell, or ``None`` if no format is set.
.. seealso:: :py:func:`setNumericFormat`
%End
void setNumericFormat( QgsNumericFormat *format /Transfer/ );
%Docstring
Sets the numeric ``format`` used for numbers in the cell, or ``None`` if no specific format is set.
Ownership of ``format`` is transferred to the cell.
.. seealso:: :py:func:`numericFormat`
%End
Qt::Alignment horizontalAlignment() const;
%Docstring
Returns the horizontal alignment for text in the cell.
.. seealso:: :py:func:`setHorizontalAlignment`
.. seealso:: :py:func:`verticalAlignment`
.. versionadded:: 3.16
%End
void setHorizontalAlignment( Qt::Alignment alignment );
%Docstring
Sets the horizontal ``alignment`` for text in the cell.
.. seealso:: :py:func:`horizontalAlignment`
.. seealso:: :py:func:`setVerticalAlignment`
.. versionadded:: 3.16
%End
Qt::Alignment verticalAlignment() const;
%Docstring
Returns the vertical alignment for text in the cell.
.. seealso:: :py:func:`setVerticalAlignment`
.. seealso:: :py:func:`horizontalAlignment`
.. versionadded:: 3.16
%End
void setVerticalAlignment( Qt::Alignment alignment );
%Docstring
Sets the vertical ``alignment`` for text in the cell.
.. seealso:: :py:func:`verticalAlignment`
.. seealso:: :py:func:`setHorizontalAlignment`
.. versionadded:: 3.16
%End
QVariantMap properties( const QgsReadWriteContext &context ) const;
%Docstring
Returns the properties of the cell.
.. seealso:: :py:func:`setProperties`
%End
void setProperties( const QVariantMap &properties, const QgsReadWriteContext &context );
%Docstring
Sets the ``properties`` for the cell.
.. seealso:: :py:func:`properties`
%End
SIP_PYOBJECT __repr__();
%MethodCode
QString str = QStringLiteral( "<QgsTableCell: %1>" ).arg( sipCpp->content().toString() );
sipRes = PyUnicode_FromString( str.toUtf8().constData() );
%End
};
typedef QVector<QgsTableCell> QgsTableRow;
typedef QVector<QVector<QgsTableRow>> QgsTableContents;
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgstablecell.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/