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 KDCHARTPLOTTER_H
00031 #define KDCHARTPLOTTER_H
00032
00033 #include "KDChartAbstractCartesianDiagram.h"
00034
00035 #include "KDChartLineAttributes.h"
00036 #include "KDChartValueTrackerAttributes.h"
00037
00038 namespace KDChart {
00039
00040 class ThreeDLineAttributes;
00041
00045 class KDCHART_EXPORT Plotter : public AbstractCartesianDiagram
00046 {
00047 Q_OBJECT
00048
00049 Q_DISABLE_COPY( Plotter )
00050
00051 KDCHART_DECLARE_DERIVED_DIAGRAM( Plotter, CartesianCoordinatePlane )
00052
00053
00054 public:
00055 class PlotterType;
00056 friend class PlotterType;
00057
00058 Plotter( QWidget* parent = 0, CartesianCoordinatePlane* plane = 0 );
00059 virtual ~Plotter();
00060
00061 virtual Plotter* clone() const;
00062
00066 bool compare( const Plotter* other ) const;
00067
00068 enum PlotType {
00069 Normal = 0
00070 };
00071
00072
00073 void setType( const PlotType type );
00074 PlotType type() const;
00075
00076 void setLineAttributes( const LineAttributes & a );
00077 void setLineAttributes( int column, const LineAttributes & a );
00078 void setLineAttributes( const QModelIndex & index, const LineAttributes & a );
00079 void resetLineAttributes( int column );
00080 void resetLineAttributes( const QModelIndex & index );
00081 LineAttributes lineAttributes() const;
00082 LineAttributes lineAttributes( int column ) const;
00083 LineAttributes lineAttributes( const QModelIndex & index ) const;
00084
00085 void setThreeDLineAttributes( const ThreeDLineAttributes & a );
00086 void setThreeDLineAttributes( int column, const ThreeDLineAttributes & a );
00087 void setThreeDLineAttributes( const QModelIndex & index,
00088 const ThreeDLineAttributes & a );
00089
00090
00091
00092
00093 ThreeDLineAttributes threeDLineAttributes() const;
00094 ThreeDLineAttributes threeDLineAttributes( int column ) const;
00095 ThreeDLineAttributes threeDLineAttributes( const QModelIndex & index ) const;
00096
00097 void setValueTrackerAttributes( const QModelIndex & index,
00098 const ValueTrackerAttributes & a );
00099 ValueTrackerAttributes valueTrackerAttributes( const QModelIndex & index ) const;
00100
00101
00102
00103 const int numberOfAbscissaSegments () const;
00104
00105 const int numberOfOrdinateSegments () const;
00106
00107 protected:
00108 void paint ( PaintContext* paintContext );
00109
00110 public:
00111 void resize ( const QSizeF& area );
00112
00113 protected:
00114 virtual double threeDItemDepth( const QModelIndex & index ) const;
00115 virtual double threeDItemDepth( int column ) const;
00117 virtual const QPair<QPointF, QPointF> calculateDataBoundaries() const;
00118 void paintEvent ( QPaintEvent* );
00119 void resizeEvent ( QResizeEvent* );
00120 };
00121
00122 }
00123
00124 #endif // KDCHARTLINEDIAGRAM_H