KD Reports API Documentation  2.0
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 
25 QT_BEGIN_NAMESPACE
26 template <class T>
27 class QList;
28 class QFont;
29 class QTextDocument;
30 class HeaderData;
31 QT_END_NAMESPACE
32 
33 namespace KDReports {
34 
35 class HeaderPrivate;
36 class XmlParser;
37 class Element;
38 class HeaderMap;
39 class Report;
40 class ReportPrivate;
41 class TextDocument;
42 
50 {
51 public:
56  void setDefaultFont(const QFont &font);
57 
62  QFont defaultFont() const;
63 
67  void addInlineElement(const Element &element);
68 
73  void addElement(const Element &element, Qt::AlignmentFlag horizontalAlignment = Qt::AlignLeft);
74 
86  void addVariable(VariableType variable);
87 
93  void addVerticalSpacing(qreal space);
94 
103  void setTabPositions(const QList<QTextOption::Tab> &tabs);
104 
108  int currentPosition() const;
109 
110 private:
111  friend class XmlParser;
112  friend class Report;
113  friend class ReportPrivate;
114  explicit Header(Report *report);
115  ~Header();
116  friend class Test;
117  friend class HeaderMap;
118  friend class ::HeaderData;
119  TextDocument &doc();
120  void preparePaintingPage(int pageNumber);
121 
122  Q_DISABLE_COPY(Header)
123 
124  HeaderPrivate *const d;
125 };
126 
127 typedef Header Footer;
128 
129 }
130 
131 #endif /* KDREPORTSHEADER_H */
KDReports::XmlParser
Definition: KDReportsXmlParser_p.h:52
KDReportsVariableType.h
QList
Definition: KDReportsAbstractTableElement.h:25
KDReports::HeaderMap
Definition: KDReportsReport_p.h:66
KDReports::HeaderPrivate
Definition: KDReportsHeader_p.h:97
KDReports::Element
Definition: KDReportsElement.h:39
KDReports::ReportPrivate
Definition: KDReportsReport_p.h:107
KDReports::Report
Definition: KDReportsReport.h:80
KDReports::TextDocument
Definition: KDReportsTextDocument_p.h:55
KDReportsGlobal.h
KDReports::VariableType
VariableType
Definition: KDReportsVariableType.h:29
KDREPORTS_EXPORT
#define KDREPORTS_EXPORT
Definition: KDReportsGlobal.h:29
KDReports::Header
Definition: KDReportsHeader.h:49
KDReports::Footer
Header Footer
Definition: KDReportsHeader.h:127
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 Sat Jan 8 2022 02:38:32 for KD Reports API Documentation by doxygen 1.8.17