21 #ifndef QGSPALLABELING_H
22 #define QGSPALLABELING_H
37 #include <QFontDatabase>
181 FontLetterSpacing = 28,
182 FontWordSpacing = 29,
186 MultiLineWrapChar = 31,
187 MultiLineHeight = 32,
188 MultiLineAlignment = 33,
192 DirSymbPlacement = 37,
204 BufferJoinStyle = 44,
205 BufferBlendMode = 45,
215 ShapeRotationType = 52,
218 ShapeOffsetUnits = 55,
220 ShapeRadiiUnits = 57,
221 ShapeTransparency = 63,
224 ShapeBorderColor = 59,
225 ShapeBorderWidth = 60,
226 ShapeBorderWidthUnits = 61,
232 ShadowOffsetAngle = 67,
233 ShadowOffsetDist = 68,
234 ShadowOffsetUnits = 69,
236 ShadowRadiusUnits = 71,
237 ShadowTransparency = 72,
240 ShadowBlendMode = 75,
250 CurvedCharAngleInOut = 83,
258 RepeatDistanceUnit = 86,
261 ScaleVisibility = 23,
429 void calculateLabelSize(
const QFontMetricsF* fm, QString text,
double& labelX,
double& labelY,
QgsFeature* f = 0 );
446 bool active,
bool useExpr,
const QString& expr,
const QString& field );
454 QString updateDataDefinedString(
const QString& value );
510 QMap<QgsPalLayerSettings::DataDefinedProperties, QPair<QString, int> >
dataDefinedNames()
const {
return mDataDefinedNames; }
545 bool dataDefinedValEval(
const QString& valType,
549 void parseTextStyle( QFont& labelFont,
553 void parseTextBuffer();
555 void parseTextFormatting();
557 void parseShapeBackground();
559 void parseDropShadow();
566 QMap<DataDefinedProperties, QVariant> dataDefinedValues;
568 QMap<QgsPalLayerSettings::DataDefinedProperties, QPair<QString, int> > mDataDefinedNames;
570 QFontDatabase mFontDB;
592 , mUseOrigin( false )
594 , mRotationOffset( 0.0 )
595 , mUseRotation( false )
597 , mUseCenter( false )
601 , mPictureBuffer( 0.0 )
607 const QString&
text()
const {
return mText; }
608 void setText(
const QString& text ) { mText = text; }
617 void setRotation(
const double rotation ) { mRotation = rotation; }
637 const QPicture*
picture()
const {
return mPicture; }
657 double mRotationOffset;
673 double mPictureBuffer;
691 QList<QgsLabelPosition> labelsAtPosition(
const QgsPoint& p )
const;
693 QList<QgsLabelPosition> labelsWithinRect(
const QgsRectangle& r )
const;
721 void numCandidatePositions(
int& candPoint,
int& candLine,
int& candPolygon );
722 void setNumCandidatePositions(
int candPoint,
int candLine,
int candPolygon );
724 enum Search {
Chain, Popmusic_Tabu, Popmusic_Chain, Popmusic_Tabu_Chain, Falp };
726 void setSearchMethod( Search s );
727 Search searchMethod()
const;
731 const QList<QgsLabelCandidate>&
candidates() {
return mCandidates; }
759 static bool staticWillUseLayer(
const QString& layerID );
775 virtual void exit()
override;
810 void loadEngineSettings();
811 void saveEngineSettings();
812 void clearEngineSettings();
821 const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant >& ddValues );
825 const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant >& ddValues );
829 const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant >& ddValues );
833 const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant >& ddValues );
837 const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant >& ddValues );
839 void deleteTemporaryData();
866 #endif // QGSPALLABELING_H