KD Reports  1.8
KDReportsAbstractTableElement.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 KDREPORTSABSTRACTTABLEELEMENT_H
24 #define KDREPORTSABSTRACTTABLEELEMENT_H
25 
26 #include "KDReportsElement.h"
27 #include "KDReportsUnit.h"
28 
29 QT_BEGIN_NAMESPACE
30 template <typename T> class QList;
31 class QFont;
32 class QTextTableFormat;
33 class QTextCursor;
34 QT_END_NAMESPACE
35 
36 namespace KDReports {
37 class AbstractTableElementPrivate;
38 
43 class KDREPORTS_EXPORT AbstractTableElement : public Element
44 {
45 public:
46 
52  void setBorder( qreal border );
53 
57  qreal border() const;
58 
63  void setBorderBrush( const QBrush& brush );
64 
69  QBrush borderBrush() const;
70 
77  void setPadding( qreal padding );
78 
82  qreal padding() const;
83 
91  void setWidth( qreal width, Unit unit = Millimeters );
92 
98  qreal width() const;
99 
104  Unit unit() const;
105 
111  void setDefaultFont( const QFont& font );
112 
118  QFont defaultFont( bool *isSet ) const;
119 
129 
130 protected:
135 
140 
144  void fillTableFormat( QTextTableFormat& tableFormat, QTextCursor& textDocCursor ) const;
145 
146 private:
147  AbstractTableElementPrivate* const d;
148 };
149 
150 }
151 
152 #endif /* KDREPORTSABSTRACTTABLEELEMENT_H */
153 
KDReports::AbstractTableElement::setWidth
void setWidth(qreal width, Unit unit=Millimeters)
KDReports::AbstractTableElement::setBorder
void setBorder(qreal border)
KDReports::AbstractTableElement::unit
Unit unit() const
KDReports::AbstractTableElement::~AbstractTableElement
~AbstractTableElement()
KDReports::AbstractTableElement::AbstractTableElement
AbstractTableElement(const AbstractTableElement &other)
KDReports::Millimeters
@ Millimeters
Millimeters (the default)
Definition: KDReportsUnit.h:33
QList
Definition: KDReportsAbstractTableElement.h:30
KDReports::AbstractTableElement::border
qreal border() const
KDReports::Element
Definition: KDReportsElement.h:46
KDReports::AbstractTableElement::width
qreal width() const
KDReports::AbstractTableElement::operator=
AbstractTableElement & operator=(const AbstractTableElement &other)
KDReports::Unit
Unit
Definition: KDReportsUnit.h:32
KDReports::AbstractTableElement::setPadding
void setPadding(qreal padding)
KDReports::AbstractTableElement::padding
qreal padding() const
KDReports::AbstractTableElement::setDefaultFont
void setDefaultFont(const QFont &font)
KDReports::AbstractTableElement::defaultFont
QFont defaultFont(bool *isSet) const
KDReports::AbstractTableElement::borderBrush
QBrush borderBrush() const
KDReports::AbstractTableElement
Definition: KDReportsAbstractTableElement.h:44
KDReports::AbstractTableElement::setBorderBrush
void setBorderBrush(const QBrush &brush)
KDReports::AbstractTableElement::AbstractTableElement
AbstractTableElement()
KDReports
Definition: KDReportsAbstractTableElement.h:36

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/