KD Reports API Documentation
2.2
src
KDReports
KDReportsTextDocument_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 KDREPORTSTEXTDOCUMENT_H
12
#define KDREPORTSTEXTDOCUMENT_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
26
#include "
KDReportsAutoTableElement.h
"
27
#include "
KDReportsGlobal.h
"
28
#include "
KDReportsReport.h
"
29
#include "
KDReportsTextDocumentData_p.h
"
30
#include <QFont>
31
#include <QMap>
32
#include <QTextCursor>
33
#include <QTextDocument>
34
#include <QTextFormat>
35
36
QT_BEGIN_NAMESPACE
37
class
QTextImageFormat;
38
class
QTextTable;
39
QT_END_NAMESPACE
40
41
namespace
KDReports
{
42
enum
43
{
44
HeaderColumnsProperty
= QTextFormat::UserProperty + 248
45
};
46
52
class
KDREPORTS_EXPORT
TextDocument
53
{
54
public
:
55
explicit
TextDocument
();
56
~
TextDocument
();
57
58
// like QTextDocument::setTextWidth but also takes care of objects with % sizes
59
void
layoutWithTextWidth(qreal w);
60
61
// like QTextDocument::setPageSize but also takes care of objects with % sizes
62
void
setPageSize(QSizeF size);
63
64
#if 0
65
// add user property to char format
66
void
setMarker(
int
pos,
int
propertyId,
const
QVariant& value );
67
#endif
68
69
void
regenerateAutoTables
();
70
void
regenerateAutoTableForModel
(QAbstractItemModel *model);
71
72
void
updateTextValue(
const
QString &
id
,
const
QString &newValue);
73
74
void
scaleFontsBy(qreal factor);
75
76
QFont defaultFont()
const
;
77
QTextDocument &contentDocument();
78
TextDocumentData
&contentDocumentData();
79
80
QList<KDReports::AutoTableElement *>
autoTableElements
();
81
82
QString
asHtml
()
const
;
83
void
preciseDump();
84
85
private
:
86
TextDocumentData
m_contentDocument;
87
};
88
89
}
90
91
#endif
/* KDREPORTSTEXTDOCUMENT_H */
KDReportsAutoTableElement.h
KDReportsGlobal.h
KDREPORTS_EXPORT
#define KDREPORTS_EXPORT
Definition:
KDReportsGlobal.h:23
KDReportsReport.h
KDReportsTextDocumentData_p.h
KDReports::TextDocumentData
Definition:
KDReportsTextDocumentData_p.h:38
KDReports::TextDocument
Definition:
KDReportsTextDocument_p.h:53
KDReports::TextDocument::asHtml
QString asHtml() const
KDReports::TextDocument::regenerateAutoTables
void regenerateAutoTables()
KDReports::TextDocument::autoTableElements
QList< KDReports::AutoTableElement * > autoTableElements()
KDReports::TextDocument::regenerateAutoTableForModel
void regenerateAutoTableForModel(QAbstractItemModel *model)
QList
Definition:
KDReportsAbstractTableElement.h:19
KDReports
Definition:
KDReportsAbstractReportLayout_p.h:24
KDReports::HeaderColumnsProperty
@ HeaderColumnsProperty
Definition:
KDReportsTextDocument_p.h:44
© 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