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 37 of file FWViewEnergyScaleEditor.h.

Constructor & Destructor Documentation

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

Definition at line 35 of file FWViewEnergyScaleEditor.cc.

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

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

Definition at line 48 of file FWViewEnergyScaleEditor.cc.

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

Member Function Documentation

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

Definition at line 68 of file FWViewEnergyScaleEditor.cc.

References m_setters, and FWParameterSetterBase::makeSetterFor().

Referenced by FWViewEnergyScaleEditor().

69 {
70  int leftPad = 0;
71  if (title)
72  {
73  leftPad = 10;
74  AddFrame(new TGLabel(this, title), new TGLayoutHints(kLHintsLeft, leftPad, 0, 0, 0));
75  leftPad *= 2;
76  }
77 
78  boost::shared_ptr<FWParameterSetterBase> ptr( FWParameterSetterBase::makeSetterFor(param) );
79  ptr->attach((FWParameterBase*)param, this);
80  TGFrame* pframe = ptr->build(this);
81  AddFrame(pframe, new TGLayoutHints(kLHintsLeft, leftPad, 0, 0, 0));
82  m_setters.push_back(ptr);
83 }
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 57 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().

58 {
59  m_enabled =x;
60  typedef std::vector<boost::shared_ptr<FWParameterSetterBase> > sList;
61  for (sList::iterator i = m_setters.begin(); i!=m_setters.end(); ++i)
62  {
63  (*i)->setEnabled(m_enabled);
64  }
65 }
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 61 of file FWViewEnergyScaleEditor.h.

Referenced by setEnabled().

FWViewEnergyScale* FWViewEnergyScaleEditor::m_scale
private

Definition at line 60 of file FWViewEnergyScaleEditor.h.

Referenced by FWViewEnergyScaleEditor().

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

Definition at line 64 of file FWViewEnergyScaleEditor.h.

Referenced by addParam(), and setEnabled().