CMS 3D CMS Logo

Ig3DRotationFControl Class Reference

#include <Iguana/GLBrowsers/interface/Ig3DRotationFControl.h>

Inheritance diagram for Ig3DRotationFControl:

Ig3DFieldControl IgControlBase IgControlItem

List of all members.

Public Slots

virtual void emitSettingsChanged (void)
virtual void setAngle (float value)
virtual void setAxis (const SbVec3f &value)
virtual void setValue (const SbRotation &newval)
virtual void setValue (const SbVec3f &axis, float angle)

Public Member Functions

float angle (void) const
Ig3DFloatControlangleControl (void) const
SbVec3f axis (void) const
Ig3DVectorControlaxisControl (void) const
SoSFRotation * field (void) const
SbRotation fieldValue (void) const
QString getSettingString (void) const
 Ig3DRotationFControl (IgControlCategory *pane, QString label)
void setField (SoSFRotation *field)
void setSettingString (QString &setting)
SbRotation value (void) const

Protected Member Functions

virtual void applyValue (void)
virtual void updateValue (void)

Private Attributes

Ig3DFloatControlm_angle
Ig3DVectorControlm_axis


Detailed Description

Definition at line 21 of file Ig3DRotationFControl.h.


Constructor & Destructor Documentation

Ig3DRotationFControl::Ig3DRotationFControl ( IgControlCategory pane,
QString  label 
)

Definition at line 20 of file Ig3DRotationFControl.cc.

References IgControlBase::addGridWidget(), ASSERT, IgControlCategory::bodyArea(), IgControlCategory::bodyLayout(), IgControlItem::clean(), HLT_VtxMuL3::connect, Ig3DRangeControl< C1, C2, C3 >::control(), IgControlItem::dirty(), IgControlItem::editable(), emitSettingsChanged(), IgControlBase::gridRows(), m_angle, m_axis, IgControlBase::makeIndentedLabel(), IgControlCategory::popIndent(), IgControlCategory::pushIndent(), IgControlItem::setClean(), IgControlItem::setDirty(), IgControlItem::setEditable(), IgQtRangeControlFloat::setLongStep(), IgQtRangeControlFloat::setRange(), IgQtRangeControlFloat::setSmallStep(), Ig3DFieldControl::settingsChanged(), IgQtRangeControlCommon::SliderPart, IgQtRangeControlCommon::StepperPart, and IgQtRangeControlCommon::ValuePart.

00022     : Ig3DFieldControl (pane)
00023 {
00024     ASSERT (pane);
00025     ASSERT (pane->bodyArea ());
00026     ASSERT (pane->bodyLayout ());
00027 
00028     QWidget *area = pane->bodyArea ();
00029 
00030     // Add a new row to the grid: just the label for this category
00031     QWidget     *vlab = makeIndentedLabel (label, area);
00032     addGridWidget (vlab, gridRows (), 0);
00033 
00034     // Now add subitems for direction and distance
00035     pane->pushIndent ();
00036     m_axis = new Ig3DUnitVec3fControl (pane, "Axis");
00037     
00038     m_angle = new Ig3DFloatControl (pane, "Angle",
00039                                     IgQtRangeControl::StepperPart
00040                                     | IgQtRangeControl::ValuePart
00041                                     | IgQtRangeControl::SliderPart);    
00042     m_angle->control ()->setSmallStep (1); 
00043     m_angle->control ()->setLongStep (5); 
00044     m_angle->control ()->setRange (-180.,180.);
00045     
00046     pane->popIndent ();
00047 
00048     // Always reflect the state of the real value controls and vice versa.
00049     connect (m_axis,   SIGNAL(dirty()), this, SLOT(setDirty()));
00050     connect (m_axis,   SIGNAL(settingsChanged (void)),
00051              this,     SLOT  (emitSettingsChanged (void)));
00052     connect (m_angle,  SIGNAL(dirty()), this, SLOT(setDirty()));
00053     connect (m_angle,  SIGNAL(settingsChanged (void)),
00054              this,     SLOT  (emitSettingsChanged (void)));
00055     connect (this, SIGNAL(clean()), m_axis, SLOT(setClean()));
00056     connect (this, SIGNAL(clean()), m_angle,  SLOT(setClean()));
00057     connect (this, SIGNAL(editable(bool)),m_axis,SLOT(setEditable(bool)));
00058     connect (this, SIGNAL(editable(bool)),m_angle, SLOT(setEditable(bool)));
00059     connect (this, SIGNAL(editable(bool)),vlab,       SLOT(setEnabled(bool)));
00060 }


Member Function Documentation

float Ig3DRotationFControl::angle ( void   )  const

Definition at line 85 of file Ig3DRotationFControl.cc.

References Ig3DRotationControl::deg2rad(), m_angle, and Ig3DRangeControl< C1, C2, C3 >::value().

Referenced by setValue(), and value().

Ig3DFloatControl * Ig3DRotationFControl::angleControl ( void   )  const

Definition at line 123 of file Ig3DRotationFControl.cc.

References m_angle.

00124 { return m_angle; }

void Ig3DRotationFControl::applyValue ( void   )  [protected, virtual]

Implements IgControlBase.

Definition at line 114 of file Ig3DRotationFControl.cc.

References field(), and value().

00115 { field ()->setValue (value ()); }

SbVec3f Ig3DRotationFControl::axis ( void   )  const

Definition at line 81 of file Ig3DRotationFControl.cc.

References m_axis, and Ig3DVectorControl::value().

Referenced by setValue(), and value().

00082 { return m_axis->value (); }

Ig3DVectorControl * Ig3DRotationFControl::axisControl ( void   )  const

Definition at line 119 of file Ig3DRotationFControl.cc.

References m_axis.

00120 { return m_axis; }

void Ig3DRotationFControl::emitSettingsChanged ( void   )  [virtual, slot]

Definition at line 145 of file Ig3DRotationFControl.cc.

References Ig3DFieldControl::fieldSettingsChanged().

Referenced by Ig3DRotationFControl().

00146 { fieldSettingsChanged (); }

SoSFRotation * Ig3DRotationFControl::field ( void   )  const

Reimplemented from Ig3DFieldControl.

Definition at line 64 of file Ig3DRotationFControl.cc.

References Ig3DFieldControl::field().

Referenced by applyValue(), and fieldValue().

00065 { return static_cast<SoSFRotation *> (Ig3DFieldControl::field ()); }

SbRotation Ig3DRotationFControl::fieldValue ( void   )  const

Definition at line 72 of file Ig3DRotationFControl.cc.

References ASSERT, and field().

Referenced by updateValue().

00073 { ASSERT (field ()); return field ()->getValue (); }

QString Ig3DRotationFControl::getSettingString ( void   )  const

Definition at line 127 of file Ig3DRotationFControl.cc.

References IgQtRangeControlCommon::addSettingItem(), Ig3DRangeControl< C1, C2, C3 >::control(), Ig3DVectorControl::control(), IgQtRangeControlFloat::getSettingString(), m_angle, and m_axis.

00128 {
00129 
00130   QString setting (m_axis->control ()->getSettingString ());
00131   IgQtRangeControlCommon::addSettingItem (m_angle->control ()->
00132                                           getSettingString (),
00133                                           setting);
00134   return setting;
00135 }

void Ig3DRotationFControl::setAngle ( float  value  )  [virtual, slot]

Definition at line 106 of file Ig3DRotationFControl.cc.

References m_angle, and Ig3DFloatControl::setValue().

Referenced by setValue().

00107 { m_angle->setValue (newval); }

void Ig3DRotationFControl::setAxis ( const SbVec3f &  value  )  [virtual, slot]

Definition at line 102 of file Ig3DRotationFControl.cc.

References m_axis, and Ig3DVectorControl::setValue().

Referenced by setValue().

00103 { m_axis->setValue (newval); }

void Ig3DRotationFControl::setField ( SoSFRotation *  field  ) 

Definition at line 68 of file Ig3DRotationFControl.cc.

References Ig3DFieldControl::setField().

void Ig3DRotationFControl::setSettingString ( QString &  setting  ) 

Definition at line 138 of file Ig3DRotationFControl.cc.

References Ig3DRangeControl< C1, C2, C3 >::control(), Ig3DVectorControl::control(), m_angle, m_axis, and IgQtRangeControlFloat::setSettingString().

00139 {
00140   m_axis->control ()->setSettingString (setting);
00141   m_angle->control ()->setSettingString (setting);
00142 }

void Ig3DRotationFControl::setValue ( const SbRotation &  newval  )  [virtual, slot]

Definition at line 89 of file Ig3DRotationFControl.cc.

References angle(), axis(), Ig3DRotationControl::rad2deg(), and setValue().

00090 {
00091     SbVec3f axis;
00092     float angle;
00093     newval.getValue (axis, angle);
00094     setValue (axis, Ig3DRotationControl::rad2deg(angle));
00095 }

void Ig3DRotationFControl::setValue ( const SbVec3f &  axis,
float  angle 
) [virtual, slot]

Definition at line 98 of file Ig3DRotationFControl.cc.

References setAngle(), and setAxis().

Referenced by setValue(), and updateValue().

00099 { setAxis (axis); setAngle (angle); }

void Ig3DRotationFControl::updateValue ( void   )  [protected, virtual]

Implements IgControlBase.

Definition at line 110 of file Ig3DRotationFControl.cc.

References fieldValue(), and setValue().

00111 { setValue (fieldValue ()); }

SbRotation Ig3DRotationFControl::value ( void   )  const

Definition at line 77 of file Ig3DRotationFControl.cc.

References angle(), and axis().

Referenced by applyValue().

00078 { return SbRotation (axis (), angle ()); }


Member Data Documentation

Ig3DFloatControl* Ig3DRotationFControl::m_angle [private]

Definition at line 60 of file Ig3DRotationFControl.h.

Referenced by angle(), angleControl(), getSettingString(), Ig3DRotationFControl(), setAngle(), and setSettingString().

Ig3DVectorControl* Ig3DRotationFControl::m_axis [private]

Definition at line 59 of file Ig3DRotationFControl.h.

Referenced by axis(), axisControl(), getSettingString(), Ig3DRotationFControl(), setAxis(), and setSettingString().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:24:59 2009 for CMSSW by  doxygen 1.5.4