Wt: Wt::Chart::WStandardChartProxyModel Class Reference

Wt 4.10.4

Loading...
Searching...
No Matches
Public Member Functions | List of all members
Wt::Chart::WStandardChartProxyModel Class Reference
Charts (Wt::Chart)

A WAbstractChartModel implementation that wraps a WAbstractItemModel. More...

`#include <Wt/Chart/WStandardChartProxyModel.h>`

Inheritance diagram for Wt::Chart::WStandardChartProxyModel:
[legend]

## Public Member Functions
| WStandardChartProxyModel (const std::shared_ptr< WAbstractItemModel > &sourceModel)
| Creates a new WStandardChartProxyModel that wraps the given source model.
virtual double | data (int row, int column) const override
| Returns data at a given row and column.
virtual WString | displayData (int row, int column) const override
| Returns display data at a given row and column.
virtual WString | headerData (int column) const override
| Returns the given column's header data.
virtual WString | toolTip (int row, int column) const override
| Returns the tooltip text to use on a given row and column.
virtual WFlags< ItemFlag > | flags (int row, int column) const override
| Returns the item flags for the given row and column.
virtual WLink * | link (int row, int column) const override
| Returns the link to use on a given row and column.
virtual const WColor * | markerPenColor (int row, int column) const override
| Returns the marker pen color to use for a given row and column.
virtual const WColor * | markerBrushColor (int row, int column) const override
| Returns the marker brush color to use for a given row and column.
virtual const MarkerType * | markerType (int row, int column) const override
| Returns the marker type to use for a given row and column.
virtual const WColor * | barPenColor (int row, int column) const override
| Returns the bar pen color to use for a given row and column.
virtual const WColor * | barBrushColor (int row, int column) const override
| Returns the bar brush color to use for a given row and column.
virtual const double * | markerScaleFactor (int row, int column) const override
| Returns the marker scale factor to use for a given row and column.
virtual int | columnCount () const override
| Returns the number of columns.
virtual int | rowCount () const override
| Returns the number of rows.
std::shared_ptr< WAbstractItemModel > | sourceModel () const
| Returns the wrapped source model.
Public Member Functions inherited from Wt::Chart::WAbstractChartModel
| WAbstractChartModel ()
| Creates a new chart model.
virtual Signal & | changed ()
| A signal that notifies of any change to the model.
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.
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.
virtual const std::string | id () const
| Returns the (unique) identifier for this object.
virtual void | setObjectName (const std::string &name)
| Sets an object name.
virtual std::string | objectName () const
| Returns the object name.
void | resetLearnedSlots ()
| Resets learned stateless slot implementations.
template<class T >
void | resetLearnedSlot (void(T::*method)())
| Resets a learned stateless slot implementation.
template<class T >
WStatelessSlot * | implementStateless (void(T::*method)())
| Declares a slot to be stateless and learn client-side behaviour on first invocation.
template<class T >
WStatelessSlot * | implementStateless (void(T::*method)(), void(T::*undoMethod)())
| Declares a slot to be stateless and learn client-side behaviour in advance.
void | isNotStateless ()
| Marks the current function as not stateless.
template<class T >
WStatelessSlot * | implementJavaScript (void(T::*method)(), const std::string &jsCode)
| Provides a JavaScript implementation for a method.
Public Member Functions inherited from Wt::Core::observable
| observable () noexcept
| Default constructor.
virtual | ~observable ()
| Destructor.
template<typename... Args, typename C >
auto | bindSafe (void(C::*method)(Args...)) noexcept
| Protects a method call against object destruction.
template<typename... Args, typename C >
auto | bindSafe (void(C::*method)(Args...) const) const noexcept
| Protects a const method call against object destruction.
template<typename Function >
auto | bindSafe (const Function &function) noexcept
| Protects a function against object destruction.

## Additional Inherited Members
Public Types inherited from Wt::WObject
typedef void(WObject::*) | Method()
| Typedef for a WObject method without arguments.
Static Public Member Functions inherited from Wt::WObject
Protected Member Functions inherited from Wt::WObject
virtual WStatelessSlot * | getStateless (Method method)
| On-demand stateless slot implementation.

## Detailed Description

A WAbstractChartModel implementation that wraps a WAbstractItemModel.

This model delegates all functions to an underlying WAbstractItemModel, using the appropriate roles.

This model also triggers the changed() signal whenever the underlying WAbstractItemModel is changed.

## Member Function Documentation

## ◆ barBrushColor()

virtual const WColor * Wt::Chart::WStandardChartProxyModel::barBrushColor | ( | int | row,
|  | int | column ) const
| overridevirtual

Returns the bar brush color to use for a given row and column.

Returns the result of WAbstractItemModel::data() for the given row and column with the ItemDataRole::BarBrushColor, or null if no color is defined.

See also
  WAbstractItemModel::data()

Reimplemented from Wt::Chart::WAbstractChartModel.

## ◆ barPenColor()

virtual const WColor * Wt::Chart::WStandardChartProxyModel::barPenColor | ( | int | row,
|  | int | column ) const
| overridevirtual

Returns the bar pen color to use for a given row and column.

Returns the result of WAbstractItemModel::data() for the given row and column with the ItemDataRole::BarPenColor, or null if no color is defined.

See also
  WAbstractItemModel::data()

Reimplemented from Wt::Chart::WAbstractChartModel.

## ◆ columnCount()

virtual int Wt::Chart::WStandardChartProxyModel::columnCount | ( |  | ) | const
| overridevirtual

Returns the number of columns.

See also
  WAbstractItemModel::columnCount()

Implements Wt::Chart::WAbstractChartModel.

## ◆ data()

virtual double Wt::Chart::WStandardChartProxyModel::data | ( | int | row,
|  | int | column ) const
| overridevirtual

Returns data at a given row and column.

Returns the result of WAbstractItemModel::data() for the given row and column with the ItemDataRole::Display as a double.

See also
  WAbstractItemModel::data()

Implements Wt::Chart::WAbstractChartModel.

## ◆ displayData()

virtual WString Wt::Chart::WStandardChartProxyModel::displayData | ( | int | row,
|  | int | column ) const
| overridevirtual

Returns display data at a given row and column.

Returns the result of WAbstractItemModel::data() for the given row and column with the ItemDataRole::Display as a WString.

See also
  WAbstractItemModel::data()

Reimplemented from Wt::Chart::WAbstractChartModel.

## ◆ flags()

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

Returns the item flags for the given row and column.

Returns the result of WAbstractItemModel::index(row, column).flags() for the given row and column.

See also
  WModelIndex::flags()

Reimplemented from Wt::Chart::WAbstractChartModel.

## ◆ headerData()

virtual WString Wt::Chart::WStandardChartProxyModel::headerData | ( | int | column | ) | const
| overridevirtual

Returns the given column's header data.

Returns the result of WAbstractItemModel::headerData() for the given column with the ItemDataRole::Display as a WString.

See also
  WAbstractItemModel::headerData()

Reimplemented from Wt::Chart::WAbstractChartModel.

## ◆ link()

virtual WLink * Wt::Chart::WStandardChartProxyModel::link | ( | int | row,
|  | int | column ) const
| overridevirtual

Returns the link to use on a given row and column.

Returns the result of WAbstractItemModel::data() for the given row and column with the LinkRole as a WLink.

See also
  WAbstractItemModel::data()

Reimplemented from Wt::Chart::WAbstractChartModel.

## ◆ markerBrushColor()

virtual const WColor * Wt::Chart::WStandardChartProxyModel::markerBrushColor | ( | int | row,
|  | int | column ) const
| overridevirtual

Returns the marker brush color to use for a given row and column.

Returns the result of WAbstractItemModel::data() for the given row and column with the ItemDataRole::MarkerBrushColor, or null if no color is defined.

See also
  WAbstractItemModel::data()

Reimplemented from Wt::Chart::WAbstractChartModel.

## ◆ markerPenColor()

virtual const WColor * Wt::Chart::WStandardChartProxyModel::markerPenColor | ( | int | row,
|  | int | column ) const
| overridevirtual

Returns the marker pen color to use for a given row and column.

Returns the result of WAbstractItemModel::data() for the given row and column with the ItemDataRole::MarkerPenColor, or null if no color is defined.

See also
  WAbstractItemModel::data()

Reimplemented from Wt::Chart::WAbstractChartModel.

## ◆ markerScaleFactor()

virtual const double * Wt::Chart::WStandardChartProxyModel::markerScaleFactor | ( | int | row,
|  | int | column ) const
| overridevirtual

Returns the marker scale factor to use for a given row and column.

Returns the result of WAbstractItemModel::data() for the given row and column with the ItemDataRole::MarkerScaleFactor, or null if no color is defined.

See also
  WAbstractItemModel::data()

Reimplemented from Wt::Chart::WAbstractChartModel.

## ◆ markerType()

virtual const MarkerType * Wt::Chart::WStandardChartProxyModel::markerType | ( | int | row,
|  | int | column ) const
| overridevirtual

Returns the marker type to use for a given row and column.

Returns the result of WAbstractItemModel::data() for the given row and column with the MarkerTypeRole, or null if no marker type is defined.

See also
  WAbstractItemModel::data()

Reimplemented from Wt::Chart::WAbstractChartModel.

## ◆ rowCount()

virtual int Wt::Chart::WStandardChartProxyModel::rowCount | ( |  | ) | const
| overridevirtual

Returns the number of rows.

See also
  WAbstractItemModel::rowCount()

Implements Wt::Chart::WAbstractChartModel.

## ◆ toolTip()

virtual WString Wt::Chart::WStandardChartProxyModel::toolTip | ( | int | row,
|  | int | column ) const
| overridevirtual

Returns the tooltip text to use on a given row and column.

Returns the result of WAbstractItemModel::data() for the given row and column with the ItemDataRole::ToolTip as a WString.

See also
  WAbstractItemModel::data()

Reimplemented from Wt::Chart::WAbstractChartModel.