KD Reports API Documentation  2.1
KDReportsHeader.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-2022 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 KDREPORTSHEADER_H
18 #define KDREPORTSHEADER_H
19 
20 #include "KDReportsGlobal.h"
21 #include "KDReportsVariableType.h"
22 #include <QTextOption>
23 #include <QtCore/Qt>
24 #include <memory>
25 
26 QT_BEGIN_NAMESPACE
27 template <class T>
28 class QList;
29 class QFont;
30 class QTextDocument;
31 class HeaderData;
32 QT_END_NAMESPACE
33 
34 namespace KDReports {
35 
36 class HeaderPrivate;
37 class XmlParser;
38 class Element;
39 class HeaderMap;
40 class Report;
41 class ReportPrivate;
42 class TextDocument;
43 
51 {
52 public:
57  void setDefaultFont(const QFont &font);
58 
63  QFont defaultFont() const;
64 
68  void addInlineElement(const Element &element);
69 
74  void addElement(const Element &element, Qt::AlignmentFlag horizontalAlignment = Qt::AlignLeft);
75 
87  void addVariable(VariableType variable);
88 
94  void addVerticalSpacing(qreal space);
95 
104  void setTabPositions(const QList<QTextOption::Tab> &tabs);
105 
109  int currentPosition() const;
110 
111 private:
112  friend class XmlParser;
113  friend class Report;
114  friend class ReportPrivate;
115  explicit Header(Report *report);
116  ~Header();
117  friend class Test;
118  friend class HeaderMap;
119  friend class ::HeaderData;
120  TextDocument &doc();
121  void preparePaintingPage(int pageNumber);
122 
123  Q_DISABLE_COPY(Header)
124 
125  std::unique_ptr<HeaderPrivate> d;
126 };
127 
128 typedef Header Footer;
129 
130 }
131 
132 #endif /* KDREPORTSHEADER_H */
QTextDocument
Qt::AlignmentFlag
AlignmentFlag
KDReports::XmlParser
Definition: KDReportsXmlParser_p.h:53
KDReportsVariableType.h
KDReports::HeaderMap
Definition: KDReportsReport_p.h:53
QList
KDReports::Element
Definition: KDReportsElement.h:41
KDReports::ReportPrivate
Definition: KDReportsReport_p.h:94
KDReports::Report
Definition: KDReportsReport.h:81
KDReports::TextDocument
Definition: KDReportsTextDocument_p.h:56
KDReportsGlobal.h
KDReports::VariableType
VariableType
Definition: KDReportsVariableType.h:29
KDREPORTS_EXPORT
#define KDREPORTS_EXPORT
Definition: KDReportsGlobal.h:29
KDReports::Header
Definition: KDReportsHeader.h:51
QFont
KDReports::Footer
Header Footer
Definition: KDReportsHeader.h:128
KDReports
Definition: KDReportsAbstractReportLayout_p.h:30

© 2007-2021 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 on Fri Jul 15 2022 13:09:06 for KD Reports API Documentation by doxygen 1.8.20