Logo Search packages:      
Sourcecode: scidavis version File versions  Download package

Graph3D Class Reference

#include <Graph3D.h>

Inheritance diagram for Graph3D:

MyWidget

List of all members.


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.


Public Types

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

Public Slots

void addData (Table *table, int xCol, int yCol, int zCol, 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, const QString &xColName, const QString &yColName, double xl, double xr, double yl, double yr, double zl, double zr)
void addData (Table *table, const QString &xColName, const QString &yColName)
void addData (Table *table, int xcol, int ycol)
void addData (Table *table, const QString &colName)
void addFunction (const QString &s, double xl, double xr, double yl, double yr, double zl, double zr)
void addMatrixData (Matrix *m, double xl, double xr, double yl, double yr, double zl, double zr)
void addMatrixData (Matrix *m)
void animate (bool on=true)
bool autoscale ()
void changeDataColumn (Table *table, const QString &colName)
void changeMatrix (Matrix *m)
void clearData ()
Qwt3D::COORDSTYLE coordStyle ()
void copy (Graph3D *g)
void copyImage ()
void customPlotStyle (int style)
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")
void findBestLayout ()
Qwt3D::FLOORSTYLE floorStyle ()
TablegetTable ()
bool hasData ()
void initCoord ()
void initPlot ()
void insertFunction (const QString &s, double xl, double xr, double yl, double yr, double zl, double zr)
void insertNewData (Table *table, const QString &colName)
bool isAnimated ()
Matrixmatrix ()
Qwt3D::PLOTSTYLE plotStyle ()
void print ()
void resetNonEmptyStyle ()
void rotate ()
 Used for the animation: rotates the scene with 1/360 degrees.
void rotationChanged (double, double, double)
QString saveAsTemplate (const QString &geometryInfo)
QString saveToString (const QString &geometry)
void scaleChanged (double, double, double)
void setAutoscale (bool on=true)
 Enables/Disables autoscaling using findBestLayout().
void setOptions (const QStringList &lst)
void setOptions (bool legend, int r, int dist)
void setPlotAssociation (const QString &s)
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 setSmoothMesh (bool smooth)
void setStyle (const QStringList &st)
void setStyle (Qwt3D::COORDSTYLE coord, Qwt3D::FLOORSTYLE floor, Qwt3D::PLOTSTYLE plot, Graph3D::PointStyle point)
void setZoom (double val)
void shiftChanged (double, double, double)
void showWorksheet ()
void update ()
void updateData (Table *table)
void updateDataXY (Table *table, int xCol, int yCol)
void updateDataXYZ (Table *table, int xCol, int yCol, int zCol)
void updateMatrixData (Matrix *m)
void updateScaling (double xVal, double yVal, double zVal)
void updateZoom (double val)
double xRotation ()
double xScale ()
double xShift ()
double yRotation ()
double yScale ()
double yShift ()
double zoom ()
void zoomChanged (double)
double zRotation ()
double zScale ()
double zShift ()
Axes
void adjustLabels (int val)
QStringList axesLabels ()
QStringList axisTickLengths ()
bool isOrthogonal ()
int labelsDistance ()
QFont numbersFont ()
void resetAxesLabels ()
QStringList scaleLimits ()
QStringList scaleTicks ()
void setAxesLabels (const QStringList &lst)
void setBoxed ()
void setFramed ()
void setNoAxes ()
void setNumbersFont (const QStringList &lst)
void setNumbersFont (const QFont &font)
void setOrtho (bool on=true)
void setTickLengths (const QStringList &lst)
void setTicks (const QStringList &options)
void setXAxisLabelFont (const QStringList &lst)
void setXAxisLabelFont (const QFont &fnt)
void setYAxisLabelFont (const QStringList &lst)
void setYAxisLabelFont (const QFont &fnt)
void setZAxisLabelFont (const QStringList &lst)
void setZAxisLabelFont (const QFont &fnt)
void updateLabel (int axis, const QString &label, const QFont &f)
void updateScale (int axis, const QStringList &options)
void updateScales (double xl, double xr, double yl, double yr, double zl, double zr, int xCol, int yCol, int zCol)
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)
void updateScalesFromMatrix (double xl, double xr, double yl, double yr, double zl, double zr)
void updateTickLength (int, double majorLength, double minorLength)
QFont xAxisLabelFont ()
double xStart ()
double xStop ()
QFont yAxisLabelFont ()
double yStart ()
double yStop ()
QFont zAxisLabelFont ()
double zStart ()
double zStop ()
Colors
QColor axesColor ()
QColor bgColor ()
void changeTransparency (double t)
QString colorMap ()
QColor gridColor ()
QColor labelColor ()
QColor maxDataColor ()
QColor meshColor ()
QColor minDataColor ()
QColor numColor ()
bool openColorMap (ColorVector &cv, QString fname)
void setColors (const QColor &meshColor, const QColor &axesColor, const QColor &numColor, const QColor &labelColor, const QColor &bgColor, const QColor &gridColor)
void setColors (const QStringList &colors)
void setDataColorMap (const QString &fileName)
void setDataColors (const QColor &cMax, const QColor &cMin)
void setTransparency (double t)
double transparency ()
void updateColors (const QColor &meshColor, const QColor &axesColor, const QColor &numColor, const QColor &labelColor, const QColor &bgColor, const QColor &gridColor)
Bars
double barsRadius ()
void setBarsRadius (double rad)
void updateBars (double rad)
Scatter Plots
bool boxedCrossHair ()
int coneQuality ()
double coneRadius ()
double crossHairLinewidth ()
double crossHairRadius ()
double pointsSize ()
PointStyle pointType ()
void setConesMesh ()
void setConesOptions (double rad, int quality)
void setCrossMesh ()
void setCrossOptions (double rad, double linewidth, bool smooth, bool boxed)
void setPointOptions (double size, bool s)
bool smoothCrossHair ()
bool smoothPoints ()
void updateCones (double rad, int quality)
void updateCross (double rad, double linewidth, bool smooth, bool boxed)
void updatePoints (double size, bool sm)
Event Handlers
void contextMenuEvent (QContextMenuEvent *e)
bool eventFilter (QObject *object, QEvent *e)
 Filters other object's events (customizes title bar's context menu).
void resizeEvent (QResizeEvent *)
void scaleFonts (double factor)
void setIgnoreFonts (bool ok)
User Functions
QString formula ()
UserFunctionuserFunction ()
Grid
int grids ()
void setBackGrid (bool b)
void setCeilGrid (bool b)
void setFloorGrid (bool b)
void setFrontGrid (bool b)
void setGrid (int grids)
void setGrid (Qwt3D::SIDE s, bool b)
void setLeftGrid (bool b)
void setRightGrid (bool b)
Legend
bool isLegendOn ()
void showColorLegend (bool show)
Mesh
double meshLineWidth ()
void setBarsPlot ()
void setEmptyFloor ()
void setFilledMesh ()
void setFloorData ()
void setFloorIsolines ()
void setHiddenLineGrid ()
void setLineGrid ()
void setMeshLineWidth (int lw)
void setNoGrid ()
void setPointsMesh ()
Title
QString plotTitle ()
void setTitle (const QString &s, const QColor &color, const QFont &font)
void setTitle (const QStringList &lst)
void setTitleFont (const QFont &font)
QColor titleColor ()
QFont titleFont ()
void updateTitle (const QString &s, const QColor &color, const QFont &font)
Resolution
int resolution ()
void setResolution (int r)

Signals

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

Public Member Functions

void askOnCloseEvent (bool ask)
 Toggle the "ask on close" flag.
QString aspect ()
 Return the window status as a string.
virtual QString birthDate ()
 Return the creation date.
virtual CaptionPolicy captionPolicy ()
 Return the caption policy.
void closeEvent (QCloseEvent *)
 Close event handler.
Folderfolder ()
 Returns the pointer to the parent folder of the window.
 Graph3D (const QString &label, QWidget *parent=0, const char *name=0, Qt::WFlags f=0)
virtual QString name ()
 Return the window name.
void notifyChanges ()
 Notifies the main application that the window has been modified.
virtual void restore (const QStringList &)
 Not implemented yet.
virtual void setBirthDate (const QString &s)
 Set the creation date.
virtual void setCaptionPolicy (CaptionPolicy policy)
 Set the caption policy.
void setFolder (Folder *f)
 Initializes the pointer to the parent folder of the window.
virtual void setHidden ()
 Notifies that a window was hidden by a direct user action.
void setMaximized ()
void setMinimized ()
virtual void setName (const QString &s)
 Set the window name.
void setNormal ()
void setStatus (Status s)
 Set the window status flag (hidden, normal, minimized or maximized).
virtual void setWindowLabel (const QString &s)
 Set the window label.
Status status ()
 Return the window status flag (hidden, normal, minimized or maximized).
virtual QString windowLabel ()
 Return the window label.

Public Attributes

UserFunctionfunc
Qwt3D::SurfacePlot * sp

Protected Slots

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

Protected Member Functions

virtual void changeEvent (QEvent *event)
 Catches parent changes (in order to gain access to the title bar).

Protected Attributes

bool askOnClose
 Toggle on/off: Ask the user "delete, hide, or cancel?" on a close event.
QString birthdate
 The creation date.
CaptionPolicy caption_policy
 The caption policy.
FolderparentFolder
 Pointer to the parent folder of the window.
QWidget * titleBar
 Title bar of this MDI window if it currently belongs to a QWorkspace, NULL else.
QString w_label
 The window label.
Status w_status
 The window status.

Private Member Functions

Qwt3D::Triple ** allocateData (int columns, int rows)
void deleteData (Qwt3D::Triple **data, int columns)

Private Attributes

double alpha
int animation_redraw_wait
 Wait this many msecs before redraw 3D plot (used for animations).
QColor axesCol
double barsRad
QColor bgCol
Qwt3D::StandardColor * col_
QString color_map
 File name of the color map used for the data (if any).
int conesQuality
double conesRad
bool crossHairBoxed
double crossHairLineWidth
double crossHairRad
bool crossHairSmooth
bool d_autoscale
Matrixd_matrix
QTimer * d_timer
QColor fromColor
 Custom data colors.
QColor gridCol
bool ignoreFonts
QStringList labels
QColor labelsCol
int labelsDist
int legendMajorTicks
bool legendOn
QColor meshCol
QColor numCol
QString plotAssociation
double pointSize
PointStyle pointStyle
QVector< int > scaleType
bool smooth
 Draw 3D points with smoothed angles.
bool smoothMesh
Qwt3D::PLOTSTYLE style_
QString title
QColor titleCol
QFont titleFnt
QColor toColor
Tableworksheet

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index