KD Reports API Documentation
2.2
Loading...
Searching...
No Matches
source
src
KDReports
KDReportsCell.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 KDREPORTSCELL_H
12
#define KDREPORTSCELL_H
13
14
#include "
KDReportsElement.h
"
15
#include "
KDReportsVariableType.h
"
16
#include <QMap>
17
#include <QPair>
18
#include <QtCore/Qt>
19
#include <memory>
20
21
QT_BEGIN_NAMESPACE
22
class
QTextTableCellFormat
;
23
QT_END_NAMESPACE
24
25
namespace
KDReports
{
26
class
ReportBuilder;
27
class
Element;
28
class
TableElement;
29
class
CellPrivate;
30
36
class
KDREPORTS_EXPORT
Cell
final :
public
Element
37
{
38
public
:
43
void
setColumnSpan(
int
columnSpan);
47
int
columnSpan()
const
;
48
53
void
setRowSpan(
int
rowSpan);
57
int
rowSpan()
const
;
58
62
void
addInlineElement(
const
Element
&element);
63
68
void
addElement(
const
Element
&element,
Qt::AlignmentFlag
horizontalAlignment =
Qt::AlignLeft
);
69
74
void
addVariable(
VariableType
variable);
75
82
void
addVerticalSpacing(qreal space);
83
88
void
setVerticalAlignment(
Qt::AlignmentFlag
verticalAlignment);
93
Qt::AlignmentFlag
verticalAlignment()
const
;
94
95
using
CellFormatFunc
= std::function<void(
int
/*row*/
,
int
/*column*/
,
QTextTableCellFormat
&)>;
96
103
void
setCellFormatFunction(
const
CellFormatFunc
&func);
104
109
CellFormatFunc
cellFormatFunction()
const
;
110
115
void
build(
ReportBuilder
&builder)
const override
;
116
120
Element
*
clone
() const override
// krazy:exclude=inline
121
{
122
return
nullptr
;
123
}
124
128
~Cell
()
override
;
// public for QMap
129
133
Cell
(
const
Cell
&other);
// public for QMap
137
Cell
&operator=(
const
Cell
&other);
// public for QMap
138
139
private
:
140
friend
class
TableElement
;
141
friend
class
QMap
<
QPair
<int, int>,
Cell
>;
142
Cell
();
143
144
std::unique_ptr<CellPrivate> d;
145
};
146
147
}
148
149
#endif
/* KDREPORTSCELL_H */
KDReportsElement.h
KDREPORTS_EXPORT
#define KDREPORTS_EXPORT
Definition
KDReportsGlobal.h:23
KDReportsVariableType.h
KDReports::Cell
Definition
KDReportsCell.h:37
KDReports::Cell::CellFormatFunc
std::function< void(int, int, QTextTableCellFormat &)> CellFormatFunc
Definition
KDReportsCell.h:95
KDReports::Cell::clone
Element * clone() const override
Definition
KDReportsCell.h:120
KDReports::Element
Definition
KDReportsElement.h:35
KDReports::ReportBuilder
Definition
KDReportsReportBuilder_p.h:36
KDReports::TableElement
Definition
KDReportsTableElement.h:27
KDReports
Definition
KDReportsAbstractReportLayout_p.h:24
KDReports::VariableType
VariableType
Definition
KDReportsVariableType.h:24
QMap
QPair
Qt::AlignmentFlag
AlignmentFlag
QTextTableCellFormat
© 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 May 17 2024 00:04:15 for KD Reports API Documentation by doxygen 1.9.8