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;
420 bool mBlockSignals =
false;
423 #endif //QGSTEXTFORMATWIDGET_H