Wt  3.3.8
Public Member Functions | List of all members
Wt::Chart::WAbstractChartModel Class Referenceabstract

An abstract model for use with Wt's charts. More...

#include <Wt/Chart/WAbstractChartModel>

Inheritance diagram for Wt::Chart::WAbstractChartModel:
Inheritance graph
[legend]

Public Member Functions

 WAbstractChartModel (WObject *parent=0)
 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< ItemFlagflags (int row, int column) const
 Returns the item flags for the given row and column. More...
 
virtual WLinklink (int row, int column) const
 Returns the link for a given row and column. More...
 
virtual const WColormarkerPenColor (int row, int column) const
 Returns the marker pen color to use for a given row and column. More...
 
virtual const WColormarkerBrushColor (int row, int column) const
 Returns the marker brush color to use for a given row and column. More...
 
virtual const WColorbarPenColor (int row, int column) const
 Returns the bar pen color to use for a given row and column. More...
 
virtual const WColorbarBrushColor (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 Signalchanged ()
 A signal that notifies of any change to the model. More...
 
- Public Member Functions inherited from Wt::WObject
 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...
 
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...
 
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.
 
WObjectparent () const
 Returns the parent object.
 

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...
 
- Static Protected Member Functions inherited from Wt::WObject
static WObjectsender ()
 Returns the sender of the current slot call. More...
 

Detailed Description

An abstract model for use with Wt's charts.

This abstract model is used by WAbstractChart as data model.

Member Function Documentation

const WColor * Wt::Chart::WAbstractChartModel::barBrushColor ( int  row,
int  column 
) const
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 BarSeries. The default is null, indicating that the default color, as determined by WDataSeries::brush(), should be used.

See also
WDataSeries::setBrush()

Reimplemented in Wt::Chart::WStandardChartProxyModel.

const WColor * Wt::Chart::WAbstractChartModel::barPenColor ( int  row,
int  column 
) const
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 BarSeries. The default is null, indicating that the default color, as determined by WDataSeries::pen(), should be used.

See also
WDataSeries::setPen()

Reimplemented in Wt::Chart::WStandardChartProxyModel.

virtual Signal& Wt::Chart::WAbstractChartModel::changed ( )
virtual

A signal that notifies of any change to the model.

Implementations should trigger this signal in order to update the chart.

virtual int Wt::Chart::WAbstractChartModel::columnCount ( ) const
pure virtual

Returns the number of columns.

See also
rowCount()

Implemented in Wt::Chart::WStandardChartProxyModel.

virtual double Wt::Chart::WAbstractChartModel::data ( int  row,
int  column 
) const
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.

WString Wt::Chart::WAbstractChartModel::displayData ( int  row,
int  column 
) const
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.

WFlags< ItemFlag > Wt::Chart::WAbstractChartModel::flags ( int  row,
int  column 
) const
virtual

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.

Note
An XHTML text tooltip will be forced to be deferred. Non-deferred XHTML tooltips are not supported.
When not using deferred tooltips, the HTML <area> tag will be used. If there are many tooltips and the chart is interactive this may cause client-side performance issues. If deferred tooltips are used, this will cause some load on the server, as it calculates server-side what marker or bar the user is hovering over.

Reimplemented in Wt::Chart::WStandardChartProxyModel.

WString Wt::Chart::WAbstractChartModel::headerData ( int  column) const
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.

WLink * Wt::Chart::WAbstractChartModel::link ( int  row,
int  column 
) const
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.

const WColor * Wt::Chart::WAbstractChartModel::markerBrushColor ( int  row,
int  column 
) const
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 PointSeries. The default is null, indicating that the default color, as determined by WDataSeries::markerBrush(), should be used.

See also
WDataSeries::setMarkerBrush()

Reimplemented in Wt::Chart::WStandardChartProxyModel.

const WColor * Wt::Chart::WAbstractChartModel::markerPenColor ( int  row,
int  column 
) const
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 PointSeries. The default is null, indicating that the default color, as determined by WDataSeries::markerPen(), should be used.

See also
WDataSeries::setMarkerPen()

Reimplemented in Wt::Chart::WStandardChartProxyModel.

const double * Wt::Chart::WAbstractChartModel::markerScaleFactor ( int  row,
int  column 
) const
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 PointSeries. The default is null, indicating that the default scale should be used.

Reimplemented in Wt::Chart::WStandardChartProxyModel.

virtual int Wt::Chart::WAbstractChartModel::rowCount ( ) const
pure virtual

Returns the number of rows.

See also
columnCount()

Implemented in Wt::Chart::WStandardChartProxyModel.

WString Wt::Chart::WAbstractChartModel::toolTip ( int  row,
int  column 
) const
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.


Generated on Mon Sep 4 2017 for the C++ Web Toolkit (Wt) by doxygen 1.8.11