16#ifndef QGSMAPTOOLSELECTIONHANDLER_H
17#define QGSMAPTOOLSELECTIONHANDLER_H
48class QgsDistanceWidget :
public QWidget
54 explicit QgsDistanceWidget(
const QString &label = QString(), QWidget *parent =
nullptr );
57 void setDistance(
double distance );
63 void distanceChanged(
double distance );
65 void distanceEditingFinished(
double distance,
const Qt::KeyboardModifiers &modifiers );
67 void distanceEditingCanceled();
70 bool eventFilter( QObject *obj, QEvent *ev )
override;
73 QHBoxLayout *mLayout =
nullptr;
108 Q_ENUM( SelectionMode )
120 SelectionMode selectionMode()
const;
122 void setSelectionMode( SelectionMode mode );
134 bool keyReleaseEvent( QKeyEvent *e );
137 void setSelectedGeometry(
const QgsGeometry &geometry, Qt::KeyboardModifiers modifiers = Qt::NoModifier );
145 void updateRadiusRubberband(
double radius );
151 void radiusValueEntered(
double radius, Qt::KeyboardModifiers modifiers );
170 void initRubberBand();
174 void createDistanceWidget();
175 void deleteDistanceWidget();
177 void updateRadiusFromEdge(
QgsPointXY &radiusEdge );
183 std::unique_ptr<QgsRubberBand> mSelectionRubberBand;
189 bool mSelectionActive =
false;
194 std::unique_ptr<QgsSnapIndicator> mSnapIndicator;
203 QgsDistanceWidget *mDistanceWidget =
nullptr;
205 QColor mFillColor = QColor( 254, 178, 76, 63 );
206 QColor mStrokeColor = QColor( 254, 58, 29, 100 );
212 std::unique_ptr<QTimer> mOnMouseMoveDelayTimer;
215 QPoint mMoveLastCursorPos;
The QgsSpinBox is a spin box with a clear button that will set the value to the defined clear value.
A geometry is the spatial representation of a feature.
Map canvas is a class for displaying all GIS data types on a canvas.
A mouse event which is the result of a user interaction with a QgsMapCanvas.
Responsible for drawing transient features (e.g.
Shows a snapping marker on map canvas for the current snapping match.