KD Reports API Documentation  2.0
KDReportsAutoTableElement.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 KDREPORTSAUTOTABLEELEMENT_H
18 #define KDREPORTSAUTOTABLEELEMENT_H
19 
21 #include <QtCore/QSize>
22 
23 QT_BEGIN_NAMESPACE
24 class QTextDocument;
25 class QTextTableCell;
26 class QAbstractItemModel;
27 QT_END_NAMESPACE
28 
29 namespace KDReports {
30 class AutoTableElementPrivate;
31 
41 {
42 public:
48  explicit AutoTableElement(QAbstractItemModel *tableModel);
49 
54  explicit AutoTableElement(const QString &modelKey);
55 
59  ~AutoTableElement() override;
60 
65  AutoTableElement(const AutoTableElement &other);
69  AutoTableElement &operator=(const AutoTableElement &other);
70 
75  QAbstractItemModel *tableModel() const;
76 
81  void setTableModel(QAbstractItemModel *tableModel);
82 
87  void setModelKey(const QString &modelKey);
88 
94  void setVerticalHeaderVisible(bool visible);
95 
100  void setHorizontalHeaderVisible(bool visible);
101 
106  bool isVerticalHeaderVisible() const;
107 
112  bool isHorizontalHeaderVisible() const;
113 
120  void setHeaderBackground(const QBrush &brush);
121 
126  QBrush headerBackground() const;
127 
135  void setIconSize(QSize iconSize);
136 
141  QSize iconSize() const;
142 
147  void build(ReportBuilder &) const override;
152  Element *clone() const override;
153 
154  enum Role {
155  DecorationAlignmentRole = 0x2D535FB1,
156  NonBreakableLinesRole = 0x2D535FB2
157  };
158 
159 private:
160  AutoTableElementPrivate *const d;
161 };
162 
163 }
164 
165 #endif /* KDREPORTSAUTOTABLEELEMENT_H */
KDReports::AutoTableElement::Role
Role
Definition: KDReportsAutoTableElement.h:154
KDReports::ReportBuilder
Definition: KDReportsReportBuilder_p.h:41
KDReports::Element
Definition: KDReportsElement.h:39
KDReports::AutoTableElement
Definition: KDReportsAutoTableElement.h:40
KDReportsAbstractTableElement.h
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