scidavis  2.3.0
About: SciDAVis is a free application for Scientific Data Analysis and Visualization (a fork off of QtiPlot).
  Fossies Dox: scidavis-2.3.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Graph3D Class Reference

3D graph widget. More...

#include <Graph3D.h>

Inheritance diagram for Graph3D:
[legend]
Collaboration diagram for Graph3D:
[legend]

Public Types

enum  PlotType { Scatter =0, Trajectory = 1, Bars = 2 }
 
enum  PointStyle {
  None =0, Dots =1, VerticalBars =2, HairCross =3,
  Cones =4
}
 
enum  CaptionPolicy { Name = 0, Label = 1, Both = 2 }
 Possible window captions. More...
 
enum  Status { Hidden = -1, Normal = 0, Minimized = 1, Maximized = 2 }
 

Public Slots

void copy (Graph3D *g)
 
void initPlot ()
 
void initCoord ()
 
void addFunction (const QString &s, double xl, double xr, double yl, double yr, double zl, double zr)
 
void insertFunction (const QString &s, double xl, double xr, double yl, double yr, double zl, double zr)
 
void insertNewData (Table *table, const QString &colName)
 
Matrixmatrix ()
 

Signals

void closedWindow (MyWidget *)
 Emitted when the window was closed. More...
 
void hiddenWindow (MyWidget *)
 Emitted when the window was hidden. More...
 
void modifiedWindow (MyWidget *)
 
void resizedWindow (MyWidget *)
 
void statusChanged (MyWidget *)
 Emitted when the window status changed. More...
 
void showTitleBarMenu ()
 Emitted when the title bar recieves a QContextMenuEvent. More...
 

Public Member Functions

 Graph3D (const QString &label, QWidget *parent=0, const char *name=0, Qt::WindowFlags f=0)
 
 ~Graph3D ()
 
void addMatrixData (Matrix *m)
 
void addMatrixData (Matrix *m, double xl, double xr, double yl, double yr, double zl, double zr)
 
void updateMatrixData (Matrix *m)
 
void addData (Table *table, const QString &colName)
 
void addData (Table *table, int xcol, int ycol)
 
void addData (Table *table, const QString &xColName, const QString &yColName)
 
void addData (Table *table, const QString &xColName, const QString &yColName, double xl, double xr, double yl, double yr, double zl, double zr)
 
void addData (Table *table, int xCol, int yCol, int zCol, int type)
 
void addData (Table *table, int xCol, int yCol, int zCol, double xl, double xr, double yl, double yr, double zl, double zr)
 
void clearData ()
 
bool hasData ()
 
void updateData (Table *table)
 
void updateDataXY (Table *table, int xCol, int yCol)
 
void updateDataXYZ (Table *table, int xCol, int yCol, int zCol)
 
void changeMatrix (Matrix *m)
 
void changeDataColumn (Table *table, const QString &colName)
 
virtual QString windowLabel ()
 Return the window label. More...
 
virtual void setWindowLabel (const QString &s)
 Set the window label. More...
 
virtual QString name ()
 Return the window name. More...
 
virtual void setName (const QString &s)
 Set the window name. More...
 
virtual CaptionPolicy captionPolicy ()
 Return the caption policy. More...
 
virtual void setCaptionPolicy (CaptionPolicy policy)
 Set the caption policy. More...
 
virtual QString birthDate ()
 Return the creation date. More...
 
virtual void setBirthDate (const QString &s)
 Set the creation date. More...
 
QString aspect ()
 Return the window status as a string. More...
 
Status status ()
 Return the window status flag (hidden, normal, minimized or maximized) More...
 
void setStatus (Status s)
 Set the window status flag (hidden, normal, minimized or maximized) More...
 
virtual void restore (const QStringList &)
 Not implemented yet. More...
 
virtual void setHidden ()
 Notifies that a window was hidden by a direct user action. More...
 
void closeEvent (QCloseEvent *)
 Close event handler. More...
 
void askOnCloseEvent (bool ask)
 Toggle the "ask on close" flag. More...
 
Folderfolder ()
 Returns the pointer to the parent folder of the window. More...
 
void setFolder (Folder *f)
 Initializes the pointer to the parent folder of the window. More...
 
void notifyChanges ()
 Notifies the main application that the window has been modified. More...
 
void setNormal ()
 
void setMinimized ()
 
void setMaximized ()
 
User Functions
UserFunctionuserFunction ()
 
QString formula ()
 
Event Handlers
bool eventFilter (QObject *object, QEvent *e)
 
void resizeEvent (QResizeEvent *)
 
void contextMenuEvent (QContextMenuEvent *e)
 
void scaleFonts (double factor)
 
void setIgnoreFonts (bool ok)
 
Axes
void setFramed ()
 
void setBoxed ()
 
void setNoAxes ()
 
bool isOrthogonal ()
 
void setOrtho (bool on=true)
 
QStringList axesLabels ()
 
void updateLabel (int axis, const QString &label, const QFont &f)
 
void setAxesLabels (const QStringList &lst)
 
void resetAxesLabels ()
 
QFont xAxisLabelFont ()
 
QFont yAxisLabelFont ()
 
QFont zAxisLabelFont ()
 
void setXAxisLabelFont (const QFont &fnt)
 
void setYAxisLabelFont (const QFont &fnt)
 
void setZAxisLabelFont (const QFont &fnt)
 
void setXAxisLabelFont (const QStringList &lst)
 
void setYAxisLabelFont (const QStringList &lst)
 
void setZAxisLabelFont (const QStringList &lst)
 
QFont numbersFont ()
 
void setNumbersFont (const QFont &font)
 
void setNumbersFont (const QStringList &lst)
 
double xStart ()
 
double xStop ()
 
double yStart ()
 
double yStop ()
 
double zStart ()
 
double zStop ()
 
QStringList scaleLimits ()
 
void updateScale (int axis, const QStringList &options)
 
void updateScales (double xl, double xr, double yl, double yr, double zl, double zr)
 
void updateScales (double xl, double xr, double yl, double yr, double zl, double zr, int xcol, int ycol)
 
void updateScales (double xl, double xr, double yl, double yr, double zl, double zr, int xCol, int yCol, int zCol)
 
void updateScalesFromMatrix (double xl, double xr, double yl, double yr, double zl, double zr)
 
QStringList scaleTicks ()
 
void setTicks (const QStringList &options)
 
void updateTickLength (int, double majorLength, double minorLength)
 
void adjustLabels (int val)
 
int labelsDistance ()
 
QStringList axisTickLengths ()
 
void setTickLengths (const QStringList &lst)
 
Mesh
void setNoGrid ()
 
void setHiddenLineGrid ()
 
void setLineGrid ()
 
void setFilledMesh ()
 
void setPointsMesh ()
 
void setBarsPlot ()
 
void setFloorData ()
 
void setFloorIsolines ()
 
void setEmptyFloor ()
 
void setMeshLineWidth (int lw)
 
double meshLineWidth ()
 
Grid
int grids ()
 
void setGrid (Qwt3D::SIDE s, bool b)
 
void setGrid (int grids)
 
void setLeftGrid (bool b)
 
void setRightGrid (bool b)
 
void setCeilGrid (bool b)
 
void setFloorGrid (bool b)
 
void setFrontGrid (bool b)
 
void setBackGrid (bool b)
 
void setStyle (Qwt3D::COORDSTYLE coord, Qwt3D::FLOORSTYLE floor, Qwt3D::PLOTSTYLE plot, Graph3D::PointStyle point)
 
void setStyle (const QStringList &st)
 
void customPlotStyle (int style)
 
void resetNonEmptyStyle ()
 
void setRotation (double xVal, double yVal, double zVal)
 
void setScale (double xVal, double yVal, double zVal)
 
void setShift (double xVal, double yVal, double zVal)
 
void updateScaling (double xVal, double yVal, double zVal)
 
double xRotation ()
 
double yRotation ()
 
double zRotation ()
 
double xScale ()
 
double yScale ()
 
double zScale ()
 
double xShift ()
 
double yShift ()
 
double zShift ()
 
double zoom ()
 
void setZoom (double val)
 
void updateZoom (double val)
 
Qwt3D::PLOTSTYLE plotStyle ()
 
Qwt3D::FLOORSTYLE floorStyle ()
 
Qwt3D::COORDSTYLE coordStyle ()
 
void print ()
 
void copyImage ()
 
void exportImage (const QString &fileName, int quality=100, bool transparent=false)
 
void exportPDF (const QString &fileName)
 
void exportVector (const QString &fileName, const QString &fileType="pdf")
 
QString saveToString (const QString &geometry)
 
QString saveAsTemplate (const QString &geometryInfo)
 
void zoomChanged (double)
 
void rotationChanged (double, double, double)
 
void scaleChanged (double, double, double)
 
void shiftChanged (double, double, double)
 
Colors
void setDataColors (const QColor &cMax, const QColor &cMin)
 
void updateColors (const QColor &meshColor, const QColor &axesColor, const QColor &numColor, const QColor &labelColor, const QColor &bgColor, const QColor &gridColor)
 
void changeTransparency (double t)
 
void setTransparency (double t)
 
double transparency ()
 
QColor minDataColor ()
 
QColor maxDataColor ()
 
QColor meshColor ()
 
QColor axesColor ()
 
QColor labelColor ()
 
QColor numColor ()
 
QColor bgColor ()
 
QColor gridColor ()
 
QString colorMap ()
 
void setDataColorMap (const QString &fileName)
 
bool openColorMap (ColorVector &cv, QString fname)
 
void setColors (const QStringList &colors)
 
void setColors (const QColor &meshColor, const QColor &axesColor, const QColor &numColor, const QColor &labelColor, const QColor &bgColor, const QColor &gridColor)
 
Title
void updateTitle (const QString &s, const QColor &color, const QFont &font)
 
QFont titleFont ()
 
void setTitleFont (const QFont &font)
 
QString plotTitle ()
 
QColor titleColor ()
 
void setTitle (const QStringList &lst)
 
void setTitle (const QString &s, const QColor &color, const QFont &font)
 
Resolution
void setResolution (int r)
 
int resolution ()
 
Legend
void showColorLegend (bool show)
 
bool isLegendOn ()
 
void setOptions (bool legend, int r, int dist)
 
void setOptions (const QStringList &lst)
 
void update ()
 
Bars
double barsRadius ()
 
void setBarsRadius (double rad)
 
void updateBars (double rad)
 

Public Attributes

Qwt3D::SurfacePlot * sp
 
UserFunctionfunc
 

Protected Slots

void updateCaption ()
 Set caption according to current CaptionPolicy, name and label. More...
 

Protected Member Functions

virtual void changeEvent (QEvent *event)
 

Protected Attributes

FolderparentFolder
 Pointer to the parent folder of the window. More...
 
QString w_label
 The window label. More...
 
QString birthdate
 The creation date. More...
 
Status w_status
 The window status. More...
 
CaptionPolicy caption_policy
 The caption policy. More...
 
bool askOnClose
 Toggle on/off: Ask the user "delete, hide, or cancel?" on a close event. More...
 

Scatter Plots

int animation_redraw_wait
 Wait this many msecs before redraw 3D plot (used for animations) More...
 
QString color_map
 File name of the color map used for the data (if any) More...
 
QTimer * d_timer
 
QString title
 
QString plotAssociation
 
QStringList labels
 
QFont titleFnt
 
bool legendOn
 
bool smoothMesh
 
bool d_autoscale
 
QVector< int > scaleType
 
QColor axesCol
 
QColor labelsCol
 
QColor titleCol
 
QColor meshCol
 
QColor bgCol
 
QColor numCol
 
QColor gridCol
 
QColor fromColor
 Custom data colors. More...
 
QColor toColor
 
int labelsDist
 
int legendMajorTicks
 
bool ignoreFonts
 
Qwt3D::StandardColor * col_
 
double barsRad
 
double alpha
 
double pointSize
 
double crossHairRad
 
double crossHairLineWidth
 
double conesRad
 
bool smooth
 Draw 3D points with smoothed angles. More...
 
bool crossHairSmooth
 
bool crossHairBoxed
 
int conesQuality
 
PointStyle pointStyle
 
Tableworksheet
 
Matrixd_matrix
 
Qwt3D::PLOTSTYLE style_
 
double pointsSize ()
 
bool smoothPoints ()
 
void updatePoints (double size, bool sm)
 
bool smoothCrossHair ()
 
bool boxedCrossHair ()
 
double crossHairRadius ()
 
double crossHairLinewidth ()
 
void updateCross (double rad, double linewidth, bool smooth, bool boxed)
 
void setCrossOptions (double rad, double linewidth, bool smooth, bool boxed)
 
void setCrossMesh ()
 
double coneRadius ()
 
int coneQuality ()
 
void updateCones (double rad, int quality)
 
void setConesOptions (double rad, int quality)
 
void setConesMesh ()
 
PointStyle pointType ()
 
void setPointOptions (double size, bool s)
 
TablegetTable ()
 
void showWorksheet ()
 
void setPlotAssociation (const QString &s)
 
void setSmoothMesh (bool smooth)
 
void rotate ()
 Used for the animation: rotates the scene with 1/360 degrees. More...
 
void animate (bool on=true)
 
bool isAnimated ()
 
void findBestLayout ()
 
bool autoscale ()
 
void setAutoscale (bool on=true)
 Enables/Disables autoscaling using findBestLayout(). More...
 
void showContextMenu ()
 
void showOptionsDialog ()
 
void modified ()
 
void custom3DActions (MyWidget *)
 
Qwt3D::Triple ** allocateData (int columns, int rows)
 
void deleteData (Qwt3D::Triple **data, int columns)
 

Detailed Description

3D graph widget.

This provides 3D plotting using Qwt3D.

Future Plans

If MultiLayer is extended to accept any QWidget, Graph3D wouldn't have to inherit from MyWidget any more. It could also make sense to unify the interface with other plot types; see documentation of Graph. Big problem here: export to vector formats. Qwt3D's export filters write directly to a file, so they can't be combined with output generated via QPrinter.

Definition at line 56 of file Graph3D.h.

Member Enumeration Documentation

◆ CaptionPolicy

enum MyWidget::CaptionPolicy
inherited

Possible window captions.

Enumerator
Name 

caption determined by the window name

Label 

caption detemined by the window label

Both 

caption = "name - label"

Definition at line 68 of file MyWidget.h.

68  {
69  Name = 0,
70  Label = 1,
71  Both = 2
72  };

◆ PlotType

Enumerator
Scatter 
Trajectory 
Bars 

Definition at line 64 of file Graph3D.h.

64 {Scatter=0, Trajectory = 1, Bars = 2};

◆ PointStyle

Enumerator
None 
Dots 
VerticalBars 
HairCross 
Cones 

Definition at line 65 of file Graph3D.h.

65 {None=0, Dots=1, VerticalBars=2, HairCross=3, Cones=4};

◆ Status

enum MyWidget::Status
inherited
Enumerator
Hidden 
Normal 
Minimized 
Maximized 

Definition at line 73 of file MyWidget.h.

73 {Hidden = -1, Normal = 0, Minimized = 1, Maximized = 2};

Constructor & Destructor Documentation

◆ Graph3D()

Graph3D::Graph3D ( const QString &  label,
QWidget *  parent = 0,
const char *  name = 0,
Qt::WindowFlags  f = 0 
)

Definition at line 88 of file Graph3D.cpp.

89 : MyWidget(label,parent,name,f)
90 {
91  initPlot();
92 }

References initPlot().

Here is the call graph for this function:

◆ ~Graph3D()

Graph3D::~Graph3D ( )

Definition at line 3014 of file Graph3D.cpp.

3015 {
3016  if (func)
3017  delete func;
3018 
3019  delete sp;
3020 }

References func, and sp.

Member Function Documentation

◆ addData() [1/6]

void Graph3D::addData ( Table table,
const QString &  colName 
)

Definition at line 294 of file Graph3D.cpp.

295 {
296  int ycol = table->colIndex(colName);
297  int xcol=table->colX(ycol);
298  plotAssociation = table->colName(xcol)+"(X)," + colName + "(Y)";
299 
300  addData(table, xcol, ycol);
301 }

References Table::colIndex(), Table::colName(), Table::colX(), and plotAssociation.

Referenced by addData(), ApplicationWindow::dataPlot3D(), ApplicationWindow::dataPlotXYZ(), insertNewData(), PlotWizard::plot3D(), and PlotWizard::plot3DRibbon().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addData() [2/6]

void Graph3D::addData ( Table table,
const QString &  xColName,
const QString &  yColName 
)

Definition at line 303 of file Graph3D.cpp.

304 {
305  int xcol=table->colIndex(xColName);
306  plotAssociation = table->colName(xcol)+"(X)," + yColName+"(Y)";
307 
308  addData(table, xcol, table->colIndex(yColName));
309 }

References addData(), Table::colIndex(), Table::colName(), and plotAssociation.

Here is the call graph for this function:

◆ addData() [3/6]

void Graph3D::addData ( Table table,
const QString &  xColName,
const QString &  yColName,
double  xl,
double  xr,
double  yl,
double  yr,
double  zl,
double  zr 
)

Definition at line 365 of file Graph3D.cpp.

367 {
368  worksheet=table;
369  int r=table->numRows();
370  int xcol=table->colIndex(xColName);
371  int ycol=table->colIndex(yColName);
372 
373  QString s=table->colName(xcol)+"(X),";
374  s+=yColName+"(Y)";
375  plotAssociation = s;
376 
377  int i, j, xmesh=0, ymesh=2;
378  double xv, yv;
379 
380  for (i = 0; i < r; i++)
381  {
382  if (!table->column(xcol)->isInvalid(i) && !table->column(ycol)->isInvalid(i))
383  {
384  xv=table->cell(i, xcol);
385  if (xv>=xl && xv <= xr)
386  xmesh++;
387  }
388  }
389 
390  if (xmesh == 0)
391  xmesh++;
392 
393  double **data = Matrix::allocateMatrixData(xmesh, ymesh);
394  for ( j = 0; j < ymesh; j++)
395  {
396  int k=0;
397  for ( i = 0; i < r; i++)
398  {
399  if (!table->column(xcol)->isInvalid(i) && !table->column(ycol)->isInvalid(i))
400  {
401  xv=table->cell(i,xcol);
402  if (xv>=xl && xv <= xr)
403  {
404  yv=table->cell(i,ycol);
405  if (yv > zr)
406  data[k][j] = zr;
407  else if (yv < zl)
408  data[k][j] = zl;
409  else
410  data[k][j] = yv;
411  k++;
412  }
413  }
414  }
415  }
416  sp->makeCurrent();
417  sp->loadFromData(data, xmesh, ymesh, xl, xr, yl, yr);
418  sp->createCoordinateSystem(Triple(xl, yl, zl), Triple(xr, yr, zr));
419  sp->legend()->setLimits(zl, zr);
420  sp->legend()->setMajors(legendMajorTicks);
421 
423 }

References Matrix::allocateMatrixData(), Table::cell(), Table::colIndex(), Table::colName(), Table::column(), Matrix::freeMatrixData(), Column::isInvalid(), legendMajorTicks, Table::numRows(), plotAssociation, sp, and worksheet.

Here is the call graph for this function:

◆ addData() [4/6]

void Graph3D::addData ( Table table,
int  xcol,
int  ycol 
)

used when creating a ribbon plot from the plot wizard

Definition at line 245 of file Graph3D.cpp.

246 {
247  worksheet=table;
248  int r=table->numRows();
249  int i, xmesh=0, ymesh=2;
250  for (i = 0; i < r; i++)
251  {
252  if (!table->column(xcol)->isInvalid(i) && !table->column(ycol)->isInvalid(i))
253  xmesh++;
254  }
255 
256  if (xmesh == 0)
257  xmesh++;
258 
259  double **data = Matrix::allocateMatrixData(xmesh, ymesh);
260  gsl_vector * x = gsl_vector_alloc (xmesh);
261  gsl_vector * y = gsl_vector_alloc (xmesh);
262 
263  for (int j = 0; j < ymesh; j++)
264  {
265  int k=0;
266  for (i = 0; i < r; i++)
267  {
268  if (!table->column(xcol)->isInvalid(i) && !table->column(ycol)->isInvalid(i))
269  {
270  gsl_vector_set (x, k, table->cell(i, xcol));
271 
272  double yv = table->cell(i, ycol);
273  gsl_vector_set (y, k, yv);
274  data[k][j] = yv;
275  k++;
276  }
277  }
278  }
279 
280  double maxy=gsl_vector_max(y);
281  double maxz=0.6*maxy;
282  sp->makeCurrent();
283  sp->legend()->setLimits(gsl_vector_min(y),maxy);
284  sp->loadFromData(data, xmesh, ymesh, gsl_vector_min(x),gsl_vector_max(x),0,maxz);
285 
286  if (d_autoscale)
287  findBestLayout();
288 
289  gsl_vector_free (x);
290  gsl_vector_free (y);
292 }

References Matrix::allocateMatrixData(), Table::cell(), Table::column(), d_autoscale, findBestLayout(), Matrix::freeMatrixData(), Column::isInvalid(), Table::numRows(), sp, and worksheet.

Here is the call graph for this function:

◆ addData() [5/6]

void Graph3D::addData ( Table table,
int  xCol,
int  yCol,
int  zCol,
double  xl,
double  xr,
double  yl,
double  yr,
double  zl,
double  zr 
)

Definition at line 519 of file Graph3D.cpp.

521 {
522  worksheet=table;
523  int r=table->numRows();
524 
525  QString s=table->colName(xCol)+"(X),";
526  s+=table->colName(yCol)+"(Y),";
527  s+=table->colName(zCol)+"(Z)";
528  plotAssociation = s;
529 
530  int i,j,columns=0;
531  double xv,yv;
532  for ( i = 0; i < r; i++)
533  {
534  if (!table->column(xCol)->isInvalid(i) && !table->column(yCol)->isInvalid(i) && !table->column(zCol)->isInvalid(i))
535  {
536  xv=table->cell(i,xCol);
537  yv=table->cell(i,yCol);
538  if (xv >= xl && xv <= xr && yv >= yl && yv <= yr)
539  columns++;
540  }
541  }
542 
543  if (columns == 0)
544  columns++;
545 
546  Qwt3D::Triple **data=allocateData(columns,columns);
547  for (j = 0; j < columns; j++)
548  {
549  int k=0;
550  for ( i = 0; i < r; i++)
551  {
552  if (!table->column(xCol)->isInvalid(i) && !table->column(yCol)->isInvalid(i) && !table->column(zCol)->isInvalid(i))
553  {
554  xv=table->cell(i,xCol);
555  yv=table->cell(i,yCol);
556  if (xv >= xl && xv <= xr && yv >= yl && yv <= yr)
557  {
558  double zv=table->cell(i,zCol);
559  if (zv > zr)
560  data[k][j] = Triple(xv,yv,zr);
561  else if (zv < zl)
562  data[k][j] = Triple(xv,yv,zl);
563  else
564  data[k][j] = Triple(xv,yv,zv);
565  k++;
566  }
567  }
568  }
569  }
570  sp->makeCurrent();
571  sp->loadFromData (data, columns, columns, false, false);
572  sp->createCoordinateSystem(Triple(xl, yl, zl), Triple(xr, yr, zr));
573  sp->legend()->setLimits(zl, zr);
574  sp->legend()->setMajors(legendMajorTicks);
575 
576  deleteData(data,columns);
577 }

References allocateData(), Table::cell(), Table::colName(), Table::column(), deleteData(), Column::isInvalid(), legendMajorTicks, Table::numRows(), plotAssociation, sp, and worksheet.

Here is the call graph for this function:

◆ addData() [6/6]

void Graph3D::addData ( Table table,
int  xCol,
int  yCol,
int  zCol,
int  type 
)

Definition at line 449 of file Graph3D.cpp.

450 {
451  worksheet=table;
452  int r=table->numRows();
453 
454  QString s=table->colName(xCol)+"(X),";
455  s+=table->colName(yCol)+"(Y),";
456  s+=table->colName(zCol)+"(Z)";
457  plotAssociation = s;
458 
459  int i,j,columns=0;
460  for ( i = 0; i < r; i++)
461  {
462  if (!table->column(xCol)->isInvalid(i) && !table->column(yCol)->isInvalid(i) && !table->column(zCol)->isInvalid(i))
463  columns++;
464  }
465 
466  if (columns == 0)
467  columns++;
468 
469  Qwt3D::Triple **data=allocateData(columns,columns);
470  for (j = 0; j < columns; j++)
471  {
472  int k=0;
473  for ( i = 0; i < r; i++)
474  {
475  if (!table->column(xCol)->isInvalid(i) && !table->column(yCol)->isInvalid(i) && !table->column(zCol)->isInvalid(i))
476  {
477  double xv=table->cell(i,xCol);
478  double yv=table->cell(i,yCol);
479  double zv=table->cell(i,zCol);
480 
481  data[k][j] = Triple(xv,yv,zv);
482  k++;
483  }
484  }
485  }
486 
487  sp->makeCurrent();
488  sp->loadFromData (data, columns, columns, false,false);
489 
490  double start, end;
491  sp->coordinates()->axes[Z1].limits (start, end);
492  sp->legend()->setLimits(start, end);
493  sp->legend()->setMajors(legendMajorTicks);
494 
495  if (type == Scatter)
496  {
497  Dot d(pointSize, smooth);
498  sp->setPlotStyle(d);
500  style_ = Qwt3D::USER;
501  }
502  else if (type == Trajectory)
503  {
504  legendOn=false;
505  sp->showColorLegend(legendOn);
506  }
507  else
508  {
509  sp->setPlotStyle(Bar(barsRad));
511  style_ = Qwt3D::USER;
512  }
513 
514  if (d_autoscale)
515  findBestLayout();
516  deleteData(data,columns);
517 }

References allocateData(), barsRad, Table::cell(), Table::colName(), Table::column(), d_autoscale, deleteData(), Dots, findBestLayout(), Column::isInvalid(), legendMajorTicks, legendOn, Table::numRows(), plotAssociation, pointSize, pointStyle, Scatter, smooth, sp, style_, Trajectory, VerticalBars, and worksheet.

Here is the call graph for this function:

◆ addFunction

void Graph3D::addFunction ( const QString &  s,
double  xl,
double  xr,
double  yl,
double  yr,
double  zl,
double  zr 
)
slot

Definition at line 212 of file Graph3D.cpp.

214 {
215  sp->makeCurrent();
216  sp->resize(this->size());
217 
218  func= new UserFunction(s, *sp);
219 
220  func->setMesh(41,31);
221  func->setDomain(xl,xr,yl,yr);
222  func->setMinZ(zl);
223  func->setMaxZ(zr);
224  func->create();
225 
226  sp->legend()->setLimits(zl,zr);
227 
228  if (sp->plotStyle() == NOPLOT)
229  {
230  sp->setPlotStyle(FILLED);
231  style_=FILLED;
232  pointStyle = None;
233  }
234  sp->createCoordinateSystem(Triple(xl, yl, zl), Triple(xr, yr, zr));
235  findBestLayout();
236 }

References findBestLayout(), func, None, pointStyle, sp, and style_.

Referenced by insertFunction(), and ApplicationWindow::newPlot3D().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addMatrixData() [1/2]

void Graph3D::addMatrixData ( Matrix m)

Definition at line 319 of file Graph3D.cpp.

320 {
321  if (d_matrix == m)
322  return;
323 
324  bool first_time = false;
325  if(!d_matrix)
326  first_time = true;
327 
328  d_matrix = m;
329  plotAssociation = "matrix<" + QString(m->name()) + ">";
330 
331  int cols = m->numCols();
332  int rows = m->numRows();
333  double **data_matrix = Matrix::allocateMatrixData(rows, cols);
334  for (int i = 0; i < rows; i++ )
335  {
336  for (int j = 0; j < cols; j++)
337  data_matrix[i][j] = m->cell(i,j);
338  }
339 
340  sp->makeCurrent();
341  sp->loadFromData(data_matrix, rows, cols, m->xStart(), m->xEnd(),
342  m->yStart(), m->yEnd());
343 
344  double start, end;
345  sp->coordinates()->axes[Z1].limits (start, end);
346  sp->legend()->setLimits(start, end);
347  sp->legend()->setMajors(legendMajorTicks);
348 
349  Matrix::freeMatrixData(data_matrix, rows);
350 
351  if (d_autoscale || first_time)
352  findBestLayout();
353  update();
354 }

References Matrix::allocateMatrixData(), Matrix::cell(), d_autoscale, d_matrix, findBestLayout(), Matrix::freeMatrixData(), legendMajorTicks, Matrix::name(), Matrix::numCols(), Matrix::numRows(), plotAssociation, sp, update(), Matrix::xEnd(), Matrix::xStart(), Matrix::yEnd(), and Matrix::yStart().

Referenced by changeMatrix(), ApplicationWindow::openMatrixPlot3D(), and ApplicationWindow::plot3DMatrix().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ addMatrixData() [2/2]

void Graph3D::addMatrixData ( Matrix m,
double  xl,
double  xr,
double  yl,
double  yr,
double  zl,
double  zr 
)

Definition at line 356 of file Graph3D.cpp.

358 {
359  d_matrix = m;
360  plotAssociation = "matrix<" + QString(m->name()) + ">";
361 
362  updateScalesFromMatrix(xl, xr, yl, yr, zl, zr);
363 }

References d_matrix, Matrix::name(), plotAssociation, and updateScalesFromMatrix().

Here is the call graph for this function:

◆ adjustLabels()

void Graph3D::adjustLabels ( int  val)

Definition at line 802 of file Graph3D.cpp.

803 {
804  if (labelsDist != val)
805  {
806  labelsDist=val;
807  sp->coordinates()->adjustLabels(val);
808  sp->makeCurrent();
809  sp->updateGL();
810  }
811  emit modified();
812 }

References labelsDist, modified(), and sp.

Referenced by setOptions().

Here is the caller graph for this function:

◆ allocateData()

Qwt3D::Triple ** Graph3D::allocateData ( int  columns,
int  rows 
)
private

Definition at line 2727 of file Graph3D.cpp.

2728 {
2729  Qwt3D::Triple** data = new Qwt3D::Triple* [columns];
2730 
2731  for ( int i = 0; i < columns; ++i)
2732  {
2733  data[i] = new Qwt3D::Triple [rows];
2734  }
2735  return data;
2736 }

Referenced by addData(), updateDataXYZ(), and updateScales().

Here is the caller graph for this function:

◆ animate()

void Graph3D::animate ( bool  on = true)

Turns 3D animation on or off

Definition at line 2867 of file Graph3D.cpp.

2868 {
2869 if ( on )
2870  d_timer->start( animation_redraw_wait ); // Wait this many msecs before redraw
2871 else
2872  d_timer->stop();
2873 }

References animation_redraw_wait, and d_timer.

Referenced by copy().

Here is the caller graph for this function:

◆ askOnCloseEvent()

void MyWidget::askOnCloseEvent ( bool  ask)
inlineinherited

Toggle the "ask on close" flag.

Definition at line 123 of file MyWidget.h.

123 {askOnClose = ask;};

References MyWidget::askOnClose.

Referenced by ApplicationWindow::connectMultilayerPlot(), ApplicationWindow::connectSurfacePlot(), ApplicationWindow::connectTable(), ApplicationWindow::deleteFitTables(), ApplicationWindow::initMatrix(), and ApplicationWindow::initNote().

Here is the caller graph for this function:

◆ aspect()

QString MyWidget::aspect ( )
inherited

Return the window status as a string.

Definition at line 106 of file MyWidget.cpp.

107 {
108  QString s = tr("Normal");
109  switch (w_status)
110  {
111  case Hidden:
112  return tr("Hidden");
113  break;
114 
115  case Normal:
116  break;
117 
118  case Minimized:
119  return tr("Minimized");
120  break;
121 
122  case Maximized:
123  return tr("Maximized");
124  break;
125  }
126  return s;
127 }

References MyWidget::Hidden, MyWidget::Maximized, MyWidget::Minimized, MyWidget::Normal, and MyWidget::w_status.

Referenced by ApplicationWindow::addListViewItem(), TableView::handleAspectAdded(), Table::handleAspectDescriptionAboutToChange(), Matrix::handleAspectDescriptionChange(), Table::handleAspectDescriptionChange(), TableView::handleAspectDescriptionChanged(), MultiLayer::print(), and ApplicationWindow::updateWindowStatus().

Here is the caller graph for this function:

◆ autoscale()

bool Graph3D::autoscale ( )
inline

Definition at line 350 of file Graph3D.h.

350 {return d_autoscale;};

◆ axesColor()

QColor Graph3D::axesColor ( )
inline

Definition at line 266 of file Graph3D.h.

266 {return axesCol;};

Referenced by copy(), setColors(), ApplicationWindow::showPlot3dDialog(), and updateColors().

Here is the caller graph for this function:

◆ axesLabels()

QStringList Graph3D::axesLabels ( )
inline

Definition at line 130 of file Graph3D.h.

130 {return labels;};

Referenced by copy(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ axisTickLengths()

QStringList Graph3D::axisTickLengths ( )

Definition at line 883 of file Graph3D.cpp.

884 {
885  QStringList lst;
886  double majorl,minorl;
887 
888  sp->coordinates()->axes[X1].ticLength (majorl,minorl);
889  lst<<QString::number(majorl);
890  lst<<QString::number(minorl);
891 
892  sp->coordinates()->axes[Y1].ticLength (majorl,minorl);
893  lst<<QString::number(majorl);
894  lst<<QString::number(minorl);
895 
896  sp->coordinates()->axes[Z1].ticLength (majorl,minorl);
897  lst<<QString::number(majorl);
898  lst<<QString::number(minorl);
899 
900  return lst;
901 }

References sp.

Referenced by copy(), saveToString(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ barsRadius()

double Graph3D::barsRadius ( )

Definition at line 2110 of file Graph3D.cpp.

2111 {
2112  if (sp->plotStyle() == Qwt3D::USER && sp->plotStyle() != Qwt3D::POINTS)
2113  return barsRad;
2114  else
2115  return 0.0;
2116 }

References barsRad, and sp.

Referenced by copy(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ bgColor()

QColor Graph3D::bgColor ( )
inline

Definition at line 269 of file Graph3D.h.

269 {return bgCol;};

Referenced by copy(), setColors(), ApplicationWindow::showPlot3dDialog(), and updateColors().

Here is the caller graph for this function:

◆ birthDate()

virtual QString MyWidget::birthDate ( )
inlinevirtualinherited

Return the creation date.

Reimplemented in Matrix.

Definition at line 91 of file MyWidget.h.

91 {return birthdate;};

References MyWidget::birthdate.

Referenced by ApplicationWindow::addListViewItem(), saveToString(), MultiLayer::saveToString(), TableStatistics::saveToString(), Note::saveToString(), and ApplicationWindow::windowProperties().

Here is the caller graph for this function:

◆ boxedCrossHair()

bool Graph3D::boxedCrossHair ( )
inline

Definition at line 322 of file Graph3D.h.

322 {return crossHairBoxed;};

Referenced by copy(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ captionPolicy()

virtual CaptionPolicy MyWidget::captionPolicy ( )
inlinevirtualinherited

Return the caption policy.

Definition at line 86 of file MyWidget.h.

86 {return caption_policy;};

References MyWidget::caption_policy.

Referenced by RenameWindowDialog::accept(), ApplicationWindow::clone(), ApplicationWindow::convertMatrixToTable(), ApplicationWindow::convertTableToMatrix(), ApplicationWindow::renameWindow(), saveToString(), MultiLayer::saveToString(), TableStatistics::saveToString(), Matrix::saveToString(), Note::saveToString(), and RenameWindowDialog::setWidget().

Here is the caller graph for this function:

◆ changeDataColumn()

void Graph3D::changeDataColumn ( Table table,
const QString &  colName 
)

Definition at line 435 of file Graph3D.cpp.

436 {
437  int zCol=table->colIndex(colName);
438  int yCol=table->colY(zCol);
439  int xCol=table->colX(zCol);
440 
441  plotAssociation = table->colName(xCol)+"(X)," + table->colName(yCol)+"(Y),";
442  plotAssociation += colName+"(Z)";
443 
444  updateDataXYZ(table, xCol, yCol, zCol);
445  if (d_autoscale)
446  findBestLayout();
447 }

References Table::colIndex(), Table::colName(), Table::colX(), Table::colY(), d_autoscale, findBestLayout(), plotAssociation, and updateDataXYZ().

Here is the call graph for this function:

◆ changeEvent()

void MyWidget::changeEvent ( QEvent *  event)
protectedvirtualinherited

Reimplemented in TableView, and MatrixView.

Definition at line 129 of file MyWidget.cpp.

130 {
131  if (!isHidden() && event->type() == QEvent::WindowStateChange) {
132  if (((QWindowStateChangeEvent *)event)->oldState() == windowState())
133  return;
134  if( windowState() & Qt::WindowMinimized )
136  else if ( windowState() & Qt::WindowMaximized )
138  else
139  w_status = Normal;
140  emit statusChanged (this);
141  }
142  QMdiSubWindow::changeEvent(event);
143 }

References MyWidget::Maximized, MyWidget::Minimized, MyWidget::Normal, MyWidget::statusChanged(), and MyWidget::w_status.

Referenced by MatrixView::changeEvent(), and TableView::changeEvent().

Here is the caller graph for this function:

◆ changeMatrix()

void Graph3D::changeMatrix ( Matrix m)

Definition at line 311 of file Graph3D.cpp.

312 {
313  if (d_matrix == m)
314  return;
315 
316  addMatrixData(m);
317 }

References addMatrixData(), and d_matrix.

Referenced by ApplicationWindow::change3DMatrix().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ changeTransparency()

void Graph3D::changeTransparency ( double  t)

Definition at line 2807 of file Graph3D.cpp.

2808 {
2809  if (alpha == t)
2810  return;
2811 
2812  alpha = t;
2813 
2814  Qwt3D::StandardColor* color=(StandardColor*) sp->dataColor ();
2815  color->setAlpha(t);
2816 
2817  sp->showColorLegend(legendOn);
2818  sp->updateData();
2819  sp->updateGL();
2820  emit modified();
2821 }

References alpha, legendOn, modified(), and sp.

◆ clearData()

void Graph3D::clearData ( )

Definition at line 1859 of file Graph3D.cpp.

1860 {
1861  if (d_matrix)
1862  d_matrix = 0;
1863  else if (worksheet)
1864  worksheet = 0;
1865  else if (func)
1866  {
1867  delete func;
1868  func = 0;
1869  }
1870  plotAssociation = QString();
1871 
1872  sp->makeCurrent();
1873  sp->loadFromData (0, 0, 0, false, false);
1874  sp->updateData();
1875  sp->updateGL();
1876 }

References d_matrix, func, plotAssociation, sp, and worksheet.

◆ closedWindow

void MyWidget::closedWindow ( MyWidget )
signalinherited

Emitted when the window was closed.

Referenced by MyWidget::closeEvent().

Here is the caller graph for this function:

◆ closeEvent()

void MyWidget::closeEvent ( QCloseEvent *  e)
inherited

Close event handler.

Ask the user "delete, hide, or cancel?" if the "ask on close" flag is set.

Definition at line 76 of file MyWidget.cpp.

77 {
78 if (askOnClose)
79  {
80  switch( QMessageBox::information(this,tr("SciDAVis"),
81  tr("Do you want to hide or delete") + "<p><b>'" + objectName() + "'</b> ?",
82  tr("Delete"), tr("Hide"), tr("Cancel"), 0,2))
83  {
84  case 0:
85  emit closedWindow(this);
86  e->accept();
87  break;
88 
89  case 1:
90  e->ignore();
91  emit hiddenWindow(this);
92  break;
93 
94  case 2:
95  e->ignore();
96  break;
97  }
98  }
99 else
100  {
101  emit closedWindow(this);
102  e->accept();
103  }
104 }

References MyWidget::askOnClose, MyWidget::closedWindow(), and MyWidget::hiddenWindow().

◆ colorMap()

QString Graph3D::colorMap ( )
inline

Definition at line 272 of file Graph3D.h.

272 {return color_map;};

Referenced by copy(), and Plot3DDialog::pickDataColorMap().

Here is the caller graph for this function:

◆ coneQuality()

int Graph3D::coneQuality ( )
inline

Definition at line 330 of file Graph3D.h.

330 {return conesQuality;};

Referenced by copy(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ coneRadius()

double Graph3D::coneRadius ( )
inline

Definition at line 329 of file Graph3D.h.

329 {return conesRad;};

Referenced by copy(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ contextMenuEvent()

void Graph3D::contextMenuEvent ( QContextMenuEvent *  e)

Definition at line 1716 of file Graph3D.cpp.

1717 {
1718  if (widget()->geometry().contains(e->pos())) {
1719  emit showContextMenu();
1720  } else {
1721  emit showTitleBarMenu();
1722  }
1723  e->accept();
1724 }

References showContextMenu(), and MyWidget::showTitleBarMenu().

◆ coordStyle()

Qwt3D::COORDSTYLE Graph3D::coordStyle ( )

Definition at line 2419 of file Graph3D.cpp.

2420 {
2421  return sp->coordinates()->style();
2422 }

References sp.

Referenced by copy(), ApplicationWindow::custom3DActions(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ copy

void Graph3D::copy ( Graph3D g)
slot

Definition at line 2957 of file Graph3D.cpp.

2958 {
2959  if (!g)
2960  return;
2961 
2962  Graph3D::PointStyle pt = g->pointType();
2963  if (g->plotStyle() == Qwt3D::USER ){
2964  switch (pt){
2965  case Graph3D::None :
2966  break;
2967 
2968  case Graph3D::Dots :
2970  break;
2971 
2972  case Graph3D::VerticalBars :
2973  setBarsRadius(g->barsRadius());
2974  break;
2975 
2976  case Graph3D::HairCross :
2978  break;
2979 
2980  case Graph3D::Cones :
2982  break;
2983  }
2984  }
2985  setStyle(g->coordStyle(), g->floorStyle(), g->plotStyle(), pt);
2986  setGrid(g->grids());
2987  setTitle(g->plotTitle(),g->titleColor(),g->titleFont());
2989  if (!g->colorMap().isEmpty())
2990  setDataColorMap(g->colorMap());
2991  else
2993 
2994  setColors(g->meshColor(),g->axesColor(),g->numColor(),
2995  g->labelColor(), g->bgColor(),g->gridColor());
2996  setAxesLabels(g->axesLabels());
2997  setTicks(g->scaleTicks());
3004  setRotation(g->xRotation(),g->yRotation(),g->zRotation());
3005  setZoom(g->zoom());
3006  setScale(g->xScale(),g->yScale(),g->zScale());
3007  setShift(g->xShift(),g->yShift(),g->zShift());
3008  setMeshLineWidth((int)g->meshLineWidth());
3009  setOrtho(g->isOrthogonal());
3010  update();
3011  animate(g->isAnimated());
3012 }

References animate(), axesColor(), axesLabels(), axisTickLengths(), barsRadius(), bgColor(), boxedCrossHair(), colorMap(), coneQuality(), coneRadius(), Cones, coordStyle(), crossHairLinewidth(), crossHairRadius(), Dots, floorStyle(), gridColor(), grids(), HairCross, isAnimated(), isLegendOn(), isOrthogonal(), labelColor(), labelsDistance(), maxDataColor(), meshColor(), meshLineWidth(), minDataColor(), None, numbersFont(), numColor(), plotStyle(), plotTitle(), pointsSize(), pointType(), resolution(), scaleTicks(), setAxesLabels(), setBarsRadius(), setColors(), setConesOptions(), setCrossOptions(), setDataColorMap(), setDataColors(), setGrid(), setMeshLineWidth(), setNumbersFont(), setOptions(), setOrtho(), setPointOptions(), setRotation(), setScale(), setShift(), setStyle(), setTickLengths(), setTicks(), setTitle(), setTransparency(), setXAxisLabelFont(), setYAxisLabelFont(), setZAxisLabelFont(), setZoom(), smoothCrossHair(), smoothPoints(), titleColor(), titleFont(), transparency(), update(), VerticalBars, xAxisLabelFont(), xRotation(), xScale(), xShift(), yAxisLabelFont(), yRotation(), yScale(), yShift(), zAxisLabelFont(), zoom(), zRotation(), zScale(), and zShift().

Here is the call graph for this function:

◆ copyImage()

void Graph3D::copyImage ( )

Definition at line 2022 of file Graph3D.cpp.

2023 {
2024  QApplication::clipboard()->setPixmap(sp->renderPixmap(), QClipboard::Clipboard);
2025  sp->updateData();
2026 }

References sp.

◆ crossHairLinewidth()

double Graph3D::crossHairLinewidth ( )
inline

Definition at line 324 of file Graph3D.h.

324 {return crossHairLineWidth;};

Referenced by copy(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ crossHairRadius()

double Graph3D::crossHairRadius ( )
inline

Definition at line 323 of file Graph3D.h.

323 {return crossHairRad;};

Referenced by copy(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ custom3DActions

void Graph3D::custom3DActions ( MyWidget )
signal

Referenced by updateCones(), updateCross(), and updatePoints().

Here is the caller graph for this function:

◆ customPlotStyle()

void Graph3D::customPlotStyle ( int  style)

Definition at line 2221 of file Graph3D.cpp.

2222 {
2223  sp->makeCurrent();
2224  if (sp->plotStyle() == style)
2225  return;
2226 
2227  switch (style)
2228  {
2229  case WIREFRAME :
2230  {
2231  sp->setPlotStyle(WIREFRAME );
2232  style_= WIREFRAME ;
2233  pointStyle = None;
2234 
2235  legendOn = false;
2236  sp->showColorLegend(legendOn);
2237  break;
2238  }
2239 
2240  case FILLED :
2241  {
2242  sp->setPlotStyle(FILLED );
2243  style_= FILLED;
2244  pointStyle = None;
2245  break;
2246  }
2247 
2248  case FILLEDMESH :
2249  {
2250  sp->setPlotStyle(FILLEDMESH);
2251  style_= FILLEDMESH;
2252  pointStyle = None;
2253  break;
2254  }
2255 
2256  case HIDDENLINE:
2257  {
2258  sp->setPlotStyle(HIDDENLINE);
2259  style_= HIDDENLINE;
2260  pointStyle = None;
2261  legendOn = false;
2262  sp->showColorLegend(legendOn);
2263  break;
2264  }
2265 
2266  case Qwt3D::POINTS:
2267  {
2268  pointSize = 0.5;
2269  smooth = true;
2270  pointStyle=Dots;
2271  style_ = Qwt3D::USER;
2272 
2273  Dot d(pointSize, smooth);
2274  sp->setPlotStyle(d);
2275  break;
2276  }
2277 
2278  case Qwt3D::USER:
2279  {
2281  style_ = Qwt3D::USER;
2282  sp->setPlotStyle(Bar(barsRad));
2283  break;
2284  }
2285  }
2286 
2287  sp->updateData();
2288  sp->updateGL();
2289 }

References barsRad, Dots, legendOn, None, pointSize, pointStyle, smooth, sp, style_, and VerticalBars.

Referenced by ApplicationWindow::plot3DMatrix().

Here is the caller graph for this function:

◆ deleteData()

void Graph3D::deleteData ( Qwt3D::Triple **  data,
int  columns 
)
private

Definition at line 2738 of file Graph3D.cpp.

2739 {
2740  for ( int i = 0; i < columns; i++)
2741  {
2742  delete [] data[i];
2743  }
2744  delete [] data;
2745 }

Referenced by addData(), updateDataXYZ(), and updateScales().

Here is the caller graph for this function:

◆ eventFilter()

bool Graph3D::eventFilter ( QObject *  object,
QEvent *  e 
)

Definition at line 2091 of file Graph3D.cpp.

2092 {
2093  if (e->type() == QEvent::MouseButtonDblClick && object == (QObject *)this->sp)
2094  {
2095  emit showOptionsDialog();
2096  return true;
2097  }
2098  return MyWidget::eventFilter(object, e);
2099 }

References showOptionsDialog().

◆ exportImage()

void Graph3D::exportImage ( const QString &  fileName,
int  quality = 100,
bool  transparent = false 
)

Definition at line 2028 of file Graph3D.cpp.

2029 {
2030  if (transparent)
2031  {
2032  QPixmap pic = sp->renderPixmap();
2033  sp->updateData();
2034 
2035  QBitmap mask(pic.size());
2036  mask.fill(Qt::color1);
2037  QPainter p;
2038  p.begin(&mask);
2039  p.setPen(Qt::color0);
2040 
2041  QColor background = QColor (Qt::white);
2042  QRgb backgroundPixel = background.rgb ();
2043  QImage image = pic.toImage();
2044  for (int y=0; y<image.height(); y++)
2045  {
2046  for ( int x=0; x<image.width(); x++ )
2047  {
2048  QRgb rgb = image.pixel(x, y);
2049  if (rgb == backgroundPixel) // we want the frame transparent
2050  p.drawPoint( x, y );
2051  }
2052  }
2053  p.end();
2054  pic.setMask(mask);
2055  pic.save(fileName, 0, quality);
2056  }
2057  else
2058  {
2059  QImage im = sp->grabFrameBuffer(true);
2060  QImageWriter iw(fileName);
2061  iw.setQuality(quality);
2062  iw.write(im);
2063  }
2064 }

References sp.

◆ exportPDF()

void Graph3D::exportPDF ( const QString &  fileName)
virtual

Reimplemented from MyWidget.

Definition at line 2066 of file Graph3D.cpp.

2067 {
2068  exportVector(fileName);
2069 }

References exportVector().

Here is the call graph for this function:

◆ exportVector()

void Graph3D::exportVector ( const QString &  fileName,
const QString &  fileType = "pdf" 
)

Definition at line 2071 of file Graph3D.cpp.

2072 {
2073  if ( fileName.isEmpty() )
2074  {
2075  QMessageBox::critical(0, tr("Error"), tr("Please provide a valid file name!"));
2076  return;
2077  }
2078 
2079  QString format = fileType;
2080  format = format.toUpper();
2081 
2082  VectorWriter * gl2ps = (VectorWriter*)IO::outputHandler(format);
2083  if (gl2ps)
2084  {
2085  gl2ps->setTextMode(VectorWriter::NATIVE);
2086  }
2087  if (!IO::save(sp, fileName, format))
2088  throw std::runtime_error((fileType+tr(" not supported")).toStdString());
2089 }

References sp.

Referenced by exportPDF().

Here is the caller graph for this function:

◆ findBestLayout()

void Graph3D::findBestLayout ( )

Definition at line 2934 of file Graph3D.cpp.

2935 {
2936  double start, end;
2937  sp->coordinates()->axes[X1].limits (start, end);
2938  double xScale = 1/fabs(end-start);
2939 
2940  sp->coordinates()->axes[Y1].limits (start, end);
2941  double yScale = 1/fabs(end-start);
2942 
2943  sp->coordinates()->axes[Z1].limits (start, end);
2944  double zScale = 1/fabs(end-start);
2945 
2946  double d = (sp->hull().maxVertex-sp->hull().minVertex).length();
2947  sp->setScale(xScale, yScale, zScale);
2948  sp->setZoom(d/sqrt(3));
2949 
2950  double majl = 0.1/yScale;
2951  updateTickLength(0, majl, 0.6*majl);
2952  majl = 0.1/xScale;
2953  updateTickLength(1, majl, 0.6*majl);
2954  updateTickLength(2, majl, 0.6*majl);
2955 }

References sp, updateTickLength(), xScale(), yScale(), and zScale().

Referenced by addData(), addFunction(), addMatrixData(), changeDataColumn(), updateData(), and updateMatrixData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ floorStyle()

Qwt3D::FLOORSTYLE Graph3D::floorStyle ( )

Definition at line 2414 of file Graph3D.cpp.

2415 {
2416  return sp->floorStyle();
2417 }

References sp.

Referenced by copy(), and ApplicationWindow::custom3DActions().

Here is the caller graph for this function:

◆ folder()

Folder* MyWidget::folder ( )
inlineinherited

Returns the pointer to the parent folder of the window.

Definition at line 128 of file MyWidget.h.

128 {return parentFolder;};

References MyWidget::parentFolder.

Referenced by ApplicationWindow::closeWindow(), MuParserScript::resolveColumnPath(), ApplicationWindow::restoreWindowGeometry(), MuParserScript::tableColumn__Function(), and ApplicationWindow::windowGeometryInfo().

Here is the caller graph for this function:

◆ formula()

QString Graph3D::formula ( )

Definition at line 2424 of file Graph3D.cpp.

2425 {
2426  if (func)
2427  return func->function();
2428  else
2429  return plotAssociation;
2430 }

References func, UserFunction::function(), and plotAssociation.

Referenced by ApplicationWindow::clone(), ApplicationWindow::editSurfacePlot(), ApplicationWindow::showWindowMenuImpl(), and ApplicationWindow::updateCurves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTable()

Table* Graph3D::getTable ( )
inline

Definition at line 339 of file Graph3D.h.

339 {return worksheet;};

Referenced by ApplicationWindow::showPlot3dDialog(), and ApplicationWindow::showWindowContextMenu().

Here is the caller graph for this function:

◆ gridColor()

QColor Graph3D::gridColor ( )
inline

Definition at line 270 of file Graph3D.h.

270 {return gridCol;};

Referenced by copy(), setColors(), ApplicationWindow::showPlot3dDialog(), and updateColors().

Here is the caller graph for this function:

◆ grids()

int Graph3D::grids ( )

Definition at line 1939 of file Graph3D.cpp.

1940 {
1941  return sp->coordinates()->grids();
1942 }

References sp.

Referenced by copy(), ApplicationWindow::custom3DActions(), setGrid(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ hasData()

bool Graph3D::hasData ( )
inline

Definition at line 98 of file Graph3D.h.

98 {return sp->hasData();};

Referenced by ApplicationWindow::clone(), ApplicationWindow::editSurfacePlot(), ApplicationWindow::showPlot3dDialog(), and ApplicationWindow::showWindowContextMenu().

Here is the caller graph for this function:

◆ hiddenWindow

void MyWidget::hiddenWindow ( MyWidget )
signalinherited

Emitted when the window was hidden.

Referenced by Matrix::closeEvent(), MyWidget::closeEvent(), and Table::closeEvent().

Here is the caller graph for this function:

◆ initCoord

void Graph3D::initCoord ( )
slot

Definition at line 178 of file Graph3D.cpp.

179 {
180  sp->makeCurrent();
181  for (unsigned i=0; i!=sp->coordinates()->axes.size(); ++i)
182  {
183  sp->coordinates()->axes[i].setMajors(5);
184  sp->coordinates()->axes[i].setMinors(5);
185  }
186 
187  QString s = tr("X axis");
188  sp->coordinates()->axes[X1].setLabelString(s);
189  sp->coordinates()->axes[X2].setLabelString(s);
190  sp->coordinates()->axes[X3].setLabelString(s);
191  sp->coordinates()->axes[X4].setLabelString(s);
192  labels<<s;
193 
194  s = tr("Y axis");
195  sp->coordinates()->axes[Y1].setLabelString(s);
196  sp->coordinates()->axes[Y2].setLabelString(s);
197  sp->coordinates()->axes[Y3].setLabelString(s);
198  sp->coordinates()->axes[Y4].setLabelString(s);
199  labels<<s;
200 
201  s = tr("Z axis");
202  sp->coordinates()->axes[Z1].setLabelString(s);
203  sp->coordinates()->axes[Z2].setLabelString(s);
204  sp->coordinates()->axes[Z3].setLabelString(s);
205  sp->coordinates()->axes[Z4].setLabelString(s);
206  labels<<s;
207 
208  sp->setCoordinateStyle(BOX);
209  sp->coordinates()->setAutoScale(false);
210 }

References labels, and sp.

Referenced by initPlot().

Here is the caller graph for this function:

◆ initPlot

void Graph3D::initPlot ( )
slot

Definition at line 94 of file Graph3D.cpp.

95 {
96  worksheet = 0;
97  d_matrix = 0;
98  plotAssociation = QString();
99 
100  QDateTime dt = QDateTime::currentDateTime ();
101  setBirthDate(dt.toString(Qt::LocalDate));
102 
103  color_map = QString();
105  d_timer = new QTimer(this);
106  connect(d_timer, SIGNAL(timeout()), this, SLOT(rotate()) );
107  ignoreFonts = false;
108 
109  QWidget* d_main_widget = new QWidget();
110  sp = new SurfacePlot(d_main_widget);
111  sp->resize(500,400);
112  sp->installEventFilter(this);
113  sp->setRotation(30,0,15);
114  sp->setScale(1,1,1);
115  sp->setShift(0.15,0,0);
116  sp->setZoom(0.9);
117  sp->setOrtho(false);
118 
119  smoothMesh = true;
120  sp->setSmoothMesh(smoothMesh);
121 
122  d_autoscale = true;
123 
124  title = QString();
125  sp->setTitle(title);
126 
127  titleCol = QColor(Qt::black);
128  sp->setTitleColor(Qt2GL(titleCol));
129 
130  titleFnt = QFont("Times New Roman",14);
131  titleFnt.setBold(true);
132 
133  sp->setTitleFont(titleFnt.family(),titleFnt.pointSize(),
134  titleFnt.weight(),titleFnt.italic());
135 
136  axesCol=QColor(Qt::black);
137  labelsCol=QColor(Qt::black);
138  numCol=QColor(Qt::black);
139  meshCol=QColor(Qt::black);
140  gridCol=QColor(Qt::black);
141  bgCol=QColor(255, 255, 255);
142  fromColor=QColor(Qt::red);
143  toColor=QColor(Qt::blue);
144 
145  col_ = 0;
146 
147  legendOn = false;
148  legendMajorTicks = 5;
149  sp->showColorLegend(legendOn);
150  sp->legend()->setAutoScale(true);
151  sp->legend()->setMajors (legendMajorTicks) ;
152 
153  labelsDist=0;
154 
155  scaleType=QVector<int>(3);
156  for (int j=0;j<3;j++)
157  scaleType[j]=0;
158 
159  pointStyle = None;
160  func = 0;
161  alpha = 1.0;
162  barsRad = 0.007;
163  pointSize = 5; smooth = false;
164  crossHairRad = 0.03, crossHairLineWidth = 2;
165  crossHairSmooth = true, crossHairBoxed = false;
166  conesQuality = 32; conesRad = 0.5;
167 
168  style_ = NOPLOT;
169  this->setWidget(d_main_widget);
170  initCoord();
171 
172  connect(sp,SIGNAL(rotationChanged(double, double, double)),this,SLOT(rotationChanged(double, double, double)));
173  connect(sp,SIGNAL(zoomChanged(double)),this,SLOT(zoomChanged(double)));
174  connect(sp,SIGNAL(scaleChanged(double, double, double)),this,SLOT(scaleChanged(double, double, double)));
175  connect(sp,SIGNAL(shiftChanged(double, double, double)),this,SLOT(shiftChanged(double, double, double)));
176 }

References alpha, animation_redraw_wait, axesCol, barsRad, bgCol, col_, color_map, conesQuality, conesRad, crossHairBoxed, crossHairLineWidth, crossHairRad, crossHairSmooth, d_autoscale, d_matrix, d_timer, fromColor, func, gridCol, ignoreFonts, initCoord(), labelsCol, labelsDist, legendMajorTicks, legendOn, meshCol, None, numCol, plotAssociation, pointSize, pointStyle, rotate(), rotationChanged(), scaleChanged(), scaleType, MyWidget::setBirthDate(), shiftChanged(), smooth, smoothMesh, sp, style_, title, titleCol, titleFnt, toColor, worksheet, and zoomChanged().

Referenced by Graph3D().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ insertFunction

void Graph3D::insertFunction ( const QString &  s,
double  xl,
double  xr,
double  yl,
double  yr,
double  zl,
double  zr 
)
slot

Definition at line 238 of file Graph3D.cpp.

240 {
241  addFunction(s,xl,xr,yl,yr,zl,zr);
242  update();
243 }

References addFunction(), and update().

Here is the call graph for this function:

◆ insertNewData

void Graph3D::insertNewData ( Table table,
const QString &  colName 
)
slot

Definition at line 425 of file Graph3D.cpp.

426 {
427  int zCol=table->colIndex(colName);
428  int yCol=table->colY(zCol);
429  int xCol=table->colX(zCol);
430 
431  addData(table, xCol, yCol, zCol, Trajectory);
432  update();
433 }

References addData(), Table::colIndex(), Table::colX(), Table::colY(), Trajectory, and update().

Here is the call graph for this function:

◆ isAnimated()

bool Graph3D::isAnimated ( )
inline

Definition at line 347 of file Graph3D.h.

347 {return d_timer->isActive();};

Referenced by copy(), and ApplicationWindow::custom3DActions().

Here is the caller graph for this function:

◆ isLegendOn()

bool Graph3D::isLegendOn ( )
inline

Definition at line 301 of file Graph3D.h.

301 {return legendOn;};

Referenced by copy(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ isOrthogonal()

bool Graph3D::isOrthogonal ( )
inline

Definition at line 127 of file Graph3D.h.

127 {return sp->ortho();};

Referenced by copy(), ApplicationWindow::custom3DActions(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ labelColor()

QColor Graph3D::labelColor ( )
inline

Definition at line 267 of file Graph3D.h.

267 {return labelsCol;};

Referenced by copy(), setColors(), ApplicationWindow::showPlot3dDialog(), and updateColors().

Here is the caller graph for this function:

◆ labelsDistance()

int Graph3D::labelsDistance ( )
inline

Definition at line 171 of file Graph3D.h.

171 {return labelsDist;};

Referenced by copy(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ matrix

Matrix* Graph3D::matrix ( )
inlineslot

Definition at line 80 of file Graph3D.h.

80 {return d_matrix;};

Referenced by ApplicationWindow::change3DMatrix(), ApplicationWindow::showPlot3dDialog(), ApplicationWindow::showWindowContextMenu(), and ApplicationWindow::showWindowMenuImpl().

Here is the caller graph for this function:

◆ maxDataColor()

QColor Graph3D::maxDataColor ( )

Definition at line 2752 of file Graph3D.cpp.

2753 {
2754  return toColor;
2755 }

References toColor.

Referenced by copy(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ meshColor()

QColor Graph3D::meshColor ( )
inline

Definition at line 265 of file Graph3D.h.

265 {return meshCol;};

Referenced by copy(), setColors(), ApplicationWindow::showPlot3dDialog(), and updateColors().

Here is the caller graph for this function:

◆ meshLineWidth()

double Graph3D::meshLineWidth ( )
inline

Definition at line 190 of file Graph3D.h.

190 {return sp->meshLineWidth();};

Referenced by copy(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ minDataColor()

QColor Graph3D::minDataColor ( )

Definition at line 2747 of file Graph3D.cpp.

2748 {
2749  return fromColor;
2750 }

References fromColor.

Referenced by copy(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ modified

void Graph3D::modified ( )
signal

Referenced by adjustLabels(), changeTransparency(), resizeEvent(), rotationChanged(), scaleChanged(), setGrid(), setResolution(), shiftChanged(), showColorLegend(), updateColors(), updateCones(), updateCross(), updateLabel(), updatePoints(), updateScale(), updateTitle(), and zoomChanged().

Here is the caller graph for this function:

◆ modifiedWindow

void MyWidget::modifiedWindow ( MyWidget )
signalinherited

Referenced by Matrix::handleChange(), Table::handleChange(), Matrix::invert(), Note::modifiedNote(), MyWidget::notifyChanges(), Matrix::recalculate(), and Matrix::setNumericFormat().

Here is the caller graph for this function:

◆ name()

virtual QString MyWidget::name ( )
inlinevirtualinherited

Return the window name.

Reimplemented in Table, and Matrix.

Definition at line 81 of file MyWidget.h.

81 {return objectName();};

Referenced by RenameWindowDialog::accept(), ApplicationWindow::addListViewItem(), ApplicationWindow::alreadyUsedName(), ApplicationWindow::appendProject(), ApplicationWindow::clone(), ApplicationWindow::closeWindow(), ApplicationWindow::depending3DPlots(), ApplicationWindow::dependingPlots(), MultiLayer::exportSVG(), MultiLayer::exportVector(), Folder::findWindow(), ApplicationWindow::generateUniqueName(), Note::init(), ApplicationWindow::loadImage(), ApplicationWindow::loadProject(), MultiLayer::MultiLayer(), MyWidget::MyWidget(), ApplicationWindow::openNote(), ApplicationWindow::openSurfacePlot(), print(), ApplicationWindow::removeWindowFromLists(), ApplicationWindow::renameWindow(), ApplicationWindow::restoreWindowGeometry(), ApplicationWindow::saveAsTemplate(), saveToString(), MultiLayer::saveToString(), Note::saveToString(), PlotDialog::setMultiLayer(), ApplicationWindow::setShowWindowsPolicy(), RenameWindowDialog::setWidget(), ApplicationWindow::showWindowMenuImpl(), MyWidget::updateCaption(), updateData(), updateScales(), ApplicationWindow::updateWindowStatus(), ApplicationWindow::window(), Folder::window(), ApplicationWindow::windowProperties(), ApplicationWindow::windowsMenuAboutToShow(), and ApplicationWindow::windowsMenuActivated().

Here is the caller graph for this function:

◆ notifyChanges()

void MyWidget::notifyChanges ( )
inlineinherited

Notifies the main application that the window has been modified.

Definition at line 134 of file MyWidget.h.

134 {emit modifiedWindow(this);};

References MyWidget::modifiedWindow().

Referenced by ApplicationWindow::importASCII(), PlotDialog::pickBorderColor(), and PlotDialog::updateBorder().

Here is the caller graph for this function:

◆ numbersFont()

QFont Graph3D::numbersFont ( )

Definition at line 814 of file Graph3D.cpp.

815 {
816  return sp->coordinates()->axes[X1].numberFont();
817 }

References sp.

Referenced by copy(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ numColor()

QColor Graph3D::numColor ( )
inline

Definition at line 268 of file Graph3D.h.

268 {return numCol;};

Referenced by copy(), setColors(), ApplicationWindow::showPlot3dDialog(), and updateColors().

Here is the caller graph for this function:

◆ openColorMap()

bool Graph3D::openColorMap ( ColorVector &  cv,
QString  fname 
)

Definition at line 2903 of file Graph3D.cpp.

2904 {
2905 if (fname.isEmpty())
2906  return false;
2907 
2908 using std::ifstream;
2909 ifstream file(QWT3DLOCAL8BIT(fname));
2910 if (!file)
2911  return false;
2912 
2913 RGBA rgb;
2914 cv.clear();
2915 
2916 while ( file )
2917  {
2918  file >> rgb.r >> rgb.g >> rgb.b;
2919  file.ignore(10000,'\n');
2920  if (!file.good())
2921  break;
2922  else
2923  {
2924  rgb.a = 1;
2925  rgb.r /= 255;
2926  rgb.g /= 255;
2927  rgb.b /= 255;
2928  cv.push_back(rgb);
2929  }
2930  }
2931 return true;
2932 }

Referenced by setDataColorMap().

Here is the caller graph for this function:

◆ plotStyle()

Qwt3D::PLOTSTYLE Graph3D::plotStyle ( )

Definition at line 2409 of file Graph3D.cpp.

2410 {
2411  return sp->plotStyle();
2412 }

References sp.

Referenced by copy(), ApplicationWindow::custom3DActions(), ApplicationWindow::customToolBars(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ plotTitle()

QString Graph3D::plotTitle ( )
inline

Definition at line 286 of file Graph3D.h.

286 {return title;};

Referenced by copy(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ pointsSize()

double Graph3D::pointsSize ( )
inline

Definition at line 317 of file Graph3D.h.

317 {return pointSize;};

Referenced by copy(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ pointType()

PointStyle Graph3D::pointType ( )
inline

Definition at line 335 of file Graph3D.h.

335 {return pointStyle;};

Referenced by copy(), ApplicationWindow::custom3DActions(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ print()

void Graph3D::print ( )
virtual

Reimplemented from MyWidget.

Definition at line 1994 of file Graph3D.cpp.

1995 {
1996  QPrinter printer;
1997  printer.setOrientation(QPrinter::Landscape);
1998  printer.setColorMode (QPrinter::Color);
1999  printer.setFullPage(false);
2000 
2001  QPrintDialog dialog(&printer, this);
2002  if (dialog.exec())
2003  {
2004  if (IO::save (sp,"scidavis.png","PNG"))
2005  {
2006  QPixmap p;
2007  p.load ("scidavis.png","PNG", Qt::ColorOnly );
2008 
2009  QPainter paint(&printer);
2010  paint.drawPixmap(QPoint(0,0),p);
2011  paint.end();
2012 
2013  QFile f("scidavis.png");
2014  f.remove();
2015  }
2016  else
2017  QMessageBox::about(0,tr("IO Error"),
2018  tr("Could not print: <h4>") + QString(name()) + "</h4>.");
2019  }
2020 }

References MyWidget::name(), and sp.

Here is the call graph for this function:

◆ resetAxesLabels()

void Graph3D::resetAxesLabels ( )

Definition at line 993 of file Graph3D.cpp.

994 {
995  sp->coordinates()->axes[X1].setLabelString(labels[0]);
996  sp->coordinates()->axes[X2].setLabelString(labels[0]);
997  sp->coordinates()->axes[X3].setLabelString(labels[0]);
998  sp->coordinates()->axes[X4].setLabelString(labels[0]);
999 
1000  sp->coordinates()->axes[Y1].setLabelString(labels[1]);
1001  sp->coordinates()->axes[Y2].setLabelString(labels[1]);
1002  sp->coordinates()->axes[Y3].setLabelString(labels[1]);
1003  sp->coordinates()->axes[Y4].setLabelString(labels[1]);
1004 
1005  sp->coordinates()->axes[Z1].setLabelString(labels[2]);
1006  sp->coordinates()->axes[Z2].setLabelString(labels[2]);
1007  sp->coordinates()->axes[Z3].setLabelString(labels[2]);
1008  sp->coordinates()->axes[Z4].setLabelString(labels[2]);
1009 }

References labels, and sp.

Referenced by update().

Here is the caller graph for this function:

◆ resetNonEmptyStyle()

void Graph3D::resetNonEmptyStyle ( )

Definition at line 751 of file Graph3D.cpp.

752 {
753  if (sp->plotStyle() != Qwt3D::NOPLOT )
754  return; // the plot was not previousely emptied
755 
756  if (style_== Qwt3D::USER)
757  {// reseting the right user plot style
758  switch (pointStyle)
759  {
760  case None:
761  break;
762 
763  case Dots :
764  sp->setPlotStyle(Dot(pointSize, smooth));
765  break;
766 
767  case VerticalBars :
768  sp->setPlotStyle(Bar(barsRad));
769  break;
770 
771  case HairCross :
772  sp->setPlotStyle(CrossHair(crossHairRad, crossHairLineWidth, crossHairSmooth, crossHairBoxed));
773  break;
774 
775  case Cones :
776  sp->setPlotStyle(Cone3D(conesRad, conesQuality));
777  break;
778  }
779  }
780  else
781  sp->setPlotStyle(style_);
782 }

References barsRad, Cones, conesQuality, conesRad, crossHairBoxed, crossHairLineWidth, crossHairRad, crossHairSmooth, Dots, HairCross, None, pointSize, pointStyle, smooth, sp, style_, and VerticalBars.

Referenced by updateDataXY(), and updateDataXYZ().

Here is the caller graph for this function:

◆ resizedWindow

void MyWidget::resizedWindow ( MyWidget )
signalinherited

Referenced by resizeEvent(), and MultiLayer::resizeLayers().

Here is the caller graph for this function:

◆ resizeEvent()

void Graph3D::resizeEvent ( QResizeEvent *  e)

Definition at line 1699 of file Graph3D.cpp.

1700 {
1701  sp->makeCurrent();
1702  sp->resize(e->size());
1703 
1704  if (!ignoreFonts && this->isVisible())
1705  {
1706  double ratio=(double)e->size().height()/(double)e->oldSize().height();
1707  scaleFonts(ratio);
1708  }
1709 
1710  sp->updateGL();
1711  emit resizedWindow(this);
1712  emit modified();
1713  QMdiSubWindow::resizeEvent(e);
1714 }

References ignoreFonts, modified(), MyWidget::resizedWindow(), scaleFonts(), and sp.

Here is the call graph for this function:

◆ resolution()

int Graph3D::resolution ( )
inline

Definition at line 295 of file Graph3D.h.

295 {return sp->resolution();};

Referenced by copy(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ restore()

virtual void MyWidget::restore ( const QStringList &  )
inlinevirtualinherited

Not implemented yet.

Definition at line 105 of file MyWidget.h.

105 {};

Referenced by ApplicationWindow::openTemplate().

Here is the caller graph for this function:

◆ rotate()

void Graph3D::rotate ( )

Used for the animation: rotates the scene with 1/360 degrees.

Definition at line 2875 of file Graph3D.cpp.

2876 {
2877 if (!sp)
2878  return;
2879 
2880 sp->setRotation(int(sp->xRotation() + 1) % 360, int(sp->yRotation() + 1) % 360, int(sp->zRotation() + 1) % 360);
2881 }

References sp.

Referenced by initPlot().

Here is the caller graph for this function:

◆ rotationChanged()

void Graph3D::rotationChanged ( double  ,
double  ,
double   
)

Definition at line 973 of file Graph3D.cpp.

974 {
975  emit modified();
976 }

References modified().

Referenced by initPlot().

Here is the caller graph for this function:

◆ saveAsTemplate()

QString Graph3D::saveAsTemplate ( const QString &  geometryInfo)
virtual

Reimplemented from MyWidget.

Definition at line 2854 of file Graph3D.cpp.

2855 {
2856  QString s = saveToString(geometryInfo);
2857  QStringList lst = s.split("\n", QString::SkipEmptyParts);
2858  QStringList l = lst[3].split("\t");
2859  l[1] = QString();
2860  lst[3] = l.join("\t");
2861  return lst.join("\n");
2862 }

References saveToString().

Here is the call graph for this function:

◆ saveToString()

QString Graph3D::saveToString ( const QString &  geometry)
virtual

Reimplemented from MyWidget.

Definition at line 2432 of file Graph3D.cpp.

2433 {
2434  QString s="<SurfacePlot>\n";
2435  s+= QString(name())+"\t";
2436  s+= birthDate() + "\n";
2437  s+= geometry;
2438  s+= "SurfaceFunction\t";
2439 
2440  sp->makeCurrent();
2441  if (func)
2442  s+=func->function()+"\t";
2443  else
2444  {
2445  s+= plotAssociation;
2446  s+="\t";
2447  }
2448 
2449  double start,stop;
2450  sp->coordinates()->axes[X1].limits(start,stop);
2451  s+=QString::number(start)+"\t";
2452  s+=QString::number(stop)+"\t";
2453  sp->coordinates()->axes[Y1].limits(start,stop);
2454  s+=QString::number(start)+"\t";
2455  s+=QString::number(stop)+"\t";
2456  sp->coordinates()->axes[Z1].limits(start,stop);
2457  s+=QString::number(start)+"\t";
2458  s+=QString::number(stop)+"\n";
2459 
2460  QString st;
2461  if (sp->coordinates()->style() == Qwt3D::NOCOORD)
2462  st="nocoord";
2463  else if (sp->coordinates()->style() == Qwt3D::BOX)
2464  st="box";
2465  else
2466  st="frame";
2467  s+="Style\t"+st+"\t";
2468 
2469  switch(sp->floorStyle ())
2470  {
2471  case NOFLOOR:
2472  st="nofloor";
2473  break;
2474 
2475  case FLOORISO:
2476  st="flooriso";
2477  break;
2478 
2479  case FLOORDATA:
2480  st="floordata";
2481  break;
2482  }
2483  s+=st+"\t";
2484 
2485  switch(sp->plotStyle())
2486  {
2487  case USER:
2488  if (pointStyle == VerticalBars)
2489  st="bars\t"+QString::number(barsRad);
2490  else if (pointStyle == Dots)
2491  {
2492  st="points\t"+QString::number(pointSize);
2493  st+="\t"+QString::number(smooth);
2494  }
2495  else if (pointStyle == Cones)
2496  {
2497  st="cones\t"+QString::number(conesRad);
2498  st+="\t"+QString::number(conesQuality);
2499  }
2500  else if (pointStyle == HairCross)
2501  {
2502  st="cross\t"+QString::number(crossHairRad);
2503  st+="\t"+QString::number(crossHairLineWidth);
2504  st+="\t"+QString::number(crossHairSmooth);
2505  st+="\t"+QString::number(crossHairBoxed);
2506  }
2507  break;
2508 
2509  case WIREFRAME:
2510  st="wireframe";
2511  break;
2512 
2513  case HIDDENLINE:
2514  st="hiddenline";
2515  break;
2516 
2517  case FILLED:
2518  st="filled";
2519  break;
2520 
2521  case FILLEDMESH:
2522  st="filledmesh";
2523  break;
2524 
2525  default:
2526  ;
2527  }
2528  s+=st+"\n";
2529 
2530  s+="grids\t";
2531  s+=QString::number(sp->coordinates()->grids())+"\n";
2532 
2533  s+="title\t";
2534  s+=title+"\t";
2535  s+=COLORNAME(titleCol)+"\t";
2536  s+=titleFnt.family()+"\t";
2537  s+=QString::number(titleFnt.pointSize())+"\t";
2538  s+=QString::number(titleFnt.weight())+"\t";
2539  s+=QString::number(titleFnt.italic())+"\n";
2540 
2541  s+="colors\t";
2542  s+=COLORNAME(meshCol)+"\t";
2543  s+=COLORNAME(axesCol)+"\t";
2544  s+=COLORNAME(numCol)+"\t";
2545  s+=COLORNAME(labelsCol)+"\t";
2546  s+=COLORNAME(bgCol)+"\t";
2547  s+=COLORNAME(gridCol)+"\t";
2548  s+=COLORNAME(fromColor)+"\t";
2549  s+=COLORNAME(toColor)+"\t";
2550  s+=QString::number(alpha) + "\t" + color_map + "\n";
2551 
2552  s+="axesLabels\t";
2553  s+=labels.join("\t")+"\n";
2554 
2555  s+="tics\t";
2556  QStringList tl=scaleTicks();
2557  s+=tl.join("\t")+"\n";
2558 
2559  s+="tickLengths\t";
2560  tl=axisTickLengths();
2561  s+=tl.join("\t")+"\n";
2562 
2563  s+="options\t";
2564  s+=QString::number(legendOn)+"\t";
2565  s+=QString::number(sp->resolution())+"\t";
2566  s+=QString::number(labelsDist)+"\n";
2567 
2568  s+="numbersFont\t";
2569  QFont fnt=sp->coordinates()->axes[X1].numberFont();
2570  s+=fnt.family()+"\t";
2571  s+=QString::number(fnt.pointSize())+"\t";
2572  s+=QString::number(fnt.weight())+"\t";
2573  s+=QString::number(fnt.italic())+"\n";
2574 
2575  s+="xAxisLabelFont\t";
2576  fnt=sp->coordinates()->axes[X1].labelFont();
2577  s+=fnt.family()+"\t";
2578  s+=QString::number(fnt.pointSize())+"\t";
2579  s+=QString::number(fnt.weight())+"\t";
2580  s+=QString::number(fnt.italic())+"\n";
2581 
2582  s+="yAxisLabelFont\t";
2583  fnt=sp->coordinates()->axes[Y1].labelFont();
2584  s+=fnt.family()+"\t";
2585  s+=QString::number(fnt.pointSize())+"\t";
2586  s+=QString::number(fnt.weight())+"\t";
2587  s+=QString::number(fnt.italic())+"\n";
2588 
2589  s+="zAxisLabelFont\t";
2590  fnt=sp->coordinates()->axes[Z1].labelFont();
2591  s+=fnt.family()+"\t";
2592  s+=QString::number(fnt.pointSize())+"\t";
2593  s+=QString::number(fnt.weight())+"\t";
2594  s+=QString::number(fnt.italic())+"\n";
2595 
2596  s+="rotation\t";
2597  s+=QString::number(sp->xRotation())+"\t";
2598  s+=QString::number(sp->yRotation())+"\t";
2599  s+=QString::number(sp->zRotation())+"\n";
2600 
2601  s+="zoom\t";
2602  s+=QString::number(sp->zoom())+"\n";
2603 
2604  s+="scaling\t";
2605  s+=QString::number(sp->xScale())+"\t";
2606  s+=QString::number(sp->yScale())+"\t";
2607  s+=QString::number(sp->zScale())+"\n";
2608 
2609  s+="shift\t";
2610  s+=QString::number(sp->xShift())+"\t";
2611  s+=QString::number(sp->yShift())+"\t";
2612  s+=QString::number(sp->zShift())+"\n";
2613 
2614  s+="LineWidth\t";
2615  s+=QString::number(sp->meshLineWidth())+"\n";
2616  s+="WindowLabel\t" + windowLabel() + "\t" + QString::number(captionPolicy()) + "\n";
2617  s+="Orthogonal\t" + QString::number(sp->ortho())+"\n";
2618  s+="</SurfacePlot>\n";
2619  return s;
2620 }

References alpha, axesCol, axisTickLengths(), barsRad, bgCol, MyWidget::birthDate(), MyWidget::captionPolicy(), color_map, COLORNAME(), Cones, conesQuality, conesRad, crossHairBoxed, crossHairLineWidth, crossHairRad, crossHairSmooth, Dots, fromColor, func, UserFunction::function(), gridCol, HairCross, labels, labelsCol, labelsDist, legendOn, meshCol, MyWidget::name(), numCol, plotAssociation, pointSize, pointStyle, scaleTicks(), smooth, sp, title, titleCol, titleFnt, toColor, VerticalBars, and MyWidget::windowLabel().

Referenced by saveAsTemplate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scaleChanged()

void Graph3D::scaleChanged ( double  ,
double  ,
double   
)

Definition at line 978 of file Graph3D.cpp.

979 {
980  emit modified();
981 }

References modified().

Referenced by initPlot().

Here is the caller graph for this function:

◆ scaleFonts()

void Graph3D::scaleFonts ( double  factor)

Definition at line 1677 of file Graph3D.cpp.

1678 {
1679  QFont font = sp->coordinates()->axes[X1].numberFont();
1680  font.setPointSizeF(font.pointSizeF()*factor);
1681  sp->coordinates()->setNumberFont (font);
1682 
1683  titleFnt.setPointSizeF(factor*titleFnt.pointSizeF());
1684  sp->setTitleFont(titleFnt.family(),titleFnt.pointSize(),titleFnt.weight(),titleFnt.italic());
1685 
1686  font = xAxisLabelFont();
1687  font.setPointSizeF(factor*font.pointSizeF());
1688  setXAxisLabelFont(font);
1689 
1690  font = yAxisLabelFont();
1691  font.setPointSizeF(factor*font.pointSizeF());
1692  setYAxisLabelFont(font);
1693 
1694  font = zAxisLabelFont();
1695  font.setPointSizeF(factor*font.pointSizeF());
1696  setZAxisLabelFont(font);
1697 }

References setXAxisLabelFont(), setYAxisLabelFont(), setZAxisLabelFont(), sp, titleFnt, xAxisLabelFont(), yAxisLabelFont(), and zAxisLabelFont().

Referenced by resizeEvent().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ scaleLimits()

QStringList Graph3D::scaleLimits ( )

Definition at line 1156 of file Graph3D.cpp.

1157 {
1158  QStringList limits;
1159  double start,stop;
1160  int majors,minors;
1161 
1162  sp->coordinates()->axes[X1].limits (start,stop);
1163  majors=sp->coordinates()->axes[X1].majors();
1164  minors=sp->coordinates()->axes[X1].minors();
1165 
1166  limits<<QString::number(start);
1167  limits<<QString::number(stop);
1168  limits<<QString::number(majors);
1169  limits<<QString::number(minors);
1170  limits<<QString::number(scaleType[0]);
1171 
1172  sp->coordinates()->axes[Y1].limits (start,stop);
1173  majors=sp->coordinates()->axes[Y1].majors();
1174  minors=sp->coordinates()->axes[Y1].minors();
1175 
1176  limits<<QString::number(start);
1177  limits<<QString::number(stop);
1178  limits<<QString::number(majors);
1179  limits<<QString::number(minors);
1180  limits<<QString::number(scaleType[1]);
1181 
1182  sp->coordinates()->axes[Z1].limits (start,stop);
1183  majors=sp->coordinates()->axes[Z1].majors();
1184  minors=sp->coordinates()->axes[Z1].minors();
1185 
1186  limits<<QString::number(start);
1187  limits<<QString::number(stop);
1188  limits<<QString::number(majors);
1189  limits<<QString::number(minors);
1190  limits<<QString::number(scaleType[2]);
1191 
1192  return limits;
1193 }

References scaleType, and sp.

Referenced by ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ scaleTicks()

QStringList Graph3D::scaleTicks ( )

Definition at line 1195 of file Graph3D.cpp.

1196 {
1197  QStringList limits;
1198  int majors,minors;
1199 
1200  majors=sp->coordinates()->axes[X1].majors();
1201  minors=sp->coordinates()->axes[X1].minors();
1202  limits<<QString::number(majors);
1203  limits<<QString::number(minors);
1204 
1205  majors=sp->coordinates()->axes[Y1].majors();
1206  minors=sp->coordinates()->axes[Y1].minors();
1207  limits<<QString::number(majors);
1208  limits<<QString::number(minors);
1209 
1210  majors=sp->coordinates()->axes[Z1].majors();
1211  minors=sp->coordinates()->axes[Z1].minors();
1212  limits<<QString::number(majors);
1213  limits<<QString::number(minors);
1214 
1215  return limits;
1216 }

References sp.

Referenced by copy(), and saveToString().

Here is the caller graph for this function:

◆ setAutoscale()

void Graph3D::setAutoscale ( bool  on = true)
inline

Enables/Disables autoscaling using findBestLayout().

Definition at line 352 of file Graph3D.h.

352 {d_autoscale = on;};

Referenced by ApplicationWindow::setPlot3DOptions().

Here is the caller graph for this function:

◆ setAxesLabels()

void Graph3D::setAxesLabels ( const QStringList &  lst)

Definition at line 1011 of file Graph3D.cpp.

1012 {
1013  QString label= l[0];
1014  sp->coordinates()->axes[X1].setLabelString(label);
1015  sp->coordinates()->axes[X2].setLabelString(label);
1016  sp->coordinates()->axes[X3].setLabelString(label);
1017  sp->coordinates()->axes[X4].setLabelString(label);
1018 
1019  label= l[1];
1020  sp->coordinates()->axes[Y1].setLabelString(label);
1021  sp->coordinates()->axes[Y2].setLabelString(label);
1022  sp->coordinates()->axes[Y3].setLabelString(label);
1023  sp->coordinates()->axes[Y4].setLabelString(label);
1024 
1025  label= l[2];
1026  sp->coordinates()->axes[Z1].setLabelString(label);
1027  sp->coordinates()->axes[Z2].setLabelString(label);
1028  sp->coordinates()->axes[Z3].setLabelString(label);
1029  sp->coordinates()->axes[Z4].setLabelString(label);
1030 
1031  labels=l;
1032 }

References labels, and sp.

Referenced by copy(), and ApplicationWindow::openSurfacePlot().

Here is the caller graph for this function:

◆ setBackGrid()

void Graph3D::setBackGrid ( bool  b)

Definition at line 1989 of file Graph3D.cpp.

1990 {
1991  setGrid(Qwt3D::BACK,b);
1992 }

References setGrid().

Here is the call graph for this function:

◆ setBarsPlot()

void Graph3D::setBarsPlot ( )

Definition at line 1878 of file Graph3D.cpp.

1879 {
1880  if (pointStyle == VerticalBars)
1881  return;
1882 
1883  QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
1884 
1886  style_=Qwt3D::USER;
1887 
1888  sp->makeCurrent();
1889  sp->setPlotStyle(Bar(barsRad));
1890  sp->updateData();
1891  sp->updateGL();
1892  QApplication::restoreOverrideCursor();
1893 }

References barsRad, pointStyle, sp, style_, and VerticalBars.

◆ setBarsRadius()

void Graph3D::setBarsRadius ( double  rad)

Definition at line 2118 of file Graph3D.cpp.

2119 {
2120  if (barsRad == rad)
2121  return;
2122 
2123  barsRad = rad;
2124 }

References barsRad.

Referenced by copy().

Here is the caller graph for this function:

◆ setBirthDate()

virtual void MyWidget::setBirthDate ( const QString &  s)
inlinevirtualinherited

Set the creation date.

Reimplemented in Table, and Matrix.

Definition at line 93 of file MyWidget.h.

93 {birthdate = s;};

References MyWidget::birthdate.

Referenced by ApplicationWindow::appendProject(), Note::init(), initPlot(), ApplicationWindow::loadProject(), MultiLayer::MultiLayer(), ApplicationWindow::openNote(), and ApplicationWindow::openSurfacePlot().

Here is the caller graph for this function:

◆ setBoxed()

void Graph3D::setBoxed ( )

Definition at line 1735 of file Graph3D.cpp.

1736 {
1737  if (sp->coordinates()->style() == BOX)
1738  return;
1739 
1740  sp->makeCurrent();
1741  sp->setCoordinateStyle(BOX);
1742 }

References sp.

◆ setCaptionPolicy()

virtual void MyWidget::setCaptionPolicy ( CaptionPolicy  policy)
inlinevirtualinherited

Set the caption policy.

Reimplemented in Table, and Matrix.

Definition at line 88 of file MyWidget.h.

88 { caption_policy = policy; updateCaption(); }

References MyWidget::caption_policy, and MyWidget::updateCaption().

Referenced by RenameWindowDialog::accept(), ApplicationWindow::appendProject(), ApplicationWindow::clone(), ApplicationWindow::loadImage(), ApplicationWindow::loadProject(), ApplicationWindow::openNote(), ApplicationWindow::openSurfacePlot(), and ApplicationWindow::renameWindow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setCeilGrid()

void Graph3D::setCeilGrid ( bool  b)

Definition at line 1977 of file Graph3D.cpp.

1978 {
1979  setGrid(Qwt3D::CEIL,b);
1980 }

References setGrid().

Here is the call graph for this function:

◆ setColors() [1/2]

void Graph3D::setColors ( const QColor &  meshColor,
const QColor &  axesColor,
const QColor &  numColor,
const QColor &  labelColor,
const QColor &  bgColor,
const QColor &  gridColor 
)

Definition at line 1561 of file Graph3D.cpp.

1563 {
1564  if (meshCol != meshColor)
1565  {
1566  sp->setMeshColor(Qt2GL(meshColor));
1568  }
1569 
1570  if(axesCol != axesColor)
1571  {
1572  sp->coordinates()->setAxesColor(Qt2GL(axesColor));
1574  }
1575 
1576  if(numCol !=numColor)
1577  {
1578  sp->coordinates()->setNumberColor(Qt2GL(numColor));
1579  numCol=numColor;
1580  }
1581 
1582  if(labelsCol !=labelColor)
1583  {
1584  sp->coordinates()->setLabelColor(Qt2GL(labelColor));
1586  }
1587 
1588  if(bgCol !=bgColor)
1589  {
1590  sp->setBackgroundColor(Qt2GL(bgColor));
1591  bgCol=bgColor;
1592  }
1593 
1594  if(gridCol !=gridColor)
1595  {
1596  sp->coordinates()->setGridLinesColor(Qt2GL(gridColor));
1598  }
1599 }

References axesCol, axesColor(), bgCol, bgColor(), gridCol, gridColor(), labelColor(), labelsCol, meshCol, meshColor(), numCol, numColor(), and sp.

Here is the call graph for this function:

◆ setColors() [2/2]

void Graph3D::setColors ( const QStringList &  colors)

Definition at line 1601 of file Graph3D.cpp.

1602 {
1603  meshCol=QColor(COLORVALUE(colors[1]));
1604  sp->setMeshColor(Qt2GL(meshCol));
1605 
1606  axesCol=QColor(COLORVALUE(colors[2]));
1607  sp->coordinates()->setAxesColor(Qt2GL(axesCol));
1608 
1609  numCol=QColor(COLORVALUE(colors[3]));
1610  sp->coordinates()->setNumberColor(Qt2GL(numCol));
1611 
1612  labelsCol=QColor(COLORVALUE(colors[4]));
1613  sp->coordinates()->setLabelColor(Qt2GL(labelsCol));
1614 
1615  bgCol=QColor(COLORVALUE(colors[5]));
1616  sp->setBackgroundColor(Qt2GL(bgCol));
1617 
1618  gridCol=QColor(COLORVALUE(colors[6]));
1619  sp->coordinates()->setGridLinesColor(Qt2GL(gridCol));
1620 
1621  if ((int)colors.count()>7)
1622  {
1623  QColor min=QColor(COLORVALUE(colors[7]));
1624  QColor max=QColor(COLORVALUE(colors[8]));
1625  alpha = colors[9].toDouble();
1626  if ((int)colors.count() == 11)
1627  setDataColorMap(colors[10]);
1628  else
1629  setDataColors(min,max);
1630  }
1631 }

References alpha, axesCol, bgCol, COLORVALUE(), gridCol, labelsCol, meshCol, numCol, setDataColorMap(), setDataColors(), and sp.

Referenced by copy(), and ApplicationWindow::openSurfacePlot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setConesMesh()

void Graph3D::setConesMesh ( )

Definition at line 1827 of file Graph3D.cpp.

1828 {
1829  if (!sp || pointStyle == Cones )
1830  return;
1831 
1832  QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
1833 
1834  pointStyle=Cones;
1835  style_=Qwt3D::USER;
1836 
1837  sp->makeCurrent();
1838  sp->setPlotStyle(Cone3D(conesRad,conesQuality));
1839  sp->updateData();
1840  sp->updateGL();
1841 
1842  QApplication::restoreOverrideCursor();
1843 }

References Cones, conesQuality, conesRad, pointStyle, sp, and style_.

◆ setConesOptions()

void Graph3D::setConesOptions ( double  rad,
int  quality 
)

Definition at line 2167 of file Graph3D.cpp.

2168 {
2169  conesRad = rad;
2170  conesQuality = quality;
2171 }

References conesQuality, and conesRad.

Referenced by copy().

Here is the caller graph for this function:

◆ setCrossMesh()

void Graph3D::setCrossMesh ( )

Definition at line 1845 of file Graph3D.cpp.

1846 {
1847  if (!sp || pointStyle == HairCross)
1848  return;
1849 
1851  style_=Qwt3D::USER;
1852 
1853  sp->makeCurrent();
1855  sp->updateData();
1856  sp->updateGL();
1857 }

References crossHairBoxed, crossHairLineWidth, crossHairRad, crossHairSmooth, HairCross, pointStyle, sp, and style_.

◆ setCrossOptions()

void Graph3D::setCrossOptions ( double  rad,
double  linewidth,
bool  smooth,
bool  boxed 
)

Definition at line 2192 of file Graph3D.cpp.

2193 {
2194  crossHairRad = rad ;
2195  crossHairLineWidth=linewidth;
2197  crossHairBoxed = boxed;
2198 }

References crossHairBoxed, crossHairLineWidth, crossHairRad, crossHairSmooth, and smooth.

Referenced by copy().

Here is the caller graph for this function:

◆ setDataColorMap()

void Graph3D::setDataColorMap ( const QString &  fileName)

Definition at line 2883 of file Graph3D.cpp.

2884 {
2885 if (color_map == fileName)
2886  return;
2887 
2888 ColorVector cv;
2889 if (!openColorMap(cv, fileName))
2890  return;
2891 
2892 color_map = fileName;
2893 
2894 col_ = new StandardColor(sp);
2895 col_->setColorVector(cv);
2896 
2897 sp->setDataColor(col_);
2898 sp->updateData();
2899 sp->showColorLegend(legendOn);
2900 sp->updateGL();
2901 }

References col_, color_map, legendOn, openColorMap(), and sp.

Referenced by copy(), and setColors().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDataColors()

void Graph3D::setDataColors ( const QColor &  cMax,
const QColor &  cMin 
)

Definition at line 2757 of file Graph3D.cpp.

2758 {
2759  if (cMin == fromColor && cMax == toColor)
2760  return;
2761 
2762  fromColor=cMin;
2763  toColor=cMax;
2764 
2765  Qwt3D::ColorVector cv;
2766 
2767  int size=255;
2768  double dsize = size;
2769 
2770  double r1=cMax.red()/dsize;
2771  double r2=cMin.red()/dsize;
2772 
2773  double stepR = (r1-r2)/dsize;
2774 
2775  double g1=cMax.green()/dsize;
2776  double g2=cMin.green()/dsize;
2777 
2778  double stepG = (g1-g2)/dsize;
2779 
2780  double b1=cMax.blue()/dsize;
2781  double b2=cMin.blue()/dsize;
2782 
2783  double stepB = (b1-b2)/dsize;
2784 
2785  RGBA rgb;
2786  for (int i=0; i<size; i++)
2787  {
2788  rgb.r = r1-i*stepR;
2789  rgb.g = g1-i*stepG;
2790  rgb.b = b1-i*stepB;
2791  rgb.a = alpha;
2792 
2793  cv.push_back(rgb);
2794  }
2795 
2796  col_ = new StandardColor(sp);
2797  col_->setColorVector(cv);
2798  sp->setDataColor(col_);
2799 
2800  if (legendOn)
2801  {
2802  sp->showColorLegend(false);
2803  sp->showColorLegend(legendOn);
2804  }
2805 }

References alpha, col_, fromColor, legendOn, sp, and toColor.

Referenced by copy(), ApplicationWindow::customPlot3D(), and setColors().

Here is the caller graph for this function:

◆ setEmptyFloor()

void Graph3D::setEmptyFloor ( )

Definition at line 1917 of file Graph3D.cpp.

1918 {
1919  if (sp->floorStyle() == NOFLOOR)
1920  return;
1921 
1922  sp->makeCurrent();
1923  sp->setFloorStyle(NOFLOOR);
1924  sp->updateData();
1925  sp->updateGL();
1926 }

References sp.

◆ setFilledMesh()

void Graph3D::setFilledMesh ( )

Definition at line 1767 of file Graph3D.cpp.

1768 {
1769  if (sp->plotStyle() == FILLEDMESH)
1770  return;
1771 
1772  sp->makeCurrent();
1773  sp->setPlotStyle(FILLEDMESH);
1774  sp->updateData();
1775  sp->updateGL();
1776 
1777  style_=FILLEDMESH;
1778  pointStyle = None;
1779 }

References None, pointStyle, sp, and style_.

◆ setFloorData()

void Graph3D::setFloorData ( )

Definition at line 1895 of file Graph3D.cpp.

1896 {
1897  if (sp->floorStyle() == FLOORDATA)
1898  return;
1899 
1900  sp->makeCurrent();
1901  sp->setFloorStyle(FLOORDATA);
1902  sp->updateData();
1903  sp->updateGL();
1904 }

References sp.

Referenced by ApplicationWindow::customPlot3D().

Here is the caller graph for this function:

◆ setFloorGrid()

void Graph3D::setFloorGrid ( bool  b)

Definition at line 1981 of file Graph3D.cpp.

1982 {
1983  setGrid(Qwt3D::FLOOR,b);
1984 }

References setGrid().

Here is the call graph for this function:

◆ setFloorIsolines()

void Graph3D::setFloorIsolines ( )

Definition at line 1906 of file Graph3D.cpp.

1907 {
1908  if (sp->floorStyle() == FLOORISO)
1909  return;
1910 
1911  sp->makeCurrent();
1912  sp->setFloorStyle(FLOORISO);
1913  sp->updateData();
1914  sp->updateGL();
1915 }

References sp.

◆ setFolder()

void MyWidget::setFolder ( Folder f)
inlineinherited

Initializes the pointer to the parent folder of the window.

Definition at line 131 of file MyWidget.h.

131 {parentFolder = f;};

References MyWidget::parentFolder.

Referenced by Folder::addWindow(), ApplicationWindow::initBareMultilayerPlot(), ApplicationWindow::initMatrix(), ApplicationWindow::initNote(), ApplicationWindow::initPlot3D(), ApplicationWindow::initTable(), and Folder::removeWindow().

Here is the caller graph for this function:

◆ setFramed()

void Graph3D::setFramed ( )

Definition at line 1726 of file Graph3D.cpp.

1727 {
1728  if (sp->coordinates()->style() == FRAME)
1729  return;
1730 
1731  sp->makeCurrent();
1732  sp->setCoordinateStyle(FRAME);
1733 }

References sp.

◆ setFrontGrid()

void Graph3D::setFrontGrid ( bool  b)

Definition at line 1985 of file Graph3D.cpp.

1986 {
1987  setGrid(Qwt3D::FRONT,b);
1988 }

References setGrid().

Here is the call graph for this function:

◆ setGrid() [1/2]

void Graph3D::setGrid ( int  grids)

Definition at line 1961 of file Graph3D.cpp.

1962 {
1963  if (!sp)
1964  return;
1965 
1966  sp->coordinates()->setGridLines(true, false,grids);
1967 }

References grids(), and sp.

Here is the call graph for this function:

◆ setGrid() [2/2]

void Graph3D::setGrid ( Qwt3D::SIDE  s,
bool  b 
)

Definition at line 1944 of file Graph3D.cpp.

1945 {
1946  if (!sp)
1947  return;
1948 
1949  int sum = sp->coordinates()->grids();
1950 
1951  if (b)
1952  sum |= s;
1953  else
1954  sum &= ~s;
1955 
1956  sp->coordinates()->setGridLines(sum!=Qwt3D::NOSIDEGRID, false, sum);
1957  sp->updateGL();
1958  emit modified();
1959 }

References modified(), and sp.

Referenced by copy(), ApplicationWindow::openSurfacePlot(), setBackGrid(), setCeilGrid(), setFloorGrid(), setFrontGrid(), setLeftGrid(), and setRightGrid().

Here is the caller graph for this function:

◆ setHidden()

void MyWidget::setHidden ( )
virtualinherited

Notifies that a window was hidden by a direct user action.

Definition at line 162 of file MyWidget.cpp.

163 {
164  w_status = Hidden;
165  emit statusChanged (this);
166  hide();
167 }

References MyWidget::Hidden, MyWidget::statusChanged(), and MyWidget::w_status.

Referenced by ApplicationWindow::hideWindow(), and ApplicationWindow::openTemplate().

Here is the caller graph for this function:

◆ setHiddenLineGrid()

void Graph3D::setHiddenLineGrid ( )

Definition at line 1781 of file Graph3D.cpp.

1782 {
1783  if (sp->plotStyle() == HIDDENLINE)
1784  return;
1785 
1786  sp->makeCurrent();
1787  sp->setPlotStyle(HIDDENLINE);
1788  sp->showColorLegend(false);
1789  sp->updateData();
1790  sp->updateGL();
1791 
1792  style_=HIDDENLINE;
1793  pointStyle = None;
1794  legendOn=false;
1795 }

References legendOn, None, pointStyle, sp, and style_.

◆ setIgnoreFonts()

void Graph3D::setIgnoreFonts ( bool  ok)
inline

Definition at line 119 of file Graph3D.h.

119 {ignoreFonts = ok;};

Referenced by ApplicationWindow::openSurfacePlot().

Here is the caller graph for this function:

◆ setLeftGrid()

void Graph3D::setLeftGrid ( bool  b)

Definition at line 1969 of file Graph3D.cpp.

1970 {
1971  setGrid(Qwt3D::LEFT,b);
1972 }

References setGrid().

Here is the call graph for this function:

◆ setLineGrid()

void Graph3D::setLineGrid ( )

Definition at line 1797 of file Graph3D.cpp.

1798 {
1799  if (sp->plotStyle() == WIREFRAME)
1800  return;
1801 
1802  sp->makeCurrent();
1803  sp->setPlotStyle(WIREFRAME);
1804  sp->showColorLegend(false);
1805  sp->updateData();
1806  sp->updateGL();
1807 
1808  pointStyle = None;
1809  style_=WIREFRAME;
1810  legendOn=false;
1811 }

References legendOn, None, pointStyle, sp, and style_.

◆ setMaximized()

void MyWidget::setMaximized ( )
inherited

Definition at line 183 of file MyWidget.cpp.

184 {
185  showMaximized();
187  emit statusChanged (this);
188 }

References MyWidget::Maximized, MyWidget::statusChanged(), and MyWidget::w_status.

Referenced by ApplicationWindow::folderItemDoubleClicked(), ApplicationWindow::maximizeWindow(), and ApplicationWindow::openTemplate().

Here is the caller graph for this function:

◆ setMeshLineWidth()

void Graph3D::setMeshLineWidth ( int  lw)

Definition at line 1928 of file Graph3D.cpp.

1929 {
1930  if ((int)sp->meshLineWidth() == lw)
1931  return;
1932 
1933  sp->makeCurrent();
1934  sp->setMeshLineWidth((double)lw);
1935  sp->updateData();
1936  sp->updateGL();
1937 }

References sp.

Referenced by copy(), and ApplicationWindow::openSurfacePlot().

Here is the caller graph for this function:

◆ setMinimized()

void MyWidget::setMinimized ( )
inherited

Definition at line 176 of file MyWidget.cpp.

177 {
178  showMinimized();
180  emit statusChanged (this);
181 }

References MyWidget::Minimized, MyWidget::statusChanged(), and MyWidget::w_status.

Referenced by ApplicationWindow::minimizeWindow(), and ApplicationWindow::openTemplate().

Here is the caller graph for this function:

◆ setName()

virtual void MyWidget::setName ( const QString &  s)
inlinevirtualinherited

Set the window name.

Reimplemented in Table, and Matrix.

Definition at line 83 of file MyWidget.h.

83 {setObjectName(s); updateCaption();};

References MyWidget::updateCaption().

Referenced by ApplicationWindow::dataPlot3D(), ApplicationWindow::dataPlotXYZ(), ApplicationWindow::initBareMultilayerPlot(), ApplicationWindow::initNote(), ApplicationWindow::newPlot3D(), ApplicationWindow::openMatrixPlot3D(), ApplicationWindow::plot3DMatrix(), and ApplicationWindow::renameWindow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setNoAxes()

void Graph3D::setNoAxes ( )

Definition at line 1744 of file Graph3D.cpp.

1745 {
1746  if (sp->coordinates()->style() == NOCOORD)
1747  return;
1748 
1749  sp->makeCurrent();
1750  sp->setCoordinateStyle(NOCOORD);
1751 }

References sp.

◆ setNoGrid()

void Graph3D::setNoGrid ( )

Definition at line 1753 of file Graph3D.cpp.

1754 {
1755  if (sp->plotStyle() == FILLED)
1756  return;
1757 
1758  sp->makeCurrent();
1759  sp->setPlotStyle(FILLED);
1760  sp->updateData();
1761  sp->updateGL();
1762 
1763  style_=FILLED;
1764  pointStyle = None;
1765 }

References None, pointStyle, sp, and style_.

◆ setNormal()

void MyWidget::setNormal ( )
inherited

Definition at line 169 of file MyWidget.cpp.

170 {
171  showNormal();
172  w_status = Normal;
173  emit statusChanged (this);
174 }

References MyWidget::Normal, MyWidget::statusChanged(), and MyWidget::w_status.

Referenced by ApplicationWindow::activateSubWindow(), ApplicationWindow::folderItemDoubleClicked(), and ApplicationWindow::openTemplate().

Here is the caller graph for this function:

◆ setNumbersFont() [1/2]

void Graph3D::setNumbersFont ( const QFont &  font)

Definition at line 819 of file Graph3D.cpp.

820 {
821  sp->coordinates()->setNumberFont (font);
822  sp->makeCurrent();
823  sp->updateGL();
824 }

References sp.

Referenced by copy(), ApplicationWindow::customPlot3D(), and ApplicationWindow::openSurfacePlot().

Here is the caller graph for this function:

◆ setNumbersFont() [2/2]

void Graph3D::setNumbersFont ( const QStringList &  lst)

Definition at line 826 of file Graph3D.cpp.

827 {
828  QFont fnt=QFont(lst[1],lst[2].toInt(),lst[3].toInt(),lst[4].toInt());
829  sp->coordinates()->setNumberFont(fnt);
830 }

References sp.

◆ setOptions() [1/2]

void Graph3D::setOptions ( bool  legend,
int  r,
int  dist 
)

Definition at line 2719 of file Graph3D.cpp.

2720 {
2721  sp->showColorLegend(legend);
2722  legendOn=legend;
2723  sp->setResolution(r);
2724  adjustLabels(dist);
2725 }

References adjustLabels(), python-sipcmd::dist, legendOn, and sp.

Referenced by copy(), and ApplicationWindow::openSurfacePlot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setOptions() [2/2]

void Graph3D::setOptions ( const QStringList &  lst)

Definition at line 2708 of file Graph3D.cpp.

2709 {
2710  legendOn=false;
2711  if (lst[1].toInt() == 1)
2712  legendOn=true;
2713  sp->showColorLegend(legendOn);
2714  sp->setResolution(lst[2].toInt());
2715  adjustLabels(lst[3].toInt());
2716 }

References adjustLabels(), legendOn, and sp.

Here is the call graph for this function:

◆ setOrtho()

void Graph3D::setOrtho ( bool  on = true)
inline

Definition at line 128 of file Graph3D.h.

128 {sp->setOrtho(on);};

Referenced by copy(), ApplicationWindow::customPlot3D(), ApplicationWindow::openSurfacePlot(), and ApplicationWindow::setPlot3DOptions().

Here is the caller graph for this function:

◆ setPlotAssociation()

void Graph3D::setPlotAssociation ( const QString &  s)
inline

Definition at line 341 of file Graph3D.h.

341 {plotAssociation = s;};

◆ setPointOptions()

void Graph3D::setPointOptions ( double  size,
bool  s 
)

Definition at line 2101 of file Graph3D.cpp.

2102 {
2103  if (pointSize == size && smooth == s)
2104  return;
2105 
2106  pointSize = size;
2107  smooth = s;
2108 }

References pointSize, and smooth.

Referenced by copy().

Here is the caller graph for this function:

◆ setPointsMesh()

void Graph3D::setPointsMesh ( )

Definition at line 1813 of file Graph3D.cpp.

1814 {
1815  if (!sp || pointStyle == Dots)
1816  return;
1817 
1818  pointStyle=Dots;
1819  style_=Qwt3D::USER;
1820 
1821  sp->makeCurrent();
1822  sp->setPlotStyle(Dot(pointSize, smooth));
1823  sp->updateData();
1824  sp->updateGL();
1825 }

References Dots, pointSize, pointStyle, smooth, sp, and style_.

◆ setResolution()

void Graph3D::setResolution ( int  r)

Definition at line 2635 of file Graph3D.cpp.

2636 {
2637  if (sp->resolution() == r)
2638  return;
2639 
2640  sp->makeCurrent();
2641  sp->setResolution(r);
2642  sp->updateData();
2643  sp->updateGL();
2644  emit modified();
2645 }

References modified(), and sp.

Referenced by ApplicationWindow::customPlot3D().

Here is the caller graph for this function:

◆ setRightGrid()

void Graph3D::setRightGrid ( bool  b)

Definition at line 1973 of file Graph3D.cpp.

1974 {
1975  setGrid(Qwt3D::RIGHT,b);
1976 }

References setGrid().

Here is the call graph for this function:

◆ setRotation()

void Graph3D::setRotation ( double  xVal,
double  yVal,
double  zVal 
)

Definition at line 2360 of file Graph3D.cpp.

2361 {
2362  sp->setRotation(xVal,yVal,zVal);
2363 }

References sp.

Referenced by copy(), and ApplicationWindow::openSurfacePlot().

Here is the caller graph for this function:

◆ setScale()

void Graph3D::setScale ( double  xVal,
double  yVal,
double  zVal 
)

Definition at line 2365 of file Graph3D.cpp.

2366 {
2367  sp->setScale(xVal,yVal,zVal);
2368 }

References sp.

Referenced by copy(), and ApplicationWindow::openSurfacePlot().

Here is the caller graph for this function:

◆ setShift()

void Graph3D::setShift ( double  xVal,
double  yVal,
double  zVal 
)

Definition at line 2370 of file Graph3D.cpp.

2371 {
2372  sp->setShift(xVal,yVal,zVal);
2373 }

References sp.

Referenced by copy(), and ApplicationWindow::openSurfacePlot().

Here is the caller graph for this function:

◆ setSmoothMesh()

void Graph3D::setSmoothMesh ( bool  smooth)

Definition at line 2842 of file Graph3D.cpp.

2843 {
2844  if (smoothMesh == smooth)
2845  return;
2846 
2847  smoothMesh = smooth;
2848  sp->setSmoothMesh(smoothMesh);
2849  sp->coordinates()->setLineSmooth(smoothMesh);
2850  sp->updateData();
2851  sp->updateGL();
2852 }

References smooth, smoothMesh, and sp.

Referenced by ApplicationWindow::customPlot3D(), and ApplicationWindow::setPlot3DOptions().

Here is the caller graph for this function:

◆ setStatus()

void MyWidget::setStatus ( Status  s)
inherited

Set the window status flag (hidden, normal, minimized or maximized)

Definition at line 153 of file MyWidget.cpp.

154 {
155  if (w_status == s)
156  return;
157 
158  w_status = s;
159  emit statusChanged (this);
160 }

References MyWidget::statusChanged(), and MyWidget::w_status.

Referenced by ApplicationWindow::changeFolder(), ApplicationWindow::restoreWindowGeometry(), and ApplicationWindow::updateWindowStatus().

Here is the caller graph for this function:

◆ setStyle() [1/2]

void Graph3D::setStyle ( const QStringList &  st)

Definition at line 2291 of file Graph3D.cpp.

2292 {
2293  if (st[1] =="nocoord")
2294  sp->setCoordinateStyle(NOCOORD);
2295  else if (st[1] =="frame")
2296  sp->setCoordinateStyle(FRAME);
2297  else if (st[1] =="box")
2298  sp->setCoordinateStyle(BOX);
2299 
2300  if (st[2] =="nofloor")
2301  sp->setFloorStyle(NOFLOOR);
2302  else if (st[2] =="flooriso")
2303  sp->setFloorStyle(FLOORISO);
2304  else if (st[2] =="floordata")
2305  sp->setFloorStyle(FLOORDATA);
2306 
2307  if (st[3] =="filledmesh")
2308  sp->setPlotStyle(FILLEDMESH);
2309  else if (st[3] =="filled")
2310  sp->setPlotStyle(FILLED);
2311  else if (st[3] =="points")
2312  {
2313  pointSize = st[4].toDouble();
2314 
2315  smooth=false;
2316  if (st[5] == "1")
2317  smooth=true;
2318 
2319  sp->setPlotStyle(Dot(pointSize, smooth));
2320  pointStyle = Dots;
2321  }
2322  else if (st[3] =="wireframe")
2323  sp->setPlotStyle(WIREFRAME);
2324  else if (st[3] =="hiddenline")
2325  sp->setPlotStyle(HIDDENLINE);
2326  else if (st[3] =="bars")
2327  {
2328  barsRad = (st[4]).toDouble();
2329  sp->setPlotStyle(Bar(barsRad));
2331  }
2332  else if (st[3] =="cones")
2333  {
2334  conesRad = (st[4]).toDouble();
2335  conesQuality = (st[5]).toInt();
2336 
2337  sp->setPlotStyle(Cone3D(conesRad, conesQuality));
2338  pointStyle = Cones;
2339  }
2340  else if (st[3] =="cross")
2341  {
2342  crossHairRad = (st[4]).toDouble();
2343  crossHairLineWidth = (st[5]).toDouble();
2344 
2345  crossHairSmooth=false;
2346  if (st[6] == "1")
2347  crossHairSmooth=true;
2348 
2349  crossHairBoxed=false;
2350  if (st[7] == "1")
2351  crossHairBoxed=true;
2352 
2353  sp->setPlotStyle(CrossHair(crossHairRad, crossHairLineWidth, crossHairSmooth, crossHairBoxed));
2355  }
2356 
2357  style_ = sp->plotStyle() ;
2358 }

References barsRad, Cones, conesQuality, conesRad, crossHairBoxed, crossHairLineWidth, crossHairRad, crossHairSmooth, Dots, HairCross, pointSize, pointStyle, smooth, sp, style_, and VerticalBars.

◆ setStyle() [2/2]

void Graph3D::setStyle ( Qwt3D::COORDSTYLE  coord,
Qwt3D::FLOORSTYLE  floor,
Qwt3D::PLOTSTYLE  plot,
Graph3D::PointStyle  point 
)

Definition at line 2200 of file Graph3D.cpp.

2202 {
2203  sp->setCoordinateStyle(coord);
2204  sp->setFloorStyle(floor);
2205 
2206  if (point == None)
2207  sp->setPlotStyle(plot);
2208  else if (point == VerticalBars)
2209  sp->setPlotStyle(Bar(barsRad));
2210  else if (point == Dots)
2211  sp->setPlotStyle(Dot(pointSize, smooth));
2212  else if (point == HairCross)
2213  sp->setPlotStyle(CrossHair(crossHairRad, crossHairLineWidth, crossHairSmooth, crossHairBoxed));
2214  else if (point == Cones)
2215  sp->setPlotStyle(Cone3D(conesRad, conesQuality));
2216 
2217  pointStyle=point;
2218  style_=sp->plotStyle() ;
2219 }

References barsRad, Cones, conesQuality, conesRad, crossHairBoxed, crossHairLineWidth, crossHairRad, crossHairSmooth, Dots, HairCross, None, pointSize, pointStyle, smooth, sp, style_, and VerticalBars.

Referenced by copy(), and ApplicationWindow::openSurfacePlot().

Here is the caller graph for this function:

◆ setTickLengths()

void Graph3D::setTickLengths ( const QStringList &  lst)

Definition at line 903 of file Graph3D.cpp.

904 {
905  double majorl,minorl;
906  QStringList tick_length = lst;
907  if (int(lst.count()) > 6)
908  tick_length.removeAll(tick_length.first());
909 
910  majorl=tick_length[0].toDouble();
911  minorl=tick_length[1].toDouble();
912  sp->coordinates()->axes[X1].setTicLength (majorl,minorl);
913  sp->coordinates()->axes[X2].setTicLength (majorl,minorl);
914  sp->coordinates()->axes[X3].setTicLength (majorl,minorl);
915  sp->coordinates()->axes[X4].setTicLength (majorl,minorl);
916 
917  majorl=tick_length[2].toDouble();
918  minorl=tick_length[3].toDouble();
919  sp->coordinates()->axes[Y1].setTicLength (majorl,minorl);
920  sp->coordinates()->axes[Y2].setTicLength (majorl,minorl);
921  sp->coordinates()->axes[Y3].setTicLength (majorl,minorl);
922  sp->coordinates()->axes[Y4].setTicLength (majorl,minorl);
923 
924  majorl=tick_length[4].toDouble();
925  minorl=tick_length[5].toDouble();
926  sp->coordinates()->axes[Z1].setTicLength (majorl,minorl);
927  sp->coordinates()->axes[Z2].setTicLength (majorl,minorl);
928  sp->coordinates()->axes[Z3].setTicLength (majorl,minorl);
929  sp->coordinates()->axes[Z4].setTicLength (majorl,minorl);
930 }

References sp.

Referenced by copy(), and ApplicationWindow::openSurfacePlot().

Here is the caller graph for this function:

◆ setTicks()

void Graph3D::setTicks ( const QStringList &  options)

Definition at line 1480 of file Graph3D.cpp.

1481 {
1482  int min,maj;
1483  if (int(options.count()) == 6)
1484  {
1485  maj=options[0].toInt();
1486  sp->coordinates()->axes[X1].setMajors(maj);
1487  sp->coordinates()->axes[X2].setMajors(maj);
1488  sp->coordinates()->axes[X3].setMajors(maj);
1489  sp->coordinates()->axes[X4].setMajors(maj);
1490 
1491  min=options[1].toInt();
1492  sp->coordinates()->axes[X1].setMinors(min);
1493  sp->coordinates()->axes[X2].setMinors(min);
1494  sp->coordinates()->axes[X3].setMinors(min);
1495  sp->coordinates()->axes[X4].setMinors(min);
1496 
1497  maj=options[2].toInt();
1498  sp->coordinates()->axes[Y1].setMajors(maj);
1499  sp->coordinates()->axes[Y2].setMajors(maj);
1500  sp->coordinates()->axes[Y3].setMajors(maj);
1501  sp->coordinates()->axes[Y4].setMajors(maj);
1502 
1503  min=options[3].toInt();
1504  sp->coordinates()->axes[Y1].setMinors(min);
1505  sp->coordinates()->axes[Y2].setMinors(min);
1506  sp->coordinates()->axes[Y3].setMinors(min);
1507  sp->coordinates()->axes[Y4].setMinors(min);
1508 
1509  maj=options[4].toInt();
1510  sp->coordinates()->axes[Z1].setMajors(maj);
1511  sp->coordinates()->axes[Z2].setMajors(maj);
1512  sp->coordinates()->axes[Z3].setMajors(maj);
1513  sp->coordinates()->axes[Z4].setMajors(maj);
1514 
1515  min=options[5].toInt();
1516  sp->coordinates()->axes[Z1].setMinors(min);
1517  sp->coordinates()->axes[Z2].setMinors(min);
1518  sp->coordinates()->axes[Z3].setMinors(min);
1519  sp->coordinates()->axes[Z4].setMinors(min);
1520  }
1521  else
1522  {
1523  maj=options[1].toInt();
1524  sp->coordinates()->axes[X1].setMajors(maj);
1525  sp->coordinates()->axes[X2].setMajors(maj);
1526  sp->coordinates()->axes[X3].setMajors(maj);
1527  sp->coordinates()->axes[X4].setMajors(maj);
1528 
1529  min=options[2].toInt();
1530  sp->coordinates()->axes[X1].setMinors(min);
1531  sp->coordinates()->axes[X2].setMinors(min);
1532  sp->coordinates()->axes[X3].setMinors(min);
1533  sp->coordinates()->axes[X4].setMinors(min);
1534 
1535  maj=options[3].toInt();
1536  sp->coordinates()->axes[Y1].setMajors(maj);
1537  sp->coordinates()->axes[Y2].setMajors(maj);
1538  sp->coordinates()->axes[Y3].setMajors(maj);
1539  sp->coordinates()->axes[Y4].setMajors(maj);
1540 
1541  min=options[4].toInt();
1542  sp->coordinates()->axes[Y1].setMinors(min);
1543  sp->coordinates()->axes[Y2].setMinors(min);
1544  sp->coordinates()->axes[Y3].setMinors(min);
1545  sp->coordinates()->axes[Y4].setMinors(min);
1546 
1547  maj=options[5].toInt();
1548  sp->coordinates()->axes[Z1].setMajors(maj);
1549  sp->coordinates()->axes[Z2].setMajors(maj);
1550  sp->coordinates()->axes[Z3].setMajors(maj);
1551  sp->coordinates()->axes[Z4].setMajors(maj);
1552 
1553  min=options[6].toInt();
1554  sp->coordinates()->axes[Z1].setMinors(min);
1555  sp->coordinates()->axes[Z2].setMinors(min);
1556  sp->coordinates()->axes[Z3].setMinors(min);
1557  sp->coordinates()->axes[Z4].setMinors(min);
1558  }
1559 }

References sp.

Referenced by copy(), and ApplicationWindow::openSurfacePlot().

Here is the caller graph for this function:

◆ setTitle() [1/2]

void Graph3D::setTitle ( const QString &  s,
const QColor &  color,
const QFont &  font 
)

Definition at line 2659 of file Graph3D.cpp.

2660 {
2661  if (title != s)
2662  {
2663  title=s;
2664  sp->setTitle(title);
2665  }
2666 
2667  titleCol=color;
2668  sp->setTitleColor(Qt2GL(color));
2669 
2670  if (titleFnt != font)
2671  {
2672  titleFnt=font;
2673  sp->setTitleFont(font.family(),font.pointSize(),font.weight(),font.italic());
2674  }
2675 }

References sp, title, titleCol, and titleFnt.

◆ setTitle() [2/2]

void Graph3D::setTitle ( const QStringList &  lst)

Definition at line 2647 of file Graph3D.cpp.

2648 {
2649  title=lst[1];
2650  sp->setTitle(title);
2651 
2652  titleCol=QColor(COLORVALUE(lst[2]));
2653  sp->setTitleColor(Qt2GL(titleCol));
2654 
2655  titleFnt=QFont(lst[3],lst[4].toInt(),lst[5].toInt(),lst[6].toInt());
2656  sp->setTitleFont(titleFnt.family(),titleFnt.pointSize(),titleFnt.weight(),titleFnt.italic());
2657 }

References COLORVALUE(), sp, title, titleCol, and titleFnt.

Referenced by copy(), and ApplicationWindow::openSurfacePlot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTitleFont()

void Graph3D::setTitleFont ( const QFont &  font)

Definition at line 2699 of file Graph3D.cpp.

2700 {
2701  if (titleFnt != font)
2702  {
2703  titleFnt=font;
2704  sp->setTitleFont(font.family(),font.pointSize(),font.weight(),font.italic());
2705  }
2706 }

References sp, and titleFnt.

Referenced by ApplicationWindow::customPlot3D().

Here is the caller graph for this function:

◆ setTransparency()

void Graph3D::setTransparency ( double  t)

Definition at line 2823 of file Graph3D.cpp.

2824 {
2825  if (alpha == t)
2826  return;
2827 
2828  alpha = t;
2829 
2830  Qwt3D::StandardColor* color=(StandardColor*) sp->dataColor ();
2831  color->setAlpha(t);
2832 }

References alpha, and sp.

Referenced by copy().

Here is the caller graph for this function:

◆ setWindowLabel()

virtual void MyWidget::setWindowLabel ( const QString &  s)
inlinevirtualinherited

Set the window label.

Reimplemented in Table, and Matrix.

Definition at line 78 of file MyWidget.h.

78 { w_label = s; updateCaption();};

References MyWidget::updateCaption(), and MyWidget::w_label.

Referenced by RenameWindowDialog::accept(), ApplicationWindow::appendProject(), ApplicationWindow::clone(), ImportOPJ::importGraphs(), ImportOPJ::importNotes(), ApplicationWindow::loadImage(), ApplicationWindow::loadProject(), ApplicationWindow::openNote(), and ApplicationWindow::openSurfacePlot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setXAxisLabelFont() [1/2]

void Graph3D::setXAxisLabelFont ( const QFont &  fnt)

Definition at line 832 of file Graph3D.cpp.

833 {
834  sp->coordinates()->axes[X1].setLabelFont(fnt);
835  sp->coordinates()->axes[X2].setLabelFont(fnt);
836  sp->coordinates()->axes[X3].setLabelFont(fnt);
837  sp->coordinates()->axes[X4].setLabelFont(fnt);
838 }

References sp.

Referenced by copy(), ApplicationWindow::customPlot3D(), ApplicationWindow::openSurfacePlot(), and scaleFonts().

Here is the caller graph for this function:

◆ setXAxisLabelFont() [2/2]

void Graph3D::setXAxisLabelFont ( const QStringList &  lst)

Definition at line 856 of file Graph3D.cpp.

857 {
858  QFont fnt=QFont(lst[1],lst[2].toInt(),lst[3].toInt(),lst[4].toInt());
859  sp->coordinates()->axes[X1].setLabelFont(fnt);
860  sp->coordinates()->axes[X2].setLabelFont(fnt);
861  sp->coordinates()->axes[X3].setLabelFont(fnt);
862  sp->coordinates()->axes[X4].setLabelFont(fnt);
863 }

References sp.

◆ setYAxisLabelFont() [1/2]

void Graph3D::setYAxisLabelFont ( const QFont &  fnt)

Definition at line 840 of file Graph3D.cpp.

841 {
842  sp->coordinates()->axes[Y1].setLabelFont(fnt);
843  sp->coordinates()->axes[Y2].setLabelFont(fnt);
844  sp->coordinates()->axes[Y3].setLabelFont(fnt);
845  sp->coordinates()->axes[Y4].setLabelFont(fnt);
846 }

References sp.

Referenced by copy(), ApplicationWindow::customPlot3D(), ApplicationWindow::openSurfacePlot(), and scaleFonts().

Here is the caller graph for this function:

◆ setYAxisLabelFont() [2/2]

void Graph3D::setYAxisLabelFont ( const QStringList &  lst)

Definition at line 865 of file Graph3D.cpp.

866 {
867  QFont fnt=QFont(lst[1],lst[2].toInt(),lst[3].toInt(),lst[4].toInt());
868  sp->coordinates()->axes[Y1].setLabelFont(fnt);
869  sp->coordinates()->axes[Y2].setLabelFont(fnt);
870  sp->coordinates()->axes[Y3].setLabelFont(fnt);
871  sp->coordinates()->axes[Y4].setLabelFont(fnt);
872 }

References sp.

◆ setZAxisLabelFont() [1/2]

void Graph3D::setZAxisLabelFont ( const QFont &  fnt)

Definition at line 848 of file Graph3D.cpp.

849 {
850  sp->coordinates()->axes[Z1].setLabelFont(fnt);
851  sp->coordinates()->axes[Z2].setLabelFont(fnt);
852  sp->coordinates()->axes[Z3].setLabelFont(fnt);
853  sp->coordinates()->axes[Z4].setLabelFont(fnt);
854 }

References sp.

Referenced by copy(), ApplicationWindow::customPlot3D(), ApplicationWindow::openSurfacePlot(), and scaleFonts().

Here is the caller graph for this function:

◆ setZAxisLabelFont() [2/2]

void Graph3D::setZAxisLabelFont ( const QStringList &  lst)

Definition at line 874 of file Graph3D.cpp.

875 {
876  QFont fnt=QFont(lst[1],lst[2].toInt(),lst[3].toInt(),lst[4].toInt());
877  sp->coordinates()->axes[Z1].setLabelFont(fnt);
878  sp->coordinates()->axes[Z2].setLabelFont(fnt);
879  sp->coordinates()->axes[Z3].setLabelFont(fnt);
880  sp->coordinates()->axes[Z4].setLabelFont(fnt);
881 }

References sp.

◆ setZoom()

void Graph3D::setZoom ( double  val)

Definition at line 2375 of file Graph3D.cpp.

2376 {
2377  sp->setZoom(val);
2378 }

References sp.

Referenced by copy(), and ApplicationWindow::openSurfacePlot().

Here is the caller graph for this function:

◆ shiftChanged()

void Graph3D::shiftChanged ( double  ,
double  ,
double   
)

Definition at line 983 of file Graph3D.cpp.

984 {
985  emit modified();
986 }

References modified().

Referenced by initPlot().

Here is the caller graph for this function:

◆ showColorLegend()

void Graph3D::showColorLegend ( bool  show)

Definition at line 2622 of file Graph3D.cpp.

2623 {
2624  if (legendOn == show)
2625  return;
2626 
2627  sp->makeCurrent();
2628  sp->showColorLegend(show);
2629 
2630  legendOn=show;
2631  sp->updateGL();
2632  emit modified();
2633 }

References legendOn, modified(), and sp.

Referenced by ApplicationWindow::customPlot3D().

Here is the caller graph for this function:

◆ showContextMenu

void Graph3D::showContextMenu ( )
signal

Referenced by contextMenuEvent().

Here is the caller graph for this function:

◆ showOptionsDialog

void Graph3D::showOptionsDialog ( )
signal

Referenced by eventFilter().

Here is the caller graph for this function:

◆ showTitleBarMenu

void MyWidget::showTitleBarMenu ( )
signalinherited

Emitted when the title bar recieves a QContextMenuEvent.

Referenced by contextMenuEvent(), MyWidget::contextMenuEvent(), and MultiLayer::mousePressEvent().

Here is the caller graph for this function:

◆ showWorksheet()

void Graph3D::showWorksheet ( )

Definition at line 2834 of file Graph3D.cpp.

2835 {
2836  if (worksheet)
2837  worksheet->showMaximized();
2838  else if (d_matrix)
2839  d_matrix->showMaximized();
2840 }

References d_matrix, and worksheet.

◆ smoothCrossHair()

bool Graph3D::smoothCrossHair ( )
inline

Definition at line 321 of file Graph3D.h.

321 {return crossHairSmooth;};

Referenced by copy(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ smoothPoints()

bool Graph3D::smoothPoints ( )
inline

Definition at line 318 of file Graph3D.h.

318 {return smooth;};

Referenced by copy(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ status()

Status MyWidget::status ( )
inlineinherited

Return the window status flag (hidden, normal, minimized or maximized)

Definition at line 98 of file MyWidget.h.

98 {return w_status;};

References MyWidget::w_status.

Referenced by ApplicationWindow::changeFolder(), ApplicationWindow::clone(), ApplicationWindow::openTemplate(), ApplicationWindow::showAllFolderWindows(), ApplicationWindow::updateWindowStatus(), and ApplicationWindow::windowGeometryInfo().

Here is the caller graph for this function:

◆ statusChanged

void MyWidget::statusChanged ( MyWidget )
signalinherited

Emitted when the window status changed.

Referenced by MyWidget::changeEvent(), MyWidget::setHidden(), MyWidget::setMaximized(), MyWidget::setMinimized(), MyWidget::setNormal(), and MyWidget::setStatus().

Here is the caller graph for this function:

◆ titleColor()

QColor Graph3D::titleColor ( )
inline

Definition at line 287 of file Graph3D.h.

287 {return titleCol;};

Referenced by copy(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ titleFont()

QFont Graph3D::titleFont ( )
inline

Definition at line 284 of file Graph3D.h.

284 {return titleFnt;};

Referenced by copy(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ transparency()

double Graph3D::transparency ( )
inline

Definition at line 261 of file Graph3D.h.

261 {return alpha;};

Referenced by copy().

Here is the caller graph for this function:

◆ update()

void Graph3D::update ( )

Definition at line 792 of file Graph3D.cpp.

793 {
794  sp->makeCurrent();
795 
796  resetAxesLabels();
797 
798  sp->updateData();
799  sp->updateGL();
800 }

References resetAxesLabels(), and sp.

Referenced by addMatrixData(), copy(), ApplicationWindow::dataPlot3D(), ApplicationWindow::dataPlotXYZ(), insertFunction(), insertNewData(), ApplicationWindow::newPlot3D(), ApplicationWindow::openMatrixPlot3D(), ApplicationWindow::openSurfacePlot(), PlotWizard::plot3D(), ApplicationWindow::plot3DMatrix(), PlotWizard::plot3DRibbon(), updateBars(), updateCones(), updateCross(), updateData(), updateDataXY(), updateDataXYZ(), updateMatrixData(), updatePoints(), updateScale(), and updateScalesFromMatrix().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateBars()

void Graph3D::updateBars ( double  rad)

Definition at line 2126 of file Graph3D.cpp.

2127 {
2128  if (barsRad == rad)
2129  return;
2130 
2131  barsRad = rad;
2132  sp->setPlotStyle(Bar(barsRad));
2133  update();
2134 }

References barsRad, sp, and update().

Here is the call graph for this function:

◆ updateCaption

void MyWidget::updateCaption ( )
protectedslotinherited

Set caption according to current CaptionPolicy, name and label.

Definition at line 52 of file MyWidget.cpp.

53 {
54  switch (caption_policy)
55  {
56  case Name:
57  setWindowTitle(name());
58  break;
59 
60  case Label:
61  if (!windowLabel().isEmpty())
62  setWindowTitle(windowLabel());
63  else
64  setWindowTitle(name());
65  break;
66 
67  case Both:
68  if (!windowLabel().isEmpty())
69  setWindowTitle(name() + " - " + windowLabel());
70  else
71  setWindowTitle(name());
72  break;
73  }
74 };

References MyWidget::Both, MyWidget::caption_policy, MyWidget::Label, MyWidget::Name, MyWidget::name(), and MyWidget::windowLabel().

Referenced by Matrix::handleAspectDescriptionChange(), Table::handleAspectDescriptionChange(), Matrix::setCaptionPolicy(), MyWidget::setCaptionPolicy(), Table::setCaptionPolicy(), MyWidget::setName(), Matrix::setWindowLabel(), MyWidget::setWindowLabel(), and Table::setWindowLabel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateColors()

void Graph3D::updateColors ( const QColor &  meshColor,
const QColor &  axesColor,
const QColor &  numColor,
const QColor &  labelColor,
const QColor &  bgColor,
const QColor &  gridColor 
)

Definition at line 1633 of file Graph3D.cpp.

1635 {
1636  if (meshCol != meshColor)
1637  {
1638  sp->setMeshColor(Qt2GL(meshColor));
1640  }
1641 
1642  if(axesCol != axesColor)
1643  {
1644  sp->coordinates()->setAxesColor(Qt2GL(axesColor));
1646  }
1647 
1648  if(numCol !=numColor)
1649  {
1650  sp->coordinates()->setNumberColor(Qt2GL(numColor));
1651  numCol=numColor;
1652  }
1653 
1654  if(labelsCol !=labelColor)
1655  {
1656  sp->coordinates()->setLabelColor(Qt2GL(labelColor));
1658  }
1659 
1660  if(bgCol !=bgColor)
1661  {
1662  sp->setBackgroundColor(Qt2GL(bgColor));
1663  bgCol=bgColor;
1664  }
1665 
1666  if(gridCol !=gridColor)
1667  {
1668  sp->coordinates()->setGridLinesColor(Qt2GL(gridColor));
1670  }
1671 
1672  sp->updateData();
1673  sp->updateGL();
1674  emit modified();
1675 }

References axesCol, axesColor(), bgCol, bgColor(), gridCol, gridColor(), labelColor(), labelsCol, meshCol, meshColor(), modified(), numCol, numColor(), and sp.

Referenced by ApplicationWindow::customPlot3D().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateCones()

void Graph3D::updateCones ( double  rad,
int  quality 
)

Definition at line 2153 of file Graph3D.cpp.

2154 {
2155  if (pointStyle == Cones && conesRad == rad && conesQuality == quality)
2156  return;
2157 
2158  conesRad = rad;
2159  conesQuality = quality;
2160  pointStyle = Cones;
2161  sp->setPlotStyle(Cone3D(conesRad,conesQuality));
2162  update();
2163  emit modified();
2164  emit custom3DActions(this);
2165 }

References Cones, conesQuality, conesRad, custom3DActions(), modified(), pointStyle, sp, and update().

Here is the call graph for this function:

◆ updateCross()

void Graph3D::updateCross ( double  rad,
double  linewidth,
bool  smooth,
bool  boxed 
)

Definition at line 2173 of file Graph3D.cpp.

2174 {
2175  if (pointStyle == HairCross && crossHairRad == rad &&
2176  crossHairSmooth == smooth && crossHairBoxed == boxed &&
2177  crossHairLineWidth == linewidth)
2178  return;
2179 
2180  crossHairRad = rad;
2181  crossHairLineWidth=linewidth;
2183  crossHairBoxed = boxed;
2185 
2186  sp->setPlotStyle(CrossHair(rad,linewidth, smooth, boxed));
2187  update();
2188  emit modified();
2189  emit custom3DActions(this);
2190 }

References crossHairBoxed, crossHairLineWidth, crossHairRad, crossHairSmooth, custom3DActions(), HairCross, modified(), pointStyle, smooth, sp, and update().

Here is the call graph for this function:

◆ updateData()

void Graph3D::updateData ( Table table)

Definition at line 579 of file Graph3D.cpp.

580 {
581  if (func)// function plot
582  return;
583 
584  QString name = plotAssociation;
585  int pos=name.indexOf("_",0);
586  int posX=name.indexOf("(",pos);
587  QString xColName=name.mid(pos+1,posX-pos-1);
588 
589  pos=name.indexOf(",",posX);
590  posX=name.indexOf("(",pos);
591  QString yColName=name.mid(pos+1,posX-pos-1);
592 
593  int xCol=table->colIndex(xColName);
594  int yCol=table->colIndex(yColName);
595 
596  if (name.contains("(Z)",Qt::CaseSensitive))
597  {
598  pos=name.indexOf(",",posX);
599  posX=name.indexOf("(",pos);
600  QString zColName=name.mid(pos+1,posX-pos-1);
601  int zCol=table->colIndex(zColName);
602  updateDataXYZ(table, xCol, yCol, zCol);
603  }
604  else
605  updateDataXY(table, xCol, yCol);
606 
607  if (d_autoscale)
608  findBestLayout();
609  update();
610 }

References Table::colIndex(), d_autoscale, findBestLayout(), func, MyWidget::name(), plotAssociation, update(), updateDataXY(), and updateDataXYZ().

Referenced by ApplicationWindow::updateCurves().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateDataXY()

void Graph3D::updateDataXY ( Table table,
int  xCol,
int  yCol 
)

Definition at line 612 of file Graph3D.cpp.

613 {
614  int r=table->numRows();
615  int i, j, xmesh=0, ymesh=2;
616 
617  for (i = 0; i < r; i++)
618  {
619  if (!table->column(xCol)->isInvalid(i) && !table->column(yCol)->isInvalid(i))
620  xmesh++;
621  }
622 
623  if (xmesh<2)
624  {
625  sp->setPlotStyle(NOPLOT);
626  update();
627  return;
628  }
629 
630  double **data = Matrix::allocateMatrixData(xmesh, ymesh);
631  gsl_vector * x = gsl_vector_alloc (xmesh);
632  gsl_vector * y = gsl_vector_alloc (xmesh);
633 
634  for ( j = 0; j < ymesh; j++)
635  {
636  int k=0;
637  for ( i = 0; i < r; i++)
638  {
639  if (!table->column(xCol)->isInvalid(i) && !table->column(yCol)->isInvalid(i))
640  {
641  double xv=table->cell(i,xCol);
642  double yv=table->cell(i,yCol);
643 
644  gsl_vector_set (x, k, xv);
645  gsl_vector_set (y, k, yv);
646 
647  data[k][j] =yv;
648  k++;
649  }
650  }
651  }
652 
653  double minx=gsl_vector_min (x);
654  double maxx=gsl_vector_max(x);
655  double minz=gsl_vector_min (y);
656  double maxz=gsl_vector_max(y);
657  double miny, maxy;
658 
659  sp->makeCurrent();
661  sp->coordinates()->axes[Y1].limits (miny,maxy); //actual Y scale limits
662  sp->loadFromData(data, xmesh, ymesh, minx, maxx, miny, maxy);
663  sp->legend()->setLimits(minz,maxz);
664  sp->legend()->setMajors(legendMajorTicks);
665 
666  gsl_vector_free (x);gsl_vector_free (y);
668 }

References Matrix::allocateMatrixData(), Table::cell(), Table::column(), Matrix::freeMatrixData(), Column::isInvalid(), legendMajorTicks, Table::numRows(), resetNonEmptyStyle(), sp, and update().

Referenced by updateData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateDataXYZ()

void Graph3D::updateDataXYZ ( Table table,
int  xCol,
int  yCol,
int  zCol 
)

Definition at line 670 of file Graph3D.cpp.

671 {
672  int r=table->numRows();
673  int i,j,columns=0;
674 
675  for ( i = 0; i < r; i++)
676  {
677  if (!table->column(xCol)->isInvalid(i) && !table->column(yCol)->isInvalid(i) && !table->column(zCol)->isInvalid(i))
678  columns++;
679  }
680 
681  if (columns<2)
682  {
683  sp->setPlotStyle(NOPLOT);
684  update();
685  return;
686  }
687 
688  Qwt3D::Triple **data=allocateData(columns,columns);
689  gsl_vector * z = gsl_vector_alloc (columns);
690 
691  for ( j = 0; j < columns; j++)
692  {
693  int k=0;
694  for ( i = 0; i < r; i++)
695  {
696  if (!table->column(xCol)->isInvalid(i) && !table->column(yCol)->isInvalid(i) && !table->column(zCol)->isInvalid(i))
697  {
698  double xv=table->cell(i,xCol);
699  double yv=table->cell(i,yCol);
700  double zv=table->cell(i,zCol);
701 
702  gsl_vector_set (z, k, zv);
703  data[k][j] = Triple(xv,yv,zv);
704  k++;
705  }
706  }
707  }
708 
709  double minz=gsl_vector_min(z);
710  double maxz=gsl_vector_max(z);
711  gsl_vector_free (z);
712 
713  sp->makeCurrent();
715 
716  sp->loadFromData (data, columns, columns, false,false);
717  sp->legend()->setLimits(minz,maxz);
718  sp->legend()->setMajors(legendMajorTicks);
719 
720  deleteData(data,columns);
721 }

References allocateData(), Table::cell(), Table::column(), deleteData(), Column::isInvalid(), legendMajorTicks, Table::numRows(), resetNonEmptyStyle(), sp, and update().

Referenced by changeDataColumn(), and updateData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateLabel()

void Graph3D::updateLabel ( int  axis,
const QString &  label,
const QFont &  f 
)

Definition at line 1034 of file Graph3D.cpp.

1035 {
1036  switch(axis)
1037  {
1038  case 0:
1039  if (labels[0] != label)
1040  {
1041  sp->coordinates()->axes[X1].setLabelString(label);
1042  sp->coordinates()->axes[X2].setLabelString(label);
1043  sp->coordinates()->axes[X3].setLabelString(label);
1044  sp->coordinates()->axes[X4].setLabelString(label);
1045  labels[0]=label;
1046  }
1047  if (sp->coordinates()->axes[X1].labelFont() != f)
1048  {
1049  sp->coordinates()->axes[X1].setLabelFont (f);
1050  sp->coordinates()->axes[X2].setLabelFont (f);
1051  sp->coordinates()->axes[X3].setLabelFont (f);
1052  sp->coordinates()->axes[X4].setLabelFont (f);
1053  }
1054  break;
1055 
1056  case 1:
1057  if (labels[1] != label)
1058  {
1059  sp->coordinates()->axes[Y1].setLabelString(label);
1060  sp->coordinates()->axes[Y2].setLabelString(label);
1061  sp->coordinates()->axes[Y3].setLabelString(label);
1062  sp->coordinates()->axes[Y4].setLabelString(label);
1063 
1064  labels[1]=label;
1065  }
1066  if (sp->coordinates()->axes[Y1].labelFont() != f)
1067  {
1068  sp->coordinates()->axes[Y1].setLabelFont (f);
1069  sp->coordinates()->axes[Y2].setLabelFont (f);
1070  sp->coordinates()->axes[Y3].setLabelFont (f);
1071  sp->coordinates()->axes[Y4].setLabelFont (f);
1072  }
1073  break;
1074 
1075  case 2:
1076  if (labels[2] != label)
1077  {
1078  sp->coordinates()->axes[Z1].setLabelString(label);
1079  sp->coordinates()->axes[Z2].setLabelString(label);
1080  sp->coordinates()->axes[Z3].setLabelString(label);
1081  sp->coordinates()->axes[Z4].setLabelString(label);
1082  labels[2]=label;
1083  }
1084  if (sp->coordinates()->axes[Z1].labelFont() != f)
1085  {
1086  sp->coordinates()->axes[Z1].setLabelFont (f);
1087  sp->coordinates()->axes[Z2].setLabelFont (f);
1088  sp->coordinates()->axes[Z3].setLabelFont (f);
1089  sp->coordinates()->axes[Z4].setLabelFont (f);
1090  }
1091  break;
1092  }
1093 
1094  sp->makeCurrent();
1095  sp->updateGL();
1096  emit modified();
1097 }

References labels, modified(), and sp.

◆ updateMatrixData()

void Graph3D::updateMatrixData ( Matrix m)

Definition at line 723 of file Graph3D.cpp.

724 {
725  int cols=m->numCols();
726  int rows=m->numRows();
727 
728  double **data = Matrix::allocateMatrixData(rows, cols);
729  for (int i = 0; i < rows; i++ ){
730  for (int j = 0; j < cols; j++)
731  data[i][j] = m->cell(i, j);
732  }
733 
734  sp->loadFromData(data, rows, cols, m->xStart(), m->xEnd(), m->yStart(), m->yEnd());
735 
736  Qwt3D::Axis z_axis = sp->coordinates()->axes[Z1];
737  double start, end;
738  z_axis.limits (start, end);
739  z_axis.setMajors(z_axis.majors());
740  z_axis.setMajors(z_axis.minors());
741 
742  sp->legend()->setLimits(start, end);
743  sp->legend()->setMajors(legendMajorTicks);
744 
746  if (d_autoscale)
747  findBestLayout();
748  update();
749 }

References Matrix::allocateMatrixData(), Matrix::cell(), d_autoscale, findBestLayout(), Matrix::freeMatrixData(), legendMajorTicks, Matrix::numCols(), Matrix::numRows(), sp, update(), Matrix::xEnd(), Matrix::xStart(), Matrix::yEnd(), and Matrix::yStart().

Here is the call graph for this function:

◆ updatePoints()

void Graph3D::updatePoints ( double  size,
bool  sm 
)

Definition at line 2136 of file Graph3D.cpp.

2137 {
2138  if (pointStyle == Dots && pointSize == size && smooth == sm)
2139  return;
2140 
2141  pointSize = size;
2142  smooth = sm;
2143  pointStyle = Dots;
2144 
2145  Dot d(pointSize, smooth);
2146  sp->setPlotStyle(d);
2147 
2148  update();
2149  emit modified();
2150  emit custom3DActions(this);
2151 }

References custom3DActions(), Dots, modified(), pointSize, pointStyle, smooth, sp, and update().

Here is the call graph for this function:

◆ updateScale()

void Graph3D::updateScale ( int  axis,
const QStringList &  options 
)

Definition at line 1218 of file Graph3D.cpp.

1219 {
1220  double xMin,xMax,yMin,yMax,zMin,zMax;
1221  double *min, *max;
1222  int majors, minors, newMaj, newMin;
1223  Qwt3D::Axis *targetAxes[4];
1224 
1225  sp->makeCurrent();
1226 
1227  switch (axis) {
1228  case 0:
1229  targetAxes[0] = &sp->coordinates()->axes[X1];
1230  targetAxes[1] = &sp->coordinates()->axes[X2];
1231  targetAxes[2] = &sp->coordinates()->axes[X3];
1232  targetAxes[3] = &sp->coordinates()->axes[X4];
1233  min = &xMin; max = &xMax;
1234  break;
1235  case 1:
1236  targetAxes[0] = &sp->coordinates()->axes[Y1];
1237  targetAxes[1] = &sp->coordinates()->axes[Y2];
1238  targetAxes[2] = &sp->coordinates()->axes[Y3];
1239  targetAxes[3] = &sp->coordinates()->axes[Y4];
1240  min = &yMin; max = &yMax;
1241  break;
1242  case 2:
1243  targetAxes[0] = &sp->coordinates()->axes[Z1];
1244  targetAxes[1] = &sp->coordinates()->axes[Z2];
1245  targetAxes[2] = &sp->coordinates()->axes[Z3];
1246  targetAxes[3] = &sp->coordinates()->axes[Z4];
1247  min = &zMin; max = &zMax;
1248  break;
1249  default:
1250  throw runtime_error("invalid axis");
1251  }
1252 
1253  majors = targetAxes[0]->majors();
1254  minors = targetAxes[0]->minors();
1255 
1256  sp->coordinates()->axes[X1].limits(xMin,xMax);
1257  sp->coordinates()->axes[Y1].limits(yMin,yMax);
1258  sp->coordinates()->axes[Z1].limits(zMin,zMax);
1259 
1260  if (*min != options[0].toDouble() || *max != options[1].toDouble()) {
1261  *min = options[0].toDouble();
1262  *max = options[1].toDouble();
1263  if (func) {
1264  func->setDomain(xMin, xMax, yMin, yMax);
1265  func->setMinZ(zMin); func->setMaxZ(zMax);
1266  func->create();
1267  sp->createCoordinateSystem(Triple(xMin, yMin, zMin), Triple(xMax, yMax, zMax));
1268  } else
1269  updateScales(xMin, xMax, yMin, yMax, zMin, zMax);
1270  sp->legend()->setLimits(zMin, zMax);
1271  }
1272 
1273  if (QString::number(scaleType[axis]) != options[4]) {
1274  if (options[4] == "0") {
1275  targetAxes[0]->setScale(LINEARSCALE);
1276  if (axis == 2) sp->legend()->setScale(LINEARSCALE);
1277  scaleType[axis] = 0;
1278  } else {
1279  targetAxes[0]->setScale(LOG10SCALE);
1280  if (axis == 2) sp->legend()->setScale(LOG10SCALE);
1281  scaleType[axis] = 1;
1282  }
1283  }
1284 
1285 
1286  newMaj = options[2].toInt();
1287  if (majors != newMaj)
1288  for (int i=0; i<4; i++)
1289  targetAxes[i]->setMajors(newMaj);
1290 
1291  newMin = options[3].toInt();
1292  if (minors != newMin)
1293  for (int i=0; i<4; i++)
1294  targetAxes[i]->setMinors(newMin);
1295 
1296  update();
1297  emit modified();
1298 }

References func, modified(), scaleType, sp, update(), and updateScales().

Here is the call graph for this function:

◆ updateScales() [1/3]

void Graph3D::updateScales ( double  xl,
double  xr,
double  yl,
double  yr,
double  zl,
double  zr 
)

Definition at line 1300 of file Graph3D.cpp.

1301 {
1302  QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
1303 
1304  if (d_matrix)
1305  updateScalesFromMatrix(xl, xr, yl, yr, zl, zr);
1306  else
1307  {
1308  QString name= plotAssociation;
1309 
1310  int pos=name.indexOf("_",0);
1311  int posX=name.indexOf("(",pos);
1312  QString xColName=name.mid(pos+1,posX-pos-1);
1313  int xCol=worksheet->colIndex(xColName);
1314 
1315  pos=name.indexOf(",",posX);
1316  posX=name.indexOf("(",pos);
1317  QString yColName=name.mid(pos+1,posX-pos-1);
1318  int yCol=worksheet->colIndex(yColName);
1319 
1320  if (name.endsWith("(Z)",Qt::CaseSensitive))
1321  {
1322  pos=name.indexOf(",",posX);
1323  posX=name.indexOf("(",pos);
1324  QString zColName=name.mid(pos+1,posX-pos-1);
1325  int zCol=worksheet->colIndex(zColName);
1326 
1327  updateScales(xl, xr, yl, yr, zl, zr, xCol, yCol, zCol);
1328  }
1329  else if (name.endsWith("(Y)",Qt::CaseSensitive))
1330  updateScales(xl, xr, yl, yr, zl, zr, xCol, yCol);
1331  }
1332 
1333  QApplication::restoreOverrideCursor();
1334 }

References Table::colIndex(), d_matrix, MyWidget::name(), plotAssociation, updateScalesFromMatrix(), and worksheet.

Referenced by updateScale().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateScales() [2/3]

void Graph3D::updateScales ( double  xl,
double  xr,
double  yl,
double  yr,
double  zl,
double  zr,
int  xcol,
int  ycol 
)

Definition at line 1381 of file Graph3D.cpp.

1383 {
1384  int r=worksheet->numRows();
1385  int i, j, xmesh=0, ymesh=2;
1386  double xv, yv;
1387 
1388  for (i = 0; i < r; i++)
1389  {
1390  if (!worksheet->column(xcol)->isInvalid(i) && !worksheet->column(ycol)->isInvalid(i))
1391  {
1392  xv=worksheet->cell(i,xcol);
1393  if (xv >= xl && xv <= xr)
1394  xmesh++;
1395  }
1396  }
1397 
1398  if (xmesh == 0)
1399  xmesh++;
1400 
1401  double **data = Matrix::allocateMatrixData(xmesh, ymesh);
1402 
1403  for ( j = 0; j < ymesh; j++)
1404  {
1405  int k=0;
1406  for ( i = 0; i < r; i++)
1407  {
1408  if (!worksheet->column(xcol)->isInvalid(i) && !worksheet->column(ycol)->isInvalid(i))
1409  {
1410  xv=worksheet->cell(i,xcol);
1411  if (xv >= xl && xv <= xr)
1412  {
1413  yv=worksheet->cell(i,ycol);
1414  if (yv > zr)
1415  data[k][j] = zr;
1416  else if (yv < zl)
1417  data[k][j] = zl;
1418  else
1419  data[k][j] = yv;
1420  k++;
1421  }
1422  }
1423  }
1424  }
1425 
1426  sp->loadFromData(data, xmesh, ymesh, xl, xr, yl, yr);
1427  sp->createCoordinateSystem(Triple(xl, yl, zl), Triple(xr, yr, zr));
1428  Matrix::freeMatrixData(data, xmesh);
1429 }

References Matrix::allocateMatrixData(), Table::cell(), Table::column(), Matrix::freeMatrixData(), Column::isInvalid(), Table::numRows(), sp, and worksheet.

Here is the call graph for this function:

◆ updateScales() [3/3]

void Graph3D::updateScales ( double  xl,
double  xr,
double  yl,
double  yr,
double  zl,
double  zr,
int  xCol,
int  yCol,
int  zCol 
)

Definition at line 1431 of file Graph3D.cpp.

1433 {
1434  int r=worksheet->numRows();
1435  int i,j,columns=0;
1436  double xv, yv, zv;
1437  for ( i = 0; i < r; i++)
1438  {
1439  if (!worksheet->column(xCol)->isInvalid(i) && !worksheet->column(yCol)->isInvalid(i) && !worksheet->column(zCol)->isInvalid(i))
1440  {
1441  xv=worksheet->cell(i,xCol);
1442  yv=worksheet->cell(i,yCol);
1443  if (xv >= xl && xv <= xr && yv >= yl && yv <= yr)
1444  columns++;
1445  }
1446  }
1447 
1448  if (columns == 0)
1449  columns++;
1450 
1451  Qwt3D::Triple **data=allocateData(columns,columns);
1452  for ( j = 0; j < columns; j++)
1453  {
1454  int k=0;
1455  for ( i = 0; i < r; i++)
1456  {
1457  if (!worksheet->column(xCol)->isInvalid(i) && !worksheet->column(yCol)->isInvalid(i) && !worksheet->column(zCol)->isInvalid(i))
1458  {
1459  xv=worksheet->cell(i,xCol);
1460  yv=worksheet->cell(i,yCol);
1461  if (xv >= xl && xv <= xr && yv >= yl && yv <= yr )
1462  {
1463  zv=worksheet->cell(i,zCol);
1464  if (zv > zr)
1465  data[k][j] = Triple(xv,yv,zr);
1466  else if (zv < zl)
1467  data[k][j] = Triple(xv,yv,zl);
1468  else
1469  data[k][j] = Triple(xv,yv,zv);
1470  k++;
1471  }
1472  }
1473  }
1474  }
1475  sp->loadFromData (data, columns, columns, false,false);
1476  sp->createCoordinateSystem(Triple(xl, yl, zl), Triple(xr, yr, zr));
1477  deleteData(data,columns);
1478 }

References allocateData(), Table::cell(), Table::column(), deleteData(), Column::isInvalid(), Table::numRows(), sp, and worksheet.

Here is the call graph for this function:

◆ updateScalesFromMatrix()

void Graph3D::updateScalesFromMatrix ( double  xl,
double  xr,
double  yl,
double  yr,
double  zl,
double  zr 
)

Definition at line 1336 of file Graph3D.cpp.

1338 {
1339  double xStart = qMin(d_matrix->xStart(), d_matrix->xEnd());
1340  double xEnd = qMax(d_matrix->xStart(), d_matrix->xEnd());
1341  double yStart = qMin(d_matrix->yStart(), d_matrix->yEnd());
1342  double yEnd = qMax(d_matrix->yStart(), d_matrix->yEnd());
1343 
1344  double dx = fabs((xEnd - xStart)/double(d_matrix->numCols()-1));
1345  double dy = fabs((yEnd - yStart)/double(d_matrix->numRows()-1));
1346 
1347  int nc = int(fabs(xr - xl)/dx)+1;
1348  int nr = int(fabs(yr - yl)/dy)+1;
1349 
1350  double x_begin = qMin(xl, xr);
1351  double y_begin = qMin(yl, yr);
1352 
1353  double **data_matrix = Matrix::allocateMatrixData(nc, nr);
1354  for (int i = 0; i < nc; i++){
1355  double x = x_begin + i*dx;
1356  for (int j = 0; j < nr; j++){
1357  double y = y_begin + j*dy;
1358  if (x >= xStart && x <= xEnd && y >= yStart && y <= yEnd){
1359  int k = abs((y - yStart)/dy);
1360  int l = abs((x - xStart)/dx);
1361  double val = d_matrix->cell(k, l);
1362  if (val > zr)
1363  data_matrix[i][j] = zr;
1364  else if (val < zl)
1365  data_matrix[i][j] = zl;
1366  else
1367  data_matrix[i][j] = val;
1368  } else
1369  data_matrix[i][j] = 0.0;
1370  }
1371  }
1372  sp->loadFromData(data_matrix, nc, nr, xl, xr, yl, yr);
1373  Matrix::freeMatrixData(data_matrix, nc);
1374 
1375  sp->createCoordinateSystem(Triple(xl, yl, zl), Triple(xr, yr, zr));
1376  sp->legend()->setLimits(zl, zr);
1377  sp->legend()->setMajors(legendMajorTicks);
1378  update();
1379 }

References Matrix::allocateMatrixData(), Matrix::cell(), d_matrix, Matrix::freeMatrixData(), legendMajorTicks, Matrix::numCols(), Matrix::numRows(), sp, update(), Matrix::xEnd(), xStart(), Matrix::xStart(), Matrix::yEnd(), yStart(), and Matrix::yStart().

Referenced by addMatrixData(), and updateScales().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateScaling()

void Graph3D::updateScaling ( double  xVal,
double  yVal,
double  zVal 
)

Definition at line 2395 of file Graph3D.cpp.

2396 {
2397  if (sp->xScale() == xVal && sp->yScale() == yVal && sp->zScale() == zVal)
2398  return;
2399 
2400  QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
2401 
2402  sp->setScale(xVal,yVal,zVal);
2403  sp->updateData();
2404  sp->updateGL();
2405 
2406  QApplication::restoreOverrideCursor();
2407 }

References sp.

◆ updateTickLength()

void Graph3D::updateTickLength ( int  axis,
double  majorLength,
double  minorLength 
)

Definition at line 932 of file Graph3D.cpp.

933 {
934  double majorl,minorl;
935  switch(axis)
936  {
937  case 0:
938  sp->coordinates()->axes[X1].ticLength (majorl,minorl);
939  if (majorl != majorLength || minorl != minorLength)
940  {
941  sp->coordinates()->axes[X1].setTicLength (majorLength,minorLength);
942  sp->coordinates()->axes[X2].setTicLength (majorLength,minorLength);
943  sp->coordinates()->axes[X3].setTicLength (majorLength,minorLength);
944  sp->coordinates()->axes[X4].setTicLength (majorLength,minorLength);
945  }
946  break;
947 
948  case 1:
949  sp->coordinates()->axes[Y1].ticLength (majorl,minorl);
950  if (majorl != majorLength || minorl != minorLength)
951  {
952  sp->coordinates()->axes[Y1].setTicLength (majorLength,minorLength);
953  sp->coordinates()->axes[Y2].setTicLength (majorLength,minorLength);
954  sp->coordinates()->axes[Y3].setTicLength (majorLength,minorLength);
955  sp->coordinates()->axes[Y4].setTicLength (majorLength,minorLength);
956  }
957  break;
958 
959  case 2:
960  sp->coordinates()->axes[Z1].ticLength (majorl,minorl);
961  if (majorl != majorLength || minorl != minorLength)
962  {
963  sp->coordinates()->axes[Z1].setTicLength (majorLength,minorLength);
964  sp->coordinates()->axes[Z2].setTicLength (majorLength,minorLength);
965  sp->coordinates()->axes[Z3].setTicLength (majorLength,minorLength);
966  sp->coordinates()->axes[Z4].setTicLength (majorLength,minorLength);
967  }
968  break;
969  }
970  sp->updateGL();
971 }

References sp.

Referenced by findBestLayout().

Here is the caller graph for this function:

◆ updateTitle()

void Graph3D::updateTitle ( const QString &  s,
const QColor &  color,
const QFont &  font 
)

Definition at line 2677 of file Graph3D.cpp.

2678 {
2679  if (title != s)
2680  {
2681  title=s;
2682  sp->setTitle(title);
2683  }
2684 
2685  titleCol=color;
2686  sp->setTitleColor(Qt2GL(color));
2687 
2688  if (titleFnt != font)
2689  {
2690  titleFnt=font;
2691  sp->setTitleFont(font.family(),font.pointSize(),font.weight(),font.italic());
2692  }
2693 
2694  sp->makeCurrent();
2695  sp->updateGL();
2696  emit modified();
2697 }

References modified(), sp, title, titleCol, and titleFnt.

◆ updateZoom()

void Graph3D::updateZoom ( double  val)

Definition at line 2380 of file Graph3D.cpp.

2381 {
2382  if (sp->zoom() == val)
2383  return;
2384 
2385  QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
2386 
2387  sp->makeCurrent();
2388  sp->setZoom(val);
2389  sp->updateData();
2390  sp->updateGL();
2391 
2392  QApplication::restoreOverrideCursor();
2393 }

References sp.

◆ userFunction()

UserFunction * Graph3D::userFunction ( )

Definition at line 784 of file Graph3D.cpp.

785 {
786  if (func)
787  return func;
788  else
789  return 0;
790 }

References func.

Referenced by ApplicationWindow::clone(), ApplicationWindow::showPlot3dDialog(), and ApplicationWindow::showWindowContextMenu().

Here is the caller graph for this function:

◆ windowLabel()

virtual QString MyWidget::windowLabel ( )
inlinevirtualinherited

Return the window label.

Reimplemented in Table, and Matrix.

Definition at line 76 of file MyWidget.h.

76 {return QString(w_label);};

References MyWidget::w_label.

Referenced by RenameWindowDialog::accept(), ApplicationWindow::addListViewItem(), ApplicationWindow::clone(), Folder::findWindow(), saveToString(), MultiLayer::saveToString(), Note::saveToString(), RenameWindowDialog::setWidget(), and MyWidget::updateCaption().

Here is the caller graph for this function:

◆ xAxisLabelFont()

QFont Graph3D::xAxisLabelFont ( )

Definition at line 1099 of file Graph3D.cpp.

1100 {
1101  return sp->coordinates()->axes[X1].labelFont();
1102 }

References sp.

Referenced by copy(), scaleFonts(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ xRotation()

double Graph3D::xRotation ( )
inline

Definition at line 218 of file Graph3D.h.

218 {return sp->xRotation();};

Referenced by copy().

Here is the caller graph for this function:

◆ xScale()

double Graph3D::xScale ( )
inline

Definition at line 222 of file Graph3D.h.

222 {return sp->xScale();};

Referenced by copy(), findBestLayout(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ xShift()

double Graph3D::xShift ( )
inline

Definition at line 226 of file Graph3D.h.

226 {return sp->xShift();};

Referenced by copy().

Here is the caller graph for this function:

◆ xStart()

double Graph3D::xStart ( )

Definition at line 1114 of file Graph3D.cpp.

1115 {
1116  double start,stop;
1117  sp->coordinates()->axes[X1].limits (start,stop);
1118  return start;
1119 }

References sp.

Referenced by ApplicationWindow::clone(), ApplicationWindow::editSurfacePlot(), and updateScalesFromMatrix().

Here is the caller graph for this function:

◆ xStop()

double Graph3D::xStop ( )

Definition at line 1121 of file Graph3D.cpp.

1122 {
1123  double start,stop;
1124  sp->coordinates()->axes[X1].limits (start,stop);
1125  return stop;
1126 }

References sp.

Referenced by ApplicationWindow::clone(), and ApplicationWindow::editSurfacePlot().

Here is the caller graph for this function:

◆ yAxisLabelFont()

QFont Graph3D::yAxisLabelFont ( )

Definition at line 1104 of file Graph3D.cpp.

1105 {
1106  return sp->coordinates()->axes[Y1].labelFont();
1107 }

References sp.

Referenced by copy(), scaleFonts(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ yRotation()

double Graph3D::yRotation ( )
inline

Definition at line 219 of file Graph3D.h.

219 {return sp->yRotation();};

Referenced by copy().

Here is the caller graph for this function:

◆ yScale()

double Graph3D::yScale ( )
inline

Definition at line 223 of file Graph3D.h.

223 {return sp->yScale();};

Referenced by copy(), findBestLayout(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ yShift()

double Graph3D::yShift ( )
inline

Definition at line 227 of file Graph3D.h.

227 {return sp->yShift();};

Referenced by copy().

Here is the caller graph for this function:

◆ yStart()

double Graph3D::yStart ( )

Definition at line 1128 of file Graph3D.cpp.

1129 {
1130  double start,stop;
1131  sp->coordinates()->axes[Y1].limits (start,stop);
1132  return start;
1133 }

References sp.

Referenced by ApplicationWindow::clone(), ApplicationWindow::editSurfacePlot(), and updateScalesFromMatrix().

Here is the caller graph for this function:

◆ yStop()

double Graph3D::yStop ( )

Definition at line 1135 of file Graph3D.cpp.

1136 {
1137  double start,stop;
1138  sp->coordinates()->axes[Y1].limits (start,stop);
1139  return stop;
1140 }

References sp.

Referenced by ApplicationWindow::clone(), and ApplicationWindow::editSurfacePlot().

Here is the caller graph for this function:

◆ zAxisLabelFont()

QFont Graph3D::zAxisLabelFont ( )

Definition at line 1109 of file Graph3D.cpp.

1110 {
1111  return sp->coordinates()->axes[Z1].labelFont();
1112 }

References sp.

Referenced by copy(), scaleFonts(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ zoom()

double Graph3D::zoom ( )
inline

Definition at line 230 of file Graph3D.h.

230 {return sp->zoom();};

Referenced by copy(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ zoomChanged()

void Graph3D::zoomChanged ( double  )

Definition at line 988 of file Graph3D.cpp.

989 {
990  emit modified();
991 }

References modified().

Referenced by initPlot().

Here is the caller graph for this function:

◆ zRotation()

double Graph3D::zRotation ( )
inline

Definition at line 220 of file Graph3D.h.

220 {return sp->zRotation();};

Referenced by copy().

Here is the caller graph for this function:

◆ zScale()

double Graph3D::zScale ( )
inline

Definition at line 224 of file Graph3D.h.

224 {return sp->zScale();};

Referenced by copy(), findBestLayout(), and ApplicationWindow::showPlot3dDialog().

Here is the caller graph for this function:

◆ zShift()

double Graph3D::zShift ( )
inline

Definition at line 228 of file Graph3D.h.

228 {return sp->zShift();};

Referenced by copy().

Here is the caller graph for this function:

◆ zStart()

double Graph3D::zStart ( )

Definition at line 1142 of file Graph3D.cpp.

1143 {
1144  double start,stop;
1145  sp->coordinates()->axes[Z1].limits (start,stop);
1146  return start;
1147 }

References sp.

Referenced by ApplicationWindow::clone(), and ApplicationWindow::editSurfacePlot().

Here is the caller graph for this function:

◆ zStop()

double Graph3D::zStop ( )

Definition at line 1149 of file Graph3D.cpp.

1150 {
1151  double start,stop;
1152  sp->coordinates()->axes[Z1].limits(start, stop);
1153  return stop;
1154 }

References sp.

Referenced by ApplicationWindow::clone(), and ApplicationWindow::editSurfacePlot().

Here is the caller graph for this function:

Member Data Documentation

◆ alpha

double Graph3D::alpha
private

◆ animation_redraw_wait

int Graph3D::animation_redraw_wait
private

Wait this many msecs before redraw 3D plot (used for animations)

Definition at line 365 of file Graph3D.h.

Referenced by animate(), and initPlot().

◆ askOnClose

bool MyWidget::askOnClose
protectedinherited

Toggle on/off: Ask the user "delete, hide, or cancel?" on a close event.

Definition at line 175 of file MyWidget.h.

Referenced by MyWidget::askOnCloseEvent(), Matrix::closeEvent(), MyWidget::closeEvent(), Table::closeEvent(), and MyWidget::MyWidget().

◆ axesCol

QColor Graph3D::axesCol
private

Definition at line 375 of file Graph3D.h.

Referenced by initPlot(), saveToString(), setColors(), and updateColors().

◆ barsRad

double Graph3D::barsRad
private

◆ bgCol

QColor Graph3D::bgCol
private

Definition at line 375 of file Graph3D.h.

Referenced by initPlot(), saveToString(), setColors(), and updateColors().

◆ birthdate

QString MyWidget::birthdate
protectedinherited

◆ caption_policy

◆ col_

Qwt3D::StandardColor* Graph3D::col_
private

Definition at line 380 of file Graph3D.h.

Referenced by initPlot(), setDataColorMap(), and setDataColors().

◆ color_map

QString Graph3D::color_map
private

File name of the color map used for the data (if any)

Definition at line 367 of file Graph3D.h.

Referenced by initPlot(), saveToString(), and setDataColorMap().

◆ conesQuality

int Graph3D::conesQuality
private

◆ conesRad

double Graph3D::conesRad
private

◆ crossHairBoxed

bool Graph3D::crossHairBoxed
private

◆ crossHairLineWidth