32 #include <qwt3d_surfaceplot.h>
33 #include <qwt3d_function.h>
42 using namespace Qwt3D;
61 Graph3D (
const QString& label, QWidget* parent=0,
const char* name=0, Qt::WFlags f=0);
64 enum PlotType{Scatter=0, Trajectory = 1, Bars = 2};
65 enum PointStyle{None=0, Dots=1, VerticalBars=2, HairCross=3, Cones=4};
67 Qwt3D::SurfacePlot*
sp;
74 void addFunction(
const QString& s,
double xl,
double xr,
double yl,
75 double yr,
double zl,
double zr);
76 void insertFunction(
const QString& s,
double xl,
double xr,
double yl,
77 double yr,
double zl,
double zr);
78 void insertNewData(
Table* table,
const QString& colName);
81 void addMatrixData(
Matrix* m);
82 void addMatrixData(
Matrix* m,
double xl,
double xr,
double yl,
double yr,
double zl,
double zr);
83 void updateMatrixData(
Matrix* m);
85 void addData(
Table* table,
const QString& colName);
89 void addData(
Table* table,
int xcol,
int ycol);
90 void addData(
Table* table,
const QString& xColName,
const QString& yColName);
91 void addData(
Table* table,
const QString& xColName,
const QString& yColName,
92 double xl,
double xr,
double yl,
double yr,
double zl,
double zr);
93 void addData(
Table* table,
int xCol,
int yCol,
int zCol,
int type);
94 void addData(
Table* table,
int xCol,
int yCol,
int zCol,
95 double xl,
double xr,
double yl,
double yr,
double zl,
double zr);
100 void updateData(
Table* table);
101 void updateDataXY(
Table* table,
int xCol,
int yCol);
102 void updateDataXYZ(
Table* table,
int xCol,
int yCol,
int zCol);
104 void changeMatrix(
Matrix* m);
105 void changeDataColumn(
Table* table,
const QString& colName);
115 bool eventFilter(QObject *
object, QEvent *e);
116 void resizeEvent ( QResizeEvent *);
117 void contextMenuEvent(QContextMenuEvent *e);
118 void scaleFonts(
double factor);
131 void updateLabel(
int axis,
const QString& label,
const QFont& f);
132 void setAxesLabels(
const QStringList& lst);
133 void resetAxesLabels();
135 QFont xAxisLabelFont();
136 QFont yAxisLabelFont();
137 QFont zAxisLabelFont();
139 void setXAxisLabelFont(
const QFont& fnt);
140 void setYAxisLabelFont(
const QFont& fnt);
141 void setZAxisLabelFont(
const QFont& fnt);
143 void setXAxisLabelFont(
const QStringList& lst);
144 void setYAxisLabelFont(
const QStringList& lst);
145 void setZAxisLabelFont(
const QStringList& lst);
148 void setNumbersFont(
const QFont& font);
149 void setNumbersFont(
const QStringList& lst);
157 QStringList scaleLimits();
158 void updateScale(
int axis,
const QStringList& options);
159 void updateScales(
double xl,
double xr,
double yl,
double yr,
double zl,
double zr);
160 void updateScales(
double xl,
double xr,
double yl,
double yr,
161 double zl,
double zr,
int xcol,
int ycol);
162 void updateScales(
double xl,
double xr,
double yl,
double yr,
163 double zl,
double zr,
int xCol,
int yCol,
int zCol);
164 void updateScalesFromMatrix(
double xl,
double xr,
double yl,
double yr,
double zl,
double zr);
166 QStringList scaleTicks();
167 void setTicks(
const QStringList& options);
169 void updateTickLength(
int,
double majorLength,
double minorLength);
170 void adjustLabels(
int val);
173 QStringList axisTickLengths();
174 void setTickLengths(
const QStringList& lst);
180 void setHiddenLineGrid();
182 void setFilledMesh();
183 void setPointsMesh();
186 void setFloorIsolines();
187 void setEmptyFloor();
189 void setMeshLineWidth(
int lw);
196 void setGrid(Qwt3D::SIDE s,
bool b);
197 void setGrid(
int grids);
199 void setLeftGrid(
bool b);
200 void setRightGrid(
bool b);
201 void setCeilGrid(
bool b);
202 void setFloorGrid(
bool b);
203 void setFrontGrid(
bool b);
204 void setBackGrid(
bool b);
207 void setStyle(Qwt3D::COORDSTYLE coord,Qwt3D::FLOORSTYLE floor,
209 void setStyle(
const QStringList& st);
210 void customPlotStyle(
int style);
211 void resetNonEmptyStyle();
213 void setRotation(
double xVal,
double yVal,
double zVal);
214 void setScale(
double xVal,
double yVal,
double zVal);
215 void setShift(
double xVal,
double yVal,
double zVal);
216 void updateScaling(
double xVal,
double yVal,
double zVal);
230 double zoom(){
return sp->zoom();};
231 void setZoom(
double val);
232 void updateZoom(
double val);
234 Qwt3D::PLOTSTYLE plotStyle();
235 Qwt3D::FLOORSTYLE floorStyle();
236 Qwt3D::COORDSTYLE coordStyle();
240 void exportImage(
const QString& fileName,
int quality = 100,
bool transparent =
false);
242 void exportPDF(
const QString& fileName);
243 void exportVector(
const QString& fileName,
const QString& fileType =
"pdf");
245 QString saveToString(
const QString& geometry);
246 QString saveAsTemplate(
const QString& geometryInfo);
248 void zoomChanged(
double);
249 void rotationChanged(
double,
double,
double);
250 void scaleChanged(
double,
double,
double);
251 void shiftChanged(
double,
double,
double);
255 void setDataColors(
const QColor& cMax,
const QColor& cMin);
257 void updateColors(
const QColor& meshColor,
const QColor& axesColor,
const QColor& numColor,
258 const QColor& labelColor,
const QColor& bgColor,
const QColor& gridColor);
259 void changeTransparency(
double t);
260 void setTransparency(
double t);
263 QColor minDataColor();
264 QColor maxDataColor();
273 void setDataColorMap(
const QString& fileName);
274 bool openColorMap(ColorVector& cv, QString fname);
276 void setColors(
const QStringList& colors);
277 void setColors(
const QColor& meshColor,
const QColor& axesColor,
const QColor& numColor,
278 const QColor& labelColor,
const QColor& bgColor,
const QColor& gridColor);
283 void updateTitle(
const QString& s,
const QColor& color,
const QFont& font);
285 void setTitleFont(
const QFont& font);
288 void setTitle(
const QStringList& lst);
289 void setTitle(
const QString& s,
const QColor& color,
const QFont& font);
294 void setResolution(
int r);
300 void showColorLegend(
bool show);
304 void setOptions(
bool legend,
int r,
int dist);
305 void setOptions(
const QStringList& lst);
311 void setBarsRadius(
double rad);
312 void updateBars(
double rad);
319 void updatePoints(
double size,
bool sm);
325 void updateCross(
double rad,
double linewidth,
bool smooth,
bool boxed);
326 void setCrossOptions(
double rad,
double linewidth,
bool smooth,
bool boxed);
331 void updateCones(
double rad,
int quality);
332 void setConesOptions(
double rad,
int quality);
336 void setPointOptions(
double size,
bool s);
340 void showWorksheet();
342 void setSmoothMesh(
bool smooth);
346 void animate(
bool on =
true);
349 void findBestLayout();
355 void showContextMenu();
356 void showOptionsDialog();
358 void custom3DActions(QWidget*);
361 Qwt3D::Triple** allocateData(
int columns,
int rows);
362 void deleteData(Qwt3D::Triple **data,
int columns);
375 QColor axesCol,labelsCol,
titleCol,meshCol,bgCol,numCol,gridCol;
381 double barsRad, alpha,
pointSize, crossHairRad, crossHairLineWidth, conesRad;
399 double operator()(
double x,
double y);
400 QString
function(){
return formula;};