Gui::SoFCColorGradient Class Reference

#include <SoFCColorGradient.h>

Inheritance diagram for Gui::SoFCColorGradient:
Gui::SoFCColorBarBase App::ValueFloatToRGB

List of all members.

Public Member Functions

bool customize ()
 Opems a dialog to customie the current settings of the color gradient 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.
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 gradient 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 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.
 SoFCColorGradient (void)

Static Public Member Functions

static void finish (void)
static void initClass (void)

Protected Member Functions

std::vector< float > getMarkerValues (float fMin, float fMax, int count) const
 Returns a list of count labels within the ranhe [fMin, fMax].
void rebuildGradient ()
 Rebuild the gradient bar.
void setColorModel (App::ColorGradient::TColorModel tModel)
 Sets the color model of the underlying color gradient to tModel.
void setColorStyle (App::ColorGradient::TStyle tStyle)
 Sets the color style of the underlying color gradient to tStyle.
void setViewportSize (const SbVec2s &size)
 Sets the current viewer size this color gradient is embedded into to recalculate its new position.
virtual ~SoFCColorGradient ()

Detailed Description

Definition at line 38 of file SoFCColorGradient.h.


Constructor & Destructor Documentation

SoFCColorGradient::SoFCColorGradient ( void   ) 
SoFCColorGradient::~SoFCColorGradient (  )  [protected, virtual]

Destructor.

Definition at line 66 of file SoFCColorGradient.cpp.


Member Function Documentation

bool SoFCColorGradient::customize (  )  [virtual]

Opems a dialog to customie the current settings of the color gradient bar.

Returns true if the settings have been changed, false otherwise.

Implements Gui::SoFCColorBarBase.

Definition at line 321 of file SoFCColorGradient.cpp.

References Gui::MainWindow::activeWindow(), Gui::Dialog::DlgSettingsColorGradientImp::colorModel(), Gui::Dialog::DlgSettingsColorGradientImp::colorStyle(), App::ColorGradient::getColorModelType(), App::ColorGradient::getCountColors(), Gui::getMainWindow(), Gui::Dialog::DlgSettingsColorGradientImp::getRange(), App::ColorGradient::getRange(), App::ColorGradient::getStyle(), Gui::Dialog::DlgSettingsColorGradientImp::isOutGrayed(), Gui::Dialog::DlgSettingsColorGradientImp::isOutInvisible(), App::ColorGradient::isOutsideGrayed(), Gui::Dialog::DlgSettingsColorGradientImp::numberOfDecimals(), Gui::Dialog::DlgSettingsColorGradientImp::numberOfLabels(), RobotExample::pos, rebuildGradient(), App::ColorGradient::setColorModel(), Gui::Dialog::DlgSettingsColorGradientImp::setColorModel(), Gui::Dialog::DlgSettingsColorGradientImp::setColorStyle(), App::ColorGradient::setCountColors(), Gui::Dialog::DlgSettingsColorGradientImp::setNumberOfDecimals(), Gui::Dialog::DlgSettingsColorGradientImp::setNumberOfLabels(), Gui::Dialog::DlgSettingsColorGradientImp::setOutGrayed(), Gui::Dialog::DlgSettingsColorGradientImp::setOutInvisible(), App::ColorGradient::setOutsideGrayed(), setRange(), Gui::Dialog::DlgSettingsColorGradientImp::setRange(), and App::ColorGradient::setStyle().

void SoFCColorGradient::finish ( void   )  [static]

Reimplemented from Gui::SoFCColorBarBase.

Definition at line 79 of file SoFCColorGradient.cpp.

App::Color Gui::SoFCColorGradient::getColor ( float  fVal  )  const [inline, virtual]

Returns the associated color to the value fVal.

Implements Gui::SoFCColorBarBase.

Definition at line 56 of file SoFCColorGradient.h.

const char* Gui::SoFCColorGradient::getColorBarName (  )  const [inline, virtual]

Returns the name of the color bar.

Implements Gui::SoFCColorBarBase.

Definition at line 74 of file SoFCColorGradient.h.

std::vector< float > SoFCColorGradient::getMarkerValues ( float  fMin,
float  fMax,
int  count 
) const [protected]

Returns a list of count labels within the ranhe [fMin, fMax].

Definition at line 202 of file SoFCColorGradient.cpp.

References SketcherExample::f, App::ColorGradient::getStyle(), k, RobotExample::w, and App::ColorGradient::ZERO_BASED.

Referenced by setRange().

float Gui::SoFCColorGradient::getMaxValue ( void   )  const [inline, virtual]

Returns the current maximum of the parameter range.

Implements Gui::SoFCColorBarBase.

Definition at line 67 of file SoFCColorGradient.h.

float Gui::SoFCColorGradient::getMinValue ( void   )  const [inline, virtual]

Returns the current minimum of the parameter range.

Implements Gui::SoFCColorBarBase.

Definition at line 65 of file SoFCColorGradient.h.

void SoFCColorGradient::initClass ( void   )  [static]

Reimplemented from Gui::SoFCColorBarBase.

Definition at line 74 of file SoFCColorGradient.cpp.

Referenced by Gui::SoFCDB::init().

bool SoFCColorGradient::isVisible ( float  fVal  )  const [virtual]

Returns always true if the gradient 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.

Implements Gui::SoFCColorBarBase.

Definition at line 306 of file SoFCColorGradient.cpp.

References App::ColorGradient::getRange().

void SoFCColorGradient::rebuildGradient (  )  [protected]
void SoFCColorGradient::setColorModel ( App::ColorGradient::TColorModel  tModel  )  [protected]

Sets the color model of the underlying color gradient to tModel.

tModel either can be TRIA, INVERSE_TRIA, GRAY or INVERSE_GRAY

Definition at line 237 of file SoFCColorGradient.cpp.

References rebuildGradient(), and App::ColorGradient::setColorModel().

Referenced by SoFCColorGradient().

void SoFCColorGradient::setColorStyle ( App::ColorGradient::TStyle  tStyle  )  [protected]

Sets the color style of the underlying color gradient to tStyle.

tStyle either can be FLOW or ZERO_BASED

Definition at line 243 of file SoFCColorGradient.cpp.

References rebuildGradient(), and App::ColorGradient::setStyle().

void Gui::SoFCColorGradient::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 57 of file SoFCColorGradient.h.

void SoFCColorGradient::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 177 of file SoFCColorGradient.cpp.

References App::ColorGradient::getCountColors(), getMarkerValues(), KDL::pow(), and App::ColorGradient::setRange().

Referenced by customize(), and SoFCColorGradient().

void SoFCColorGradient::setViewportSize ( const SbVec2s &  size  )  [protected, virtual]

Sets the current viewer size this color gradient is embedded into to recalculate its new position.

Implements Gui::SoFCColorBarBase.

Definition at line 113 of file SoFCColorGradient.cpp.

References SketcherExample::f, and RobotExample::w.


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

Generated on Wed Nov 23 19:02:03 2011 for FreeCAD by  doxygen 1.6.1