Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members Related Pages Search
polargraph.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef POLARGRAPH_H
00019 #define POLARGRAPH_H
00020
00021 #include "expressiongraph.h"
00022
00027 class PolarGraph : public ExpressionGraph
00028 {
00029 Q_OBJECT
00030
00031 public:
00032 PolarGraph(QWidget *parent=0, const char *name=0);
00033
00034 virtual void load_key( const char *key, const char *value );
00035
00036 int setTMin(double);
00037 int setTMax(double);
00038 int setTStep(double);
00039 double getTMin(){return tMin;}
00040 double getTStep(){return tStep;}
00041 double getTMax(){return tMax;}
00042
00043 virtual int getGraphType() const{return POLARGRAPH;}
00044
00045 protected:
00046 inline virtual double snapIntervalX(){return (isTracing()) ? tStep : getXScale();}
00047 inline virtual double startSnap(){return (isTracing()) ? tMin : 0;}
00048
00049 virtual void updateCoords();
00050
00051 virtual void drawExpression(QPainter*,Expression &);
00052 virtual const char * independent_vars(){return "t";}
00053 virtual const char * dependent_var(int=0){return "r";}
00054 virtual int setXYForTrace(const double, const double, double *, double *, Expression &);
00055
00056 inline virtual double traceDepX(double x){return (x-getXMin())/((getXMax()-getXMin())/(tMax-tMin))+tMin;}
00057
00058 private:
00059 double tMin,tMax,tStep,t_trace;
00060 };
00061
00062 #endif
|