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;
198 void updateLinePlacementOptions();
201 void updatePlacementWidgets();
212 virtual void saveFormat();
218 void updatePreview();
228 void populateDataDefinedButtons();
232 Mode mWidgetMode = Text;
235 std::unique_ptr< QgsPaintEffect > mBufferEffect;
236 std::unique_ptr< QgsPaintEffect > mMaskEffect;
237 std::unique_ptr< QgsPaintEffect > mBackgroundEffect;
238 QColor mPreviewBackgroundColor;
240 QFontDatabase mFontDB;
244 bool mDockMode =
false;
246 bool mLoadSvgParams =
false;
249 QMap<QgsPalLayerSettings::Property, QgsPropertyOverrideButton *> mButtons;
252 void setWidgetMode(
Mode mode );
253 void toggleDDButtons(
bool visible );
254 void blockFontChangeSignals(
bool blk );
255 void populateFontCapitalsComboBox();
256 void populateFontStyleComboBox();
257 void updateFont(
const QFont &font );
258 void connectValueChanged(
const QList<QWidget *> &widgets,
const char *slot );
263 void optionsStackedWidget_CurrentChanged(
int indx );
264 void showBackgroundRadius(
bool show );
265 void showBackgroundPenStyle(
bool show );
266 void mShapeSVGPathLineEdit_textChanged(
const QString &text );
268 void previewScaleChanged(
double scale );
269 void mFontSizeSpinBox_valueChanged(
double d );
270 void mFontCapitalsComboBox_currentIndexChanged(
int index );
271 void mFontFamilyCmbBx_currentFontChanged(
const QFont &f );
272 void mFontStyleComboBox_currentIndexChanged(
const QString &text );
273 void mFontUnderlineBtn_toggled(
bool ckd );
274 void mFontStrikethroughBtn_toggled(
bool ckd );
275 void kerningToggled(
bool checked );
276 void mFontWordSpacingSpinBox_valueChanged(
double spacing );
277 void mFontLetterSpacingSpinBox_valueChanged(
double spacing );
278 void mFontSizeUnitWidget_changed();
279 void mFontMinPixelSpinBox_valueChanged(
int px );
280 void mFontMaxPixelSpinBox_valueChanged(
int px );
281 void mBufferUnitWidget_changed();
282 void mMaskBufferUnitWidget_changed();
283 void mCoordXDDBtn_changed( );
284 void mCoordYDDBtn_changed( );
285 void mShapeTypeCmbBx_currentIndexChanged(
int index );
286 void mShapeRotationCmbBx_currentIndexChanged(
int index );
287 void mShapeSVGParamsBtn_clicked();
288 void mShapeSVGSelectorBtn_clicked();
289 void mPreviewTextEdit_textChanged(
const QString &text );
290 void mPreviewTextBtn_clicked();
291 void mPreviewBackgroundBtn_colorChanged(
const QColor &color );
292 void mDirectSymbLeftToolBtn_clicked();
293 void mDirectSymbRightToolBtn_clicked();
294 void chkLineOrientationDependent_toggled(
bool active );
295 void mToolButtonConfigureSubstitutes_clicked();
296 void collapseSample(
bool collapse );
297 void changeTextColor(
const QColor &color );
298 void changeBufferColor(
const QColor &color );
299 void scrollPreview();
300 void updateSvgWidgets(
const QString &svgPath );
301 void updateAvailableShadowPositions();
302 void updateProperty();
303 void createAuxiliaryField();
304 void updateShapeFrameStatus();
305 void updateBufferFrameStatus();
306 void updateShadowFrameStatus();
307 void updateCalloutFrameStatus();
354 QDialogButtonBox *buttonBox()
const;
359 QDialogButtonBox *mButtonBox =
nullptr;
411 #endif //QGSTEXTFORMATWIDGET_H