QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Types | Public Member Functions | Private Attributes | List of all members
QgsVectorSimplifyMethod Class Reference

This class contains information how to simplify geometries fetched from a vector layer. More...

#include <qgsvectorsimplifymethod.h>

Public Types

enum  SimplifyHint { NoSimplification = 0, GeometrySimplification = 1, AntialiasingSimplification = 2, FullSimplification = 3 }
 Simplification flags for fast rendering of features. More...
 

Public Member Functions

 QgsVectorSimplifyMethod ()
 construct a default object More...
 
 QgsVectorSimplifyMethod (const QgsVectorSimplifyMethod &rh)
 copy constructor More...
 
QgsVectorSimplifyMethodoperator= (const QgsVectorSimplifyMethod &rh)
 assignment operator More...
 
void setSimplifyHints (SimplifyHints simplifyHints)
 Sets the simplification hints of the vector layer managed. More...
 
SimplifyHints simplifyHints () const
 Gets the simplification hints of the vector layer managed. More...
 
void setThreshold (float threshold)
 Sets the simplification threshold of the vector layer managed. More...
 
float threshold () const
 Gets the simplification threshold of the vector layer managed. More...
 
void setForceLocalOptimization (bool localOptimization)
 Sets where the simplification executes, after fetch the geometries from provider, or when supported, in provider before fetch the geometries. More...
 
bool forceLocalOptimization () const
 Gets where the simplification executes, after fetch the geometries from provider, or when supported, in provider before fetch the geometries. More...
 
void setMaximumScale (float maximumScale)
 Sets the maximum scale at which the layer should be simplified. More...
 
float maximumScale () const
 Gets the maximum scale at which the layer should be simplified. More...
 

Private Attributes

SimplifyHints mSimplifyHints
 Simplification hints for fast rendering of features of the vector layer managed. More...
 
float mThreshold
 Simplification threshold. More...
 
bool mLocalOptimization
 Simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries. More...
 
float mMaximumScale
 Maximum scale at which the layer should be simplified (Maximum scale at which generalisation should be carried out) More...
 

Detailed Description

This class contains information how to simplify geometries fetched from a vector layer.

Note
added in 2.2

Definition at line 24 of file qgsvectorsimplifymethod.h.

Member Enumeration Documentation

Simplification flags for fast rendering of features.

Enumerator
NoSimplification 

No simplification can be applied.

GeometrySimplification 

The geometries can be simplified using the current map2pixel context state.

AntialiasingSimplification 

The geometries can be rendered with 'AntiAliasing' disabled because of it is '1-pixel size'.

FullSimplification 

All simplification hints can be applied ( Geometry + AA-disabling )

Definition at line 35 of file qgsvectorsimplifymethod.h.

Constructor & Destructor Documentation

QgsVectorSimplifyMethod::QgsVectorSimplifyMethod ( )

construct a default object

Definition at line 20 of file qgsvectorsimplifymethod.cpp.

QgsVectorSimplifyMethod::QgsVectorSimplifyMethod ( const QgsVectorSimplifyMethod rh)

copy constructor

Definition at line 28 of file qgsvectorsimplifymethod.cpp.

References operator=().

Member Function Documentation

bool QgsVectorSimplifyMethod::forceLocalOptimization ( ) const
inline

Gets where the simplification executes, after fetch the geometries from provider, or when supported, in provider before fetch the geometries.

Definition at line 57 of file qgsvectorsimplifymethod.h.

Referenced by QgsVectorLayer::QgsVectorLayer(), QgsVectorLayerRenderer::render(), and QgsVectorLayer::writeSymbology().

float QgsVectorSimplifyMethod::maximumScale ( ) const
inline

Gets the maximum scale at which the layer should be simplified.

Definition at line 62 of file qgsvectorsimplifymethod.h.

Referenced by QgsVectorLayer::QgsVectorLayer(), QgsVectorLayer::simplifyDrawingCanbeApplied(), and QgsVectorLayer::writeSymbology().

QgsVectorSimplifyMethod & QgsVectorSimplifyMethod::operator= ( const QgsVectorSimplifyMethod rh)

assignment operator

Definition at line 33 of file qgsvectorsimplifymethod.cpp.

References mLocalOptimization, mMaximumScale, mSimplifyHints, and mThreshold.

Referenced by QgsVectorSimplifyMethod().

void QgsVectorSimplifyMethod::setForceLocalOptimization ( bool  localOptimization)
inline

Sets where the simplification executes, after fetch the geometries from provider, or when supported, in provider before fetch the geometries.

Definition at line 55 of file qgsvectorsimplifymethod.h.

Referenced by QgsVectorLayer::QgsVectorLayer(), and QgsVectorLayer::readSymbology().

void QgsVectorSimplifyMethod::setMaximumScale ( float  maximumScale)
inline

Sets the maximum scale at which the layer should be simplified.

Definition at line 60 of file qgsvectorsimplifymethod.h.

Referenced by QgsVectorLayer::QgsVectorLayer(), and QgsVectorLayer::readSymbology().

void QgsVectorSimplifyMethod::setSimplifyHints ( SimplifyHints  simplifyHints)
inline

Sets the simplification hints of the vector layer managed.

Definition at line 45 of file qgsvectorsimplifymethod.h.

Referenced by QgsRenderContext::QgsRenderContext(), QgsVectorLayer::QgsVectorLayer(), QgsVectorLayer::readSymbology(), and QgsVectorLayerRenderer::render().

void QgsVectorSimplifyMethod::setThreshold ( float  threshold)
inline

Sets the simplification threshold of the vector layer managed.

Definition at line 50 of file qgsvectorsimplifymethod.h.

Referenced by QgsVectorLayer::QgsVectorLayer(), and QgsVectorLayer::readSymbology().

SimplifyHints QgsVectorSimplifyMethod::simplifyHints ( ) const
inline
float QgsVectorSimplifyMethod::threshold ( ) const
inline

Member Data Documentation

bool QgsVectorSimplifyMethod::mLocalOptimization
private

Simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries.

Definition at line 70 of file qgsvectorsimplifymethod.h.

Referenced by operator=().

float QgsVectorSimplifyMethod::mMaximumScale
private

Maximum scale at which the layer should be simplified (Maximum scale at which generalisation should be carried out)

Definition at line 72 of file qgsvectorsimplifymethod.h.

Referenced by operator=().

SimplifyHints QgsVectorSimplifyMethod::mSimplifyHints
private

Simplification hints for fast rendering of features of the vector layer managed.

Definition at line 66 of file qgsvectorsimplifymethod.h.

Referenced by operator=().

float QgsVectorSimplifyMethod::mThreshold
private

Simplification threshold.

Definition at line 68 of file qgsvectorsimplifymethod.h.

Referenced by operator=().


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