KD Reports  1.8
KDReportsAutoTableElement.h
1 /****************************************************************************
2 ** Copyright (C) 2007-2020 Klaralvdalens Datakonsult AB. All rights reserved.
3 **
4 ** This file is part of the KD Reports library.
5 **
6 ** Licensees holding valid commercial KD Reports licenses may use this file in
7 ** accordance with the KD Reports Commercial License Agreement provided with
8 ** the Software.
9 **
10 **
11 ** This file may be distributed and/or modified under the terms of the
12 ** GNU Lesser General Public License version 2.1 and version 3 as published by the
13 ** Free Software Foundation and appearing in the file LICENSE.LGPL.txt included.
14 **
15 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17 **
18 ** Contact info@kdab.com if any conditions of this licensing are not
19 ** clear to you.
20 **
21 **********************************************************************/
22 
23 #ifndef KDREPORTSAUTOTABLEELEMENT_H
24 #define KDREPORTSAUTOTABLEELEMENT_H
25 
26 #include "KDReportsAbstractTableElement.h"
27 #include <QtCore/QSize>
28 
29 QT_BEGIN_NAMESPACE
30 class QTextDocument;
31 class QTextTableCell;
32 class QAbstractItemModel;
33 QT_END_NAMESPACE
34 
35 namespace KDReports {
36 class AutoTableElementPrivate;
37 
46 class KDREPORTS_EXPORT AutoTableElement : public AbstractTableElement
47 {
48 public:
52  explicit AutoTableElement( QAbstractItemModel* tableModel );
53 
58  explicit AutoTableElement( const QString& modelKey );
59 
64 
69  AutoTableElement(const AutoTableElement &other);
73  AutoTableElement &operator=(const AutoTableElement &other);
74 
79  QAbstractItemModel* tableModel() const;
80 
85  void setTableModel(QAbstractItemModel *tableModel);
86 
91  void setModelKey(const QString &modelKey);
92 
98  void setVerticalHeaderVisible( bool visible );
99 
104  void setHorizontalHeaderVisible( bool visible );
105 
110  bool isVerticalHeaderVisible() const;
111 
116  bool isHorizontalHeaderVisible() const;
117 
124  void setHeaderBackground( const QBrush& brush );
125 
130  QBrush headerBackground() const;
131 
139  void setIconSize( const QSize& iconSize );
140 
145  QSize iconSize() const;
146 
151  void build( ReportBuilder& ) const;
156  Element* clone() const;
157 
158  enum {
159  DecorationAlignmentRole = 0x2D535FB1,
160  NonBreakableLinesRole = 0x2D535FB2
161  };
162 
163 private:
164  AutoTableElementPrivate* const d;
165 };
166 
167 }
168 
169 #endif /* KDREPORTSAUTOTABLEELEMENT_H */
Definition: KDReportsAutoTableElement.h:46
Definition: KDReportsAbstractTableElement.h:36
Definition: KDReportsElement.h:45
Definition: KDReportsAbstractTableElement.h:43

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/