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