KD Reports API Documentation  2.0
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-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6 **
7 ** SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDAB-KDReports OR LicenseRef-KDAB-KDReports-US
8 **
9 ** Licensees holding valid commercial KD Reports licenses may use this file in
10 ** accordance with the KD Reports Commercial License Agreement provided with
11 ** the Software.
12 **
13 ** Contact info@kdab.com if any conditions of this licensing are not clear to you.
14 **
15 ****************************************************************************/
16 
17 #ifndef KDREPORTSABSTRACTTABLEELEMENT_H
18 #define KDREPORTSABSTRACTTABLEELEMENT_H
19 
20 #include "KDReportsElement.h"
21 #include "KDReportsUnit.h"
22 
23 QT_BEGIN_NAMESPACE
24 template <typename T>
25 class QList;
26 class QFont;
27 class QTextTableFormat;
28 class QTextCursor;
29 QT_END_NAMESPACE
30 
31 namespace KDReports {
32 class AbstractTableElementPrivate;
33 
39 {
40 public:
46  void setBorder(qreal border);
47 
51  qreal border() const;
52 
57  void setBorderBrush(const QBrush &brush);
58 
63  QBrush borderBrush() const;
64 
71  void setPadding(qreal padding);
72 
76  qreal padding() const;
77 
85  void setWidth(qreal width, Unit unit = Millimeters);
86 
92  qreal width() const;
93 
98  Unit unit() const;
99 
105  void setDefaultFont(const QFont &font);
106 
112  QFont defaultFont(bool *isSet) const;
113 
115  {
116  qreal width;
118  };
124  void setColumnConstraints(const QVector<ColumnConstraint> &constraints);
125 
126 protected:
131 
140  AbstractTableElement &operator=(const AbstractTableElement &other);
141 
145  ~AbstractTableElement() override;
146 
150  void fillTableFormat(QTextTableFormat &tableFormat, QTextCursor &textDocCursor) const;
151 
152 private:
153  AbstractTableElementPrivate *const d;
154 };
155 
156 }
157 
158 #endif /* KDREPORTSABSTRACTTABLEELEMENT_H */
KDReports::Millimeters
@ Millimeters
Millimeters (the default)
Definition: KDReportsUnit.h:54
QList
Definition: KDReportsAbstractTableElement.h:25
KDReports::Element
Definition: KDReportsElement.h:39
KDReportsElement.h
KDReports::Unit
Unit
Definition: KDReportsUnit.h:39
KDReports::AbstractTableElement::ColumnConstraint::unit
Unit unit
Definition: KDReportsAbstractTableElement.h:117
KDReportsUnit.h
KDReports::AbstractTableElement::ColumnConstraint
Definition: KDReportsAbstractTableElement.h:114
KDReports::AbstractTableElement::ColumnConstraint::width
qreal width
Definition: KDReportsAbstractTableElement.h:116
KDREPORTS_EXPORT
#define KDREPORTS_EXPORT
Definition: KDReportsGlobal.h:29
KDReports::AbstractTableElement
Definition: KDReportsAbstractTableElement.h:38
KDReports
Definition: KDReportsAbstractReportLayout_p.h:30

© 2007-2021 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 Sat Jan 8 2022 02:38:32 for KD Reports API Documentation by doxygen 1.8.17