CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
FWBoolParameterSetter Class Reference

#include <Fireworks/Core/interface/FWBoolParameterSetter.h>

Inheritance diagram for FWBoolParameterSetter:
FWParameterSetterBase

Public Member Functions

virtual void attach (FWParameterBase *)
 
virtual TGFrame * build (TGFrame *iParent, bool labelBack=true)
 
void doUpdate ()
 
 FWBoolParameterSetter ()
 
virtual void setEnabled (bool)
 
virtual ~FWBoolParameterSetter ()
 
- Public Member Functions inherited from FWParameterSetterBase
void attach (FWParameterBase *, FWParameterSetterEditorBase *)
 
 FWParameterSetterBase ()
 
virtual ~FWParameterSetterBase ()
 

Private Member Functions

 FWBoolParameterSetter (const FWBoolParameterSetter &)
 
const FWBoolParameterSetteroperator= (const FWBoolParameterSetter &)
 

Private Attributes

FWBoolParameterm_param
 
TGCheckButton * m_widget
 

Additional Inherited Members

- Static Public Member Functions inherited from FWParameterSetterBase
static boost::shared_ptr
< FWParameterSetterBase
makeSetterFor (FWParameterBase *)
 
- Protected Member Functions inherited from FWParameterSetterBase
FWParameterSetterEditorBaseframe () const
 
void update () const
 

Detailed Description

Description: <one line="" class="" summary>="">

Usage: <usage>

Definition at line 32 of file FWBoolParameterSetter.h.

Constructor & Destructor Documentation

FWBoolParameterSetter::FWBoolParameterSetter ( )

Definition at line 34 of file FWBoolParameterSetter.cc.

34  :
35  m_param(0),
36  m_widget(0)
37 {
38 }
FWBoolParameterSetter::~FWBoolParameterSetter ( )
virtual

Definition at line 45 of file FWBoolParameterSetter.cc.

46 {
47 }
FWBoolParameterSetter::FWBoolParameterSetter ( const FWBoolParameterSetter )
private

Member Function Documentation

void FWBoolParameterSetter::attach ( FWParameterBase iParam)
virtual

Implements FWParameterSetterBase.

Definition at line 66 of file FWBoolParameterSetter.cc.

References m_param.

67 {
68  m_param = dynamic_cast<FWBoolParameter*>(iParam);
69  assert(0!=m_param);
70 }
TGFrame * FWBoolParameterSetter::build ( TGFrame *  iParent,
bool  labelBack = true 
)
virtual

Implements FWParameterSetterBase.

Definition at line 73 of file FWBoolParameterSetter.cc.

References FWParameterSetterBase::frame(), m_param, m_widget, FWParameterBase::name(), and FWGenericParameter< T >::value().

74 {
75  TGCompositeFrame* frame = new TGHorizontalFrame(iParent);
76 
77  m_widget = new TGCheckButton(frame, m_param->name().c_str(), 0);
78  m_widget->SetState( m_param->value() ? kButtonDown : kButtonUp );
79  m_widget->Connect("Clicked()", "FWBoolParameterSetter", this, "doUpdate()");
80  frame->AddFrame(m_widget, new TGLayoutHints(kLHintsLeft|kLHintsCenterY,2,0,1,1));
81  return frame;
82 }
FWParameterSetterEditorBase * frame() const
const std::string & name() const
void FWBoolParameterSetter::doUpdate ( )

Definition at line 91 of file FWBoolParameterSetter.cc.

References m_param, m_widget, FWGenericParameter< T >::set(), and FWParameterSetterBase::update().

92 {
93  assert(0!=m_param);
94  assert(0!=m_widget);
95  m_param->set(m_widget->IsOn());
96  update();
97 }
const FWBoolParameterSetter& FWBoolParameterSetter::operator= ( const FWBoolParameterSetter )
private
void FWBoolParameterSetter::setEnabled ( bool  x)
virtual

Reimplemented from FWParameterSetterBase.

Definition at line 85 of file FWBoolParameterSetter.cc.

References m_widget.

Referenced by Vispa.Views.PropertyView.BooleanProperty::setReadOnly(), and Vispa.Views.PropertyView.DropDownProperty::setReadOnly().

86 {
87  m_widget->SetEnabled(x);
88 }
x
Definition: VDTMath.h:216

Member Data Documentation

FWBoolParameter* FWBoolParameterSetter::m_param
private

Definition at line 55 of file FWBoolParameterSetter.h.

Referenced by attach(), build(), and doUpdate().

TGCheckButton* FWBoolParameterSetter::m_widget
private

Definition at line 56 of file FWBoolParameterSetter.h.

Referenced by build(), doUpdate(), and setEnabled().