QGIS API Documentation 3.99.0-Master (a8882ad4560)
Loading...
Searching...
No Matches
qgsmaptoolselectannotationmousehandles.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmaptoolselectannotationmousehandles.h
3 -----------------------
4 begin : November 2025
5 copyright : (C) 2025 by Mathieu Pellrin
6 email : mathieu at opengis dot ch
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17#ifndef QGSMAPTOOLSELECTANNOTATIONMOUSEHANDLES_H
18#define QGSMAPTOOLSELECTANNOTATIONMOUSEHANDLES_H
19
20// We don't want to expose this in the public API
21#define SIP_NO_FILE
22
23#include <memory>
24
25#include "qgis_gui.h"
27#include "qgsmapcanvas.h"
29
30#include <QPointer>
31
32class QGraphicsView;
33class QInputEvent;
35
37
47class GUI_EXPORT QgsMapToolSelectAnnotationMouseHandles : public QgsGraphicsViewMouseHandles
48{
49 Q_OBJECT
50 public:
51 QgsMapToolSelectAnnotationMouseHandles( QgsMapToolSelectAnnotation *mapTool, QgsMapCanvas *canvas );
52
53 void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr ) override;
54
55 protected:
56 void setViewportCursor( Qt::CursorShape cursor ) override;
57 QList<QGraphicsItem *> sceneItemsAtPoint( QPointF scenePoint ) override;
58 QList<QGraphicsItem *> selectedSceneItems( bool includeLockedItems = true ) const override;
59 QRectF itemRect( QGraphicsItem *item ) const override;
60 void moveItem( QGraphicsItem *item, double deltaX, double deltaY ) override;
61 void rotateItem( QGraphicsItem *item, double deltaDegree, double deltaCenterX, double deltaCenterY ) override;
62 void setItemRect( QGraphicsItem *item, QRectF rect ) override;
63
64 public slots:
65
66 void selectionChanged();
67
68 private:
69 QPointer<QgsMapToolSelectAnnotation> mMapTool;
70 QPointer<QgsMapCanvas> mCanvas;
71};
72
74
75#endif // QGSMAPTOOLSELECTANNOTATIONMOUSEHANDLES_H
Map canvas is a class for displaying all GIS data types on a canvas.
A map tool for selecting, moving, and rotating annotations in a QgsAnnotationLayer.