QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
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"
21 #include "qgssymbolwidgetcontext.h"
22 
23 class QgsAnnotationItem;
24 
36 {
37  Q_OBJECT
38 
39  public:
40 
45 
49  virtual QgsAnnotationItem *createItem() = 0 SIP_FACTORY;
50 
54  virtual void updateItem( QgsAnnotationItem *item ) = 0;
55 
64  bool setItem( QgsAnnotationItem *item );
65 
70  virtual void setContext( const QgsSymbolWidgetContext &context );
71 
76  QgsSymbolWidgetContext context() const;
77 
78  public slots:
79 
83  virtual void focusDefaultWidget();
84 
85  signals:
86 
90  void itemChanged();
91 
92  protected:
93 
103  virtual bool setNewItem( QgsAnnotationItem *item );
104 
107 };
108 
109 #endif // QGSANNOTATIONITEMWIDGET_H
QgsAnnotationItemBaseWidget
A base class for property widgets for annotation items.
Definition: qgsannotationitemwidget.h:35
QgsAnnotationItemBaseWidget::mContext
QgsSymbolWidgetContext mContext
Context in which widget is shown.
Definition: qgsannotationitemwidget.h:106
QgsSymbolWidgetContext
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
Definition: qgssymbolwidgetcontext.h:35
qgssymbolwidgetcontext.h
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
QgsPanelWidget
Base class for any widget that can be shown as a inline panel.
Definition: qgspanelwidget.h:29
qgis_sip.h
qgspanelwidget.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:53
QgsAnnotationItem
Abstract base class for annotation items which are drawn with QgsAnnotationLayers.
Definition: qgsannotationitem.h:42