KD Reports API Documentation  2.0
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 
26 namespace KDReports {
27 class ReportBuilder;
28 class Element;
29 class CellContentMap;
30 class TableElement;
31 class CellPrivate;
32 
38 class KDREPORTS_EXPORT Cell final : public Element
39 {
40 public:
45  void setColumnSpan(int columnSpan);
49  int columnSpan() const;
50 
55  void setRowSpan(int rowSpan);
59  int rowSpan() const;
60 
64  void addInlineElement(const Element &element);
65 
70  void addElement(const Element &element, Qt::AlignmentFlag horizontalAlignment = Qt::AlignLeft);
71 
76  void addVariable(VariableType variable);
77 
82  void build(ReportBuilder &builder) const override;
83 
87  Element *clone() const override { return nullptr; } // krazy:exclude=inline
88 
92  ~Cell() override; // public for QMap
93 
97  Cell(const Cell &other); // public for QMap
101  Cell &operator=(const Cell &other); // public for QMap
102 
103 private:
104  friend class TableElement;
105  friend class QMap<QPair<int, int>, Cell>;
106  Cell();
107 
108  CellPrivate *const d;
109 };
110 
111 }
112 
113 #endif /* KDREPORTSCELL_H */
KDReportsVariableType.h
KDReports::TableElement
Definition: KDReportsTableElement.h:46
KDReportsElement.h
KDReports::Cell
Definition: KDReportsCell.h:52
KDReports::VariableType
VariableType
Definition: KDReportsVariableType.h:29
KDREPORTS_EXPORT
#define KDREPORTS_EXPORT
Definition: KDReportsGlobal.h:29
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 Sat Jan 8 2022 02:38:32 for KD Reports API Documentation by doxygen 1.8.17