Go to the documentation of this file.
24 #include <QDataStream>
30 #include <QXmlStreamReader>
31 #include <QXmlStreamWriter>
59 resetSelectedCurveNameIfNecessary ();
75 resetSelectedCurveNameIfNecessary ();
79 const QPointF &posGraph,
94 <<
" ordinal=" << ordinal
97 <<
" identifier=" << identifier.toLatin1 ().data ();
101 const QPointF &posGraph,
102 const QString &identifier,
115 <<
" ordinal=" << ordinal
118 <<
" identifier=" << identifier.toLatin1 ().data ();
122 const QPointF &posScreen,
126 Point point (curveName,
134 <<
" ordinal=" << ordinal
136 <<
" identifier=" << identifier.toLatin1 ().data ();
140 const QPointF &posScreen,
141 const QString &identifier,
144 Point point (curveName,
151 <<
" ordinal=" << ordinal
153 <<
" identifier=" << identifier.toLatin1 ().data ();
160 Functor2wRet<const QString &, const Point &, CallbackSearchReturn> ftorWithCallback = functor_ret (ftor,
166 bool CoordSystem::bytesIndicatePreVersion6 (
const QByteArray &bytes)
const
168 QByteArray preVersion6MagicNumber;
172 preVersion6MagicNumber[0] =
'\x00';
173 preVersion6MagicNumber[1] =
'\x00';
174 preVersion6MagicNumber[2] =
'\xCA';
175 preVersion6MagicNumber[3] =
'\xFE';
177 return (bytes == preVersion6MagicNumber);
181 const QPointF &posGraph,
183 QString &errorMessage,
194 documentAxesPointsRequired,
197 Functor2wRet<const QString &, const Point &, CallbackSearchReturn> ftorWithCallback = functor_ret (ftor,
206 const QPointF &posScreen,
207 const QPointF &posGraph,
209 QString &errorMessage,
219 documentAxesPointsRequired);
221 Functor2wRet<const QString &, const Point &, CallbackSearchReturn> ftorWithCallback = functor_ret (ftor,
264 return m_curvesGraphs;
278 const QString &identifier)
281 <<
" posGraph=(" << posGraph.x () <<
", " << posGraph.y () <<
") identifier="
282 <<
" identifier=" << identifier.toLatin1 ().data ();
292 const QStringList &identifiers,
296 <<
" x=" << (isX ? QString::number (x).toLatin1().data() :
"")
297 <<
" y=" << (isY ? QString::number (y).toLatin1().data() :
"")
298 <<
") identifiers=" << identifiers.join(
" ").toLatin1 ().data ();
308 void CoordSystem::initializeUnsetGridRemovalFromGridDisplay (
double version)
318 if (m_modelGridRemoval.
countX () < 2 ||
319 m_modelGridRemoval.
countY () < 2 ||
320 m_modelGridRemoval.
countX () > 100 ||
321 m_modelGridRemoval.
countY () > 100) {
338 return m_curveAxes->
isXOnly (pointIdentifier);
356 const Functor2wRet<const Point &, const Point &, CallbackSearchReturn> &ftorWithCallback)
const
394 double dbl, radius = 0.0;
400 m_modelCoords.
setCoordsType(static_cast<CoordsType> (int32));
402 str >> static_cast<double &> (radius);
414 m_modelExport.
setDelimiter(static_cast<ExportDelimiter> (int32));
423 m_modelExport.
setHeader(static_cast<ExportHeader> (int32));
424 if (version >= 5.1) {
477 m_modelGridDisplay.
setCountX(
unsigned (int32));
479 m_modelGridDisplay.
setCountY(
unsigned (int32));
481 m_modelGridDisplay.
setDisableX(static_cast<GridCoordDisable> (int32));
483 m_modelGridDisplay.
setDisableY(static_cast<GridCoordDisable> (int32));
497 initializeUnsetGridRemovalFromGridDisplay (version);
506 m_modelSegments.
setLineColor(static_cast<ColorPalette> (int32));
541 m_curveAxes = curveScaleIn;
548 m_curveAxes = curveAxesIn;
554 if (m_curveAxes->
numPoints () >= documentAxesPointsRequired) {
558 resetSelectedCurveNameIfNecessary ();
569 while (!reader.atEnd() &&
570 !reader.hasError()) {
574 (tokenType == QXmlStreamReader::EndElement)) {
581 if (tokenType == QXmlStreamReader::StartElement) {
584 QString tag = reader.name().toString();
586 m_modelAxesChecker.
loadXml (reader);
588 m_modelCoords.
loadXml (reader);
591 m_curveAxes =
new Curve (reader);
593 m_curvesGraphs.
loadXml (reader);
595 m_modelDigitizeCurve.
loadXml (reader);
597 m_modelExport.
loadXml (reader);
599 m_modelGeneral.
loadXml (reader);
601 m_modelGridRemoval.
loadXml (reader);
605 m_modelPointMatch.
loadXml (reader);
607 m_modelSegments.
loadXml (reader);
609 m_successfulRead =
false;
610 m_reasonForUnsuccessfulRead = QString (
"%1 '%2' %3")
611 .arg (QObject::tr (
"Unexpected xml token"))
613 .arg (
"encountered");
619 resetSelectedCurveNameIfNecessary ();
627 while (!reader.atEnd() &&
628 !reader.hasError()) {
632 (tokenType == QXmlStreamReader::EndElement)) {
639 if (tokenType == QXmlStreamReader::StartElement) {
642 QString tag = reader.name().toString();
644 m_modelAxesChecker.
loadXml (reader);
646 m_modelCoords.
loadXml (reader);
649 m_curveAxes =
new Curve (reader);
651 m_curvesGraphs.
loadXml (reader);
653 m_modelDigitizeCurve.
loadXml (reader);
655 m_modelExport.
loadXml (reader);
657 m_modelGeneral.
loadXml (reader);
659 m_modelGridDisplay.
loadXml (reader);
661 m_modelGridRemoval.
loadXml (reader);
665 m_modelPointMatch.
loadXml (reader);
667 m_modelSegments.
loadXml (reader);
669 m_successfulRead =
false;
670 m_reasonForUnsuccessfulRead = QString (
"Unexpected xml token '%1' encountered").arg (tag);
676 resetSelectedCurveNameIfNecessary ();
681 return m_modelAxesChecker;
694 return m_modelCoords;
707 return m_modelDigitizeCurve;
712 return m_modelExport;
717 return m_modelGeneral;
722 return m_modelGridDisplay;
727 return m_modelGridRemoval;
732 return m_modelPointMatch;
737 return m_modelSegments;
741 const QPointF &deltaScreen)
755 Functor2wRet<const QString &, const Point &, CallbackSearchReturn> ftorWithCallback = functor_ret (ftor,
786 QTextStream str (&text);
790 std::cerr << text.toLatin1().data();
794 QTextStream &str)
const
796 str << indentation <<
"Graph\n";
832 return m_reasonForUnsuccessfulRead;
837 LOG4CPP_INFO_S ((*
mainCat)) <<
"CoordSystem::removePointAxis identifier=" << identifier.toLatin1 ().data ();
844 LOG4CPP_INFO_S ((*
mainCat)) <<
"CoordSystem::removePointGraph identifier=" << identifier.toLatin1 ().data ();
853 Functor2wRet<const QString &, const Point &, CallbackSearchReturn> ftorWithCallback = functor_ret (ftor,
859 void CoordSystem::resetSelectedCurveNameIfNecessary ()
861 if (m_selectedCurveName.isEmpty () ||
875 m_modelGeneral.
saveXml (writer);
876 m_modelCoords.
saveXml (writer);
877 m_modelDigitizeCurve.
saveXml (writer);
878 m_modelExport.
saveXml (writer);
879 m_modelAxesChecker.
saveXml (writer);
880 m_modelGridDisplay.
saveXml (writer);
881 m_modelGridRemoval.
saveXml (writer);
882 m_modelPointMatch.
saveXml (writer);
883 m_modelSegments.
saveXml (writer);
885 m_curvesGraphs.
saveXml (writer);
886 writer.writeEndElement();
891 return m_selectedCurveName;
909 resetSelectedCurveNameIfNecessary ();
920 ColorFilterSettingsList::const_iterator itr;
925 QString curveName = itr.key();
942 QStringList::iterator itr;
943 for (itr = curveNames.begin(); itr != curveNames.end(); itr++) {
945 QString curveName = *itr;
995 return m_successfulRead;
void iterateThroughCurvePoints(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback) const
Apply functor to Points on Curve.
static LineStyle defaultGraphCurve(int index)
Initial default for index'th graph curve.
virtual DocumentModelGridDisplay modelGridDisplay() const
Get method for DocumentModelGridDisplay.
virtual DocumentModelGeneral modelGeneral() const
Get method for DocumentModelGeneral.
void saveXml(QXmlStreamWriter &writer) const
Serialize curves.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
void setStartX(double startX)
Set method for x start.
const QString DOCUMENT_SERIALIZE_COORD_SYSTEM
const QString DOCUMENT_SERIALIZE_POINT_MATCH
const QString DOCUMENT_SERIALIZE_EXPORT
QString errorMessage() const
Error message that explains the problem indicated by isError.
void iterateThroughCurvesPoints(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
Apply functor to Points on all of the Curves.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
void loadVersions7AndUp(QXmlStreamReader &reader)
Load from file in versions 7 and 8 formats. Number of axes points is already defined at Document leve...
double stepX() const
Get method for x grid line increment.
unsigned int countY() const
Get method for y grid line count.
const QString DOCUMENT_SERIALIZE_GRID_REMOVAL
CurveStyle curveStyle(const QString &curveName) const
CurveStyle in specified curve.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
const QString AXIS_CURVE_NAME
virtual void editPointAxis(const QPointF &posGraph, const QString &identifier)
Edit the graph coordinates of a single axis point. Call this after checkAddPointAxis to guarantee suc...
void iterateThroughCurveSegments(const QString &curveNameWanted, const Functor2wRet< const Point &, const Point &, CallbackSearchReturn > &ftorWithCallback) const
Apply functor to segments on the specified axis or graph Curve.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
virtual void updatePointOrdinals(const Transformation &transformation)
Update point ordinals after point addition/removal or dragging.
void setCoordScaleXTheta(CoordScale coordScale)
Set method for linear/log scale on x/theta.
const QString DOCUMENT_SERIALIZE_CURVE
void setRemoveDefinedGridLines(bool removeDefinedGridLines)
Set method for removing defined grid lines.
Callback that is used when iterating through a read-only CurvesGraphs to add corresponding points in ...
virtual void setSelectedCurveName(const QString &selectedCurveName)
Save curve name that is selected for the current coordinate system, for the next time the coordinate ...
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
bool isError() const
True if an error occurred during iteration.
void setLineColor(ColorPalette lineColor)
Set method for line color.
void setColorFilterSettings(const ColorFilterSettings &colorFilterSettings)
Set color filter.
void setStepY(double yStep)
Set method for y grid line increment.
CoordSystem()
Single constructor.
void setCurveStyle(const CurveStyle &curveStyle)
Set curve style.
static PointStyle defaultGraphCurve(int index)
Initial default for index'th graph curve.
void removePoint(const QString &identifier)
Perform the opposite of addPointAtEnd.
void setStartY(double startY)
Set method for y start.
Manage storage and retrieval of the settings for the curves.
QString defaultCurveName(int indexOneBased, const QString &defaultName) const
Default graph name for the specified curve index.
Model for DlgSettingsGridDisplay and CmdSettingsGridDisplay.
void editPointGraph(bool isX, bool isY, double x, double y, const QStringList &identifiers, const Transformation &transformation)
Set the x and/or y coordinate values of the specified points.
DocumentAxesPointsRequired
QString errorMessage() const
Error message that explains the problem indicated by isError.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
virtual DocumentModelSegments modelSegments() const
Get method for DocumentModelSegments.
const QString DOCUMENT_SERIALIZE_GRID_DISPLAY
virtual void setModelSegments(const DocumentModelSegments &modelSegments)
Set method for DocumentModelSegments.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
const QString DOCUMENT_SERIALIZE_AXES_CHECKER
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
void loadXml(QXmlStreamReader &reader)
Load from serialized xml post-version 5 file.
virtual void iterateThroughCurveSegments(const QString &curveName, const Functor2wRet< const Point &, const Point &, CallbackSearchReturn > &ftorWithCallback) const
See Curve::iterateThroughCurveSegments, for any axes or graph curve.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
virtual DocumentModelAxesChecker modelAxesChecker() const
Get method for DocumentModelAxesChecker.
QPointF positionScreen(const QString &pointIdentifier) const
Return the position, in screen coordinates, of the specified Point.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
void setCoordScaleYRadius(CoordScale coordScale)
Set method for linear/log scale on y/radius.
QStringList curveNames() const
List of all curve names.
void setStable(bool stable)
Set method for stable flag.
const QString DOCUMENT_SERIALIZE_DOCUMENT
void setOriginRadius(double originRadius)
Set method for origin radius in polar mode.
void setStartX(double startX)
Set method for x grid line lower bound (inclusive).
virtual void setCurvesGraphs(const CurvesGraphs &curvesGraphs)
Let CmdAbstract classes overwrite CurvesGraphs. Applies to current coordinate system.
Color filter parameters for one curve. For a class, this is handled the same as LineStyle and PointSt...
void loadVersion6(QXmlStreamReader &reader, DocumentAxesPointsRequired &documentAxesPointsRequired)
Load from file in version 6 format. Number of axes points is read in and passed to Document.
Container for one set of digitized Points.
const QString DOCUMENT_SERIALIZE_COMMON
virtual const CurvesGraphs & curvesGraphs() const
Make all Curves available, read only, for CmdAbstract classes only.
void setStepX(double stepX)
Set method for x grid line increment.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
Model for DlgSettingsColorFilter and CmdSettingsColorFilter.
virtual void setModelGridDisplay(const DocumentModelGridDisplay &modelGridDisplay)
Set method for DocumentModelGridDisplay.
void setStable()
Set the stable flag to true. This public version has no argument since it cannot be undone.
virtual void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
Callback that is used when iterating through a read-only CurvesGraphs to remove corresponding points ...
void setCloseDistance(double closeDistance)
Set method for close distance.
void setMaxPointSize(double maxPointSize)
Set method for max point size.
void removePoint(const QString &pointIdentifier)
Remove the Point from its Curve.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
void setDisableX(GridCoordDisable disableX)
Set method for x grid line disabled variable.
void setModelPointMatch(const DocumentModelPointMatch &modelPointMatch)
Set method for DocumentModelPointMatch.
void editPointAxis(const QPointF &posGraph, const QString &identifier)
Edit the graph coordinates of an axis point. This method does not apply to a graph point.
virtual void setModelExport(const DocumentModelExportFormat &modelExport)
Set method for DocumentModelExportFormat.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
Container for LineStyle and PointStyle for one Curve.
virtual void loadXml(QXmlStreamReader &reader)
Load model from serialized xml.
const QString DEFAULT_GRAPH_CURVE_NAME
void setCurveName(const QString &curveName)
Change the curve name.
Model for DlgSettingsGeneral and CmdSettingsGeneral.
#define ENGAUGE_CHECK_PTR(ptr)
#endif
virtual DocumentModelPointMatch modelPointMatch() const
Get method for DocumentModelPointMatch.
double nextOrdinal() const
Computed next ordinal.
void setMinLength(double minLength)
Set method for min length.
void movePoint(const QString &pointIdentifier, const QPointF &deltaScreen)
Translate the position of a point by the specified distance vector.
Details for a specific Line.
double stopY() const
Get method for y grid line upper bound (inclusive).
void setStartY(double yStart)
Set method for y grid line lower bound (inclusive).
virtual void editPointGraph(bool isX, bool isY, double x, double y, const QStringList &identifiers, const Transformation &transformation)
Edit the graph coordinates of one or more graph points.
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
virtual void addPointsInCurvesGraphs(CurvesGraphs &curvesGraphs)
Add all points identified in the specified CurvesGraphs. See also removePointsInCurvesGraphs.
void setCoordUnitsTheta(CoordUnitsPolarTheta coordUnits)
Set method for theta units.
static ColorFilterSettings defaultFilter()
Initial default for any Curve.
virtual QStringList curvesGraphsNames() const
See CurvesGraphs::curvesGraphsNames.
const QString DOCUMENT_SERIALIZE_IMAGE
virtual DocumentModelExportFormat modelExport() const
Get method for DocumentModelExportFormat.
int numPoints() const
Number of points.
void iterateThroughCurveSegments(const Functor2wRet< const Point &, const Point &, CallbackSearchReturn > &ftorWithCallback) const
Apply functor to successive Points, as line segments, on Curve. This could be a bit slow.
virtual Curve * curveForCurveName(const QString &curveName)
See CurvesGraphs::curveForCurveName, although this also works for AXIS_CURVE_NAME.
#define LOG4CPP_INFO_S(logger)
QStringList curvesGraphsNames() const
List of graph curve names.
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
virtual void removePointAxis(const QString &identifier)
Perform the opposite of addPointAxis.
double stepY() const
Get method for y grid line increment.
virtual QPointF positionScreen(const QString &pointIdentifier) const
See Curve::positionScreen.
double startX() const
Get method for x grid line lower bound (inclusive).
bool isXOnly(const QString &pointIdentifier) const
Return true if y coordinate is undefined, otherwise x coordinae is undefined in DOCUMENT_AXES_POINT_R...
void setPaletteColorCandidate(ColorPalette paletteColorCandidate)
Set method for candidate color.
virtual void print() const
Debugging method for printing directly from symbolic debugger.
void addPoint(const Point &point)
Add Point to this Curve.
const QString DOCUMENT_SERIALIZE_GENERAL
void setStepY(double stepY)
Set method for y step.
virtual void setModelCurveStyles(const CurveStyles &modelCurveStyles)
Set method for CurveStyles.
virtual void movePoint(const QString &pointIdentifier, const QPointF &deltaScreen)
See Curve::movePoint.
int curvesGraphsNumPoints(const QString &curveName) const
Point count.
virtual DocumentModelDigitizeCurve modelDigitizeCurve() const
Get method for DocumentModelDigitizeCurve.
virtual int nextOrdinalForCurve(const QString &curveName) const
Default next ordinal value for specified curve.
virtual DocumentModelCoords modelCoords() const
Get method for DocumentModelCoords.
virtual CurveStyles modelCurveStyles() const
Get method for CurveStyles.
void setCoordUnitsRadius(CoordUnitsNonPolarTheta coordUnits)
Set method for radius units.
void setStopX(double stopX)
Set method for x grid line upper bound (inclusive).
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
QString identifier() const
Unique identifier for a specific Point.
Model for DlgSettingsSegments and CmdSettingsSegments.
virtual void setModelGridRemoval(const DocumentModelGridRemoval &modelGridRemoval)
Set method for DocumentModelGridRemoval.
virtual const Curve & curveAxes() const
Get method for axis curve.
void loadPreVersion6(QDataStream &str)
Load from serialized binary pre-version 6 file.
void addPoint(const Point &point)
Append new Point to the specified Curve.
Container for all graph curves. The axes point curve is external to this class.
bool isError() const
True if an error occurred during iteration.
int countY() const
Get method for y count.
virtual void setCurveAxes(const Curve &curveAxes)
Let CmdAbstract classes overwrite axes Curve. Applies to current coordinate system.
void setCoordsType(CoordsType coordsType)
Set method for coordinates type.
virtual void addPointAxisWithSpecifiedIdentifier(const QPointF &posScreen, const QPointF &posGraph, const QString &identifier, double ordinal, bool isXOnly)
Add a single axis point with the specified point identifier.
log4cpp::Category * mainCat
virtual void addPointGraphWithGeneratedIdentifier(const QString &curveName, const QPointF &posScreen, QString &generatedIentifier, double ordinal)
Add a single graph point with a generated point identifier.
virtual void iterateThroughCurvePointsAxes(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for the axes curve.
virtual void saveXml(QXmlStreamWriter &writer) const
Save graph to xml.
virtual void setModelColorFilter(const DocumentModelColorFilter &modelColorFilter)
Set method for DocumentModelColorFilter.
virtual void setModelCoords(const DocumentModelCoords &modelCoords)
Set method for DocumentModelCoords.
virtual void setModelGeneral(const DocumentModelGeneral &modelGeneral)
Set method for DocumentModelGeneral.
void setLineWidth(double lineWidth)
Set method for line width.
Model for DlgSettingsDigitizeCurve and CmdSettingsDigitizeCurve.
virtual void removePointGraph(const QString &identifier)
Perform the opposite of addPointGraph.
Model for DlgSettingsPointMatch and CmdSettingsPointMatch.
Details for a specific Point.
virtual QString selectedCurveName() const
Currently selected curve name. This is used to set the selected curve combobox in MainWindow.
void setStepX(double stepX)
Set method for x step.
bool isXOnly(const QString &pointIdentifier) const
Determine if specified point has just x coordinate. Otherwise has just y coordinate,...
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
const QString DOCUMENT_SERIALIZE_COORDS
double stopX() const
Get method for x grid line upper bound (inclusive).
Model for DlgSettingsAxesChecker and CmdSettingsAxesChecker.
void setStopY(double yStop)
Set method for y grid line upper bound (inclusive).
Curve * curveForCurveName(const QString &curveName)
Return the axis or graph curve for the specified curve name.
const QString INDENTATION_DELTA
Class that represents one digitized point. The screen-to-graph coordinate transformation is always ex...
int numCurves() const
Current number of graphs curves.
virtual void removePointsInCurvesGraphs(CurvesGraphs &curvesGraphs)
Remove all points identified in the specified CurvesGraphs. See also addPointsInCurvesGraphs.
const QString DOCUMENT_SERIALIZE_CURVES_GRAPHS
void updatePointOrdinals(const Transformation &transformation)
Update point ordinals to be consistent with their CurveStyle and x/theta coordinate.
virtual QPointF positionGraph(const QString &pointIdentifier) const
See Curve::positionGraph.
void addGraphCurveAtEnd(const Curve &curve)
Append new graph Curve to end of Curve list.
QPointF positionGraph(const QString &pointIdentifier) const
Return the position, in graph coordinates, of the specified Point.
virtual DocumentModelColorFilter modelColorFilter() const
Get method for DocumentModelColorFilter.
void setPointSeparation(double pointSeparation)
Set method for point separation.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
virtual void checkEditPointAxis(const QString &pointIdentifier, const QPointF &posScreen, const QPointF &posGraph, bool &isError, QString &errorMessage, DocumentAxesPointsRequired documentAxesPointsRequired)
Check before calling editPointAxis.
virtual void setModelDigitizeCurve(const DocumentModelDigitizeCurve &modelDigitizeCurve)
Set method for DocumentModelDigitizeCurve.
void setCountX(int countX)
Set method for x count.
Model for DlgSettingsGridRemoval and CmdSettingsGridRemoval. The settings are unstable until the user...
void setCountY(int countY)
Set method for y count.
Callback for sanity checking the screen and graph coordinates of an axis point that is in the axes cu...
void setDisableY(GridCoordDisable disableY)
Set method for y grid line disabled variable.
Model for DlgSettingsCurveProperties and CmdSettingsCurveProperties.
void setStopX(double stopX)
Set method for x stop.
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
double startY() const
Get method for y grid line lower bound (inclusive).
Model for DlgSettingsCoords and CmdSettingsCoords.
const QString DOCUMENT_SERIALIZE_SEGMENTS
const QString DOCUMENT_SERIALIZE_DIGITIZE_CURVE
virtual DocumentModelGridRemoval modelGridRemoval() const
Get method for DocumentModelGridRemoval.
CoordsType coordsType() const
Get method for coordinates type.
QString QPointFToString(const QPointF &pos)
virtual bool loadCurvesFile(const QString &curvesFile)
Load the curve names in the specified Engauge file into the current graph. This is called near the en...
void setGridCoordDisableY(GridCoordDisable gridCoordDisable)
Set method for y coord parameter to disable.
void setStopY(double stopY)
Set method for y stop.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
virtual void addPointAxisWithGeneratedIdentifier(const QPointF &posScreen, const QPointF &posGraph, QString &identifier, double ordinal, bool isXOnly)
Add a single axis point with a generated point identifier.
void setCountX(unsigned int countX)
Set method for x grid line count.
QXmlStreamReader::TokenType loadNextFromReader(QXmlStreamReader &reader)
Load next token from xml reader.
const ColorFilterSettingsList & colorFilterSettingsList() const
Get method for copying all color filters in one step.
void setCountY(unsigned int countY)
Set method for y grid line count.
#define ENGAUGE_ASSERT(cond)
Drop in replacement for Q_ASSERT if defined(QT_NO_DEBUG) && !defined(QT_FORCE_ASSERTS) define ENGAUGE...
void loadPreVersion6(QDataStream &str, double version, DocumentAxesPointsRequired &documentAxesPointsRequired)
Load from file in pre-version 6 format. Number of axes points is read in and passed to Document.
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
virtual QString reasonForUnsuccessfulRead() const
Return an informative text message explaining why startup loading failed. Applies if successfulRead r...
virtual void setModelAxesChecker(const DocumentModelAxesChecker &modelAxesChecker)
Set method for DocumentModelAxesChecker.
virtual void iterateThroughCurvesPointsGraphs(const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback)
See Curve::iterateThroughCurvePoints, for all the graphs curves.
void setPaletteColorAccepted(ColorPalette paletteColorAccepted)
Set method for accepted color.
int numberOfCurvesForImport() const
Return the number of curve names to be generated. Value is maximum of 1 and the number in the configu...
Callback for sanity checking the screen and graph coordinates of an axis point, before it is added to...
void printStream(QString indentation, QTextStream &str) const
Debugging method that supports print method of this class and printStream method of some other class(...
unsigned int countX() const
Get method for x grid line count.
virtual int curvesGraphsNumPoints(const QString &curveName) const
See CurvesGraphs::curvesGraphsNumPoints.
virtual bool successfulRead() const
Return true if startup loading succeeded. If the loading failed then reasonForUnsuccessfulRed will ex...
virtual void addGraphCurveAtEnd(const QString &curveName)
Add new graph curve to the list of existing graph curves.
virtual void checkAddPointAxis(const QPointF &posScreen, const QPointF &posGraph, bool &isError, QString &errorMessage, bool isXOnly, DocumentAxesPointsRequired documentAxesPointsRequired)
Check before calling addPointAxis. Also returns the next available ordinal number (to prevent clashes...
void setPaletteColorRejected(ColorPalette paletteColorRejected)
Set method for rejected color.
static QString curveNameFromPointIdentifier(const QString &pointIdentifier)
Parse the curve name from the specified point identifier. This does the opposite of uniqueIdentifierG...
int countX() const
Get method for x count.
void setGridCoordDisableX(GridCoordDisable gridCoordDisable)
Set method for x coord parameter to disable.
virtual void saveXml(QXmlStreamWriter &writer) const
Save entire model as xml into stream.
void saveXml(QXmlStreamWriter &writer) const
Serialize curve.
Callback for computing the next ordinal for a new point.
virtual void addPointGraphWithSpecifiedIdentifier(const QString &curveName, const QPointF &posScreen, const QString &identifier, double ordinal)
Add a single graph point with the specified point identifer. Note that PointStyle is not applied to t...