Engauge Digitizer 2
Loading...
Searching...
No Matches
GridLineLimiter.h
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2016 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 GRID_LINE_LIMITER_H
8#define GRID_LINE_LIMITER_H
9
10#include <QPointF>
11
12class Document;
14class MainWindowModel;
15class Transformation;
16
18extern const int DEFAULT_MAXIMUM_GRID_LINES;
19
23{
24public:
27
29 void limitForXTheta (const Document &document,
30 const Transformation &transformation,
31 const DocumentModelCoords &modelCoords,
32 const MainWindowModel &modelMainWindow,
33 double &startX,
34 double &stepX,
35 double &stopX,
36 unsigned int numX) const;
37
39 void limitForYRadius (const Document &document,
40 const Transformation &transformation,
41 const DocumentModelCoords &modelCoords,
42 const MainWindowModel &modelMainWindow,
43 double &startY,
44 double &stepY,
45 double &stopY,
46 unsigned int numY) const;
47
48private:
49
50 void documentBounds (const Document &document,
51 const Transformation &transformation,
52 QPointF &boundingRectMin,
53 QPointF &boundingRectMax) const;
54
55};
56
57#endif // GRID_LINE_LIMITER_H
const int DEFAULT_MAXIMUM_GRID_LINES
Default for maximum number of grid lines.
Model for DlgSettingsCoords and CmdSettingsCoords.
Storage of one imported image and the data attached to that image.
Definition Document.h:44
void limitForYRadius(const Document &document, const Transformation &transformation, const DocumentModelCoords &modelCoords, const MainWindowModel &modelMainWindow, double &startY, double &stepY, double &stopY, unsigned int numY) const
Limit step value for y/range coordinate. This is a noop if the maximum grid line limit in MainWindowM...
void limitForXTheta(const Document &document, const Transformation &transformation, const DocumentModelCoords &modelCoords, const MainWindowModel &modelMainWindow, double &startX, double &stepX, double &stopX, unsigned int numX) const
Limit step value for x/theta coordinate. This is a noop if the maximum grid line limit in MainWindowM...
GridLineLimiter()
Single constructor.
Model for DlgSettingsMainWindow.
Affine transformation between screen and graph coordinates, based on digitized axis points.