Engauge Digitizer  2
 All Classes Functions Variables Typedefs Enumerations Friends Pages
MainWindow.h
1 /******************************************************************************************************
2  * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5  ******************************************************************************************************/
6 
7 #ifndef MAIN_WINDOW_H
8 #define MAIN_WINDOW_H
9 
10 #include "BackgroundImage.h"
11 #include "CoordSystemIndex.h"
12 #include "DigitizeStateAbstractBase.h"
13 #include "DocumentAxesPointsRequired.h"
14 #include "FittingCurveCoefficients.h"
15 #include "GridLines.h"
16 #include "MainWindowModel.h"
17 #include <QCursor>
18 #include <QMainWindow>
19 #include <QMap>
20 #include <QUrl>
21 #include "Transformation.h"
22 #include "ZoomControl.h"
23 #include "ZoomFactor.h"
24 #include "ZoomFactorInitial.h"
25 
27 class ChecklistGuide;
28 class CmdMediator;
29 class CmdStackShadow;
30 class CurveStyles;
34 class DlgSettingsCoords;
39 class DlgSettingsGeneral;
55 class ExportToFile;
56 class FileCmdScript;
57 class FittingCurve;
58 class FittingWindow;
59 class GeometryWindow;
60 class Ghosts;
61 class GraphicsScene;
62 class GraphicsView;
63 #if !defined(OSX_DEBUG) && !defined(OSX_RELEASE)
64 class HelpWindow;
65 #endif
66 class LoadImageFromUrl;
67 class NetworkClient;
68 class QAction;
69 class QActionGroup;
70 class QCloseEvent;
71 class QComboBox;
72 class QDomDocument;
73 class QGraphicsLineItem;
74 class QMenu;
75 class QPushButton;
76 class QSettings;
77 class QSignalMapper;
78 class QTextStream;
79 class QTimer;
80 class QToolBar;
81 class QVBoxLayout;
82 class StatusBar;
84 class TutorialDlg;
85 class ViewPointStyle;
86 class ViewSegmentFilter;
87 
88 extern const unsigned int MAX_RECENT_FILE_LIST_SIZE;
89 
91 class MainWindow : public QMainWindow
92 {
93  Q_OBJECT
94 
96  friend class CreateActions;
97  friend class CreateCentralWidget;
98  friend class CreateCommandStackShadow;
99  friend class CreateDockableWidgets;
100  friend class CreateFacade;
101  friend class CreateHelpWindow;
102  friend class CreateIcons;
103  friend class CreateLoadImage;
104  friend class CreateMenus;
105  friend class CreateNetwork;
106  friend class CreateScene;
107  friend class CreateSettingsDialogs;
108  friend class CreateStateContexts;
109  friend class CreateStatusBar;
110  friend class CreateToolBars;
111  friend class CreateTutorial;
112  friend class CreateZoomMaps;
113 
115  friend class TestExport;
116 
117 public:
130  MainWindow(const QString &errorReportFile,
131  const QString &fileCmdScriptFile,
132  bool isRegressionTest,
133  bool isGnuplot,
134  bool isReset,
135  bool isExportOnly,
136  bool isExtractImageOnly,
137  const QString &extractImageOnlyExtension,
138  const QStringList &loadStartupFiles,
139  const QStringList &commandLineWithoutLoadStartupFiles,
140  QWidget *parent = 0);
141  ~MainWindow();
142 
144  void cmdFileClose();
145 
147  void cmdFileExport(const QString &fileName);
148 
150  void cmdFileImport(const QString &fileName);
151 
153  void cmdFileOpen(const QString &fileName);
154 
157 
159  virtual bool eventFilter(QObject *, QEvent *);
160 
162  QImage imageFiltered () const;
163 
165  bool isGnuplot() const;
166 
169 
171  bool modeMap () const;
172 
174  void resizeEvent (QResizeEvent *event);
175 
177  void saveErrorReportFileAndExit(const char *comment,
178  const char *file,
179  int line,
180  const char *context);
181 
183  GraphicsScene &scene();
184 
187  BackgroundImage selectOriginal(BackgroundImage backgroundImage);
188 
190  QString selectedGraphCurve () const;
191 
193  virtual void showEvent(QShowEvent *);
194 
196  void showTemporaryMessage (const QString &temporaryMessage);
197 
200 
202  bool transformIsDefined() const;
203 
205  void updateAfterCommand();
206 
209 
211  void updateCoordSystem(CoordSystemIndex coordSystemIndex);
212 
214  void updateDigitizeStateIfSoftwareTriggered (DigitizeState digitizeState);
215 
219 
221  void updateSettingsAxesChecker(const DocumentModelAxesChecker &modelAxesChecker);
222 
224  void updateSettingsColorFilter(const DocumentModelColorFilter &modelColorFilter);
225 
227  void updateSettingsCoords(const DocumentModelCoords &modelCoords);
228 
230  void updateSettingsCurveList (const CurvesGraphs &curvesGraphs);
231 
233  void updateSettingsCurveStyles(const CurveStyles &modelCurveStyles);
234 
236  void updateSettingsDigitizeCurve(const DocumentModelDigitizeCurve &modelDigitizeCurve);
237 
239  void updateSettingsExportFormat(const DocumentModelExportFormat &modelExport);
240 
242  void updateSettingsGeneral(const DocumentModelGeneral &modelGeneral);
243 
245  void updateSettingsGridDisplay(const DocumentModelGridDisplay &modelGridDisplay);
246 
248  void updateSettingsGridRemoval(const DocumentModelGridRemoval &modelGridRemoval);
249 
252 
254  void updateSettingsPointMatch(const DocumentModelPointMatch &modelPointMatch);
255 
257  void updateSettingsSegments(const DocumentModelSegments &modelSegments);
258 
260  void updateViewsOfSettings (const QString &activeCurve);
261 
263  GraphicsView &view ();
264 
266  const GraphicsView &view () const;
267 
268 private slots:
269  void slotBtnPrintAll();
270  void slotBtnShowAllPressed();
271  void slotBtnShowAllReleased();
272  void slotCanRedoChanged (bool);
273  void slotCanUndoChanged (bool);
274  void slotChecklistClosed ();
275  void slotCleanChanged (bool);
276  void slotCmbBackground(int);
277  void slotCmbCoordSystem(int);
278  void slotCmbCurve(int);
279  void slotContextMenuEventAxis (QString);
280  void slotContextMenuEventGraph (QStringList);
281  void slotDigitizeAxis ();
282  void slotDigitizeColorPicker ();
283  void slotDigitizeCurve ();
284  void slotDigitizePointMatch ();
285  void slotDigitizeScale ();
286  void slotDigitizeSegment ();
287  void slotDigitizeSelect ();
288  void slotEditCopy ();
289  void slotEditCut ();
290  void slotEditDelete ();
291  void slotEditMenu ();
292  void slotEditPaste ();
293  void slotEditPasteAsNew ();
294  void slotEditPasteAsNewAdvanced ();
295  void slotFileClose ();
296  void slotFileExport ();
297  void slotFileImport();
298  void slotFileImportAdvanced();
299  void slotFileImportDraggedImage(QImage);
300  void slotFileImportDraggedImageUrl(QUrl);
301  void slotFileImportImage(QString, QImage);
302  void slotFileImportImageReplace();
303  void slotFileOpen();
304  void slotFileOpenDraggedDigFile (QString);
305  void slotFilePrint();
306  bool slotFileSave();
307  bool slotFileSaveAs();
308  void slotFittingWindowClosed();
309  void slotFittingWindowCurveFit(FittingCurveCoefficients, double, double, bool, bool);
310  void slotGeometryWindowClosed();
311  void slotHelpAbout();
312  void slotHelpTutorial();
313  void slotKeyPress (Qt::Key, bool);
314  void slotLoadStartupFiles ();
315  void slotMouseMove (QPointF);
316  void slotMousePress (QPointF);
317  void slotMouseRelease (QPointF);
318  void slotRecentFileAction ();
319  void slotRecentFileClear ();
320  void slotRedoTextChanged (const QString &);
321  void slotSettingsAxesChecker ();
322  void slotSettingsColorFilter ();
323  void slotSettingsCoords ();
324  void slotSettingsCurveList ();
325  void slotSettingsCurveProperties ();
326  void slotSettingsDigitizeCurve ();
327  void slotSettingsExportFormat ();
328  void slotSettingsGeneral ();
329  void slotSettingsGridDisplay ();
330  void slotSettingsGridRemoval ();
331  void slotSettingsMainWindow ();
332  void slotSettingsPointMatch ();
333  void slotSettingsSegments ();
334  void slotTableStatusChange ();
335  void slotTimeoutRegressionErrorReport ();
336  void slotTimeoutRegressionFileCmdScript ();
337  void slotUndoTextChanged (const QString &);
338  void slotViewGridLines ();
339  void slotViewGroupBackground(QAction*);
340  void slotViewGroupCurves(QAction*);
341  void slotViewGroupStatus(QAction*);
342  void slotViewToolBarBackground ();
343  void slotViewToolBarChecklistGuide ();
344  void slotViewToolBarCoordSystem ();
345  void slotViewToolBarDigitize ();
346  void slotViewToolBarFittingWindow ();
347  void slotViewToolBarGeometryWindow ();
348  void slotViewToolBarSettingsViews ();
349  void slotViewToolTips ();
350  void slotViewZoomFactor (ZoomFactor);
351  void slotViewZoomFactorInt (int);
352  void slotViewZoom (int);
353  void slotViewZoomIn ();
354  void slotViewZoomInFromWheelEvent ();
355  void slotViewZoomOut ();
356  void slotViewZoomOutFromWheelEvent ();
357 
358 signals:
360  void signalZoom(int);
361 
362 private:
363  MainWindow();
364 
365  enum ImportType {
366  IMPORT_TYPE_SIMPLE,
367  IMPORT_TYPE_ADVANCED,
368  IMPORT_TYPE_IMAGE_REPLACE
369  };
370 
371  void addDockWindow (QDockWidget *dockWidget,
372  QSettings &settings,
373  const QString &settingsTokenArea,
374  const QString &settingsTokenGeometry,
375  Qt::DockWidgetArea dockWidgetArea);
376  void applyZoomFactorAfterLoad();
377  virtual void closeEvent(QCloseEvent *event);
378  ZoomFactor currentZoomFactor () const;
379 #if !defined(OSX_DEBUG) && !defined(OSX_RELEASE)
380  void exportAllCoordinateSystemsAfterRegressionTests();
381 #endif
382  QString exportRegressionFilenameFromInputFilename (const QString &fileName) const;
383  void fileExport(const QString &fileName,
384  ExportToFile exportStrategy);
385  void fileExtractImage (const QString &fileName);
386  void fileImport (const QString &fileName,
387  ImportType ImportType);
388  void fileImportWithPrompts (ImportType ImportType);
389  QString fileNameForExportOnly () const;
390  QString fileNameForExtractImageOnly () const;
391  void filePaste (ImportType importType);
392  void ghostsCreate ();
393  void ghostsDestroy ();
394  void handlerFileExtractImage ();
395  void loadCoordSystemListFromCmdMediator();
396  void loadCurveListFromCmdMediator();
397  void loadDocumentFile (const QString &fileName);
398  void loadErrorReportFile(const QString &errorReportFile);
399  bool loadImage (const QString &fileName,
400  const QImage &image,
401  ImportType ImportType);
402  bool loadImageNewDocument (const QString &fileName,
403  const QImage &image,
404  ImportType ImportType);
405  bool loadImageReplacingImage (const QString &fileName,
406  const QImage &image,
407  ImportType ImportType);
408  void loadInputFileForErrorReport(QDomDocument &domInputFile) const;
409  void loadToolTips ();
410  bool maybeSave();
411  DocumentModelExportFormat modelExportOverride (const DocumentModelExportFormat &modelExportFormatBefore,
412  const ExportToFile &exportStrategy,
413  const QString &selectedNameFilter) const;
414  bool modeGraph () const; // True if document is loaded and it has all graphs
415  void rebuildRecentFileListForCurrentFile(const QString &filePath);
416  bool saveDocumentFile(const QString &fileName);
417  QString saveErrorReportFileAndExitXml (const char *comment,
418  const char *file,
419  int line,
420  const char *context) const;
421  void saveStartingDocumentSnapshot();
422  void setCurrentFile(const QString &fileName);
423  void setCurrentPathFromFile (const QString &fileName);
424  void setNonFillZoomFactor (ZoomFactor newZoomFactor);
425  void setPixmap (const QString &curveSelected,
426  const QPixmap &pixmap);
427  void settingsRead (bool isReset);
428  void settingsReadEnvironment (QSettings &settings);
429  void settingsReadMainWindow (QSettings &settings);
430  void settingsWrite ();
431  bool setupAfterLoadNewDocument (const QString &fileName,
432  const QString &temporaryMessage,
433  ImportType ImportType);
434  bool setupAfterLoadReplacingImage (const QString &fileName,
435  const QString &temporaryMessage,
436  ImportType ImportType);
437  void startRegressionTestErrorReport (const QString &regressionInputFile);
438  void startRegressionTestFileCmdScript ();
439  void updateAfterCommandStatusBarCoords ();
440  void updateChecklistGuide ();
441  void updateControls (); // Update the widgets (typically in terms of show/hide state) depending on the application state.
442  void updateFittingWindow ();
443  void updateGeometryWindow ();
444  void updateGridLines();
445  void updateHighlightOpacity();
446  void updateRecentFileList();
447  void updateSettingsMainWindow();
448  void updateSmallDialogs();
449  void updateTransformationAndItsDependencies();
450  void updateViewedCurves ();
451  void updateViewsOfSettings (); // Private version gets active curve name from DigitizeContext
452  void updateWindowTitle ();
453  void writeCheckpointToLogFile();
454 
455  QString m_originalFile; // Original filename for error report
456  bool m_originalFileWasImported; // True/false for imported/opened
457  bool m_isDocumentExported;
458  QString m_engaugeFile; // Not empty when a Document is currently loaded AND it was loaded and/or saved as an Engauge file
459  QString m_currentFile; // Not empty when a Document is currently loaded. No path or file extension
460  QString m_currentFileWithPathAndFileExtension; // Adds path and file extension to m_currentFile. For display
461  MainTitleBarFormat m_titleBarFormat;
462 
463  QMenu *m_menuFile;
464  QAction *m_actionImport;
465  QAction *m_actionImportAdvanced;
466  QAction *m_actionImportImageReplace;
467  QAction *m_actionOpen;
468  QMenu *m_menuFileOpenRecent;
469  QList<QAction*> m_actionRecentFiles;
470  QAction *m_actionClose;
471  QAction *m_actionSave;
472  QAction *m_actionSaveAs;
473  QAction *m_actionExport;
474  QAction *m_actionPrint;
475  QAction *m_actionExit;
476 
477  QMenu *m_menuEdit;
478  QAction *m_actionEditUndo;
479  QAction *m_actionEditRedo;
480  QAction *m_actionEditCut;
481  QAction *m_actionEditCopy;
482  QAction *m_actionEditPaste;
483  QAction *m_actionEditDelete;
484  QAction *m_actionEditPasteAsNew;
485  QAction *m_actionEditPasteAsNewAdvanced;
486 
487  QMenu *m_menuDigitize;
488  QActionGroup *m_groupDigitize;
489  QAction *m_actionDigitizeSelect;
490  QAction *m_actionDigitizeAxis;
491  QAction *m_actionDigitizeScale;
492  QAction *m_actionDigitizeCurve;
493  QAction *m_actionDigitizePointMatch;
494  QAction *m_actionDigitizeColorPicker;
495  QAction *m_actionDigitizeSegment;
496 
497  QMenu *m_menuView;
498  QAction *m_actionViewBackground;
499  QAction *m_actionViewChecklistGuide;
500  QAction *m_actionViewCoordSystem;
501  QAction *m_actionViewDigitize;
502  QAction *m_actionViewFittingWindow;
503  QAction *m_actionViewGeometryWindow;
504  QAction *m_actionViewSettingsViews;
505  QAction *m_actionViewToolTips;
506  QAction *m_actionViewGridLines;
507  QMenu *m_menuViewBackground;
508  QActionGroup *m_groupBackground;
509  QAction *m_actionViewBackgroundNone;
510  QAction *m_actionViewBackgroundOriginal;
511  QAction *m_actionViewBackgroundFiltered;
512  QMenu *m_menuViewCurves;
513  QActionGroup *m_groupCurves;
514  QAction *m_actionViewCurvesNone;
515  QAction *m_actionViewCurvesSelected;
516  QAction *m_actionViewCurvesAll;
517  QMenu *m_menuViewStatus;
518  QActionGroup *m_groupStatus;
519  QAction *m_actionStatusNever;
520  QAction *m_actionStatusTemporary;
521  QAction *m_actionStatusAlways;
522  QMenu *m_menuViewZoom;
523  QAction *m_actionZoomOut;
524  QAction *m_actionZoomIn;
525  QActionGroup *m_groupZoom;
526  QSignalMapper *m_mapperZoomFactor;
527  QAction *m_actionZoomFill;
528  QAction *m_actionZoom16To1;
529  QAction *m_actionZoom16To1Farther;
530  QAction *m_actionZoom8To1Closer;
531  QAction *m_actionZoom8To1;
532  QAction *m_actionZoom8To1Farther;
533  QAction *m_actionZoom4To1Closer;
534  QAction *m_actionZoom4To1;
535  QAction *m_actionZoom4To1Farther;
536  QAction *m_actionZoom2To1Closer;
537  QAction *m_actionZoom2To1;
538  QAction *m_actionZoom2To1Farther;
539  QAction *m_actionZoom1To1Closer;
540  QAction *m_actionZoom1To1;
541  QAction *m_actionZoom1To1Farther;
542  QAction *m_actionZoom1To2Closer;
543  QAction *m_actionZoom1To2;
544  QAction *m_actionZoom1To2Farther;
545  QAction *m_actionZoom1To4Closer;
546  QAction *m_actionZoom1To4;
547  QAction *m_actionZoom1To4Farther;
548  QAction *m_actionZoom1To8Closer;
549  QAction *m_actionZoom1To8;
550  QAction *m_actionZoom1To8Farther;
551  QAction *m_actionZoom1To16Closer;
552  QAction *m_actionZoom1To16;
553 
554  QMenu *m_menuSettings;
555  QAction *m_actionSettingsAxesChecker;
556  QAction *m_actionSettingsColorFilter;
557  QAction *m_actionSettingsCoords;
558  QAction *m_actionSettingsCurveList;
559  QAction *m_actionSettingsCurveProperties;
560  QAction *m_actionSettingsDigitizeCurve;
561  QAction *m_actionSettingsExport;
562  QAction *m_actionSettingsGeneral;
563  QAction *m_actionSettingsGridDisplay;
564  QAction *m_actionSettingsGridRemoval;
565  QAction *m_actionSettingsMainWindow;
566  QAction *m_actionSettingsPointMatch;
567  QAction *m_actionSettingsSegments;
568 
569  QMenu *m_menuHelp;
570  QAction *m_actionHelpAbout;
571  QAction *m_actionHelpChecklistGuideWizard;
572  QAction *m_actionHelpHelp;
573  QAction *m_actionHelpTutorial;
574  QAction *m_actionHelpWhatsThis;
575 
576  QVBoxLayout *m_layout;
577  GraphicsScene *m_scene;
578  GraphicsView *m_view;
579 
580  StatusBar *m_statusBar;
581  Transformation m_transformation;
582 
583  QComboBox *m_cmbCurve;
584  QToolBar *m_toolDigitize;
585  LoadImageFromUrl *m_loadImageFromUrl;
586 
587  QComboBox *m_cmbBackground;
588  QToolBar *m_toolBackground;
589 
590  ViewPointStyle *m_viewPointStyle;
591  ViewSegmentFilter *m_viewSegmentFilter;
592  QToolBar *m_toolSettingsViews;
593  ChecklistGuide *m_dockChecklistGuide;
594  FittingWindow *m_dockFittingWindow;
595  GeometryWindow *m_dockGeometryWindow;
596 
597  QComboBox *m_cmbCoordSystem;
598  QPushButton *m_btnPrintAll;
599  QPushButton *m_btnShowAll;
600  QToolBar *m_toolCoordSystem;
601 
602 #if !defined(OSX_DEBUG) && !defined(OSX_RELEASE)
603  HelpWindow *m_helpWindow;
604 #endif
605  TutorialDlg *m_tutorialDlg;
606 
607  CmdMediator *m_cmdMediator;
608  CmdStackShadow *m_cmdStackShadow;
609 
610  // State machine for user interface states
611  DigitizeStateContext *m_digitizeStateContext;
612 
613  // State machine for transformation states
614  TransformationStateContext *m_transformationStateContext;
615 
616  // State machine for background image
617  BackgroundStateContext *m_backgroundStateContext;
618 
619  DlgSettingsAxesChecker *m_dlgSettingsAxesChecker;
620  DlgSettingsColorFilter *m_dlgSettingsColorFilter;
621  DlgSettingsCoords *m_dlgSettingsCoords;
622  DlgSettingsCurveList *m_dlgSettingsCurveList;
623  DlgSettingsCurveProperties *m_dlgSettingsCurveProperties;
624  DlgSettingsDigitizeCurve * m_dlgSettingsDigitizeCurve;
625  DlgSettingsExportFormat *m_dlgSettingsExportFormat;
626  DlgSettingsGeneral *m_dlgSettingsGeneral;
627  DlgSettingsGridDisplay *m_dlgSettingsGridDisplay;
628  DlgSettingsGridRemoval *m_dlgSettingsGridRemoval;
629  DlgSettingsMainWindow *m_dlgSettingsMainWindow;
630  DlgSettingsPointMatch *m_dlgSettingsPointMatch;
631  DlgSettingsSegments *m_dlgSettingsSegments;
632 
633  // Crash reports
634  QString m_startingDocumentSnapshot; // Serialized snapshot of document at startup. Included in error report if user approves
635  NetworkClient *m_networkClient;
636 
637  // Main window settings
638  bool m_isGnuplot; // From command line
639  MainWindowModel m_modelMainWindow; // From settings file or DlgSettingsMainWindow
640 
641  // File names to be loaded at startup. Only one is loaded into the current instance, with external instances created for the other files
642  QTimer *m_timerLoadStartupFiles;
643  QStringList m_loadStartupFiles;
644 
645  // Command line arguments with load startup files omitted
646  QStringList m_commandLineWithoutLoadStartupFiles;
647 
648  // Ghosts that are created for seeing all coordinate systems at once, when there are multiple coordinate systems
649  Ghosts *m_ghosts;
650 
651  // Timers for regression testing. Neither or one is first started by the constructor for this class, but the first timeout
652  // (and all succeeding timeouts) will be from after QMainWindow::exec is called. Each timeout results in one command
653  // from the command stack getting executed
654  QTimer *m_timerRegressionErrorReport;
655  FileCmdScript *m_fileCmdScript;
656  bool m_isErrorReportRegressionTest;
657  QTimer *m_timerRegressionFileCmdScript;
658  QString m_regressionFile;
659  QString m_startupDirectory; // Used to restore original directory just before outputing regression test results, since
660  // directory changes when settings are read, and also when files are opened or imported.
661  // Restoring the directory means relative paths in the regression scripts will work consistently
662 
663  // Grid lines
664  GridLines m_gridLines;
665 
666  // Map to/from/between zoom enumerations. These eliminate the need for switch statements
667  QMap<ZoomFactorInitial, ZoomFactor> m_zoomMapFromInitial;
668  QMap<ZoomFactor, QAction*> m_zoomMapToAction;
669 
670  // Fitted curve. Null if not currently applicable/defined
671  FittingCurve *m_fittingCurve;
672 
673  // Export the single dig file that was loaded in the command line, as enforced by parseCmdLine
674  bool m_isExportOnly;
675 
676  // Extract the image from the single dig file that was loaded in the command line, as enforced by parseCmdLine
677  bool m_isExtractImageOnly;
678  QString m_extractImageOnlyExtension;
679 };
680 
681 #endif // MAIN_WINDOW_H
void updateCoordSystem(CoordSystemIndex coordSystemIndex)
Select a different CoordSystem.
Model for DlgSettingsGeneral and CmdSettingsGeneral.
Model for DlgSettingsPointMatch and CmdSettingsPointMatch.
void updateSettingsMainWindow(const MainWindowModel &modelMainWindow)
Update with new main window properties.
Model for DlgSettingsGridDisplay and CmdSettingsGridDisplay.
Class to create toolbars for MainWindow class.
void updateDigitizeStateIfSoftwareTriggered(DigitizeState digitizeState)
After software-triggered state transition, this method manually triggers the action as if user had cl...
Class to create actions for MainWindow class.
Definition: CreateActions.h:16
Class that displays the current Segment Filter in a MainWindow toolbar.
Class to create QDockWidget items for MainWindow class.
Dialog for editing Segments settings, for DigitizeStateSegment.
Model for DlgSettingsExportFormat and CmdSettingsExportFormat.
Dialog for editing point match settings, for DigitizeStatePointMatch.
Transformation transformation() const
Return read-only copy of transformation.
Context class for transformation state machine.
Model for DlgSettingsCurveProperties and CmdSettingsCurveProperties.
Definition: CurveStyles.h:22
Dockable help window.
Definition: HelpWindow.h:16
Class to create menus for MainWindow class.
Definition: CreateMenus.h:16
void updateAfterMouseRelease()
Call MainWindow::updateControls (which is private) after the very specific case - a mouse press/relea...
void saveErrorReportFileAndExit(const char *comment, const char *file, int line, const char *context)
Save error report and exit.
void cmdFileClose()
Close file. This is called from a file script command.
Definition: MainWindow.cpp:290
Class to create settings dialogs for MainWindow class.
Class to create state contexts, which wrap state machine design patterns, for MainWindow class...
Class to create zoom factor maps for MainWindow class.
bool modeMap() const
True if document scale is set using a scale bar, otherwise using axis points.
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.
Class for showing points and lines for all coordinate systems simultaneously, even though the code no...
Definition: Ghosts.h:26
Window that displays the geometry information, as a table, for the current curve. ...
void cmdFileOpen(const QString &fileName)
Open file. This is called from a file script command.
Definition: MainWindow.cpp:316
CmdMediator * cmdMediator()
Accessor for commands to process the Document.
Definition: MainWindow.cpp:324
Class to create LoadImageFromUrl for MainWindow class.
BackgroundImage selectOriginal(BackgroundImage backgroundImage)
Make original background visible, for DigitizeStateColorPicker.
Dialog for editing grid removal settings.
Dialog for editing exporting settings.
Class to create QGraphicsScene for MainWindow class.
Definition: CreateScene.h:16
Unit test of Export classes.
Definition: TestExport.h:16
void showTemporaryMessage(const QString &temporaryMessage)
Show temporary message in status bar.
Class to TutorialDlg for MainWindow class.
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...
Definition: TutorialDlg.h:19
void cmdFileExport(const QString &fileName)
Export file. This is called from a file script command.
Definition: MainWindow.cpp:298
Class to create status bar for MainWindow class.
Strategy class for exporting to a file. This strategy is external to the Document class so that class...
Definition: ExportToFile.h:25
Dockable text window containing checklist guide.
Class to create help window for MainWindow class.
Model for DlgSettingsDigitizeCurve and CmdSettingsDigitizeCurve.
GraphicsView & view()
View for the QImage and QGraphicsItems, without const.
Affine transformation between screen and graph coordinates, based on digitized axis points...
Dialog for editing filtering settings.
Container for all graph curves. The axes point curve is external to this class.
Definition: CurvesGraphs.h:24
Model for DlgSettingsColorFilter and CmdSettingsColorFilter.
Wrapper around QStatusBar to manage permanent widgets.
Definition: StatusBar.h:24
GraphicsScene & scene()
Scene container for the QImage and QGraphicsItems.
void updateSettingsGridDisplay(const DocumentModelGridDisplay &modelGridDisplay)
Update with new grid display properties.
void updateSettingsCurveStyles(const CurveStyles &modelCurveStyles)
Update with new curve styles.
Client for interacting with Engauge server.
Definition: NetworkClient.h:16
Context class that manages the background image state machine.
Facade class that wraps around all of the create classes for MainWindow.
Definition: CreateFacade.h:16
QGraphicsView class with event handling added. Typically the events are sent to the active digitizing...
Definition: GraphicsView.h:20
Container for all DigitizeStateAbstractBase subclasses. This functions as the context class in a stan...
Model for DlgSettingsMainWindow.
Container class for GridLine objects.
Definition: GridLines.h:18
Dialog for editing general settings.
Class to the central QWidget for MainWindow class.
Model for DlgSettingsCoords and CmdSettingsCoords.
void updateAfterCommand()
See GraphicsScene::updateAfterCommand.
Curve that overlays the current scene so the regression-fitted curve is visible.
Definition: FittingCurve.h:16
void updateSettingsColorFilter(const DocumentModelColorFilter &modelColorFilter)
Update with new color filter properties.
Dialog for editing grid display settings.
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.
void updateSettingsGeneral(const DocumentModelGeneral &modelGeneral)
Update with new general properties.
QImage imageFiltered() const
Background image that has been filtered for the current curve. This asserts if a curve-specific image...
Definition: MainWindow.cpp:799
void updateSettingsGridRemoval(const DocumentModelGridRemoval &modelGridRemoval)
Update with new grid removal properties.
Class that displays a view of the current Curve&#39;s point style.
Dialog for editing main window settings, which are entirely independent of all documents.
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.
Definition: MainWindow.cpp:345
bool isGnuplot() const
Get method for gnuplot flag.
Definition: MainWindow.cpp:804
Dialog for editing curve properties settings.
Command queue stack.
Definition: CmdMediator.h:23
void signalZoom(int)
Send zoom selection, picked from menu or keystroke, to StatusBar.
Model for DlgSettingsSegments and CmdSettingsSegments.
void cmdFileImport(const QString &fileName)
Import file. This is called from a file script command.
Definition: MainWindow.cpp:307
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.
File that manages a command stack for regression testing of file import/open/export/close.
Definition: FileCmdScript.h:20
Add point and line handling to generic QGraphicsScene.
Definition: GraphicsScene.h:36
Window that displays curve fitting as applied to the currently selected curve.
Definition: FittingWindow.h:34
Model for DlgSettingsGridRemoval and CmdSettingsGridRemoval. The settings are unstable until the user...
Class to create CmdStackShadow for MainWindow class.
void updateSettingsSegments(const DocumentModelSegments &modelSegments)
Update with new segments properties.
Dialog for editing curve names settings.
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.
Class to create network for MainWindow class.
Definition: CreateNetwork.h:16
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition: MainWindow.h:91
MainWindowModel modelMainWindow() const
Get method for main window model.
Class to create icons for MainWindow class.
Definition: CreateIcons.h:16
virtual void showEvent(QShowEvent *)
Processing performed after gui becomes available.
bool transformIsDefined() const
Return true if all three axis points have been defined.
void updateSettingsCurveList(const CurvesGraphs &curvesGraphs)
Update with new curves.