1 #include "CallbackBoundingRects.h"
2 #include "EngaugeAssert.h"
6 #include "QtToString.h"
7 #include "Transformation.h"
11 m_transformation (transformation)
19 return m_boundingRectGraph;
26 return m_boundingRectScreen;
33 if (curveName == AXIS_CURVE_NAME) {
39 mergeCoordinates (posGraph,
42 m_boundingRectScreen);
49 void CallbackBoundingRects::mergeCoordinates (
const QPointF &pos,
52 bool newGraphLeft = m_isEmpty;
53 bool newGraphTop = m_isEmpty;
54 bool newGraphRight = m_isEmpty;
55 bool newGraphBottom = m_isEmpty;
58 newGraphLeft = (pos.x() < boundingRect.left());
61 newGraphTop = (pos.y() < boundingRect.top());
64 newGraphRight = (boundingRect.right() < pos.x());
66 if (!newGraphBottom) {
67 newGraphBottom = (boundingRect.bottom() < pos.y());
71 boundingRect.setLeft (pos.x());
74 boundingRect.setTop (pos.y());
77 boundingRect.setRight (pos.x());
80 boundingRect.setBottom (pos.y());
QPointF posGraph(ApplyHasCheck applyHasCheck=KEEP_HAS_CHECK) const
Accessor for graph position. Skip check if copying one instance to another.
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
QPointF posScreen() const
Accessor for screen position.
CallbackSearchReturn
Return values for search callback methods.
Continue normal execution of the search.
QRectF boundingRectGraph(bool &isEmpty) const
Graph coordinate bounding rectangle.
QRectF boundingRectScreen(bool &isEmpty) const
Screen coordinate bounding rectangle.
CallbackBoundingRects(const Transformation &transformation)
Single constructor.