Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members Related Pages Search
graph.cpp00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include <qpixmap.h>
00019 #include <qworkspace.h>
00020
00021 #include "graph.h"
00022 #include "basicgraph.h"
00023
00024 Graph::~Graph()
00025 {
00026 }
00027
00028 CommonGraphMain* Graph::createGraph(int graphType, QWidget *parent)
00029 {
00030 switch(graphType)
00031 {
00032 case FUNCTIONGRAPH:
00033 {
00034 FunctionGraphMain* f = new FunctionGraphMain(parent, "functiongraph");
00035 f->getGraph()->installMathFunctions();
00036 f->setIcon( QPixmap(functiongraph_xpm) );
00037 return f;
00038 break;
00039 }
00040 case POLARGRAPH:
00041 {
00042 PolarGraphMain* po = new PolarGraphMain(parent, "polargraph");
00043 po->getGraph()->installMathFunctions();
00044 po->setIcon( QPixmap(polargraph_xpm) );
00045 return po;
00046 break;
00047 }
00048 case PARAMETRICGRAPH:
00049 {
00050 ParametricGraphMain* p = new ParametricGraphMain(parent, "parametricgraph");
00051 p->getGraph()->installMathFunctions();
00052 p->setIcon( QPixmap(parametricgraph_xpm) );
00053 return p;
00054 break;
00055 }
00056 case STATGRAPH:
00057 {
00058 StatPlotGraphMain* s = new StatPlotGraphMain(parent, "statplot");
00059 s->getGraph()->installMathFunctions();
00060 s->setIcon( QPixmap(statplot_xpm) );
00061 return s;
00062 break;
00063 }
00064 case DENSITYPLOT:
00065 {
00066 DensityPlotMain* s = new DensityPlotMain(parent, "densityplot");
00067 s->getGraph()->installMathFunctions();
00068 s->setIcon( QPixmap(functiongraph_xpm) );
00069 return s;
00070 break;
00071 }
00072 #ifdef GLGRAPH
00073 case GLFUNCTIONGRAPH:
00074 {
00075 GLFunctionGraphMain* s = new GLFunctionGraphMain(parent, "glfunctiongraph");
00076 s->setIcon( QPixmap(glfunctiongraph_xpm) );
00077 return s;
00078 break;
00079 }
00080 case GLPOLARGRAPH:
00081 {
00082 GLPolarGraphMain* s = new GLPolarGraphMain(parent, "glpolargraph");
00083 s->setIcon( QPixmap(glpolargraph_xpm) );
00084 return s;
00085 break;
00086 }
00087 case GLCYLINDRICALGRAPH:
00088 {
00089 GLCylindricalGraphMain* s = new GLCylindricalGraphMain(parent, "glcylindricalgraph");
00090 s->setIcon( QPixmap(glcylindricalgraph_xpm) );
00091 return s;
00092 break;
00093 }
00094 #endif //GLGRAPH
00095 }
00096 return 0;
00097 }
00098
|