Engauge Digitizer 2
|
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document Interface. More...
#include <MainWindow.h>
Signals | |
void | signalDropRegression (QString) |
Send drag and drop regression test url. | |
void | signalGong () |
Send wakeup signal to unit test framework when all other commands have finished executing. | |
void | signalZoom (int) |
Send zoom selection, picked from menu or keystroke, to StatusBar. |
Public Member Functions | |
MainWindow (const QString &errorReportFile, const QString &fileCmdScriptFile, bool isDropRegression, bool isRegressionTest, bool isGnuplot, bool isReset, bool isExportOnly, bool isExtractImageOnly, const QString &extractImageOnlyExtension, const QStringList &loadStartupFiles, const QStringList &commandLineWithoutLoadStartupFiles, QWidget *parent=nullptr) | |
Single constructor. | |
~MainWindow () | |
void | cmdFileClose () |
Close file. This is called from a file script command. | |
void | cmdFileExport (const QString &fileName) |
Export file. This is called from a file script command. | |
void | cmdFileImport (const QString &fileName) |
Import file. This is called from a file script command. | |
void | cmdFileOpen (const QString &fileName) |
Open file. This is called from a file script command. | |
CmdMediator * | cmdMediator () |
Accessor for commands to process the Document. | |
DigitizeState | digitizeState () const |
Get DigitizeState. This should only be used to populate arguments in CmdAbstract constructor! | |
virtual bool | eventFilter (QObject *, QEvent *) |
Catch secret keypresses. | |
void | guidelineAddXT (const QString &identifier, double xT) |
Add a X/T Guideline. | |
void | guidelineAddYR (const QString &identifier, double yR) |
Add a Y/R Guideline. | |
void | guidelineMoveXT (const QString &identifier, double xTAfter) |
Move a X/T Guideline. | |
void | guidelineMoveYR (const QString &identifier, double yRAfter) |
Move a Y/R Guideline. | |
void | guidelineRemove (const QString &identifier) |
Remove a X/T or Y/R Guideline. | |
bool | guidelinesAreVisible () const |
True/false if guidelines are visible. Selectability is handled elsewhere. | |
void | handleGuidelinesActiveChange (bool active) |
Handle Guidelines active status toggle. | |
QImage | imageFiltered () const |
Background image that has been filtered for the current curve. This asserts if a curve-specific image is not being shown. | |
bool | isGnuplot () const |
Get method for gnuplot flag. | |
MainWindowModel | modelMainWindow () const |
Get method for main window model. | |
bool | modeMap () const |
True if document scale is set using a scale bar, otherwise using axis points. | |
void | resizeEvent (QResizeEvent *event) |
Intercept resize event so graphics scene can be appropriately resized when in Fill mode. | |
void | saveErrorReportFileAndExit (const char *comment, const char *file, int line, const char *context) |
Save error report and exit. | |
GraphicsScene & | scene () |
Scene container for the QImage and QGraphicsItems. | |
BackgroundImage | selectOriginal (BackgroundImage backgroundImage) |
Make original background visible, for DigitizeStateColorPicker. | |
QString | selectedGraphCurve () const |
Curve name that is currently selected in m_cmbCurve. | |
void | sendGong () |
Send signal to unit test framework indicating all commands have finished executing. | |
virtual void | showEvent (QShowEvent *) |
Processing performed after gui becomes available. | |
void | showTemporaryMessage (const QString &temporaryMessage) |
Show temporary message in status bar. | |
Transformation | transformation () const |
Return read-only copy of transformation. | |
bool | transformIsDefined () const |
Return true if all three axis points have been defined. | |
void | updateAfterCommand () |
See GraphicsScene::updateAfterCommand. | |
void | updateAfterMouseRelease () |
Call MainWindow::updateControls (which is private) after the very specific case - a mouse press/release. | |
void | updateCoordSystem (CoordSystemIndex coordSystemIndex) |
Select a different CoordSystem. | |
void | updateDigitizeStateIfSoftwareTriggered (DigitizeState digitizeState) |
After software-triggered state transition, this method manually triggers the action as if user had clicked on digitize button. | |
void | updateGraphicsLinesToMatchGraphicsPoints () |
Update the graphics lines so they follow the graphics points, after a drag, addition, removal, and such. | |
void | updateSettingsAxesChecker (const DocumentModelAxesChecker &modelAxesChecker) |
Update with new axes indicator properties. | |
void | updateSettingsColorFilter (const DocumentModelColorFilter &modelColorFilter) |
Update with new color filter properties. | |
void | updateSettingsCoords (const DocumentModelCoords &modelCoords) |
Update with new coordinate properties. | |
void | updateSettingsCurveList (const CurvesGraphs &curvesGraphs) |
Update with new curves. | |
void | updateSettingsCurveStyles (const CurveStyles &modelCurveStyles) |
Update with new curve styles. | |
void | updateSettingsDigitizeCurve (const DocumentModelDigitizeCurve &modelDigitizeCurve) |
Update with new curve digitization styles. | |
void | updateSettingsExportFormat (const DocumentModelExportFormat &modelExport) |
Update with new export properties. | |
void | updateSettingsGeneral (const DocumentModelGeneral &modelGeneral) |
Update with new general properties. | |
void | updateSettingsGridDisplay (const DocumentModelGridDisplay &modelGridDisplay) |
Update with new grid display properties. | |
void | updateSettingsGridRemoval (const DocumentModelGridRemoval &modelGridRemoval) |
Update with new grid removal properties. | |
void | updateSettingsGuideline (const DocumentModelGuideline &modelGuideline) |
Update with new guideline properties. | |
void | updateSettingsMainWindow (const MainWindowModel &modelMainWindow) |
Update with new main window properties. | |
void | updateSettingsPointMatch (const DocumentModelPointMatch &modelPointMatch) |
Update with new point match properties. | |
void | updateSettingsSegments (const DocumentModelSegments &modelSegments) |
Update with new segments properties. | |
void | updateViewsOfSettings (const QString &activeCurve) |
Update curve-specific view of settings. Private version gets active curve name from DigitizeStateContext. | |
GraphicsView & | view () |
View for the QImage and QGraphicsItems, without const. | |
const GraphicsView & | view () const |
View for the QImage and QGraphicsItems, without const. |
Friends | |
class | CreateActions |
For simplifying this class by moving initialization to other classes. | |
class | CreateCentralWidget |
class | CreateCommandStackShadow |
class | CreateDockableWidgets |
class | CreateFacade |
class | CreateHelpWindow |
class | CreateIcons |
class | CreateLoadImage |
class | CreateMenus |
class | CreateNetwork |
class | CreateScene |
class | CreateSettingsDialogs |
class | CreateStateContexts |
class | CreateStatusBar |
class | CreateToolBars |
class | CreateTutorial |
class | CreateZoomMaps |
class | TestExport |
For unit testing. | |
class | TestGuidelines |
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document Interface.
Definition at line 94 of file MainWindow.h.
MainWindow::MainWindow | ( | const QString & | errorReportFile, |
const QString & | fileCmdScriptFile, | ||
bool | isDropRegression, | ||
bool | isRegressionTest, | ||
bool | isGnuplot, | ||
bool | isReset, | ||
bool | isExportOnly, | ||
bool | isExtractImageOnly, | ||
const QString & | extractImageOnlyExtension, | ||
const QStringList & | loadStartupFiles, | ||
const QStringList & | commandLineWithoutLoadStartupFiles, | ||
QWidget * | parent = nullptr ) |
Single constructor.
errorReportFile | Optional error report file to be read at startup. Empty if unused. Incompatible with fileCmdScript |
fileCmdScriptFile | Optional file command script file to be read at startup. Empty if unused. Incompatible with errorReportFile |
isDropRegression | True if files loaded at startup are for drag and drop testing |
isRegressionTest | True if errorReportFile or fileCmdScript is for regression testing, in which case it is executed and the program exits |
isGnuplot | True if diagnostic gnuplot files are generated for math-intense sections of the code. Used for development and debugging |
isReset | True to reset all settings that would otherwise be restored from the previous execution of Engauge |
isExportOnly | True to export the loaded startup file and then exit |
isExtractImageOnly | True to extract the image from the loaded startup file and then exit |
extractImageOnlyExtension | File extension for extracted image for isExtractImageOnly |
loadStartupFiles | Zero or more Engauge document files to load at startup. A separate instance of Engauge is created for each file |
commandLineWithoutLoadStartupFiles | Command line arguments without load startup files. Used for spawning additional processes |
parent | Optional parent widget for this widget |
Definition at line 144 of file MainWindow.cpp.
MainWindow::~MainWindow | ( | ) |
Definition at line 246 of file MainWindow.cpp.
void MainWindow::cmdFileClose | ( | ) |
Close file. This is called from a file script command.
Definition at line 334 of file MainWindow.cpp.
void MainWindow::cmdFileExport | ( | const QString & | fileName | ) |
Export file. This is called from a file script command.
Definition at line 342 of file MainWindow.cpp.
void MainWindow::cmdFileImport | ( | const QString & | fileName | ) |
Import file. This is called from a file script command.
Definition at line 351 of file MainWindow.cpp.
void MainWindow::cmdFileOpen | ( | const QString & | fileName | ) |
Open file. This is called from a file script command.
Definition at line 360 of file MainWindow.cpp.
CmdMediator * MainWindow::cmdMediator | ( | ) |
Accessor for commands to process the Document.
Definition at line 368 of file MainWindow.cpp.
DigitizeState MainWindow::digitizeState | ( | ) | const |
Get DigitizeState. This should only be used to populate arguments in CmdAbstract constructor!
Definition at line 390 of file MainWindow.cpp.
|
virtual |
Catch secret keypresses.
Definition at line 395 of file MainWindow.cpp.
void MainWindow::guidelineAddXT | ( | const QString & | identifier, |
double | xT ) |
Add a X/T Guideline.
Definition at line 867 of file MainWindow.cpp.
void MainWindow::guidelineAddYR | ( | const QString & | identifier, |
double | yR ) |
Add a Y/R Guideline.
Definition at line 894 of file MainWindow.cpp.
void MainWindow::guidelineMoveXT | ( | const QString & | identifier, |
double | xTAfter ) |
Move a X/T Guideline.
Definition at line 921 of file MainWindow.cpp.
void MainWindow::guidelineMoveYR | ( | const QString & | identifier, |
double | yRAfter ) |
Move a Y/R Guideline.
Definition at line 934 of file MainWindow.cpp.
void MainWindow::guidelineRemove | ( | const QString & | identifier | ) |
Remove a X/T or Y/R Guideline.
Definition at line 947 of file MainWindow.cpp.
bool MainWindow::guidelinesAreVisible | ( | ) | const |
True/false if guidelines are visible. Selectability is handled elsewhere.
Definition at line 963 of file MainWindow.cpp.
void MainWindow::handleGuidelinesActiveChange | ( | bool | active | ) |
Handle Guidelines active status toggle.
Definition at line 968 of file MainWindow.cpp.
QImage MainWindow::imageFiltered | ( | ) | const |
Background image that has been filtered for the current curve. This asserts if a curve-specific image is not being shown.
Definition at line 993 of file MainWindow.cpp.
bool MainWindow::isGnuplot | ( | ) | const |
Get method for gnuplot flag.
Definition at line 998 of file MainWindow.cpp.
MainWindowModel MainWindow::modelMainWindow | ( | ) | const |
Get method for main window model.
Definition at line 1368 of file MainWindow.cpp.
bool MainWindow::modeMap | ( | ) | const |
True if document scale is set using a scale bar, otherwise using axis points.
Definition at line 1357 of file MainWindow.cpp.
void MainWindow::resizeEvent | ( | QResizeEvent * | event | ) |
Intercept resize event so graphics scene can be appropriately resized when in Fill mode.
Definition at line 1391 of file MainWindow.cpp.
void MainWindow::saveErrorReportFileAndExit | ( | const char * | comment, |
const char * | file, | ||
int | line, | ||
const char * | context ) |
Save error report and exit.
Definition at line 1442 of file MainWindow.cpp.
GraphicsScene & MainWindow::scene | ( | ) |
Scene container for the QImage and QGraphicsItems.
Definition at line 1597 of file MainWindow.cpp.
QString MainWindow::selectedGraphCurve | ( | ) | const |
Curve name that is currently selected in m_cmbCurve.
Definition at line 1617 of file MainWindow.cpp.
BackgroundImage MainWindow::selectOriginal | ( | BackgroundImage | backgroundImage | ) |
Make original background visible, for DigitizeStateColorPicker.
This returns the previous background state for restoring when state finishes
Definition at line 1603 of file MainWindow.cpp.
void MainWindow::sendGong | ( | ) |
Send signal to unit test framework indicating all commands have finished executing.
Definition at line 1622 of file MainWindow.cpp.
|
virtual |
Processing performed after gui becomes available.
Definition at line 2054 of file MainWindow.cpp.
void MainWindow::showTemporaryMessage | ( | const QString & | temporaryMessage | ) |
Show temporary message in status bar.
Definition at line 2072 of file MainWindow.cpp.
|
signal |
Send drag and drop regression test url.
|
signal |
Send wakeup signal to unit test framework when all other commands have finished executing.
|
signal |
Send zoom selection, picked from menu or keystroke, to StatusBar.
Transformation MainWindow::transformation | ( | ) | const |
Return read-only copy of transformation.
Definition at line 3484 of file MainWindow.cpp.
bool MainWindow::transformIsDefined | ( | ) | const |
Return true if all three axis points have been defined.
Definition at line 3489 of file MainWindow.cpp.
void MainWindow::updateAfterCommand | ( | ) |
See GraphicsScene::updateAfterCommand.
Definition at line 3494 of file MainWindow.cpp.
void MainWindow::updateAfterMouseRelease | ( | ) |
Call MainWindow::updateControls (which is private) after the very specific case - a mouse press/release.
Definition at line 3574 of file MainWindow.cpp.
void MainWindow::updateCoordSystem | ( | CoordSystemIndex | coordSystemIndex | ) |
Select a different CoordSystem.
Definition at line 3675 of file MainWindow.cpp.
void MainWindow::updateDigitizeStateIfSoftwareTriggered | ( | DigitizeState | digitizeState | ) |
After software-triggered state transition, this method manually triggers the action as if user had clicked on digitize button.
Definition at line 3700 of file MainWindow.cpp.
void MainWindow::updateGraphicsLinesToMatchGraphicsPoints | ( | ) |
Update the graphics lines so they follow the graphics points, after a drag, addition, removal, and such.
The points in the Document may (and probably are) out of date with respect to the graphics points
Definition at line 3779 of file MainWindow.cpp.
void MainWindow::updateSettingsAxesChecker | ( | const DocumentModelAxesChecker & | modelAxesChecker | ) |
Update with new axes indicator properties.
Definition at line 3864 of file MainWindow.cpp.
void MainWindow::updateSettingsColorFilter | ( | const DocumentModelColorFilter & | modelColorFilter | ) |
Update with new color filter properties.
Definition at line 3884 of file MainWindow.cpp.
void MainWindow::updateSettingsCoords | ( | const DocumentModelCoords & | modelCoords | ) |
Update with new coordinate properties.
Definition at line 3898 of file MainWindow.cpp.
void MainWindow::updateSettingsCurveList | ( | const CurvesGraphs & | curvesGraphs | ) |
Update with new curves.
Definition at line 3905 of file MainWindow.cpp.
void MainWindow::updateSettingsCurveStyles | ( | const CurveStyles & | modelCurveStyles | ) |
Update with new curve styles.
Definition at line 3914 of file MainWindow.cpp.
void MainWindow::updateSettingsDigitizeCurve | ( | const DocumentModelDigitizeCurve & | modelDigitizeCurve | ) |
Update with new curve digitization styles.
Definition at line 3923 of file MainWindow.cpp.
void MainWindow::updateSettingsExportFormat | ( | const DocumentModelExportFormat & | modelExport | ) |
Update with new export properties.
Definition at line 3932 of file MainWindow.cpp.
void MainWindow::updateSettingsGeneral | ( | const DocumentModelGeneral & | modelGeneral | ) |
Update with new general properties.
Definition at line 3939 of file MainWindow.cpp.
void MainWindow::updateSettingsGridDisplay | ( | const DocumentModelGridDisplay & | modelGridDisplay | ) |
Update with new grid display properties.
Definition at line 3946 of file MainWindow.cpp.
void MainWindow::updateSettingsGridRemoval | ( | const DocumentModelGridRemoval & | modelGridRemoval | ) |
Update with new grid removal properties.
Definition at line 3954 of file MainWindow.cpp.
void MainWindow::updateSettingsGuideline | ( | const DocumentModelGuideline & | modelGuideline | ) |
Update with new guideline properties.
Definition at line 3961 of file MainWindow.cpp.
void MainWindow::updateSettingsMainWindow | ( | const MainWindowModel & | modelMainWindow | ) |
Update with new main window properties.
Definition at line 3998 of file MainWindow.cpp.
void MainWindow::updateSettingsPointMatch | ( | const DocumentModelPointMatch & | modelPointMatch | ) |
Update with new point match properties.
Definition at line 4006 of file MainWindow.cpp.
void MainWindow::updateSettingsSegments | ( | const DocumentModelSegments & | modelSegments | ) |
Update with new segments properties.
Definition at line 4013 of file MainWindow.cpp.
void MainWindow::updateViewsOfSettings | ( | const QString & | activeCurve | ) |
Update curve-specific view of settings. Private version gets active curve name from DigitizeStateContext.
Definition at line 4091 of file MainWindow.cpp.
GraphicsView & MainWindow::view | ( | ) |
View for the QImage and QGraphicsItems, without const.
Definition at line 4150 of file MainWindow.cpp.
const GraphicsView & MainWindow::view | ( | ) | const |
View for the QImage and QGraphicsItems, without const.
Definition at line 4156 of file MainWindow.cpp.
|
friend |
For simplifying this class by moving initialization to other classes.
Definition at line 99 of file MainWindow.h.
|
friend |
Definition at line 100 of file MainWindow.h.
|
friend |
Definition at line 101 of file MainWindow.h.
|
friend |
Definition at line 102 of file MainWindow.h.
|
friend |
Definition at line 103 of file MainWindow.h.
|
friend |
Definition at line 104 of file MainWindow.h.
|
friend |
Definition at line 105 of file MainWindow.h.
|
friend |
Definition at line 106 of file MainWindow.h.
|
friend |
Definition at line 107 of file MainWindow.h.
|
friend |
Definition at line 108 of file MainWindow.h.
|
friend |
Definition at line 109 of file MainWindow.h.
|
friend |
Definition at line 110 of file MainWindow.h.
|
friend |
Definition at line 111 of file MainWindow.h.
|
friend |
Definition at line 112 of file MainWindow.h.
|
friend |
Definition at line 113 of file MainWindow.h.
|
friend |
Definition at line 114 of file MainWindow.h.
|
friend |
Definition at line 115 of file MainWindow.h.
|
friend |
For unit testing.
Definition at line 118 of file MainWindow.h.
|
friend |
Definition at line 119 of file MainWindow.h.