CMS 3D CMS Logo

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

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

Inheritance diagram for CSGActionSupervisor:
CmsShowMainFrame FWConvTrackHitsDetailView FWPFCandidateDetailView FWTrackHitsDetailView

Public Member Functions

Bool_t activateMenuEntry (int entry)
 
Bool_t activateToolBarEntry (int entry)
 
void addToActionMap (CSGAction *action)
 
 CSGActionSupervisor ()
 
virtual void defaultAction ()
 
virtual void enableActions (bool enable=true)
 
CSGActiongetAction (const std::string &name)
 
const std::vector< CSGAction * > & getListOfActions () const
 
Long_t getToolTipDelay () const
 
virtual void HandleMenu (Int_t id)
 
void resizeMenu (TGPopupMenu *menu)
 
virtual ~CSGActionSupervisor ()
 

Protected Attributes

std::vector< CSGAction * > m_actionList
 

Private Member Functions

 CSGActionSupervisor (const CSGActionSupervisor &)
 
const CSGActionSupervisoroperator= (const CSGActionSupervisor &)
 

Private Attributes

Long_t m_tooltipDelay
 

Detailed Description

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

Usage: <usage>

Definition at line 27 of file CSGActionSupervisor.h.

Constructor & Destructor Documentation

CSGActionSupervisor::CSGActionSupervisor ( )

Definition at line 20 of file CSGActionSupervisor.cc.

20  :
22 {
23 }
CSGActionSupervisor::~CSGActionSupervisor ( )
virtual

Definition at line 25 of file CSGActionSupervisor.cc.

References m_actionList.

26 {
27  for(std::vector<CSGAction*>::iterator it= m_actionList.begin(),itEnd = m_actionList.end();
28  it != itEnd;
29  ++it) {
30  delete *it;
31  }
32 }
std::vector< CSGAction * > m_actionList
CSGActionSupervisor::CSGActionSupervisor ( const CSGActionSupervisor )
private

Member Function Documentation

Bool_t CSGActionSupervisor::activateMenuEntry ( int  entry)

Definition at line 72 of file CSGActionSupervisor.cc.

References m_actionList.

72  {
73  std::vector<CSGAction*>::iterator it_act;
74  for (it_act = m_actionList.begin(); it_act != m_actionList.end(); ++it_act) {
75  if (entry == (*it_act)->getMenuEntry()) {
76  (*it_act)->activated.emit();
77  return kTRUE;
78  }
79  }
80  return kFALSE;
81 }
std::vector< CSGAction * > m_actionList
list entry
Definition: mps_splice.py:62
Bool_t CSGActionSupervisor::activateToolBarEntry ( int  entry)

Definition at line 83 of file CSGActionSupervisor.cc.

References mps_splice::entry, and m_actionList.

Referenced by CSGConnector::handleToolBar().

83  {
84  std::vector<CSGAction*>::iterator it_act;
85  for (it_act = m_actionList.begin(); it_act != m_actionList.end(); ++it_act) {
86  if ((*it_act)->getToolBarData() && (*it_act)->getToolBarData()->fId == entry) {
87  (*it_act)->activated.emit();
88  return kTRUE;
89  }
90  }
91  return kFALSE;
92 }
std::vector< CSGAction * > m_actionList
list entry
Definition: mps_splice.py:62
void CSGActionSupervisor::addToActionMap ( CSGAction action)

Definition at line 46 of file CSGActionSupervisor.cc.

References m_actionList.

Referenced by CSGAction::CSGAction().

46  {
47  m_actionList.push_back(action);
48 }
std::vector< CSGAction * > m_actionList
void CSGActionSupervisor::defaultAction ( )
virtual

Definition at line 55 of file CSGActionSupervisor.cc.

References fwLog, and fwlog::kInfo.

56 {
57  fwLog(fwlog::kInfo) << "Default action.\n";
58 }
#define fwLog(_level_)
Definition: fwLog.h:50
void CSGActionSupervisor::enableActions ( bool  enable = true)
virtual

Reimplemented in CmsShowMainFrame.

Definition at line 61 of file CSGActionSupervisor.cc.

References m_actionList.

Referenced by CmsShowMainFrame::enableActions().

62 {
63  std::vector<CSGAction*>::iterator it_act;
64  for (it_act = m_actionList.begin(); it_act != m_actionList.end(); ++it_act) {
65  if (enable)
66  (*it_act)->globalEnable();
67  else
68  (*it_act)->globalDisable();
69  }
70 }
std::vector< CSGAction * > m_actionList
CSGAction * CSGActionSupervisor::getAction ( const std::string &  name)

Definition at line 35 of file CSGActionSupervisor.cc.

References fwLog, fwlog::kWarning, m_actionList, and mergeVDriftHistosByStation::name.

Referenced by CmsShowMainFrame::CloseWindow(), FWGUIManager::getAction(), and CmsShowMainFrame::quit().

36 {
37  std::vector<CSGAction*>::iterator it_act;
38  for (it_act = m_actionList.begin(); it_act != m_actionList.end(); ++it_act) {
39  if ((*it_act)->getName() == name)
40  return *it_act;
41  }
42  fwLog(fwlog::kWarning) << "No action is found with name " << name.c_str() << std::endl;
43  return 0;
44 }
std::vector< CSGAction * > m_actionList
#define fwLog(_level_)
Definition: fwLog.h:50
const std::vector< CSGAction * > & CSGActionSupervisor::getListOfActions ( ) const

Definition at line 50 of file CSGActionSupervisor.cc.

References m_actionList.

Referenced by CSGAction::CSGAction(), and CmsShowMainFrame::HandleKey().

50  {
51  return m_actionList;
52 }
std::vector< CSGAction * > m_actionList
Long_t CSGActionSupervisor::getToolTipDelay ( ) const
void CSGActionSupervisor::HandleMenu ( Int_t  id)
virtual

Reimplemented in CmsShowMainFrame.

Definition at line 94 of file CSGActionSupervisor.cc.

94  {
95 }
const CSGActionSupervisor& CSGActionSupervisor::operator= ( const CSGActionSupervisor )
private
void CSGActionSupervisor::resizeMenu ( TGPopupMenu *  menu)

Definition at line 97 of file CSGActionSupervisor.cc.

References m_actionList.

Referenced by CSGAction::addSCToMenu().

97  {
98  std::vector<CSGAction*>::iterator it_act;
99  for (it_act = m_actionList.begin(); it_act != m_actionList.end(); ++it_act) {
100  if ((*it_act)->getMenu() == menu && (*it_act)->getKeycode() != 0) {
101  (*it_act)->resizeMenuEntry();
102  }
103  }
104 }
std::vector< CSGAction * > m_actionList

Member Data Documentation

std::vector<CSGAction*> CSGActionSupervisor::m_actionList
protected
Long_t CSGActionSupervisor::m_tooltipDelay
private

Definition at line 58 of file CSGActionSupervisor.h.

Referenced by getToolTipDelay().