KD Reports  1.9
KDReportsFrame.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 KDREPORTSFRAME_H
18 #define KDREPORTSFRAME_H
19 
20 #include "KDReportsElement.h"
21 #include "KDReportsUnit.h"
22 #include "KDReportsVariableType.h"
23 #include <QtCore/Qt>
24 #include <QMap>
25 #include <QPair>
26 
27 namespace KDReports
28 {
29 class ReportBuilder;
30 class Element;
31 class FramePrivate;
32 
38 class KDREPORTS_EXPORT Frame : public Element
39 {
40 public:
44  explicit Frame();
48  ~Frame() override;
49 
54  Frame(const Frame &other);
58  Frame &operator=(const Frame &other);
59 
63  void setWidth( qreal width, Unit unit = Millimeters );
67  void setHeight( qreal height, Unit unit = Millimeters );
68 
75  void setPadding( qreal padding );
76 
80  qreal padding() const;
81 
87  void setBorder( qreal border );
88 
92  qreal border() const;
93 
97  void addInlineElement( const Element& element );
98 
103  void addElement( const Element& element, Qt::AlignmentFlag horizontalAlignment = Qt::AlignLeft );
104 
109  void addVariable( VariableType variable );
110 
115  void build( ReportBuilder& builder ) const override;
116 
121  Element* clone() const override;
122 
123 private:
124 
125  FramePrivate* const d;
126 };
127 
128 }
129 
130 #endif /* KDREPORTSFRAME_H */
Unit
Definition: KDReportsUnit.h:26
VariableType
Definition: KDReportsVariableType.h:29
Definition: KDReportsFrame.h:38
Millimeters (the default)
Definition: KDReportsUnit.h:27
Definition: KDReportsAbstractTableElement.h:30
Definition: KDReportsElement.h:39

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/