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 );
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;
426 bool mBlockSignals =
false;
429 #endif //QGSTEXTFORMATWIDGET_H