KD Reports API Documentation 2.2
Loading...
Searching...
No Matches
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 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6**
7** SPDX-License-Identifier: MIT
8**
9****************************************************************************/
10
11#ifndef KDREPORTSHEADER_H
12#define KDREPORTSHEADER_H
13
14#include "KDReportsGlobal.h"
16#include <QTextOption>
17#include <QtCore/Qt>
18#include <memory>
19
20QT_BEGIN_NAMESPACE
21template<class T>
22class QList;
23class QFont;
24class QTextDocument;
25class HeaderData;
26QT_END_NAMESPACE
27
28namespace KDReports {
29
30class HeaderPrivate;
31class XmlParser;
32class Element;
33class HeaderMap;
34class Report;
35class ReportPrivate;
36class TextDocument;
37
44class KDREPORTS_EXPORT Header
45{
46public:
51 void setDefaultFont(const QFont &font);
52
57 QFont defaultFont() const;
58
62 void addInlineElement(const Element &element);
63
68 void addElement(const Element &element, Qt::AlignmentFlag horizontalAlignment = Qt::AlignLeft);
69
81 void addVariable(VariableType variable);
82
88 void addVerticalSpacing(qreal space);
89
98 void setTabPositions(const QList<QTextOption::Tab> &tabs);
99
103 int currentPosition() const;
104
105private:
106 friend class XmlParser;
107 friend class Report;
108 friend class ReportPrivate;
109 explicit Header(Report *report);
110 ~Header();
111 friend class Test;
112 friend class HeaderMap;
113 friend class ::HeaderData;
114 TextDocument &doc();
115 void preparePaintingPage(int pageNumber);
116
117 Q_DISABLE_COPY(Header)
118
119 std::unique_ptr<HeaderPrivate> d;
120};
121
122typedef Header Footer;
123
124}
125
126#endif /* KDREPORTSHEADER_H */
#define KDREPORTS_EXPORT
AlignmentFlag

© 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 Wed Apr 24 2024 04:08:14 for KD Reports API Documentation by doxygen 1.9.8