KD Chart API Documentation 3.0
Loading...
Searching...
No Matches
KDChartPrintingParameters.cpp
Go to the documentation of this file.
1/****************************************************************************
2**
3** This file is part of the KD Chart library.
4**
5** SPDX-FileCopyrightText: 2001 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6**
7** SPDX-License-Identifier: MIT
8**
9****************************************************************************/
10
12
13using namespace KDChart;
14
15PrintingParameters::PrintingParameters()
16{
17}
18
19PrintingParameters *PrintingParameters::instance()
20{
21 static PrintingParameters instance;
22 return &instance;
23}
24
25void PrintingParameters::setScaleFactor(const qreal scaleFactor)
26{
27 instance()->scaleFactor = scaleFactor;
28}
29
31{
32 instance()->scaleFactor = 1.0;
33}
34
36{
37 if (instance()->scaleFactor == 1.0)
38 return pen;
39
40 QPen resultPen = pen;
41 resultPen.setWidthF(resultPen.widthF() * instance()->scaleFactor);
42 if (resultPen.widthF() == 0.0)
43 resultPen.setWidthF(instance()->scaleFactor);
44
45 return resultPen;
46}
static void setScaleFactor(const qreal scaleFactor)
static QPen scalePen(const QPen &pen)
void setWidthF(qreal width)
qreal widthF() const const

© 2001 Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
https://www.kdab.com/development-resources/qt-tools/kd-chart/
Generated on Fri Feb 23 2024 00:02:58 for KD Chart API Documentation by doxygen 1.9.8