Class representing grid-based data for on a 3D chart. More...
Public Member Functions | |
WAbstractGridData (WAbstractItemModel *model) | |
Constructor. | |
virtual double | minimum (Axis axis) const =0 |
Returns the computed minimum value of this dataseries along the given axis. More... | |
virtual double | maximum (Axis axis) const =0 |
Returns the computed maximum value of this dataseries along the given axis. More... | |
void | setType (Series3DType type) |
Sets the type of representation that will be used for the data. More... | |
Series3DType | type () const |
Returns the type of representation that will be used for the data. More... | |
void | setSurfaceMeshEnabled (bool enabled=true) |
Enables or disables a mesh for when a surface is drawn. More... | |
bool | isSurfaceMeshEnabled () |
Returns whether the surface-mesh is enabled for this dataseries. More... | |
void | setBarWidth (double xWidth, double yWidth) |
Sets the bar-width. More... | |
double | barWidthX () |
Returns the bar-width in the X-axis direction. More... | |
double | barWidthY () |
Returns the bar-width in the Y-axis direction. More... | |
void | setPen (const WPen &pen) |
Sets the WPen that is used for drawing the mesh. More... | |
WPen | pen () const |
Returns the pen that is used for drawing the mesh. More... | |
virtual void | initializeGL () |
Initialize GL resources. More... | |
virtual void | paintGL () const |
Update the client-side painting function. More... | |
virtual void | updateGL () |
Update GL resources. More... | |
virtual void | resizeGL () |
Act on resize events. More... | |
virtual void | deleteAllGLResources () |
Delete GL resources. More... | |
![]() | |
WAbstractDataSeries3D (WAbstractItemModel *model) | |
Constructor. More... | |
void | setTitle (const WString &name) |
Sets the title of this dataseries. More... | |
const WString & | title () const |
Returns the title of this dataseries. More... | |
void | setModel (WAbstractItemModel *model) |
Sets a model from which the dataseries gets its data. More... | |
WAbstractItemModel * | model () const |
Returns a pointer to the model used by this dataseries. More... | |
const WCartesian3DChart * | chart () const |
Returns a const pointer to the WCartesian3DChart on which the dataseries is drawn. | |
void | setPointSize (double size) |
Sets the pointsize for drawing this dataseries. More... | |
double | pointSize () const |
Returns the pointsize for drawing this dataseries. More... | |
void | setColorMap (WAbstractColorMap *colormap) |
Sets the colormap for this dataseries. More... | |
const WAbstractColorMap * | colorMap () const |
Returns the colormap used by this dataseries. More... | |
void | setColorMapVisible (bool enabled=true) |
Sets whether the colormap that is used should be shown alongside the chart in the form of a legend. More... | |
bool | colorMapVisible () const |
Returns whether the colormap is shown alongside the chart in the form of a legend. More... | |
void | setColorMapSide (Side side) |
Sets whether the colormap is shown on the left or right. More... | |
Side | colorMapSide () const |
Returns on which side the colormap is shown. More... | |
void | setLegendEnabled (bool enabled=true) |
Sets whether this dataseries is included in the chart-legend. More... | |
bool | isLegendEnabled () const |
Returns whether this dataseries is included in the chart-legend. More... | |
void | setHidden (bool enabled=true) |
Sets if this dataseries is hidden. More... | |
bool | isHidden () const |
Returns if this dataseries is hidden. More... | |
![]() | |
WObject (WObject *parent=0) | |
Create a WObject with a given parent object. More... | |
virtual | ~WObject () |
Destructor. More... | |
virtual const std::string | id () const |
Returns the (unique) identifier for this object. More... | |
virtual void | setObjectName (const std::string &name) |
Sets an object name. More... | |
virtual std::string | objectName () const |
Returns the object name. More... | |
void | resetLearnedSlots () |
Resets learned stateless slot implementations. More... | |
template<class T > | |
void | resetLearnedSlot (void(T::*method)()) |
Resets a learned stateless slot implementation. More... | |
template<class T > | |
WStatelessSlot * | implementStateless (void(T::*method)()) |
Declares a slot to be stateless and learn client-side behaviour on first invocation. More... | |
template<class T > | |
WStatelessSlot * | implementStateless (void(T::*method)(), void(T::*undoMethod)()) |
Declares a slot to be stateless and learn client-side behaviour in advance. More... | |
template<class T > | |
WStatelessSlot * | implementJavaScript (void(T::*method)(), const std::string &jsCode) |
Provides a JavaScript implementation for a method. More... | |
void | addChild (WObject *child) |
Adds a child object. More... | |
virtual void | removeChild (WObject *child) |
Removes a child object. More... | |
const std::vector< WObject * > & | children () const |
Returns the children. | |
WObject * | parent () const |
Returns the parent object. | |
Additional Inherited Members | |
![]() | |
typedef void(WObject::* | Method )() |
Typedef for a WObject method without arguments. | |
![]() | |
virtual WStatelessSlot * | getStateless (Method method) |
On-demand stateless slot implementation. More... | |
![]() | |
static WObject * | sender () |
Returns the sender of the current slot call. More... | |
Class representing grid-based data for on a 3D chart.
General information can be found at WAbstractDataSeries3D. Information on how the model is structured is provided in the subclasses. GridData can be represented in three ways. This is indicated by Series3DType and can be either PointSeries3D, SurfaceSeries3D or BarSeries3D. Note that points and surfaces can only be added to charts of type ScatterPlot, while bars can only be added to charts of type CategoryChart.
When the data is shown as a surface, a mesh can be added to the surface. This draws lines over the surface at the positions of the x- and y-values. For bar-series data, it is possible to adjust the width of the bars in both directions.
The three types of data-representation are illustrated below.
double Wt::Chart::WAbstractGridData::barWidthX | ( | ) |
Returns the bar-width in the X-axis direction.
double Wt::Chart::WAbstractGridData::barWidthY | ( | ) |
Returns the bar-width in the Y-axis direction.
|
virtual |
Delete GL resources.
This function is called by updateGL() in the chart to which this dataseries was added.
Implements Wt::Chart::WAbstractDataSeries3D.
|
virtual |
Initialize GL resources.
This function is called by initializeGL() in the chart to which this dataseries was added.
Implements Wt::Chart::WAbstractDataSeries3D.
bool Wt::Chart::WAbstractGridData::isSurfaceMeshEnabled | ( | ) |
Returns whether the surface-mesh is enabled for this dataseries.
|
pure virtual |
Returns the computed maximum value of this dataseries along the given axis.
Implements Wt::Chart::WAbstractDataSeries3D.
Implemented in Wt::Chart::WGridData, and Wt::Chart::WEquidistantGridData.
|
pure virtual |
Returns the computed minimum value of this dataseries along the given axis.
Implements Wt::Chart::WAbstractDataSeries3D.
Implemented in Wt::Chart::WGridData, and Wt::Chart::WEquidistantGridData.
|
virtual |
Update the client-side painting function.
This function is called by paintGL() in the chart to which this dataseries was added.
Implements Wt::Chart::WAbstractDataSeries3D.
WPen Wt::Chart::WAbstractGridData::pen | ( | ) | const |
Returns the pen that is used for drawing the mesh.
|
virtual |
Act on resize events.
This function is called by resizeGL() in the chart to which this dataseries was added.
Implements Wt::Chart::WAbstractDataSeries3D.
void Wt::Chart::WAbstractGridData::setBarWidth | ( | double | xWidth, |
double | yWidth | ||
) |
Sets the bar-width.
This option only takes effect when the type of this WGridData is BarSeries3D. The values provided should be between 0 and 1, where 1 lets the bars each take up 1/(nb of x/y-values) of the axis.
The default bar-width is 0.5 in both directions.
void Wt::Chart::WAbstractGridData::setPen | ( | const WPen & | pen) |
Sets the WPen that is used for drawing the mesh.
Used when drawing the mesh on a surface or the lines around bars. The default is a default constructed WPen (black and one pixel wide).
Note: only the width and color of this WPen are used.
void Wt::Chart::WAbstractGridData::setSurfaceMeshEnabled | ( | bool | enabled = true ) |
Enables or disables a mesh for when a surface is drawn.
The default value is false. This option only takes effect when the type of this WGridData is SurfaceSeries3D. The mesh is drawn at the position of the x-axis and y-axis values.
void Wt::Chart::WAbstractGridData::setType | ( | Series3DType | type) |
Sets the type of representation that will be used for the data.
All representations in Series3DType are possible for the data. Note that PointSeries3D and SurfaceSeries3D can only be used on a chart that is configured as a ScatterPlot and BarSeries3D can only be used on a chart that is configured to be a CategoryChart.
The default value is PointSeries3D.
Series3DType Wt::Chart::WAbstractGridData::type | ( | ) | const |
Returns the type of representation that will be used for the data.
|
virtual |
Update GL resources.
This function is called by updateGL() in the chart to which this dataseries was added. Before this function is called, deleteAllGLResources() is called.
Implements Wt::Chart::WAbstractDataSeries3D.