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 );
160 void enableDataDefinedAlignment(
bool enable );
175 QButtonGroup *mQuadrantBtnGrp =
nullptr;
177 QButtonGroup *mDirectSymbBtnGrp =
nullptr;
179 QButtonGroup *mUpsidedownBtnGrp =
nullptr;
181 int mMinPixelLimit = 0;
203 void updateLinePlacementOptions();
206 void updatePlacementWidgets();
217 virtual void saveFormat();
223 void updatePreview();
233 void populateDataDefinedButtons();
237 Mode mWidgetMode = Text;
240 std::unique_ptr< QgsPaintEffect > mBufferEffect;
241 std::unique_ptr< QgsPaintEffect > mMaskEffect;
242 std::unique_ptr< QgsPaintEffect > mBackgroundEffect;
243 QColor mPreviewBackgroundColor;
245 QFontDatabase mFontDB;
249 bool mDockMode =
false;
251 bool mLoadSvgParams =
false;
254 QMap<QgsPalLayerSettings::Property, QgsPropertyOverrideButton *> mButtons;
257 void setWidgetMode(
Mode mode );
258 void toggleDDButtons(
bool visible );
259 void blockFontChangeSignals(
bool blk );
260 void populateFontCapitalsComboBox();
261 void populateFontStyleComboBox();
262 void updateFont(
const QFont &font );
263 void connectValueChanged(
const QList<QWidget *> &widgets,
const char *slot );
268 void optionsStackedWidget_CurrentChanged(
int indx );
269 void showBackgroundRadius(
bool show );
270 void mShapeSVGPathLineEdit_textChanged(
const QString &text );
272 void previewScaleChanged(
double scale );
273 void mFontSizeSpinBox_valueChanged(
double d );
274 void mFontFamilyCmbBx_currentFontChanged(
const QFont &f );
275 void mFontStyleComboBox_currentIndexChanged(
const QString &text );
276 void mFontUnderlineBtn_toggled(
bool ckd );
277 void mFontStrikethroughBtn_toggled(
bool ckd );
278 void kerningToggled(
bool checked );
279 void mFontWordSpacingSpinBox_valueChanged(
double spacing );
280 void mFontLetterSpacingSpinBox_valueChanged(
double spacing );
281 void mFontSizeUnitWidget_changed();
282 void mFontMinPixelSpinBox_valueChanged(
int px );
283 void mFontMaxPixelSpinBox_valueChanged(
int px );
284 void mBufferUnitWidget_changed();
285 void mMaskBufferUnitWidget_changed();
286 void mCoordXDDBtn_changed( );
287 void mCoordYDDBtn_changed( );
288 void mShapeTypeCmbBx_currentIndexChanged(
int index );
289 void mShapeRotationCmbBx_currentIndexChanged(
int index );
290 void mShapeSVGParamsBtn_clicked();
291 void mShapeSVGSelectorBtn_clicked();
292 void mPreviewTextEdit_textChanged(
const QString &text );
293 void mPreviewTextBtn_clicked();
294 void mPreviewBackgroundBtn_colorChanged(
const QColor &color );
295 void mDirectSymbLeftToolBtn_clicked();
296 void mDirectSymbRightToolBtn_clicked();
297 void chkLineOrientationDependent_toggled(
bool active );
298 void mToolButtonConfigureSubstitutes_clicked();
299 void collapseSample(
bool collapse );
300 void changeTextColor(
const QColor &color );
301 void changeBufferColor(
const QColor &color );
302 void scrollPreview();
303 void updateSvgWidgets(
const QString &svgPath );
304 void updateAvailableShadowPositions();
305 void updateProperty();
306 void createAuxiliaryField();
307 void updateShapeFrameStatus();
308 void updateBufferFrameStatus();
309 void updateShadowFrameStatus();
310 void updateCalloutFrameStatus();
357 QDialogButtonBox *buttonBox()
const;
362 QDialogButtonBox *mButtonBox =
nullptr;
414 void setDockMode(
bool dockMode )
override;
419 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.
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.