Gui::SoFCColorBar Class Reference

The color bar class that redirects all calls to its handled color bars. More...

#include <SoFCColorBar.h>

Inheritance diagram for Gui::SoFCColorBar:
Gui::SoFCColorBarBase Base::Subject< int > App::ValueFloatToRGB

List of all members.

Public Member Functions

bool customize ()
 Customizes the currently active color bar.
SoFCColorBarBasegetActiveBar () const
 Returns the currently active color bar object.
App::Color getColor (float fVal) const
 Returns the associated color to the value fVal of the currently active color bar.
const char * getColorBarName () const
 Returns the name of the color bar.
float getMaxValue (void) const
 Returns the current maximum of the parameter range of the currently active color bar.
float getMinValue (void) const
 Returns the current minimum of the parameter range of the currently active color bar.
void handleEvent (SoHandleEventAction *action)
 Handles the mouse button events and checks if the user has clicked on the area of the currently active color bar.
bool isVisible (float fVal) const
 Returns the return value of the currently active color bar.
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 all color bars from the maximum fMax to the minimum fMin.
 SoFCColorBar (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 all color bars to recalculate their new position.
virtual ~SoFCColorBar ()

Detailed Description

The color bar class that redirects all calls to its handled color bars.

Author:
Werner Mayer

Definition at line 129 of file SoFCColorBar.h.


Constructor & Destructor Documentation

SoFCColorBar::SoFCColorBar ( void   ) 

Constructor.

Definition at line 107 of file SoFCColorBar.cpp.

SoFCColorBar::~SoFCColorBar (  )  [protected, virtual]

Destructor.

Definition at line 129 of file SoFCColorBar.cpp.


Member Function Documentation

bool SoFCColorBar::customize (  )  [virtual]

Customizes the currently active color bar.

Implements Gui::SoFCColorBarBase.

Definition at line 194 of file SoFCColorBar.cpp.

References Gui::SoFCColorBarBase::customize(), and getActiveBar().

void SoFCColorBar::finish ( void   )  [static]

Reimplemented from Gui::SoFCColorBarBase.

Definition at line 140 of file SoFCColorBar.cpp.

SoFCColorBarBase * SoFCColorBar::getActiveBar (  )  const

Returns the currently active color bar object.

Definition at line 145 of file SoFCColorBar.cpp.

Referenced by customize(), getColor(), getMaxValue(), getMinValue(), handleEvent(), and isVisible().

App::Color SoFCColorBar::getColor ( float  fVal  )  const [virtual]

Returns the associated color to the value fVal of the currently active color bar.

Implements Gui::SoFCColorBarBase.

Definition at line 199 of file SoFCColorBar.cpp.

References getActiveBar(), and Gui::SoFCColorBarBase::getColor().

Referenced by InspectionGui::ViewProviderInspection::setDistances(), and MeshGui::ViewProviderMeshCurvature::setVertexCurvatureMode().

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

Returns the name of the color bar.

Implements Gui::SoFCColorBarBase.

Definition at line 178 of file SoFCColorBar.h.

float SoFCColorBar::getMaxValue ( void   )  const [virtual]

Returns the current maximum of the parameter range of the currently active color bar.

Implements Gui::SoFCColorBarBase.

Definition at line 189 of file SoFCColorBar.cpp.

References getActiveBar(), and Gui::SoFCColorBarBase::getMaxValue().

Referenced by InspectionGui::ViewProviderInspection::attach(), and MeshGui::ViewProviderMeshCurvature::attach().

float SoFCColorBar::getMinValue ( void   )  const [virtual]

Returns the current minimum of the parameter range of the currently active color bar.

Implements Gui::SoFCColorBarBase.

Definition at line 184 of file SoFCColorBar.cpp.

References getActiveBar(), and Gui::SoFCColorBarBase::getMinValue().

Referenced by InspectionGui::ViewProviderInspection::attach(), and MeshGui::ViewProviderMeshCurvature::attach().

void SoFCColorBar::handleEvent ( SoHandleEventAction *  action  ) 

Handles the mouse button events and checks if the user has clicked on the area of the currently active color bar.

Definition at line 216 of file SoFCColorBar.cpp.

References SketcherExample::f, getActiveBar(), and RobotExample::pos.

void SoFCColorBar::initClass ( void   )  [static]

Reimplemented from Gui::SoFCColorBarBase.

Definition at line 135 of file SoFCColorBar.cpp.

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

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

Returns the return value of the currently active color bar.

Implements Gui::SoFCColorBarBase.

Definition at line 179 of file SoFCColorBar.cpp.

References getActiveBar(), and Gui::SoFCColorBarBase::isVisible().

Referenced by InspectionGui::ViewProviderInspection::setDistances(), and MeshGui::ViewProviderMeshCurvature::setVertexCurvatureMode().

void SoFCColorBar::setOutsideGrayed ( bool  bVal  )  [virtual]

Sets whether values outside the range should be in gray,.

Implements Gui::SoFCColorBarBase.

Definition at line 173 of file SoFCColorBar.cpp.

Referenced by InspectionGui::ViewProviderInspection::onChanged().

void SoFCColorBar::setRange ( float  fMin,
float  fMax,
int  prec = 3 
) [virtual]

Sets the range of all color bars 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 167 of file SoFCColorBar.cpp.

Referenced by InspectionGui::ViewProviderInspection::attach(), MeshGui::ViewProviderMeshCurvature::attach(), and InspectionGui::ViewProviderInspection::updateData().

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

Sets the current viewer size to all color bars to recalculate their new position.

Implements Gui::SoFCColorBarBase.

Definition at line 151 of file SoFCColorBar.cpp.

References SketcherExample::f.


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