00001
00002
00003 #ifndef PLOTQWT3D_H
00004 #define PLOTQWT3D_H
00005
00006 #ifdef HAVE_GL
00007 #include "qwt3d_surfaceplot.h"
00008 #endif
00009 #include "Plot.h"
00010
00011 class PlotQWT3D : public Plot
00012 #ifdef HAVE_GL
00013 , public Qwt3D::SurfacePlot
00014 #endif
00015 {
00016 public:
00017 PlotQWT3D(Worksheet *p);
00018 QStringList Info();
00019 void mouseDoubleClickEvent(QMouseEvent *e);
00020
00021 void Export(QPainter *p, QString fn,QString format, int w, int h);
00022 void draw(QPainter *p, int w, int h);
00023 void drawCurves(QPainter *p, int w, int h);
00024 #ifdef HAVE_GL
00025 void setPlotStyle(Qwt3D::PLOTSTYLE p) { plotstyle = p; }
00026 Qwt3D::PLOTSTYLE PlotStyle() { return plotstyle; }
00027 void setCoordinateStyle(Qwt3D::COORDSTYLE c) { coordinatestyle = c; }
00028 Qwt3D::COORDSTYLE CoordinateStyle() { return coordinatestyle; }
00029 void setFloorStyle( Qwt3D::FLOORSTYLE f) { floorstyle = f; }
00030 Qwt3D::FLOORSTYLE FloorStyle() { return floorstyle; }
00031 void setColorVector(Qwt3D::ColorVector c) { cv=c; }
00032 Qwt3D::ColorVector getColorVector() { return cv; }
00033 #endif
00034
00035 void saveAxes(QTextStream *) {}
00036 void openAxes(QTextStream *,int) {}
00037 void saveXML(QDomDocument doc, QDomElement plottag);
00038 void openXML(QDomElement e);
00039 Axis *getAxis(int i) { return &axis[i]; }
00040 void setRange(LRange* r ,int i) {range[i] = *r; }
00041 void setActRange(LRange* r,int i) {actrange[i] = *r; }
00042 void setRanges(LRange* r) {range[0]=r[0];range[1]=r[1];range[2]=r[2]; }
00043 void setActRanges(LRange* r) {actrange[0]=r[0];actrange[1]=r[1];actrange[2]=r[2]; }
00044
00045 int aspectRatio() { return aspect_ratio; }
00046 void setAspectRatio(int a) { aspect_ratio=a; }
00047 bool mouseDisabled() { return mouse_disabled; }
00048 void disableMouse(bool m) { mouse_disabled=m; }
00049 int Resolution() { return resolution; }
00050 void setDataResolution(int res) { resolution=res; }
00051 private:
00052 void draw();
00053 Axis axis[12];
00054 #ifdef HAVE_GL
00055 Qwt3D::PLOTSTYLE plotstyle;
00056 Qwt3D::COORDSTYLE coordinatestyle;
00057 Qwt3D::FLOORSTYLE floorstyle;
00058 Qwt3D::ColorVector cv;
00059 #endif
00060 int aspect_ratio;
00061 bool mouse_disabled;
00062 int resolution;
00063 };
00064
00065 #endif //PLOTQWT3D_H