Engauge Digitizer
2
|
Command queue stack. More...
#include <CmdMediator.h>
Public Member Functions | |
CmdMediator (MainWindow &mainWindow, const QImage &image) | |
Constructor for imported images and dragged images. Only one coordinate system is created but others can be added later. | |
CmdMediator (MainWindow &mainWindow, const QString &fileName) | |
Constructor for opened Documents and error report files. The specified xml file is opened and read. | |
~CmdMediator () | |
Destructor. | |
const CoordSystem & | coordSystem () const |
Provide the current CoordSystem to commands with read-only access, primarily for undo/redo processing. | |
const Curve & | curveAxes () const |
See Document::curveAxes. | |
QStringList | curvesGraphsNames () const |
See CurvesGraphs::curvesGraphsNames. | |
int | curvesGraphsNumPoints (const QString &curveName) const |
See CurvesGraphs::curvesGraphsNumPoints. | |
Document & | document () |
Provide the Document to commands, primarily for undo/redo processing. | |
const Document & | document () const |
Provide the Document to commands with read-only access, primarily for undo/redo processing. | |
bool | isModified () const |
Dirty flag. More... | |
void | iterateThroughCurvePointsAxes (const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback) |
See Curve::iterateThroughCurvePoints, for the single axes curve. | |
void | iterateThroughCurvePointsAxes (const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback) const |
See Curve::iterateThroughCurvePoints, for the single axes curve. | |
void | iterateThroughCurvesPointsGraphs (const Functor2wRet< const QString &, const Point &, CallbackSearchReturn > &ftorWithCallback) |
See Curve::iterateThroughCurvePoints, for all the graphs curves. | |
QPixmap | pixmap () const |
See Document::pixmap. | |
QString | reasonForUnsuccessfulRead () const |
See Document::reasonForUnsuccessfulRead. | |
void | saveXml (QXmlStreamWriter &writer) const |
Serialize to xml. | |
QString | selectedCurveName () const |
Currently selected curve name. This is used to set the selected curve combobox in MainWindow. | |
void | setDocumentAxesPointsRequired (DocumentAxesPointsRequired documentAxesPointsRequired) |
Set the number of axes points required. More... | |
void | setSelectedCurveName (const QString &selectedCurveName) |
Save curve name that is selected for the current coordinate system, for the next time the coordinate system reappears. | |
bool | successfulRead () const |
Wrapper for Document::successfulRead. | |
Command queue stack.
This class lies between the Document and the rest of the application. This approach is attractive because the command stack and Document are born together, work together, and deleted together. Also, wrapping this class around Document helps to encapsulate Document that much more.
Definition at line 23 of file CmdMediator.h.
bool CmdMediator::isModified | ( | ) | const |
Dirty flag.
Document is dirty if there are any unsaved changes. The dirty flag is pushed (rather than pulled from this method) through the QUndoStack::cleanChanged signal
Definition at line 82 of file CmdMediator.cpp.
void CmdMediator::setDocumentAxesPointsRequired | ( | DocumentAxesPointsRequired | documentAxesPointsRequired | ) |
Set the number of axes points required.
This is called during the Document creation process, after imported images have been previewed or loaded files have had at least some xml parsing
Definition at line 132 of file CmdMediator.cpp.