4 #include "BackgroundImage.h"
5 #include "DigitizeStateAbstractBase.h"
9 #include "Transformation.h"
47 class QGraphicsLineItem;
90 const char *context)
const;
167 void slotCanRedoChanged (
bool);
168 void slotCanUndoChanged (
bool);
169 void slotChecklistClosed ();
170 void slotCleanChanged (
bool);
171 void slotCmbBackground(
int);
172 void slotCmbCurve(
int);
173 void slotContextMenuEvent (QString);
174 void slotDigitizeAxis ();
175 void slotDigitizeColorPicker ();
176 void slotDigitizeCurve ();
177 void slotDigitizePointMatch ();
178 void slotDigitizeSegment ();
179 void slotDigitizeSelect ();
180 void slotEditCopy ();
182 void slotEditDelete ();
183 void slotEditPaste ();
184 void slotFileExport ();
185 void slotFileImport();
186 void slotFileImportDraggedImage(QImage);
187 void slotFileImportDraggedImageUrl(QUrl);
188 void slotFileImportImage(QString, QImage);
190 void slotFilePrint();
192 bool slotFileSaveAs();
193 void slotHelpAbout();
194 void slotHelpTutorial();
195 void slotKeyPress (Qt::Key,
bool);
197 void slotMouseMove (QPointF);
198 void slotMousePress (QPointF);
199 void slotMouseRelease (QPointF);
200 void slotRecentFileAction ();
201 void slotRedoTextChanged (
const QString &);
202 void slotSetOverrideCursor (QCursor);
203 void slotSettingsAxesChecker ();
204 void slotSettingsColorFilter ();
205 void slotSettingsCommon ();
206 void slotSettingsCoords ();
207 void slotSettingsCurveAddRemove ();
208 void slotSettingsCurveProperties ();
209 void slotSettingsDigitizeCurve ();
210 void slotSettingsExportFormat ();
211 void slotSettingsGridRemoval ();
212 void slotSettingsPointMatch ();
213 void slotSettingsSegments ();
214 void slotUndoTextChanged (
const QString &);
215 void slotViewGroupBackground(QAction*);
216 void slotViewGroupCurves(QAction*);
217 void slotViewGroupStatus(QAction*);
218 void slotViewToolBarBackground ();
219 void slotViewToolBarDigitize ();
220 void slotViewToolBarChecklistGuide ();
221 void slotViewToolBarSettingsViews ();
222 void slotViewToolTips ();
223 void slotViewZoom16To1 ();
224 void slotViewZoom8To1 ();
225 void slotViewZoom4To1 ();
226 void slotViewZoom2To1 ();
227 void slotViewZoom1To1 ();
228 void slotViewZoom1To2 ();
229 void slotViewZoom1To4 ();
230 void slotViewZoom1To8 ();
231 void slotViewZoom1To16 ();
232 void slotViewZoom (
int);
233 void slotViewZoomFill ();
234 void slotViewZoomIn ();
235 void slotViewZoomOut ();
244 virtual void closeEvent(QCloseEvent *event);
245 void createActions();
246 void createActionsDigitize ();
247 void createActionsEdit ();
248 void createActionsFile ();
249 void createActionsHelp ();
250 void createActionsSettings ();
251 void createActionsView ();
252 void createCentralWidget ();
253 void createCommandStackShadow ();
254 void createHelpWindow ();
256 void createLoadImageFromUrl ();
258 void createNetwork();
260 void createSettingsDialogs ();
261 void createStateContextBackground();
262 void createStateContextDigitize();
263 void createStateContextTransformation();
264 void createStatusBar();
265 void createToolBars();
266 void createTutorial();
267 void fileImport (
const QString &fileName);
268 void loadCurveListFromCmdMediator();
269 void loadDocumentFile (
const QString &fileName);
270 void loadErrorReportFile(
const QString &initialPath,
271 const QString &errorReportFile);
272 void loadImage (
const QString &fileName,
273 const QImage &image);
274 void loadInputFileForErrorReport(QDomDocument &domInputFile)
const;
275 void loadToolTips ();
277 void rebuildRecentFileListForCurrentFile(
const QString &filePath);
278 bool saveDocumentFile(
const QString &fileName);
279 QString saveErrorReportFileAndExitXml (
const char *comment,
283 bool includeDocument)
const;
284 void saveStartingDocumentSnapshot();
285 void setCurrentFile(
const QString &fileName);
286 void setCurrentPathFromFile (
const QString &fileName);
287 void setPixmap (
const QPixmap &pixmap);
288 void settingsRead ();
289 void settingsReadEnvironment (QSettings &settings);
290 void settingsReadMainWindow (QSettings &settings);
291 void settingsWrite ();
292 void setupAfterLoad (
const QString &fileName,
293 const QString &temporaryMessage);
294 void updateAfterCommandStatusBarCoords ();
295 void updateControls ();
296 void updateRecentFileList();
297 void updateTransformationAndItsDependencies();
298 void updateViewedCurves ();
299 void updateViewsOfSettings ();
300 void writeCheckpointToLogFile();
302 QString m_originalFile;
303 bool m_originalFileWasImported;
304 bool m_isDocumentExported;
305 QString m_engaugeFile;
306 QString m_currentFile;
309 QAction *m_actionImport;
310 QAction *m_actionOpen;
311 QMenu *m_menuFileOpenRecent;
312 QList<QAction*> m_actionRecentFiles;
313 QAction *m_actionSave;
314 QAction *m_actionSaveAs;
315 QAction *m_actionExport;
316 QAction *m_actionPrint;
317 QAction *m_actionExit;
320 QAction *m_actionEditUndo;
321 QAction *m_actionEditRedo;
322 QAction *m_actionEditCut;
323 QAction *m_actionEditCopy;
324 QAction *m_actionEditPaste;
325 QAction *m_actionEditDelete;
327 QMenu *m_menuDigitize;
328 QActionGroup *m_groupDigitize;
329 QAction *m_actionDigitizeSelect;
330 QAction *m_actionDigitizeAxis;
331 QAction *m_actionDigitizeCurve;
332 QAction *m_actionDigitizePointMatch;
333 QAction *m_actionDigitizeColorPicker;
334 QAction *m_actionDigitizeSegment;
337 QAction *m_actionViewBackground;
338 QAction *m_actionViewChecklistGuide;
339 QAction *m_actionViewDigitize;
340 QAction *m_actionViewSettingsViews;
341 QAction *m_actionViewToolTips;
342 QMenu *m_menuViewBackground;
343 QActionGroup *m_groupBackground;
344 QAction *m_actionViewBackgroundNone;
345 QAction *m_actionViewBackgroundOriginal;
346 QAction *m_actionViewBackgroundFiltered;
347 QMenu *m_menuViewCurves;
348 QActionGroup *m_groupCurves;
349 QAction *m_actionViewCurvesNone;
350 QAction *m_actionViewCurvesSelected;
351 QAction *m_actionViewCurvesAll;
352 QMenu *m_menuViewStatus;
353 QActionGroup *m_groupStatus;
354 QAction *m_actionStatusNever;
355 QAction *m_actionStatusTemporary;
356 QAction *m_actionStatusAlways;
357 QMenu *m_menuViewZoom;
358 QAction *m_actionZoomOut;
359 QAction *m_actionZoomIn;
360 QActionGroup *m_groupZoom;
361 QAction *m_actionZoomFill;
362 QAction *m_actionZoom16To1;
363 QAction *m_actionZoom8To1;
364 QAction *m_actionZoom4To1;
365 QAction *m_actionZoom2To1;
366 QAction *m_actionZoom1To1;
367 QAction *m_actionZoom1To2;
368 QAction *m_actionZoom1To4;
369 QAction *m_actionZoom1To8;
370 QAction *m_actionZoom1To16;
372 QMenu *m_menuSettings;
373 QAction *m_actionSettingsAxesChecker;
374 QAction *m_actionSettingsColorFilter;
375 QAction *m_actionSettingsCommon;
376 QAction *m_actionSettingsCoords;
377 QAction *m_actionSettingsCurveAddRemove;
378 QAction *m_actionSettingsCurveProperties;
379 QAction *m_actionSettingsDigitizeCurve;
380 QAction *m_actionSettingsExport;
381 QAction *m_actionSettingsGridRemoval;
382 QAction *m_actionSettingsPointMatch;
383 QAction *m_actionSettingsSegments;
386 QAction *m_actionHelpAbout;
387 QAction *m_actionHelpChecklistGuideWizard;
388 QAction *m_actionHelpHelp;
389 QAction *m_actionHelpTutorial;
390 QAction *m_actionHelpWhatsThis;
392 QVBoxLayout *m_layout;
399 QComboBox *m_cmbCurve;
400 QToolBar *m_toolDigitize;
403 QComboBox *m_cmbBackground;
404 QToolBar *m_toolBackground;
408 QToolBar *m_toolSettingsViews;
439 QString m_startingDocumentSnapshot;
445 #endif // MAIN_WINDOW_H
Model for DlgSettingsPointMatch and CmdSettingsPointMatch.
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.
Dialog for editing point match settings, for DigitizeStatePointMatch.
Dialog for editing axes checker settings.
Transformation transformation() const
Return read-only copy of transformation.
Context class for transformation state machine.
Model for DlgSettingsCurveProperties and CmdSettingsCurveProperties.
void updateSettingsCurveAddRemove(const CurvesGraphs &curvesGraphs)
Update with new curves.
void updateSettingsCommon(const DocumentModelCommon &modelCommon)
Update with new common properties.
void updateAfterMouseRelease()
Call MainWindow::updateControls (which is private) after the very specific case - a mouse press/relea...
Model for DlgSettingsCommon and CmdSettingsCommon.
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.
CmdMediator & cmdMediator()
Accessor for commands to process the Document.
BackgroundImage selectOriginal(BackgroundImage backgroundImage)
Make original background visible, for DigitizeStateColorPicker.
Dialog for editing grid removal 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...
Dockable text window containing checklist guide.
Model for DlgSettingsDigitizeCurve and CmdSettingsDigitizeCurve.
GraphicsView & view()
View for the QImage and QGraphicsItems, without const.
Dialog for editing filtering settings.
Container for all graph curves. The axes point curve is external to this class.
Model for DlgSettingsColorFilter and CmdSettingsColorFilter.
Wrapper around QStatusBar to manage permanent widgets.
GraphicsScene & scene()
Scene container for the QImage and QGraphicsItems.
void updateSettingsCurveStyles(const CurveStyles &modelCurveStyles)
Update with new curve styles.
Client for interacting with Engauge server.
Context class that manages the background image state machine.
QGraphicsView class with event handling added. Typically the events are sent to the active digitizing...
Container for all DigitizeStateAbstractBase subclasses. This functions as the context class in a stan...
Model for DlgSettingsCoords and CmdSettingsCoords.
void updateAfterCommand()
See GraphicsScene::updateAfterCommand.
void updateSettingsColorFilter(const DocumentModelColorFilter &modelColorFilter)
Update with new color filter properties.
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.
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's point style.
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.
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 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.
Add point and line handling to generic QGraphicsScene.
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...
bool transformIsDefined() const
Return true if all three axis points have been defined.