CMS 3D CMS Logo

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 &)=delete
 
const CSGActionSupervisoroperator= (const CSGActionSupervisor &)=delete
 

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

CSGActionSupervisor::CSGActionSupervisor ( )

Definition at line 20 of file CSGActionSupervisor.cc.

20 : m_tooltipDelay(3) {}

◆ ~CSGActionSupervisor()

CSGActionSupervisor::~CSGActionSupervisor ( )
virtual

Definition at line 22 of file CSGActionSupervisor.cc.

22  {
23  for (std::vector<CSGAction*>::iterator it = m_actionList.begin(), itEnd = m_actionList.end(); it != itEnd; ++it) {
24  delete *it;
25  }
26 }

References m_actionList.

◆ CSGActionSupervisor() [2/2]

CSGActionSupervisor::CSGActionSupervisor ( const CSGActionSupervisor )
privatedelete

Member Function Documentation

◆ activateMenuEntry()

Bool_t CSGActionSupervisor::activateMenuEntry ( int  entry)

Definition at line 54 of file CSGActionSupervisor.cc.

54  {
55  std::vector<CSGAction*>::iterator it_act;
56  for (it_act = m_actionList.begin(); it_act != m_actionList.end(); ++it_act) {
57  if (entry == (*it_act)->getMenuEntry()) {
58  (*it_act)->activated.emit();
59  return kTRUE;
60  }
61  }
62  return kFALSE;
63 }

References mps_splice::entry, and m_actionList.

Referenced by CSGConnector::handleMenu().

◆ activateToolBarEntry()

Bool_t CSGActionSupervisor::activateToolBarEntry ( int  entry)

Definition at line 65 of file CSGActionSupervisor.cc.

65  {
66  std::vector<CSGAction*>::iterator it_act;
67  for (it_act = m_actionList.begin(); it_act != m_actionList.end(); ++it_act) {
68  if ((*it_act)->getToolBarData() && (*it_act)->getToolBarData()->fId == entry) {
69  (*it_act)->activated.emit();
70  return kTRUE;
71  }
72  }
73  return kFALSE;
74 }

References mps_splice::entry, and m_actionList.

Referenced by CSGConnector::handleToolBar().

◆ addToActionMap()

void CSGActionSupervisor::addToActionMap ( CSGAction action)

Definition at line 38 of file CSGActionSupervisor.cc.

38 { m_actionList.push_back(action); }

References writedatasetfile::action, and m_actionList.

Referenced by CSGAction::CSGAction().

◆ defaultAction()

void CSGActionSupervisor::defaultAction ( )
virtual

Definition at line 42 of file CSGActionSupervisor.cc.

42 { fwLog(fwlog::kInfo) << "Default action.\n"; }

References fwLog, and fwlog::kInfo.

◆ enableActions()

void CSGActionSupervisor::enableActions ( bool  enable = true)
virtual

Reimplemented in CmsShowMainFrame.

Definition at line 44 of file CSGActionSupervisor.cc.

44  {
45  std::vector<CSGAction*>::iterator it_act;
46  for (it_act = m_actionList.begin(); it_act != m_actionList.end(); ++it_act) {
47  if (enable)
48  (*it_act)->globalEnable();
49  else
50  (*it_act)->globalDisable();
51  }
52 }

References remoteMonitoring_LED_IterMethod_cfg::enable, and m_actionList.

Referenced by CmsShowMainFrame::enableActions().

◆ getAction()

CSGAction * CSGActionSupervisor::getAction ( const std::string &  name)

Definition at line 28 of file CSGActionSupervisor.cc.

28  {
29  std::vector<CSGAction*>::iterator it_act;
30  for (it_act = m_actionList.begin(); it_act != m_actionList.end(); ++it_act) {
31  if ((*it_act)->getName() == name)
32  return *it_act;
33  }
34  fwLog(fwlog::kWarning) << "No action is found with name " << name.c_str() << std::endl;
35  return nullptr;
36 }

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

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

◆ getListOfActions()

const std::vector< CSGAction * > & CSGActionSupervisor::getListOfActions ( ) const

Definition at line 40 of file CSGActionSupervisor.cc.

40 { return m_actionList; }

References m_actionList.

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

◆ getToolTipDelay()

Long_t CSGActionSupervisor::getToolTipDelay ( ) const

◆ HandleMenu()

void CSGActionSupervisor::HandleMenu ( Int_t  id)
virtual

Reimplemented in CmsShowMainFrame.

Definition at line 76 of file CSGActionSupervisor.cc.

76 {}

◆ operator=()

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

◆ resizeMenu()

void CSGActionSupervisor::resizeMenu ( TGPopupMenu *  menu)

Definition at line 78 of file CSGActionSupervisor.cc.

78  {
79  std::vector<CSGAction*>::iterator it_act;
80  for (it_act = m_actionList.begin(); it_act != m_actionList.end(); ++it_act) {
81  if ((*it_act)->getMenu() == menu && (*it_act)->getKeycode() != 0) {
82  (*it_act)->resizeMenuEntry();
83  }
84  }
85 }

References m_actionList, and optionsL1T::menu.

Referenced by CSGAction::addSCToMenu().

Member Data Documentation

◆ m_actionList

std::vector<CSGAction*> CSGActionSupervisor::m_actionList
protected

◆ m_tooltipDelay

Long_t CSGActionSupervisor::m_tooltipDelay
private

Definition at line 57 of file CSGActionSupervisor.h.

Referenced by getToolTipDelay().

fwLog
#define fwLog(_level_)
Definition: fwLog.h:45
remoteMonitoring_LED_IterMethod_cfg.enable
enable
Definition: remoteMonitoring_LED_IterMethod_cfg.py:423
mps_splice.entry
entry
Definition: mps_splice.py:68
optionsL1T.menu
menu
Definition: optionsL1T.py:29
writedatasetfile.action
action
Definition: writedatasetfile.py:8
fwlog::kWarning
Definition: fwLog.h:35
fwlog::kInfo
Definition: fwLog.h:35
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
CSGActionSupervisor::m_actionList
std::vector< CSGAction * > m_actionList
Definition: CSGActionSupervisor.h:49
CSGActionSupervisor::m_tooltipDelay
Long_t m_tooltipDelay
Definition: CSGActionSupervisor.h:57