Go to the documentation of this file.
16 #include <QGraphicsScene>
46 const QSize &size)
const
68 const QString &pointIdentifier)
71 <<
" point=" << pointIdentifier.toLatin1 ().data ();
75 const QStringList &pointIdentifiers)
78 <<
"points=" << pointIdentifiers.join(
",").toLatin1 ().data ();
91 <<
" key=" << QKeySequence (key).toString ().toLatin1 ().data ();
117 context ().mainWindow().selectedGraphCurve(),
129 return "DigitizeStateCurve";
virtual void handleKeyPress(CmdMediator *cmdMediator, Qt::Key key, bool atLeastOneSelectedItem)
Handle a key press that was intercepted earlier.
void setDragMode(QGraphicsView::DragMode dragMode)
Set QGraphicsView drag mode (in m_view). Called from DigitizeStateAbstractBase subclasses.
virtual void updateModelDigitizeCurve(CmdMediator *cmdMediator, const DocumentModelDigitizeCurve &modelDigitizeCurve)
Update the digitize curve settings.
Container for all DigitizeStateAbstractBase subclasses. This functions as the context class in a stan...
DigitizeStateContext & context()
Reference to the DigitizeStateContext that contains all the DigitizeStateAbstractBase subclasses,...
virtual void updateAfterPointAddition()
Update graphics attributes after possible new points. This is useful for highlight opacity.
virtual ~DigitizeStateCurve()
MainWindow & mainWindow()
Reference to the MainWindow, without const.
virtual void handleMouseMove(CmdMediator *cmdMediator, QPointF posScreen)
Handle a mouse move. This is part of an experiment to see if augmenting the cursor in Point Match mod...
QString selectedGraphCurve() const
Curve name that is currently selected in m_cmbCurve.
virtual void handleCurveChange(CmdMediator *cmdMediator)
Handle the selection of a new curve. At a minimum, DigitizeStateSegment will generate a new set of Se...
virtual void begin(CmdMediator *cmdMediator, DigitizeState previousState)
Method that is called at the exact moment a state is entered.
Create standard cross cursor, or custom cursor, according to settings.
Storage of one imported image and the data attached to that image.
virtual void handleContextMenuEventAxis(CmdMediator *cmdMediator, const QString &pointIdentifier)
Handle a right click, on an axis point, that was intercepted earlier.
Command for adding one graph point.
DocumentModelDigitizeCurve modelDigitizeCurve() const
Get method for DocumentModelDigitizeCurve.
QCursor generate(const DocumentModelDigitizeCurve &modelDigitizeCurve) const
Factory method to generate standard or custom cursor.
virtual void handleContextMenuEventGraph(CmdMediator *cmdMediator, const QStringList &pointIdentifiers)
Handle a right click, on a graph point, that was intercepted earlier.
void appendNewCmd(CmdMediator *cmdMediator, QUndoCommand *cmd)
Append just-created QUndoCommand to command stack. This is called from DigitizeStateAbstractBase subc...
virtual void handleMouseRelease(CmdMediator *cmdMediator, QPointF posScreen)
Handle a mouse release that was intercepted earlier.
DigitizeState
Set of possible states of Digitize toolbar.
virtual void end()
Method that is called at the exact moment a state is exited. Typically called just before begin for t...
virtual void handleMousePress(CmdMediator *cmdMediator, QPointF posScreen)
Handle a mouse press that was intercepted earlier.
virtual QString activeCurve() const
Name of the active Curve. This can include AXIS_CURVE_NAME.
#define LOG4CPP_INFO_S(logger)
double generateCurvePointOrdinal(const Document &document, const Transformation &transformation, const QPointF &posScreen, const QString &curveName)
Select ordinal so new point curve passes smoothly through existing points.
Transformation transformation() const
Return read-only copy of transformation.
Model for DlgSettingsSegments and CmdSettingsSegments.
void setCursor(CmdMediator *cmdMediator)
Update the cursor according to the current state.
virtual bool canPaste(const Transformation &transformation, const QSize &viewSize) const
Return true if there is good data in the clipboard for pasting, and that is compatible with the curre...
log4cpp::Category * mainCat
bool canPasteProtected(const Transformation &transformation, const QSize &viewSize) const
Protected version of canPaste method. Some, but not all, leaf classes use this method.
Model for DlgSettingsDigitizeCurve and CmdSettingsDigitizeCurve.
virtual QCursor cursor(CmdMediator *cmdMediator) const
Returns the state-specific cursor shape.
#define LOG4CPP_DEBUG_S(logger)
virtual QString state() const
State name for debugging.
DigitizeStateCurve(DigitizeStateContext &context)
Single constructor.
Utility class for generating ordinal numbers.
Base class for all digitizing states. This serves as an interface to DigitizeStateContext.
virtual void updateModelSegments(const DocumentModelSegments &modelSegments)
Update the segments given the new settings.
void updateViewsOfSettings(const QString &activeCurve)
Update curve-specific view of settings. Private version gets active curve name from DigitizeStateCont...