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
00027 #ifndef KDCHARTDATAVALUEATTRIBUTES_H
00028 #define KDCHARTDATAVALUEATTRIBUTES_H
00029
00030 #include <Qt>
00031 #include <QMetaType>
00032 #include "KDChartGlobal.h"
00033 #include "KDChartEnums.h"
00034 #include "KDChartRelativePosition.h"
00035
00043 namespace KDChart {
00044
00045 class TextAttributes;
00046 class BackgroundAttributes;
00047 class FrameAttributes;
00048 class MarkerAttributes;
00049
00059 class KDCHART_EXPORT DataValueAttributes
00060 {
00061 public:
00062 DataValueAttributes();
00063 DataValueAttributes( const DataValueAttributes& );
00064 DataValueAttributes &operator= ( const DataValueAttributes& );
00065 bool operator==( const DataValueAttributes& ) const;
00066 inline bool operator!=( const DataValueAttributes& other ) const { return !operator==(other); }
00067
00068 ~DataValueAttributes();
00069
00070 static const DataValueAttributes& defaultAttributes();
00071 static const QVariant& defaultAttributesAsVariant();
00072
00076 void setVisible( bool visible );
00077
00081 bool isVisible() const;
00082
00088 void setTextAttributes( const TextAttributes &a );
00089
00093 TextAttributes textAttributes() const;
00094
00100 void setFrameAttributes( const FrameAttributes &a );
00101
00107 FrameAttributes frameAttributes() const;
00108
00114 void setBackgroundAttributes( const BackgroundAttributes &a );
00115
00121 BackgroundAttributes backgroundAttributes() const;
00122
00129 void setMarkerAttributes( const MarkerAttributes &a );
00130
00136 MarkerAttributes markerAttributes() const;
00137
00143 void setDecimalDigits( int digits );
00144
00148 int decimalDigits() const;
00149
00154 void setPrefix( const QString prefix );
00155
00160 QString prefix() const;
00161
00166 void setSuffix( const QString suffix );
00167
00172 QString suffix() const;
00173
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