KChart

KChartThreeDBarAttributes.cpp
1/*
2 * SPDX-FileCopyrightText: 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved.
3 *
4 * This file is part of the KD Chart library.
5 *
6 * SPDX-License-Identifier: GPL-2.0-or-later
7 */
8
9#include "KChartThreeDBarAttributes.h"
10#include "KChartThreeDBarAttributes_p.h"
11
12#include "KChartMath_p.h"
13
14#include <QDebug>
15
16#define d d_func()
17
18using namespace KChart;
19
20ThreeDBarAttributes::Private::Private()
21 : useShadowColors( true ),
22 angle( 45 )
23{
24}
25
26
27ThreeDBarAttributes::ThreeDBarAttributes()
28 : AbstractThreeDAttributes( new Private() )
29{
30
31}
32
33ThreeDBarAttributes::ThreeDBarAttributes( const ThreeDBarAttributes& r )
34 : AbstractThreeDAttributes( new Private( *r.d) )
35{
36}
37
38ThreeDBarAttributes& ThreeDBarAttributes::operator= ( const ThreeDBarAttributes& r )
39{
40 if ( this == &r )
41 return *this;
42
43 *d = *r.d;
44
45 return *this;
46}
47
48ThreeDBarAttributes::~ThreeDBarAttributes()
49{
50}
51
52void ThreeDBarAttributes::init()
53{
54}
55
56
57bool ThreeDBarAttributes::operator==( const ThreeDBarAttributes& r ) const
58{
59 return ( useShadowColors() == r.useShadowColors() &&
60 angle() == r.angle() &&
61 AbstractThreeDAttributes::operator==(r));
62}
63
64
65
66void ThreeDBarAttributes::setUseShadowColors( bool shadowColors )
67{
68 d->useShadowColors = shadowColors;
69}
70
71bool ThreeDBarAttributes::useShadowColors() const
72{
73 return d->useShadowColors;
74}
75
76void ThreeDBarAttributes::setAngle( uint threeDAngle )
77{
78 d->angle = threeDAngle;
79}
80
81uint ThreeDBarAttributes::angle() const
82{
83 return d->angle;
84}
85
86
87#if !defined(QT_NO_DEBUG_STREAM)
89{
90 dbg << "KChart::ThreeDBarAttributes(";
91 dbg = operator <<( dbg, static_cast<const AbstractThreeDAttributes&>(a) );
92 dbg << "useShadowColors="<< a.useShadowColors()
93 << "angle=" << a.angle() << ")";
94 return dbg;
95}
96#endif /* QT_NO_DEBUG_STREAM */
97
98
A set of 3D bar attributes.
QDebug operator<<(QDebug dbg, const PerceptualColor::MultiSpinBoxSection &value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:30 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.