Wt
4.11.1
|
An abstract model for use with Wt's charts. More...
#include <Wt/Chart/WAbstractChartModel.h>
Public Member Functions | |
WAbstractChartModel () | |
Creates a new chart model. | |
virtual double | data (int row, int column) const =0 |
Returns data at a given row and column. More... | |
virtual WString | displayData (int row, int column) const |
Returns display data at a given row and column. More... | |
virtual WString | headerData (int column) const |
Returns the given column's header data. More... | |
virtual WString | toolTip (int row, int column) const |
Returns the tooltip text to use on a given row and column. More... | |
virtual WFlags< ItemFlag > | flags (int row, int column) const |
Returns the item flags for the given row and column. More... | |
virtual WLink * | link (int row, int column) const |
Returns the link for a given row and column. More... | |
virtual const WColor * | markerPenColor (int row, int column) const |
Returns the marker pen color to use for a given row and column. More... | |
virtual const WColor * | markerBrushColor (int row, int column) const |
Returns the marker brush color to use for a given row and column. More... | |
virtual const MarkerType * | markerType (int row, int column) const |
Returns the marker type to use for a given row and column. More... | |
virtual const WColor * | barPenColor (int row, int column) const |
Returns the bar pen color to use for a given row and column. More... | |
virtual const WColor * | barBrushColor (int row, int column) const |
Returns the bar brush color to use for a given row and column. More... | |
virtual const double * | markerScaleFactor (int row, int column) const |
Returns the marker scale factor to use for a given row and column. More... | |
virtual int | columnCount () const =0 |
Returns the number of columns. More... | |
virtual int | rowCount () const =0 |
Returns the number of rows. More... | |
virtual Signal & | changed () |
A signal that notifies of any change to the model. More... | |
Public Member Functions inherited from Wt::WObject | |
void | addChild (std::unique_ptr< WObject > child) |
Add a child WObject whose lifetime is determined by this WObject. | |
template<typename Child > | |
Child * | addChild (std::unique_ptr< Child > child) |
Add a child WObject, returning a raw pointer. More... | |
std::unique_ptr< WObject > | removeChild (WObject *child) |
Remove a child WObject, so its lifetime is no longer determined by this WObject. | |
template<typename Child > | |
std::unique_ptr< Child > | removeChild (Child *child) |
Remove a child WObject, so its lifetime is no longer determined by this WObject. 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... | |
void | isNotStateless () |
Marks the current function as not stateless. More... | |
template<class T > | |
WStatelessSlot * | implementJavaScript (void(T::*method)(), const std::string &jsCode) |
Provides a JavaScript implementation for a method. More... | |
Public Member Functions inherited from Wt::Core::observable | |
observable () noexcept | |
Default constructor. | |
virtual | ~observable () |
Destructor. More... | |
template<typename... Args, typename C > | |
auto | bindSafe (void(C::*method)(Args...)) noexcept |
Protects a method call against object destruction. More... | |
template<typename... Args, typename C > | |
auto | bindSafe (void(C::*method)(Args...) const) const noexcept |
Protects a const method call against object destruction. More... | |
template<typename Function > | |
auto | bindSafe (const Function &function) noexcept |
Protects a function against object destruction. More... | |
Additional Inherited Members | |
Public Types inherited from Wt::WObject | |
typedef void(WObject::* | Method) () |
Typedef for a WObject method without arguments. | |
Protected Member Functions inherited from Wt::WObject | |
virtual WStatelessSlot * | getStateless (Method method) |
On-demand stateless slot implementation. More... | |
An abstract model for use with Wt's charts.
This abstract model is used by WAbstractChart as data model.
|
virtual |
Returns the bar brush color to use for a given row and column.
This is used as the color of the brush used when drawing a SeriesType::Bar. The default is null, indicating that the default color, as determined by WDataSeries::brush(), should be used.
Reimplemented in Wt::Chart::WStandardChartProxyModel.
|
virtual |
Returns the bar pen color to use for a given row and column.
This is used as the color of the outline of bars when drawing a SeriesType::Bar. The default is null, indicating that the default color, as determined by WDataSeries::pen(), should be used.
Reimplemented in Wt::Chart::WStandardChartProxyModel.
|
virtual |
A signal that notifies of any change to the model.
Implementations should trigger this signal in order to update the chart.
|
pure virtual |
Returns the number of columns.
Implemented in Wt::Chart::WStandardChartProxyModel.
|
pure virtual |
Returns data at a given row and column.
This value determines the position of a data point on the chart.
Implemented in Wt::Chart::WStandardChartProxyModel.
|
virtual |
Returns display data at a given row and column.
This value should be a textual representation of the value returned by data(). This defaults to the string representation of the double returned by data().
Reimplemented in Wt::Chart::WStandardChartProxyModel.
Returns the item flags for the given row and column.
Only the ItemIsXHTMLText and ItemHasDeferredTooltip flags are supported for charts.
ItemIsXHTMLText determines whether the tooltip text should be rendered as XHTML or as plain text, and ItemHasDeferredTooltip makes it so that tooltips are only loaded on demand.
Reimplemented in Wt::Chart::WStandardChartProxyModel.
|
virtual |
Returns the given column's header data.
This is used as the name in the legend for a data series.
Defaults to an empty string.
Reimplemented in Wt::Chart::WStandardChartProxyModel.
|
virtual |
Returns the link for a given row and column.
Defaults to an empty link, signifying that no link should be shown.
Reimplemented in Wt::Chart::WStandardChartProxyModel.
|
virtual |
Returns the marker brush color to use for a given row and column.
This is used as the color of the brush used when drawing a SeriesType::Point. The default is null, indicating that the default color, as determined by WDataSeries::markerBrush(), should be used.
Reimplemented in Wt::Chart::WStandardChartProxyModel.
|
virtual |
Returns the marker pen color to use for a given row and column.
This is used as the color of the outline of markers when drawing a SeriesType::Point. The default is null, indicating that the default color, as determined by WDataSeries::markerPen(), should be used.
Reimplemented in Wt::Chart::WStandardChartProxyModel.
|
virtual |
Returns the marker scale factor to use for a given row and column.
This is used to scale the size of the marker when drawing a SeriesType::Point. The default is null, indicating that the default scale should be used.
Reimplemented in Wt::Chart::WStandardChartProxyModel.
|
virtual |
Returns the marker type to use for a given row and column.
This is used as the shape of the marker used when drawing a PointSeries. The default is null, indicating that the default marker, as determined by WDataSeries::marker(), should be used.
Reimplemented in Wt::Chart::WStandardChartProxyModel.
|
pure virtual |
Returns the number of rows.
Implemented in Wt::Chart::WStandardChartProxyModel.
|
virtual |
Returns the tooltip text to use on a given row and column.
Defaults to an empty string, signifying that no tooltip should be shown.
Reimplemented in Wt::Chart::WStandardChartProxyModel.