7#ifndef DIGITIZE_STATE_POINT_MATCH_H
8#define DIGITIZE_STATE_POINT_MATCH_H
10#include "DigitizeStateAbstractBase.h"
11#include "PointMatchPixel.h"
16class QGraphicsEllipseItem;
17class QGraphicsPixmapItem;
30 DigitizeState previousState);
36 bool atLeastOneSelectedItem);
43 virtual QString
state()
const;
51 void createPermanentPoint (
CmdMediator *cmdMediator,
52 const QPointF &posScreen);
53 void createTemporaryPoint (
CmdMediator *cmdMediator,
54 const QPoint &posScreen);
55 QList<PointMatchPixel> extractSamplePointPixels (
const QImage &img,
57 const QPointF &posScreen)
const;
58 void findPointsAndShowFirstCandidate (
CmdMediator *cmdMediator,
59 const QPointF &posScreen);
60 bool pixelIsOnInImage (
const QImage &img,
63 int radiusLimit)
const;
65 void promoteCandidatePointToPermanentPoint(
CmdMediator *cmdMediator);
67 QGraphicsEllipseItem *m_outline;
68 QGraphicsPixmapItem *m_candidatePoint;
72 QList<QPoint> m_candidatePoints;
74 QPoint m_posCandidatePoint;
Base class for all digitizing states. This serves as an interface to DigitizeStateContext.
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...
Digitizing state for matching Curve Points, one at a time.
virtual QString state() const
State name for debugging.
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 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 updateModelDigitizeCurve(CmdMediator *cmdMediator, const DocumentModelDigitizeCurve &modelDigitizeCurve)
Update the digitize curve settings.
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 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.