QGIS API Documentation  3.18.1-Zürich (202f1bf7e5)
qgstextrendererutils.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgstextrendererutils.h
3  -----------------
4  begin : May 2020
5  copyright : (C) Nyall Dawson
6  email : nyall dot dawson at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSTEXTRENDERERUTILS_H
17 #define QGSTEXTRENDERERUTILS_H
18 
19 #include "qgis_sip.h"
20 #include "qgis_core.h"
22 #include "qgstextshadowsettings.h"
23 #include "qgstextformat.h"
24 
31 class CORE_EXPORT QgsTextRendererUtils
32 {
33  public:
34 
38  static QgsTextBackgroundSettings::ShapeType decodeShapeType( const QString &string );
39 
43  static QgsTextBackgroundSettings::SizeType decodeBackgroundSizeType( const QString &string );
44 
48  static QgsTextBackgroundSettings::RotationType decodeBackgroundRotationType( const QString &string );
49 
53  static QgsTextShadowSettings::ShadowPlacement decodeShadowPlacementType( const QString &string );
54 
60  static QString encodeTextOrientation( QgsTextFormat::TextOrientation orientation );
61 
69  static QgsTextFormat::TextOrientation decodeTextOrientation( const QString &name, bool *ok = nullptr );
70 
77  static QgsUnitTypes::RenderUnit convertFromOldLabelUnit( int val ) SIP_SKIP;
78 
85  static QColor readColor( QgsVectorLayer *layer, const QString &property, const QColor &defaultColor = Qt::black, bool withAlpha = true ) SIP_SKIP;
86 };
87 
88 
89 #endif // QGSTEXTRENDERERUTILS_H
SizeType
Methods for determining the background shape size.
ShapeType
Background shape types.
RotationType
Methods for determining the rotation of the background shape.
TextOrientation
Text orientation.
Definition: qgstextformat.h:46
Utility functions for text rendering.
ShadowPlacement
Placement positions for text shadow.
RenderUnit
Rendering size units.
Definition: qgsunittypes.h:167
Represents a vector layer which manages a vector based data sets.
#define SIP_SKIP
Definition: qgis_sip.h:126