QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
Go to the documentation of this file.
18 #ifndef QGSLAYOUTTABLECOLUMN_H
19 #define QGSLAYOUTTABLECOLUMN_H
21 #include <QDomDocument>
22 #include <QDomElement>
25 #include "qgis_core.h"
52 bool writeXml( QDomElement &columnElem, QDomDocument &doc )
const;
59 bool readXml(
const QDomElement &columnElem );
66 double width()
const {
return mWidth; }
72 void setWidth(
const double width ) { mWidth = width; }
79 QString
heading()
const {
return mHeading; }
86 void setHeading(
const QString &heading ) { mHeading = heading; }
94 Qt::AlignmentFlag
hAlignment()
const {
return mHAlignment; }
102 void setHAlignment( Qt::AlignmentFlag alignment ) { mHAlignment = alignment; }
118 void setVAlignment( Qt::AlignmentFlag alignment ) { mVAlignment = alignment; }
134 void setAttribute(
const QString &attribute ) { mAttribute = attribute; }
194 return mHeading == other.mHeading
195 && mAttribute == other.mAttribute
196 && mSortByRank == other.mSortByRank
197 && mSortOrder == other.mSortOrder
198 && mWidth == other.mWidth
199 && mHAlignment == other.mHAlignment
200 && mVAlignment == other.mVAlignment;
208 Qt::SortOrder mSortOrder = Qt::AscendingOrder;
210 QColor mBackgroundColor = Qt::transparent;
211 Qt::AlignmentFlag mHAlignment = Qt::AlignLeft;
212 Qt::AlignmentFlag mVAlignment = Qt::AlignVCenter;
217 #endif //QGSLAYOUTTABLECOLUMN_H
bool operator==(const QgsLayoutTableColumn &other)
double width() const
Returns the width for the column in mm, or 0 if column width is automatically calculated.
Q_DECL_DEPRECATED void setSortByRank(int rank)
Sets the sort rank for the column.
QgsCompositionConverter class converts a QGIS 2.x composition to a QGIS 3.x layout.
Q_DECL_DEPRECATED QgsLayoutTableColumn * clone()
Creates a duplicate column which is a deep copy of this column.
Qt::AlignmentFlag vAlignment() const
Returns the vertical alignment for a column, which controls the alignment used for drawing column val...
QString heading() const
Returns the heading for a column, which is the value displayed in the column's header cell.
void setHAlignment(Qt::AlignmentFlag alignment)
Sets the horizontal alignment for a column, which controls the alignment used for drawing column valu...
void setAttribute(const QString &attribute)
Sets the attribute name or expression used for the column's values.
QString attribute() const
Returns the attribute name or expression used for the column's values.
Qt::SortOrder sortOrder() const
Returns the sort order for the column.
void setVAlignment(Qt::AlignmentFlag alignment)
Sets the vertical alignment for a column, which controls the alignment used for drawing column values...
void setHeading(const QString &heading)
Sets the heading for a column, which is the value displayed in the column's header cell.
void setWidth(const double width)
Sets the width for a column in mm.
Qt::AlignmentFlag hAlignment() const
Returns the horizontal alignment for a column, which controls the alignment used for drawing column v...
void setSortOrder(Qt::SortOrder order)
Sets the sort order for the column.
Q_DECL_DEPRECATED int sortByRank() const
Returns the sort rank for the column.
Stores properties of a column for a QgsLayoutTable.