File indexing completed on 2024-12-15 04:02:28
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 KCHARTBARATTRIBUTES_H 0010 #define KCHARTBARATTRIBUTES_H 0011 0012 #include <QMetaType> 0013 #include "KChartGlobal.h" 0014 0015 namespace KChart { 0016 0017 /** 0018 * @brief Set of attributes for changing the appearance of bar charts 0019 */ 0020 class KCHART_EXPORT BarAttributes 0021 { 0022 public: 0023 BarAttributes(); 0024 BarAttributes( const BarAttributes& ); 0025 BarAttributes &operator= ( const BarAttributes& ); 0026 0027 ~BarAttributes(); 0028 0029 void setFixedDataValueGap( qreal gap ); 0030 qreal fixedDataValueGap() const; 0031 0032 void setUseFixedDataValueGap( bool gapIsFixed ); 0033 bool useFixedDataValueGap() const; 0034 0035 void setFixedValueBlockGap( qreal gap ); 0036 qreal fixedValueBlockGap() const; 0037 0038 void setUseFixedValueBlockGap( bool gapIsFixed ); 0039 bool useFixedValueBlockGap() const; 0040 0041 void setFixedBarWidth( qreal width ); 0042 qreal fixedBarWidth() const; 0043 0044 void setUseFixedBarWidth( bool useFixedBarWidth ); 0045 bool useFixedBarWidth() const; 0046 0047 void setGroupGapFactor ( qreal gapFactor ); 0048 qreal groupGapFactor() const; 0049 0050 void setBarGapFactor( qreal gapFactor ); 0051 qreal barGapFactor() const; 0052 0053 void setDrawSolidExcessArrows( bool solidArrows ); 0054 bool drawSolidExcessArrows() const; 0055 0056 bool operator==( const BarAttributes& ) const; 0057 inline bool operator!=( const BarAttributes& other ) const { return !operator==(other); } 0058 0059 private: 0060 class Private; 0061 Private * _d; 0062 Private * d_func() { return _d; } 0063 const Private * d_func() const { return _d; } 0064 }; // End of class BarAttributes 0065 0066 } 0067 0068 Q_DECLARE_METATYPE( KChart::BarAttributes ) 0069 0070 #endif // KCHARTBARATTRIBUTES_H