QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
QgsVectorGradientColorRampV2 Class Reference

#include <qgsvectorcolorrampv2.h>

Inheritance diagram for QgsVectorGradientColorRampV2:
Inheritance graph
[legend]
Collaboration diagram for QgsVectorGradientColorRampV2:
Collaboration graph
[legend]

Public Member Functions

 QgsVectorGradientColorRampV2 (QColor color1=DEFAULT_GRADIENT_COLOR1, QColor color2=DEFAULT_GRADIENT_COLOR2, bool discrete=false, QgsGradientStopsList stops=QgsGradientStopsList())
 
virtual int count () const
 
virtual double value (int index) const
 
virtual QColor color (double value) const
 
virtual QString type () const
 
virtual QgsVectorColorRampV2clone () const
 
virtual QgsStringMap properties () const
 
QColor color1 () const
 
QColor color2 () const
 
void setColor1 (QColor color)
 
void setColor2 (QColor color)
 
bool isDiscrete () const
 
void setDiscrete (bool discrete)
 
void convertToDiscrete (bool discrete)
 
void setStops (const QgsGradientStopsList &stops)
 
const QgsGradientStopsListstops () const
 
QgsStringMap info () const
 
void setInfo (const QgsStringMap &info)
 
void addStopsToGradient (QGradient *gradient, double alpha=1)
 copy color ramp stops to a QGradient More...
 
- Public Member Functions inherited from QgsVectorColorRampV2
virtual ~QgsVectorColorRampV2 ()
 

Static Public Member Functions

static QgsVectorColorRampV2create (const QgsStringMap &properties=QgsStringMap())
 

Protected Attributes

QColor mColor1
 
QColor mColor2
 
bool mDiscrete
 
QgsGradientStopsList mStops
 
QgsStringMap mInfo
 

Detailed Description

Definition at line 58 of file qgsvectorcolorrampv2.h.

Constructor & Destructor Documentation

QgsVectorGradientColorRampV2::QgsVectorGradientColorRampV2 ( QColor  color1 = DEFAULT_GRADIENT_COLOR1,
QColor  color2 = DEFAULT_GRADIENT_COLOR2,
bool  discrete = false,
QgsGradientStopsList  stops = QgsGradientStopsList() 
)

Member Function Documentation

void QgsVectorGradientColorRampV2::addStopsToGradient ( QGradient *  gradient,
double  alpha = 1 
)

copy color ramp stops to a QGradient

Note
added in 2.1

Definition at line 222 of file qgsvectorcolorrampv2.cpp.

References color1(), color2(), mColor1, mColor2, and mStops.

Referenced by QgsGradientFillSymbolLayerV2::applyGradient().

QgsVectorColorRampV2 * QgsVectorGradientColorRampV2::clone ( ) const
virtual
QColor QgsVectorGradientColorRampV2::color ( double  value) const
virtual
QColor QgsVectorGradientColorRampV2::color1 ( ) const
inline
QColor QgsVectorGradientColorRampV2::color2 ( ) const
inline
void QgsVectorGradientColorRampV2::convertToDiscrete ( bool  discrete)
virtual int QgsVectorGradientColorRampV2::count ( ) const
inlinevirtual
QgsVectorColorRampV2 * QgsVectorGradientColorRampV2::create ( const QgsStringMap properties = QgsStringMap())
static
QgsStringMap QgsVectorGradientColorRampV2::info ( ) const
inline
bool QgsVectorGradientColorRampV2::isDiscrete ( ) const
inline
QgsStringMap QgsVectorGradientColorRampV2::properties ( ) const
virtual
void QgsVectorGradientColorRampV2::setColor1 ( QColor  color)
inline
void QgsVectorGradientColorRampV2::setColor2 ( QColor  color)
inline
void QgsVectorGradientColorRampV2::setDiscrete ( bool  discrete)
inline

Definition at line 86 of file qgsvectorcolorrampv2.h.

void QgsVectorGradientColorRampV2::setInfo ( const QgsStringMap info)
inline

Definition at line 93 of file qgsvectorcolorrampv2.h.

Referenced by clone(), QgsCptCityColorRampV2::cloneGradientRamp(), and create().

void QgsVectorGradientColorRampV2::setStops ( const QgsGradientStopsList stops)
inline
const QgsGradientStopsList& QgsVectorGradientColorRampV2::stops ( ) const
inline
virtual QString QgsVectorGradientColorRampV2::type ( ) const
inlinevirtual

Implements QgsVectorColorRampV2.

Reimplemented in QgsCptCityColorRampV2.

Definition at line 74 of file qgsvectorcolorrampv2.h.

double QgsVectorGradientColorRampV2::value ( int  index) const
virtual

Implements QgsVectorColorRampV2.

Definition at line 94 of file qgsvectorcolorrampv2.cpp.

References mStops.

Member Data Documentation

QColor QgsVectorGradientColorRampV2::mColor1
protected
QColor QgsVectorGradientColorRampV2::mColor2
protected
bool QgsVectorGradientColorRampV2::mDiscrete
protected
QgsStringMap QgsVectorGradientColorRampV2::mInfo
protected

Definition at line 103 of file qgsvectorcolorrampv2.h.

Referenced by clone(), and properties().

QgsGradientStopsList QgsVectorGradientColorRampV2::mStops
protected

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