7 #ifndef DIGITIZE_STATE_POINT_MATCH_H 8 #define DIGITIZE_STATE_POINT_MATCH_H 10 #include "DigitizeStateAbstractBase.h" 11 #include "PointMatchPixel.h" 16 class QGraphicsEllipseItem;
17 class QGraphicsPixmapItem;
30 DigitizeState previousState);
32 const QSize &viewSize)
const;
36 const QString &pointIdentifier);
38 const QStringList &pointIdentifiers);
42 bool atLeastOneSelectedItem);
49 virtual QString
state()
const;
58 void createPermanentPoint (
CmdMediator *cmdMediator,
59 const QPointF &posScreen);
60 void createTemporaryPoint (
CmdMediator *cmdMediator,
61 const QPoint &posScreen);
62 QList<PointMatchPixel> extractSamplePointPixels (
const QImage &img,
64 const QPointF &posScreen)
const;
65 void findPointsAndShowFirstCandidate (
CmdMediator *cmdMediator,
66 const QPointF &posScreen);
67 bool pixelIsOnInImage (
const QImage &img,
70 int radiusLimit)
const;
72 void promoteCandidatePointToPermanentPoint(
CmdMediator *cmdMediator);
74 QGraphicsEllipseItem *m_outline;
75 QGraphicsPixmapItem *m_candidatePoint;
79 QList<QPoint> m_candidatePoints;
81 QPoint m_posCandidatePoint;
84 #endif // DIGITIZE_STATE_POINT_MATCH_H virtual void handleContextMenuEventGraph(CmdMediator *cmdMediator, const QStringList &pointIdentifiers)
Handle a right click, on a graph point, that was intercepted earlier.
Model for DlgSettingsPointMatch and CmdSettingsPointMatch.
virtual void updateModelSegments(const DocumentModelSegments &modelSegments)
Update the segments given the new settings.
virtual void updateAfterPointAddition()
Update graphics attributes after possible new points. This is useful for highlight opacity...
virtual QCursor cursor(CmdMediator *cmdMediator) const
Returns the state-specific cursor shape.
DigitizeStateContext & context()
Reference to the DigitizeStateContext that contains all the DigitizeStateAbstractBase subclasses...
virtual void handleMousePress(CmdMediator *cmdMediator, QPointF posScreen)
Handle a mouse press that was intercepted earlier.
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...
Digitizing state for matching Curve Points, one at a time.
Model for DlgSettingsDigitizeCurve and CmdSettingsDigitizeCurve.
virtual void handleKeyPress(CmdMediator *cmdMediator, Qt::Key key, bool atLeastOneSelectedItem)
Handle a key press that was intercepted earlier.
virtual QString state() const
State name for debugging.
Container for all DigitizeStateAbstractBase subclasses. This functions as the context class in a stan...
virtual void handleMouseRelease(CmdMediator *cmdMediator, QPointF posScreen)
Handle a mouse release that was intercepted earlier.
virtual void handleContextMenuEventAxis(CmdMediator *cmdMediator, const QString &pointIdentifier)
Handle a right click, on an axis point, that was intercepted earlier.
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.
virtual void end()
Method that is called at the exact moment a state is exited. Typically called just before begin for t...
Model for DlgSettingsSegments and CmdSettingsSegments.
Base class for all digitizing states. This serves as an interface to DigitizeStateContext.
virtual void updateModelDigitizeCurve(CmdMediator *cmdMediator, const DocumentModelDigitizeCurve &modelDigitizeCurve)
Update the digitize curve settings.
virtual QString activeCurve() const
Name of the active Curve. This can include AXIS_CURVE_NAME.
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...