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 */
KDReports::Frame::operator=
Frame & operator=(const Frame &other)
KDReports::Frame::Frame
Frame()
KDReports::Frame::padding
qreal padding() const
KDReports::Millimeters
@ Millimeters
Millimeters (the default)
Definition: KDReportsUnit.h:33
KDReports::Frame::Frame
Frame(const Frame &other)
KDReports::Element
Definition: KDReportsElement.h:46
KDReports::Frame::~Frame
virtual ~Frame()
KDReports::Frame::setHeight
void setHeight(qreal height, Unit unit=Millimeters)
KDReports::Unit
Unit
Definition: KDReportsUnit.h:32
KDReports::Frame::addElement
void addElement(const Element &element, Qt::AlignmentFlag horizontalAlignment=Qt::AlignLeft)
KDReports::Frame::border
qreal border() const
KDReports::Frame::addInlineElement
void addInlineElement(const Element &element)
KDReports::Frame::setPadding
void setPadding(qreal padding)
KDReports::Frame
Definition: KDReportsFrame.h:45
KDReports::Frame::addVariable
void addVariable(VariableType variable)
KDReports::Frame::setBorder
void setBorder(qreal border)
KDReports::VariableType
VariableType
Definition: KDReportsVariableType.h:35
KDReports::Frame::setWidth
void setWidth(qreal width, Unit unit=Millimeters)
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/