#include <Fireworks/Core/interface/FWDoubleParameterSetter.h>
Public Member Functions | |
virtual void | attach (FWParameterBase *) |
virtual TGFrame * | build (TGFrame *iParent, bool labelBack=true) |
void | doUpdate (Long_t) |
FWDoubleParameterSetter () | |
virtual void | setEnabled (bool) |
virtual | ~FWDoubleParameterSetter () |
Private Member Functions | |
FWDoubleParameterSetter (const FWDoubleParameterSetter &) | |
const FWDoubleParameterSetter & | operator= (const FWDoubleParameterSetter &) |
Private Attributes | |
FWDoubleParameter * | m_param |
TGNumberEntry * | m_widget |
Description: <one line="" class="" summary>="">
Usage: <usage>
Definition at line 33 of file FWDoubleParameterSetter.h.
FWDoubleParameterSetter::FWDoubleParameterSetter | ( | ) |
Definition at line 35 of file FWDoubleParameterSetter.cc.
FWDoubleParameterSetter::~FWDoubleParameterSetter | ( | ) | [virtual] |
Definition at line 46 of file FWDoubleParameterSetter.cc.
{ }
FWDoubleParameterSetter::FWDoubleParameterSetter | ( | const FWDoubleParameterSetter & | ) | [private] |
void FWDoubleParameterSetter::attach | ( | FWParameterBase * | iParam | ) | [virtual] |
Implements FWParameterSetterBase.
Definition at line 67 of file FWDoubleParameterSetter.cc.
References m_param.
{ m_param = dynamic_cast<FWDoubleParameter*>(iParam); assert(0!=m_param); }
TGFrame * FWDoubleParameterSetter::build | ( | TGFrame * | iParent, |
bool | labelBack = true |
||
) | [virtual] |
Implements FWParameterSetterBase.
Definition at line 74 of file FWDoubleParameterSetter.cc.
References FWParameterSetterBase::frame(), m_param, m_widget, FWGenericParameterWithRange< T >::max(), max(), min, FWGenericParameterWithRange< T >::min(), FWParameterBase::name(), and FWGenericParameter< T >::value().
{ TGCompositeFrame* frame = new TGHorizontalFrame(iParent); // number entry widget TGNumberFormat::ELimit limits = m_param->min()==m_param->max() ? TGNumberFormat::kNELNoLimits : ( m_param->min() > m_param->max() ? TGNumberFormat::kNELLimitMin : TGNumberFormat::kNELLimitMinMax); double min = 0; double max = 1; if(m_param->min()!=m_param->max()) { min=m_param->min(); max=m_param->max(); } m_widget = new TGNumberEntry (frame, m_param->value(), 5, // number of digits 0, // widget ID TGNumberFormat::kNESReal, // style TGNumberFormat::kNEAAnyNumber, // input value filter limits, // specify limits min, // min value max); // max value frame->AddFrame(m_widget, new TGLayoutHints(kLHintsLeft|kLHintsCenterY, 2,8,2,2)); m_widget->Connect("ValueSet(Long_t)", "FWDoubleParameterSetter", this, "doUpdate(Long_t)"); // label frame->AddFrame(new TGLabel(frame,m_param->name().c_str()), new TGLayoutHints(kLHintsLeft|kLHintsCenterY) ); return frame; }
void FWDoubleParameterSetter::doUpdate | ( | Long_t | ) |
Definition at line 108 of file FWDoubleParameterSetter.cc.
References m_param, m_widget, FWGenericParameter< T >::set(), and FWParameterSetterBase::update().
const FWDoubleParameterSetter& FWDoubleParameterSetter::operator= | ( | const FWDoubleParameterSetter & | ) | [private] |
void FWDoubleParameterSetter::setEnabled | ( | bool | x | ) | [virtual] |
Reimplemented from FWParameterSetterBase.
Definition at line 119 of file FWDoubleParameterSetter.cc.
References m_widget.
Definition at line 58 of file FWDoubleParameterSetter.h.
Referenced by attach(), build(), and doUpdate().
TGNumberEntry* FWDoubleParameterSetter::m_widget [private] |
Definition at line 59 of file FWDoubleParameterSetter.h.
Referenced by build(), doUpdate(), and setEnabled().