qCC_db  version 2.5.4 (Qt) - 19 Apr 2014
 All Classes Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
ccColorScaleElement Class Reference

Color scale element: one value + one color. More...

#include <ccColorScale.h>

Public Member Functions

 ccColorScaleElement ()
 Default constructor.
 
 ccColorScaleElement (double relativePos, QColor color)
 Constructor from a (relative) position and a color.
 
void setRelativePos (double pos)
 Sets associated value (relative to scale boundaries) More...
 
double getRelativePos () const
 Returns step position (relative to scale boundaries) More...
 
void setColor (QColor color)
 Sets color.
 
const QColor & getColor () const
 Returns color.
 

Static Public Member Functions

static bool IsSmaller (const ccColorScaleElement &e1, const ccColorScaleElement &e2)
 Comparison operator between two color scale elements.
 

Protected Attributes

double m_relativePos
 Step (relative) position. More...
 
QColor m_color
 Color.
 

Detailed Description

Color scale element: one value + one color.

Member Function Documentation

double ccColorScaleElement::getRelativePos ( ) const
inline

Returns step position (relative to scale boundaries)

Returns
relative position (always between 0.0 and 1.0!)
void ccColorScaleElement::setRelativePos ( double  pos)
inline

Sets associated value (relative to scale boundaries)

Parameters
posrelative position (always between 0.0 and 1.0!)

Member Data Documentation

double ccColorScaleElement::m_relativePos
protected

Step (relative) position.

Must always be between 0.0 and 1.0!


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