15#ifndef QGSANNOTATIONITEMWIDGETIMPL_H
16#define QGSANNOTATIONITEMWIDGETIMPL_H
18#include "ui_qgsannotationlinetextwidgetbase.h"
19#include "ui_qgsannotationpicturewidgetbase.h"
20#include "ui_qgsannotationpointtextwidgetbase.h"
21#include "ui_qgsannotationrectangulartextwidgetbase.h"
22#include "ui_qgsannotationsymbolwidgetbase.h"
55 QgsAnnotationPolygonItemWidget( QWidget *parent );
56 ~QgsAnnotationPolygonItemWidget()
override;
67 std::unique_ptr<QgsFillSymbol> mSymbol;
68 bool mBlockChangedSignal =
false;
69 std::unique_ptr<QgsAnnotationPolygonItem> mItem;
77 QgsAnnotationLineItemWidget( QWidget *parent );
78 ~QgsAnnotationLineItemWidget()
override;
80 void updateItem( QgsAnnotationItem *item )
override;
82 void setContext(
const QgsSymbolWidgetContext &context )
override;
85 bool setNewItem( QgsAnnotationItem *item )
override;
88 QgsSymbolSelectorWidget *mSelector =
nullptr;
89 std::unique_ptr<QgsLineSymbol> mSymbol;
90 bool mBlockChangedSignal =
false;
91 std::unique_ptr<QgsAnnotationLineItem> mItem;
99 QgsAnnotationMarkerItemWidget( QWidget *parent );
100 ~QgsAnnotationMarkerItemWidget()
override;
102 void updateItem( QgsAnnotationItem *item )
override;
104 void setContext(
const QgsSymbolWidgetContext &context )
override;
107 bool setNewItem( QgsAnnotationItem *item )
override;
110 QgsSymbolSelectorWidget *mSelector =
nullptr;
111 std::unique_ptr<QgsMarkerSymbol> mSymbol;
112 bool mBlockChangedSignal =
false;
113 std::unique_ptr<QgsAnnotationMarkerItem> mItem;
122 QgsAnnotationPointTextItemWidget( QWidget *parent );
123 ~QgsAnnotationPointTextItemWidget()
override;
125 void updateItem( QgsAnnotationItem *item )
override;
126 void setContext(
const QgsSymbolWidgetContext &context )
override;
133 bool setNewItem( QgsAnnotationItem *item )
override;
136 void mInsertExpressionButton_clicked();
138 bool mBlockChangedSignal =
false;
139 std::unique_ptr<QgsAnnotationPointTextItem> mItem;
148 QgsAnnotationRectangleTextItemWidget( QWidget *parent );
149 ~QgsAnnotationRectangleTextItemWidget()
override;
151 void updateItem( QgsAnnotationItem *item )
override;
152 void setContext(
const QgsSymbolWidgetContext &context )
override;
160 bool setNewItem( QgsAnnotationItem *item )
override;
164 void onWidgetChanged();
165 void sizeModeChanged();
170 void mInsertExpressionButton_clicked();
172 bool mBlockChangedSignal =
false;
173 bool mUpdateItemPosition =
false;
175 std::unique_ptr<QgsAnnotationRectangleTextItem> mItem;
183 QgsAnnotationLineTextItemWidget( QWidget *parent );
184 ~QgsAnnotationLineTextItemWidget()
override;
186 void updateItem( QgsAnnotationItem *item )
override;
187 void setContext(
const QgsSymbolWidgetContext &context )
override;
194 bool setNewItem( QgsAnnotationItem *item )
override;
197 void mInsertExpressionButton_clicked();
199 bool mBlockChangedSignal =
false;
200 std::unique_ptr<QgsAnnotationLineTextItem> mItem;
209 QgsAnnotationPictureItemWidget( QWidget *parent );
210 ~QgsAnnotationPictureItemWidget()
override;
212 void updateItem( QgsAnnotationItem *item )
override;
214 void setContext(
const QgsSymbolWidgetContext &context )
override;
221 bool setNewItem( QgsAnnotationItem *item )
override;
225 void onWidgetChanged();
227 void modeChanged(
bool checked );
228 void sizeModeChanged();
231 void setLockAspectRatio(
bool locked );
234 double pictureAspectRatio()
const;
236 bool mBlockChangedSignal =
false;
237 bool mUpdateItemPosition =
false;
238 std::unique_ptr<QgsAnnotationPictureItem> mItem;
Abstract base class for annotation items which are drawn with QgsAnnotationLayers.
An annotation item which renders a line symbol along a line geometry.
An annotation item which renders text along a line geometry.
An annotation item which renders a marker symbol at a point location.
An annotation item which renders a picture.
An annotation item which renders a text string at a point location.
An annotation item which renders a fill symbol for a polygon geometry.
An annotation item which renders paragraphs of text within a rectangle.
Abstract interface for generating an expression context.
virtual QgsExpressionContext createExpressionContext() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
A line symbol type, for rendering LineString and MultiLineString geometries.
A marker symbol type, for rendering Point and MultiPoint geometries.
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
A widget for customizing text formatting settings.