19#include <QGraphicsScene>
30const double PI = 3.1415926535;
39 m_modelCoords (modelCoords),
50 m_pointRadius (pointRadius),
52 m_modelCoords (modelCoords),
56 <<
" pointRadius=" << pointRadius
60void GridLineFactory::bindItemToScene(
QGraphicsItem *item)
const
67 item->setToolTip (QObject::tr (
"Axes checker. If this does not align with the axes, then the axes points should be checked"));
70 m_scene.addItem (item);
165 modelGridDisplay.
stable()) {
167 double startX = modelGridDisplay.
startX ();
168 double startY = modelGridDisplay.
startY ();
169 double stepX = modelGridDisplay.
stepX ();
170 double stepY = modelGridDisplay.
stepY ();
171 double stopX = modelGridDisplay.
stopX ();
172 double stopY = modelGridDisplay.
stopY ();
206 for (
double x = startX; x <= stopX; (
isLinearX ? x += stepX : x *= stepX)) {
213 for (
double y = startY; y <= stopY; (
isLinearY ? y += stepY : y *= stepY)) {
223void GridLineFactory::createTransformAlign (
const Transformation &transformation,
314 <<
" transformation=" << transformation;
321 createTransformAlign (transformation,
352 <<
" yFrom=" <<
yFrom
369 item = ellipseItem (transformation,
382 bindItemToScene (item);
396double GridLineFactory::minScreenDistanceFromPoints (
const QPointF &posScreen)
399 for (
int i = 0;
i < m_pointsToIsolate.count ();
i++) {
const int INNER_RADIUS_MIN
QColor ColorPaletteToQColor(ColorPalette color)
const double DEGREES_TO_RADIANS
const double CHECKER_OPACITY
const int Z_VALUE_IN_FRONT
const double RADIANS_TO_TICS
const Qt::PenStyle GRID_LINE_STYLE
const int GRID_LINE_WIDTH
log4cpp::Category * mainCat
QString QTransformToString(const QTransform &transform)
QString QPointFToString(const QPointF &pos)
Model for DlgSettingsCoords and CmdSettingsCoords.
CoordScale coordScaleYRadius() const
Get method for linear/log scale on y/radius.
CoordScale coordScaleXTheta() const
Get method for linear/log scale on x/theta.
CoordsType coordsType() const
Get method for coordinates type.
double originRadius() const
Get method for origin radius in polar mode.
Model for DlgSettingsGridDisplay and CmdSettingsGridDisplay.
double startX() const
Get method for x grid line lower bound (inclusive).
double stepX() const
Get method for x grid line increment.
double stopX() const
Get method for x grid line upper bound (inclusive).
double stopY() const
Get method for y grid line upper bound (inclusive).
bool stable() const
Get method for stable flag.
ColorPalette paletteColor() const
Get method for color.
double stepY() const
Get method for y grid line increment.
double startY() const
Get method for y grid line lower bound (inclusive).
Storage of one imported image and the data attached to that image.
Draw an arc as an ellipse but without lines from the center to the start and end points.
void createGridLinesForEvenlySpacedGrid(const DocumentModelGridDisplay &modelGridDisplay, const Document &document, const MainWindowModel &modelMainWindow, const Transformation &transformation, GridLines &gridLines)
Create a rectangular (cartesian) or annular (polar) grid of evenly spaced grid lines.
GridLine * createGridLine(double xFrom, double yFrom, double xTo, double yTo, const Transformation &transformation)
Create grid line, either along constant X/theta or constant Y/radius side.
GridLineFactory(QGraphicsScene &scene, const DocumentModelCoords &modelCoords)
Simple constructor for general use (i.e. not by Checker)
Limit the number of grid lines so a bad combination of start/step/stop value will not lead to extreme...
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...
Single grid line drawn a straight or curved line.
Container class for GridLine objects.
Model for DlgSettingsMainWindow.
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
#define LOG4CPP_INFO_S(logger)
#define LOG4CPP_DEBUG_S(logger)