KD Chart API Documentation 3.1
Loading...
Searching...
No Matches
KDChartBarAttributes.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#include <qglobal.h>
13
14#include <KDABLibFakes>
15
16#define d d_func()
17
18using namespace KDChart;
19
20class BarAttributes::Private
21{
22 friend class BarAttributes;
23
24public:
25 Private();
26
27private:
28 qreal datasetGap = 6;
29 bool useFixedDatasetGap = false;
30 qreal valueBlockGap = 24;
31 bool useFixedValueBlockGap = false;
32 qreal barWidth = -1;
33 bool useFixedBarWidth = false;
34 bool drawSolidExcessArrows = false;
35 qreal groupGapFactor = 2.0;
36 qreal barGapFactor = 0.4;
37};
38
39BarAttributes::Private::Private()
40{
41}
42
44 : _d(new Private())
45{
46}
47
49 : _d(new Private(*r.d))
50{
51}
52
54{
55 if (this == &r)
56 return *this;
57
58 *d = *r.d;
59
60 return *this;
61}
62
64{
65 delete _d;
66 _d = nullptr;
67}
68
76
78{
79 d->datasetGap = gap;
80}
81
83{
84 return d->datasetGap;
85}
86
88{
89 d->useFixedDatasetGap = gapIsFixed;
90}
91
93{
94 return d->useFixedDatasetGap;
95}
96
98{
99 d->valueBlockGap = gap;
100}
101
103{
104 return d->valueBlockGap;
105}
106
108{
109 d->useFixedValueBlockGap = gapIsFixed;
110}
111
113{
114 return d->useFixedValueBlockGap;
115}
116
118{
119 d->barWidth = width;
120}
121
123{
124 return d->barWidth;
125}
126
127void BarAttributes::setUseFixedBarWidth(bool useFixedBarWidth)
128{
129 d->useFixedBarWidth = useFixedBarWidth;
130}
131
133{
134 return d->useFixedBarWidth;
135}
136
138{
139 d->groupGapFactor = gapFactor;
140}
141
143{
144 return d->groupGapFactor;
145}
146
148{
149 d->barGapFactor = gapFactor;
150}
151
153{
154 return d->barGapFactor;
155}
156
158{
159 d->drawSolidExcessArrows = solidArrows;
160}
161
163{
164 return d->drawSolidExcessArrows;
165}
Set of attributes for changing the appearance of bar charts.
void setBarGapFactor(qreal gapFactor)
void setUseFixedDataValueGap(bool gapIsFixed)
BarAttributes & operator=(const BarAttributes &)
void setFixedValueBlockGap(qreal gap)
bool operator==(const BarAttributes &) const
void setUseFixedBarWidth(bool useFixedBarWidth)
void setDrawSolidExcessArrows(bool solidArrows)
void setUseFixedValueBlockGap(bool gapIsFixed)
void setGroupGapFactor(qreal gapFactor)

© 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 Wed May 1 2024 00:01:10 for KD Chart API Documentation by doxygen 1.9.8