Engauge Digitizer  2
CallbackBoundingRects.h
1 /******************************************************************************************************
2  * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5  ******************************************************************************************************/
6 
7 #ifndef CALLBACK_BOUNDING_RECTS_H
8 #define CALLBACK_BOUNDING_RECTS_H
9 
10 #include "CallbackSearchReturn.h"
11 #include <QPointF>
12 #include <QRectF>
13 #include <QString>
14 #include "Transformation.h"
15 
16 class Point;
17 
20 {
21 public:
23  CallbackBoundingRects(const Transformation &transformation);
24 
26  QRectF boundingRectGraph (bool &isEmpty) const;
27 
29  QRectF boundingRectScreen (bool &isEmpty) const;
30 
32  CallbackSearchReturn callback (const QString &curveName,
33  const Point &point);
34 
35 private:
37 
38  void mergeCoordinates (const QPointF &pos,
39  QRectF &boundingRect);
40 
41  bool m_isEmpty;
42  const Transformation m_transformation;
43  QRectF m_boundingRectGraph;
44  QRectF m_boundingRectScreen;
45 };
46 
47 #endif // CALLBACK_BOUNDING_RECTS_H
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
QRectF boundingRectScreen(bool &isEmpty) const
Screen coordinate bounding rectangle.
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
Definition: Point.h:23
Affine transformation between screen and graph coordinates, based on digitized axis points...
QRectF boundingRectGraph(bool &isEmpty) const
Graph coordinate bounding rectangle.
Callback for computing the bounding rectangles of the screen and graph coordinates of the points in t...