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         bool Mesh(){ return mesh; }
00033         void setMesh(bool m) { mesh=m; }
00034         bool Relative() { return relative; }
00035         void setRelative(bool r) { relative=r; }
00036         int Brush(){ return brush; }
00037         void setBrush(int b) { brush=b; }
00038         bool densityEnabled() { return densityenabled; }
00039         void enableDensity(bool e=true) { densityenabled = e; }
00040         int Number() { return number; }
00041         void setNumber(int n) { number = n; }
00042         double Threshold() { return threshold; }
00043         void setThreshold(double t) { threshold = t; }
00044 //      int Palette() { return palette; }
00045 //      void setPalette(int p) { palette = p; }
00046         QColor Color(int value);        // used also by PlotDialog
00047 #ifdef HAVE_GL
00048         void setColorVector(Qwt3D::ColorVector c) { cv=c; }
00049         Qwt3D::ColorVector getColorVector() { return cv; }
00050 #endif
00051 private:
00052         int graph_segment(QPainter *p,double x1,double y1, double z1, double x2, double y2, double z2,
00053                 double x3, double y3, double z3, double level);
00054         bool densityenabled;    // density enabled
00055         bool contourenabled;    // contour enabled
00056         QColor contour_color;   // contour line color
00057         bool colored_contour;   // colored contour lines
00058         bool mesh;              // draw mesh (grid)
00059         bool relative;          // use relative (full) color scale (e.g. 5-10 -> 0..255) or absolute (e.g. 5-10 -> 190..255)
00060         int brush;              // brush for density
00061         int number;             // number of level
00062         double threshold;       // threshold for plotting
00063 #ifdef HAVE_GL
00064         Qwt3D::ColorVector cv;  // colorscale
00065 #endif
00066 };
00067 
00068 #endif // PLOT2DSURFACE_H

Generated on Sun Apr 2 02:05:09 2006 for LabPlot by  doxygen 1.4.4