KD Reports  1.8
KDReportsFrame.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 KDREPORTSFRAME_H
24 #define KDREPORTSFRAME_H
25 
26 #include "KDReportsElement.h"
27 #include "KDReportsUnit.h"
28 #include "KDReportsVariableType.h"
29 #include <QtCore/Qt>
30 #include <QMap>
31 #include <QPair>
32 
33 namespace KDReports
34 {
35 class ReportBuilder;
36 class Element;
37 class FramePrivate;
38 
44 class KDREPORTS_EXPORT Frame : public Element
45 {
46 public:
50  explicit Frame();
54  virtual ~Frame();
55 
60  Frame(const Frame &other);
64  Frame &operator=(const Frame &other);
65 
69  void setWidth( qreal width, Unit unit = Millimeters );
73  void setHeight( qreal height, Unit unit = Millimeters );
74 
81  void setPadding( qreal padding );
82 
86  qreal padding() const;
87 
93  void setBorder( qreal border );
94 
98  qreal border() const;
99 
103  void addInlineElement( const Element& element );
104 
109  void addElement( const Element& element, Qt::AlignmentFlag horizontalAlignment = Qt::AlignLeft );
110 
115  void addVariable( VariableType variable );
116 
121  void build( ReportBuilder& builder ) const;
122 
127  Element* clone() const;
128 
129 private:
130 
131  FramePrivate* const d;
132 };
133 
134 }
135 
136 #endif /* KDREPORTSFRAME_H */
Unit
Definition: KDReportsUnit.h:32
VariableType
Definition: KDReportsVariableType.h:35
Definition: KDReportsFrame.h:44
Millimeters (the default)
Definition: KDReportsUnit.h:33
Definition: KDReportsAbstractTableElement.h:36
Definition: KDReportsElement.h:45

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/