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
00020 void Export(QString fn,QString format, int w, int h);
00021 void draw(QPainter *p, int w, int h);
00022 void drawCurves(QPainter *p, int w, int h);
00023 #ifdef HAVE_GL
00024 void setPlotStyle(Qwt3D::PLOTSTYLE p) { plotstyle = p; }
00025 Qwt3D::PLOTSTYLE PlotStyle() { return plotstyle; }
00026 void setCoordinateStyle(Qwt3D::COORDSTYLE c) { coordinatestyle = c; }
00027 Qwt3D::COORDSTYLE CoordinateStyle() { return coordinatestyle; }
00028 void setFloorStyle( Qwt3D::FLOORSTYLE f) { floorstyle = f; }
00029 Qwt3D::FLOORSTYLE FloorStyle() { return floorstyle; }
00030 void setColorVector(Qwt3D::ColorVector c) { cv=c; }
00031 Qwt3D::ColorVector getColorVector() { return cv; }
00032 #endif
00033
00034 void saveAxes(QTextStream *t) {}
00035 void openAxes(QTextStream *t,int version) {}
00036 Axis *getAxis(int i) { return &axis[i]; }
00037 void setRanges(LRange* r) {range[0]=r[0];range[1]=r[1];range[2]=r[2];}
00038 void setActRanges(LRange* r) {}
00039 void enableGrid(int index,bool b) { gridenabled[index] = b; }
00040 bool gridEnabled(int index) { return gridenabled[index]; }
00041 void enableBorder(int index,bool b) { borderenabled[index] = b; }
00042 bool borderEnabled(int index) { return borderenabled[index]; }
00043 void setBorder(int item, bool on) {}
00044 bool aspectRatio() { return aspect_ratio; }
00045 void setAspectRatio(bool a) { aspect_ratio=a; }
00046 private:
00047 void draw();
00048 #ifdef HAVE_GL
00049 Qwt3D::PLOTSTYLE plotstyle;
00050 Qwt3D::COORDSTYLE coordinatestyle;
00051 Qwt3D::FLOORSTYLE floorstyle;
00052 Qwt3D::ColorVector cv;
00053 #endif
00054 Axis axis[12];
00055 bool borderenabled[4];
00056 bool gridenabled[24];
00057
00058
00059 bool aspect_ratio;
00060 };
00061
00062 #endif //PLOTQWT3D_H