QGIS API Documentation  2.11.0-Master
Public Member Functions | Protected Attributes | List of all members
QgsPalGeometry Class Reference

#include <qgspalgeometry.h>

Inheritance diagram for QgsPalGeometry:
Inheritance graph
[legend]

Public Member Functions

 QgsPalGeometry (QgsFeatureId id, QString text, GEOSGeometry *g, qreal ltrSpacing=0.0, qreal wordSpacing=0.0, bool curvedLabeling=false)
 
 ~QgsPalGeometry ()
 
void addDataDefinedValue (QgsPalLayerSettings::DataDefinedProperties p, QVariant v)
 
const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant > & dataDefinedValues () const
 
QFont definedFont ()
 
const QgsAttributesdiagramAttributes ()
 
QString dxfLayer () const
 
void feature (QgsFeature &feature)
 
const GEOSGeometry * getGeosGeometry () override
 get the GEOSGeometry of the feature This method is called by Pal each time it needs a geom's coordinates More...
 
QFontMetricsFgetLabelFontMetrics ()
 
pal::LabelInfoinfo (QFontMetricsF *fm, const QgsMapToPixel *xform, double fontScale, double maxinangle, double maxoutangle)
 
bool isDiagram () const
 
bool isPinned () const
 
void releaseGeosGeometry (const GEOSGeometry *) override
 Called by Pal when it doesn't need the coordinates anymore. More...
 
void setDefinedFont (QFont f)
 
void setDiagramAttributes (const QgsAttributes &attrs)
 
void setDxfLayer (QString dxfLayer)
 
void setIsDiagram (bool d)
 
void setIsPinned (bool f)
 
QString strId ()
 
QString text ()
 
QString text (int partId) const
 Returns the text component corresponding to a specified label part. More...
 
- Public Member Functions inherited from pal::PalGeometry
virtual ~PalGeometry ()
 

Protected Attributes

QStringList mClusters
 
bool mCurvedLabeling
 
QMap< QgsPalLayerSettings::DataDefinedProperties, QVariantmDataDefinedValues
 Stores attribute values for data defined properties. More...
 
QFont mDefinedFont
 
QgsAttributes mDiagramAttributes
 Stores attribute values for diagram rendering. More...
 
QString mDxfLayer
 
QFontMetricsFmFontMetrics
 
GEOSGeometry * mG
 
QgsFeatureId mId
 
LabelInfomInfo
 
bool mIsDiagram
 
bool mIsPinned
 
qreal mLetterSpacing
 
QString mStrId
 
QString mText
 
qreal mWordSpacing
 

Detailed Description

Definition at line 11 of file qgspalgeometry.h.

Constructor & Destructor Documentation

QgsPalGeometry::QgsPalGeometry ( QgsFeatureId  id,
QString  text,
GEOSGeometry *  g,
qreal  ltrSpacing = 0.0,
qreal  wordSpacing = 0.0,
bool  curvedLabeling = false 
)
inline

Definition at line 14 of file qgspalgeometry.h.

QgsPalGeometry::~QgsPalGeometry ( )
inline

Definition at line 31 of file qgspalgeometry.h.

Member Function Documentation

void QgsPalGeometry::addDataDefinedValue ( QgsPalLayerSettings::DataDefinedProperties  p,
QVariant  v 
)
inline

Definition at line 132 of file qgspalgeometry.h.

const QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant >& QgsPalGeometry::dataDefinedValues ( ) const
inline

Definition at line 131 of file qgspalgeometry.h.

QFont QgsPalGeometry::definedFont ( )
inline

Definition at line 141 of file qgspalgeometry.h.

const QgsAttributes& QgsPalGeometry::diagramAttributes ( )
inline

Definition at line 146 of file qgspalgeometry.h.

QString QgsPalGeometry::dxfLayer ( ) const
inline

Definition at line 156 of file qgspalgeometry.h.

void QgsPalGeometry::feature ( QgsFeature feature)
inline

Definition at line 148 of file qgspalgeometry.h.

const GEOSGeometry* QgsPalGeometry::getGeosGeometry ( )
inlineoverridevirtual

get the GEOSGeometry of the feature This method is called by Pal each time it needs a geom's coordinates

Returns
GEOSGeometry * a pointer the geos geom

Implements pal::PalGeometry.

Definition at line 41 of file qgspalgeometry.h.

QFontMetricsF* QgsPalGeometry::getLabelFontMetrics ( )
inline

Definition at line 143 of file qgspalgeometry.h.

pal::LabelInfo* QgsPalGeometry::info ( QFontMetricsF fm,
const QgsMapToPixel xform,
double  fontScale,
double  maxinangle,
double  maxoutangle 
)
inline

Definition at line 66 of file qgspalgeometry.h.

bool QgsPalGeometry::isDiagram ( ) const
inline

Definition at line 135 of file qgspalgeometry.h.

bool QgsPalGeometry::isPinned ( ) const
inline

Definition at line 138 of file qgspalgeometry.h.

void QgsPalGeometry::releaseGeosGeometry ( const GEOSGeometry *  the_geom)
inlineoverridevirtual

Called by Pal when it doesn't need the coordinates anymore.

Parameters
the_geomis the geoms geom from PalGeometry::getfeomGeometry()

Implements pal::PalGeometry.

Definition at line 45 of file qgspalgeometry.h.

void QgsPalGeometry::setDefinedFont ( QFont  f)
inline

Definition at line 140 of file qgspalgeometry.h.

void QgsPalGeometry::setDiagramAttributes ( const QgsAttributes attrs)
inline

Definition at line 145 of file qgspalgeometry.h.

void QgsPalGeometry::setDxfLayer ( QString  dxfLayer)
inline

Definition at line 155 of file qgspalgeometry.h.

void QgsPalGeometry::setIsDiagram ( bool  d)
inline

Definition at line 134 of file qgspalgeometry.h.

void QgsPalGeometry::setIsPinned ( bool  f)
inline

Definition at line 137 of file qgspalgeometry.h.

QString QgsPalGeometry::strId ( )
inline

Definition at line 50 of file qgspalgeometry.h.

QString QgsPalGeometry::text ( void  )
inline

Definition at line 51 of file qgspalgeometry.h.

QString QgsPalGeometry::text ( int  partId) const
inline

Returns the text component corresponding to a specified label part.

Parameters
partIdSet to -1 for labels which are not broken into parts (eg, non-curved labels), or the required part index for labels which are broken into parts (curved labels)
Note
added in QGIS 2.10

Definition at line 58 of file qgspalgeometry.h.

Member Data Documentation

QStringList QgsPalGeometry::mClusters
protected

Definition at line 161 of file qgspalgeometry.h.

bool QgsPalGeometry::mCurvedLabeling
protected

Definition at line 171 of file qgspalgeometry.h.

QMap< QgsPalLayerSettings::DataDefinedProperties, QVariant > QgsPalGeometry::mDataDefinedValues
protected

Stores attribute values for data defined properties.

Definition at line 173 of file qgspalgeometry.h.

QFont QgsPalGeometry::mDefinedFont
protected

Definition at line 167 of file qgspalgeometry.h.

QgsAttributes QgsPalGeometry::mDiagramAttributes
protected

Stores attribute values for diagram rendering.

Definition at line 176 of file qgspalgeometry.h.

QString QgsPalGeometry::mDxfLayer
protected

Definition at line 178 of file qgspalgeometry.h.

QFontMetricsF* QgsPalGeometry::mFontMetrics
protected

Definition at line 168 of file qgspalgeometry.h.

GEOSGeometry* QgsPalGeometry::mG
protected

Definition at line 159 of file qgspalgeometry.h.

QgsFeatureId QgsPalGeometry::mId
protected

Definition at line 163 of file qgspalgeometry.h.

LabelInfo* QgsPalGeometry::mInfo
protected

Definition at line 164 of file qgspalgeometry.h.

bool QgsPalGeometry::mIsDiagram
protected

Definition at line 165 of file qgspalgeometry.h.

bool QgsPalGeometry::mIsPinned
protected

Definition at line 166 of file qgspalgeometry.h.

qreal QgsPalGeometry::mLetterSpacing
protected

Definition at line 169 of file qgspalgeometry.h.

QString QgsPalGeometry::mStrId
protected

Definition at line 162 of file qgspalgeometry.h.

QString QgsPalGeometry::mText
protected

Definition at line 160 of file qgspalgeometry.h.

qreal QgsPalGeometry::mWordSpacing
protected

Definition at line 170 of file qgspalgeometry.h.


The documentation for this class was generated from the following file: