QGIS API Documentation
2.8.2-Wien
|
#include <qgspallabeling.h>
Public Member Functions | |
QgsPalLayerSettings () | |
QgsPalLayerSettings (const QgsPalLayerSettings &s) | |
~QgsPalLayerSettings () | |
void | calculateLabelSize (const QFontMetricsF *fm, QString text, double &labelX, double &labelY, QgsFeature *f=0) |
bool | dataDefinedEvaluate (QgsPalLayerSettings::DataDefinedProperties p, QVariant &exprVal) const |
Get data defined property value from expression string or attribute field name. | |
bool | dataDefinedIsActive (QgsPalLayerSettings::DataDefinedProperties p) const |
Whether data definition is active. | |
QMap< QString, QString > | dataDefinedMap (QgsPalLayerSettings::DataDefinedProperties p) const |
Get property value as separate values split into Qmap. | |
QMap < QgsPalLayerSettings::DataDefinedProperties, QPair< QString, int > > | dataDefinedNames () const |
Map of data defined enum to names and old-style indecies The QPair contains a new string for layer property key, and a reference to old-style numeric key (< QGIS 2.0) | |
QgsDataDefined * | dataDefinedProperty (QgsPalLayerSettings::DataDefinedProperties p) |
Get a data defined property pointer. | |
bool | dataDefinedUseExpression (QgsPalLayerSettings::DataDefinedProperties p) const |
Whether data definition is set to use an expression. | |
QVariant | dataDefinedValue (QgsPalLayerSettings::DataDefinedProperties p, QgsFeature &f, const QgsFields &fields) const |
Get data defined property value from expression string or attribute field name. | |
QgsExpression * | getLabelExpression () |
Returns the QgsExpression for this label settings. | |
void | readFromLayer (QgsVectorLayer *layer) |
void | registerFeature (QgsFeature &f, const QgsRenderContext &context, QString dxfLayer) |
void | removeDataDefinedProperty (QgsPalLayerSettings::DataDefinedProperties p) |
Set a property to static instead data defined. | |
double | scaleToPixelContext (double size, const QgsRenderContext &c, SizeUnit unit, bool rasterfactor=false, const QgsMapUnitScale &mapUnitScale=QgsMapUnitScale()) const |
Calculates size (considering output size should be in pixel or map units, scale factors and optionally oversampling) | |
void | setDataDefinedProperty (QgsPalLayerSettings::DataDefinedProperties p, bool active, bool useExpr, const QString &expr, const QString &field) |
Set a property as data defined. | |
int | sizeToPixel (double size, const QgsRenderContext &c, SizeUnit unit, bool rasterfactor=false, const QgsMapUnitScale &mapUnitScale=QgsMapUnitScale()) const |
Calculates pixel size (considering output size should be in pixel or map units, scale factors and optionally oversampling) | |
QString | updateDataDefinedString (const QString &value) |
Convert old property value to new one as delimited values. | |
void | writeToLayer (QgsVectorLayer *layer) |
Static Public Member Functions | |
static QgsPalLayerSettings | fromLayer (QgsVectorLayer *layer) |
Definition at line 64 of file qgspallabeling.h.
Definition at line 167 of file qgspallabeling.h.
Definition at line 112 of file qgspallabeling.h.
Definition at line 84 of file qgspallabeling.h.
Definition at line 119 of file qgspallabeling.h.
Definition at line 74 of file qgspallabeling.h.
QuadrantAboveLeft | |
QuadrantAbove | |
QuadrantAboveRight | |
QuadrantLeft | |
QuadrantOver | |
QuadrantRight | |
QuadrantBelowLeft | |
QuadrantBelow | |
QuadrantBelowRight |
Definition at line 92 of file qgspallabeling.h.
Definition at line 142 of file qgspallabeling.h.
Definition at line 158 of file qgspallabeling.h.
Definition at line 126 of file qgspallabeling.h.
Definition at line 135 of file qgspallabeling.h.
Units used for option sizes, before being converted to rendered sizes.
Definition at line 150 of file qgspallabeling.h.
Definition at line 105 of file qgspallabeling.h.
QgsPalLayerSettings::QgsPalLayerSettings | ( | ) |
Definition at line 80 of file qgspallabeling.cpp.
QgsPalLayerSettings::QgsPalLayerSettings | ( | const QgsPalLayerSettings & | s | ) |
Definition at line 317 of file qgspallabeling.cpp.
QgsPalLayerSettings::~QgsPalLayerSettings | ( | ) |
Definition at line 465 of file qgspallabeling.cpp.
void QgsPalLayerSettings::calculateLabelSize | ( | const QFontMetricsF * | fm, |
QString | text, | ||
double & | labelX, | ||
double & | labelY, | ||
QgsFeature * | f = 0 |
||
) |
Definition at line 1281 of file qgspallabeling.cpp.
bool QgsPalLayerSettings::dataDefinedEvaluate | ( | QgsPalLayerSettings::DataDefinedProperties | p, |
QVariant & | exprVal | ||
) | const |
Get data defined property value from expression string or attribute field name.
Definition at line 1201 of file qgspallabeling.cpp.
bool QgsPalLayerSettings::dataDefinedIsActive | ( | QgsPalLayerSettings::DataDefinedProperties | p | ) | const |
Whether data definition is active.
Definition at line 1219 of file qgspallabeling.cpp.
QMap< QString, QString > QgsPalLayerSettings::dataDefinedMap | ( | QgsPalLayerSettings::DataDefinedProperties | p | ) | const |
Get property value as separate values split into Qmap.
Definition at line 1133 of file qgspallabeling.cpp.
|
inline |
Map of data defined enum to names and old-style indecies The QPair contains a new string for layer property key, and a reference to old-style numeric key (< QGIS 2.0)
Definition at line 510 of file qgspallabeling.h.
QgsDataDefined * QgsPalLayerSettings::dataDefinedProperty | ( | QgsPalLayerSettings::DataDefinedProperties | p | ) |
Get a data defined property pointer.
Definition at line 1123 of file qgspallabeling.cpp.
bool QgsPalLayerSettings::dataDefinedUseExpression | ( | QgsPalLayerSettings::DataDefinedProperties | p | ) | const |
Whether data definition is set to use an expression.
Definition at line 1231 of file qgspallabeling.cpp.
QVariant QgsPalLayerSettings::dataDefinedValue | ( | QgsPalLayerSettings::DataDefinedProperties | p, |
QgsFeature & | f, | ||
const QgsFields & | fields | ||
) | const |
Get data defined property value from expression string or attribute field name.
Definition at line 1144 of file qgspallabeling.cpp.
|
static |
Definition at line 478 of file qgspallabeling.cpp.
QgsExpression * QgsPalLayerSettings::getLabelExpression | ( | ) |
Returns the QgsExpression for this label settings.
Definition at line 486 of file qgspallabeling.cpp.
void QgsPalLayerSettings::readFromLayer | ( | QgsVectorLayer * | layer | ) |
Definition at line 703 of file qgspallabeling.cpp.
void QgsPalLayerSettings::registerFeature | ( | QgsFeature & | f, |
const QgsRenderContext & | context, | ||
QString | dxfLayer | ||
) |
Definition at line 1442 of file qgspallabeling.cpp.
void QgsPalLayerSettings::removeDataDefinedProperty | ( | QgsPalLayerSettings::DataDefinedProperties | p | ) |
Set a property to static instead data defined.
Definition at line 1096 of file qgspallabeling.cpp.
double QgsPalLayerSettings::scaleToPixelContext | ( | double | size, |
const QgsRenderContext & | c, | ||
SizeUnit | unit, | ||
bool | rasterfactor = false , |
||
const QgsMapUnitScale & | mapUnitScale = QgsMapUnitScale() |
||
) | const |
Calculates size (considering output size should be in pixel or map units, scale factors and optionally oversampling)
size | size to convert |
c | rendercontext |
unit | SizeUnit enum value of size |
rasterfactor | whether to consider oversampling |
mapUnitScale | a mapUnitScale clamper |
Definition at line 3075 of file qgspallabeling.cpp.
void QgsPalLayerSettings::setDataDefinedProperty | ( | QgsPalLayerSettings::DataDefinedProperties | p, |
bool | active, | ||
bool | useExpr, | ||
const QString & | expr, | ||
const QString & | field | ||
) |
Set a property as data defined.
Definition at line 1072 of file qgspallabeling.cpp.
int QgsPalLayerSettings::sizeToPixel | ( | double | size, |
const QgsRenderContext & | c, | ||
SizeUnit | unit, | ||
bool | rasterfactor = false , |
||
const QgsMapUnitScale & | mapUnitScale = QgsMapUnitScale() |
||
) | const |
Calculates pixel size (considering output size should be in pixel or map units, scale factors and optionally oversampling)
size | size to convert |
c | rendercontext |
unit | SizeUnit enum value of size |
rasterfactor | whether to consider oversampling |
mapUnitScale | a mapUnitScale clamper |
Definition at line 3070 of file qgspallabeling.cpp.
QString QgsPalLayerSettings::updateDataDefinedString | ( | const QString & | value | ) |
Convert old property value to new one as delimited values.
Definition at line 1106 of file qgspallabeling.cpp.
void QgsPalLayerSettings::writeToLayer | ( | QgsVectorLayer * | layer | ) |
Definition at line 922 of file qgspallabeling.cpp.
bool QgsPalLayerSettings::addDirectionSymbol |
Definition at line 305 of file qgspallabeling.h.
double QgsPalLayerSettings::angleOffset |
Definition at line 394 of file qgspallabeling.h.
QPainter::CompositionMode QgsPalLayerSettings::blendMode |
Definition at line 293 of file qgspallabeling.h.
QPainter::CompositionMode QgsPalLayerSettings::bufferBlendMode |
Definition at line 325 of file qgspallabeling.h.
QColor QgsPalLayerSettings::bufferColor |
Definition at line 321 of file qgspallabeling.h.
bool QgsPalLayerSettings::bufferDraw |
Definition at line 317 of file qgspallabeling.h.
Qt::PenJoinStyle QgsPalLayerSettings::bufferJoinStyle |
Definition at line 324 of file qgspallabeling.h.
bool QgsPalLayerSettings::bufferNoFill |
Definition at line 322 of file qgspallabeling.h.
double QgsPalLayerSettings::bufferSize |
Definition at line 318 of file qgspallabeling.h.
bool QgsPalLayerSettings::bufferSizeInMapUnits |
Definition at line 319 of file qgspallabeling.h.
QgsMapUnitScale QgsPalLayerSettings::bufferSizeMapUnitScale |
Definition at line 320 of file qgspallabeling.h.
int QgsPalLayerSettings::bufferTransp |
Definition at line 323 of file qgspallabeling.h.
bool QgsPalLayerSettings::centroidInside |
Definition at line 377 of file qgspallabeling.h.
bool QgsPalLayerSettings::centroidWhole |
Definition at line 376 of file qgspallabeling.h.
const QgsCoordinateTransform* QgsPalLayerSettings::ct |
Definition at line 519 of file qgspallabeling.h.
QMap< QgsPalLayerSettings::DataDefinedProperties, QgsDataDefined* > QgsPalLayerSettings::dataDefinedProperties |
Map of current data defined properties.
Definition at line 483 of file qgspallabeling.h.
int QgsPalLayerSettings::decimals |
Definition at line 312 of file qgspallabeling.h.
bool QgsPalLayerSettings::displayAll |
Definition at line 412 of file qgspallabeling.h.
double QgsPalLayerSettings::dist |
Definition at line 378 of file qgspallabeling.h.
bool QgsPalLayerSettings::distInMapUnits |
Definition at line 379 of file qgspallabeling.h.
QgsMapUnitScale QgsPalLayerSettings::distMapUnitScale |
Definition at line 380 of file qgspallabeling.h.
bool QgsPalLayerSettings::enabled |
Definition at line 273 of file qgspallabeling.h.
QgsGeometry* QgsPalLayerSettings::extentGeom |
Definition at line 522 of file qgspallabeling.h.
int QgsPalLayerSettings::fieldIndex |
Definition at line 517 of file qgspallabeling.h.
QString QgsPalLayerSettings::fieldName |
Definition at line 277 of file qgspallabeling.h.
bool QgsPalLayerSettings::fontLimitPixelSize |
Definition at line 408 of file qgspallabeling.h.
int QgsPalLayerSettings::fontMaxPixelSize |
Definition at line 410 of file qgspallabeling.h.
int QgsPalLayerSettings::fontMinPixelSize |
Definition at line 409 of file qgspallabeling.h.
bool QgsPalLayerSettings::fontSizeInMapUnits |
Definition at line 289 of file qgspallabeling.h.
QgsMapUnitScale QgsPalLayerSettings::fontSizeMapUnitScale |
Definition at line 290 of file qgspallabeling.h.
bool QgsPalLayerSettings::formatNumbers |
Definition at line 311 of file qgspallabeling.h.
QList<QgsPalGeometry*> QgsPalLayerSettings::geometries |
Definition at line 521 of file qgspallabeling.h.
bool QgsPalLayerSettings::isExpression |
Is this label made from a expression string eg FieldName || 'mm'.
Definition at line 281 of file qgspallabeling.h.
bool QgsPalLayerSettings::labelOffsetInMapUnits |
Definition at line 392 of file qgspallabeling.h.
QgsMapUnitScale QgsPalLayerSettings::labelOffsetMapUnitScale |
Definition at line 393 of file qgspallabeling.h.
bool QgsPalLayerSettings::labelPerPart |
Definition at line 415 of file qgspallabeling.h.
QString QgsPalLayerSettings::leftDirectionSymbol |
Definition at line 306 of file qgspallabeling.h.
bool QgsPalLayerSettings::limitNumLabels |
Definition at line 418 of file qgspallabeling.h.
double QgsPalLayerSettings::maxCurvedCharAngleIn |
Definition at line 397 of file qgspallabeling.h.
double QgsPalLayerSettings::maxCurvedCharAngleOut |
Definition at line 398 of file qgspallabeling.h.
int QgsPalLayerSettings::maxNumLabels |
Definition at line 419 of file qgspallabeling.h.
QgsFeature* QgsPalLayerSettings::mCurFeat |
Definition at line 515 of file qgspallabeling.h.
const QgsFields* QgsPalLayerSettings::mCurFields |
Definition at line 516 of file qgspallabeling.h.
bool QgsPalLayerSettings::mergeLines |
Definition at line 416 of file qgspallabeling.h.
int QgsPalLayerSettings::mFeatsRegPal |
Definition at line 525 of file qgspallabeling.h.
int QgsPalLayerSettings::mFeatsSendingToPal |
Definition at line 524 of file qgspallabeling.h.
int QgsPalLayerSettings::mFeaturesToLabel |
Definition at line 523 of file qgspallabeling.h.
double QgsPalLayerSettings::minFeatureSize |
Definition at line 421 of file qgspallabeling.h.
QString QgsPalLayerSettings::mTextFontFamily |
Definition at line 527 of file qgspallabeling.h.
bool QgsPalLayerSettings::mTextFontFound |
Definition at line 528 of file qgspallabeling.h.
MultiLineAlign QgsPalLayerSettings::multilineAlign |
Definition at line 300 of file qgspallabeling.h.
double QgsPalLayerSettings::multilineHeight |
Definition at line 299 of file qgspallabeling.h.
bool QgsPalLayerSettings::obstacle |
Definition at line 422 of file qgspallabeling.h.
pal::Layer* QgsPalLayerSettings::palLayer |
Definition at line 514 of file qgspallabeling.h.
DirectionSymbols QgsPalLayerSettings::placeDirectionSymbol |
Definition at line 308 of file qgspallabeling.h.
Placement QgsPalLayerSettings::placement |
Definition at line 373 of file qgspallabeling.h.
unsigned int QgsPalLayerSettings::placementFlags |
Definition at line 374 of file qgspallabeling.h.
bool QgsPalLayerSettings::plusSign |
Definition at line 313 of file qgspallabeling.h.
bool QgsPalLayerSettings::preserveRotation |
Definition at line 395 of file qgspallabeling.h.
QColor QgsPalLayerSettings::previewBkgrdColor |
Definition at line 294 of file qgspallabeling.h.
int QgsPalLayerSettings::priority |
Definition at line 400 of file qgspallabeling.h.
QgsPoint QgsPalLayerSettings::ptOne |
Definition at line 520 of file qgspallabeling.h.
QgsPoint QgsPalLayerSettings::ptZero |
Definition at line 520 of file qgspallabeling.h.
QuadrantPosition QgsPalLayerSettings::quadOffset |
Definition at line 388 of file qgspallabeling.h.
double QgsPalLayerSettings::rasterCompressFactor |
Definition at line 426 of file qgspallabeling.h.
double QgsPalLayerSettings::repeatDistance |
Definition at line 382 of file qgspallabeling.h.
QgsMapUnitScale QgsPalLayerSettings::repeatDistanceMapUnitScale |
Definition at line 384 of file qgspallabeling.h.
SizeUnit QgsPalLayerSettings::repeatDistanceUnit |
Definition at line 383 of file qgspallabeling.h.
bool QgsPalLayerSettings::reverseDirectionSymbol |
Definition at line 309 of file qgspallabeling.h.
QString QgsPalLayerSettings::rightDirectionSymbol |
Definition at line 307 of file qgspallabeling.h.
int QgsPalLayerSettings::scaleMax |
Definition at line 406 of file qgspallabeling.h.
int QgsPalLayerSettings::scaleMin |
Definition at line 405 of file qgspallabeling.h.
bool QgsPalLayerSettings::scaleVisibility |
Definition at line 404 of file qgspallabeling.h.
QPainter::CompositionMode QgsPalLayerSettings::shadowBlendMode |
Definition at line 369 of file qgspallabeling.h.
QColor QgsPalLayerSettings::shadowColor |
Definition at line 368 of file qgspallabeling.h.
bool QgsPalLayerSettings::shadowDraw |
Definition at line 355 of file qgspallabeling.h.
int QgsPalLayerSettings::shadowOffsetAngle |
Definition at line 357 of file qgspallabeling.h.
double QgsPalLayerSettings::shadowOffsetDist |
Definition at line 358 of file qgspallabeling.h.
bool QgsPalLayerSettings::shadowOffsetGlobal |
Definition at line 361 of file qgspallabeling.h.
QgsMapUnitScale QgsPalLayerSettings::shadowOffsetMapUnitScale |
Definition at line 360 of file qgspallabeling.h.
SizeUnit QgsPalLayerSettings::shadowOffsetUnits |
Definition at line 359 of file qgspallabeling.h.
double QgsPalLayerSettings::shadowRadius |
Definition at line 362 of file qgspallabeling.h.
bool QgsPalLayerSettings::shadowRadiusAlphaOnly |
Definition at line 365 of file qgspallabeling.h.
QgsMapUnitScale QgsPalLayerSettings::shadowRadiusMapUnitScale |
Definition at line 364 of file qgspallabeling.h.
SizeUnit QgsPalLayerSettings::shadowRadiusUnits |
Definition at line 363 of file qgspallabeling.h.
int QgsPalLayerSettings::shadowScale |
Definition at line 367 of file qgspallabeling.h.
int QgsPalLayerSettings::shadowTransparency |
Definition at line 366 of file qgspallabeling.h.
ShadowType QgsPalLayerSettings::shadowUnder |
Definition at line 356 of file qgspallabeling.h.
QPainter::CompositionMode QgsPalLayerSettings::shapeBlendMode |
Definition at line 345 of file qgspallabeling.h.
QColor QgsPalLayerSettings::shapeBorderColor |
Definition at line 347 of file qgspallabeling.h.
double QgsPalLayerSettings::shapeBorderWidth |
Definition at line 348 of file qgspallabeling.h.
QgsMapUnitScale QgsPalLayerSettings::shapeBorderWidthMapUnitScale |
Definition at line 350 of file qgspallabeling.h.
SizeUnit QgsPalLayerSettings::shapeBorderWidthUnits |
Definition at line 349 of file qgspallabeling.h.
bool QgsPalLayerSettings::shapeDraw |
Definition at line 329 of file qgspallabeling.h.
QColor QgsPalLayerSettings::shapeFillColor |
Definition at line 346 of file qgspallabeling.h.
Qt::PenJoinStyle QgsPalLayerSettings::shapeJoinStyle |
Definition at line 351 of file qgspallabeling.h.
QPointF QgsPalLayerSettings::shapeOffset |
Definition at line 338 of file qgspallabeling.h.
QgsMapUnitScale QgsPalLayerSettings::shapeOffsetMapUnitScale |
Definition at line 340 of file qgspallabeling.h.
SizeUnit QgsPalLayerSettings::shapeOffsetUnits |
Definition at line 339 of file qgspallabeling.h.
QPointF QgsPalLayerSettings::shapeRadii |
Definition at line 341 of file qgspallabeling.h.
QgsMapUnitScale QgsPalLayerSettings::shapeRadiiMapUnitScale |
Definition at line 343 of file qgspallabeling.h.
SizeUnit QgsPalLayerSettings::shapeRadiiUnits |
Definition at line 342 of file qgspallabeling.h.
double QgsPalLayerSettings::shapeRotation |
Definition at line 337 of file qgspallabeling.h.
RotationType QgsPalLayerSettings::shapeRotationType |
Definition at line 336 of file qgspallabeling.h.
QPointF QgsPalLayerSettings::shapeSize |
Definition at line 333 of file qgspallabeling.h.
QgsMapUnitScale QgsPalLayerSettings::shapeSizeMapUnitScale |
Definition at line 335 of file qgspallabeling.h.
SizeType QgsPalLayerSettings::shapeSizeType |
Definition at line 332 of file qgspallabeling.h.
SizeUnit QgsPalLayerSettings::shapeSizeUnits |
Definition at line 334 of file qgspallabeling.h.
QString QgsPalLayerSettings::shapeSVGFile |
Definition at line 331 of file qgspallabeling.h.
int QgsPalLayerSettings::shapeTransparency |
Definition at line 344 of file qgspallabeling.h.
ShapeType QgsPalLayerSettings::shapeType |
Definition at line 330 of file qgspallabeling.h.
bool QgsPalLayerSettings::showingShadowRects |
Definition at line 530 of file qgspallabeling.h.
QColor QgsPalLayerSettings::textColor |
Definition at line 291 of file qgspallabeling.h.
QFont QgsPalLayerSettings::textFont |
Definition at line 287 of file qgspallabeling.h.
QString QgsPalLayerSettings::textNamedStyle |
Definition at line 288 of file qgspallabeling.h.
int QgsPalLayerSettings::textTransp |
Definition at line 292 of file qgspallabeling.h.
unsigned int QgsPalLayerSettings::upsidedownLabels |
Definition at line 413 of file qgspallabeling.h.
double QgsPalLayerSettings::vectorScaleFactor |
Definition at line 425 of file qgspallabeling.h.
QString QgsPalLayerSettings::wrapChar |
Definition at line 298 of file qgspallabeling.h.
const QgsMapToPixel* QgsPalLayerSettings::xform |
Definition at line 518 of file qgspallabeling.h.
double QgsPalLayerSettings::xOffset |
Definition at line 390 of file qgspallabeling.h.
double QgsPalLayerSettings::yOffset |
Definition at line 391 of file qgspallabeling.h.