KD Reports API Documentation  2.2
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 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6 **
7 ** SPDX-License-Identifier: MIT
8 **
9 ****************************************************************************/
10 
11 #ifndef KDREPORTSHEADER_P_H
12 #define KDREPORTSHEADER_P_H
13 
14 //
15 // W A R N I N G
16 // -------------
17 //
18 // This file is not part of the KD Reports API. It exists purely as an
19 // implementation detail. This header file may change from version to
20 // version without notice, or even be removed.
21 //
22 // We mean it.
23 //
24 
25 #include "KDReportsHeader.h"
26 #include "KDReportsReport.h"
28 #include "KDReportsReport_p.h"
30 
31 namespace KDReports {
32 
36 void setVariableMarker(QTextDocument &textDoc, int pos, KDReports::VariableType variableType, int valueLength);
40 QString variableValue(int pageNumber, KDReports::Report *report, VariableType type);
44 void cleanupVariableProperties(QTextCharFormat &charFormat);
45 
50 {
51 public:
54  {
55  }
56 
57  /*reimp*/ void addInlineElement(const KDReports::Element &element) override
58  {
60  report()->d->headerChanged();
61  }
62  /*reimp*/ void addBlockElement(const KDReports::Element &element, Qt::AlignmentFlag horizontalAlignment, const QColor &background = QColor()) override
63  {
64  ReportBuilder::addBlockElement(element, horizontalAlignment, background);
65  report()->d->headerChanged();
66  }
67  /*reimp*/ void addVerticalSpacing(qreal space) override
68  {
70  report()->d->headerChanged();
71  }
72 };
73 
78 {
79 public:
80  explicit HeaderPrivate(KDReports::Report *report)
81  : m_textDocument()
82  , m_builder(m_textDocument.contentDocumentData(), QTextCursor(&m_textDocument.contentDocument()), report)
83  , m_report(report)
84  {
85  }
89 };
90 
91 }
92 
93 #endif /* KDREPORTSHEADER_P_H */
#define REPORTBUILDER_CTOR_ARGNAMES
#define REPORTBUILDER_CTOR_ARGDEFS
KDReports::TextDocument m_textDocument
KDReports::HeaderReportBuilder m_builder
HeaderPrivate(KDReports::Report *report)
KDReports::Report * m_report
void addVerticalSpacing(qreal space) override
void addBlockElement(const KDReports::Element &element, Qt::AlignmentFlag horizontalAlignment, const QColor &background=QColor()) override
void addInlineElement(const KDReports::Element &element) override
HeaderReportBuilder(REPORTBUILDER_CTOR_ARGDEFS)
virtual void addVerticalSpacing(qreal space)
virtual void addBlockElement(const Element &element, Qt::AlignmentFlag horizontalAlignment, const QColor &backgroundColor=QColor())
virtual void addInlineElement(const Element &element)
QString variableValue(int pageNumber, KDReports::Report *report, VariableType type)
void setVariableMarker(QTextDocument &textDoc, int pos, KDReports::VariableType variableType, int valueLength)
void cleanupVariableProperties(QTextCharFormat &charFormat)

© 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