Engauge Digitizer
2
Toggle main menu visibility
Loading...
Searching...
No Matches
Callback
CallbackBoundingRects.h
Go to the documentation of this file.
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 "
DocumentAxesPointsRequired.h
"
12
#include <QPointF>
13
#include <QRectF>
14
#include <QString>
15
#include "
Transformation.h
"
16
17
class
Point
;
18
20
class
CallbackBoundingRects
21
{
22
public
:
24
CallbackBoundingRects
(
DocumentAxesPointsRequired
documentAxesPointsRequired,
25
const
Transformation
&transformation);
26
30
QPointF
boundingRectGraphMin
(
bool
&isEmpty)
const
;
31
35
QPointF
boundingRectGraphMax
(
bool
&isEmpty)
const
;
36
38
QRectF
boundingRectScreen
(
bool
&isEmpty)
const
;
39
41
CallbackSearchReturn
callback
(
const
QString &curveName,
42
const
Point
&point);
43
44
private
:
45
CallbackBoundingRects
();
46
47
void
mergeCoordinateX (
const
QPointF &pos,
48
QPointF &boundingRectMin,
49
QPointF &boundingRectMax,
50
bool
&isEmpty);
51
void
mergeCoordinateY (
const
QPointF &pos,
52
QPointF &boundingRectMin,
53
QPointF &boundingRectMax,
54
bool
&isEmpty);
55
56
DocumentAxesPointsRequired
m_documentAxesPointsRequired;
57
bool
m_isEmptyGraphX;
// Have x graph bounds been initialized
58
bool
m_isEmptyGraphY;
// Have y graph bounds been initialized
59
bool
m_isEmptyScreenX;
// Have x screen bounds been initialized
60
bool
m_isEmptyScreenY;
// Have y screen bounds been initialized
61
const
Transformation
m_transformation;
62
QPointF m_boundingRectGraphMin;
// Not a QRectF for reasons explained by boundingRectGraphMin
63
QPointF m_boundingRectGraphMax;
// Not a QRectF for reasons explained by boundingRectGraphMax
64
QPointF m_boundingRectScreenMin;
// Consistent with m_boundingRectGraphMin
65
QPointF m_boundingRectScreenMax;
// Consistent with m_boundingRectGraphMax
66
};
67
68
#endif
// CALLBACK_BOUNDING_RECTS_H
CallbackSearchReturn.h
CallbackSearchReturn
CallbackSearchReturn
Return values for search callback methods.
Definition
CallbackSearchReturn.h:18
DocumentAxesPointsRequired.h
DocumentAxesPointsRequired
DocumentAxesPointsRequired
Definition
DocumentAxesPointsRequired.h:10
Transformation.h
CallbackBoundingRects::boundingRectGraphMin
QPointF boundingRectGraphMin(bool &isEmpty) const
Graph coordinate bounding rectangle's (xmin,ymin) corner.
Definition
CallbackBoundingRects.cpp:34
CallbackBoundingRects::boundingRectScreen
QRectF boundingRectScreen(bool &isEmpty) const
Screen coordinate bounding rectangle.
Definition
CallbackBoundingRects.cpp:42
CallbackBoundingRects::callback
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
Definition
CallbackBoundingRects.cpp:51
CallbackBoundingRects::CallbackBoundingRects
CallbackBoundingRects(DocumentAxesPointsRequired documentAxesPointsRequired, const Transformation &transformation)
Single constructor.
Definition
CallbackBoundingRects.cpp:15
CallbackBoundingRects::boundingRectGraphMax
QPointF boundingRectGraphMax(bool &isEmpty) const
Graph coordinate bounding rectangle's (xmax,ymax) corner.
Definition
CallbackBoundingRects.cpp:26
Point
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
Definition
Point.h:26
Transformation
Affine transformation between screen and graph coordinates, based on digitized axis points.
Definition
Transformation.h:32
Generated on
for Engauge Digitizer by
1.17.0