17#ifndef QGSTEXTFORMATWIDGET_H
18#define QGSTEXTFORMATWIDGET_H
20#include "ui_qgstextformatwidgetbase.h"
26#include <QFontDatabase>
75 QgsTextFormat format(
bool includeDataDefinedProperties =
true )
const;
113 void setDockMode(
bool enabled );
154 void setPreviewBackground(
const QColor &color );
176 QButtonGroup *mQuadrantBtnGrp =
nullptr;
178 QButtonGroup *mDirectSymbBtnGrp =
nullptr;
180 QButtonGroup *mUpsidedownBtnGrp =
nullptr;
182 int mMinPixelLimit = 0;
204 void updateLinePlacementOptions();
207 void updatePlacementWidgets();
213 virtual void setFormatFromStyle(
const QString &name,
QgsStyle::StyleEntity type,
const QString &stylePath );
218 virtual void saveFormat();
224 void updatePreview();
234 void populateDataDefinedButtons();
238 Mode mWidgetMode = Text;
241 std::unique_ptr< QgsPaintEffect > mBufferEffect;
242 std::unique_ptr< QgsPaintEffect > mMaskEffect;
243 std::unique_ptr< QgsPaintEffect > mBackgroundEffect;
244 QColor mPreviewBackgroundColor;
246 QFontDatabase mFontDB;
250 bool mDockMode =
false;
252 bool mLoadSvgParams =
false;
255 QMap<QgsPalLayerSettings::Property, QgsPropertyOverrideButton *> mButtons;
258 void setWidgetMode(
Mode mode );
259 void toggleDDButtons(
bool visible );
260 void blockFontChangeSignals(
bool blk );
261 void populateFontCapitalsComboBox();
262 void populateFontStyleComboBox();
263 void updateFont(
const QFont &font );
264 void connectValueChanged(
const QList<QWidget *> &widgets,
const char *slot );
269 void optionsStackedWidget_CurrentChanged(
int indx );
270 void showBackgroundRadius(
bool show );
271 void mShapeSVGPathLineEdit_textChanged(
const QString &text );
273 void previewScaleChanged(
double scale );
274 void mFontSizeSpinBox_valueChanged(
double d );
275 void mFontFamilyCmbBx_currentFontChanged(
const QFont &f );
276 void mFontStyleComboBox_currentIndexChanged(
const QString &text );
277 void mFontUnderlineBtn_toggled(
bool ckd );
278 void mFontStrikethroughBtn_toggled(
bool ckd );
279 void kerningToggled(
bool checked );
280 void mFontWordSpacingSpinBox_valueChanged(
double spacing );
281 void mFontLetterSpacingSpinBox_valueChanged(
double spacing );
282 void mFontSizeUnitWidget_changed();
283 void mFontMinPixelSpinBox_valueChanged(
int px );
284 void mFontMaxPixelSpinBox_valueChanged(
int px );
285 void mBufferUnitWidget_changed();
286 void mMaskBufferUnitWidget_changed();
287 void mCoordXDDBtn_changed();
288 void mCoordXDDBtn_activated(
bool isActive );
289 void mCoordYDDBtn_changed();
290 void mCoordYDDBtn_activated(
bool isActive );
291 void mCoordPointDDBtn_changed();
292 void mCoordPointDDBtn_activated(
bool isActive );
293 void mShapeTypeCmbBx_currentIndexChanged(
int index );
294 void mShapeRotationCmbBx_currentIndexChanged(
int index );
295 void mShapeSVGParamsBtn_clicked();
296 void mShapeSVGSelectorBtn_clicked();
297 void mPreviewTextEdit_textChanged(
const QString &text );
298 void mPreviewTextBtn_clicked();
299 void mPreviewBackgroundBtn_colorChanged(
const QColor &color );
300 void mDirectSymbLeftToolBtn_clicked();
301 void mDirectSymbRightToolBtn_clicked();
302 void chkLineOrientationDependent_toggled(
bool active );
303 void mToolButtonConfigureSubstitutes_clicked();
304 void collapseSample(
bool collapse );
305 void changeTextColor(
const QColor &color );
306 void changeBufferColor(
const QColor &color );
307 void scrollPreview();
308 void updateSvgWidgets(
const QString &svgPath );
309 void updateAvailableShadowPositions();
310 void updateProperty();
311 void createAuxiliaryField();
312 void updateShapeFrameStatus();
313 void updateBufferFrameStatus();
314 void updateShadowFrameStatus();
315 void updateCalloutFrameStatus();
316 void updateDataDefinedAlignment();
317 void overlapModeChanged();
364 QDialogButtonBox *buttonBox()
const;
369 QDialogButtonBox *mButtonBox =
nullptr;
421 void setDockMode(
bool dockMode )
override;
426 bool mBlockSignals =
false;
A dialog for selecting a single character from a single font.
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...
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Map canvas is a class for displaying all GIS data types on a canvas.
Property
Data definable properties.
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
A collection of string replacements (specified using QgsStringReplacement objects).
StyleEntity
Enum for Entities involved in a style.
Contains settings which reflect the context in which a symbol (or renderer) widget is shown,...
A simple dialog for customizing text formatting settings.
A panel widget for customizing text formatting settings.
A widget for customizing text formatting settings.
QList< QgsSymbolLayerReference > mMaskedSymbolLayers
void widgetChanged()
Emitted when the text format defined by the widget changes.
Q_DECL_DEPRECATED void enableDataDefinedAlignment(bool enable)
Update the enabled state of the data defined alignment buttons.
QgsSymbolWidgetContext mContext
Context in which widget is shown.
void auxiliaryFieldCreated()
Emitted when an auxiliary field is created in the widget.
QgsStringReplacementCollection mSubstitutions
Text substitution list.
@ Labeling
Show labeling settings in addition to text formatting settings.
QgsPropertyCollection mDataDefinedProperties
Data defined properties as defined in the widget.
Container for all settings relating to text rendering.
Represents a vector layer which manages a vector based data sets.
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.