KD Reports API Documentation  2.1
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-2022 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6 **
7 ** SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDAB-KDReports OR LicenseRef-KDAB-KDReports-US
8 **
9 ** Licensees holding valid commercial KD Reports licenses may use this file in
10 ** accordance with the KD Reports Commercial License Agreement provided with
11 ** the Software.
12 **
13 ** Contact info@kdab.com if any conditions of this licensing are not clear to you.
14 **
15 ****************************************************************************/
16 
17 #ifndef KDREPORTSCELL_H
18 #define KDREPORTSCELL_H
19 
20 #include "KDReportsElement.h"
21 #include "KDReportsVariableType.h"
22 #include <QMap>
23 #include <QPair>
24 #include <QtCore/Qt>
25 #include <memory>
26 
27 namespace KDReports {
28 class ReportBuilder;
29 class Element;
30 class CellContentMap;
31 class TableElement;
32 class CellPrivate;
33 
39 class KDREPORTS_EXPORT Cell final : public Element
40 {
41 public:
46  void setColumnSpan(int columnSpan);
50  int columnSpan() const;
51 
56  void setRowSpan(int rowSpan);
60  int rowSpan() const;
61 
65  void addInlineElement(const Element &element);
66 
71  void addElement(const Element &element, Qt::AlignmentFlag horizontalAlignment = Qt::AlignLeft);
72 
77  void addVariable(VariableType variable);
78 
83  void build(ReportBuilder &builder) const override;
84 
88  Element *clone() const override { return nullptr; } // krazy:exclude=inline
89 
93  ~Cell() override; // public for QMap
94 
98  Cell(const Cell &other); // public for QMap
102  Cell &operator=(const Cell &other); // public for QMap
103 
104 private:
105  friend class TableElement;
106  friend class QMap<QPair<int, int>, Cell>;
107  Cell();
108 
109  std::unique_ptr<CellPrivate> d;
110 };
111 
112 }
113 
114 #endif /* KDREPORTSCELL_H */
KDReports::Cell::clone
Element * clone() const override
Definition: KDReportsCell.h:88
Qt::AlignmentFlag
AlignmentFlag
KDReports::ReportBuilder
Definition: KDReportsReportBuilder_p.h:42
KDReportsVariableType.h
KDReports::Element
Definition: KDReportsElement.h:41
KDReports::TableElement
Definition: KDReportsTableElement.h:33
KDReportsElement.h
KDReports::Cell
Definition: KDReportsCell.h:40
QMap
KDReports::VariableType
VariableType
Definition: KDReportsVariableType.h:29
KDREPORTS_EXPORT
#define KDREPORTS_EXPORT
Definition: KDReportsGlobal.h:29
QPair
KDReports
Definition: KDReportsAbstractReportLayout_p.h:30

© 2007-2021 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 Jul 15 2022 13:09:06 for KD Reports API Documentation by doxygen 1.8.20