KD Chart API Documentation 3.1
Loading...
Searching...
No Matches
KDChartAbstractThreeDAttributes.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 "KDChartAbstractThreeDAttributes_p.h"
13
14#include <KDABLibFakes>
15#include <QBrush>
16#include <QDebug>
17
18#define d d_func()
19
20using namespace KDChart;
21
22AbstractThreeDAttributes::Private::Private()
23{
24}
25
30
35
37{
38 if (this == &r)
39 return *this;
40
41 *d = *r.d;
42
43 return *this;
44}
45
47{
48 delete _d;
49 _d = nullptr;
50}
51
56
57void AbstractThreeDAttributes::init()
58{
59}
60
62{
63 d->enabled = enabled;
64}
65
67{
68 return d->enabled;
69}
70
72{
73 d->depth = depth;
74}
75
77{
78 return d->depth;
79}
80
82{
83 return isEnabled() ? d->depth : 0.0;
84}
85
87{
88 return d->threeDBrushEnabled;
89}
90
92{
93 d->threeDBrushEnabled = enabled;
94}
95
97{
99 QLinearGradient gr(rect.topLeft(), rect.bottomRight());
100 gr.setColorAt(0.0, brush.color());
101 gr.setColorAt(0.5, brush.color().lighter(180));
102 gr.setColorAt(1.0, brush.color());
103 return QBrush(gr);
104 }
105 return brush;
106}
107
108#if !defined(QT_NO_DEBUG_STREAM)
110{
111 dbg << "enabled=" << a.isEnabled()
112 << "depth=" << a.depth();
113 return dbg;
114}
115#endif /* QT_NO_DEBUG_STREAM */
virtual QBrush threeDBrush(const QBrush &brush, const QRectF &rect) const
bool operator==(const AbstractThreeDAttributes &) const
AbstractThreeDAttributes & operator=(const AbstractThreeDAttributes &)
QDebug operator<<(QDebug stream, const DataDimension &r)
const QColor & color() const const
QColor lighter(int factor) const const
void setColorAt(qreal position, const QColor &color)
QPointF bottomRight() const const
QPointF topLeft() 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 Wed May 1 2024 00:01:10 for KD Chart API Documentation by doxygen 1.9.8