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 
89 class MainWindow : public QMainWindow
90 {
91  Q_OBJECT
92 
94  friend class TestExport;
95 
96 public:
106  MainWindow(const QString &errorReportFile,
107  const QString &fileCmdScriptFile,
108  bool isRegressionTest,
109  bool isGnuplot,
110  bool isReset,
111  bool isExportOnly,
112  const QStringList &loadStartupFiles,
113  QWidget *parent = 0);
114  ~MainWindow();
115 
117  void cmdFileClose();
118 
120  void cmdFileExport(const QString &fileName);
121 
123  void cmdFileImport(const QString &fileName);
124 
126  void cmdFileOpen(const QString &fileName);
127 
130 
132  virtual bool eventFilter(QObject *, QEvent *);
133 
135  QImage imageFiltered () const;
136 
138  bool isGnuplot() const;
139 
142 
144  bool modeMap () const;
145 
147  void resizeEvent (QResizeEvent *event);
148 
150  void saveErrorReportFileAndExit(const char *comment,
151  const char *file,
152  int line,
153  const char *context);
154 
156  GraphicsScene &scene();
157 
160  BackgroundImage selectOriginal(BackgroundImage backgroundImage);
161 
163  QString selectedGraphCurve () const;
164 
166  virtual void showEvent(QShowEvent *);
167 
169  void showTemporaryMessage (const QString &temporaryMessage);
170 
173 
175  bool transformIsDefined() const;
176 
178  void updateAfterCommand();
179 
182 
184  void updateCoordSystem(CoordSystemIndex coordSystemIndex);
185 
187  void updateDigitizeStateIfSoftwareTriggered (DigitizeState digitizeState);
188 
192 
194  void updateSettingsAxesChecker(const DocumentModelAxesChecker &modelAxesChecker);
195 
197  void updateSettingsColorFilter(const DocumentModelColorFilter &modelColorFilter);
198 
200  void updateSettingsCoords(const DocumentModelCoords &modelCoords);
201 
203  void updateSettingsCurveAddRemove (const CurvesGraphs &curvesGraphs);
204 
206  void updateSettingsCurveStyles(const CurveStyles &modelCurveStyles);
207 
209  void updateSettingsDigitizeCurve(const DocumentModelDigitizeCurve &modelDigitizeCurve);
210 
212  void updateSettingsExportFormat(const DocumentModelExportFormat &modelExport);
213 
215  void updateSettingsGeneral(const DocumentModelGeneral &modelGeneral);
216 
218  void updateSettingsGridDisplay(const DocumentModelGridDisplay &modelGridDisplay);
219 
221  void updateSettingsGridRemoval(const DocumentModelGridRemoval &modelGridRemoval);
222 
225 
227  void updateSettingsPointMatch(const DocumentModelPointMatch &modelPointMatch);
228 
230  void updateSettingsSegments(const DocumentModelSegments &modelSegments);
231 
233  void updateViewsOfSettings (const QString &activeCurve);
234 
236  GraphicsView &view ();
237 
239  const GraphicsView &view () const;
240 
241 private slots:
242  void slotBtnPrintAll();
243  void slotBtnShowAllPressed();
244  void slotBtnShowAllReleased();
245  void slotCanRedoChanged (bool);
246  void slotCanUndoChanged (bool);
247  void slotChecklistClosed ();
248  void slotCleanChanged (bool);
249  void slotCmbBackground(int);
250  void slotCmbCoordSystem(int);
251  void slotCmbCurve(int);
252  void slotContextMenuEventAxis (QString);
253  void slotContextMenuEventGraph (QStringList);
254  void slotDigitizeAxis ();
255  void slotDigitizeColorPicker ();
256  void slotDigitizeCurve ();
257  void slotDigitizePointMatch ();
258  void slotDigitizeScale ();
259  void slotDigitizeSegment ();
260  void slotDigitizeSelect ();
261  void slotEditCopy ();
262  void slotEditCut ();
263  void slotEditDelete ();
264  void slotEditMenu ();
265  void slotEditPaste ();
266  void slotEditPasteAsNew ();
267  void slotEditPasteAsNewAdvanced ();
268  void slotFileClose ();
269  void slotFileExport ();
270  void slotFileImport();
271  void slotFileImportAdvanced();
272  void slotFileImportDraggedImage(QImage);
273  void slotFileImportDraggedImageUrl(QUrl);
274  void slotFileImportImage(QString, QImage);
275  void slotFileImportImageReplace();
276  void slotFileOpen();
277  void slotFileOpenDraggedDigFile (QString);
278  void slotFilePrint();
279  bool slotFileSave();
280  bool slotFileSaveAs();
281  void slotFittingWindowClosed();
282  void slotFittingWindowCurveFit(FittingCurveCoefficients, double, double, bool, bool);
283  void slotGeometryWindowClosed();
284  void slotHelpAbout();
285  void slotHelpTutorial();
286  void slotKeyPress (Qt::Key, bool);
287  void slotLoadStartupFiles ();
288  void slotMouseMove (QPointF);
289  void slotMousePress (QPointF);
290  void slotMouseRelease (QPointF);
291  void slotRecentFileAction ();
292  void slotRecentFileClear ();
293  void slotRedoTextChanged (const QString &);
294  void slotSettingsAxesChecker ();
295  void slotSettingsColorFilter ();
296  void slotSettingsCoords ();
297  void slotSettingsCurveAddRemove ();
298  void slotSettingsCurveProperties ();
299  void slotSettingsDigitizeCurve ();
300  void slotSettingsExportFormat ();
301  void slotSettingsGeneral ();
302  void slotSettingsGridDisplay ();
303  void slotSettingsGridRemoval ();
304  void slotSettingsMainWindow ();
305  void slotSettingsPointMatch ();
306  void slotSettingsSegments ();
307  void slotTableStatusChange ();
308  void slotTimeoutRegressionErrorReport ();
309  void slotTimeoutRegressionFileCmdScript ();
310  void slotUndoTextChanged (const QString &);
311  void slotViewGridLines ();
312  void slotViewGroupBackground(QAction*);
313  void slotViewGroupCurves(QAction*);
314  void slotViewGroupStatus(QAction*);
315  void slotViewToolBarBackground ();
316  void slotViewToolBarChecklistGuide ();
317  void slotViewToolBarCoordSystem ();
318  void slotViewToolBarDigitize ();
319  void slotViewToolBarFittingWindow ();
320  void slotViewToolBarGeometryWindow ();
321  void slotViewToolBarSettingsViews ();
322  void slotViewToolTips ();
323  void slotViewZoomFactor (ZoomFactor);
324  void slotViewZoomFactorInt (int);
325  void slotViewZoom (int);
326  void slotViewZoomIn ();
327  void slotViewZoomInFromWheelEvent ();
328  void slotViewZoomOut ();
329  void slotViewZoomOutFromWheelEvent ();
330 
331 signals:
333  void signalZoom(int);
334 
335 private:
336  MainWindow();
337 
338  enum ImportType {
339  IMPORT_TYPE_SIMPLE,
340  IMPORT_TYPE_ADVANCED,
341  IMPORT_TYPE_IMAGE_REPLACE
342  };
343 
344  void addDockWindow (QDockWidget *dockWidget,
345  QSettings &settings,
346  const QString &settingsTokenArea,
347  const QString &settingsTokenGeometry,
348  Qt::DockWidgetArea dockWidgetArea);
349  void applyZoomFactorAfterLoad();
350  virtual void closeEvent(QCloseEvent *event);
351  void createActions();
352  void createActionsDigitize ();
353  void createActionsEdit ();
354  void createActionsFile ();
355  void createActionsHelp ();
356  void createActionsSettings ();
357  void createActionsView ();
358  void createCentralWidget ();
359  void createCommandStackShadow ();
360  void createDockableWidgets ();
361  void createHelpWindow ();
362  void createIcons();
363  void createLoadImageFromUrl ();
364  void createMenus();
365  void createNetwork();
366  void createScene ();
367  void createSettingsDialogs ();
368  void createStateContextBackground();
369  void createStateContextDigitize();
370  void createStateContextTransformation();
371  void createStatusBar();
372  void createToolBars();
373  void createTutorial();
374  void createZoomMaps ();
375  ZoomFactor currentZoomFactor () const;
376 #if !defined(OSX_DEBUG) && !defined(OSX_RELEASE)
377  void exportAllCoordinateSystemsAfterRegressionTests();
378 #endif
379  QString exportRegressionFilenameFromInputFilename (const QString &fileName) const;
380  void fileExport(const QString &fileName,
381  ExportToFile exportStrategy);
382  void fileImport (const QString &fileName,
383  ImportType ImportType);
384  void fileImportWithPrompts (ImportType ImportType);
385  QString fileNameForExportOnly () const;
386  void filePaste (ImportType importType);
387  void ghostsCreate ();
388  void ghostsDestroy ();
389  void loadCoordSystemListFromCmdMediator();
390  void loadCurveListFromCmdMediator();
391  void loadDocumentFile (const QString &fileName);
392  void loadErrorReportFile(const QString &errorReportFile);
393  bool loadImage (const QString &fileName,
394  const QImage &image,
395  ImportType ImportType);
396  bool loadImageNewDocument (const QString &fileName,
397  const QImage &image,
398  ImportType ImportType);
399  bool loadImageReplacingImage (const QString &fileName,
400  const QImage &image,
401  ImportType ImportType);
402  void loadInputFileForErrorReport(QDomDocument &domInputFile) const;
403  void loadToolTips ();
404  bool maybeSave();
405  DocumentModelExportFormat modelExportOverride (const DocumentModelExportFormat &modelExportFormatBefore,
406  const ExportToFile &exportStrategy,
407  const QString &selectedNameFilter) const;
408  bool modeGraph () const; // True if document is loaded and it has all graphs
409  void rebuildRecentFileListForCurrentFile(const QString &filePath);
410  bool saveDocumentFile(const QString &fileName);
411  QString saveErrorReportFileAndExitXml (const char *comment,
412  const char *file,
413  int line,
414  const char *context) const;
415  void saveStartingDocumentSnapshot();
416  void setCurrentFile(const QString &fileName);
417  void setCurrentPathFromFile (const QString &fileName);
418  void setNonFillZoomFactor (ZoomFactor newZoomFactor);
419  void setPixmap (const QString &curveSelected,
420  const QPixmap &pixmap);
421  void settingsRead (bool isReset);
422  void settingsReadEnvironment (QSettings &settings);
423  void settingsReadMainWindow (QSettings &settings);
424  void settingsWrite ();
425  bool setupAfterLoadNewDocument (const QString &fileName,
426  const QString &temporaryMessage,
427  ImportType ImportType);
428  bool setupAfterLoadReplacingImage (const QString &fileName,
429  const QString &temporaryMessage,
430  ImportType ImportType);
431  void startRegressionTestErrorReport (const QString &regressionInputFile);
432  void startRegressionTestFileCmdScript ();
433  void updateAfterCommandStatusBarCoords ();
434  void updateChecklistGuide ();
435  void updateControls (); // Update the widgets (typically in terms of show/hide state) depending on the application state.
436  void updateFittingWindow ();
437  void updateGeometryWindow ();
438  void updateGridLines();
439  void updateHighlightOpacity();
440  void updateRecentFileList();
441  void updateSettingsMainWindow();
442  void updateSmallDialogs();
443  void updateTransformationAndItsDependencies();
444  void updateViewedCurves ();
445  void updateViewsOfSettings (); // Private version gets active curve name from DigitizeContext
446  void updateWindowTitle ();
447  void writeCheckpointToLogFile();
448 
449  QString m_originalFile; // Original filename for error report
450  bool m_originalFileWasImported; // True/false for imported/opened
451  bool m_isDocumentExported;
452  QString m_engaugeFile; // Not empty when a Document is currently loaded AND it was loaded and/or saved as an Engauge file
453  QString m_currentFile; // Not empty when a Document is currently loaded. No path or file extension
454  QString m_currentFileWithPathAndFileExtension; // Adds path and file extension to m_currentFile. For display
455  MainTitleBarFormat m_titleBarFormat;
456 
457  QMenu *m_menuFile;
458  QAction *m_actionImport;
459  QAction *m_actionImportAdvanced;
460  QAction *m_actionImportImageReplace;
461  QAction *m_actionOpen;
462  QMenu *m_menuFileOpenRecent;
463  QList<QAction*> m_actionRecentFiles;
464  QAction *m_actionClose;
465  QAction *m_actionSave;
466  QAction *m_actionSaveAs;
467  QAction *m_actionExport;
468  QAction *m_actionPrint;
469  QAction *m_actionExit;
470 
471  QMenu *m_menuEdit;
472  QAction *m_actionEditUndo;
473  QAction *m_actionEditRedo;
474  QAction *m_actionEditCut;
475  QAction *m_actionEditCopy;
476  QAction *m_actionEditPaste;
477  QAction *m_actionEditDelete;
478  QAction *m_actionEditPasteAsNew;
479  QAction *m_actionEditPasteAsNewAdvanced;
480 
481  QMenu *m_menuDigitize;
482  QActionGroup *m_groupDigitize;
483  QAction *m_actionDigitizeSelect;
484  QAction *m_actionDigitizeAxis;
485  QAction *m_actionDigitizeScale;
486  QAction *m_actionDigitizeCurve;
487  QAction *m_actionDigitizePointMatch;
488  QAction *m_actionDigitizeColorPicker;
489  QAction *m_actionDigitizeSegment;
490 
491  QMenu *m_menuView;
492  QAction *m_actionViewBackground;
493  QAction *m_actionViewChecklistGuide;
494  QAction *m_actionViewCoordSystem;
495  QAction *m_actionViewDigitize;
496  QAction *m_actionViewFittingWindow;
497  QAction *m_actionViewGeometryWindow;
498  QAction *m_actionViewSettingsViews;
499  QAction *m_actionViewToolTips;
500  QAction *m_actionViewGridLines;
501  QMenu *m_menuViewBackground;
502  QActionGroup *m_groupBackground;
503  QAction *m_actionViewBackgroundNone;
504  QAction *m_actionViewBackgroundOriginal;
505  QAction *m_actionViewBackgroundFiltered;
506  QMenu *m_menuViewCurves;
507  QActionGroup *m_groupCurves;
508  QAction *m_actionViewCurvesNone;
509  QAction *m_actionViewCurvesSelected;
510  QAction *m_actionViewCurvesAll;
511  QMenu *m_menuViewStatus;
512  QActionGroup *m_groupStatus;
513  QAction *m_actionStatusNever;
514  QAction *m_actionStatusTemporary;
515  QAction *m_actionStatusAlways;
516  QMenu *m_menuViewZoom;
517  QAction *m_actionZoomOut;
518  QAction *m_actionZoomIn;
519  QActionGroup *m_groupZoom;
520  QSignalMapper *m_mapperZoomFactor;
521  QAction *m_actionZoomFill;
522  QAction *m_actionZoom16To1;
523  QAction *m_actionZoom16To1Farther;
524  QAction *m_actionZoom8To1Closer;
525  QAction *m_actionZoom8To1;
526  QAction *m_actionZoom8To1Farther;
527  QAction *m_actionZoom4To1Closer;
528  QAction *m_actionZoom4To1;
529  QAction *m_actionZoom4To1Farther;
530  QAction *m_actionZoom2To1Closer;
531  QAction *m_actionZoom2To1;
532  QAction *m_actionZoom2To1Farther;
533  QAction *m_actionZoom1To1Closer;
534  QAction *m_actionZoom1To1;
535  QAction *m_actionZoom1To1Farther;
536  QAction *m_actionZoom1To2Closer;
537  QAction *m_actionZoom1To2;
538  QAction *m_actionZoom1To2Farther;
539  QAction *m_actionZoom1To4Closer;
540  QAction *m_actionZoom1To4;
541  QAction *m_actionZoom1To4Farther;
542  QAction *m_actionZoom1To8Closer;
543  QAction *m_actionZoom1To8;
544  QAction *m_actionZoom1To8Farther;
545  QAction *m_actionZoom1To16Closer;
546  QAction *m_actionZoom1To16;
547 
548  QMenu *m_menuSettings;
549  QAction *m_actionSettingsAxesChecker;
550  QAction *m_actionSettingsColorFilter;
551  QAction *m_actionSettingsCoords;
552  QAction *m_actionSettingsCurveAddRemove;
553  QAction *m_actionSettingsCurveProperties;
554  QAction *m_actionSettingsDigitizeCurve;
555  QAction *m_actionSettingsExport;
556  QAction *m_actionSettingsGeneral;
557  QAction *m_actionSettingsGridDisplay;
558  QAction *m_actionSettingsGridRemoval;
559  QAction *m_actionSettingsMainWindow;
560  QAction *m_actionSettingsPointMatch;
561  QAction *m_actionSettingsSegments;
562 
563  QMenu *m_menuHelp;
564  QAction *m_actionHelpAbout;
565  QAction *m_actionHelpChecklistGuideWizard;
566  QAction *m_actionHelpHelp;
567  QAction *m_actionHelpTutorial;
568  QAction *m_actionHelpWhatsThis;
569 
570  QVBoxLayout *m_layout;
571  GraphicsScene *m_scene;
572  GraphicsView *m_view;
573 
574  StatusBar *m_statusBar;
575  Transformation m_transformation;
576 
577  QComboBox *m_cmbCurve;
578  QToolBar *m_toolDigitize;
579  LoadImageFromUrl *m_loadImageFromUrl;
580 
581  QComboBox *m_cmbBackground;
582  QToolBar *m_toolBackground;
583 
584  ViewPointStyle *m_viewPointStyle;
585  ViewSegmentFilter *m_viewSegmentFilter;
586  QToolBar *m_toolSettingsViews;
587  ChecklistGuide *m_dockChecklistGuide;
588  FittingWindow *m_dockFittingWindow;
589  GeometryWindow *m_dockGeometryWindow;
590 
591  QComboBox *m_cmbCoordSystem;
592  QPushButton *m_btnPrintAll;
593  QPushButton *m_btnShowAll;
594  QToolBar *m_toolCoordSystem;
595 
596 #if !defined(OSX_DEBUG) && !defined(OSX_RELEASE)
597  HelpWindow *m_helpWindow;
598 #endif
599  TutorialDlg *m_tutorialDlg;
600 
601  CmdMediator *m_cmdMediator;
602  CmdStackShadow *m_cmdStackShadow;
603 
604  // State machine for user interface states
605  DigitizeStateContext *m_digitizeStateContext;
606 
607  // State machine for transformation states
608  TransformationStateContext *m_transformationStateContext;
609 
610  // State machine for background image
611  BackgroundStateContext *m_backgroundStateContext;
612 
613  DlgSettingsAxesChecker *m_dlgSettingsAxesChecker;
614  DlgSettingsColorFilter *m_dlgSettingsColorFilter;
615  DlgSettingsCoords *m_dlgSettingsCoords;
616  DlgSettingsCurveAddRemove *m_dlgSettingsCurveAddRemove;
617  DlgSettingsCurveProperties *m_dlgSettingsCurveProperties;
618  DlgSettingsDigitizeCurve * m_dlgSettingsDigitizeCurve;
619  DlgSettingsExportFormat *m_dlgSettingsExportFormat;
620  DlgSettingsGeneral *m_dlgSettingsGeneral;
621  DlgSettingsGridDisplay *m_dlgSettingsGridDisplay;
622  DlgSettingsGridRemoval *m_dlgSettingsGridRemoval;
623  DlgSettingsMainWindow *m_dlgSettingsMainWindow;
624  DlgSettingsPointMatch *m_dlgSettingsPointMatch;
625  DlgSettingsSegments *m_dlgSettingsSegments;
626 
627  // Crash reports
628  QString m_startingDocumentSnapshot; // Serialized snapshot of document at startup. Included in error report if user approves
629  NetworkClient *m_networkClient;
630 
631  // Main window settings
632  bool m_isGnuplot; // From command line
633  MainWindowModel m_modelMainWindow; // From settings file or DlgSettingsMainWindow
634 
635  // File names to be loaded at startup. Only one is loaded into the current instance, with external instances created for the other files
636  QTimer *m_timerLoadStartupFiles;
637  QStringList m_loadStartupFiles;
638 
639  // Ghosts that are created for seeing all coordinate systems at once, when there are multiple coordinate systems
640  Ghosts *m_ghosts;
641 
642  // Timers for regression testing. Neither or one is first started by the constructor for this class, but the first timeout
643  // (and all succeeding timeouts) will be from after QMainWindow::exec is called. Each timeout results in one command
644  // from the command stack getting executed
645  QTimer *m_timerRegressionErrorReport;
646  FileCmdScript *m_fileCmdScript;
647  bool m_isErrorReportRegressionTest;
648  QTimer *m_timerRegressionFileCmdScript;
649  QString m_regressionFile;
650  QString m_startupDirectory; // Used to restore original directory just before outputing regression test results, since
651  // directory changes when settings are read, and also when files are opened or imported.
652  // Restoring the directory means relative paths in the regression scripts will work consistently
653 
654  // Grid lines
655  GridLines m_gridLines;
656 
657  // Map to/from/between zoom enumerations. These eliminate the need for switch statements
658  QMap<ZoomFactorInitial, ZoomFactor> m_zoomMapFromInitial;
659  QMap<ZoomFactor, QAction*> m_zoomMapToAction;
660 
661  // Fitted curve. Null if not currently applicable/defined
662  FittingCurve *m_fittingCurve;
663 
664  // Export the single dig file that was loaded in the command line, as enforced by parseCmdLine
665  bool m_isExportOnly;
666 };
667 
668 #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.
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.
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
void updateSettingsCurveAddRemove(const CurvesGraphs &curvesGraphs)
Update with new curves.
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:312
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:338
CmdMediator * cmdMediator()
Accessor for commands to process the Document.
Definition: MainWindow.cpp:346
BackgroundImage selectOriginal(BackgroundImage backgroundImage)
Make original background visible, for DigitizeStateColorPicker.
Dialog for editing grid removal settings.
Dialog for editing exporting settings.
Unit test of Export classes.
Definition: TestExport.h:16
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...
Definition: TutorialDlg.h:19
void cmdFileExport(const QString &fileName)
Export file. This is called from a file script command.
Definition: MainWindow.cpp:320
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.
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.
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.
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...
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.
bool isGnuplot() const
Get method for gnuplot flag.
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:329
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:33
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...
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...
Definition: MainWindow.h:89
MainWindowModel modelMainWindow() const
Get method for main window model.
virtual void showEvent(QShowEvent *)
Processing performed after gui becomes available.
bool transformIsDefined() const
Return true if all three axis points have been defined.