KD Reports API Documentation 2.2
Loading...
Searching...
No Matches
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"
16#include <QMap>
17#include <QPair>
18#include <QtCore/Qt>
19#include <memory>
20
21QT_BEGIN_NAMESPACE
23QT_END_NAMESPACE
24
25namespace KDReports {
26class ReportBuilder;
27class Element;
28class TableElement;
29class CellPrivate;
30
36class KDREPORTS_EXPORT Cell final : public Element
37{
38public:
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
139private:
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 */
#define KDREPORTS_EXPORT
std::function< void(int, int, QTextTableCellFormat &)> CellFormatFunc
Element * clone() const override
AlignmentFlag

© 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