7#ifndef DIGITIZE_STATE_POINT_MATCH_H
8#define DIGITIZE_STATE_POINT_MATCH_H
17class QGraphicsEllipseItem;
18class QGraphicsPixmapItem;
33 const QSize &viewSize)
const;
38 const QString &pointIdentifier);
40 const QStringList &pointIdentifiers);
44 bool atLeastOneSelectedItem);
51 virtual QString
state()
const;
60 void createPermanentPoint (
CmdMediator *cmdMediator,
61 const QPointF &posScreen);
62 void createTemporaryPoint (
CmdMediator *cmdMediator,
63 const QPoint &posScreen);
64 QList<PointMatchPixel> extractSamplePointPixels (
const QImage &img,
66 const QPointF &posScreen)
const;
67 void findPointsAndShowFirstCandidate (
CmdMediator *cmdMediator,
68 const QPointF &posScreen);
69 bool pixelIsOnInImage (
const QImage &img,
72 int radiusLimit)
const;
74 void promoteCandidatePointToPermanentPoint(
CmdMediator *cmdMediator);
76 QGraphicsEllipseItem *m_outline;
77 QGraphicsPixmapItem *m_candidatePoint;
81 QList<QPoint> m_candidatePoints;
83 QPoint m_posCandidatePoint;
DigitizeState
Set of possible states of Digitize toolbar.
DigitizeStateAbstractBase(DigitizeStateContext &context)
Single constructor.
DigitizeStateContext & context()
Reference to the DigitizeStateContext that contains all the DigitizeStateAbstractBase subclasses,...
Container for all DigitizeStateAbstractBase subclasses. This functions as the context class in a stan...
virtual QString state() const
State name for debugging.
virtual void handleContextMenuEventGraph(CmdMediator *cmdMediator, const QStringList &pointIdentifiers)
Handle a right click, on a graph point, 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...
virtual QCursor cursor(CmdMediator *cmdMediator) const
Returns the state-specific cursor shape.
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 handleMouseRelease(CmdMediator *cmdMediator, QPointF posScreen)
Handle a mouse release that was intercepted earlier.
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...
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.
virtual void handleContextMenuEventAxis(CmdMediator *cmdMediator, const QString &pointIdentifier)
Handle a right click, on an axis point, that was intercepted earlier.
virtual ~DigitizeStatePointMatch()
virtual void updateModelDigitizeCurve(CmdMediator *cmdMediator, const DocumentModelDigitizeCurve &modelDigitizeCurve)
Update the digitize curve settings.
virtual bool guidelinesAreSelectable() const
Enable/disable guidelines according to state.
virtual void begin(CmdMediator *cmdMediator, DigitizeState previousState)
Method that is called at the exact moment a state is entered.
virtual void handleKeyPress(CmdMediator *cmdMediator, Qt::Key key, bool atLeastOneSelectedItem)
Handle a key press that was intercepted earlier.
virtual void updateAfterPointAddition()
Update graphics attributes after possible new points. This is useful for highlight opacity.
DigitizeStatePointMatch(DigitizeStateContext &context)
Single constructor.
virtual void updateModelSegments(const DocumentModelSegments &modelSegments)
Update the segments given the new settings.
virtual void end()
Method that is called at the exact moment a state is exited. Typically called just before begin for t...
Model for DlgSettingsDigitizeCurve and CmdSettingsDigitizeCurve.
Model for DlgSettingsPointMatch and CmdSettingsPointMatch.
Model for DlgSettingsSegments and CmdSettingsSegments.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...