CMS 3D CMS Logo

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

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

Private Member Functions

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

Private Attributes

FWBoolParameterm_param
 
TGCheckButton * m_widget
 

Additional Inherited Members

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

Detailed Description

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

Usage: <usage>

Definition at line 31 of file FWBoolParameterSetter.h.

Constructor & Destructor Documentation

FWBoolParameterSetter::FWBoolParameterSetter ( )

Definition at line 33 of file FWBoolParameterSetter.cc.

33  :
34  m_param(nullptr),
35  m_widget(nullptr)
36 {
37 }
FWBoolParameterSetter::~FWBoolParameterSetter ( )
override

Definition at line 44 of file FWBoolParameterSetter.cc.

45 {
46 }
FWBoolParameterSetter::FWBoolParameterSetter ( const FWBoolParameterSetter )
privatedelete

Member Function Documentation

void FWBoolParameterSetter::attach ( FWParameterBase iParam)
overridevirtual

Implements FWParameterSetterBase.

Definition at line 65 of file FWBoolParameterSetter.cc.

References m_param.

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

Implements FWParameterSetterBase.

Definition at line 72 of file FWBoolParameterSetter.cc.

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

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

Definition at line 90 of file FWBoolParameterSetter.cc.

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

91 {
92  assert(nullptr!=m_param);
93  assert(nullptr!=m_widget);
94  m_param->set(m_widget->IsOn());
95  update();
96 }
const FWBoolParameterSetter& FWBoolParameterSetter::operator= ( const FWBoolParameterSetter )
privatedelete
void FWBoolParameterSetter::setEnabled ( bool  x)
overridevirtual

Member Data Documentation

FWBoolParameter* FWBoolParameterSetter::m_param
private

Definition at line 54 of file FWBoolParameterSetter.h.

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

TGCheckButton* FWBoolParameterSetter::m_widget
private

Definition at line 55 of file FWBoolParameterSetter.h.

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