KD Reports API Documentation  2.1
KDReportsHeader_p.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_P_H
18 #define KDREPORTSHEADER_P_H
19 
20 //
21 // W A R N I N G
22 // -------------
23 //
24 // This file is not part of the KD Reports API. It exists purely as an
25 // implementation detail. This header file may change from version to
26 // version without notice, or even be removed.
27 //
28 // We mean it.
29 //
30 
31 #include "KDReportsHeader.h"
32 #include "KDReportsReport.h"
34 #include "KDReportsReport_p.h"
36 
37 namespace KDReports {
38 
42 void setVariableMarker(QTextDocument &textDoc, int pos, KDReports::VariableType variableType, int valueLength);
46 QString variableValue(int pageNumber, KDReports::Report *report, VariableType type);
51 
56 {
57 public:
60  {
61  }
62 
63  /*reimp*/ void addInlineElement(const KDReports::Element &element) override
64  {
66  report()->d->headerChanged();
67  }
68  /*reimp*/ void addBlockElement(const KDReports::Element &element, Qt::AlignmentFlag horizontalAlignment, const QColor &background = QColor()) override
69  {
70  ReportBuilder::addBlockElement(element, horizontalAlignment, background);
71  report()->d->headerChanged();
72  }
73  /*reimp*/ void addVerticalSpacing(qreal space) override
74  {
76  report()->d->headerChanged();
77  }
78 };
79 
84 {
85 public:
86  explicit HeaderPrivate(KDReports::Report *report)
87  : m_textDocument()
88  , m_builder(m_textDocument.contentDocumentData(), QTextCursor(&m_textDocument.contentDocument()), report)
89  , m_report(report)
90  {
91  }
95 };
96 
97 }
98 
99 #endif /* KDREPORTSHEADER_P_H */
KDReports::HeaderReportBuilder::HeaderReportBuilder
HeaderReportBuilder(REPORTBUILDER_CTOR_ARGDEFS)
Definition: KDReportsHeader_p.h:58
QTextDocument
QColor
KDReports::HeaderReportBuilder::addVerticalSpacing
void addVerticalSpacing(qreal space) override
Definition: KDReportsHeader_p.h:73
Qt::AlignmentFlag
AlignmentFlag
KDReports::ReportBuilder
Definition: KDReportsReportBuilder_p.h:42
REPORTBUILDER_CTOR_ARGNAMES
#define REPORTBUILDER_CTOR_ARGNAMES
Definition: KDReportsReportBuilder_p.h:36
KDReports::ReportBuilder::report
Report * report()
Definition: KDReportsReportBuilder_p.h:53
QTextCharFormat
KDReports::HeaderReportBuilder::addInlineElement
void addInlineElement(const KDReports::Element &element) override
Definition: KDReportsHeader_p.h:63
KDReports::cleanupVariableProperties
void cleanupVariableProperties(QTextCharFormat &charFormat)
Definition: KDReportsHeader.cpp:107
KDReports::HeaderPrivate::HeaderPrivate
HeaderPrivate(KDReports::Report *report)
Definition: KDReportsHeader_p.h:86
KDReports::HeaderReportBuilder
Definition: KDReportsHeader_p.h:56
KDReportsReport_p.h
KDReportsTextDocument_p.h
KDReports::HeaderPrivate
Definition: KDReportsHeader_p.h:84
KDReports::HeaderReportBuilder::addBlockElement
void addBlockElement(const KDReports::Element &element, Qt::AlignmentFlag horizontalAlignment, const QColor &background=QColor()) override
Definition: KDReportsHeader_p.h:68
KDReports::Element
Definition: KDReportsElement.h:41
KDReports::Report
Definition: KDReportsReport.h:81
KDReports::TextDocument
Definition: KDReportsTextDocument_p.h:56
QString
KDReportsReport.h
KDReportsHeader.h
KDReports::HeaderPrivate::m_textDocument
KDReports::TextDocument m_textDocument
Definition: KDReportsHeader_p.h:92
KDReports::setVariableMarker
void setVariableMarker(QTextDocument &textDoc, int pos, KDReports::VariableType variableType, int valueLength)
Definition: KDReportsHeader.cpp:95
KDReportsReportBuilder_p.h
KDReports::ReportBuilder::addInlineElement
virtual void addInlineElement(const Element &element)
Definition: KDReportsReportBuilder.cpp:34
KDReports::ReportBuilder::addVerticalSpacing
virtual void addVerticalSpacing(qreal space)
Definition: KDReportsReportBuilder.cpp:113
REPORTBUILDER_CTOR_ARGDEFS
#define REPORTBUILDER_CTOR_ARGDEFS
Definition: KDReportsReportBuilder_p.h:34
KDReports::variableValue
QString variableValue(int pageNumber, KDReports::Report *report, VariableType type)
Definition: KDReportsHeader.cpp:62
KDReports::ReportBuilder::addBlockElement
virtual void addBlockElement(const Element &element, Qt::AlignmentFlag horizontalAlignment, const QColor &backgroundColor=QColor())
Definition: KDReportsReportBuilder.cpp:48
KDReports::HeaderPrivate::m_builder
KDReports::HeaderReportBuilder m_builder
Definition: KDReportsHeader_p.h:93
KDReports::HeaderPrivate::m_report
KDReports::Report * m_report
Definition: KDReportsHeader_p.h:94
KDReports::VariableType
VariableType
Definition: KDReportsVariableType.h:29
QTextCursor
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