Engauge Digitizer 2
Loading...
Searching...
No Matches
Signals | Public Member Functions | List of all members
MainWindow Class Reference

Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document Interface. More...

#include <MainWindow.h>

Inheritance diagram for MainWindow:

Signals

void signalZoom (int)
 Send zoom selection, picked from menu or keystroke, to StatusBar.
 

Public Member Functions

 MainWindow (const QString &errorReportFile, const QString &fileCmdScriptFile, bool isRegressionTest, bool isGnuplot, QStringList loadStartupFiles, QWidget *parent=0)
 Single constructor.
 
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.
 
CmdMediatorcmdMediator ()
 Accessor for commands to process the Document.
 
virtual bool eventFilter (QObject *, QEvent *)
 Catch secret keypresses.
 
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.
 
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) const
 Save error report and exit.
 
GraphicsScenescene ()
 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.
 
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 updateSettingsCurveAddRemove (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 updateSettingsGridRemoval (const DocumentModelGridRemoval &modelGridRemoval)
 Update with new grid removal 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.
 
GraphicsViewview ()
 View for the QImage and QGraphicsItems, without const.
 
const GraphicsViewview () const
 View for the QImage and QGraphicsItems, without const.
 

Detailed Description

Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document Interface.

Definition at line 77 of file MainWindow.h.

Constructor & Destructor Documentation

◆ MainWindow()

MainWindow::MainWindow ( const QString &  errorReportFile,
const QString &  fileCmdScriptFile,
bool  isRegressionTest,
bool  isGnuplot,
QStringList  loadStartupFiles,
QWidget *  parent = 0 
)

Single constructor.

Parameters
errorReportFileOptional error report file to be read at startup. Empty if unused. Incompatible with fileCmdScript
fileCmdScriptFileOptional file command script file to be read at startup. Empty if unused. Incompatible with errorReportFile
isRegressionTestTrue if errorReportFile or fileCmdScript is for regression testing, in which case it is executed and the program exits
isGnuplotTrue if diagnostic gnuplot files are generated for math-intense sections of the code. Used for development and debugging
loadStartupFilesZero or more Engauge document files to load at startup. A separate instance of Engauge is created for each file
parentOptional parent widget for this widget

Definition at line 124 of file MainWindow.cpp.

◆ ~MainWindow()

MainWindow::~MainWindow ( )

Definition at line 198 of file MainWindow.cpp.

Member Function Documentation

◆ cmdFileClose()

void MainWindow::cmdFileClose ( )

Close file. This is called from a file script command.

Definition at line 271 of file MainWindow.cpp.

◆ cmdFileExport()

void MainWindow::cmdFileExport ( const QString &  fileName)

Export file. This is called from a file script command.

Definition at line 279 of file MainWindow.cpp.

◆ cmdFileImport()

void MainWindow::cmdFileImport ( const QString &  fileName)

Import file. This is called from a file script command.

Definition at line 288 of file MainWindow.cpp.

◆ cmdFileOpen()

void MainWindow::cmdFileOpen ( const QString &  fileName)

Open file. This is called from a file script command.

Definition at line 297 of file MainWindow.cpp.

◆ cmdMediator()

CmdMediator * MainWindow::cmdMediator ( )

Accessor for commands to process the Document.

Definition at line 305 of file MainWindow.cpp.

◆ eventFilter()

bool MainWindow::eventFilter ( QObject *  target,
QEvent *  event 
)
virtual

Catch secret keypresses.

Definition at line 1261 of file MainWindow.cpp.

◆ imageFiltered()

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 1567 of file MainWindow.cpp.

◆ isGnuplot()

bool MainWindow::isGnuplot ( ) const

Get method for gnuplot flag.

Definition at line 1572 of file MainWindow.cpp.

◆ modelMainWindow()

MainWindowModel MainWindow::modelMainWindow ( ) const

Get method for main window model.

Definition at line 1883 of file MainWindow.cpp.

◆ resizeEvent()

void MainWindow::resizeEvent ( QResizeEvent *  event)

Intercept resize event so graphics scene can be appropriately resized when in Fill mode.

Definition at line 1906 of file MainWindow.cpp.

◆ saveErrorReportFileAndExit()

void MainWindow::saveErrorReportFileAndExit ( const char *  comment,
const char *  file,
int  line,
const char *  context 
) const

Save error report and exit.

Definition at line 1953 of file MainWindow.cpp.

◆ scene()

GraphicsScene & MainWindow::scene ( )

Scene container for the QImage and QGraphicsItems.

Definition at line 2094 of file MainWindow.cpp.

◆ selectedGraphCurve()

QString MainWindow::selectedGraphCurve ( ) const

Curve name that is currently selected in m_cmbCurve.

Definition at line 2114 of file MainWindow.cpp.

◆ selectOriginal()

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 2100 of file MainWindow.cpp.

◆ showEvent()

void MainWindow::showEvent ( QShowEvent *  event)
virtual

Processing performed after gui becomes available.

Definition at line 2407 of file MainWindow.cpp.

◆ showTemporaryMessage()

void MainWindow::showTemporaryMessage ( const QString &  temporaryMessage)

Show temporary message in status bar.

Definition at line 2424 of file MainWindow.cpp.

◆ transformation()

Transformation MainWindow::transformation ( ) const

Return read-only copy of transformation.

Definition at line 3671 of file MainWindow.cpp.

◆ transformIsDefined()

bool MainWindow::transformIsDefined ( ) const

Return true if all three axis points have been defined.

Definition at line 3676 of file MainWindow.cpp.

◆ updateAfterCommand()

void MainWindow::updateAfterCommand ( )

See GraphicsScene::updateAfterCommand.

Definition at line 3681 of file MainWindow.cpp.

◆ updateAfterMouseRelease()

void MainWindow::updateAfterMouseRelease ( )

Call MainWindow::updateControls (which is private) after the very specific case - a mouse press/release.

Definition at line 3751 of file MainWindow.cpp.

◆ updateCoordSystem()

void MainWindow::updateCoordSystem ( CoordSystemIndex  coordSystemIndex)

Select a different CoordSystem.

Definition at line 3818 of file MainWindow.cpp.

◆ updateDigitizeStateIfSoftwareTriggered()

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 3833 of file MainWindow.cpp.

◆ updateGraphicsLinesToMatchGraphicsPoints()

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 3877 of file MainWindow.cpp.

◆ updateSettingsAxesChecker()

void MainWindow::updateSettingsAxesChecker ( const DocumentModelAxesChecker modelAxesChecker)

Update with new axes indicator properties.

Definition at line 3913 of file MainWindow.cpp.

◆ updateSettingsColorFilter()

void MainWindow::updateSettingsColorFilter ( const DocumentModelColorFilter modelColorFilter)

Update with new color filter properties.

Definition at line 3931 of file MainWindow.cpp.

◆ updateSettingsCoords()

void MainWindow::updateSettingsCoords ( const DocumentModelCoords modelCoords)

Update with new coordinate properties.

Definition at line 3943 of file MainWindow.cpp.

◆ updateSettingsCurveAddRemove()

void MainWindow::updateSettingsCurveAddRemove ( const CurvesGraphs curvesGraphs)

Update with new curves.

Definition at line 3950 of file MainWindow.cpp.

◆ updateSettingsCurveStyles()

void MainWindow::updateSettingsCurveStyles ( const CurveStyles modelCurveStyles)

Update with new curve styles.

Definition at line 3959 of file MainWindow.cpp.

◆ updateSettingsDigitizeCurve()

void MainWindow::updateSettingsDigitizeCurve ( const DocumentModelDigitizeCurve modelDigitizeCurve)

Update with new curve digitization styles.

Definition at line 3968 of file MainWindow.cpp.

◆ updateSettingsExportFormat()

void MainWindow::updateSettingsExportFormat ( const DocumentModelExportFormat modelExport)

Update with new export properties.

Definition at line 3977 of file MainWindow.cpp.

◆ updateSettingsGeneral()

void MainWindow::updateSettingsGeneral ( const DocumentModelGeneral modelGeneral)

Update with new general properties.

Definition at line 3984 of file MainWindow.cpp.

◆ updateSettingsGridRemoval()

void MainWindow::updateSettingsGridRemoval ( const DocumentModelGridRemoval modelGridRemoval)

Update with new grid removal properties.

Definition at line 3991 of file MainWindow.cpp.

◆ updateSettingsMainWindow()

void MainWindow::updateSettingsMainWindow ( const MainWindowModel modelMainWindow)

Update with new main window properties.

Definition at line 4018 of file MainWindow.cpp.

◆ updateSettingsPointMatch()

void MainWindow::updateSettingsPointMatch ( const DocumentModelPointMatch modelPointMatch)

Update with new point match properties.

Definition at line 4026 of file MainWindow.cpp.

◆ updateSettingsSegments()

void MainWindow::updateSettingsSegments ( const DocumentModelSegments modelSegments)

Update with new segments properties.

Definition at line 4033 of file MainWindow.cpp.

◆ updateViewsOfSettings()

void MainWindow::updateViewsOfSettings ( const QString &  activeCurve)

Update curve-specific view of settings. Private version gets active curve name from DigitizeStateContext.

Definition at line 4084 of file MainWindow.cpp.

◆ view() [1/2]

GraphicsView & MainWindow::view ( )

View for the QImage and QGraphicsItems, without const.

Definition at line 4140 of file MainWindow.cpp.

◆ view() [2/2]

const GraphicsView & MainWindow::view ( ) const

View for the QImage and QGraphicsItems, without const.

Definition at line 4146 of file MainWindow.cpp.


The documentation for this class was generated from the following files: