CMS 3D CMS Logo

Ig3DRangeControl< C1, C2, C3 > Class Template Reference

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

Inheritance diagram for Ig3DRangeControl< C1, C2, C3 >:

Ig3DFieldControl IgControlBase IgControlItem

List of all members.

Public Types

typedef Ig3DRangeControl< C1,
C2, C3 > 
inherited

Public Member Functions

C3 * control (void) const
C1 * field (void) const
C2 fieldValue (void) const
QString getSettingString (void) const
 Ig3DRangeControl (IgControlCategory *pane, QString label, int parts=IgQtRangeControl::ValuePart)
void setField (C1 *field)
void setSettingString (QString &setting)
void setValue (C2 newval)
C2 value (void) const

Protected Member Functions

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

Private Attributes

C3 * m_value


Detailed Description

template<class C1, class C2, class C3>
class Ig3DRangeControl< C1, C2, C3 >

Definition at line 22 of file Ig3DRangeControl.h.


Member Typedef Documentation

template<class C1, class C2, class C3>
typedef Ig3DRangeControl<C1, C2, C3> Ig3DRangeControl< C1, C2, C3 >::inherited

Definition at line 25 of file Ig3DRangeControl.h.


Constructor & Destructor Documentation

template<class C1, class C2, class C3>
Ig3DRangeControl< C1, C2, C3 >::Ig3DRangeControl ( IgControlCategory pane,
QString  label,
int  parts = IgQtRangeControl::ValuePart 
) [inline]

Definition at line 70 of file Ig3DRangeControl.h.

References reco::fitHelper::add(), IgControlBase::addGridWidget(), ASSERT, IgControlCategory::bodyArea(), IgControlCategory::bodyLayout(), IgControlItem::clean(), HLT_VtxMuL3::connect, IgControlItem::dirty(), IgControlItem::editable(), Ig3DFieldControl::fieldSettingsChanged(), IgControlBase::gridRows(), Ig3DRangeControl< C1, C2, C3 >::m_value, IgControlBase::makeIndentedLabel(), IgControlItem::makeSpacedBox(), row, IgControlItem::setClean(), IgControlItem::setDirty(), and Ig3DFieldControl::settingsChanged().

00073     : Ig3DFieldControl (pane)
00074 {
00075     ASSERT (pane);
00076     ASSERT (pane->bodyArea ());
00077     ASSERT (pane->bodyLayout ());
00078 
00079     QWidget     *area = pane->bodyArea ();
00080     int         row = gridRows ();
00081 
00082     ASSERT (row >= 0);
00083 
00084     // Add a new row to the grid, label on the left and the value on the right
00085     QWidget     *vlab = makeIndentedLabel (label, area);
00086     addGridWidget (vlab, row, 0);
00087     QString tips ("Set the \"");
00088     tips += label + "\" of the item";
00089     QToolTip::add (vlab, tips.latin1 ());
00090     QWhatsThis::add (vlab, tips.latin1 ());
00091 
00092     m_value = new C3 (area, parts);
00093     addGridWidget (makeSpacedBox (area, m_value->widget ()), row, 1);
00094 
00095     // Always reflect the state of the real value control and vice versa.
00096     connect (m_value,            SIGNAL (dirty    ()), 
00097              this,               SLOT   (setDirty ()));
00098     connect (this,               SIGNAL (editable   (bool)), 
00099              m_value->widget (), SLOT   (setEnabled (bool)));
00100     connect (this,               SIGNAL (editable   (bool)), 
00101              vlab,               SLOT   (setEnabled (bool)));
00102     connect (this,               SIGNAL (clean    ()),
00103              m_value,            SLOT   (setClean ()));
00104     connect (pane,               SIGNAL (tracking          (bool)), 
00105              m_value,            SLOT   (resetChangedValue (bool)));
00106     connect (m_value,            SIGNAL (settingsChanged (void)),
00107              this,               SLOT   (fieldSettingsChanged (void)));
00108 }


Member Function Documentation

template<class C1, class C2, class C3>
virtual void Ig3DRangeControl< C1, C2, C3 >::applyValue ( void   )  [inline, protected, virtual]

Implements IgControlBase.

Reimplemented in Ig3DAngleControl.

Definition at line 62 of file Ig3DRangeControl.h.

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

template<class C1, class C2, class C3>
C3* Ig3DRangeControl< C1, C2, C3 >::control ( void   )  const [inline]

Definition at line 42 of file Ig3DRangeControl.h.

Referenced by Ig3DGridCategory::addTips(), Ig3DPlaneControl::getSettingString(), Ig3DRotationFControl::getSettingString(), Ig3DAnimsCategory::Ig3DAnimsCategory(), Ig3DClipsCategory::Ig3DClipsCategory(), Ig3DFieldPlanesCategory::Ig3DFieldPlanesCategory(), Ig3DGridCategory::Ig3DGridCategory(), Ig3DLightsCategory::Ig3DLightsCategory(), Ig3DPlaneControl::Ig3DPlaneControl(), Ig3DRotationFControl::Ig3DRotationFControl(), Ig3DSlicersCategory::Ig3DSlicersCategory(), Ig3DViewpointsCategory::Ig3DViewpointsCategory(), Ig3DPlaneControl::setSettingString(), and Ig3DRotationFControl::setSettingString().

00043     { return m_value; }

template<class C1, class C2, class C3>
C1* Ig3DRangeControl< C1, C2, C3 >::field ( void   )  const [inline]

Reimplemented from Ig3DFieldControl.

Definition at line 33 of file Ig3DRangeControl.h.

00034     { return static_cast<C1 *> (Ig3DFieldControl::field ()); }

template<class C1, class C2, class C3>
C2 Ig3DRangeControl< C1, C2, C3 >::fieldValue ( void   )  const [inline]

Definition at line 39 of file Ig3DRangeControl.h.

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

template<class C1, class C2, class C3>
QString Ig3DRangeControl< C1, C2, C3 >::getSettingString ( void   )  const [inline]

Definition at line 48 of file Ig3DRangeControl.h.

00049     { return control ()->getSettingString (); }

template<class C1, class C2, class C3>
void Ig3DRangeControl< C1, C2, C3 >::setField ( C1 *  field  )  [inline]

Definition at line 36 of file Ig3DRangeControl.h.

Referenced by Ig3DSlicersCategory::attach(), Ig3DAnimsCategory::attach(), Ig3DFieldPlanesCategory::attach(), Ig3DViewpointsCategory::attach(), Ig3DGridCategory::attach(), Ig3DLightsCategory::attach(), Ig3DGridCategory::detach(), Ig3DFieldPlanesCategory::detach(), Ig3DSlicersCategory::detach(), Ig3DAnimsCategory::detach(), Ig3DViewpointsCategory::detach(), and Ig3DLightsCategory::detach().

template<class C1, class C2, class C3>
void Ig3DRangeControl< C1, C2, C3 >::setSettingString ( QString &  setting  )  [inline]

Definition at line 51 of file Ig3DRangeControl.h.

00052     { control ()->setSettingString (setting); }

template<class C1, class C2, class C3>
void Ig3DRangeControl< C1, C2, C3 >::setValue ( C2  newval  )  [inline]

Reimplemented in Ig3DFloatControl, Ig3DInt32Control, Ig3DShortControl, Ig3DUInt32Control, and Ig3DUShortControl.

Definition at line 55 of file Ig3DRangeControl.h.

00056     { m_value->setValue (newval); setDirty (true); }

template<class C1, class C2, class C3>
virtual void Ig3DRangeControl< C1, C2, C3 >::updateValue ( void   )  [inline, protected, virtual]

Implements IgControlBase.

Reimplemented in Ig3DAngleControl.

Definition at line 59 of file Ig3DRangeControl.h.

00060     { setValue (fieldValue ()); }

template<class C1, class C2, class C3>
C2 Ig3DRangeControl< C1, C2, C3 >::value ( void   )  const [inline]

Definition at line 45 of file Ig3DRangeControl.h.

Referenced by Ig3DRotationFControl::angle(), Ig3DPlaneControl::distance(), Ig3DViewpointsCategory::updateCameraPosition(), and Ig3DViewpointsCategory::zoom().

00046     { return m_value->value (); }


Member Data Documentation

template<class C1, class C2, class C3>
C3* Ig3DRangeControl< C1, C2, C3 >::m_value [private]

Definition at line 66 of file Ig3DRangeControl.h.

Referenced by Ig3DRangeControl< C1, C2, C3 >::Ig3DRangeControl().


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