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 showBackgroundPenStyle(
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 mCoordYDDBtn_changed( );
289 void mShapeTypeCmbBx_currentIndexChanged(
int index );
290 void mShapeRotationCmbBx_currentIndexChanged(
int index );
291 void mShapeSVGParamsBtn_clicked();
292 void mShapeSVGSelectorBtn_clicked();
293 void mPreviewTextEdit_textChanged(
const QString &text );
294 void mPreviewTextBtn_clicked();
295 void mPreviewBackgroundBtn_colorChanged(
const QColor &color );
296 void mDirectSymbLeftToolBtn_clicked();
297 void mDirectSymbRightToolBtn_clicked();
298 void chkLineOrientationDependent_toggled(
bool active );
299 void mToolButtonConfigureSubstitutes_clicked();
300 void collapseSample(
bool collapse );
301 void changeTextColor(
const QColor &color );
302 void changeBufferColor(
const QColor &color );
303 void scrollPreview();
304 void updateSvgWidgets(
const QString &svgPath );
305 void updateAvailableShadowPositions();
306 void updateProperty();
307 void createAuxiliaryField();
308 void updateShapeFrameStatus();
309 void updateBufferFrameStatus();
310 void updateShadowFrameStatus();
311 void updateCalloutFrameStatus();
358 QDialogButtonBox *buttonBox()
const;
363 QDialogButtonBox *mButtonBox =
nullptr;
415 void setDockMode(
bool dockMode )
override;
420 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.
void widgetChanged()
Emitted when the text format defined by the widget changes.
QgsSymbolWidgetContext mContext
Context in which widget is shown.
QgsSymbolLayerReferenceList mMaskedSymbolLayers
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.
QList< QgsSymbolLayerReference > QgsSymbolLayerReferenceList