QGIS API Documentation
2.6.0-Brighton
|
#include <qgspallabeling.h>
Public Member Functions | |
QgsPalLayerSettings () | |
QgsPalLayerSettings (const QgsPalLayerSettings &s) | |
~QgsPalLayerSettings () | |
QgsExpression * | getLabelExpression () |
Returns the QgsExpression for this label settings. | |
void | calculateLabelSize (const QFontMetricsF *fm, QString text, double &labelX, double &labelY, QgsFeature *f=0) |
void | registerFeature (QgsFeature &f, const QgsRenderContext &context, QString dxfLayer) |
void | readFromLayer (QgsVectorLayer *layer) |
void | writeToLayer (QgsVectorLayer *layer) |
QgsDataDefined * | dataDefinedProperty (QgsPalLayerSettings::DataDefinedProperties p) |
Get a data defined property pointer. | |
void | setDataDefinedProperty (QgsPalLayerSettings::DataDefinedProperties p, bool active, bool useExpr, const QString &expr, const QString &field) |
Set a property as data defined. | |
void | removeDataDefinedProperty (QgsPalLayerSettings::DataDefinedProperties p) |
Set a property to static instead data defined. | |
QString | updateDataDefinedString (const QString &value) |
Convert old property value to new one as delimited values. | |
QMap< QString, QString > | dataDefinedMap (QgsPalLayerSettings::DataDefinedProperties p) const |
Get property value as separate values split into Qmap. | |
QVariant | dataDefinedValue (QgsPalLayerSettings::DataDefinedProperties p, QgsFeature &f, const QgsFields &fields) const |
Get data defined property value from expression string or attribute field name. | |
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. | |
bool | dataDefinedUseExpression (QgsPalLayerSettings::DataDefinedProperties p) const |
Whether data definition is set to use an expression. | |
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) | |
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) | |
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) |
Static Public Member Functions | |
static QgsPalLayerSettings | fromLayer (QgsVectorLayer *layer) |
QgsPalLayerSettings::QgsPalLayerSettings | ( | ) |
QgsPalLayerSettings::QgsPalLayerSettings | ( | const QgsPalLayerSettings & | s | ) |
QgsPalLayerSettings::~QgsPalLayerSettings | ( | ) |
void QgsPalLayerSettings::calculateLabelSize | ( | const QFontMetricsF * | fm, |
QString | text, | ||
double & | labelX, | ||
double & | labelY, | ||
QgsFeature * | f = 0 |
||
) |
bool QgsPalLayerSettings::dataDefinedEvaluate | ( | QgsPalLayerSettings::DataDefinedProperties | p, |
QVariant & | exprVal | ||
) | const |
Get data defined property value from expression string or attribute field name.
bool QgsPalLayerSettings::dataDefinedIsActive | ( | QgsPalLayerSettings::DataDefinedProperties | p | ) | const |
Whether data definition is active.
QMap< QString, QString > QgsPalLayerSettings::dataDefinedMap | ( | QgsPalLayerSettings::DataDefinedProperties | p | ) | const |
Get property value as separate values split into Qmap.
|
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)
QgsDataDefined * QgsPalLayerSettings::dataDefinedProperty | ( | QgsPalLayerSettings::DataDefinedProperties | p | ) |
Get a data defined property pointer.
bool QgsPalLayerSettings::dataDefinedUseExpression | ( | QgsPalLayerSettings::DataDefinedProperties | p | ) | const |
Whether data definition is set to use an expression.
QVariant QgsPalLayerSettings::dataDefinedValue | ( | QgsPalLayerSettings::DataDefinedProperties | p, |
QgsFeature & | f, | ||
const QgsFields & | fields | ||
) | const |
Get data defined property value from expression string or attribute field name.
|
static |
QgsExpression * QgsPalLayerSettings::getLabelExpression | ( | ) |
Returns the QgsExpression for this label settings.
void QgsPalLayerSettings::readFromLayer | ( | QgsVectorLayer * | layer | ) |
void QgsPalLayerSettings::registerFeature | ( | QgsFeature & | f, |
const QgsRenderContext & | context, | ||
QString | dxfLayer | ||
) |
void QgsPalLayerSettings::removeDataDefinedProperty | ( | QgsPalLayerSettings::DataDefinedProperties | p | ) |
Set a property to static instead data defined.
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 |
void QgsPalLayerSettings::setDataDefinedProperty | ( | QgsPalLayerSettings::DataDefinedProperties | p, |
bool | active, | ||
bool | useExpr, | ||
const QString & | expr, | ||
const QString & | field | ||
) |
Set a property as data defined.
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 |
QString QgsPalLayerSettings::updateDataDefinedString | ( | const QString & | value | ) |
Convert old property value to new one as delimited values.
void QgsPalLayerSettings::writeToLayer | ( | QgsVectorLayer * | layer | ) |
bool QgsPalLayerSettings::addDirectionSymbol |
double QgsPalLayerSettings::angleOffset |
QPainter::CompositionMode QgsPalLayerSettings::blendMode |
QPainter::CompositionMode QgsPalLayerSettings::bufferBlendMode |
QColor QgsPalLayerSettings::bufferColor |
bool QgsPalLayerSettings::bufferDraw |
Qt::PenJoinStyle QgsPalLayerSettings::bufferJoinStyle |
bool QgsPalLayerSettings::bufferNoFill |
double QgsPalLayerSettings::bufferSize |
bool QgsPalLayerSettings::bufferSizeInMapUnits |
QgsMapUnitScale QgsPalLayerSettings::bufferSizeMapUnitScale |
int QgsPalLayerSettings::bufferTransp |
bool QgsPalLayerSettings::centroidInside |
bool QgsPalLayerSettings::centroidWhole |
const QgsCoordinateTransform* QgsPalLayerSettings::ct |
QMap< QgsPalLayerSettings::DataDefinedProperties, QgsDataDefined* > QgsPalLayerSettings::dataDefinedProperties |
Map of current data defined properties.
int QgsPalLayerSettings::decimals |
bool QgsPalLayerSettings::displayAll |
double QgsPalLayerSettings::dist |
bool QgsPalLayerSettings::distInMapUnits |
QgsMapUnitScale QgsPalLayerSettings::distMapUnitScale |
bool QgsPalLayerSettings::enabled |
QgsGeometry* QgsPalLayerSettings::extentGeom |
int QgsPalLayerSettings::fieldIndex |
QString QgsPalLayerSettings::fieldName |
bool QgsPalLayerSettings::fontLimitPixelSize |
int QgsPalLayerSettings::fontMaxPixelSize |
int QgsPalLayerSettings::fontMinPixelSize |
bool QgsPalLayerSettings::fontSizeInMapUnits |
QgsMapUnitScale QgsPalLayerSettings::fontSizeMapUnitScale |
bool QgsPalLayerSettings::formatNumbers |
QList<QgsPalGeometry*> QgsPalLayerSettings::geometries |
bool QgsPalLayerSettings::isExpression |
Is this label made from a expression string eg FieldName || 'mm'.
bool QgsPalLayerSettings::labelOffsetInMapUnits |
QgsMapUnitScale QgsPalLayerSettings::labelOffsetMapUnitScale |
bool QgsPalLayerSettings::labelPerPart |
QString QgsPalLayerSettings::leftDirectionSymbol |
bool QgsPalLayerSettings::limitNumLabels |
double QgsPalLayerSettings::maxCurvedCharAngleIn |
double QgsPalLayerSettings::maxCurvedCharAngleOut |
int QgsPalLayerSettings::maxNumLabels |
QgsFeature* QgsPalLayerSettings::mCurFeat |
const QgsFields* QgsPalLayerSettings::mCurFields |
bool QgsPalLayerSettings::mergeLines |
int QgsPalLayerSettings::mFeatsRegPal |
int QgsPalLayerSettings::mFeatsSendingToPal |
int QgsPalLayerSettings::mFeaturesToLabel |
double QgsPalLayerSettings::minFeatureSize |
QString QgsPalLayerSettings::mTextFontFamily |
bool QgsPalLayerSettings::mTextFontFound |
MultiLineAlign QgsPalLayerSettings::multilineAlign |
double QgsPalLayerSettings::multilineHeight |
bool QgsPalLayerSettings::obstacle |
pal::Layer* QgsPalLayerSettings::palLayer |
DirectionSymbols QgsPalLayerSettings::placeDirectionSymbol |
Placement QgsPalLayerSettings::placement |
unsigned int QgsPalLayerSettings::placementFlags |
bool QgsPalLayerSettings::plusSign |
bool QgsPalLayerSettings::preserveRotation |
QColor QgsPalLayerSettings::previewBkgrdColor |
int QgsPalLayerSettings::priority |
QgsPoint QgsPalLayerSettings::ptOne |
QgsPoint QgsPalLayerSettings::ptZero |
QuadrantPosition QgsPalLayerSettings::quadOffset |
double QgsPalLayerSettings::rasterCompressFactor |
double QgsPalLayerSettings::repeatDistance |
QgsMapUnitScale QgsPalLayerSettings::repeatDistanceMapUnitScale |
SizeUnit QgsPalLayerSettings::repeatDistanceUnit |
bool QgsPalLayerSettings::reverseDirectionSymbol |
QString QgsPalLayerSettings::rightDirectionSymbol |
int QgsPalLayerSettings::scaleMax |
int QgsPalLayerSettings::scaleMin |
bool QgsPalLayerSettings::scaleVisibility |
QPainter::CompositionMode QgsPalLayerSettings::shadowBlendMode |
QColor QgsPalLayerSettings::shadowColor |
bool QgsPalLayerSettings::shadowDraw |
int QgsPalLayerSettings::shadowOffsetAngle |
double QgsPalLayerSettings::shadowOffsetDist |
bool QgsPalLayerSettings::shadowOffsetGlobal |
QgsMapUnitScale QgsPalLayerSettings::shadowOffsetMapUnitScale |
SizeUnit QgsPalLayerSettings::shadowOffsetUnits |
double QgsPalLayerSettings::shadowRadius |
bool QgsPalLayerSettings::shadowRadiusAlphaOnly |
QgsMapUnitScale QgsPalLayerSettings::shadowRadiusMapUnitScale |
SizeUnit QgsPalLayerSettings::shadowRadiusUnits |
int QgsPalLayerSettings::shadowScale |
int QgsPalLayerSettings::shadowTransparency |
ShadowType QgsPalLayerSettings::shadowUnder |
QPainter::CompositionMode QgsPalLayerSettings::shapeBlendMode |
QColor QgsPalLayerSettings::shapeBorderColor |
double QgsPalLayerSettings::shapeBorderWidth |
QgsMapUnitScale QgsPalLayerSettings::shapeBorderWidthMapUnitScale |
SizeUnit QgsPalLayerSettings::shapeBorderWidthUnits |
bool QgsPalLayerSettings::shapeDraw |
QColor QgsPalLayerSettings::shapeFillColor |
Qt::PenJoinStyle QgsPalLayerSettings::shapeJoinStyle |
QPointF QgsPalLayerSettings::shapeOffset |
QgsMapUnitScale QgsPalLayerSettings::shapeOffsetMapUnitScale |
SizeUnit QgsPalLayerSettings::shapeOffsetUnits |
QPointF QgsPalLayerSettings::shapeRadii |
QgsMapUnitScale QgsPalLayerSettings::shapeRadiiMapUnitScale |
SizeUnit QgsPalLayerSettings::shapeRadiiUnits |
double QgsPalLayerSettings::shapeRotation |
RotationType QgsPalLayerSettings::shapeRotationType |
QPointF QgsPalLayerSettings::shapeSize |
QgsMapUnitScale QgsPalLayerSettings::shapeSizeMapUnitScale |
SizeType QgsPalLayerSettings::shapeSizeType |
SizeUnit QgsPalLayerSettings::shapeSizeUnits |
QString QgsPalLayerSettings::shapeSVGFile |
int QgsPalLayerSettings::shapeTransparency |
ShapeType QgsPalLayerSettings::shapeType |
bool QgsPalLayerSettings::showingShadowRects |
QColor QgsPalLayerSettings::textColor |
QFont QgsPalLayerSettings::textFont |
QString QgsPalLayerSettings::textNamedStyle |
int QgsPalLayerSettings::textTransp |
unsigned int QgsPalLayerSettings::upsidedownLabels |
double QgsPalLayerSettings::vectorScaleFactor |
QString QgsPalLayerSettings::wrapChar |
const QgsMapToPixel* QgsPalLayerSettings::xform |
double QgsPalLayerSettings::xOffset |
double QgsPalLayerSettings::yOffset |