Factory method. Input is the xml node from an error report file.
53{
54 CmdAbstract *cmd = nullptr;
55
56 QXmlStreamAttributes attributes = reader.attributes();
59
60
64
65 }
66
67
70
73 document,
74 cmdDescription,
75 reader);
78 document,
79 cmdDescription,
80 reader);
83 document,
84 cmdDescription,
85 reader);
88 document,
89 cmdDescription,
90 reader);
92 cmd =
new CmdCut (mainWindow,
93 document,
94 cmdDescription,
95 reader);
98 document,
99 cmdDescription,
100 reader);
103 document,
104 cmdDescription,
105 reader);
108 document,
109 cmdDescription,
110 reader);
113 document,
114 cmdDescription,
115 reader);
118 document,
119 cmdDescription,
120 reader);
123 document,
124 cmdDescription,
125 reader);
128 document,
129 cmdDescription,
130 reader);
133 document,
134 cmdDescription,
135 reader);
138 document,
139 cmdDescription,
140 reader);
143 document,
144 cmdDescription,
145 reader);
148 document,
149 cmdDescription,
150 reader);
153 document,
154 cmdDescription,
155 reader);
158 document,
159 cmdDescription,
160 reader);
163 document,
164 cmdDescription,
165 reader);
168 document,
169 cmdDescription,
170 reader);
173 document,
174 cmdDescription,
175 reader);
178 document,
179 cmdDescription,
180 reader);
183 document,
184 cmdDescription,
185 reader);
188 document,
189 cmdDescription,
190 reader);
193 document,
194 cmdDescription,
195 reader);
198 document,
199 cmdDescription,
200 reader);
203 document,
204 cmdDescription,
205 reader);
208 document,
209 cmdDescription,
210 reader);
213 document,
214 cmdDescription,
215 reader);
218 document,
219 cmdDescription,
220 reader);
221 } else {
222
223
224 qCCritical(ENGAUGE_LOG) << "CmdFactory::createCmd invalid command type " << cmdType.toLatin1().data();
226
227 }
228
229 return cmd;
230}
const QString DOCUMENT_SERIALIZE_CMD_ADD_POINT_AXIS
const QString DOCUMENT_SERIALIZE_CMD_MOVE_BY
const QString DOCUMENT_SERIALIZE_CMD_REDO_FOR_TEST
const QString DOCUMENT_SERIALIZE_CMD_SETTINGS_CURVE_LIST
const QString DOCUMENT_SERIALIZE_CMD_SETTINGS_CURVE_PROPERTIES
const QString DOCUMENT_SERIALIZE_CMD_SETTINGS_GRID_REMOVAL
const QString DOCUMENT_SERIALIZE_CMD_ADD_POINTS_GRAPH
const QString DOCUMENT_SERIALIZE_CMD_ADD_POINT_GRAPH
const QString DOCUMENT_SERIALIZE_CMD_GUIDELINE_REMOVE_Y_R
const QString DOCUMENT_SERIALIZE_CMD_GONG
const QString DOCUMENT_SERIALIZE_CMD_GUIDELINE_MOVE_Y_R
const QString DOCUMENT_SERIALIZE_CMD_SETTINGS_SEGMENTS
const QString DOCUMENT_SERIALIZE_CMD_SETTINGS_POINT_MATCH
const QString DOCUMENT_SERIALIZE_CMD_GUIDELINE_MOVE_X_T
const QString DOCUMENT_SERIALIZE_CMD_GUIDELINE_ADD_X_T
const QString DOCUMENT_SERIALIZE_CMD_GUIDELINE_ADD_Y_R
const QString DOCUMENT_SERIALIZE_CMD_SETTINGS_COLOR_FILTER
const QString DOCUMENT_SERIALIZE_CMD_UNDO_FOR_TEST
const QString DOCUMENT_SERIALIZE_CMD_TYPE
const QString DOCUMENT_SERIALIZE_CMD_SETTINGS_GENERAL
const QString DOCUMENT_SERIALIZE_CMD_CUT
const QString DOCUMENT_SERIALIZE_CMD_SETTINGS_DIGITIZE_CURVE
const QString DOCUMENT_SERIALIZE_CMD_DELETE
const QString DOCUMENT_SERIALIZE_CMD_GUIDELINE_REMOVE_X_T
const QString DOCUMENT_SERIALIZE_CMD_EDIT_POINT_AXIS
const QString DOCUMENT_SERIALIZE_CMD_EDIT_POINT_GRAPH
const QString DOCUMENT_SERIALIZE_CMD_SETTINGS_COORDS
const QString DOCUMENT_SERIALIZE_CMD_SETTINGS_AXES_CHECKER
const QString DOCUMENT_SERIALIZE_CMD_DESCRIPTION
const QString DOCUMENT_SERIALIZE_CMD_SETTINGS_EXPORT
const QString DOCUMENT_SERIALIZE_CMD_COPY
const QString DOCUMENT_SERIALIZE_CMD_SELECT_COORD_SYSTEM
#define ENGAUGE_ASSERT(cond)
Drop in replacement for Q_ASSERT.
CmdAddPointAxis(MainWindow &mainWindow, Document &document, const QPointF &posScreen, const QPointF &posGraph, double ordinal, bool isXOnly)
Constructor for normal creation.
CmdAddPointGraph(MainWindow &mainWindow, Document &document, const QString &curveName, const QPointF &posScreen, double ordinal)
Constructor for normal creation.
CmdAddPointsGraph(MainWindow &mainWindow, Document &document, const QString &curveName, const QList< QPoint > &points, const QList< double > &ordinals)
Constructor for normal creation.
CmdCopy(MainWindow &mainWindow, Document &document, const QStringList &selectedPointIdentifiers)
Constructor for normal creation.
CmdCut(MainWindow &mainWindow, Document &document, const QStringList &selectedPointIdentifiers)
Constructor for normal creation.
CmdDelete(MainWindow &mainWindow, Document &document, const QStringList &selectedPointIdentifiers)
Constructor for normal creation.
CmdEditPointAxis(MainWindow &mainWindow, Document &document, const QString &pointIdentifier, const QPointF &posGraphBefore, const QPointF &posGraphAfter, bool isXOnly)
Constructor for normal creation.
CmdEditPointGraph(MainWindow &mainWindow, Document &document, const QStringList &pointIdentifiers, bool isX, bool isY, double x, double y)
Constructor for normal creation.
CmdGong(MainWindow &mainWindow, Document &document)
Constructor for normal creation.
CmdGuidelineAddXT(MainWindow &mainWindow, Document &document, double value)
Constructor for normal creation.
CmdGuidelineAddYR(MainWindow &mainWindow, Document &document, double value)
Constructor for normal creation.
CmdGuidelineMoveXT(MainWindow &mainWindow, Document &document, const QString &identifier, double valueBefore, double valueAfter)
Constructor for normal creation.
CmdGuidelineMoveYR(MainWindow &mainWindow, Document &document, const QString &identifier, double valueBefore, double valueAfter)
Constructor for normal creation.
CmdGuidelineRemoveXT(MainWindow &mainWindow, Document &document, const QString &identifier, double valueBefore)
Constructor for normal creation.
CmdGuidelineRemoveYR(MainWindow &mainWindow, Document &document, const QString &identifier, double oldBefore)
Constructor for normal creation.
CmdMoveBy(MainWindow &mainWindow, Document &document, const QPointF &deltaScreen, const QString &moveText, const QStringList &selectedPointIdentifiers)
Constructor for normal creation.
CmdRedoForTest(MainWindow &mainWindow, Document &document)
Constructor for normal creation.
CmdSelectCoordSystem(MainWindow &mainWindow, Document &document, CoordSystemIndex coordSystem)
Constructor for normal creation.
CmdSettingsAxesChecker(MainWindow &mainWindow, Document &document, const DocumentModelAxesChecker &modelAxesCheckerBefore, const DocumentModelAxesChecker &modelAxesCheckerAfter)
Constructor for normal creation.
CmdSettingsColorFilter(MainWindow &mainWindow, Document &document, const DocumentModelColorFilter &modelColorFilterBefore, const DocumentModelColorFilter &modelColorFilterAfter)
Constructor for normal creation.
CmdSettingsCoords(MainWindow &mainWindow, Document &document, const DocumentModelCoords &modelCoordsBefore, const DocumentModelCoords &modelCoordsAfter)
Constructor for normal creation.
CmdSettingsCurveList(MainWindow &mainWindow, Document &document, const CurveNameList &modelCurves)
Constructor for normal creation.
CmdSettingsCurveProperties(MainWindow &mainWindow, Document &document, const CurveStyles &modelCurveStylesBefore, const CurveStyles &modelCurveStylesAfter)
Constructor for normal creation.
CmdSettingsDigitizeCurve(MainWindow &mainWindow, Document &document, const DocumentModelDigitizeCurve &modelDigitizeCurveBefore, const DocumentModelDigitizeCurve &modelDigitizeCurveAfter)
Constructor for normal creation.
CmdSettingsGeneral(MainWindow &mainWindow, Document &document, const DocumentModelGeneral &modelGeneralBefore, const DocumentModelGeneral &modelGeneralAfter)
Constructor for normal creation.
CmdSettingsGridRemoval(MainWindow &mainWindow, Document &document, const DocumentModelGridRemoval &modelGridRemovalBefore, const DocumentModelGridRemoval &modelGridRemovalAfter)
Constructor for normal creation.
CmdSettingsPointMatch(MainWindow &mainWindow, Document &document, const DocumentModelPointMatch &modelPointMatchBefore, const DocumentModelPointMatch &modelPointMatchAfter)
Constructor for normal creation.
CmdSettingsSegments(MainWindow &mainWindow, Document &document, const DocumentModelSegments &modelSegmentsBefore, const DocumentModelSegments &modelSegmentsAfter)
Constructor for normal creation.
CmdUndoForTest(MainWindow &mainWindow, Document &document)
Constructor for normal creation.