7 #include "CallbackGatherXThetasInGridLines.h" 9 #include "EngaugeAssert.h" 10 #include "ExportAlignLinear.h" 11 #include "ExportAlignLog.h" 12 #include "ExportLayoutFunctions.h" 13 #include "ExportPointsSelectionFunctions.h" 14 #include "GridLineLimiter.h" 16 #include "MainWindowModel.h" 20 const bool NOT_FIRST_CURVE_ONLY =
false;
24 const QStringList &curvesIncluded,
28 modelExport.extrapolateOutsideEndpoints (),
32 addGridLines (modelMainWindow,
37 void CallbackGatherXThetasInGridLines::addGridLines (
const MainWindowModel &modelMainWindow,
58 int countX = qFloor (0.5 + 1 + (stopX - startX) / stepX);
59 for (
int i = 0; i < countX; i++) {
60 double x = startX + i * stepX;
65 int countX = qFloor (1.0 + (qLn (stopX) - qLn (startX)) / qLn (stepX));
66 for (
int i = 0; i < countX; i++) {
67 double x = startX * qPow (stepX, i);
76 LOG4CPP_DEBUG_S ((*mainCat)) <<
"CallbackGatherXThetasInGridLines::callback" 77 <<
" curveName=" << curveName.toLatin1().data()
78 <<
" point=" << point.
identifier().toLatin1().data();
83 return CALLBACK_SEARCH_RETURN_CONTINUE;
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...
Model for DlgSettingsGridDisplay and CmdSettingsGridDisplay.
const Transformation & transformation() const
Get method for transformation.
Base callback for collecting X/Theta independent variables, for functions, in preparation for exporti...
void updateMinMax(const QString &curveName, const Point &point)
Update the tracked min and max values for each curve.
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
void addGraphX(double xGraph)
Save one graph x value.
QString identifier() const
Unique identifier for a specific Point.
Model for DlgSettingsMainWindow.
CoordScale coordScaleXTheta() const
Get method for linear/log scale on x/theta.
DocumentModelGridDisplay modelGridDisplay() const
Get method for DocumentModelGridDisplay.
double stopX() const
Get method for x grid line upper bound (inclusive).
Storage of one imported image and the data attached to that image.
virtual CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
double startX() const
Get method for x grid line lower bound (inclusive).
CallbackGatherXThetasInGridLines(const MainWindowModel &modelMainWindow, const DocumentModelExportFormat &modelExport, const QStringList &curvesIncluded, const Transformation &transformation, const Document &document)
Single constructor.
Limit the number of grid lines so a bad combination of start/step/stop value will not lead to extreme...
double stepX() const
Get method for x grid line increment.
DocumentModelCoords modelCoords() const
Get method for DocumentModelCoords.