17#ifndef QGSTEXTFORMATWIDGET_H
18#define QGSTEXTFORMATWIDGET_H
20#include "ui_qgstextformatwidgetbase.h"
26#include <QFontDatabase>
74 QgsTextFormat format(
bool includeDataDefinedProperties =
true )
const;
111 void setDockMode(
bool enabled );
152 void setPreviewBackground(
const QColor &color );
174 QButtonGroup *mQuadrantBtnGrp =
nullptr;
176 QButtonGroup *mDirectSymbBtnGrp =
nullptr;
178 QButtonGroup *mUpsidedownBtnGrp =
nullptr;
180 int mMinPixelLimit = 0;
202 void updateLinePlacementOptions();
205 void updatePlacementWidgets();
211 virtual void setFormatFromStyle(
const QString &name,
QgsStyle::StyleEntity type,
const QString &stylePath );
216 virtual void saveFormat();
222 void updatePreview();
232 void populateDataDefinedButtons();
236 Mode mWidgetMode = Text;
239 std::unique_ptr< QgsPaintEffect > mBufferEffect;
240 std::unique_ptr< QgsPaintEffect > mMaskEffect;
241 std::unique_ptr< QgsPaintEffect > mBackgroundEffect;
242 QColor mPreviewBackgroundColor;
244 QFontDatabase mFontDB;
248 bool mDockMode =
false;
250 bool mLoadSvgParams =
false;
253 QMap<QgsPalLayerSettings::Property, QgsPropertyOverrideButton *> mButtons;
256 void setWidgetMode(
Mode mode );
257 void toggleDDButtons(
bool visible );
258 void blockFontChangeSignals(
bool blk );
259 void populateFontCapitalsComboBox();
260 void populateFontStyleComboBox();
261 void updateFont(
const QFont &font );
262 void connectValueChanged(
const QList<QWidget *> &widgets,
const char *slot );
267 void optionsStackedWidget_CurrentChanged(
int indx );
268 void showBackgroundRadius(
bool show );
269 void mShapeSVGPathLineEdit_textChanged(
const QString &text );
271 void previewScaleChanged(
double scale );
272 void mFontSizeSpinBox_valueChanged(
double d );
273 void mFontFamilyCmbBx_currentFontChanged(
const QFont &f );
274 void mFontStyleComboBox_currentIndexChanged(
const QString &text );
275 void mFontUnderlineBtn_toggled(
bool ckd );
276 void mFontStrikethroughBtn_toggled(
bool ckd );
277 void kerningToggled(
bool checked );
278 void mFontWordSpacingSpinBox_valueChanged(
double spacing );
279 void mFontLetterSpacingSpinBox_valueChanged(
double spacing );
280 void mFontSizeUnitWidget_changed();
281 void mFontMinPixelSpinBox_valueChanged(
int px );
282 void mFontMaxPixelSpinBox_valueChanged(
int px );
283 void mBufferUnitWidget_changed();
284 void mMaskBufferUnitWidget_changed();
285 void mCoordXDDBtn_changed();
286 void mCoordXDDBtn_activated(
bool isActive );
287 void mCoordYDDBtn_changed();
288 void mCoordYDDBtn_activated(
bool isActive );
289 void mCoordPointDDBtn_changed();
290 void mCoordPointDDBtn_activated(
bool isActive );
291 void mShapeTypeCmbBx_currentIndexChanged(
int index );
292 void mShapeRotationCmbBx_currentIndexChanged(
int index );
293 void mShapeSVGParamsBtn_clicked();
294 void mShapeSVGSelectorBtn_clicked();
295 void mPreviewTextEdit_textChanged(
const QString &text );
296 void mPreviewTextBtn_clicked();
297 void mPreviewBackgroundBtn_colorChanged(
const QColor &color );
298 void mDirectSymbLeftToolBtn_clicked();
299 void mDirectSymbRightToolBtn_clicked();
300 void chkLineOrientationDependent_toggled(
bool active );
301 void mToolButtonConfigureSubstitutes_clicked();
302 void collapseSample(
bool collapse );
303 void changeTextColor(
const QColor &color );
304 void changeBufferColor(
const QColor &color );
305 void scrollPreview();
306 void updateSvgWidgets(
const QString &svgPath );
307 void updateAvailableShadowPositions();
308 void updateProperty();
309 void createAuxiliaryField();
310 void updateShapeFrameStatus();
311 void updateBufferFrameStatus();
312 void updateShadowFrameStatus();
313 void updateCalloutFrameStatus();
314 void updateDataDefinedAlignment();
315 void overlapModeChanged();
361 QDialogButtonBox *buttonBox()
const;
366 QDialogButtonBox *mButtonBox =
nullptr;
417 void setDockMode(
bool dockMode )
override;
422 bool mBlockSignals =
false;
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
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.
Base class for all map layer types.
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.