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
00028
00029
00030 #ifndef KDCHARTTEXTATTRIBUTES_H
00031 #define KDCHARTTEXTATTRIBUTES_H
00032
00033 #include <QDebug>
00034 #include <QMetaType>
00035 #include "KDChartGlobal.h"
00036 #include "KDChartMeasure.h"
00037
00038 class QPen;
00039 class QFont;
00040
00041 namespace KDChart {
00042
00050 class KDCHART_EXPORT TextAttributes
00051 {
00052 public:
00053 TextAttributes();
00054 TextAttributes( const TextAttributes& );
00055 TextAttributes &operator= ( const TextAttributes& );
00056 bool operator==( const TextAttributes& ) const;
00057 inline bool operator!=( const TextAttributes& other ) const
00058 { return !operator==(other); }
00059
00060 ~TextAttributes();
00061
00066 void setVisible( bool visible );
00067
00071 bool isVisible() const;
00072
00077 void setFont( const QFont& font );
00078
00082 QFont font() const;
00083
00089 void setFontSize( const Measure & measure );
00090
00094 Measure fontSize() const;
00095
00101 void setMinimalFontSize( const Measure & measure );
00102
00106 Measure minimalFontSize() const;
00107
00115 const qreal calculatedFontSize(
00116 const QObject* autoReferenceArea,
00117 KDChartEnums::MeasureOrientation autoReferenceOrientation ) const;
00118
00126 const QFont calculatedFont(
00127 const QObject* autoReferenceArea,
00128 KDChartEnums::MeasureOrientation autoReferenceOrientation ) const;
00129
00133 bool hasAbsoluteFontSize() const;
00134
00140 void setAutoRotate( bool autoRotate );
00141
00146 bool autoRotate() const;
00147
00153 void setAutoShrink( bool autoShrink );
00154
00159 bool autoShrink() const;
00160
00172 void setRotation( int rotation );
00173
00177 int rotation() const;
00178
00183 void setPen( const QPen& pen );
00184
00188 QPen pen() const;
00189
00190
00191
00192 private:
00193 KDCHART_DECLARE_PRIVATE_BASE_VALUE( TextAttributes )
00194
00195 };
00196
00197 }
00198
00199 #if !defined(QT_NO_DEBUG_STREAM)
00200 KDCHART_EXPORT QDebug operator<<(QDebug, const KDChart::TextAttributes& );
00201 #endif
00202
00203 KDCHART_DECLARE_SWAP_SPECIALISATION( KDChart::TextAttributes )
00204 Q_DECLARE_METATYPE( KDChart::TextAttributes )
00205 Q_DECLARE_TYPEINFO( KDChart::TextAttributes, Q_MOVABLE_TYPE );
00206
00207 #endif // KDCHARTTEXTATTRIBUTES_H