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;
15class MainWindowModel;
16class Transformation;
17
19extern const int DEFAULT_MAXIMUM_GRID_LINES;
20
24{
25public:
28
30 void limitForXTheta (const Document &document,
31 const Transformation &transformation,
32 const DocumentModelCoords &modelCoords,
33 const MainWindowModel &modelMainWindow,
35 double &startX,
36 double &stepX,
37 double &stopX) const;
38
40 void limitForYRadius (const Document &document,
41 const Transformation &transformation,
42 const DocumentModelCoords &modelCoords,
43 const MainWindowModel &modelMainWindow,
45 double &startY,
46 double &stepY,
47 double &stopY) const;
48
49private:
50
51 void documentBounds (const Document &document,
52 const Transformation &transformation,
55
56};
57
58#endif // GRID_LINE_LIMITER_H
const int INNER_RADIUS_MIN
const int DEFAULT_MAXIMUM_GRID_LINES
Default for maximum number of grid lines.
Model for DlgSettingsCoords and CmdSettingsCoords.
Model for DlgSettingsGridDisplay and CmdSettingsGridDisplay.
Storage of one imported image and the data attached to that image.
Definition Document.h:42
Limit the number of grid lines so a bad combination of start/step/stop value will not lead to extreme...
void limitForYRadius(const Document &document, const Transformation &transformation, const DocumentModelCoords &modelCoords, const MainWindowModel &modelMainWindow, const DocumentModelGridDisplay &modelGrid, double &startY, double &stepY, double &stopY) 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, const DocumentModelGridDisplay &modelGrid, double &startX, double &stepX, double &stopX) 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.