KD Reports API Documentation 2.2
Loading...
Searching...
No Matches
KDReportsImageElement.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 KDREPORTSIMAGEELEMENT_H
12#define KDREPORTSIMAGEELEMENT_H
13
14#include "KDReportsElement.h"
15#include "KDReportsUnit.h"
16#include <QtCore/QtGlobal> // qreal
17
18QT_BEGIN_NAMESPACE
19class QPixmap;
20class QImage;
21QT_END_NAMESPACE
22
23namespace KDReports {
24class ImageElementPrivate;
25
30{
31public:
36 explicit ImageElement(const QPixmap &pixmap);
42 explicit ImageElement(const QImage &image);
46 ~ImageElement() override;
47
52 void setPixmap(const QPixmap &pixmap);
53
58 QPixmap pixmap() const;
59
64 void setImage(const QImage &image);
65
70 QImage image() const;
71
75 ImageElement(const ImageElement &other);
79 ImageElement &operator=(const ImageElement &other);
80
97 void setWidth(qreal width, Unit unit = Millimeters);
98
103 qreal width() const;
104
111 void setHeight(qreal height, Unit unit = Millimeters);
112
117 qreal height() const;
118
123 Unit unit() const;
124
129 void setUnit(Unit unit);
130
137 void setFitToPage();
138
143 bool fitToPage() const;
144
149 void setId(const QString &id);
150
155 QString id() const;
156
161 void build(ReportBuilder &) const override;
166 Element *clone() const override;
167
168private:
169 std::unique_ptr<ImageElementPrivate> d;
170};
171
172}
173
174#endif /* KDREPORTSIMAGEELEMENT_H */
#define KDREPORTS_EXPORT
@ Millimeters
Millimeters (the default)

© 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 Wed Apr 24 2024 04:08:14 for KD Reports API Documentation by doxygen 1.9.8