A widget for selecting an X axis range to display on an associated WCartesianChart. More...
#include <Wt/Chart/WAxisSliderWidget>

Public Member Functions | |
| WAxisSliderWidget (WContainerWidget *parent=0) | |
| Creates an axis slider widget. | |
| WAxisSliderWidget (WCartesianChart *chart, int seriesColumn, WContainerWidget *parent=0) | |
| Creates an axis slider widget. | |
| virtual | ~WAxisSliderWidget () |
| Destructor. | |
| void | setChart (WCartesianChart *chart) |
| Set the associated chart. | |
| void | setSeriesColumn (int seriesColumn) |
| Set the associated data series column. | |
| int | seriesColumn () const |
| Returns the associated data series column. | |
| void | setSeriesPen (const WPen &pen) |
| Set the pen to draw the data series with. | |
| const WPen & | seriesPen () const |
| Returns the pen to draw the data series with. | |
| void | setSelectedSeriesPen (const WPen &pen) |
| Set the pen to draw the selected part of the data series with. | |
| WPen | selectedSeriesPen () const |
| Returns the pen to draw the selected part of the data series with. | |
| void | setHandleBrush (const WBrush &brush) |
| Set the brush to draw the handles left and right of the selected area with. | |
| const WBrush & | handleBrush () const |
| Returns the brush to draw the handles left and right of the selected area with. | |
| void | setBackground (const WBrush &background) |
| Set the background brush. | |
| const WBrush & | background () const |
| Returns the background brush. | |
| void | setSelectedAreaBrush (const WBrush &brush) |
| Set the brush for the selected area. | |
| const WBrush & | selectedAreaBrush () const |
| Returns the brush for the selected area. | |
| void | setSelectionAreaPadding (int padding, WFlags< Side > sides=All) |
| Sets an internal margin for the selection area. | |
| int | selectionAreaPadding (Side side) const |
| Returns the internal margin for the selection area. | |
| void | setAutoLayoutEnabled (bool enabled=true) |
| Configures the axis slider layout to be automatic. | |
| bool | isAutoLayoutEnabled () const |
| Returns whether chart layout is computed automatically. | |
| void | setLabelsEnabled (bool enabled=true) |
| Set whether to draw the X axis tick labels on the slider widget. | |
| bool | isLabelsEnabled () const |
| Returns whether the X axis tick labels are drawn. | |
Protected Member Functions | |
| virtual void | render (WFlags< RenderFlag > flags) WT_CXX11ONLY(override) |
| Renders the widget. | |
| virtual void | paintEvent (WPaintDevice *paintDevice) WT_CXX11ONLY(override) |
| Paints the widget. | |
A widget for selecting an X axis range to display on an associated WCartesianChart.
| Wt::Chart::WAxisSliderWidget::WAxisSliderWidget | ( | WContainerWidget * | parent = 0 | ) |
Creates an axis slider widget.
Creates an axis slider widget that is not associated with a chart. Before it is used, a chart should be assigned with setChart(), and a series column chosen with setSeriesColumn().
| Wt::Chart::WAxisSliderWidget::WAxisSliderWidget | ( | WCartesianChart * | chart, |
| int | seriesColumn, | ||
| WContainerWidget * | parent = 0 |
||
| ) |
Creates an axis slider widget.
Creates an axis slider widget associated with the given data series of the given chart.
| bool Wt::Chart::WAxisSliderWidget::isAutoLayoutEnabled | ( | ) | const |
Returns whether chart layout is computed automatically.
| bool Wt::Chart::WAxisSliderWidget::isLabelsEnabled | ( | ) | const |
Returns whether the X axis tick labels are drawn.
| void Wt::Chart::WAxisSliderWidget::paintEvent | ( | WPaintDevice * | paintDevice | ) | [override, protected, virtual] |
Paints the widget.
You should reimplement this method to paint the contents of the widget, using the given paintDevice.
Implements Wt::WPaintedWidget.
| void Wt::Chart::WAxisSliderWidget::render | ( | WFlags< RenderFlag > | flags | ) | [override, protected, virtual] |
Renders the widget.
This function renders the widget (or an update for the widget), after this has been scheduled using scheduleRender().
The default implementation will render the widget by serializing changes to JavaScript and HTML. You may want to reimplement this widget if you have been postponing some of the layout / rendering implementation until the latest moment possible. In that case you should make sure you call the base implementation however.
Reimplemented from Wt::WPaintedWidget.
| int Wt::Chart::WAxisSliderWidget::selectionAreaPadding | ( | Side | side | ) | const |
Returns the internal margin for the selection area.
This is either the padding set through setSelectionAreaPadding() or computed using setAutoLayoutEnabled().
| void Wt::Chart::WAxisSliderWidget::setAutoLayoutEnabled | ( | bool | enabled = true | ) |
Configures the axis slider layout to be automatic.
This configures the selection area so that the space around it is suited for the text that is rendered.
| void Wt::Chart::WAxisSliderWidget::setLabelsEnabled | ( | bool | enabled = true | ) |
Set whether to draw the X axis tick labels on the slider widget.
Labels are enabled by default.
| void Wt::Chart::WAxisSliderWidget::setSelectedSeriesPen | ( | const WPen & | pen | ) |
Set the pen to draw the selected part of the data series with.
If not set, this defaults to seriesPen().
| void Wt::Chart::WAxisSliderWidget::setSelectionAreaPadding | ( | int | padding, |
| WFlags< Side > | sides = All |
||
| ) |
Sets an internal margin for the selection area.
This configures the area (in pixels) around the selection area that is available for the axes and labels, and the handles.
Alternatively, you can configure the chart layout to be computed automatically using setAutoLayoutEnabled().
| void Wt::Chart::WAxisSliderWidget::setSeriesColumn | ( | int | seriesColumn | ) |
Set the associated data series column.
Only LineSeries and CurveSeries are supported.
1.7.6.1