7 #include "CmdAbstract.h" 8 #include "CmdAddPointAxis.h" 9 #include "CmdAddPointGraph.h" 10 #include "CmdAddPointsGraph.h" 13 #include "CmdDelete.h" 14 #include "CmdEditPointAxis.h" 15 #include "CmdEditPointGraph.h" 16 #include "CmdFactory.h" 17 #include "CmdMoveBy.h" 18 #include "CmdRedoForTest.h" 19 #include "CmdSelectCoordSystem.h" 20 #include "CmdSettingsAxesChecker.h" 21 #include "CmdSettingsColorFilter.h" 22 #include "CmdSettingsCoords.h" 23 #include "CmdSettingsCurveAddRemove.h" 24 #include "CmdSettingsCurveProperties.h" 25 #include "CmdSettingsDigitizeCurve.h" 26 #include "CmdSettingsExportFormat.h" 27 #include "CmdSettingsGeneral.h" 28 #include "CmdSettingsGridRemoval.h" 29 #include "CmdSettingsPointMatch.h" 30 #include "CmdSettingsSegments.h" 31 #include "CmdUndoForTest.h" 33 #include "DocumentSerialize.h" 34 #include "EngaugeAssert.h" 35 #include "MainWindow.h" 36 #include <QXmlStreamReader> 44 QXmlStreamReader &reader)
48 QXmlStreamAttributes attributes = reader.attributes();
49 if (!attributes.hasAttribute(DOCUMENT_SERIALIZE_CMD_TYPE) ||
50 !attributes.hasAttribute(DOCUMENT_SERIALIZE_CMD_DESCRIPTION)) {
53 ENGAUGE_ASSERT(
false);
58 QString cmdType = attributes.value(DOCUMENT_SERIALIZE_CMD_TYPE).toString();
59 QString cmdDescription = attributes.value(DOCUMENT_SERIALIZE_CMD_DESCRIPTION).toString();
61 if (cmdType == DOCUMENT_SERIALIZE_CMD_ADD_POINT_AXIS) {
66 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_ADD_POINT_GRAPH) {
71 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_ADD_POINTS_GRAPH) {
76 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_COPY) {
81 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_CUT) {
82 cmd =
new CmdCut (mainWindow,
86 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_DELETE) {
91 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_EDIT_POINT_AXIS) {
96 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_EDIT_POINT_GRAPH) {
101 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_MOVE_BY) {
106 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_REDO_FOR_TEST) {
111 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_SELECT_COORD_SYSTEM) {
116 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_SETTINGS_AXES_CHECKER) {
121 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_SETTINGS_COLOR_FILTER) {
126 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_SETTINGS_COORDS) {
131 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_SETTINGS_CURVE_ADD_REMOVE) {
136 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_SETTINGS_CURVE_PROPERTIES) {
141 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_SETTINGS_DIGITIZE_CURVE) {
146 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_SETTINGS_EXPORT) {
151 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_SETTINGS_GENERAL) {
156 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_SETTINGS_GRID_REMOVAL) {
161 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_SETTINGS_POINT_MATCH) {
166 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_SETTINGS_SEGMENTS) {
171 }
else if (cmdType == DOCUMENT_SERIALIZE_CMD_UNDO_FOR_TEST) {
179 ENGAUGE_ASSERT (
false);
Command for cutting all selected Points.
Wrapper around QUndoCommand. This simplifies the more complicated feature set of QUndoCommand.
Command for performing Undo during testing.
CmdFactory()
Single constructor.
Command for editing the graph coordinates of one or more graph points.
Command for performing Redo during testing.
Command for moving all selected Points by a specified translation.
Command for DlgSettingsCurveProperties.
Command for DlgSettingsCurveAddRemove.
Command for DlgSettingsPointMatch.
Command for DlgSettingsGeneral.
Command for DlgSettingsCoords.
Command for DlgSettingsAxesChecker.
Command for adding one axis point.
Command for adding one or more graph points. This is for Segment Fill mode.
Command for adding one graph point.
Storage of one imported image and the data attached to that image.
Command for deleting all selected Points.
Command for DlgSettingsGridRemoval.
Command for DlgSettingsColorFilter.
Command for DlgSettingsSegments.
Command for DlgSettingsDigitizeCurve.
Command for editing the graph coordinates one axis point.
Command for moving all selected Points by a specified translation.
Command for changing the currently selected CoordSystem.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
CmdAbstract * createCmd(MainWindow &mainWindow, Document &document, QXmlStreamReader &reader)
Factory method. Input is the xml node from an error report file.