00001 // LabPlot : AnnotateValues.h 00002 00003 #ifndef ANNOTATEVALUES_H 00004 #define ANNOTATEVALUES_H 00005 00006 #include <qdom.h> 00007 #include "Point.h" 00008 00009 class AnnotateValues 00010 { 00011 public: 00012 AnnotateValues(int t=0, int p=0, int d=10); 00013 void draw(QPainter *p,int X, int Y, double x, double y, double z=0); // draw to p @ X,Y using values x,y,z 00014 void save(QTextStream *t); 00015 void open(QTextStream *t, int version); 00016 QDomElement saveXML(QDomDocument doc); 00017 void openXML(QDomNode node); 00018 00019 int Type() { return type; } 00020 void setType(int t) { type=t; } 00021 int Position() { return position; } 00022 void setPosition(int p) { position=p; } 00023 int Distance() { return distance; } 00024 void setDistance(int d) { distance=d; } 00025 private: 00026 int type; // 0: NONE, 1: x, 2: x, 3: z, 4: x,y, 5: x,y,z 00027 int position; // 0:top,1:bottom,2:left,3:right 00028 int distance; // distance from point 00029 }; 00030 00031 #endif //ANNOTATEVALUES_H