QwtPlotRescaler takes care of fixed aspect ratios for plot scales.
More...
#include <qwt_plot_rescaler.h>
QwtPlotRescaler takes care of fixed aspect ratios for plot scales.
QwtPlotRescaler auto adjusts the axes of a QwtPlot according to fixed aspect ratios.
Definition at line 29 of file qwt_plot_rescaler.h.
◆ ExpandingDirection
When rescalePolicy() is set to Expanding its direction depends on ExpandingDirection
Enumerator |
---|
ExpandUp | The upper limit of the scale is adjusted.
|
ExpandDown | The lower limit of the scale is adjusted.
|
ExpandBoth | Both limits of the scale are adjusted.
|
Definition at line 70 of file qwt_plot_rescaler.h.
◆ RescalePolicy
The rescale policy defines how to rescale the reference axis and their depending axes.
- See also
- ExpandingDirection, setIntervalHint()
Enumerator |
---|
Fixed | The interval of the reference axis remains unchanged, when the geometry of the canvas changes. All other axes will be adjusted according to their aspect ratio.
|
Expanding | The interval of the reference axis will be shrunk/expanded, when the geometry of the canvas changes. All other axes will be adjusted according to their aspect ratio.
The interval, that is represented by one pixel is fixed.
|
Fitting | The intervals of the axes are calculated, so that all axes include their interval hint.
|
Definition at line 40 of file qwt_plot_rescaler.h.
◆ QwtPlotRescaler()
◆ ~QwtPlotRescaler()
QwtPlotRescaler::~QwtPlotRescaler |
( |
| ) |
|
|
virtual |
◆ aspectRatio()
double QwtPlotRescaler::aspectRatio |
( |
QwtAxisId |
axisId | ) |
const |
◆ canvas() [1/2]
const QWidget * QwtPlotRescaler::canvas |
( |
| ) |
|
◆ canvas() [2/2]
const QWidget* QwtPlotRescaler::canvas |
( |
| ) |
const |
◆ canvasResizeEvent()
void QwtPlotRescaler::canvasResizeEvent |
( |
QResizeEvent * |
event | ) |
|
|
protectedvirtual |
◆ eventFilter()
bool QwtPlotRescaler::eventFilter |
( |
QObject * |
object, |
|
|
QEvent * |
event |
|
) |
| |
|
virtual |
◆ expandingDirection()
◆ expandInterval()
Expand the interval
- Parameters
-
interval | Interval to be expanded |
width | Distance to be added to the interval |
direction | Direction of the expand operation |
- Returns
- Expanded interval
Definition at line 526 of file qwt_plot_rescaler.cpp.
◆ expandScale()
QwtInterval QwtPlotRescaler::expandScale |
( |
QwtAxisId |
axisId, |
|
|
const QSize & |
oldSize, |
|
|
const QSize & |
newSize |
|
) |
| const |
|
protectedvirtual |
Calculate the new scale interval of a plot axis
- Parameters
-
axisId | Axis |
oldSize | Previous size of the canvas |
newSize | New size of the canvas |
- Returns
- Calculated new interval for the axis
Definition at line 405 of file qwt_plot_rescaler.cpp.
◆ interval()
◆ intervalHint()
◆ isEnabled()
bool QwtPlotRescaler::isEnabled |
( |
| ) |
const |
◆ orientation()
Qt::Orientation QwtPlotRescaler::orientation |
( |
QwtAxisId |
axisId | ) |
const |
|
protected |
◆ pixelDist()
double QwtPlotRescaler::pixelDist |
( |
QwtAxisId |
axisId, |
|
|
const QSize & |
size |
|
) |
| const |
|
private |
◆ plot() [1/2]
const QwtPlot * QwtPlotRescaler::plot |
( |
| ) |
|
◆ plot() [2/2]
const QwtPlot* QwtPlotRescaler::plot |
( |
| ) |
const |
◆ referenceAxis()
QwtAxisId QwtPlotRescaler::referenceAxis |
( |
| ) |
const |
◆ rescale() [1/2]
void QwtPlotRescaler::rescale |
( |
| ) |
const |
◆ rescale() [2/2]
void QwtPlotRescaler::rescale |
( |
const QSize & |
oldSize, |
|
|
const QSize & |
newSize |
|
) |
| const |
|
protectedvirtual |
Adjust the plot axes scales
- Parameters
-
oldSize | Previous size of the canvas |
newSize | New size of the canvas |
Definition at line 367 of file qwt_plot_rescaler.cpp.
◆ rescalePolicy()
◆ setAspectRatio() [1/2]
void QwtPlotRescaler::setAspectRatio |
( |
double |
ratio | ) |
|
Set the aspect ratio between the scale of the reference axis and the other scales. The default ratio is 1.0
- Parameters
-
- See also
- aspectRatio()
Definition at line 212 of file qwt_plot_rescaler.cpp.
◆ setAspectRatio() [2/2]
void QwtPlotRescaler::setAspectRatio |
( |
QwtAxisId |
axisId, |
|
|
double |
ratio |
|
) |
| |
Set the aspect ratio between the scale of the reference axis and another scale. The default ratio is 1.0
- Parameters
-
axisId | Axis |
ratio | Aspect ratio |
- See also
- aspectRatio()
Definition at line 226 of file qwt_plot_rescaler.cpp.
◆ setEnabled()
void QwtPlotRescaler::setEnabled |
( |
bool |
on | ) |
|
◆ setExpandingDirection() [1/2]
◆ setExpandingDirection() [2/2]
◆ setIntervalHint()
◆ setReferenceAxis()
void QwtPlotRescaler::setReferenceAxis |
( |
QwtAxisId |
axisId | ) |
|
◆ setRescalePolicy()
◆ syncScale()
Synchronize an axis scale according to the scale of the reference axis
- Parameters
-
axisId | Axis |
reference | Interval of the reference axis |
size | Size of the canvas |
- Returns
- New interval for axis
Definition at line 469 of file qwt_plot_rescaler.cpp.
◆ updateScales()
void QwtPlotRescaler::updateScales |
( |
QwtInterval |
intervals[QwtAxis::AxisPositions] | ) |
const |
|
protectedvirtual |
◆ m_data
The documentation for this class was generated from the following files: