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 slotDigitizeScale ();
248  void slotDigitizeSegment ();
249  void slotDigitizeSelect ();
250  void slotEditCopy ();
251  void slotEditCut ();
252  void slotEditDelete ();
253  void slotEditMenu ();
254  void slotEditPaste ();
255  void slotEditPasteAsNew ();
256  void slotEditPasteAsNewAdvanced ();
257  void slotFileClose ();
258  void slotFileExport ();
259  void slotFileImport();
260  void slotFileImportAdvanced();
261  void slotFileImportDraggedImage(QImage);
262  void slotFileImportDraggedImageUrl(QUrl);
263  void slotFileImportImage(QString, QImage);
264  void slotFileImportImageReplace();
265  void slotFileOpen();
266  void slotFileOpenDraggedDigFile (QString);
267  void slotFilePrint();
268  bool slotFileSave();
269  bool slotFileSaveAs();
270  void slotFittingWindowClosed();
271  void slotFittingWindowCurveFit(FittingCurveCoefficients, double, double, bool, bool);
272  void slotGeometryWindowClosed();
273  void slotHelpAbout();
274  void slotHelpTutorial();
275  void slotKeyPress (Qt::Key, bool);
276  void slotLoadStartupFiles ();
277  void slotMouseMove (QPointF);
278  void slotMousePress (QPointF);
279  void slotMouseRelease (QPointF);
280  void slotRecentFileAction ();
281  void slotRecentFileClear ();
282  void slotRedoTextChanged (const QString &);
283  void slotSettingsAxesChecker ();
284  void slotSettingsColorFilter ();
285  void slotSettingsCoords ();
286  void slotSettingsCurveAddRemove ();
287  void slotSettingsCurveProperties ();
288  void slotSettingsDigitizeCurve ();
289  void slotSettingsExportFormat ();
290  void slotSettingsGeneral ();
291  void slotSettingsGridDisplay ();
292  void slotSettingsGridRemoval ();
293  void slotSettingsMainWindow ();
294  void slotSettingsPointMatch ();
295  void slotSettingsSegments ();
296  void slotTableStatusChange ();
297  void slotTimeoutRegressionErrorReport ();
298  void slotTimeoutRegressionFileCmdScript ();
299  void slotUndoTextChanged (const QString &);
300  void slotViewGridLines ();
301  void slotViewGroupBackground(QAction*);
302  void slotViewGroupCurves(QAction*);
303  void slotViewGroupStatus(QAction*);
304  void slotViewToolBarBackground ();
305  void slotViewToolBarChecklistGuide ();
306  void slotViewToolBarCoordSystem ();
307  void slotViewToolBarDigitize ();
308  void slotViewToolBarFittingWindow ();
309  void slotViewToolBarGeometryWindow ();
310  void slotViewToolBarSettingsViews ();
311  void slotViewToolTips ();
312  void slotViewZoom16To1 ();
313  void slotViewZoom8To1 ();
314  void slotViewZoom4To1 ();
315  void slotViewZoom2To1 ();
316  void slotViewZoom1To1 ();
317  void slotViewZoom1To2 ();
318  void slotViewZoom1To4 ();
319  void slotViewZoom1To8 ();
320  void slotViewZoom1To16 ();
321  void slotViewZoom (int);
322  void slotViewZoomFill ();
323  void slotViewZoomIn ();
324  void slotViewZoomInFromWheelEvent ();
325  void slotViewZoomOut ();
326  void slotViewZoomOutFromWheelEvent ();
327 
328 signals:
330  void signalZoom(int);
331 
332 private:
333  MainWindow();
334 
335  enum ImportType {
336  IMPORT_TYPE_SIMPLE,
337  IMPORT_TYPE_ADVANCED,
338  IMPORT_TYPE_IMAGE_REPLACE
339  };
340 
341  void addDockWindow (QDockWidget *dockWidget,
342  QSettings &settings,
343  const QString &settingsTokenArea,
344  const QString &settingsTokenGeometry,
345  Qt::DockWidgetArea dockWidgetArea);
346  void applyZoomFactorAfterLoad();
347  virtual void closeEvent(QCloseEvent *event);
348  void createActions();
349  void createActionsDigitize ();
350  void createActionsEdit ();
351  void createActionsFile ();
352  void createActionsHelp ();
353  void createActionsSettings ();
354  void createActionsView ();
355  void createCentralWidget ();
356  void createCommandStackShadow ();
357  void createDockableWidgets ();
358  void createHelpWindow ();
359  void createIcons();
360  void createLoadImageFromUrl ();
361  void createMenus();
362  void createNetwork();
363  void createScene ();
364  void createSettingsDialogs ();
365  void createStateContextBackground();
366  void createStateContextDigitize();
367  void createStateContextTransformation();
368  void createStatusBar();
369  void createToolBars();
370  void createTutorial();
371  void createZoomMap ();
372  ZoomFactor currentZoomFactor () const;
373 #ifndef OSX_RELEASE
374  void exportAllCoordinateSystemsAfterRegressionTests();
375 #endif
376  QString exportFilenameFromInputFilename (const QString &fileName) const;
377  void fileExport(const QString &fileName,
378  ExportToFile exportStrategy);
379  void fileImport (const QString &fileName,
380  ImportType ImportType);
381  void fileImportWithPrompts (ImportType ImportType);
382  void filePaste (ImportType importType);
383  void ghostsCreate ();
384  void ghostsDestroy ();
385  void loadCoordSystemListFromCmdMediator();
386  void loadCurveListFromCmdMediator();
387  void loadDocumentFile (const QString &fileName);
388  void loadErrorReportFile(const QString &errorReportFile);
389  bool loadImage (const QString &fileName,
390  const QImage &image,
391  ImportType ImportType);
392  bool loadImageNewDocument (const QString &fileName,
393  const QImage &image,
394  ImportType ImportType);
395  bool loadImageReplacingImage (const QString &fileName,
396  const QImage &image,
397  ImportType ImportType);
398  void loadInputFileForErrorReport(QDomDocument &domInputFile) const;
399  void loadToolTips ();
400  bool maybeSave();
401  DocumentModelExportFormat modelExportOverride (const DocumentModelExportFormat &modelExportFormatBefore,
402  const ExportToFile &exportStrategy,
403  const QString &selectedNameFilter) const;
404  bool modeGraph () const; // True if document is loaded and it has all graphs
405  bool modeMap () const; // True of document is loaded and it has all maps
406  void rebuildRecentFileListForCurrentFile(const QString &filePath);
407  bool saveDocumentFile(const QString &fileName);
408  QString saveErrorReportFileAndExitXml (const char *comment,
409  const char *file,
410  int line,
411  const char *context) const;
412  void saveStartingDocumentSnapshot();
413  void setCurrentFile(const QString &fileName);
414  void setCurrentPathFromFile (const QString &fileName);
415  void setPixmap (const QString &curveSelected,
416  const QPixmap &pixmap);
417  void settingsRead (bool isReset);
418  void settingsReadEnvironment (QSettings &settings);
419  void settingsReadMainWindow (QSettings &settings);
420  void settingsWrite ();
421  bool setupAfterLoadNewDocument (const QString &fileName,
422  const QString &temporaryMessage,
423  ImportType ImportType);
424  bool setupAfterLoadReplacingImage (const QString &fileName,
425  const QString &temporaryMessage,
426  ImportType ImportType);
427  void startRegressionTestErrorReport (const QString &regressionInputFile);
428  void startRegressionTestFileCmdScript ();
429  void updateAfterCommandStatusBarCoords ();
430  void updateChecklistGuide ();
431  void updateControls (); // Update the widgets (typically in terms of show/hide state) depending on the application state.
432  void updateFittingWindow ();
433  void updateGeometryWindow ();
434  void updateGridLines();
435  void updateHighlightOpacity();
436  void updateRecentFileList();
437  void updateSettingsMainWindow();
438  void updateSmallDialogs();
439  void updateTransformationAndItsDependencies();
440  void updateViewedCurves ();
441  void updateViewsOfSettings (); // Private version gets active curve name from DigitizeContext
442  void updateWindowTitle ();
443  void writeCheckpointToLogFile();
444 
445  QString m_originalFile; // Original filename for error report
446  bool m_originalFileWasImported; // True/false for imported/opened
447  bool m_isDocumentExported;
448  QString m_engaugeFile; // Not empty when a Document is currently loaded AND it was loaded and/or saved as an Engauge file
449  QString m_currentFile; // Not empty when a Document is currently loaded. No path or file extension
450  QString m_currentFileWithPathAndFileExtension; // Adds path and file extension to m_currentFile. For display
451  MainTitleBarFormat m_titleBarFormat;
452 
453  QMenu *m_menuFile;
454  QAction *m_actionImport;
455  QAction *m_actionImportAdvanced;
456  QAction *m_actionImportImageReplace;
457  QAction *m_actionOpen;
458  QMenu *m_menuFileOpenRecent;
459  QList<QAction*> m_actionRecentFiles;
460  QAction *m_actionClose;
461  QAction *m_actionSave;
462  QAction *m_actionSaveAs;
463  QAction *m_actionExport;
464  QAction *m_actionPrint;
465  QAction *m_actionExit;
466 
467  QMenu *m_menuEdit;
468  QAction *m_actionEditUndo;
469  QAction *m_actionEditRedo;
470  QAction *m_actionEditCut;
471  QAction *m_actionEditCopy;
472  QAction *m_actionEditPaste;
473  QAction *m_actionEditDelete;
474  QAction *m_actionEditPasteAsNew;
475  QAction *m_actionEditPasteAsNewAdvanced;
476 
477  QMenu *m_menuDigitize;
478  QActionGroup *m_groupDigitize;
479  QAction *m_actionDigitizeSelect;
480  QAction *m_actionDigitizeAxis;
481  QAction *m_actionDigitizeScale;
482  QAction *m_actionDigitizeCurve;
483  QAction *m_actionDigitizePointMatch;
484  QAction *m_actionDigitizeColorPicker;
485  QAction *m_actionDigitizeSegment;
486 
487  QMenu *m_menuView;
488  QAction *m_actionViewBackground;
489  QAction *m_actionViewChecklistGuide;
490  QAction *m_actionViewCoordSystem;
491  QAction *m_actionViewDigitize;
492  QAction *m_actionViewFittingWindow;
493  QAction *m_actionViewGeometryWindow;
494  QAction *m_actionViewSettingsViews;
495  QAction *m_actionViewToolTips;
496  QAction *m_actionViewGridLines;
497  QMenu *m_menuViewBackground;
498  QActionGroup *m_groupBackground;
499  QAction *m_actionViewBackgroundNone;
500  QAction *m_actionViewBackgroundOriginal;
501  QAction *m_actionViewBackgroundFiltered;
502  QMenu *m_menuViewCurves;
503  QActionGroup *m_groupCurves;
504  QAction *m_actionViewCurvesNone;
505  QAction *m_actionViewCurvesSelected;
506  QAction *m_actionViewCurvesAll;
507  QMenu *m_menuViewStatus;
508  QActionGroup *m_groupStatus;
509  QAction *m_actionStatusNever;
510  QAction *m_actionStatusTemporary;
511  QAction *m_actionStatusAlways;
512  QMenu *m_menuViewZoom;
513  QAction *m_actionZoomOut;
514  QAction *m_actionZoomIn;
515  QActionGroup *m_groupZoom;
516  QAction *m_actionZoomFill;
517  QAction *m_actionZoom16To1;
518  QAction *m_actionZoom8To1;
519  QAction *m_actionZoom4To1;
520  QAction *m_actionZoom2To1;
521  QAction *m_actionZoom1To1;
522  QAction *m_actionZoom1To2;
523  QAction *m_actionZoom1To4;
524  QAction *m_actionZoom1To8;
525  QAction *m_actionZoom1To16;
526 
527  QMenu *m_menuSettings;
528  QAction *m_actionSettingsAxesChecker;
529  QAction *m_actionSettingsColorFilter;
530  QAction *m_actionSettingsCoords;
531  QAction *m_actionSettingsCurveAddRemove;
532  QAction *m_actionSettingsCurveProperties;
533  QAction *m_actionSettingsDigitizeCurve;
534  QAction *m_actionSettingsExport;
535  QAction *m_actionSettingsGeneral;
536  QAction *m_actionSettingsGridDisplay;
537  QAction *m_actionSettingsGridRemoval;
538  QAction *m_actionSettingsMainWindow;
539  QAction *m_actionSettingsPointMatch;
540  QAction *m_actionSettingsSegments;
541 
542  QMenu *m_menuHelp;
543  QAction *m_actionHelpAbout;
544  QAction *m_actionHelpChecklistGuideWizard;
545  QAction *m_actionHelpHelp;
546  QAction *m_actionHelpTutorial;
547  QAction *m_actionHelpWhatsThis;
548 
549  QVBoxLayout *m_layout;
550  GraphicsScene *m_scene;
551  GraphicsView *m_view;
552 
553  StatusBar *m_statusBar;
554  Transformation m_transformation;
555 
556  QComboBox *m_cmbCurve;
557  QToolBar *m_toolDigitize;
558  LoadImageFromUrl *m_loadImageFromUrl;
559 
560  QComboBox *m_cmbBackground;
561  QToolBar *m_toolBackground;
562 
563  ViewPointStyle *m_viewPointStyle;
564  ViewSegmentFilter *m_viewSegmentFilter;
565  QToolBar *m_toolSettingsViews;
566  ChecklistGuide *m_dockChecklistGuide;
567  FittingWindow *m_dockFittingWindow;
568  GeometryWindow *m_dockGeometryWindow;
569 
570  QComboBox *m_cmbCoordSystem;
571  QPushButton *m_btnPrintAll;
572  QPushButton *m_btnShowAll;
573  QToolBar *m_toolCoordSystem;
574 
575  HelpWindow *m_helpWindow;
576  TutorialDlg *m_tutorialDlg;
577 
578  CmdMediator *m_cmdMediator;
579  CmdStackShadow *m_cmdStackShadow;
580 
581  // State machine for user interface states
582  DigitizeStateContext *m_digitizeStateContext;
583 
584  // State machine for transformation states
585  TransformationStateContext *m_transformationStateContext;
586 
587  // State machine for background image
588  BackgroundStateContext *m_backgroundStateContext;
589 
590  DlgSettingsAxesChecker *m_dlgSettingsAxesChecker;
591  DlgSettingsColorFilter *m_dlgSettingsColorFilter;
592  DlgSettingsCoords *m_dlgSettingsCoords;
593  DlgSettingsCurveAddRemove *m_dlgSettingsCurveAddRemove;
594  DlgSettingsCurveProperties *m_dlgSettingsCurveProperties;
595  DlgSettingsDigitizeCurve * m_dlgSettingsDigitizeCurve;
596  DlgSettingsExportFormat *m_dlgSettingsExportFormat;
597  DlgSettingsGeneral *m_dlgSettingsGeneral;
598  DlgSettingsGridDisplay *m_dlgSettingsGridDisplay;
599  DlgSettingsGridRemoval *m_dlgSettingsGridRemoval;
600  DlgSettingsMainWindow *m_dlgSettingsMainWindow;
601  DlgSettingsPointMatch *m_dlgSettingsPointMatch;
602  DlgSettingsSegments *m_dlgSettingsSegments;
603 
604  // Crash reports
605  QString m_startingDocumentSnapshot; // Serialized snapshot of document at startup. Included in error report if user approves
606  NetworkClient *m_networkClient;
607 
608  // Main window settings
609  bool m_isGnuplot; // From command line
610  MainWindowModel m_modelMainWindow; // From settings file or DlgSettingsMainWindow
611 
612  // File names to be loaded at startup. Only one is loaded into the current instance, with external instances created for the other files
613  QTimer *m_timerLoadStartupFiles;
614  QStringList m_loadStartupFiles;
615 
616  // Ghosts that are created for seeing all coordinate systems at once, when there are multiple coordinate systems
617  Ghosts *m_ghosts;
618 
619  // Timers for regression testing. Neither or one is first started by the constructor for this class, but the first timeout
620  // (and all succeeding timeouts) will be from after QMainWindow::exec is called. Each timeout results in one command
621  // from the command stack getting executed
622  QTimer *m_timerRegressionErrorReport;
623  FileCmdScript *m_fileCmdScript;
624  bool m_isErrorReportRegressionTest;
625  QTimer *m_timerRegressionFileCmdScript;
626  QString m_regressionFile;
627  QString m_startupDirectory; // Used to restore original directory just before outputing regression test results, since
628  // directory changes when settings are read, and also when files are opened or imported.
629  // Restoring the directory means relative paths in the regression scripts will work consistently
630 
631  // Grid lines
632  GridLines m_gridLines;
633 
634  // Map between zoom enumerations. This eliminates the need for a switch statement
635  QMap<ZoomFactorInitial, ZoomFactor> m_zoomMap;
636 
637  // Fitted curve. Null if not currently applicable/defined
638  FittingCurve *m_fittingCurve;
639 };
640 
641 #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:290
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:316
CmdMediator * cmdMediator()
Accessor for commands to process the Document.
Definition: MainWindow.cpp:324
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:298
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: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:33
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.