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