KD Reports API Documentation
2.2
src
KDReports
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
18
QT_BEGIN_NAMESPACE
19
class
QPixmap;
20
class
QImage;
21
QT_END_NAMESPACE
22
23
namespace
KDReports
{
24
class
ImageElementPrivate;
25
29
class
KDREPORTS_EXPORT
ImageElement
:
public
Element
30
{
31
public
:
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
168
private
:
169
std::unique_ptr<ImageElementPrivate> d;
170
};
171
172
}
173
174
#endif
/* KDREPORTSIMAGEELEMENT_H */
KDReportsElement.h
KDREPORTS_EXPORT
#define KDREPORTS_EXPORT
Definition:
KDReportsGlobal.h:23
KDReportsUnit.h
KDReports::Element
Definition:
KDReportsElement.h:35
KDReports::ImageElement
Definition:
KDReportsImageElement.h:30
KDReports::ReportBuilder
Definition:
KDReportsReportBuilder_p.h:36
KDReports
Definition:
KDReportsAbstractReportLayout_p.h:24
KDReports::Unit
Unit
Definition:
KDReportsUnit.h:20
KDReports::Millimeters
@ Millimeters
Millimeters (the default)
Definition:
KDReportsUnit.h:21
© 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 by doxygen 1.9.1