QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
Loading...
Searching...
No Matches
qgsannotationitemwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsannotationitemwidget.h
3 ------------------------
4 Date : September 2021
5 Copyright : (C) 2021 Nyall Dawson
6 Email : nyall dot dawson at gmail dot com
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15#ifndef QGSANNOTATIONITEMWIDGET_H
16#define QGSANNOTATIONITEMWIDGET_H
17
18#include "qgis_gui.h"
19#include "qgis_sip.h"
20#include "qgspanelwidget.h"
22
26
38{
39 Q_OBJECT
40
41 public:
42
47
52
56 virtual void updateItem( QgsAnnotationItem *item ) = 0;
57
66 bool setItem( QgsAnnotationItem *item );
67
74 virtual void setLayer( QgsAnnotationLayer *layer );
75
82 QgsAnnotationLayer *layer();
83
90 void setItemId( const QString &id );
91
98 QString itemId() const;
99
104 virtual void setContext( const QgsSymbolWidgetContext &context );
105
110 QgsSymbolWidgetContext context() const;
111
112 public slots:
113
117 virtual void focusDefaultWidget();
118
119 signals:
120
125
126 protected:
127
137 virtual bool setNewItem( QgsAnnotationItem *item );
138
144 const QgsRenderedAnnotationItemDetails *renderedItemDetails();
145
148
149 QPointer< QgsAnnotationLayer > mLayer;
150 QString mItemId;
151};
152
153#endif // QGSANNOTATIONITEMWIDGET_H
A base class for property widgets for annotation items.
QPointer< QgsAnnotationLayer > mLayer
QgsSymbolWidgetContext mContext
Context in which widget is shown.
void itemChanged()
Emitted when the annotation item definition in the widget is changed by the user.
virtual QgsAnnotationItem * createItem()=0
Creates a new item matching the settings defined in the widget.
virtual void updateItem(QgsAnnotationItem *item)=0
Updates an existing item to match the settings defined in the widget.
Abstract base class for annotation items which are drawn with QgsAnnotationLayers.
Represents a map layer containing a set of georeferenced annotations, e.g.
Base class for any widget that can be shown as a inline panel.
Contains information about a rendered annotation item.
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
#define SIP_TRANSFERTHIS
Definition qgis_sip.h:53
#define SIP_FACTORY
Definition qgis_sip.h:76