Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members Related Pages Search
plotmodule.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef PLOTMODULE_H
00019 #define PLOTMODULE_H
00020
00021 #include "statplotgraph.h"
00022
00023 #include <string>
00024
00025 class QColor;
00026 class QPainter;
00027
00032 class PlotModule
00033 {
00034 public:
00038 PlotModule( bool, const QColor& );
00039
00043 virtual void drawPlot( QPainter *p, int *, StatPlotGraph *graph, double xScale, double yScale ) = 0;
00044
00049 virtual void trace( double x, double y, double *new_x, double *new_y ) = 0;
00050
00054 virtual std::string updateCoords( double x, double y ) = 0;
00055
00059 virtual void zoomStat( double *xmin, double *xmax, double *ymin, double *ymax ) = 0;
00060
00062 void setVisible(bool show){_show = show;}
00063
00065 bool show() const{return _show;}
00066
00068 QColor color() const{return _color;}
00069
00070 protected:
00071 int toPixelXCoord( StatPlotGraph *s, double d ){return s->toPixelXCoord(d);}
00072 int toPixelYCoord( StatPlotGraph *s, double d ){return s->toPixelYCoord(d);}
00073
00074 private:
00075 bool _show;
00076 QColor _color;
00077 };
00078
00079 #endif
|