QGIS API Documentation 3.99.0-Master (a8882ad4560)
Loading...
Searching...
No Matches
qgsannotationmaptool.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsannotationmaptool.h
3 ----------------
4 copyright : (C) 2025 by Mathieu Pellerin
5 email : mathieu at opengis dot ch
6 ***************************************************************************/
7
8/***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
17#ifndef QGSANNOTATIONMAPTOOL_H
18#define QGSANNOTATIONMAPTOOL_H
19
20#include "qgis_gui.h"
21#include "qgis_sip.h"
22#include "qgsmapmouseevent.h"
24#include "qgsmaptooledit.h"
25
29
30#define SIP_NO_FILE
31
32
40{
41 Q_OBJECT
42
43 public:
48 ~QgsAnnotationMapTool() override = default;
49
56 const QgsRenderedAnnotationItemDetails *findClosestItemToPoint( const QgsPointXY &mapPoint, const QList<const QgsRenderedAnnotationItemDetails *> &items, QgsRectangle &bounds );
57
62 QgsAnnotationLayer *annotationLayerFromId( const QString &layerId );
63
69 QgsAnnotationItem *annotationItemFromId( const QString &layerId, const QString &itemId );
70};
71
72#endif // QGSANNOTATIONMAPTOOL_H
A dockable widget used to handle the CAD tools on top of a selection of map tools.
Abstract base class for annotation items which are drawn with QgsAnnotationLayers.
Represents a map layer containing a set of georeferenced annotations, e.g.
~QgsAnnotationMapTool() override=default
QgsAnnotationLayer * annotationLayerFromId(const QString &layerId)
Returns the annotation layer matching a given ID.
QgsAnnotationMapTool(QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget)
Constructor for QgsAnnotationMapTool.
const QgsRenderedAnnotationItemDetails * findClosestItemToPoint(const QgsPointXY &mapPoint, const QList< const QgsRenderedAnnotationItemDetails * > &items, QgsRectangle &bounds)
Returns the closest item from a list of annotation items to a given map point.
QgsAnnotationItem * annotationItemFromId(const QString &layerId, const QString &itemId)
Returns the annotation item matching a given pair of layer and item IDs.
QgsAdvancedDigitizingDockWidget * cadDockWidget() const
QgsMapToolAdvancedDigitizing(QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget)
Creates an advanced digitizing maptool.
QgsMapCanvas * canvas() const
returns pointer to the tool's map canvas
friend class QgsMapCanvas
Definition qgsmaptool.h:380
Represents a 2D point.
Definition qgspointxy.h:60
A rectangle specified with double values.
Contains information about a rendered annotation item.