1 /* 2 * Copyright (C) 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved. 3 * 4 * This file is part of the KD Chart library. 5 * 6 * This program is free software; you can redistribute it and/or 7 * modify it under the terms of the GNU General Public License as 8 * published by the Free Software Foundation; either version 2 of 9 * the License, or (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program. If not, see <https://www.gnu.org/licenses/>. 18 */ 19 20 #include "KChartThreeDLineAttributes.h" 21 #include "KChartThreeDLineAttributes_p.h" 22 23 #include "KChartMath_p.h" 24 25 #include <QDebug> 26 27 #define d d_func() 28 29 using namespace KChart; 30 Private()31ThreeDLineAttributes::Private::Private() 32 : lineXRotation( 15 ), 33 lineYRotation( 15 ) 34 { 35 } 36 37 ThreeDLineAttributes()38ThreeDLineAttributes::ThreeDLineAttributes() 39 : AbstractThreeDAttributes( new Private() ) 40 { 41 42 } 43 ThreeDLineAttributes(const ThreeDLineAttributes & r)44ThreeDLineAttributes::ThreeDLineAttributes( const ThreeDLineAttributes& r ) 45 : AbstractThreeDAttributes( new Private( *r.d) ) 46 { 47 } 48 operator =(const ThreeDLineAttributes & r)49ThreeDLineAttributes& ThreeDLineAttributes::operator= ( const ThreeDLineAttributes& r ) 50 { 51 if ( this == &r ) 52 return *this; 53 54 *d = *r.d; 55 56 return *this; 57 } 58 ~ThreeDLineAttributes()59ThreeDLineAttributes::~ThreeDLineAttributes() 60 { 61 } 62 init()63void ThreeDLineAttributes::init() 64 { 65 } 66 67 operator ==(const ThreeDLineAttributes & r) const68bool ThreeDLineAttributes::operator==( const ThreeDLineAttributes& r ) const 69 { 70 return ( lineXRotation() == r.lineXRotation() && 71 lineYRotation() == r.lineYRotation() && 72 AbstractThreeDAttributes::operator==(r)); 73 } 74 75 76 setLineXRotation(const uint degrees)77void ThreeDLineAttributes::setLineXRotation( const uint degrees ) 78 { 79 d->lineXRotation = degrees; 80 } 81 lineXRotation() const82uint ThreeDLineAttributes::lineXRotation() const 83 { 84 return d->lineXRotation; 85 } 86 setLineYRotation(const uint degrees)87void ThreeDLineAttributes::setLineYRotation( const uint degrees ) 88 { 89 d->lineYRotation = degrees; 90 } 91 lineYRotation() const92uint ThreeDLineAttributes::lineYRotation() const 93 { 94 return d->lineYRotation; 95 } 96 97 98 #if !defined(QT_NO_DEBUG_STREAM) 99 operator <<(QDebug dbg,const KChart::ThreeDLineAttributes & a)100QDebug operator<<(QDebug dbg, const KChart::ThreeDLineAttributes& a) 101 { 102 dbg << "KChart::ThreeDLineAttributes("; 103 dbg = operator <<( dbg, static_cast<const AbstractThreeDAttributes&>(a) ); 104 dbg << " lineXRotation="<< a.lineXRotation() 105 << " lineYRotation="<< a.lineYRotation() 106 << ")"; 107 return dbg; 108 } 109 #endif /* QT_NO_DEBUG_STREAM */ 110 111