00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef KDCHARTDATAVALUEATTRIBUTES_H
00027 #define KDCHARTDATAVALUEATTRIBUTES_H
00028
00029 #include <Qt>
00030 #include <QMetaType>
00031 #include "KDChartGlobal.h"
00032 #include "KDChartEnums.h"
00033 #include "KDChartRelativePosition.h"
00034
00042 namespace KDChart {
00043
00044 class TextAttributes;
00045 class BackgroundAttributes;
00046 class FrameAttributes;
00047 class MarkerAttributes;
00048
00058 class KDCHART_EXPORT DataValueAttributes
00059 {
00060 public:
00061 DataValueAttributes();
00062 DataValueAttributes( const DataValueAttributes& );
00063 DataValueAttributes &operator= ( const DataValueAttributes& );
00064 bool operator==( const DataValueAttributes& ) const;
00065 inline bool operator!=( const DataValueAttributes& other ) const { return !operator==(other); }
00066
00067 ~DataValueAttributes();
00068
00069 static const DataValueAttributes& defaultAttributes();
00070 static const QVariant& defaultAttributesAsVariant();
00071
00075 void setVisible( bool visible );
00076
00080 bool isVisible() const;
00081
00087 void setTextAttributes( const TextAttributes &a );
00088
00092 TextAttributes textAttributes() const;
00093
00099 void setFrameAttributes( const FrameAttributes &a );
00100
00106 FrameAttributes frameAttributes() const;
00107
00113 void setBackgroundAttributes( const BackgroundAttributes &a );
00114
00120 BackgroundAttributes backgroundAttributes() const;
00121
00128 void setMarkerAttributes( const MarkerAttributes &a );
00129
00135 MarkerAttributes markerAttributes() const;
00136
00142 void setDecimalDigits( int digits );
00143
00147 int decimalDigits() const;
00148
00153 void setPrefix( const QString prefix );
00154
00159 QString prefix() const;
00160
00165 void setSuffix( const QString suffix );
00166
00171 QString suffix() const;
00172
00178 void setDataLabel( const QString label );
00179
00184 QString dataLabel() const;
00185
00191 bool showRepetitiveDataLabels() const;
00192
00198 void setShowRepetitiveDataLabels( bool showRepetitiveDataLabels );
00199
00206 void setPowerOfTenDivisor( int powerOfTenDivisor );
00207 int powerOfTenDivisor() const;
00219 void setShowInfinite( bool infinite );
00220 bool showInfinite() const;
00234 void setNegativePosition( const RelativePosition& relPosition );
00235
00240 const RelativePosition negativePosition() const;
00241
00251 void setPositivePosition( const RelativePosition& relPosition );
00252
00257 const RelativePosition positivePosition() const;
00258
00259 const RelativePosition position( bool positive ) const
00260 {
00261 return positive ? positivePosition() : negativePosition();
00262 }
00263
00264 private:
00265 KDCHART_DECLARE_PRIVATE_BASE_VALUE( DataValueAttributes )
00266
00267 };
00268
00269 }
00270
00271 #if !defined(QT_NO_DEBUG_STREAM)
00272 KDCHART_EXPORT QDebug operator<<(QDebug, const KDChart::DataValueAttributes& );
00273 #endif
00274
00275 Q_DECLARE_METATYPE( KDChart::DataValueAttributes )
00276 Q_DECLARE_TYPEINFO( KDChart::DataValueAttributes, Q_MOVABLE_TYPE );
00277 KDCHART_DECLARE_SWAP_SPECIALISATION( KDChart::DataValueAttributes )
00278
00279 #endif // KDCHARTDATAVALUEATTRIBUTES_H