32 #include <qwt3d_curve.h>
33 #include <qwt3d_surfaceplot.h>
34 #include <qwt3d_function.h>
35 #include <qwt3d_parametricsurface.h>
45 using namespace Qwt3D;
70 enum PlotType{NoTable = -1, Scatter = 0, Trajectory = 1, Bars = 2, Ribbon = 3};
71 enum PointStyle{None = 0, Dots = 1, VerticalBars = 2, HairCross = 3, Cones = 4};
88 void addFunction(
const QString& s,
double xl,
double xr,
double yl,
89 double yr,
double zl,
double zr,
int columns = 40,
int rows = 30);
90 void addParametricSurface(
const QString& xFormula,
const QString& yFormula,
91 const QString& zFormula,
double ul,
double ur,
double vl,
double vr,
92 int columns,
int rows,
bool uPeriodic,
bool vPeriodic);
93 void insertNewData(
Table* table,
const QString& colName);
96 void addMatrixData(
Matrix* m);
97 void addMatrixData(
Matrix* m,
double xl,
double xr,
double yl,
double yr,
double zl,
double zr);
98 void updateMatrixData(
Matrix* m);
100 void addRibbon(
Table* table,
const QString& xColName,
const QString& yColName);
101 void addRibbon(
Table* table,
const QString& xColName,
const QString& yColName,
102 double xl,
double xr,
double yl,
double yr,
double zl,
double zr);
103 void addData(
Table* table,
int xCol,
int yCol,
int zCol,
int type = 0);
104 void loadData(
Table* table,
int xCol,
int yCol,
int zCol,
105 double xl=0.0,
double xr=0.0,
double yl=0.0,
double yr=0.0,
double zl=0.0,
double zr=0.0,
int axis = -1);
112 void updateData(
Table* table);
113 void updateDataXY(
Table* table,
int xCol,
int yCol);
115 void changeDataColumn(
Table* table,
const QString& colName,
int type = 0);
130 void dropEvent(QDropEvent*);
131 void dragEnterEvent(QDragEnterEvent*);
132 bool eventFilter(QObject *
object, QEvent *e);
133 void resizeEvent (QResizeEvent *);
134 void scaleFonts(
double factor);
147 void setAxesLabels(
const QStringList& lst);
148 void resetAxesLabels();
150 void setXAxisLabel(
const QString&);
151 void setYAxisLabel(
const QString&);
152 void setZAxisLabel(
const QString&);
154 QFont xAxisLabelFont();
155 QFont yAxisLabelFont();
156 QFont zAxisLabelFont();
158 void setXAxisLabelFont(
const QFont& fnt);
159 void setYAxisLabelFont(
const QFont& fnt);
160 void setZAxisLabelFont(
const QFont& fnt);
162 void setXAxisLabelFont(
const QStringList& lst);
163 void setYAxisLabelFont(
const QStringList& lst);
164 void setZAxisLabelFont(
const QStringList& lst);
167 void setNumbersFont(
const QFont& font);
177 void setAxisType(
int axis,
int type);
179 int axisNumericFormat(
int axis);
180 int axisNumericPrecision(
int axis);
181 void setAxisNumericFormat(
int axis,
int format,
int precision);
183 void setScales(
double xl,
double xr,
double yl,
double yr,
double zl,
double zr,
int axis = -1);
184 void updateScales(
double xl,
double xr,
double yl,
double yr,
185 double zl,
double zr,
int xcol,
int ycol);
186 void updateScalesFromMatrix(
double xl,
double xr,
double yl,
double yr,
double zl,
double zr);
188 QStringList scaleTicks();
189 void setTicks(
const QStringList& options);
191 void setXAxisTickLength(
double majorLength,
double minorLength);
192 void setYAxisTickLength(
double majorLength,
double minorLength);
193 void setZAxisTickLength(
double majorLength,
double minorLength);
195 void setAxisTickLength(
int axis,
double majorLength,
double minorLength);
196 void setLabelsDistance(
int val);
199 QStringList axisTickLengths();
200 void setTickLengths(
const QStringList& lst);
205 void setPolygonStyle();
206 void setHiddenLineStyle();
207 void setWireframeStyle();
208 void setFilledMeshStyle();
212 void setFloorIsolines();
213 void setEmptyFloor();
215 void setMeshLineWidth(
double lw);
216 double meshLineWidth(){
if (d_active_curve)
return d_active_curve->meshLineWidth();
return 0.0;};
222 void setGrid(
int s,
bool b);
223 void setGrid(
int grids);
225 void setLeftGrid(
bool b =
true);
226 void setRightGrid(
bool b =
true);
227 void setCeilGrid(
bool b =
true);
228 void setFloorGrid(
bool b =
true);
229 void setFrontGrid(
bool b =
true);
230 void setBackGrid(
bool b =
true);
233 void setStyle(
const QStringList& st);
234 void customPlotStyle(
int style);
235 void resetNonEmptyStyle();
237 void setRotation(
double xVal,
double yVal,
double zVal);
238 void setScale(
double xVal,
double yVal,
double zVal);
239 void setShift(
double xVal,
double yVal,
double zVal);
253 double zoom(){
return sp->zoom();};
254 void setZoom(
double val);
256 Qwt3D::PLOTSTYLE plotStyle();
257 Qwt3D::FLOORSTYLE floorStyle();
258 Qwt3D::COORDSTYLE coordStyle();
261 void print(QPrinter *printer);
263 #if QT_VERSION >= 0x040500
264 void exportImage(QTextDocument *document,
int quality,
bool transparent,
265 int dpi,
const QSizeF& customSize,
int unit,
double fontsFactor);
267 QPixmap pixmap(
int dpi = 0,
const QSizeF& customSize = QSizeF(),
int unit =
FrameWidget::Pixel,
double fontsFactor = 1.0);
268 void exportImage(
const QString& fileName,
int quality = 100,
bool transparent =
false,
int dpi = 0,
269 const QSizeF& customSize = QSizeF(),
int unit =
FrameWidget::Pixel,
double fontsFactor = 1.0,
int compression = 0);
270 void exportPDF(
const QString& fileName);
271 void exportVector(
const QString& fileName,
int textExportMode = 0,
int sortMode = 1,
272 const QSizeF& customSize = QSizeF(),
int unit =
FrameWidget::Pixel,
double fontsFactor = 1.0);
273 void exportToFile(
const QString& fileName);
275 void save(
const QString& fn,
const QString& geometry,
bool =
false);
277 void zoomChanged(
double);
278 void rotationChanged(
double,
double,
double);
279 void scaleChanged(
double,
double,
double);
280 void shiftChanged(
double,
double,
double);
286 void setDataColorMap(
const QString& fileName);
287 void setDataColorMap(
const ColorVector& colors);
288 void setDataColorMap(
const ColorVector& colors,
const LinearColorMap& colorMap);
290 void changeTransparency(
double t);
291 void setTransparency(
double t);
305 static bool openColorMapFile(ColorVector& cv, QString fname);
307 void setMeshColor(
const QColor&);
308 void setAxesColor(
const QColor&);
309 void setNumbersColor(
const QColor&);
310 void setLabelsColor(
const QColor&);
311 void setBackgroundColor(
const QColor&);
312 void setGridColor(
const QColor&);
318 void setTitleFont(
const QFont& font);
321 void setTitle(
const QStringList& lst);
322 void setTitle(
const QString& s,
const QColor& color = QColor(Qt::black),
const QFont& font = QFont());
327 void setResolution(
int r);
328 int resolution(){
if (d_active_curve)
return d_active_curve->resolution();
return 0;};
333 void showColorLegend(
bool show =
true);
337 void setOptions(
bool legend,
int r,
int dist);
338 void setOptions(
const QStringList& lst);
344 void setBarRadius(
double rad);
346 void setBarLines(
bool lines =
true);
348 void setFilledBars(
bool filled =
true);
355 void setDotOptions(
double size,
bool smooth);
361 void setCrossOptions(
double rad,
double linewidth,
bool smooth,
bool boxed);
362 void setCrossStyle();
366 void setConeOptions(
double rad,
int quality);
373 void showWorksheet();
376 void setAntialiasing(
bool smooth =
true);
377 bool antialiasing(){
if (d_active_curve)
return d_active_curve->smoothDataMesh();
return false;};
381 void animate(
bool on =
true);
384 void findBestLayout();
390 void setScale(
int axis,
double start,
double end,
int majorTicks,
int minorTicks, Qwt3D::SCALETYPE type);
393 void showOptionsDialog();
397 void addHiddenConstantCurve(
double xl,
double xr,
double yl,
double yr,
double zl,
double zr);
398 void changeScales(
double xl,
double xr,
double yl,
double yr,
double zl,
double zr);
403 void resetAxesType();
417 QColor axesCol, labelsCol,
titleCol, meshCol, bgCol, numCol, gridCol;
453 double operator()(
double x,
double y);
462 double operator()(
double x,
double y);
463 QString
function(){
return formula;};
465 unsigned int rows(){
return d_rows;};
467 void setMesh (
unsigned int columns,
unsigned int rows);
479 const QString& zFormula, Qwt3D::Curve *pw);
480 Triple operator()(
double u,
double v);
482 unsigned int rows(){
return d_rows;};
484 void setMesh (
unsigned int columns,
unsigned int rows);
488 void setPeriodic (
bool u,
bool v);
494 void setDomain(
double ul,
double ur,
double vl,
double vr);
501 QString d_x_formula, d_y_formula, d_z_formula;
Qwt3D::Plot3D * sp
Definition: Graph3D.h:438
double yRotation()
Definition: Graph3D.h:242
Table * d_table
Definition: Graph3D.h:436
QString d_color_map_file
File name of the color map used for the data (if any)
Definition: Graph3D.h:407
bool isLegendOn()
Definition: Graph3D.h:334
QColor axesColor()
Definition: Graph3D.h:295
double yShift()
Definition: Graph3D.h:250
Curve * d_active_curve
Definition: Graph3D.h:443
bool crossHairSmooth
Definition: Graph3D.h:433
Class for user defined parametric surfaces.
Definition: Graph3D.h:475
Class for constant z surfaces.
Definition: Graph3D.h:449
unsigned int columns()
Definition: Graph3D.h:483
QColor labelColor()
Definition: Graph3D.h:296
void setScaleOnPrint(bool on)
Definition: Graph3D.h:79
UserParametricSurface * parametricSurface()
Definition: Graph3D.h:119
bool d_scale_on_print
Definition: Graph3D.h:415
int conesQuality
Definition: Graph3D.h:434
Matrix * matrix()
Definition: Graph3D.h:95
int axisType(int axis)
Definition: Graph3D.h:176
QString xFormula()
Definition: Graph3D.h:496
LinearColorMap d_color_map
Definition: Graph3D.h:408
double uStart()
Definition: Graph3D.h:490
double zRotation()
Definition: Graph3D.h:243
QFont titleFont()
Definition: Graph3D.h:317
void setOrthogonal(bool on=true)
Definition: Graph3D.h:144
QString formula
Definition: Graph3D.h:470
QString zFormula()
Definition: Graph3D.h:498
bool smoothCrossHair()
Definition: Graph3D.h:357
void setAutoscale(bool on=true)
Enables/Disables autoscaling using findBestLayout().
Definition: Graph3D.h:387
void setDataColors(const QColor &cMin, const QColor &cMax)
Definition: Graph3D.h:284
int resolution()
Definition: Graph3D.h:328
double crossHairRadius()
Definition: Graph3D.h:359
bool ignoreFonts
Definition: Graph3D.h:419
unsigned int columns()
Definition: Graph3D.h:466
bool antialiasing()
Definition: Graph3D.h:377
bool hasData()
Definition: Graph3D.h:110
QVector< int > scaleType
Definition: Graph3D.h:416
PointStyle
Definition: Graph3D.h:71
QColor titleCol
Definition: Graph3D.h:417
int coneQuality()
Definition: Graph3D.h:365
PointStyle pointStyle
Definition: Graph3D.h:435
Qwt3D::Plot3D * surface()
Definition: Graph3D.h:76
bool printCropmarksEnabled()
Definition: Graph3D.h:81
double xShift()
Definition: Graph3D.h:249
LinearColorMap colorMap()
Definition: Graph3D.h:302
A customized QwtLinearColorMap.
Definition: LinearColorMap.h:39
bool d_filled_bars
Definition: Graph3D.h:427
double d_point_size
Definition: Graph3D.h:430
Curve * d_const_curve
Definition: Graph3D.h:445
LinearColorMap * colorMapPointer()
Definition: Graph3D.h:303
double crossHairLinewidth()
Definition: Graph3D.h:360
QColor gridColor()
Definition: Graph3D.h:299
bool barLines()
Definition: Graph3D.h:345
double yScale()
Definition: Graph3D.h:246
QTimer * d_timer
Definition: Graph3D.h:410
void setIgnoreFonts(bool ok)
Definition: Graph3D.h:135
QStringList axesLabels()
Definition: Graph3D.h:146
Matrix * d_matrix
Definition: Graph3D.h:437
double pointsSize()
Definition: Graph3D.h:353
PlotType
Definition: Graph3D.h:70
void printCropmarks(bool on)
Definition: Graph3D.h:82
QColor numColor()
Definition: Graph3D.h:297
bool isOrthogonal()
Definition: Graph3D.h:143
QtiPlot's main window.
Definition: ApplicationWindow.h:133
bool smoothPoints()
Definition: Graph3D.h:354
double coneRadius()
Definition: Graph3D.h:364
double xRotation()
Definition: Graph3D.h:241
bool boxedCrossHair()
Definition: Graph3D.h:358
bool d_smooth_points
Draw 3D points with smoothed angles.
Definition: Graph3D.h:432
UserFunction * d_func
Definition: Graph3D.h:439
3D graph widget.
Definition: Graph3D.h:62
QFont titleFnt
Definition: Graph3D.h:413
double transparency()
Definition: Graph3D.h:292
double vEnd()
Definition: Graph3D.h:493
double meshLineWidth()
Definition: Graph3D.h:216
Matrix worksheet class.
Definition: Matrix.h:57
PlotType tablePlotType()
Definition: Graph3D.h:107
QColor meshColor()
Definition: Graph3D.h:294
QStringList labels
Definition: Graph3D.h:412
QColor titleColor()
Definition: Graph3D.h:320
Table * table()
Definition: Graph3D.h:372
void setPlotAssociation(const QString &s)
Definition: Graph3D.h:374
PointStyle pointType()
Definition: Graph3D.h:369
bool filledBars()
Definition: Graph3D.h:347
UserParametricSurface * d_surface
Definition: Graph3D.h:440
double d_vr
Definition: Graph3D.h:504
double xScale()
Definition: Graph3D.h:245
double uEnd()
Definition: Graph3D.h:491
int labelsDistance()
Definition: Graph3D.h:197
UserFunction * userFunction()
Definition: Graph3D.h:124
bool scaleOnPrint()
Definition: Graph3D.h:78
Qwt3D::StandardColor * col_
Definition: Graph3D.h:420
QString yFormula()
Definition: Graph3D.h:497
AxisNumericFormat
Definition: Graph3D.h:72
double zScale()
Definition: Graph3D.h:247
double d_bars_rad
Definition: Graph3D.h:426
QString colorMapFile()
Definition: Graph3D.h:301
QColor bgColor()
Definition: Graph3D.h:298
PlotType d_table_plot_type
Definition: Graph3D.h:442
double zoom()
Definition: Graph3D.h:253
Base class of all MDI client windows.
Definition: MdiSubWindow.h:51
Class for user defined surfaces.
Definition: Graph3D.h:457
bool isAnimated()
Definition: Graph3D.h:382
unsigned int d_rows
Definition: Graph3D.h:502
unsigned int rows()
Definition: Graph3D.h:465
Qwt3D::PLOTSTYLE style_
Definition: Graph3D.h:441
MDI window providing a spreadsheet table with column logic.
Definition: Table.h:57
bool uPeriodic()
Definition: Graph3D.h:486
ConstFunction * d_const_func
Definition: Graph3D.h:444
QString plotTitle()
Definition: Graph3D.h:319
bool d_v_periodic
Definition: Graph3D.h:503
double d_alpha
Transparency.
Definition: Graph3D.h:422
bool legendOn
Definition: Graph3D.h:414
int legendMajorTicks
Definition: Graph3D.h:418
bool autoscale()
Definition: Graph3D.h:385
double vStart()
Definition: Graph3D.h:492
int animation_redraw_wait
Wait this many msecs before redraw 3D plot (used for animations)
Definition: Graph3D.h:405
QString title
Definition: Graph3D.h:411
unsigned int d_rows
Definition: Graph3D.h:471
double zShift()
Definition: Graph3D.h:251
unsigned int rows()
Definition: Graph3D.h:482
bool vPeriodic()
Definition: Graph3D.h:487
Qwt3D::CoordinateSystem * coordinateSystem()
Definition: Graph3D.h:389