KD Reports API Documentation 2.2
Loading...
Searching...
No Matches
KDReportsAbstractTableElement.h
Go to the documentation of this file.
1/****************************************************************************
2**
3** This file is part of the KD Reports library.
4**
5** SPDX-FileCopyrightText: 2007 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6**
7** SPDX-License-Identifier: MIT
8**
9****************************************************************************/
10
11#ifndef KDREPORTSABSTRACTTABLEELEMENT_H
12#define KDREPORTSABSTRACTTABLEELEMENT_H
13
14#include "KDReportsElement.h"
15#include "KDReportsUnit.h"
16
17QT_BEGIN_NAMESPACE
18template<typename T>
19class QList;
20class QFont;
22class QTextCursor;
23QT_END_NAMESPACE
24
25namespace KDReports {
26class AbstractTableElementPrivate;
27
32class KDREPORTS_EXPORT AbstractTableElement : public Element
33{
34public:
40 void setBorder(qreal border);
41
45 qreal border() const;
46
51 void setBorderBrush(const QBrush &brush);
52
57 QBrush borderBrush() const;
58
65 void setPadding(qreal padding);
66
70 qreal padding() const;
71
79 void setWidth(qreal width, Unit unit = Millimeters);
80
86 qreal width() const;
87
92 Unit unit() const;
93
99 void setDefaultFont(const QFont &font);
100
106 QFont defaultFont(bool *isSet) const;
107
108 enum // separate because we don't want "Variable" in other uses of Unit
109 {
110 Variable = Unit::Percent + 1
111 };
112
114 {
116 : width(0)
117 , unit(static_cast<Unit>(Variable))
118 {
119 }
121 : width(w)
122 , unit(u)
123 {
124 }
125 qreal width;
127 };
128
134 void setColumnConstraints(const QVector<ColumnConstraint> &constraints);
135
136protected:
140 AbstractTableElement();
141
146 AbstractTableElement(const AbstractTableElement &other);
150 AbstractTableElement &operator=(const AbstractTableElement &other);
151
155 ~AbstractTableElement() override;
156
160 void fillTableFormat(QTextTableFormat &tableFormat, QTextCursor &textDocCursor) const;
161
162private:
163 std::unique_ptr<AbstractTableElementPrivate> d;
164};
165
166}
167
168#endif /* KDREPORTSABSTRACTTABLEELEMENT_H */
#define KDREPORTS_EXPORT

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-reports/
Generated on Tue Jul 9 2024 00:04:17 for KD Reports API Documentation by doxygen 1.9.8