KD Reports API Documentation  2.2
KDReportsFrame.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** This file is part of the KD Reports library.
4 **
5 ** SPDX-FileCopyrightText: 2007 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6 **
7 ** SPDX-License-Identifier: MIT
8 **
9 ****************************************************************************/
10 
11 #ifndef KDREPORTSFRAME_H
12 #define KDREPORTSFRAME_H
13 
14 #include "KDReportsElement.h"
15 #include "KDReportsUnit.h"
16 #include "KDReportsVariableType.h"
17 #include <QMap>
18 #include <QPair>
19 #include <QtCore/Qt>
20 
21 namespace KDReports {
22 class ReportBuilder;
23 class Element;
24 class FramePrivate;
25 
32 {
33 public:
37  explicit Frame();
41  ~Frame() override;
42 
47  Frame(const Frame &other);
51  Frame &operator=(const Frame &other);
52 
56  void setWidth(qreal width, Unit unit = Millimeters);
60  void setHeight(qreal height, Unit unit = Millimeters);
61 
68  void setPadding(qreal padding);
69 
73  qreal padding() const;
74 
80  void setBorder(qreal border);
81 
85  qreal border() const;
86 
87  enum Position
88  {
92  };
97  void setPosition(Position pos);
98 
103  Position position() const;
104 
108  void addInlineElement(const Element &element);
109 
114  void addElement(const Element &element, Qt::AlignmentFlag horizontalAlignment = Qt::AlignLeft);
115 
120  void addVariable(VariableType variable);
121 
126  void build(ReportBuilder &builder) const override;
127 
132  Element *clone() const override;
133 
134 private:
135  std::unique_ptr<FramePrivate> d;
136 };
137 
138 }
139 
140 #endif /* KDREPORTSFRAME_H */
#define KDREPORTS_EXPORT
@ FloatLeft
The frame floats on the left side of the text.
@ FloatRight
The frame floats on the right side of the text.
@ InFlow
The frame is part of the flow of the paragraph (default)
@ Millimeters
Millimeters (the default)
Definition: KDReportsUnit.h:21

© 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/
Generated by doxygen 1.9.1