QGIS API Documentation  2.6.0-Brighton
 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]

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
- 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

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
QgsVectorColorRampV2 * QgsVectorGradientColorRampV2::clone ( ) const
virtual

Implements QgsVectorColorRampV2.

Reimplemented in QgsCptCityColorRampV2.

QColor QgsVectorGradientColorRampV2::color ( double  value) const
virtual

Implements QgsVectorColorRampV2.

QColor QgsVectorGradientColorRampV2::color1 ( ) const
inline
QColor QgsVectorGradientColorRampV2::color2 ( ) const
inline
void QgsVectorGradientColorRampV2::convertToDiscrete ( bool  discrete)
virtual int QgsVectorGradientColorRampV2::count ( ) const
inlinevirtual

Implements QgsVectorColorRampV2.

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

Reimplemented in QgsCptCityColorRampV2.

QgsStringMap QgsVectorGradientColorRampV2::info ( ) const
inline
bool QgsVectorGradientColorRampV2::isDiscrete ( ) const
inline
QgsStringMap QgsVectorGradientColorRampV2::properties ( ) const
virtual

Implements QgsVectorColorRampV2.

Reimplemented in QgsCptCityColorRampV2.

void QgsVectorGradientColorRampV2::setColor1 ( QColor  color)
inline
void QgsVectorGradientColorRampV2::setColor2 ( QColor  color)
inline
void QgsVectorGradientColorRampV2::setDiscrete ( bool  discrete)
inline
void QgsVectorGradientColorRampV2::setInfo ( const QgsStringMap info)
inline
void QgsVectorGradientColorRampV2::setStops ( const QgsGradientStopsList stops)
inline
const QgsGradientStopsList& QgsVectorGradientColorRampV2::stops ( ) const
inline
virtual QString QgsVectorGradientColorRampV2::type ( ) const
inlinevirtual

Implements QgsVectorColorRampV2.

Reimplemented in QgsCptCityColorRampV2.

double QgsVectorGradientColorRampV2::value ( int  index) const
virtual

Implements QgsVectorColorRampV2.

Member Data Documentation

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

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