Home

Download

Features

Screenshots

Handbook

Browse Source

Authors

SourceForge.net Logo
Hosted by SourceForge.net

OSI Certified


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages   Search  

plotmodule.h

00001 /***************************************************************************
00002                           plotmodule.h  -  description
00003                              -------------------
00004     begin                : Sun May 11 2003
00005     copyright            : (C) 2003 by Fungmeista
00006     email                : mizunoami44@users.sourceforge.net
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
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