QGIS API Documentation  2.11.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Protected Attributes | Friends | List of all members
pal::Feature Class Reference

#include <feature.h>

Public Member Functions

 Feature (Layer *l, const QString &geom_id, PalGeometry *userG, double lx, double ly)
 
 ~Feature ()
 
double calculatePriority () const
 Calculates the priority for the feature. More...
 
bool fixedPosition () const
 
bool fixedQuadrant () const
 Returns whether the quadrant for the label is fixed. More...
 
double isObstacle () const
 Returns whether the feature will act as an obstacle for labels. More...
 
double obstacleFactor () const
 Returns the obstacle factor for the feature. More...
 
double priority () const
 Returns the feature's labeling priority. More...
 
double repeatDistance () const
 
void setAlwaysShow (bool bl)
 
void setDistLabel (double dist)
 
void setFixedAngle (double a)
 Set label rotation to fixed value. More...
 
void setFixedPosition (double x, double y)
 Set label position of the feature to fixed x/y values. More...
 
void setFixedQuadrant (bool fixed)
 Sets whether the quadrant for the label must be respected. More...
 
void setIsObstacle (bool obstacle)
 Sets whether the feature will act as an obstacle for labels. More...
 
void setLabelInfo (LabelInfo *info)
 
void setObstacleFactor (double factor)
 Sets the obstacle factor for the feature. More...
 
void setPosOffset (double x, double y)
 
void setPriority (double priority)
 Sets the priority for labeling the feature. More...
 
void setQuadOffset (double x, double y)
 
void setRepeatDistance (double dist)
 

Protected Attributes

bool alwaysShow
 
double distlabel
 
double fixedAngle
 
bool fixedPos
 
double fixedPosX
 
double fixedPosY
 
bool fixedRotation
 
double label_x
 
double label_y
 
LabelInfolabelInfo
 
Layerlayer
 
bool offsetPos
 
double offsetPosX
 
double offsetPosY
 
bool quadOffset
 
double quadOffsetX
 
double quadOffsetY
 
double repeatDist
 
QString uid
 
PalGeometryuserGeom
 

Friends

class FeaturePart
 

Detailed Description

Definition at line 76 of file feature.h.

Constructor & Destructor Documentation

pal::Feature::Feature ( Layer l,
const QString geom_id,
PalGeometry userG,
double  lx,
double  ly 
)

Definition at line 58 of file feature.cpp.

pal::Feature::~Feature ( )

Definition at line 87 of file feature.cpp.

Member Function Documentation

double pal::Feature::calculatePriority ( ) const

Calculates the priority for the feature.

This will be the feature's priority if set, otherwise the layer's default priority.

See also
setPriority
priority

Definition at line 92 of file feature.cpp.

bool pal::Feature::fixedPosition ( ) const
inline

Definition at line 102 of file feature.h.

bool pal::Feature::fixedQuadrant ( ) const
inline

Returns whether the quadrant for the label is fixed.

See also
setFixedQuadrant

Definition at line 99 of file feature.h.

double pal::Feature::isObstacle ( ) const
inline

Returns whether the feature will act as an obstacle for labels.

Returns
true if feature is an obstacle
See also
setIsObstacle

Definition at line 121 of file feature.h.

double pal::Feature::obstacleFactor ( ) const
inline

Returns the obstacle factor for the feature.

The factor controls the penalty for labels overlapping this feature.

See also
setObstacleFactor

Definition at line 136 of file feature.h.

double pal::Feature::priority ( ) const
inline

Returns the feature's labeling priority.

Returns
feature's priority, as a value between 0 (highest priority) and 1 (lowest priority). Returns -1.0 if feature will use the layer's default priority.
See also
setPriority
calculatePriority

Definition at line 153 of file feature.h.

double pal::Feature::repeatDistance ( ) const
inline

Definition at line 108 of file feature.h.

void pal::Feature::setAlwaysShow ( bool  bl)
inline

Definition at line 109 of file feature.h.

void pal::Feature::setDistLabel ( double  dist)
inline

Definition at line 85 of file feature.h.

void pal::Feature::setFixedAngle ( double  a)
inline

Set label rotation to fixed value.

Definition at line 106 of file feature.h.

void pal::Feature::setFixedPosition ( double  x,
double  y 
)
inline

Set label position of the feature to fixed x/y values.

Definition at line 87 of file feature.h.

void pal::Feature::setFixedQuadrant ( bool  fixed)
inline

Sets whether the quadrant for the label must be respected.

This can be used to fix the quadrant for specific features when using an "around point" placement.

See also
fixedQuadrant

Definition at line 94 of file feature.h.

void pal::Feature::setIsObstacle ( bool  obstacle)
inline

Sets whether the feature will act as an obstacle for labels.

Parameters
obstaclewhether feature will act as an obstacle
See also
isObstacle

Definition at line 115 of file feature.h.

void pal::Feature::setLabelInfo ( LabelInfo info)
inline

Definition at line 84 of file feature.h.

void pal::Feature::setObstacleFactor ( double  factor)
inline

Sets the obstacle factor for the feature.

The factor controls the penalty for labels overlapping this feature.

Parameters
factorlarger factors ( > 1.0 ) will result in labels which are less likely to cover this feature, smaller factors ( < 1.0 ) mean labels are more likely to cover this feature (where required)
See also
obstacleFactor

Definition at line 130 of file feature.h.

void pal::Feature::setPosOffset ( double  x,
double  y 
)
inline

Definition at line 101 of file feature.h.

void pal::Feature::setPriority ( double  priority)
inline

Sets the priority for labeling the feature.

Parameters
priorityfeature's priority, as a value between 0 (highest priority) and 1 (lowest priority). Set to -1.0 to use the layer's default priority for this feature.
See also
priority
calculatePriority

Definition at line 145 of file feature.h.

void pal::Feature::setQuadOffset ( double  x,
double  y 
)
inline

Definition at line 88 of file feature.h.

void pal::Feature::setRepeatDistance ( double  dist)
inline

Definition at line 107 of file feature.h.

Friends And Related Function Documentation

friend class FeaturePart
friend

Definition at line 78 of file feature.h.

Member Data Documentation

bool pal::Feature::alwaysShow
protected

Definition at line 186 of file feature.h.

double pal::Feature::distlabel
protected

Definition at line 167 of file feature.h.

double pal::Feature::fixedAngle
protected

Definition at line 183 of file feature.h.

bool pal::Feature::fixedPos
protected

Definition at line 172 of file feature.h.

double pal::Feature::fixedPosX
protected

Definition at line 173 of file feature.h.

double pal::Feature::fixedPosY
protected

Definition at line 174 of file feature.h.

bool pal::Feature::fixedRotation
protected

Definition at line 182 of file feature.h.

double pal::Feature::label_x
protected

Definition at line 165 of file feature.h.

double pal::Feature::label_y
protected

Definition at line 166 of file feature.h.

LabelInfo* pal::Feature::labelInfo
protected

Definition at line 168 of file feature.h.

Layer* pal::Feature::layer
protected

Definition at line 163 of file feature.h.

bool pal::Feature::offsetPos
protected

Definition at line 178 of file feature.h.

double pal::Feature::offsetPosX
protected

Definition at line 179 of file feature.h.

double pal::Feature::offsetPosY
protected

Definition at line 180 of file feature.h.

bool pal::Feature::quadOffset
protected

Definition at line 175 of file feature.h.

double pal::Feature::quadOffsetX
protected

Definition at line 176 of file feature.h.

double pal::Feature::quadOffsetY
protected

Definition at line 177 of file feature.h.

double pal::Feature::repeatDist
protected

Definition at line 184 of file feature.h.

QString pal::Feature::uid
protected

Definition at line 170 of file feature.h.

PalGeometry* pal::Feature::userGeom
protected

Definition at line 164 of file feature.h.


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