KD Reports  1.9
KDReportsAutoTableElement.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 KDREPORTSAUTOTABLEELEMENT_H
18 #define KDREPORTSAUTOTABLEELEMENT_H
19 
20 #include "KDReportsAbstractTableElement.h"
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 
40 class KDREPORTS_EXPORT AutoTableElement : public AbstractTableElement
41 {
42 public:
46  explicit AutoTableElement( QAbstractItemModel* tableModel );
47 
52  explicit AutoTableElement( const QString& modelKey );
53 
57  ~AutoTableElement() override;
58 
63  AutoTableElement(const AutoTableElement &other);
67  AutoTableElement &operator=(const AutoTableElement &other);
68 
73  QAbstractItemModel* tableModel() const;
74 
79  void setTableModel(QAbstractItemModel *tableModel);
80 
85  void setModelKey(const QString &modelKey);
86 
92  void setVerticalHeaderVisible( bool visible );
93 
98  void setHorizontalHeaderVisible( bool visible );
99 
104  bool isVerticalHeaderVisible() const;
105 
110  bool isHorizontalHeaderVisible() const;
111 
118  void setHeaderBackground( const QBrush& brush );
119 
124  QBrush headerBackground() const;
125 
133  void setIconSize( const QSize& iconSize );
134 
139  QSize iconSize() const;
140 
145  void build( ReportBuilder& ) const override;
150  Element* clone() const override;
151 
152  enum {
153  DecorationAlignmentRole = 0x2D535FB1,
154  NonBreakableLinesRole = 0x2D535FB2
155  };
156 
157 private:
158  AutoTableElementPrivate* const d;
159 };
160 
161 }
162 
163 #endif /* KDREPORTSAUTOTABLEELEMENT_H */
Definition: KDReportsAutoTableElement.h:40
Definition: KDReportsAbstractTableElement.h:30
Definition: KDReportsElement.h:39
Definition: KDReportsAbstractTableElement.h:37

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/