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() [1/2]

FWBoolParameterSetter::FWBoolParameterSetter ( )

Definition at line 33 of file FWBoolParameterSetter.cc.

33 : m_param(nullptr), m_widget(nullptr) {}

◆ ~FWBoolParameterSetter()

FWBoolParameterSetter::~FWBoolParameterSetter ( )
override

Definition at line 40 of file FWBoolParameterSetter.cc.

40 {}

◆ FWBoolParameterSetter() [2/2]

FWBoolParameterSetter::FWBoolParameterSetter ( const FWBoolParameterSetter )
privatedelete

Member Function Documentation

◆ attach()

void FWBoolParameterSetter::attach ( FWParameterBase iParam)
overridevirtual

Implements FWParameterSetterBase.

Definition at line 58 of file FWBoolParameterSetter.cc.

58  {
59  m_param = dynamic_cast<FWBoolParameter*>(iParam);
60  assert(nullptr != m_param);
61 }

References cms::cuda::assert(), and m_param.

◆ build()

TGFrame * FWBoolParameterSetter::build ( TGFrame *  iParent,
bool  labelBack = true 
)
overridevirtual

Implements FWParameterSetterBase.

Definition at line 63 of file FWBoolParameterSetter.cc.

63  {
64  TGCompositeFrame* frame = new TGHorizontalFrame(iParent);
65 
66  m_widget = new TGCheckButton(frame, m_param->name().c_str(), 0);
67  m_widget->SetState(m_param->value() ? kButtonDown : kButtonUp);
68  m_widget->Connect("Clicked()", "FWBoolParameterSetter", this, "doUpdate()");
69  frame->AddFrame(m_widget, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 0, 1, 1));
70  return frame;
71 }

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

◆ doUpdate()

void FWBoolParameterSetter::doUpdate ( )

Definition at line 75 of file FWBoolParameterSetter.cc.

75  {
76  assert(nullptr != m_param);
77  assert(nullptr != m_widget);
78  m_param->set(m_widget->IsOn());
79  update();
80 }

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

◆ operator=()

const FWBoolParameterSetter& FWBoolParameterSetter::operator= ( const FWBoolParameterSetter )
privatedelete

◆ setEnabled()

void FWBoolParameterSetter::setEnabled ( bool  x)
overridevirtual

Reimplemented from FWParameterSetterBase.

Definition at line 73 of file FWBoolParameterSetter.cc.

73 { m_widget->SetEnabled(x); }

References m_widget, and x.

Member Data Documentation

◆ m_param

FWBoolParameter* FWBoolParameterSetter::m_param
private

Definition at line 52 of file FWBoolParameterSetter.h.

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

◆ m_widget

TGCheckButton* FWBoolParameterSetter::m_widget
private

Definition at line 53 of file FWBoolParameterSetter.h.

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

FWBoolParameterSetter::m_widget
TGCheckButton * m_widget
Definition: FWBoolParameterSetter.h:53
FWBoolParameterSetter::m_param
FWBoolParameter * m_param
Definition: FWBoolParameterSetter.h:52
cms::cuda::assert
assert(be >=bs)
FWGenericParameter::set
void set(T iValue)
Definition: FWGenericParameter.h:70
DDAxes::x
FWParameterSetterBase::update
void update() const
Definition: FWParameterSetterBase.cc:74
FWParameterBase::name
const std::string & name() const
Definition: FWParameterBase.h:39
FWGenericParameter::value
T value() const
Definition: FWGenericParameter.h:50
FWParameterSetterBase::frame
FWParameterSetterEditorBase * frame() const
Definition: FWParameterSetterBase.h:51