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

Graph3D Class Reference

#include <Graph3D.h>

Inheritance diagram for Graph3D:


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 58 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, Ribbon = 3 }
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, int type=0)
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 addFunction (const QString &s, double xl, double xr, double yl, double yr, double zl, double zr, int columns, int rows)
void addMatrixData (Matrix *m, double xl, double xr, double yl, double yr, double zl, double zr)
void addMatrixData (Matrix *m)
void addParametricSurface (const QString &xFormula, const QString &yFormula, const QString &zFormula, double ul, double ur, double vl, double vr, int columns, int rows, bool uPeriodic, bool vPeriodic)
void animate (bool on=true)
bool antialiasing ()
bool autoscale ()
void changeDataColumn (Table *table, const QString &colName, int type=0)
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 exportToFile (const QString &fileName)
void exportVector (const QString &fileName)
void findBestLayout ()
Qwt3D::FLOORSTYLE floorStyle ()
bool hasData ()
void initCoord ()
void initPlot ()
void insertNewData (Table *table, const QString &colName)
bool isAnimated ()
void loadData (Table *table, int xCol, int yCol, int zCol, double xl=0.0, double xr=0.0, double yl=0.0, double yr=0.0, double zl=0.0, double zr=0.0)
Matrixmatrix ()
void moveSurfacePlot ()
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, bool=false)
void scaleChanged (double, double, double)
void setAntialiasing (bool smooth=true)
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 setStyle (const QStringList &st)
void setZoom (double val)
void shiftChanged (double, double, double)
void showWorksheet ()
Tabletable ()
void update ()
void updateData (Table *table)
void updateDataXY (Table *table, int xCol, int yCol)
void updateMatrixData (Matrix *m)
double xRotation ()
double xScale ()
double xShift ()
double yRotation ()
double yScale ()
double yShift ()
double zoom ()
void zoomChanged (double)
double zRotation ()
double zScale ()
double zShift ()
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 setAxesColor (const QColor &)
void setBackgroundColor (const QColor &)
void setColors (const QStringList &colors)
void setDataColorMap (const QString &fileName)
void setDataColors (const QColor &cMax, const QColor &cMin)
void setGridColor (const QColor &)
void setLabelsColor (const QColor &)
void setMeshColor (const QColor &)
void setNumbersColor (const QColor &)
void setTransparency (double t)
double transparency ()
QStringList axesLabels ()
QStringList axisTickLengths ()
bool isOrthogonal ()
int labelsDistance ()
QFont numbersFont ()
void resetAxesLabels ()
QStringList scaleLimits ()
QStringList scaleTicks ()
void setAxesLabels (const QStringList &lst)
void setAxisTickLength (int axis, double majorLength, double minorLength)
void setBoxed ()
void setFramed ()
void setLabelsDistance (int val)
void setNoAxes ()
void setNumbersFont (const QStringList &lst)
void setNumbersFont (const QFont &font)
void setOrthogonal (bool on=true)
void setScales (double xl, double xr, double yl, double yr, double zl, double zr)
void setTickLengths (const QStringList &lst)
void setTicks (const QStringList &options)
void setXAxisLabel (const QString &)
void setXAxisLabelFont (const QStringList &lst)
void setXAxisLabelFont (const QFont &fnt)
void setXAxisTickLength (double majorLength, double minorLength)
void setYAxisLabel (const QString &)
void setYAxisLabelFont (const QStringList &lst)
void setYAxisLabelFont (const QFont &fnt)
void setYAxisTickLength (double majorLength, double minorLength)
void setZAxisLabel (const QString &)
void setZAxisLabelFont (const QStringList &lst)
void setZAxisLabelFont (const QFont &fnt)
void setZAxisTickLength (double majorLength, double minorLength)
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)
void updateScalesFromMatrix (double xl, double xr, double yl, double yr, double zl, double zr)
QFont xAxisLabelFont ()
double xStart ()
double xStop ()
QFont yAxisLabelFont ()
double yStart ()
double yStop ()
QFont zAxisLabelFont ()
double zStart ()
double zStop ()
double barsRadius ()
void setBarRadius (double rad)
Scatter Plots
bool boxedCrossHair ()
int coneQuality ()
double coneRadius ()
double crossHairLinewidth ()
double crossHairRadius ()
double pointsSize ()
PointStyle pointType ()
void setConeOptions (double rad, int quality)
void setConeStyle ()
void setCrossOptions (double rad, double linewidth, bool smooth, bool boxed)
void setCrossStyle ()
void setDotOptions (double size, bool smooth)
bool smoothCrossHair ()
bool smoothPoints ()
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 ()
int grids ()
void setBackGrid (bool b=true)
void setCeilGrid (bool b=true)
void setFloorGrid (bool b=true)
void setFrontGrid (bool b=true)
void setGrid (int grids)
void setGrid (Qwt3D::SIDE s, bool b)
void setLeftGrid (bool b=true)
void setRightGrid (bool b=true)
bool isLegendOn ()
void showColorLegend (bool show=true)
double meshLineWidth ()
void setBarStyle ()
void setDotStyle ()
void setEmptyFloor ()
void setFilledMeshStyle ()
void setFloorData ()
void setFloorIsolines ()
void setHiddenLineStyle ()
void setMeshLineWidth (double lw)
void setPolygonStyle ()
void setWireframeStyle ()
User Functions
UserParametricSurfaceparametricSurface ()
QString plotTitle ()
void setTitle (const QString &s, const QColor &color=QColor(Qt::black), const QFont &font=QFont())
void setTitle (const QStringList &lst)
void setTitleFont (const QFont &font)
QColor titleColor ()
QFont titleFont ()
int resolution ()
void setResolution (int r)


void closedWindow (MyWidget *)
 Emitted when the window was closed.
void hiddenWindow (MyWidget *)
 Emitted when the window was hidden.
void modified ()
void modifiedWindow (QWidget *)
void moved ()
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.
QString birthDate ()
 Return the creation date.
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)
QLocale locale ()
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.
void setBirthDate (const QString &s)
 Set the creation date.
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 setLocale (const QLocale &l)
void setMaximized ()
void setMinimized ()
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).
void setWindowLabel (const QString &s)
 Set the window label.
virtual QString sizeToString ()
 Size of the widget as a string.
Status status ()
 Return the window status flag (hidden, normal, minimized or maximized).
QString windowLabel ()
 Return the window label.

Protected Member Functions

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

Protected Attributes

QWidget * titleBar
 Title bar of this MDI window if it currently belongs to a QWorkspace, NULL else.

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
double d_point_size
bool d_smooth_points
 Draw 3D points with smoothed angles.
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
PointStyle pointStyle
QVector< int > scaleType
Qwt3D::SurfacePlot * sp
Qwt3D::PLOTSTYLE style_
QString title
QColor titleCol
QFont titleFnt
QColor toColor

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

Generated by  Doxygen 1.6.0   Back to index