Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members Related Pages Search
commongraph.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef COMMONGRAPH_H
00019 #define COMMONGRAPH_H
00020
00021 #include <fstream>
00022
00023 #ifdef KDE_APP
00024 class KPrinter;
00025 #else
00026 class QPrinter;
00027 #endif //KDE_APP
00028
00029 class QColor;
00030 class QString;
00031 class QPixmap;
00032
00041 class CommonGraph
00042 {
00043 public:
00044 CommonGraph(){}
00045 virtual ~CommonGraph(){}
00046
00047 virtual void load( std::ifstream & );
00048 virtual void load_key( const char *key, const char *value ){};
00049
00050
00051 static const int RECTANGULAR = 0;
00052 static const int POLAR = 1;
00053
00054 static const enum{
00055 FUNCTIONGRAPH = 0,
00056 POLARGRAPH,
00057 PARAMETRICGRAPH,
00058 STATGRAPH,
00059 DENSITYPLOT
00060 #ifdef GLGRAPH
00061 ,GLFUNCTIONGRAPH,
00062 GLPOLARGRAPH,
00063 GLCYLINDRICALGRAPH,
00064 GLPARAMETRICGRAPH
00065 #endif //GLGRAPH
00066 } graphType;
00067
00068 virtual int execMathFunction( const char * ){return -1;}
00069
00070 virtual bool isTracing() const{return false;}
00071 virtual void setSnapToGrid(bool){}
00072 virtual bool isSnapToGrid() const{return false;}
00073
00074 virtual int getAngle() const{return -1;}
00075 virtual void setAngle(int){}
00076 virtual int getGraphType() const = 0;
00077
00079 #ifdef KDE_APP
00080 virtual void print(KPrinter *) = 0;
00081 #else
00082 virtual void print(QPrinter *) = 0;
00083 #endif //KDE_APP
00084
00092 virtual void exportAsImage(const QString &, const QString &) = 0;
00093
00094 virtual void getPixmap(QPixmap &) = 0;
00095
00096 virtual bool getAxisState() const = 0;
00097 virtual bool getGridState() const = 0;
00098 virtual bool getScaleState() const = 0;
00099
00100 virtual void zoomStat(){}
00101 virtual void zoomIn() = 0;
00102 virtual void zoomOut() = 0;
00103 virtual void zoomStd() = 0;
00104 virtual void zoomBox(){}
00105
00106 virtual QColor axisColor() const = 0;
00107 virtual QColor gridColor() const = 0;
00108 virtual QColor backgroundColor() const = 0;
00109 virtual QColor scaleColor() const = 0;
00110
00111 virtual void setAxis(bool) = 0;
00112 virtual void setGrid(bool) = 0;
00113 virtual void setScale(bool) = 0;
00114 virtual void setTrace(bool) = 0;
00115
00116 virtual void setDrawConnected(bool){}
00117 virtual bool isDrawConnected() const{return false;}
00118
00119 virtual void setAxisColor(const QColor &) = 0;
00120 virtual void setGridColor(const QColor &) = 0;
00121 virtual void setBackgroundColor(const QColor &) = 0;
00122 virtual void setScaleColor(const QColor &) = 0;
00123
00124 virtual int getXZoomFactor() const = 0;
00125 virtual int getYZoomFactor() const = 0;
00126 virtual void setXZoomFactor(int) = 0;
00127 virtual void setYZoomFactor(int) = 0;
00128 };
00129
00130 #endif
00131
|