QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
Encapsulates the contents and formatting of a single table cell. More...
#include <qgstablecell.h>
Public Member Functions | |
QgsTableCell (const QgsTableCell &other) | |
Copy constructor. More... | |
QgsTableCell (const QVariant &content=QVariant()) | |
Constructor for QgsTableCell, with the specified content. More... | |
~QgsTableCell () | |
QColor | backgroundColor () const |
Returns the cell's background color, or an invalid color if a default color should be used for the background. More... | |
QVariant | content () const |
Returns the cell's content. More... | |
QColor | foregroundColor () const |
Returns the cell's foreground color, or an invalid color if a default color should be used for the foreground. More... | |
const QgsNumericFormat * | numericFormat () const |
Returns the numeric format used for numbers in the cell, or nullptr if no format is set. More... | |
QgsTableCell & | operator= (const QgsTableCell &other) |
QVariantMap | properties (const QgsReadWriteContext &context) const |
Returns the properties of the cell. More... | |
void | setBackgroundColor (const QColor &color) |
Sets the cell's background color. More... | |
void | setContent (const QVariant &content) |
Sets the cell's content. More... | |
void | setForegroundColor (const QColor &color) |
Sets the cell's foreground color. More... | |
void | setNumericFormat (QgsNumericFormat *format) |
Sets the numeric format used for numbers in the cell, or nullptr if no specific format is set. More... | |
void | setProperties (const QVariantMap &properties, const QgsReadWriteContext &context) |
Sets the properties for the cell. More... | |
Encapsulates the contents and formatting of a single table cell.
Definition at line 34 of file qgstablecell.h.
QgsTableCell::QgsTableCell | ( | const QVariant & | content = QVariant() | ) |
Constructor for QgsTableCell, with the specified content.
Definition at line 21 of file qgstablecell.cpp.
QgsTableCell::QgsTableCell | ( | const QgsTableCell & | other | ) |
Copy constructor.
Definition at line 25 of file qgstablecell.cpp.
|
default |
|
inline |
Returns the cell's background color, or an invalid color if a default color should be used for the background.
Definition at line 70 of file qgstablecell.h.
|
inline |
|
inline |
Returns the cell's foreground color, or an invalid color if a default color should be used for the foreground.
Definition at line 86 of file qgstablecell.h.
const QgsNumericFormat * QgsTableCell::numericFormat | ( | ) | const |
Returns the numeric format used for numbers in the cell, or nullptr
if no format is set.
Definition at line 43 of file qgstablecell.cpp.
QgsTableCell & QgsTableCell::operator= | ( | const QgsTableCell & | other | ) |
Definition at line 34 of file qgstablecell.cpp.
QVariantMap QgsTableCell::properties | ( | const QgsReadWriteContext & | context | ) | const |
Returns the properties of the cell.
Definition at line 53 of file qgstablecell.cpp.
|
inline |
Sets the cell's background color.
Set an invalid color if a default color should be used for the background.
Definition at line 79 of file qgstablecell.h.
|
inline |
|
inline |
Sets the cell's foreground color.
Set an invalid color if a default color should be used for the foreground.
Definition at line 95 of file qgstablecell.h.
void QgsTableCell::setNumericFormat | ( | QgsNumericFormat * | format | ) |
Sets the numeric format used for numbers in the cell, or nullptr
if no specific format is set.
Ownership of format is transferred to the cell.
Definition at line 48 of file qgstablecell.cpp.
void QgsTableCell::setProperties | ( | const QVariantMap & | properties, |
const QgsReadWriteContext & | context | ||
) |
Sets the properties for the cell.
Definition at line 67 of file qgstablecell.cpp.