#include <SoFCColorLegend.h>
Public Member Functions | |
unsigned long | countColors (void) const |
bool | customize () |
Opems a dialog to customie the current settings of the color bar. | |
App::Color | getColor (float fVal) const |
Returns the associated color to the value fVal. | |
const char * | getColorBarName () const |
Returns the name of the color bar. | |
unsigned short | getColorIndex (float fVal) const |
float | getMaxValue (void) const |
Returns the current maximum of the parameter range. | |
float | getMinValue (void) const |
Returns the current minimum of the parameter range. | |
bool | isVisible (float fVal) const |
Returns always true if the color bar is in mode to show colors to arbitrary values of fVal, otherwise true is returned if fVal is within the specified parameter range, if not false is returned. | |
void | setColorModel (App::ColorGradient::TColorModel tModel) |
Sets the color model of the underlying color ramp to tModel. | |
void | setMarkerLabel (const SoMFString &label) |
void | setOutsideGrayed (bool bVal) |
Sets whether values outside the range should be in gray,. | |
void | setRange (float fMin, float fMax, int prec=3) |
Sets the range of the colorbar from the maximum fMax to the minimum fMin. | |
SoFCColorLegend (void) | |
Static Public Member Functions | |
static void | finish (void) |
static void | initClass (void) |
Protected Member Functions | |
void | setViewportSize (const SbVec2s &size) |
Sets the current viewer size to recalculate the new position. | |
virtual | ~SoFCColorLegend () |
Protected Attributes | |
SoCoordinate3 * | coords |
SoSeparator * | labels |
Definition at line 37 of file SoFCColorLegend.h.
SoFCColorLegend::SoFCColorLegend | ( | void | ) |
Constructor.
Definition at line 47 of file SoFCColorLegend.cpp.
References coords, SketcherExample::f, App::ColorGradient::FLOW, labels, setColorModel(), setRange(), App::ColorGradient::setStyle(), and App::ColorGradient::TRIA.
SoFCColorLegend::~SoFCColorLegend | ( | ) | [protected, virtual] |
unsigned long Gui::SoFCColorLegend::countColors | ( | void | ) | const [inline] |
Definition at line 66 of file SoFCColorLegend.h.
bool Gui::SoFCColorLegend::customize | ( | ) | [inline, virtual] |
Opems a dialog to customie the current settings of the color bar.
Returns true if the settings have been changed, false otherwise.
This method must be implemented in subclasses.
Implements Gui::SoFCColorBarBase.
Definition at line 68 of file SoFCColorLegend.h.
void SoFCColorLegend::finish | ( | void | ) | [static] |
Reimplemented from Gui::SoFCColorBarBase.
Definition at line 77 of file SoFCColorLegend.cpp.
App::Color Gui::SoFCColorLegend::getColor | ( | float | fVal | ) | const [inline, virtual] |
Returns the associated color to the value fVal.
This method must be implemented in subclasses.
Implements Gui::SoFCColorBarBase.
Definition at line 61 of file SoFCColorLegend.h.
const char* Gui::SoFCColorLegend::getColorBarName | ( | ) | const [inline, virtual] |
Returns the name of the color bar.
This method must be implemented in subclasses.
Implements Gui::SoFCColorBarBase.
Definition at line 69 of file SoFCColorLegend.h.
unsigned short Gui::SoFCColorLegend::getColorIndex | ( | float | fVal | ) | const [inline] |
Definition at line 60 of file SoFCColorLegend.h.
float Gui::SoFCColorLegend::getMaxValue | ( | void | ) | const [inline, virtual] |
Returns the current maximum of the parameter range.
This method must be implemented in subclasses.
Implements Gui::SoFCColorBarBase.
Definition at line 65 of file SoFCColorLegend.h.
float Gui::SoFCColorLegend::getMinValue | ( | void | ) | const [inline, virtual] |
Returns the current minimum of the parameter range.
This method must be implemented in subclasses.
Implements Gui::SoFCColorBarBase.
Definition at line 64 of file SoFCColorLegend.h.
void SoFCColorLegend::initClass | ( | void | ) | [static] |
Reimplemented from Gui::SoFCColorBarBase.
Definition at line 72 of file SoFCColorLegend.cpp.
Referenced by Gui::SoFCDB::init().
bool Gui::SoFCColorLegend::isVisible | ( | float | fVal | ) | const [inline, virtual] |
Returns always true if the color bar is in mode to show colors to arbitrary values of fVal, otherwise true is returned if fVal is within the specified parameter range, if not false is returned.
This method must be implemented in subclasses.
Implements Gui::SoFCColorBarBase.
Definition at line 63 of file SoFCColorLegend.h.
void SoFCColorLegend::setColorModel | ( | App::ColorGradient::TColorModel | tModel | ) |
Sets the color model of the underlying color ramp to tModel.
tModel either can be TRIA
, INVERSE_TRIA
or GRAY
Definition at line 188 of file SoFCColorLegend.cpp.
References App::ColorModel::_pclColors, App::ColorModel::_usColors, App::Color::b, coords, SketcherExample::f, App::Color::g, App::ColorGradient::getColorModel(), Py::int, k, labels, App::Color::r, App::ColorGradient::setColorModel(), and RobotExample::w.
Referenced by SoFCColorLegend().
void SoFCColorLegend::setMarkerLabel | ( | const SoMFString & | label | ) |
Definition at line 82 of file SoFCColorLegend.cpp.
References SketcherExample::f, and labels.
Referenced by setRange().
void Gui::SoFCColorLegend::setOutsideGrayed | ( | bool | bVal | ) | [inline, virtual] |
Sets whether values outside the range should be in gray,.
This method must be implemented in subclasses.
Implements Gui::SoFCColorBarBase.
Definition at line 62 of file SoFCColorLegend.h.
void SoFCColorLegend::setRange | ( | float | fMin, | |
float | fMax, | |||
int | prec = 3 | |||
) | [virtual] |
Sets the range of the colorbar from the maximum fMax to the minimum fMin.
prec indicates the post decimal positions, prec should be in between 0 and 6.
Implements Gui::SoFCColorBarBase.
Definition at line 171 of file SoFCColorLegend.cpp.
References setMarkerLabel(), and App::ColorGradient::setRange().
Referenced by SoFCColorLegend().
void SoFCColorLegend::setViewportSize | ( | const SbVec2s & | size | ) | [protected, virtual] |
Sets the current viewer size to recalculate the new position.
This method must be implemented in subclasses.
Implements Gui::SoFCColorBarBase.
Definition at line 110 of file SoFCColorLegend.cpp.
References coords, SketcherExample::f, labels, and RobotExample::w.
SoCoordinate3* Gui::SoFCColorLegend::coords [protected] |
Definition at line 80 of file SoFCColorLegend.h.
Referenced by setColorModel(), setViewportSize(), SoFCColorLegend(), and ~SoFCColorLegend().
SoSeparator* Gui::SoFCColorLegend::labels [protected] |
Definition at line 81 of file SoFCColorLegend.h.
Referenced by setColorModel(), setMarkerLabel(), setViewportSize(), SoFCColorLegend(), and ~SoFCColorLegend().