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
FWViewEnergyScaleEditor Class Reference

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

Inheritance diagram for FWViewEnergyScaleEditor:
FWParameterSetterEditorBase

Public Member Functions

 ClassDef (FWViewEnergyScaleEditor, 0)
 
 FWViewEnergyScaleEditor (FWViewEnergyScale *s, TGCompositeFrame *w, bool addAutoScaleControll=true)
 
void setEnabled (bool)
 
virtual ~FWViewEnergyScaleEditor ()
 
- Public Member Functions inherited from FWParameterSetterEditorBase
 FWParameterSetterEditorBase ()
 
virtual void updateEditor ()
 
virtual ~FWParameterSetterEditorBase ()
 

Private Member Functions

void addParam (FWParameterBase *, const char *title=0)
 
 FWViewEnergyScaleEditor (const FWViewEnergyScaleEditor &)
 
const FWViewEnergyScaleEditoroperator= (const FWViewEnergyScaleEditor &)
 

Private Attributes

bool m_enabled
 
FWViewEnergyScalem_scale
 
std::vector< boost::shared_ptr
< FWParameterSetterBase > > 
m_setters
 

Detailed Description

Description: [one line class summary]

Usage: <usage>

Definition at line 38 of file FWViewEnergyScaleEditor.h.

Constructor & Destructor Documentation

FWViewEnergyScaleEditor::FWViewEnergyScaleEditor ( FWViewEnergyScale s,
TGCompositeFrame *  w,
bool  addAutoScaleControll = true 
)

Definition at line 36 of file FWViewEnergyScaleEditor.cc.

References addParam(), FWViewEnergyScale::m_fixedValToHeight, FWViewEnergyScale::m_maxTowerHeight, FWViewEnergyScale::m_plotEt, m_scale, and FWViewEnergyScale::m_scaleMode.

36  :
37  TGVerticalFrame(w),
38  m_scale(s),
39  m_enabled(true)
40 {
43  addParam(&m_scale->m_fixedValToHeight, "FixedScaleMode");
44  if (addAutoScaleControll)
45  addParam(&m_scale->m_maxTowerHeight, "AutomaticScaleMode");
46 }
FWDoubleParameter m_fixedValToHeight
FWBoolParameter m_plotEt
FWDoubleParameter m_maxTowerHeight
FWEnumParameter m_scaleMode
void addParam(FWParameterBase *, const char *title=0)
T w() const
FWViewEnergyScaleEditor::~FWViewEnergyScaleEditor ( )
virtual

Definition at line 49 of file FWViewEnergyScaleEditor.cc.

50 {
51 }
FWViewEnergyScaleEditor::FWViewEnergyScaleEditor ( const FWViewEnergyScaleEditor )
private

Member Function Documentation

void FWViewEnergyScaleEditor::addParam ( FWParameterBase param,
const char *  title = 0 
)
private

Definition at line 69 of file FWViewEnergyScaleEditor.cc.

References m_setters, and FWParameterSetterBase::makeSetterFor().

Referenced by FWViewEnergyScaleEditor().

70 {
71  int leftPad = 0;
72  if (title)
73  {
74  leftPad = 10;
75  AddFrame(new TGLabel(this, title), new TGLayoutHints(kLHintsLeft, leftPad, 0, 0, 0));
76  leftPad *= 2;
77  }
78 
79  boost::shared_ptr<FWParameterSetterBase> ptr( FWParameterSetterBase::makeSetterFor(param) );
80  ptr->attach((FWParameterBase*)param, this);
81  TGFrame* pframe = ptr->build(this);
82  AddFrame(pframe, new TGLayoutHints(kLHintsLeft, leftPad, 0, 0, 0));
83  m_setters.push_back(ptr);
84 }
static boost::shared_ptr< FWParameterSetterBase > makeSetterFor(FWParameterBase *)
std::vector< boost::shared_ptr< FWParameterSetterBase > > m_setters
FWViewEnergyScaleEditor::ClassDef ( FWViewEnergyScaleEditor  ,
 
)
const FWViewEnergyScaleEditor& FWViewEnergyScaleEditor::operator= ( const FWViewEnergyScaleEditor )
private
void FWViewEnergyScaleEditor::setEnabled ( bool  x)

Definition at line 58 of file FWViewEnergyScaleEditor.cc.

References i, m_enabled, m_setters, and x.

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

59 {
60  m_enabled =x;
61  typedef std::vector<boost::shared_ptr<FWParameterSetterBase> > sList;
62  for (sList::iterator i = m_setters.begin(); i!=m_setters.end(); ++i)
63  {
64  (*i)->setEnabled(m_enabled);
65  }
66 }
int i
Definition: DBlmapReader.cc:9
std::vector< boost::shared_ptr< FWParameterSetterBase > > m_setters
Definition: DDAxes.h:10

Member Data Documentation

bool FWViewEnergyScaleEditor::m_enabled
private

Definition at line 62 of file FWViewEnergyScaleEditor.h.

Referenced by setEnabled().

FWViewEnergyScale* FWViewEnergyScaleEditor::m_scale
private

Definition at line 61 of file FWViewEnergyScaleEditor.h.

Referenced by FWViewEnergyScaleEditor().

std::vector<boost::shared_ptr<FWParameterSetterBase> > FWViewEnergyScaleEditor::m_setters
private

Definition at line 65 of file FWViewEnergyScaleEditor.h.

Referenced by addParam(), and setEnabled().