File indexing completed on 2024-05-12 04:20:30
0001 /* 0002 * SPDX-FileCopyrightText: 2001-2015 Klaralvdalens Datakonsult AB. All rights reserved. 0003 * 0004 * This file is part of the KD Chart library. 0005 * 0006 * SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #ifndef KCHARTABSTRACTTHREEDATTRIBUTES_H 0010 #define KCHARTABSTRACTTHREEDATTRIBUTES_H 0011 0012 #include <QMetaType> 0013 #include "KChartGlobal.h" 0014 0015 namespace KChart { 0016 0017 /** 0018 * @brief Base class for 3D attributes 0019 */ 0020 class KCHART_EXPORT AbstractThreeDAttributes 0021 { 0022 public: 0023 AbstractThreeDAttributes(); 0024 AbstractThreeDAttributes( const AbstractThreeDAttributes& ); 0025 AbstractThreeDAttributes &operator= ( const AbstractThreeDAttributes& ); 0026 0027 virtual ~AbstractThreeDAttributes() = 0; 0028 0029 void setEnabled( bool enabled ); 0030 bool isEnabled() const; 0031 0032 void setDepth( qreal depth ); 0033 qreal depth() const; 0034 0035 // returns the depth(), if is isEnabled() is true, otherwise returns 0.0 0036 qreal validDepth() const; 0037 0038 bool isThreeDBrushEnabled() const; 0039 void setThreeDBrushEnabled( bool enabled ); 0040 virtual QBrush threeDBrush( const QBrush& brush, const QRectF& rect ) const; 0041 0042 bool operator==( const AbstractThreeDAttributes& ) const; 0043 inline bool operator!=( const AbstractThreeDAttributes& other ) const { return !operator==(other); } 0044 0045 KCHART_DECLARE_PRIVATE_BASE_POLYMORPHIC(AbstractThreeDAttributes) 0046 0047 KCHART_DECLARE_SWAP_BASE(AbstractThreeDAttributes) 0048 0049 }; // End of class AbstractThreeDAttributes 0050 0051 } 0052 0053 #if !defined(QT_NO_DEBUG_STREAM) 0054 KCHART_EXPORT QDebug operator<<(QDebug, const KChart::AbstractThreeDAttributes& ); 0055 #endif /* QT_NO_DEBUG_STREAM */ 0056 0057 0058 0059 #endif // KCHARTABSTRACTTHREEDATTRIBUTES_H