00001 /**************************************************************************** 00002 ** Copyright (C) 2001-2011 Klaralvdalens Datakonsult AB. All rights reserved. 00003 ** 00004 ** This file is part of the KD Chart library. 00005 ** 00006 ** Licensees holding valid commercial KD Chart licenses may use this file in 00007 ** accordance with the KD Chart Commercial License Agreement provided with 00008 ** the Software. 00009 ** 00010 ** 00011 ** This file may be distributed and/or modified under the terms of the 00012 ** GNU General Public License version 2 and version 3 as published by the 00013 ** Free Software Foundation and appearing in the file LICENSE.GPL.txt included. 00014 ** 00015 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00016 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00017 ** 00018 ** Contact info@kdab.com if any conditions of this licensing are not 00019 ** clear to you. 00020 ** 00021 **********************************************************************/ 00022 00023 #include "KDChartThreeDBarAttributes.h" 00024 #include "KDChartThreeDBarAttributes_p.h" 00025 00026 #include <QDebug> 00027 00028 #include <KDABLibFakes> 00029 00030 #define d d_func() 00031 00032 using namespace KDChart; 00033 00034 ThreeDBarAttributes::Private::Private() 00035 : useShadowColors( true ), 00036 angle( 45 ) 00037 { 00038 } 00039 00040 00041 ThreeDBarAttributes::ThreeDBarAttributes() 00042 : AbstractThreeDAttributes( new Private() ) 00043 { 00044 00045 } 00046 00047 ThreeDBarAttributes::ThreeDBarAttributes( const ThreeDBarAttributes& r ) 00048 : AbstractThreeDAttributes( new Private( *r.d) ) 00049 { 00050 } 00051 00052 ThreeDBarAttributes& ThreeDBarAttributes::operator= ( const ThreeDBarAttributes& r ) 00053 { 00054 if( this == &r ) 00055 return *this; 00056 00057 *d = *r.d; 00058 00059 return *this; 00060 } 00061 00062 ThreeDBarAttributes::~ThreeDBarAttributes() 00063 { 00064 } 00065 00066 void ThreeDBarAttributes::init() 00067 { 00068 } 00069 00070 00071 bool ThreeDBarAttributes::operator==( const ThreeDBarAttributes& r ) const 00072 { 00073 return ( useShadowColors() == r.useShadowColors() && 00074 angle() == r.angle() && 00075 AbstractThreeDAttributes::operator==(r)); 00076 } 00077 00078 00079 00080 void ThreeDBarAttributes::setUseShadowColors( bool shadowColors ) 00081 { 00082 d->useShadowColors = shadowColors; 00083 } 00084 00085 bool ThreeDBarAttributes::useShadowColors() const 00086 { 00087 return d->useShadowColors; 00088 } 00089 00090 void ThreeDBarAttributes::setAngle( uint threeDAngle ) 00091 { 00092 d->angle = threeDAngle; 00093 } 00094 00095 uint ThreeDBarAttributes::angle() const 00096 { 00097 return d->angle; 00098 } 00099 00100 00101 #if !defined(QT_NO_DEBUG_STREAM) 00102 QDebug operator<<(QDebug dbg, const KDChart::ThreeDBarAttributes& a) 00103 { 00104 dbg << "KDChart::ThreeDBarAttributes("; 00105 dbg = operator <<( dbg, static_cast<const AbstractThreeDAttributes&>(a) ); 00106 dbg << "useShadowColors="<< a.useShadowColors() 00107 << "angle=" << a.angle() << ")"; 00108 return dbg; 00109 } 00110 #endif /* QT_NO_DEBUG_STREAM */ 00111 00112