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 );
118 void widgetChanged();
124 void auxiliaryFieldCreated();
154 void setPreviewBackground(
const QColor &color );
160 void enableDataDefinedAlignment(
bool enable );
167 QButtonGroup *mQuadrantBtnGrp =
nullptr;
169 QButtonGroup *mDirectSymbBtnGrp =
nullptr;
171 QButtonGroup *mUpsidedownBtnGrp =
nullptr;
173 QButtonGroup *mPlacePointBtnGrp =
nullptr;
175 QButtonGroup *mPlaceLineBtnGrp =
nullptr;
177 QButtonGroup *mPlacePolygonBtnGrp =
nullptr;
179 int mMinPixelLimit = 0;
195 void updateLinePlacementOptions();
198 void updatePlacementWidgets();
209 virtual void saveFormat();
215 void updatePreview();
225 void populateDataDefinedButtons();
229 Mode mWidgetMode = Text;
232 std::unique_ptr< QgsPaintEffect > mBufferEffect;
233 std::unique_ptr< QgsPaintEffect > mBackgroundEffect;
234 QColor mPreviewBackgroundColor;
236 QFontDatabase mFontDB;
240 bool mDockMode =
false;
242 bool mLoadSvgParams =
false;
245 QMap<QgsPalLayerSettings::Property, QgsPropertyOverrideButton *> mButtons;
248 void setWidgetMode(
Mode mode );
249 void toggleDDButtons(
bool visible );
250 void blockFontChangeSignals(
bool blk );
251 void populateFontCapitalsComboBox();
252 void populateFontStyleComboBox();
253 void updateFont(
const QFont &font );
254 void connectValueChanged(
const QList<QWidget *> &widgets,
const char *slot );
259 void optionsStackedWidget_CurrentChanged(
int indx );
260 void showBackgroundRadius(
bool show );
261 void showBackgroundPenStyle(
bool show );
262 void mShapeSVGPathLineEdit_textChanged(
const QString &text );
264 void previewScaleChanged(
double scale );
265 void mFontSizeSpinBox_valueChanged(
double d );
266 void mFontCapitalsComboBox_currentIndexChanged(
int index );
267 void mFontFamilyCmbBx_currentFontChanged(
const QFont &f );
268 void mFontStyleComboBox_currentIndexChanged(
const QString &text );
269 void mFontUnderlineBtn_toggled(
bool ckd );
270 void mFontStrikethroughBtn_toggled(
bool ckd );
271 void kerningToggled(
bool checked );
272 void mFontWordSpacingSpinBox_valueChanged(
double spacing );
273 void mFontLetterSpacingSpinBox_valueChanged(
double spacing );
274 void mFontSizeUnitWidget_changed();
275 void mFontMinPixelSpinBox_valueChanged(
int px );
276 void mFontMaxPixelSpinBox_valueChanged(
int px );
277 void mBufferUnitWidget_changed();
278 void mCoordXDDBtn_activated(
bool active );
279 void mCoordYDDBtn_activated(
bool active );
280 void mShapeTypeCmbBx_currentIndexChanged(
int index );
281 void mShapeRotationCmbBx_currentIndexChanged(
int index );
282 void mShapeSVGParamsBtn_clicked();
283 void mShapeSVGSelectorBtn_clicked();
284 void mPreviewTextEdit_textChanged(
const QString &text );
285 void mPreviewTextBtn_clicked();
286 void mPreviewBackgroundBtn_colorChanged(
const QColor &color );
287 void mDirectSymbLeftToolBtn_clicked();
288 void mDirectSymbRightToolBtn_clicked();
289 void mChkNoObstacle_toggled(
bool active );
290 void chkLineOrientationDependent_toggled(
bool active );
291 void mToolButtonConfigureSubstitutes_clicked();
292 void collapseSample(
bool collapse );
293 void changeTextColor(
const QColor &color );
294 void changeBufferColor(
const QColor &color );
295 void scrollPreview();
296 void updateSvgWidgets(
const QString &svgPath );
297 void updateAvailableShadowPositions();
298 void updateProperty();
299 void createAuxiliaryField();
300 void updateShapeFrameStatus();
301 void updateBufferFrameStatus();
348 QDialogButtonBox *buttonBox()
const;
353 QDialogButtonBox *mButtonBox =
nullptr;
405 #endif //QGSTEXTFORMATWIDGET_H
QgsSymbolWidgetContext mContext
Context in which widget is shown.
A dialog for selecting a single character from a single font.
A widget for customizing text formatting settings.
Map canvas is a class for displaying all GIS data types on a canvas.
Show labeling settings in addition to text formatting settings.
StyleEntity
Enum for Entities involved in a style.
Property
Data definable properties.
virtual QgsExpressionContext createExpressionContext() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...
QgsPropertyCollection mDataDefinedProperties
Data defined properties as defined in the widget.
Contains settings which reflect the context in which a symbol (or renderer) widget is shown...
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
QgsStringReplacementCollection mSubstitutions
Text substitution list.
Abstract interface for generating an expression context.
A collection of string replacements (specified using QgsStringReplacement objects).
A panel widget for customizing text formatting settings.
A grouped map of multiple QgsProperty objects, each referenced by a integer key value.
Container for all settings relating to text rendering.
A simple dialog for customizing text formatting settings.
Represents a vector layer which manages a vector based data sets.