/usr/include/qgis/qgsvectorsimplifymethod.h is in libqgis-dev 2.8.6+dfsg-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | /***************************************************************************
qgsvectorsimplifymethod.h
---------------------
begin : December 2013
copyright : (C) 2013 by Alvaro Huarte
email : http://wiki.osgeo.org/wiki/Alvaro_Huarte
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSVECTORSIMPLIFYMETHOD_H
#define QGSVECTORSIMPLIFYMETHOD_H
#include <QFlags>
/** This class contains information how to simplify geometries fetched from a vector layer
* @note added in 2.2
*/
class CORE_EXPORT QgsVectorSimplifyMethod
{
public:
//! construct a default object
QgsVectorSimplifyMethod();
//! copy constructor
QgsVectorSimplifyMethod( const QgsVectorSimplifyMethod& rh );
//! assignment operator
QgsVectorSimplifyMethod& operator=( const QgsVectorSimplifyMethod& rh );
/** Simplification flags for fast rendering of features */
enum SimplifyHint
{
NoSimplification = 0, //!< No simplification can be applied
GeometrySimplification = 1, //!< The geometries can be simplified using the current map2pixel context state
AntialiasingSimplification = 2, //!< The geometries can be rendered with 'AntiAliasing' disabled because of it is '1-pixel size'
FullSimplification = 3, //!< All simplification hints can be applied ( Geometry + AA-disabling )
};
Q_DECLARE_FLAGS( SimplifyHints, SimplifyHint )
/** Sets the simplification hints of the vector layer managed */
void setSimplifyHints( SimplifyHints simplifyHints ) { mSimplifyHints = simplifyHints; }
/** Gets the simplification hints of the vector layer managed */
inline SimplifyHints simplifyHints() const { return mSimplifyHints; }
/** Sets the simplification threshold of the vector layer managed */
void setThreshold( float threshold ) { mThreshold = threshold; }
/** Gets the simplification threshold of the vector layer managed */
inline float threshold() const { return mThreshold; }
/** Sets where the simplification executes, after fetch the geometries from provider, or when supported, in provider before fetch the geometries */
void setForceLocalOptimization( bool localOptimization ) { mLocalOptimization = localOptimization; }
/** Gets where the simplification executes, after fetch the geometries from provider, or when supported, in provider before fetch the geometries */
inline bool forceLocalOptimization() const { return mLocalOptimization; }
/** Sets the maximum scale at which the layer should be simplified */
void setMaximumScale( float maximumScale ) { mMaximumScale = maximumScale; }
/** Gets the maximum scale at which the layer should be simplified */
inline float maximumScale() const { return mMaximumScale; }
private:
/** Simplification hints for fast rendering of features of the vector layer managed */
SimplifyHints mSimplifyHints;
/** Simplification threshold */
float mThreshold;
/** Simplification executes after fetch the geometries from provider, otherwise it executes, when supported, in provider before fetch the geometries */
bool mLocalOptimization;
/** Maximum scale at which the layer should be simplified (Maximum scale at which generalisation should be carried out) */
float mMaximumScale;
};
Q_DECLARE_OPERATORS_FOR_FLAGS( QgsVectorSimplifyMethod::SimplifyHints )
#endif // QGSVECTORSIMPLIFYMETHOD_H
|