#include <Iguana/GLBrowsers/interface/Ig3DStringControl.h>
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 |
IgQtLineEdit * | widget (void) const |
Protected Member Functions | |
virtual void | applyValue (void) |
virtual void | updateValue (void) |
Private Slots | |
void | textChanged (const QString &newval) |
Private Attributes | |
IgQtLineEdit * | m_value |
Definition at line 20 of file Ig3DStringControl.h.
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 }
Implements IgControlBase.
Definition at line 83 of file Ig3DStringControl.cc.
References field(), and 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().
void Ig3DStringControl::setField | ( | SoSFString * | field | ) |
Definition at line 54 of file Ig3DStringControl.cc.
References Ig3DFieldControl::setField().
00055 { Ig3DFieldControl::setField (field); }
void Ig3DStringControl::setValue | ( | const SbString & | newval | ) | [slot] |
Definition at line 71 of file Ig3DStringControl.cc.
References m_value, and IgControlItem::setDirty().
Referenced by updateValue().
void Ig3DStringControl::textChanged | ( | const QString & | newval | ) | [private, slot] |
Definition at line 75 of file Ig3DStringControl.cc.
References IgControlItem::setDirty().
Referenced by Ig3DStringControl().
00076 { setDirty (); }
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 |
IgQtLineEdit* Ig3DStringControl::m_value [private] |
Definition at line 48 of file Ig3DStringControl.h.
Referenced by Ig3DStringControl(), setValue(), value(), and widget().