KD Reports
1.6
Main Page
Related Pages
Namespaces
Classes
Files
File List
All
Classes
Namespaces
Functions
Enumerations
Enumerator
Pages
src
KDReports
KDReportsHeader.h
1
/****************************************************************************
2
** Copyright (C) 2007-2015 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
template
<
class
T>
class
QList
;
32
class
QFont;
33
class
QTextDocument;
34
class
HeaderData;
35
36
namespace
KDReports {
37
38
class
XmlParser;
39
class
Element;
40
class
HeaderMap;
41
class
Report;
42
class
ReportPrivate;
43
class
TextDocument;
44
51
class
KDREPORTS_EXPORT
Header
52
{
53
public
:
58
void
setDefaultFont(
const
QFont& font );
59
64
QFont defaultFont()
const
;
65
69
void
addInlineElement(
const
Element
& element );
70
75
void
addElement(
const
Element
& element, Qt::AlignmentFlag horizontalAlignment = Qt::AlignLeft );
76
88
void
addVariable(
VariableType
variable );
89
95
void
addVerticalSpacing( qreal space );
96
105
void
setTabPositions(
const
QList<QTextOption::Tab>
& tabs );
106
110
int
currentPosition()
const
;
111
112
private
:
113
friend
class
XmlParser;
114
friend
class
Report
;
115
friend
class
ReportPrivate;
116
explicit
Header
(
Report
* report );
117
~
Header
();
118
friend
class
Test;
119
friend
class
HeaderMap;
120
friend
class ::HeaderData;
121
TextDocument& doc();
122
void
preparePaintingPage(
int
pageNumber );
123
124
Q_DISABLE_COPY(
Header
)
125
126
class
Private;
127
Private*
const
d;
128
};
129
130
typedef
Header
Footer
;
131
132
}
133
134
#endif
/* KDREPORTSHEADER_H */
Klarälvdalens Datakonsult AB (KDAB)
Qt-related services and products
http://www.kdab.com/
http://www.kdab.com/products/kd-reports/