CMS 3D CMS Logo

Ig3DStringControl Class Reference

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

Inheritance diagram for Ig3DStringControl:

Ig3DFieldControl IgControlBase IgControlItem

List of all members.

Public Slots

void setValue (const SbString &newval)

Public Member Functions

SoSFString * field (void) const
SbString fieldValue (void) const
 Ig3DStringControl (IgControlCategory *pane, QString label)
void setField (SoSFString *field)
SbString value (void) const
IgQtLineEditwidget (void) const

Protected Member Functions

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

Private Slots

void textChanged (const QString &newval)

Private Attributes

IgQtLineEditm_value


Detailed Description

Definition at line 20 of file Ig3DStringControl.h.


Constructor & Destructor Documentation

Ig3DStringControl::Ig3DStringControl ( IgControlCategory pane,
QString  label 
)

Definition at line 20 of file Ig3DStringControl.cc.

References IgControlBase::addGridWidget(), ASSERT, IgControlCategory::bodyArea(), IgControlCategory::bodyLayout(), HLT_VtxMuL3::connect, IgControlItem::editable(), IgControlBase::gridRows(), m_value, IgControlBase::makeIndentedLabel(), IgControlItem::makeSpacedBox(), row, and textChanged().

00021     : Ig3DFieldControl (pane)
00022 {
00023     ASSERT (pane);
00024     ASSERT (pane->bodyArea ());
00025     ASSERT (pane->bodyLayout ());
00026 
00027     QWidget     *area = pane->bodyArea ();
00028     int         row = gridRows ();
00029 
00030     ASSERT (row >= 0);
00031 
00032     // Add a new row to the grid, label on the left and the value on the right
00033     QWidget     *vlab = makeIndentedLabel (label, area);
00034     addGridWidget (vlab, row, 0);
00035 
00036     // Add a new row to the grid, value on the left and the label on the right
00037     m_value = new IgQtLineEdit (area);
00038     addGridWidget (makeSpacedBox (area, m_value), row, 1);
00039 
00040     connect (m_value, SIGNAL (valueChanged (const QString&)),
00041              this,   SLOT (textChanged (const QString&)));
00042     connect (this,    SIGNAL (editable   (bool)), 
00043              m_value, SLOT   (setEnabled (bool)));
00044     connect (this,      SIGNAL (editable    (bool)), 
00045              vlab,      SLOT   (setEnabled  (bool)));
00046 }


Member Function Documentation

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

Implements IgControlBase.

Definition at line 83 of file Ig3DStringControl.cc.

References field(), and value().

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

SoSFString * Ig3DStringControl::field ( void   )  const

Reimplemented from Ig3DFieldControl.

Definition at line 50 of file Ig3DStringControl.cc.

References Ig3DFieldControl::field().

Referenced by applyValue(), and fieldValue().

00051 { return static_cast<SoSFString *> (Ig3DFieldControl::field ()); }

SbString Ig3DStringControl::fieldValue ( void   )  const

Definition at line 58 of file Ig3DStringControl.cc.

References ASSERT, and field().

Referenced by updateValue().

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

void Ig3DStringControl::setField ( SoSFString *  field  ) 

Definition at line 54 of file Ig3DStringControl.cc.

References Ig3DFieldControl::setField().

void Ig3DStringControl::setValue ( const SbString &  newval  )  [slot]

Definition at line 71 of file Ig3DStringControl.cc.

References m_value, and IgControlItem::setDirty().

Referenced by updateValue().

00072 { m_value->setText (newval.getString ()); setDirty (); }

void Ig3DStringControl::textChanged ( const QString &  newval  )  [private, slot]

Definition at line 75 of file Ig3DStringControl.cc.

References IgControlItem::setDirty().

Referenced by Ig3DStringControl().

00076 { setDirty (); }

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

Implements IgControlBase.

Definition at line 79 of file Ig3DStringControl.cc.

References fieldValue(), and setValue().

00080 { setValue (fieldValue ()); }

SbString Ig3DStringControl::value ( void   )  const

Definition at line 67 of file Ig3DStringControl.cc.

References m_value.

Referenced by applyValue().

00068 { return SbString (m_value->text ().latin1 ()); }

IgQtLineEdit * Ig3DStringControl::widget ( void   )  const

Definition at line 62 of file Ig3DStringControl.cc.

References m_value.

00063 { return m_value; }


Member Data Documentation

IgQtLineEdit* Ig3DStringControl::m_value [private]

Definition at line 48 of file Ig3DStringControl.h.

Referenced by Ig3DStringControl(), setValue(), value(), and widget().


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