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"
54 QgsAnnotationPolygonItemWidget( QWidget *parent );
55 ~QgsAnnotationPolygonItemWidget()
override;
66 std::unique_ptr<QgsFillSymbol> mSymbol;
67 bool mBlockChangedSignal =
false;
68 std::unique_ptr<QgsAnnotationPolygonItem> mItem;
76 QgsAnnotationLineItemWidget( QWidget *parent );
77 ~QgsAnnotationLineItemWidget()
override;
79 void updateItem( QgsAnnotationItem *item )
override;
81 void setContext(
const QgsSymbolWidgetContext &context )
override;
84 bool setNewItem( QgsAnnotationItem *item )
override;
87 QgsSymbolSelectorWidget *mSelector =
nullptr;
88 std::unique_ptr<QgsLineSymbol> mSymbol;
89 bool mBlockChangedSignal =
false;
90 std::unique_ptr<QgsAnnotationLineItem> mItem;
98 QgsAnnotationMarkerItemWidget( QWidget *parent );
99 ~QgsAnnotationMarkerItemWidget()
override;
101 void updateItem( QgsAnnotationItem *item )
override;
103 void setContext(
const QgsSymbolWidgetContext &context )
override;
106 bool setNewItem( QgsAnnotationItem *item )
override;
109 QgsSymbolSelectorWidget *mSelector =
nullptr;
110 std::unique_ptr<QgsMarkerSymbol> mSymbol;
111 bool mBlockChangedSignal =
false;
112 std::unique_ptr<QgsAnnotationMarkerItem> mItem;
121 QgsAnnotationPointTextItemWidget( QWidget *parent );
122 ~QgsAnnotationPointTextItemWidget()
override;
124 void updateItem( QgsAnnotationItem *item )
override;
125 void setContext(
const QgsSymbolWidgetContext &context )
override;
132 bool setNewItem( QgsAnnotationItem *item )
override;
135 void mInsertExpressionButton_clicked();
137 bool mBlockChangedSignal =
false;
138 std::unique_ptr<QgsAnnotationPointTextItem> mItem;
147 QgsAnnotationRectangleTextItemWidget( QWidget *parent );
148 ~QgsAnnotationRectangleTextItemWidget()
override;
150 void updateItem( QgsAnnotationItem *item )
override;
151 void setContext(
const QgsSymbolWidgetContext &context )
override;
159 bool setNewItem( QgsAnnotationItem *item )
override;
163 void onWidgetChanged();
164 void sizeModeChanged();
169 void mInsertExpressionButton_clicked();
171 bool mBlockChangedSignal =
false;
172 bool mUpdateItemPosition =
false;
174 std::unique_ptr<QgsAnnotationRectangleTextItem> mItem;
182 QgsAnnotationLineTextItemWidget( QWidget *parent );
183 ~QgsAnnotationLineTextItemWidget()
override;
185 void updateItem( QgsAnnotationItem *item )
override;
186 void setContext(
const QgsSymbolWidgetContext &context )
override;
193 bool setNewItem( QgsAnnotationItem *item )
override;
196 void mInsertExpressionButton_clicked();
198 bool mBlockChangedSignal =
false;
199 std::unique_ptr<QgsAnnotationLineTextItem> mItem;
208 QgsAnnotationPictureItemWidget( QWidget *parent );
209 ~QgsAnnotationPictureItemWidget()
override;
211 void updateItem( QgsAnnotationItem *item )
override;
213 void setContext(
const QgsSymbolWidgetContext &context )
override;
220 bool setNewItem( QgsAnnotationItem *item )
override;
224 void onWidgetChanged();
226 void modeChanged(
bool checked );
227 void sizeModeChanged();
230 void setLockAspectRatio(
bool locked );
233 double pictureAspectRatio()
const;
235 bool mBlockChangedSignal =
false;
236 bool mUpdateItemPosition =
false;
237 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.