KD Reports  1.7
KDReportsAutoTableElement.h
1 /****************************************************************************
2 ** Copyright (C) 2007-2015 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 class QTextDocument;
30 class QTextTableCell;
31 class QAbstractItemModel;
32 
33 namespace KDReports {
34 class AutoTableElementPrivate;
35 
44 class KDREPORTS_EXPORT AutoTableElement : public AbstractTableElement
45 {
46 public:
50  explicit AutoTableElement( QAbstractItemModel* tableModel );
51 
56  explicit AutoTableElement( const QString& modelKey );
57 
62 
67  AutoTableElement(const AutoTableElement &other);
71  AutoTableElement &operator=(const AutoTableElement &other);
72 
77  QAbstractItemModel* tableModel() const;
78 
83  void setTableModel(QAbstractItemModel *tableModel);
84 
89  void setModelKey(const QString &modelKey);
90 
96  void setVerticalHeaderVisible( bool visible );
97 
102  void setHorizontalHeaderVisible( bool visible );
103 
108  bool isVerticalHeaderVisible() const;
109 
114  bool isHorizontalHeaderVisible() const;
115 
122  void setHeaderBackground( const QBrush& brush );
123 
128  QBrush headerBackground() const;
129 
137  void setIconSize( const QSize& iconSize );
138 
143  QSize iconSize() const;
144 
149  void build( ReportBuilder& ) const;
154  Element* clone() const;
155 
156  enum {
157  DecorationAlignmentRole = 0x2D535FB1,
158  NonBreakableLinesRole = 0x2D535FB2
159  };
160 
161 private:
162  AutoTableElementPrivate* const d;
163 };
164 
165 }
166 
167 #endif /* KDREPORTSAUTOTABLEELEMENT_H */
Definition: KDReportsAutoTableElement.h:44
Definition: KDReportsAbstractTableElement.h:33
Definition: KDReportsElement.h:42
Definition: KDReportsAbstractTableElement.h:40

Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-reports/