KD Reports
1.8
src
KDReports
KDReportsHeader.h
1
/****************************************************************************
2
** Copyright (C) 2007-2020 Klaralvdalens Datakonsult AB. All rights reserved.
3
**
4
** This file is part of the KD Reports library.
5
**
6
** Licensees holding valid commercial KD Reports licenses may use this file in
7
** accordance with the KD Reports Commercial License Agreement provided with
8
** the Software.
9
**
10
**
11
** This file may be distributed and/or modified under the terms of the
12
** GNU Lesser General Public License version 2.1 and version 3 as published by the
13
** Free Software Foundation and appearing in the file LICENSE.LGPL.txt included.
14
**
15
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
16
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17
**
18
** Contact info@kdab.com if any conditions of this licensing are not
19
** clear to you.
20
**
21
**********************************************************************/
22
23
#ifndef KDREPORTSHEADER_H
24
#define KDREPORTSHEADER_H
25
26
#include "KDReportsGlobal.h"
27
#include "KDReportsVariableType.h"
28
#include <QtCore/Qt>
29
#include <QTextOption>
30
31
QT_BEGIN_NAMESPACE
32
template
<
class
T>
class
QList
;
33
class
QFont;
34
class
QTextDocument;
35
class
HeaderData;
36
QT_END_NAMESPACE
37
38
namespace
KDReports
{
39
40
class
HeaderPrivate;
41
class
XmlParser;
42
class
Element;
43
class
HeaderMap;
44
class
Report;
45
class
ReportPrivate;
46
class
TextDocument;
47
54
class
KDREPORTS_EXPORT
Header
55
{
56
public
:
61
void
setDefaultFont
(
const
QFont& font );
62
67
QFont
defaultFont
()
const
;
68
72
void
addInlineElement
(
const
Element
& element );
73
78
void
addElement
(
const
Element
& element, Qt::AlignmentFlag horizontalAlignment = Qt::AlignLeft );
79
91
void
addVariable
(
VariableType
variable );
92
98
void
addVerticalSpacing
( qreal space );
99
108
void
setTabPositions
(
const
QList<QTextOption::Tab>
& tabs );
109
113
int
currentPosition()
const
;
114
115
private
:
116
friend
class
XmlParser;
117
friend
class
Report
;
118
friend
class
ReportPrivate;
119
explicit
Header
(
Report
* report );
120
~
Header
();
121
friend
class
Test;
122
friend
class
HeaderMap;
123
friend
class ::HeaderData;
124
TextDocument& doc();
125
void
preparePaintingPage(
int
pageNumber );
126
127
Q_DISABLE_COPY(
Header
)
128
129
HeaderPrivate*
const
d;
130
};
131
132
typedef
Header
Footer
;
133
134
}
135
136
#endif
/* KDREPORTSHEADER_H */
KDReports::Header::addElement
void addElement(const Element &element, Qt::AlignmentFlag horizontalAlignment=Qt::AlignLeft)
KDReports::Header::setTabPositions
void setTabPositions(const QList< QTextOption::Tab > &tabs)
QList
Definition:
KDReportsAbstractTableElement.h:30
KDReports::Element
Definition:
KDReportsElement.h:46
KDReports::Report
Definition:
KDReportsReport.h:110
KDReports::Header::addInlineElement
void addInlineElement(const Element &element)
KDReports::Header::defaultFont
QFont defaultFont() const
KDReports::Header::addVerticalSpacing
void addVerticalSpacing(qreal space)
KDReports::Header::setDefaultFont
void setDefaultFont(const QFont &font)
KDReports::VariableType
VariableType
Definition:
KDReportsVariableType.h:35
KDReports::Header
Definition:
KDReportsHeader.h:55
KDReports::Header::addVariable
void addVariable(VariableType variable)
KDReports
Definition:
KDReportsAbstractTableElement.h:36
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/