4 #include "BackgroundImage.h"
5 #include "DigitizeStateAbstractBase.h"
9 #include "Transformation.h"
47 class QGraphicsLineItem;
90 const char *context)
const;
167 void slotCanRedoChanged (
bool);
168 void slotCanUndoChanged (
bool);
169 void slotChecklistClosed ();
170 void slotCleanChanged (
bool);
171 void slotCmbBackground(
int);
172 void slotCmbCurve(
int);
173 void slotContextMenuEvent (QString);
174 void slotDigitizeAxis ();
175 void slotDigitizeColorPicker ();
176 void slotDigitizeCurve ();
177 void slotDigitizePointMatch ();
178 void slotDigitizeSegment ();
179 void slotDigitizeSelect ();
180 void slotEditCopy ();
182 void slotEditDelete ();
183 void slotEditPaste ();
184 void slotFileClose ();
185 void slotFileExport ();
186 void slotFileImport();
187 void slotFileImportDraggedImage(QImage);
188 void slotFileImportDraggedImageUrl(QUrl);
189 void slotFileImportImage(QString, QImage);
191 void slotFilePrint();
193 bool slotFileSaveAs();
194 void slotHelpAbout();
195 void slotHelpTutorial();
196 void slotKeyPress (Qt::Key,
bool);
198 void slotMouseMove (QPointF);
199 void slotMousePress (QPointF);
200 void slotMouseRelease (QPointF);
201 void slotRecentFileAction ();
202 void slotRedoTextChanged (
const QString &);
203 void slotSetOverrideCursor (QCursor);
204 void slotSettingsAxesChecker ();
205 void slotSettingsColorFilter ();
206 void slotSettingsCommon ();
207 void slotSettingsCoords ();
208 void slotSettingsCurveAddRemove ();
209 void slotSettingsCurveProperties ();
210 void slotSettingsDigitizeCurve ();
211 void slotSettingsExportFormat ();
212 void slotSettingsGridRemoval ();
213 void slotSettingsPointMatch ();
214 void slotSettingsSegments ();
215 void slotUndoTextChanged (
const QString &);
216 void slotViewGroupBackground(QAction*);
217 void slotViewGroupCurves(QAction*);
218 void slotViewGroupStatus(QAction*);
219 void slotViewToolBarBackground ();
220 void slotViewToolBarDigitize ();
221 void slotViewToolBarChecklistGuide ();
222 void slotViewToolBarSettingsViews ();
223 void slotViewToolTips ();
224 void slotViewZoom16To1 ();
225 void slotViewZoom8To1 ();
226 void slotViewZoom4To1 ();
227 void slotViewZoom2To1 ();
228 void slotViewZoom1To1 ();
229 void slotViewZoom1To2 ();
230 void slotViewZoom1To4 ();
231 void slotViewZoom1To8 ();
232 void slotViewZoom1To16 ();
233 void slotViewZoom (
int);
234 void slotViewZoomFill ();
235 void slotViewZoomIn ();
236 void slotViewZoomOut ();
245 virtual void closeEvent(QCloseEvent *event);
246 void createActions();
247 void createActionsDigitize ();
248 void createActionsEdit ();
249 void createActionsFile ();
250 void createActionsHelp ();
251 void createActionsSettings ();
252 void createActionsView ();
253 void createCentralWidget ();
254 void createCommandStackShadow ();
255 void createHelpWindow ();
257 void createLoadImageFromUrl ();
259 void createNetwork();
261 void createSettingsDialogs ();
262 void createStateContextBackground();
263 void createStateContextDigitize();
264 void createStateContextTransformation();
265 void createStatusBar();
266 void createToolBars();
267 void createTutorial();
268 void fileImport (
const QString &fileName);
269 void loadCurveListFromCmdMediator();
270 void loadDocumentFile (
const QString &fileName);
271 void loadErrorReportFile(
const QString &initialPath,
272 const QString &errorReportFile);
273 void loadImage (
const QString &fileName,
274 const QImage &image);
275 void loadInputFileForErrorReport(QDomDocument &domInputFile)
const;
276 void loadToolTips ();
278 void rebuildRecentFileListForCurrentFile(
const QString &filePath);
279 bool saveDocumentFile(
const QString &fileName);
280 QString saveErrorReportFileAndExitXml (
const char *comment,
284 bool includeDocument)
const;
285 void saveStartingDocumentSnapshot();
286 void setCurrentFile(
const QString &fileName);
287 void setCurrentPathFromFile (
const QString &fileName);
288 void setPixmap (
const QPixmap &pixmap);
289 void settingsRead ();
290 void settingsReadEnvironment (QSettings &settings);
291 void settingsReadMainWindow (QSettings &settings);
292 void settingsWrite ();
293 void setupAfterLoad (
const QString &fileName,
294 const QString &temporaryMessage);
295 void updateAfterCommandStatusBarCoords ();
296 void updateControls ();
297 void updateRecentFileList();
298 void updateTransformationAndItsDependencies();
299 void updateViewedCurves ();
300 void updateViewsOfSettings ();
301 void writeCheckpointToLogFile();
303 QString m_originalFile;
304 bool m_originalFileWasImported;
305 bool m_isDocumentExported;
306 QString m_engaugeFile;
307 QString m_currentFile;
310 QAction *m_actionImport;
311 QAction *m_actionOpen;
312 QMenu *m_menuFileOpenRecent;
313 QList<QAction*> m_actionRecentFiles;
314 QAction *m_actionClose;
315 QAction *m_actionSave;
316 QAction *m_actionSaveAs;
317 QAction *m_actionExport;
318 QAction *m_actionPrint;
319 QAction *m_actionExit;
322 QAction *m_actionEditUndo;
323 QAction *m_actionEditRedo;
324 QAction *m_actionEditCut;
325 QAction *m_actionEditCopy;
326 QAction *m_actionEditPaste;
327 QAction *m_actionEditDelete;
329 QMenu *m_menuDigitize;
330 QActionGroup *m_groupDigitize;
331 QAction *m_actionDigitizeSelect;
332 QAction *m_actionDigitizeAxis;
333 QAction *m_actionDigitizeCurve;
334 QAction *m_actionDigitizePointMatch;
335 QAction *m_actionDigitizeColorPicker;
336 QAction *m_actionDigitizeSegment;
339 QAction *m_actionViewBackground;
340 QAction *m_actionViewChecklistGuide;
341 QAction *m_actionViewDigitize;
342 QAction *m_actionViewSettingsViews;
343 QAction *m_actionViewToolTips;
344 QMenu *m_menuViewBackground;
345 QActionGroup *m_groupBackground;
346 QAction *m_actionViewBackgroundNone;
347 QAction *m_actionViewBackgroundOriginal;
348 QAction *m_actionViewBackgroundFiltered;
349 QMenu *m_menuViewCurves;
350 QActionGroup *m_groupCurves;
351 QAction *m_actionViewCurvesNone;
352 QAction *m_actionViewCurvesSelected;
353 QAction *m_actionViewCurvesAll;
354 QMenu *m_menuViewStatus;
355 QActionGroup *m_groupStatus;
356 QAction *m_actionStatusNever;
357 QAction *m_actionStatusTemporary;
358 QAction *m_actionStatusAlways;
359 QMenu *m_menuViewZoom;
360 QAction *m_actionZoomOut;
361 QAction *m_actionZoomIn;
362 QActionGroup *m_groupZoom;
363 QAction *m_actionZoomFill;
364 QAction *m_actionZoom16To1;
365 QAction *m_actionZoom8To1;
366 QAction *m_actionZoom4To1;
367 QAction *m_actionZoom2To1;
368 QAction *m_actionZoom1To1;
369 QAction *m_actionZoom1To2;
370 QAction *m_actionZoom1To4;
371 QAction *m_actionZoom1To8;
372 QAction *m_actionZoom1To16;
374 QMenu *m_menuSettings;
375 QAction *m_actionSettingsAxesChecker;
376 QAction *m_actionSettingsColorFilter;
377 QAction *m_actionSettingsCommon;
378 QAction *m_actionSettingsCoords;
379 QAction *m_actionSettingsCurveAddRemove;
380 QAction *m_actionSettingsCurveProperties;
381 QAction *m_actionSettingsDigitizeCurve;
382 QAction *m_actionSettingsExport;
383 QAction *m_actionSettingsGridRemoval;
384 QAction *m_actionSettingsPointMatch;
385 QAction *m_actionSettingsSegments;
388 QAction *m_actionHelpAbout;
389 QAction *m_actionHelpChecklistGuideWizard;
390 QAction *m_actionHelpHelp;
391 QAction *m_actionHelpTutorial;
392 QAction *m_actionHelpWhatsThis;
394 QVBoxLayout *m_layout;
401 QComboBox *m_cmbCurve;
402 QToolBar *m_toolDigitize;
405 QComboBox *m_cmbBackground;
406 QToolBar *m_toolBackground;
410 QToolBar *m_toolSettingsViews;
441 QString m_startingDocumentSnapshot;
447 #endif // MAIN_WINDOW_H
Model for DlgSettingsPointMatch and CmdSettingsPointMatch.
void updateDigitizeStateIfSoftwareTriggered(DigitizeState digitizeState)
After software-triggered state transition, this method manually triggers the action as if user had cl...
Class that displays the current Segment Filter in a MainWindow toolbar.
Dialog for editing Segments settings, for DigitizeStateSegment.
Dialog for editing point match settings, for DigitizeStatePointMatch.
Dialog for editing axes checker settings.
Transformation transformation() const
Return read-only copy of transformation.
Context class for transformation state machine.
Model for DlgSettingsCurveProperties and CmdSettingsCurveProperties.
void updateSettingsCurveAddRemove(const CurvesGraphs &curvesGraphs)
Update with new curves.
void updateSettingsCommon(const DocumentModelCommon &modelCommon)
Update with new common properties.
void updateAfterMouseRelease()
Call MainWindow::updateControls (which is private) after the very specific case - a mouse press/relea...
Model for DlgSettingsCommon and CmdSettingsCommon.
void updateViewsOfSettings(const QString &activeCurve)
Update curve-specific view of settings. Private version gets active curve name from DigitizeStateCont...
QString selectedGraphCurve() const
Curve name that is currently selected in m_cmbCurve.
CmdMediator & cmdMediator()
Accessor for commands to process the Document.
BackgroundImage selectOriginal(BackgroundImage backgroundImage)
Make original background visible, for DigitizeStateColorPicker.
Dialog for editing grid removal settings.
void showTemporaryMessage(const QString &temporaryMessage)
Show temporary message in status bar.
Dialog for editing curve names settings.
void updateSettingsDigitizeCurve(const DocumentModelDigitizeCurve &modelDigitizeCurve)
Update with new curve digitization styles.
Tutorial using a strategy like a comic strip with decision points deciding which panels appear...
Dockable text window containing checklist guide.
Model for DlgSettingsDigitizeCurve and CmdSettingsDigitizeCurve.
GraphicsView & view()
View for the QImage and QGraphicsItems, without const.
Dialog for editing filtering settings.
Container for all graph curves. The axes point curve is external to this class.
Model for DlgSettingsColorFilter and CmdSettingsColorFilter.
Wrapper around QStatusBar to manage permanent widgets.
GraphicsScene & scene()
Scene container for the QImage and QGraphicsItems.
void updateSettingsCurveStyles(const CurveStyles &modelCurveStyles)
Update with new curve styles.
Client for interacting with Engauge server.
Context class that manages the background image state machine.
QGraphicsView class with event handling added. Typically the events are sent to the active digitizing...
Container for all DigitizeStateAbstractBase subclasses. This functions as the context class in a stan...
Model for DlgSettingsCoords and CmdSettingsCoords.
void updateAfterCommand()
See GraphicsScene::updateAfterCommand.
void updateSettingsColorFilter(const DocumentModelColorFilter &modelColorFilter)
Update with new color filter properties.
Dialog for editing DigitizeStateCurve settings.
void updateSettingsAxesChecker(const DocumentModelAxesChecker &modelAxesChecker)
Update with new axes indicator properties.
void updateSettingsPointMatch(const DocumentModelPointMatch &modelPointMatch)
Update with new point match properties.
QImage imageFiltered() const
Background image that has been filtered for the current curve. This asserts if a curve-specific image...
void updateSettingsGridRemoval(const DocumentModelGridRemoval &modelGridRemoval)
Update with new grid removal properties.
Class that displays a view of the current Curve's point style.
Model for DlgSettingsAxesChecker and CmdSettingsAxesChecker.
Command stack that shadows the CmdMediator command stack at startup when reading commands from an err...
void updateSettingsExportFormat(const DocumentModelExportFormat &modelExport)
Update with new export properties.
Dialog for editing coordinates settings.
Load QImage from url. This is trivial for a file, but requires an asynchronous download step for http...
virtual bool eventFilter(QObject *, QEvent *)
Catch secret keypresses.
bool isGnuplot() const
Get method for gnuplot flag.
Dialog for editing curve properties settings.
void saveErrorReportFileAndExit(const char *comment, const char *file, int line, const char *context) const
Save error report and exit.
void signalZoom(int)
Send zoom selection, picked from menu or keystroke, to StatusBar.
Model for DlgSettingsSegments and CmdSettingsSegments.
void resizeEvent(QResizeEvent *event)
Intercept resize event so graphics scene can be appropriately resized when in Fill mode...
void updateSettingsCoords(const DocumentModelCoords &modelCoords)
Update with new coordinate properties.
Add point and line handling to generic QGraphicsScene.
Model for DlgSettingsGridRemoval and CmdSettingsGridRemoval. The settings are unstable until the user...
void updateSettingsSegments(const DocumentModelSegments &modelSegments)
Update with new segments properties.
Dialog for editing axes checker settings.
void updateGraphicsLinesToMatchGraphicsPoints()
Update the graphics lines so they follow the graphics points, after a drag, addition, removal, and such.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
bool transformIsDefined() const
Return true if all three axis points have been defined.