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