QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
QgsCptCityColorRampV2 Class Reference

#include <qgsvectorcolorrampv2.h>

Inheritance diagram for QgsCptCityColorRampV2:
Inheritance graph
[legend]

Public Member Functions

 QgsCptCityColorRampV2 (const QString &schemeName=DEFAULT_CPTCITY_SCHEMENAME, const QString &variantName=DEFAULT_CPTCITY_VARIANTNAME, bool doLoadFile=true)
 
 QgsCptCityColorRampV2 (const QString &schemeName, const QStringList &variantList, const QString &variantName=QString(), bool doLoadFile=true)
 
virtual QgsCptCityColorRampV2clone () const override
 Creates a clone of the color ramp. More...
 
QgsVectorGradientColorRampV2cloneGradientRamp () const
 
void copy (const QgsCptCityColorRampV2 *other)
 
QString copyingFileName () const
 
QgsStringMap copyingInfo () const
 
QString descFileName () const
 
bool fileLoaded () const
 
QString fileName () const
 
bool hasMultiStops () const
 
bool loadFile ()
 
void loadPalette ()
 
virtual QgsStringMap properties () const override
 Returns a string map containing all the color ramp's properties. More...
 
QString schemeName () const
 
void setName (const QString &schemeName, const QString &variantName="", const QStringList &variantList=QStringList())
 
void setSchemeName (const QString &schemeName)
 
void setVariantList (const QStringList &variantList)
 
void setVariantName (const QString &variantName)
 
virtual QString type () const override
 Returns a string representing the color ramp type. More...
 
QStringList variantList () const
 
QString variantName () const
 
- Public Member Functions inherited from QgsVectorGradientColorRampV2
 QgsVectorGradientColorRampV2 (const QColor &color1=DEFAULT_GRADIENT_COLOR1, const QColor &color2=DEFAULT_GRADIENT_COLOR2, bool discrete=false, const QgsGradientStopsList &stops=QgsGradientStopsList())
 Constructor for QgsVectorGradientColorRampV2. More...
 
void addStopsToGradient (QGradient *gradient, double alpha=1)
 Copy color ramp stops to a QGradient. More...
 
virtual QColor color (double value) const override
 Returns the color corresponding to a specified value. More...
 
QColor color1 () const
 Returns the gradient start color. More...
 
QColor color2 () const
 Returns the gradient end color. More...
 
void convertToDiscrete (bool discrete)
 Converts a gradient with existing color stops to or from discrete interpolation. More...
 
virtual int count () const override
 Returns number of defined colors, or -1 if undefined. More...
 
QgsStringMap info () const
 Returns any additional info attached to the gradient ramp (eg authorship notes) More...
 
bool isDiscrete () const
 Returns true if the gradient is using discrete interpolation, rather than smoothly interpolating between colors. More...
 
void setColor1 (const QColor &color)
 Sets the gradient start color. More...
 
void setColor2 (const QColor &color)
 Sets the gradient end color. More...
 
void setDiscrete (bool discrete)
 Sets whether the gradient should use discrete interpolation, rather than smoothly interpolating between colors. More...
 
void setInfo (const QgsStringMap &info)
 Sets additional info to attach to the gradient ramp (eg authorship notes) More...
 
void setStops (const QgsGradientStopsList &stops)
 Sets the list of intermediate gradient stops for the ramp. More...
 
QgsGradientStopsList stops () const
 Returns the list of intermediate gradient stops for the ramp. More...
 
virtual double value (int index) const override
 Returns relative value between [0,1] of color at specified index. More...
 
- Public Member Functions inherited from QgsVectorColorRampV2
virtual ~QgsVectorColorRampV2 ()
 

Static Public Member Functions

static QgsVectorColorRampV2create (const QgsStringMap &properties=QgsStringMap())
 
- Static Public Member Functions inherited from QgsVectorGradientColorRampV2
static QgsVectorColorRampV2create (const QgsStringMap &properties=QgsStringMap())
 Creates a new QgsVectorColorRampV2 from a map of properties. More...
 

Protected Attributes

bool mFileLoaded
 
bool mMultiStops
 
QString mSchemeName
 
QStringList mVariantList
 
QString mVariantName
 
- Protected Attributes inherited from QgsVectorGradientColorRampV2
QColor mColor1
 
QColor mColor2
 
bool mDiscrete
 
QgsStringMap mInfo
 
QgsGradientStopsList mStops
 

Detailed Description

Definition at line 369 of file qgsvectorcolorrampv2.h.

Constructor & Destructor Documentation

◆ QgsCptCityColorRampV2() [1/2]

QgsCptCityColorRampV2::QgsCptCityColorRampV2 ( const QString schemeName = DEFAULT_CPTCITY_SCHEMENAME,
const QString variantName = DEFAULT_CPTCITY_VARIANTNAME,
bool  doLoadFile = true 
)

Definition at line 545 of file qgsvectorcolorrampv2.cpp.

◆ QgsCptCityColorRampV2() [2/2]

QgsCptCityColorRampV2::QgsCptCityColorRampV2 ( const QString schemeName,
const QStringList variantList,
const QString variantName = QString(),
bool  doLoadFile = true 
)

Definition at line 557 of file qgsvectorcolorrampv2.cpp.

Member Function Documentation

◆ clone()

QgsCptCityColorRampV2 * QgsCptCityColorRampV2::clone ( ) const
overridevirtual

Creates a clone of the color ramp.

Reimplemented from QgsVectorGradientColorRampV2.

Definition at line 584 of file qgsvectorcolorrampv2.cpp.

◆ cloneGradientRamp()

QgsVectorGradientColorRampV2 * QgsCptCityColorRampV2::cloneGradientRamp ( ) const

Definition at line 605 of file qgsvectorcolorrampv2.cpp.

◆ copy()

void QgsCptCityColorRampV2::copy ( const QgsCptCityColorRampV2 other)

Definition at line 591 of file qgsvectorcolorrampv2.cpp.

◆ copyingFileName()

QString QgsCptCityColorRampV2::copyingFileName ( ) const

Definition at line 640 of file qgsvectorcolorrampv2.cpp.

◆ copyingInfo()

QgsStringMap QgsCptCityColorRampV2::copyingInfo ( ) const

Definition at line 652 of file qgsvectorcolorrampv2.cpp.

◆ create()

QgsVectorColorRampV2 * QgsCptCityColorRampV2::create ( const QgsStringMap properties = QgsStringMap())
static

Definition at line 571 of file qgsvectorcolorrampv2.cpp.

◆ descFileName()

QString QgsCptCityColorRampV2::descFileName ( ) const

Definition at line 646 of file qgsvectorcolorrampv2.cpp.

◆ fileLoaded()

bool QgsCptCityColorRampV2::fileLoaded ( ) const
inline

Definition at line 404 of file qgsvectorcolorrampv2.h.

◆ fileName()

QString QgsCptCityColorRampV2::fileName ( ) const

Definition at line 630 of file qgsvectorcolorrampv2.cpp.

◆ hasMultiStops()

bool QgsCptCityColorRampV2::hasMultiStops ( ) const
inline

Definition at line 400 of file qgsvectorcolorrampv2.h.

◆ loadFile()

bool QgsCptCityColorRampV2::loadFile ( )

Definition at line 657 of file qgsvectorcolorrampv2.cpp.

◆ loadPalette()

void QgsCptCityColorRampV2::loadPalette ( )
inline

Definition at line 399 of file qgsvectorcolorrampv2.h.

◆ properties()

QgsStringMap QgsCptCityColorRampV2::properties ( ) const
overridevirtual

Returns a string map containing all the color ramp's properties.

Reimplemented from QgsVectorGradientColorRampV2.

Definition at line 621 of file qgsvectorcolorrampv2.cpp.

◆ schemeName()

QString QgsCptCityColorRampV2::schemeName ( ) const
inline

Definition at line 388 of file qgsvectorcolorrampv2.h.

◆ setName()

void QgsCptCityColorRampV2::setName ( const QString schemeName,
const QString variantName = "",
const QStringList variantList = QStringList() 
)
inline

Definition at line 396 of file qgsvectorcolorrampv2.h.

◆ setSchemeName()

void QgsCptCityColorRampV2::setSchemeName ( const QString schemeName)
inline

Definition at line 393 of file qgsvectorcolorrampv2.h.

◆ setVariantList()

void QgsCptCityColorRampV2::setVariantList ( const QStringList variantList)
inline

Definition at line 395 of file qgsvectorcolorrampv2.h.

◆ setVariantName()

void QgsCptCityColorRampV2::setVariantName ( const QString variantName)
inline

Definition at line 394 of file qgsvectorcolorrampv2.h.

◆ type()

virtual QString QgsCptCityColorRampV2::type ( ) const
inlineoverridevirtual

Returns a string representing the color ramp type.

Reimplemented from QgsVectorGradientColorRampV2.

Definition at line 380 of file qgsvectorcolorrampv2.h.

◆ variantList()

QStringList QgsCptCityColorRampV2::variantList ( ) const
inline

Definition at line 390 of file qgsvectorcolorrampv2.h.

◆ variantName()

QString QgsCptCityColorRampV2::variantName ( ) const
inline

Definition at line 389 of file qgsvectorcolorrampv2.h.

Member Data Documentation

◆ mFileLoaded

bool QgsCptCityColorRampV2::mFileLoaded
protected

Definition at line 415 of file qgsvectorcolorrampv2.h.

◆ mMultiStops

bool QgsCptCityColorRampV2::mMultiStops
protected

Definition at line 416 of file qgsvectorcolorrampv2.h.

◆ mSchemeName

QString QgsCptCityColorRampV2::mSchemeName
protected

Definition at line 412 of file qgsvectorcolorrampv2.h.

◆ mVariantList

QStringList QgsCptCityColorRampV2::mVariantList
protected

Definition at line 414 of file qgsvectorcolorrampv2.h.

◆ mVariantName

QString QgsCptCityColorRampV2::mVariantName
protected

Definition at line 413 of file qgsvectorcolorrampv2.h.


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