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