KD Reports  1.7
KDReportsAbstractTableElement.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 KDREPORTSABSTRACTTABLEELEMENT_H
24 #define KDREPORTSABSTRACTTABLEELEMENT_H
25 
26 #include "KDReportsElement.h"
27 #include "KDReportsUnit.h"
28 
29 template <typename T> class QList;
30 class QFont;
31 class QTextTableFormat;
32 class QTextCursor;
33 namespace KDReports {
34 class AbstractTableElementPrivate;
35 
40 class KDREPORTS_EXPORT AbstractTableElement : public Element
41 {
42 public:
43 
49  void setBorder( qreal border );
50 
54  qreal border() const;
55 
60  void setBorderBrush( const QBrush& brush );
61 
66  QBrush borderBrush() const;
67 
74  void setPadding( qreal padding );
75 
79  qreal padding() const;
80 
88  void setWidth( qreal width, Unit unit = Millimeters );
89 
95  qreal width() const;
96 
101  Unit unit() const;
102 
108  void setDefaultFont( const QFont& font );
109 
118  AbstractTableElement &operator=(const AbstractTableElement &other);
119 
120 protected:
125 
130 
134  void fillTableFormat( QTextTableFormat& tableFormat, QTextCursor& textDocCursor ) const;
135 
136 private:
137  AbstractTableElementPrivate* const d;
138 };
139 
140 }
141 
142 #endif /* KDREPORTSABSTRACTTABLEELEMENT_H */
143 
Unit
Definition: KDReportsUnit.h:32
Millimeters (the default)
Definition: KDReportsUnit.h:33
Definition: KDReportsAbstractTableElement.h:33
Definition: KDReportsElement.h:42
Definition: KDReportsAbstractTableElement.h:40
Definition: KDReportsAbstractTableElement.h:29

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