23 void GridLineLimiter::documentBounds (
const Document &document,
25 QPointF &boundingRectMin,
26 QPointF &boundingRectMax)
const
32 Functor2wRet<const QString &, const Point &, CallbackSearchReturn> ftorWithCallback = functor_ret (ftor,
38 boundingRectMin = ftor.boundingRectGraphMin (isEmpty);
39 boundingRectMax = ftor.boundingRectGraphMax (isEmpty);
51 startX = modelGrid.
startX();
52 stopX = modelGrid.
stopX();
53 stepX = modelGrid.
stepX();
54 int countX = signed (modelGrid.
countX());
66 countX = qFloor (1.0 + (stopX - startX) / stepX);
81 QPointF boundingRectGraphMin, boundingRectGraphMax;
82 documentBounds (document,
85 boundingRectGraphMax);
88 startX = boundingRectGraphMin.x ();
96 countX = qFloor (1.0 + (qLn (stopX) - qLn (startX)) / qLn (stepX));
102 stopX = qExp (qLn (startX) + qLn (stepX) * (modelMainWindow.
maximumGridLines() - 1));
116 startY = modelGrid.
startY();
117 stopY = modelGrid.
stopY();
118 stepY = modelGrid.
stepY();
119 int countY = signed (modelGrid.
countY());
126 if (!needReduction) {
129 needReduction =
true;
131 countY = qFloor (1.0 + (stopY - startY) / stepY);
146 QPointF boundingRectGraphMin, boundingRectGraphMax;
147 documentBounds (document,
149 boundingRectGraphMin,
150 boundingRectGraphMax);
153 startY = boundingRectGraphMin.y ();
156 if (!needReduction) {
159 needReduction =
true;
161 countY = qFloor (1.0 + (qLn (stopY) - qLn (startY)) / qLn (stepY));
167 stopY = qExp (qLn (startY) + qLn (stepY) * (modelMainWindow.
maximumGridLines() - 1));
double stopX() const
Get method for x grid line upper bound (inclusive).
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...
DocumentAxesPointsRequired documentAxesPointsRequired() const
Get method for DocumentAxesPointsRequired.
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
double stepX() const
Get method for x grid line increment.
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...
Model for DlgSettingsGridDisplay and CmdSettingsGridDisplay.
CoordScale coordScaleYRadius() const
Get method for linear/log scale on y/radius.
void iterateThroughCurvePointsAxes(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for the axes curve.
double startX() const
Get method for x grid line lower bound (inclusive).
int maximumGridLines() const
Maximum number of grid lines.
GridLineLimiter()
Single constructor.
CoordScale coordScaleXTheta() const
Get method for linear/log scale on x/theta.
const int DEFAULT_MAXIMUM_GRID_LINES
Default for maximum number of grid lines.
Model for DlgSettingsMainWindow.
Model for DlgSettingsCoords and CmdSettingsCoords.
Storage of one imported image and the data attached to that image.
double stopY() const
Get method for y grid line upper bound (inclusive).
double startY() const
Get method for y grid line lower bound (inclusive).
double stepY() const
Get method for y grid line increment.
void iterateThroughCurvesPointsGraphs(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for all the graphs curves.
Callback for computing the bounding rectangles of the screen and graph coordinates of the points in t...
unsigned int countX() const
Get method for x grid line count.
unsigned int countY() const
Get method for y grid line count.