Command queue stack. More...
#include <CmdMediator.h>
Public Member Functions | |
CmdMediator (MainWindow &mainWindow, const QImage &image) | |
Constructor for imported images and dragged images. | |
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 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. | |
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 16 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 71 of file CmdMediator.cpp.