|
| static QPointF | transformPoint (const QwtPlot *plot, const QPointF &point, QwtAxisId fromX, QwtAxisId fromY, QwtAxisId toX, QwtAxisId toY) |
| | Transform a point from one axis pair to another.
|
| |
| static QPainterPath | transformPath (const QwtPlot *plot, const QPainterPath &path, QwtAxisId fromX, QwtAxisId fromY, QwtAxisId toX, QwtAxisId toY) |
| | Transform a path from one axis pair to another.
|
| |
| static QPointF | toPlotPoint (const QwtPlot *plot, const QPointF &screenPos, QwtAxisId xAxis=QwtAxis::XBottom, QwtAxisId yAxis=QwtAxis::YLeft) |
| | Convert screen position to data coordinates.
|
| |
| static QPointF | toScreenPoint (const QwtPlot *plot, const QPointF &plotPoint, QwtAxisId xAxis=QwtAxis::XBottom, QwtAxisId yAxis=QwtAxis::YLeft) |
| | Convert data coordinates to screen position.
|
| |
| static QPointF | onePixelOffset (const QwtPlot *plot, QwtAxisId xAxis=QwtAxis::XBottom, QwtAxisId yAxis=QwtAxis::YLeft) |
| | Compute the data-coordinate offset for 1 pixel displacement.
|
| |
| static QRectF | visibleRange (const QwtPlot *plot, QwtAxisId xAxis=QwtAxis::XBottom, QwtAxisId yAxis=QwtAxis::YLeft) |
| | Get the currently visible data range.
|
| |
| static QRectF | totalDataRange (const QwtPlot *plot, bool onlyVisible=true) |
| | Get the union of all data item bounding rectangles.
|
| |
Utility class for coordinate transformations on a QwtPlot.
QwtPlotTransform provides static methods to convert between different coordinate systems, compute pixel offsets, and determine the visible data range. All methods are read-only and do not modify the plot.
Coordinate systems in Qwt:
- Data coordinates: the actual x/y values of the plotted data
- Screen coordinates: pixel positions on the canvas widget
- Cross-axis transformation: converting data from one axis pair to another while preserving the same screen position
QRectF visible = Qwt::QwtPlotTransform::visibleRange(plot);
qDebug() << "Visible range:" << visible;
QPointF dataPoint = Qwt::QwtPlotTransform::toPlotPoint(plot, mousePos);
A 2-D plotting widget.
Definition qwt_plot.h:99
- See also
- QwtPlot::invTransform(), QwtPlot::transform(), QwtScaleMap