QGIS API Documentation 3.99.0-Master (7d2ca374f2d)
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
22#include <memory>
23
24#include "qgis_gui.h"
26#include "qgsmapcanvas.h"
28
29#include <QPointer>
30
31#define SIP_NO_FILE
32
33class QGraphicsView;
34class QInputEvent;
36
38
48class GUI_EXPORT QgsMapToolSelectAnnotationMouseHandles : public QgsGraphicsViewMouseHandles
49{
50 Q_OBJECT
51 public:
52 QgsMapToolSelectAnnotationMouseHandles( QgsMapToolSelectAnnotation *mapTool, QgsMapCanvas *canvas );
53
54 void paint( QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = nullptr ) override;
55
56 protected:
57 void setViewportCursor( Qt::CursorShape cursor ) override;
58 QList<QGraphicsItem *> sceneItemsAtPoint( QPointF scenePoint ) override;
59 QList<QGraphicsItem *> selectedSceneItems( bool includeLockedItems = true ) const override;
60 QRectF itemRect( QGraphicsItem *item ) const override;
61 void moveItem( QGraphicsItem *item, double deltaX, double deltaY ) override;
62 void rotateItem( QGraphicsItem *item, double deltaDegree, double deltaCenterX, double deltaCenterY ) override;
63 void setItemRect( QGraphicsItem *item, QRectF rect ) override;
64
65 public slots:
66
67 void selectionChanged();
68
69 private:
70 QPointer<QgsMapToolSelectAnnotation> mMapTool;
71 QPointer<QgsMapCanvas> mCanvas;
72};
73
75
76#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.