KD Reports  1.9
KDReportsAbstractTableElement.h
1 /****************************************************************************
2 **
3 ** This file is part of the KD Reports library.
4 **
5 ** SPDX-FileCopyrightText: 2007-2020 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> class QList;
25 class QFont;
26 class QTextTableFormat;
27 class QTextCursor;
28 QT_END_NAMESPACE
29 
30 namespace KDReports {
31 class AbstractTableElementPrivate;
32 
37 class KDREPORTS_EXPORT AbstractTableElement : public Element
38 {
39 public:
40 
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 
122  AbstractTableElement &operator=(const AbstractTableElement &other);
123 
125  qreal width;
126  Unit unit;
127  };
133  void setColumnConstraints( const QVector<ColumnConstraint> &constraints );
134 
135 protected:
140 
144  ~AbstractTableElement() override;
145 
149  void fillTableFormat( QTextTableFormat& tableFormat, QTextCursor& textDocCursor ) const;
150 
151 private:
152  AbstractTableElementPrivate* const d;
153 };
154 
155 }
156 
157 #endif /* KDREPORTSABSTRACTTABLEELEMENT_H */
158 
Unit
Definition: KDReportsUnit.h:26
Millimeters (the default)
Definition: KDReportsUnit.h:27
Definition: KDReportsAbstractTableElement.h:30
Definition: KDReportsAbstractTableElement.h:124
Definition: KDReportsElement.h:39
Definition: KDReportsAbstractTableElement.h:37
Definition: KDReportsAbstractTableElement.h:24

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/