Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

Plot2DSurface.h

Go to the documentation of this file.
00001 //LabPlot : Plot2DSurface.h
00002 
00003 #ifndef PLOT2DSURFACE_H
00004 #define PLOT2DSURFACE_H
00005 
00006 #include <iostream>
00007 #include "Plot2D.h"
00008 
00009 #ifdef HAVE_GL
00010 #include "qwt3d_surfaceplot.h"
00011 #endif
00012 
00013 using namespace std;
00014 
00016 class Plot2DSurface:public Plot2D {
00017 public:
00018         Plot2DSurface(Worksheet *p);
00019         void saveSurfaceXML(QDomDocument doc, QDomElement plottag);
00020         void openSurfaceXML(QDomElement e);
00021         QStringList Info();
00022         void drawFill(QPainter *, int, int) {}  // unused
00023         void drawLegend(QPainter *p, int x, int y);
00024         void drawCurves(QPainter *p,int w, int h);
00025         bool contourEnabled() { return contourenabled; }
00026         void enableContour(bool e=true) { contourenabled = e; }
00027         QColor ContourColor() { return contour_color; }
00028         void setContourColor(QColor c) { contour_color = c; }
00029         void setContourColor(QString c) { contour_color = QColor(c); }
00030         bool ColoredContour() { return colored_contour; }
00031         void setColoredContour(bool c) {colored_contour = c; }
00032         int ContourWidth() { return contour_width; }
00033         void setContourWidth(int w=0) { contour_width=w; }
00034         bool Mesh(){ return mesh; }
00035         void setMesh(bool m) { mesh=m; }
00036         bool Relative() { return relative; }
00037         void setRelative(bool r) { relative=r; }
00038         int Brush(){ return brush; }
00039         void setBrush(int b) { brush=b; }
00040         bool densityEnabled() { return densityenabled; }
00041         void enableDensity(bool e=true) { densityenabled = e; }
00042         int Number() { return number; }
00043         void setNumber(int n) { number = n; }
00044         double Threshold() { return threshold; }
00045         void setThreshold(double t) { threshold = t; }
00046 //      int Palette() { return palette; }
00047 //      void setPalette(int p) { palette = p; }
00048         QColor Color(int value);        // used also by PlotDialog
00049 #ifdef HAVE_GL
00050         void setColorVector(Qwt3D::ColorVector c) { cv=c; }
00051         Qwt3D::ColorVector getColorVector() { return cv; }
00052 #endif
00053 private:
00054         int graph_segment(QPainter *p,double x1,double y1, double z1, double x2, double y2, double z2,
00055                 double x3, double y3, double z3, double level);
00056         bool densityenabled;    // density enabled
00057         bool contourenabled;    // contour enabled
00058         QColor contour_color;   // contour line color
00059         bool colored_contour;   // colored contour lines
00060         int contour_width;      // contour width
00061         bool mesh;              // draw mesh (grid)
00062         bool relative;          // use relative (full) color scale (e.g. 5-10 -> 0..255) or absolute (e.g. 5-10 -> 190..255)
00063         int brush;              // brush for density
00064         int number;             // number of level
00065         double threshold;       // threshold for plotting
00066 #ifdef HAVE_GL
00067         Qwt3D::ColorVector cv;  // colorscale
00068 #endif
00069 };
00070 
00071 #endif // PLOT2DSURFACE_H

Generated on Sat Oct 13 21:55:01 2007 for LabPlot by  doxygen 1.4.4