QGIS API Documentation 4.3.0-Master (4a47d6a9bb1)
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
26class QComboBox;
27
39{
40 Q_OBJECT
41
42 public:
47
52
56 virtual void updateItem( QgsAnnotationItem *item ) = 0;
57
66 bool setItem( QgsAnnotationItem *item );
67
74 static void populateRotationModeComboBox( QComboBox *comboBox );
75
82 virtual void setLayer( QgsAnnotationLayer *layer );
83
91
98 void setItemId( const QString &id );
99
106 QString itemId() const;
107
112 virtual void setContext( const QgsSymbolWidgetContext &context );
113
119
120 public slots:
121
125 virtual void focusDefaultWidget();
126
127 signals:
128
133
134 protected:
144 virtual bool setNewItem( QgsAnnotationItem *item );
145
152
155
156 QPointer<QgsAnnotationLayer> mLayer;
157 QString mItemId;
158};
159
160#endif // QGSANNOTATIONITEMWIDGET_H
QgsAnnotationItemBaseWidget(QWidget *parent)
Constructor for QgsAnnotationItemBaseWidget.
QgsSymbolWidgetContext context() const
Returns the context in which the widget is shown, e.g., the associated map canvas and expression cont...
virtual void focusDefaultWidget()
Focuses the default widget for the page.
static void populateRotationModeComboBox(QComboBox *comboBox)
Populates a comboBox with the available options for rendering an item with respect to the rotation of...
QString itemId() const
Returns the associated annotation item id.
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 void setContext(const QgsSymbolWidgetContext &context)
Sets the context in which the widget is shown, e.g., the associated map canvas and expression context...
bool setItem(QgsAnnotationItem *item)
Sets the current item to show in the widget.
QgsAnnotationLayer * layer()
Returns the associated annotation map layer.
virtual QgsAnnotationItem * createItem()=0
Creates a new item matching the settings defined in the widget.
void setItemId(const QString &id)
Sets the associated annotation item id.
virtual bool setNewItem(QgsAnnotationItem *item)
Attempts to update the widget to show the properties for the specified item.
virtual void updateItem(QgsAnnotationItem *item)=0
Updates an existing item to match the settings defined in the widget.
QPointer< QgsAnnotationLayer > mLayer
const QgsRenderedAnnotationItemDetails * renderedItemDetails()
Retrieve rendered annotation details for the associated annotation, if available.
virtual void setLayer(QgsAnnotationLayer *layer)
Sets the associated annotation map layer.
Abstract base class for annotation items which are drawn with QgsAnnotationLayers.
Represents a map layer containing a set of georeferenced annotations, e.g.
QgsPanelWidget(QWidget *parent=nullptr)
Base class for any widget that can be shown as an 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:52
#define SIP_FACTORY
Definition qgis_sip.h:83