#include <vtkQtChartContentsSpace.h>
Definition at line 41 of file vtkQtChartContentsSpace.h.
Public Slots | |
void | setXOffset (float offset) |
Sets the x offset. | |
void | setYOffset (float offset) |
Sets the y offset. | |
void | setMaximumXOffset (float maximum) |
Sets the maximum x offset. | |
void | setMaximumYOffset (float maximum) |
Sets the maximum y offset. | |
void | panUp () |
Pans up by a predetermined amount. | |
void | panDown () |
Pans down by a predetermined amount. | |
void | panLeft () |
Pans left by a predetermined amount. | |
void | panRight () |
Pans right by a predetermined amount. | |
void | resetZoom () |
Resets the zoom factors to 1. | |
void | historyNext () |
Changes the view to the next one in the history. | |
void | historyPrevious () |
Changes the view to the previous one in the history. | |
Signals | |
void | xOffsetChanged (float offset) |
Emitted when the x offset has changed. | |
void | yOffsetChanged (float offset) |
Emitted when the y offset has changed. | |
void | maximumChanged (float xMaximum, float yMaximum) |
Emitted when the maximum offsets have changed. | |
void | historyPreviousAvailabilityChanged (bool available) |
Emitted when the view history availability changes. | |
void | historyNextAvailabilityChanged (bool available) |
Emitted when the view history availability changes. | |
Public Member Functions | |
vtkQtChartContentsSpace (QObject *parent=0) | |
Creates a chart contents space instance. | |
virtual | ~vtkQtChartContentsSpace () |
Contents Methods | |
float | getXOffset () const |
Gets the x offset. | |
float | getYOffset () const |
Gets the y offset. | |
float | getMaximumXOffset () const |
Gets the maximum x offset. | |
float | getMaximumYOffset () const |
Gets the maximum y offset. | |
float | getContentsWidth () const |
Gets the contents width. | |
float | getContentsHeight () const |
Gets the contents height. | |
void | translateToLayerContents (QPointF &point) const |
Translates a point to layer contents coordinates. | |
void | translateToLayerContents (QRectF &area) const |
Translates a point to layer contents coordinates. | |
Size Methods | |
float | getChartWidth () const |
Gets the width of the chart. | |
float | getChartHeight () const |
Gets the height of the chart. | |
void | setChartSize (float width, float height) |
Sets the size of the chart. | |
void | getChartLayerBounds (QRectF &bounds) const |
Gets the chart layer bounds. | |
void | setChartLayerBounds (const QRectF &bounds) |
Sets the chart layer bounds. | |
Zoom Methods | |
float | getXZoomFactor () const |
Gets the x-axis zoom factor. | |
float | getYZoomFactor () const |
Gets the y-axis zoom factor. | |
void | zoomToFactor (float factor) |
Zooms the chart to the given factor. | |
void | zoomToFactor (float xFactor, float yFactor) |
Zooms the chart to the given factors. | |
void | zoomToFactorX (float factor) |
Zooms only the x-axis to a given factor. | |
void | zoomToFactorY (float factor) |
Zooms only the y-axis to a given factor. | |
Mouse Interactions | |
void | startInteraction () |
Signals the start of a mouse move interaction. | |
bool | isInInteraction () const |
Gets whether or not an interaction is currently in progress. | |
void | finishInteraction () |
Signals the end of a mouse move interaction. | |
History Methods | |
bool | isHistoryPreviousAvailable () const |
Gets whether or not a previous zoom viewport is available. | |
bool | isHistoryNextAvailable () const |
Gets whether or not a forward zoom viewport is available. | |
Static Public Member Functions | |
static float | getZoomFactorStep () |
Gets the zoom factor step. | |
static void | setZoomFactorStep (float step) |
Sets the zoom factor step. | |
static float | getPanStep () |
Gets the pan step. | |
static void | setPanStep (float step) |
Sets the pan step. |
vtkQtChartContentsSpace::vtkQtChartContentsSpace | ( | QObject * | parent = 0 |
) |
Creates a chart contents space instance.
parent | The parent object. |
virtual vtkQtChartContentsSpace::~vtkQtChartContentsSpace | ( | ) | [virtual] |
float vtkQtChartContentsSpace::getXOffset | ( | ) | const [inline] |
float vtkQtChartContentsSpace::getYOffset | ( | ) | const [inline] |
float vtkQtChartContentsSpace::getMaximumXOffset | ( | ) | const [inline] |
Gets the maximum x offset.
Definition at line 70 of file vtkQtChartContentsSpace.h.
float vtkQtChartContentsSpace::getMaximumYOffset | ( | ) | const [inline] |
Gets the maximum y offset.
Definition at line 76 of file vtkQtChartContentsSpace.h.
float vtkQtChartContentsSpace::getContentsWidth | ( | ) | const |
Gets the contents width.
float vtkQtChartContentsSpace::getContentsHeight | ( | ) | const |
Gets the contents height.
void vtkQtChartContentsSpace::translateToLayerContents | ( | QPointF & | point | ) | const |
Translates a point to layer contents coordinates.
The point is adjusted from widget origin to layer bounds origin. The point is also translated to account for panning offset.
point | The point to translate. |
void vtkQtChartContentsSpace::translateToLayerContents | ( | QRectF & | area | ) | const |
Translates a point to layer contents coordinates.
The rectangle is adjusted from widget origin to layer bounds origin. The rectangle is also translated to account for panning offset.
area | The rectangle to translate. |
float vtkQtChartContentsSpace::getChartWidth | ( | ) | const [inline] |
Gets the width of the chart.
Definition at line 116 of file vtkQtChartContentsSpace.h.
float vtkQtChartContentsSpace::getChartHeight | ( | ) | const [inline] |
Gets the height of the chart.
Definition at line 122 of file vtkQtChartContentsSpace.h.
void vtkQtChartContentsSpace::setChartSize | ( | float | width, | |
float | height | |||
) |
Sets the size of the chart.
The chart size must be set in order to zoom in or out. The contents size methods are only valid when the chart size is set.
width | The chart width. | |
height | The chart height. |
void vtkQtChartContentsSpace::getChartLayerBounds | ( | QRectF & | bounds | ) | const |
Gets the chart layer bounds.
bounds | Used to return the chart layer bounds. |
void vtkQtChartContentsSpace::setChartLayerBounds | ( | const QRectF & | bounds | ) |
Sets the chart layer bounds.
bounds | The chart layer bounds. |
float vtkQtChartContentsSpace::getXZoomFactor | ( | ) | const [inline] |
Gets the x-axis zoom factor.
Definition at line 151 of file vtkQtChartContentsSpace.h.
float vtkQtChartContentsSpace::getYZoomFactor | ( | ) | const [inline] |
Gets the y-axis zoom factor.
Definition at line 157 of file vtkQtChartContentsSpace.h.
void vtkQtChartContentsSpace::zoomToFactor | ( | float | factor | ) |
Zooms the chart to the given factor.
factor | The new zoom factor for both axes. |
void vtkQtChartContentsSpace::zoomToFactor | ( | float | xFactor, | |
float | yFactor | |||
) |
Zooms the chart to the given factors.
The zoom factors of the chart are independent of each other. In other words, the x-axis can be zoomed to a different factor than the y-axis.
When the zoom factors are changed, the new zoom viewport will be added to the zoom history. The zoom history can be navigated using the historyNext
and historyPrevious
methods. The user can also navigate through the history using the keyboard shortcuts.
xFactor | The x-axis zoom factor. | |
yFactor | The y-axis zoom factor. |
void vtkQtChartContentsSpace::zoomToFactorX | ( | float | factor | ) |
Zooms only the x-axis to a given factor.
factor | The x-axis zoom factor. |
void vtkQtChartContentsSpace::zoomToFactorY | ( | float | factor | ) |
Zooms only the y-axis to a given factor.
factor | The y-axis zoom factor. |
void vtkQtChartContentsSpace::startInteraction | ( | ) |
Signals the start of a mouse move interaction.
While an interaction is in progress, the zoom history will not be updated. When finishInteraction
is called, the history is updated if the zoom factors have changed.
bool vtkQtChartContentsSpace::isInInteraction | ( | ) | const |
Gets whether or not an interaction is currently in progress.
void vtkQtChartContentsSpace::finishInteraction | ( | ) |
bool vtkQtChartContentsSpace::isHistoryPreviousAvailable | ( | ) | const |
Gets whether or not a previous zoom viewport is available.
bool vtkQtChartContentsSpace::isHistoryNextAvailable | ( | ) | const |
Gets whether or not a forward zoom viewport is available.
void vtkQtChartContentsSpace::setXOffset | ( | float | offset | ) | [slot] |
Sets the x offset.
offset | The new x offset. |
void vtkQtChartContentsSpace::setYOffset | ( | float | offset | ) | [slot] |
Sets the y offset.
offset | The new y offset. |
void vtkQtChartContentsSpace::setMaximumXOffset | ( | float | maximum | ) | [slot] |
Sets the maximum x offset.
maximum | The maximum x offset. |
void vtkQtChartContentsSpace::setMaximumYOffset | ( | float | maximum | ) | [slot] |
Sets the maximum y offset.
maximum | The maximum y offset. |
void vtkQtChartContentsSpace::panUp | ( | ) | [slot] |
Pans up by a predetermined amount.
void vtkQtChartContentsSpace::panDown | ( | ) | [slot] |
Pans down by a predetermined amount.
void vtkQtChartContentsSpace::panLeft | ( | ) | [slot] |
Pans left by a predetermined amount.
void vtkQtChartContentsSpace::panRight | ( | ) | [slot] |
Pans right by a predetermined amount.
void vtkQtChartContentsSpace::resetZoom | ( | ) | [slot] |
Resets the zoom factors to 1.
void vtkQtChartContentsSpace::historyNext | ( | ) | [slot] |
Changes the view to the next one in the history.
void vtkQtChartContentsSpace::historyPrevious | ( | ) | [slot] |
Changes the view to the previous one in the history.
static float vtkQtChartContentsSpace::getZoomFactorStep | ( | ) | [static] |
Gets the zoom factor step.
static void vtkQtChartContentsSpace::setZoomFactorStep | ( | float | step | ) | [static] |
Sets the zoom factor step.
step | The new zoom factor step. |
static float vtkQtChartContentsSpace::getPanStep | ( | ) | [static] |
Gets the pan step.
static void vtkQtChartContentsSpace::setPanStep | ( | float | step | ) | [static] |
Sets the pan step.
step | The new pan step. |
void vtkQtChartContentsSpace::xOffsetChanged | ( | float | offset | ) | [signal] |
Emitted when the x offset has changed.
offset | The new x offset. |
void vtkQtChartContentsSpace::yOffsetChanged | ( | float | offset | ) | [signal] |
Emitted when the y offset has changed.
offset | The new y offset. |
void vtkQtChartContentsSpace::maximumChanged | ( | float | xMaximum, | |
float | yMaximum | |||
) | [signal] |
Emitted when the maximum offsets have changed.
This signal is sent when either or both of the offsets have changed. Sending the changes as one improves the chart layout.
xMaximum | The maximum x offset. | |
yMaximum | The maximum y offset. |
void vtkQtChartContentsSpace::historyPreviousAvailabilityChanged | ( | bool | available | ) | [signal] |
Emitted when the view history availability changes.
available | True if there is a history item available before the current one. |
void vtkQtChartContentsSpace::historyNextAvailabilityChanged | ( | bool | available | ) | [signal] |
Emitted when the view history availability changes.
available | True if there is a history item available after the current one. |