17 m_documentAxesPointsRequired (documentAxesPointsRequired),
18 m_isEmptyGraphX (true),
19 m_isEmptyGraphY (true),
20 m_isEmptyScreenX (true),
21 m_isEmptyScreenY (true),
22 m_transformation (transformation)
29 isEmpty = m_isEmptyGraphX || m_isEmptyGraphY;
31 return m_boundingRectGraphMax;
37 isEmpty = m_isEmptyGraphX || m_isEmptyGraphY;
39 return m_boundingRectGraphMin;
45 isEmpty = m_isEmptyScreenX || m_isEmptyScreenY;
47 return QRectF (m_boundingRectScreenMin,
48 m_boundingRectScreenMax).normalized();
55 bool haveGraphX =
true, haveGraphY =
true;
68 mergeCoordinateX (posGraph,
69 m_boundingRectGraphMin,
70 m_boundingRectGraphMax,
74 mergeCoordinateY (posGraph,
75 m_boundingRectGraphMin,
76 m_boundingRectGraphMax,
80 m_boundingRectScreenMin,
81 m_boundingRectScreenMax,
84 m_boundingRectScreenMin,
85 m_boundingRectScreenMax,
91void CallbackBoundingRects::mergeCoordinateX (
const QPointF &pos,
92 QPointF &boundingRectMin,
93 QPointF &boundingRectMax,
96 bool newGraphMin = isEmpty;
97 bool newGraphMax = isEmpty;
100 newGraphMin = (pos.x() < boundingRectMin.x());
103 newGraphMax = (boundingRectMax.x() < pos.x());
107 boundingRectMin.setX (pos.x());
110 boundingRectMax.setX (pos.x());
116void CallbackBoundingRects::mergeCoordinateY (
const QPointF &pos,
117 QPointF &boundingRectMin,
118 QPointF &boundingRectMax,
121 bool newGraphMin = isEmpty;
122 bool newGraphMax = isEmpty;
125 newGraphMin = (pos.y() < boundingRectMin.y());
128 newGraphMax = (boundingRectMax.y() < pos.y());
132 boundingRectMin.setY (pos.y());
135 boundingRectMax.setY (pos.y());
const QString AXIS_CURVE_NAME
CallbackSearchReturn
Return values for search callback methods.
@ CALLBACK_SEARCH_RETURN_CONTINUE
Continue normal execution of the search.
DocumentAxesPointsRequired
@ DOCUMENT_AXES_POINTS_REQUIRED_4
QPointF boundingRectGraphMin(bool &isEmpty) const
Graph coordinate bounding rectangle's (xmin,ymin) corner.
QRectF boundingRectScreen(bool &isEmpty) const
Screen coordinate bounding rectangle.
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
CallbackBoundingRects(DocumentAxesPointsRequired documentAxesPointsRequired, const Transformation &transformation)
Single constructor.
QPointF boundingRectGraphMax(bool &isEmpty) const
Graph coordinate bounding rectangle's (xmax,ymax) corner.
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
QPointF posGraph(ApplyHasCheck applyHasCheck=KEEP_HAS_CHECK) const
Accessor for graph position. Skip check if copying one instance to another.
QPointF posScreen() const
Accessor for screen position.
bool isXOnly() const
In DOCUMENT_AXES_POINTS_REQUIRED_4 modes, this is true/false if y/x coordinate is undefined.