00001
00002
00003 #ifndef GRAPH_H
00004 #define GRAPH_H
00005
00006 #include <qstring.h>
00007 #include <qstringlist.h>
00008 #include <klocale.h>
00009 #include "LRange.h"
00010 #include "Label.h"
00011 #include "Style.h"
00012 #include "Symbol.h"
00013 #include "AnnotateValues.h"
00014 #include "plottypes.h"
00015 #include "source.h"
00016
00017 class Graph
00018 {
00019 public:
00020 Graph(QString n="", QString label="", LSource src=SFUNCTION, PType t=P2D, Style *st=0,
00021 Symbol *sy=0,int nr=0, bool s=true);
00022 virtual ~Graph() {}
00023 void openGraph(QTextStream *t,int version);
00024 void saveGraph(QTextStream *t);
00025 virtual void saveXML(QDomDocument doc, QDomElement graphtag) = 0;
00026 QDomElement saveGraphXML(QDomDocument doc, int gtype);
00027 virtual void openXML(QDomNode node) = 0;
00028 void openGraphXML(QDomElement e);
00029 QString Name() { return name; }
00030 Label* getLabel() { return label; }
00031 void setLabel(Label* l) { label=l; }
00032 LSource Source() { return source; }
00033 void setSource(LSource s) { source=s; }
00034 int ReadAs() { return readas; }
00035 void setReadAs(int r) { readas = r; }
00036 PType Type() { return type; }
00037 Style *getStyle() { return style; }
00038 void setStyle(Style *s) { style = s; }
00039 Symbol *getSymbol() { return symbol; }
00040 void setSymbol(Symbol *s) { symbol = s; }
00041 int Number() { return number; }
00042 void setNumber(int n) { number = n; }
00043 bool isShown() { return shown; }
00044 void setShown(bool b) { shown = b; }
00045 AnnotateValues getAnnotateValues() { return av; }
00046 void setAnnotateValues(AnnotateValues a) { av=a;}
00047 QString FitFunction() { return fitfunction; }
00048 void setFitFunction(QString f) { fitfunction=f; }
00049 protected:
00050 QString name;
00051 int number;
00052 PType type;
00053 Label* label;
00054 LSource source;
00055 int readas;
00056 Style* style;
00057 Symbol* symbol;
00058 bool shown;
00059 AnnotateValues av;
00060 QString fitfunction;
00061 };
00062
00063 #endif // GRAPH_H