Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef KDCHARTCARTESIANAXIS_H
00024 #define KDCHARTCARTESIANAXIS_H
00025
00026 #include <QList>
00027
00028 #include "KDChartAbstractAxis.h"
00029
00030 namespace KDChart {
00031
00032 class AbstractCartesianDiagram;
00033
00042 class KDCHART_EXPORT CartesianAxis : public AbstractAxis
00043 {
00044 Q_OBJECT
00045
00046 Q_DISABLE_COPY( CartesianAxis )
00047 KDCHART_DECLARE_PRIVATE_DERIVED_PARENT( CartesianAxis, AbstractDiagram* )
00048
00049 public:
00050 enum Position {
00051 Bottom,
00052 Top,
00053 Right,
00054 Left
00055 };
00056
00067 explicit CartesianAxis ( AbstractCartesianDiagram* diagram = 0 );
00068 ~CartesianAxis();
00069
00073 bool compare( const CartesianAxis* other )const;
00074
00076 virtual void paint( QPainter* );
00078 virtual void paintCtx( PaintContext* );
00079
00083 void setTitleText( const QString& text );
00084 QString titleText() const;
00085
00089 void setTitleSpace( qreal value );
00090 qreal titleSpace() const;
00091
00092 void setTitleTextAttributes( const TextAttributes &a );
00100 TextAttributes titleTextAttributes() const;
00107 void resetTitleTextAttributes();
00108 bool hasDefaultTitleTextAttributes() const;
00109
00110 virtual void setPosition ( Position p );
00111 #if QT_VERSION < 0x040400 || defined(Q_COMPILER_MANGLES_RETURN_TYPE)
00112 virtual const Position position () const;
00113 #else
00114 virtual Position position () const;
00115 #endif
00116
00117 virtual void layoutPlanes();
00118
00119 virtual bool isAbscissa() const;
00120 virtual bool isOrdinate() const;
00121
00129 void setAnnotations( const QMap< double, QString >& annotations );
00133 QMap< double, QString > annotations() const;
00134
00139 void setCustomTicks( const QList< double >& ticksPostions );
00143 QList< double > customTicks() const;
00144
00145
00147 virtual bool isEmpty() const;
00149 virtual Qt::Orientations expandingDirections() const;
00151 virtual QSize maximumSize() const;
00153 virtual QSize minimumSize() const;
00155 virtual QSize sizeHint() const;
00157 virtual void setGeometry( const QRect& r );
00159 virtual QRect geometry() const;
00160
00161 public Q_SLOTS:
00162 void setCachedSizeDirty() const;
00163
00164 virtual int tickLength( bool subUnitTicks = false ) const;
00165 };
00166
00167 typedef QList<CartesianAxis*> CartesianAxisList;
00168 }
00169
00170 #endif