Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members Related Pages Search
loader.cpp00001 #include "loader.h"
00002
00003 #include "graph.h"
00004 #include "commongraphmain.h"
00005
00006 CommonGraphMain* Loader::load(const QString &file, const char *str, std::ifstream &fileInput, QWidget *parent)
00007 {
00008 CommonGraphMain *new_graph = 0;
00009
00010 if (strcmp(str,"[FunctionGraph]") == 0)
00011 {
00012 qDebug("Loading Function Graph");
00013 new_graph = Graph::createGraph(Graph::FUNCTIONGRAPH,parent);
00014 }
00015 if (strcmp(str,"[PolarGraph]") == 0)
00016 {
00017 qDebug("Loading Polar Graph");
00018 new_graph = Graph::createGraph(Graph::POLARGRAPH,parent);
00019 }
00020 if (strcmp(str,"[ParametricGraph]") == 0)
00021 {
00022 qDebug("Loading Parametric Graph");
00023 new_graph = Graph::createGraph(Graph::PARAMETRICGRAPH,parent);
00024 }
00025 if (strcmp(str,"[StatPlotGraph]") == 0)
00026 {
00027 qDebug("Loading Stat Plot Graph");
00028 new_graph = Graph::createGraph(Graph::STATGRAPH,parent);
00029 }
00030 if (strcmp(str,"[DensityPlot]") == 0)
00031 {
00032 qDebug("Loading Density Plot");
00033 new_graph = Graph::createGraph(Graph::DENSITYPLOT,parent);
00034 }
00035 #ifdef GLGRAPH
00036 if (strcmp(str,"[3DFunctionGraph]") == 0)
00037 {
00038 qDebug("Loading 3D Function Graph");
00039 new_graph = Graph::createGraph(Graph::GLFUNCTIONGRAPH,parent);
00040 }
00041 if (strcmp(str,"[3DPolarGraph]") == 0)
00042 {
00043 qDebug("Loading 3D Polar Graph");
00044 new_graph = Graph::createGraph(Graph::GLPOLARGRAPH,parent);
00045 }
00046 if (strcmp(str,"[3DCylindricalGraph]") == 0)
00047 {
00048 qDebug("Loading 3D Cylindrical Graph");
00049 new_graph = Graph::createGraph(Graph::GLCYLINDRICALGRAPH,parent);
00050 }
00051 #endif //GLGRAPH
00052
00053 if ( new_graph )
00054 {
00055
00056 new_graph->load(fileInput);
00057 }
00058
00059 return new_graph;
00060 }
|