KD Reports API Documentation 2.2
Loading...
Searching...
No Matches
KDReportsLayoutHelper.cpp
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
12
13QT_BEGIN_NAMESPACE
14Q_GUI_EXPORT extern int qt_defaultDpi(); // This is what QTextDocument uses...
15QT_END_NAMESPACE
16
17qreal KDReports::mmToPixels(qreal mm)
18{
19 return mm * 0.039370147 // mm to inch
20 * qt_defaultDpi(); // inch to pixels
21}
22
24{
25 // See Q_GUI_EXPORT qreal qt_pixelMultiplier(int resolution) in Qt
26 return resolution <= 0 ? 1.0 : 72.0 / resolution;
27}
QT_BEGIN_NAMESPACE Q_GUI_EXPORT int qt_defaultDpi()
KDREPORTS_EXPORT qreal mmToPixels(qreal mm)
KDREPORTS_EXPORT qreal pixelsToPointsMultiplier(double resolution)

© 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 Sun Apr 14 2024 00:04:57 for KD Reports API Documentation by doxygen 1.9.8