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 );
511 QMap<QgsPalLayerSettings::DataDefinedProperties, QPair<QString, int> >
dataDefinedNames()
const {
return mDataDefinedNames; }
546 bool dataDefinedValEval(
const QString& valType,
550 void parseTextStyle( QFont& labelFont,
554 void parseTextBuffer();
556 void parseTextFormatting();
558 void parseShapeBackground();
560 void parseDropShadow();
567 QMap<DataDefinedProperties, QVariant> dataDefinedValues;
569 QMap<QgsPalLayerSettings::DataDefinedProperties, QPair<QString, int> > mDataDefinedNames;
571 QFontDatabase mFontDB;
593 , mUseOrigin( false )
595 , mRotationOffset( 0.0 )
596 , mUseRotation( false )
598 , mUseCenter( false )
602 , mPictureBuffer( 0.0 )
608 const QString&
text() {
return mText; }
609 void setText(
const QString& text ) { mText = text; }
638 const QPicture*
picture() {
return mPicture; }
658 double mRotationOffset;
674 double mPictureBuffer;
692 QList<QgsLabelPosition> labelsAtPosition(
const QgsPoint& p )
const;
694 QList<QgsLabelPosition> labelsWithinRect(
const QgsRectangle& r )
const;
722 void numCandidatePositions(
int& candPoint,
int& candLine,
int& candPolygon );
723 void setNumCandidatePositions(
int candPoint,
int candLine,
int candPolygon );
725 enum Search {
Chain, Popmusic_Tabu, Popmusic_Chain, Popmusic_Tabu_Chain, Falp };
727 void setSearchMethod( Search s );
728 Search searchMethod()
const;
732 const QList<QgsLabelCandidate>&
candidates() {
return mCandidates; }
760 static bool staticWillUseLayer(
const QString& layerID );
811 void loadEngineSettings();
812 void saveEngineSettings();
813 void clearEngineSettings();
822 const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant >& ddValues );
826 const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant >& ddValues );
830 const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant >& ddValues );
834 const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant >& ddValues );
838 const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant >& ddValues );
840 void deleteTemporaryData();
867 #endif // QGSPALLABELING_H