CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Attributes | 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 ()
 
 CSGActionSupervisor (const CSGActionSupervisor &)=delete
 
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)
 
const CSGActionSupervisoroperator= (const CSGActionSupervisor &)=delete
 
void resizeMenu (TGPopupMenu *menu)
 
virtual ~CSGActionSupervisor ()
 

Protected Attributes

std::vector< CSGAction * > m_actionList
 

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.

◆ ~CSGActionSupervisor()

CSGActionSupervisor::~CSGActionSupervisor ( )
virtual

Definition at line 22 of file CSGActionSupervisor.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, and m_actionList.

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

◆ CSGActionSupervisor() [2/2]

CSGActionSupervisor::CSGActionSupervisor ( const CSGActionSupervisor )
delete

Member Function Documentation

◆ activateMenuEntry()

Bool_t CSGActionSupervisor::activateMenuEntry ( int  entry)

Definition at line 54 of file CSGActionSupervisor.cc.

References mps_splice::entry, and m_actionList.

Referenced by CSGConnector::handleMenu().

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 }
std::vector< CSGAction * > m_actionList

◆ activateToolBarEntry()

Bool_t CSGActionSupervisor::activateToolBarEntry ( int  entry)

Definition at line 65 of file CSGActionSupervisor.cc.

References mps_splice::entry, and m_actionList.

Referenced by CSGConnector::handleToolBar().

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 }
std::vector< CSGAction * > m_actionList

◆ addToActionMap()

void CSGActionSupervisor::addToActionMap ( CSGAction action)

Definition at line 38 of file CSGActionSupervisor.cc.

References writedatasetfile::action, and m_actionList.

Referenced by CSGAction::CSGAction().

38 { m_actionList.push_back(action); }
std::vector< CSGAction * > m_actionList

◆ defaultAction()

void CSGActionSupervisor::defaultAction ( )
virtual

Definition at line 42 of file CSGActionSupervisor.cc.

References fwLog, and fwlog::kInfo.

42 { fwLog(fwlog::kInfo) << "Default action.\n"; }
#define fwLog(_level_)
Definition: fwLog.h:45

◆ enableActions()

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

Reimplemented in CmsShowMainFrame.

Definition at line 44 of file CSGActionSupervisor.cc.

References DiMuonV_cfg::enable, and m_actionList.

Referenced by CmsShowMainFrame::enableActions().

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 }
std::vector< CSGAction * > m_actionList
enable
Messages.
Definition: DiMuonV_cfg.py:93

◆ getAction()

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

Definition at line 28 of file CSGActionSupervisor.cc.

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

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

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 }
std::vector< CSGAction * > m_actionList
#define fwLog(_level_)
Definition: fwLog.h:45

◆ getListOfActions()

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

Definition at line 40 of file CSGActionSupervisor.cc.

References m_actionList.

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

40 { return m_actionList; }
std::vector< CSGAction * > m_actionList

◆ 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 )
delete

◆ resizeMenu()

void CSGActionSupervisor::resizeMenu ( TGPopupMenu *  menu)

Definition at line 78 of file CSGActionSupervisor.cc.

References m_actionList, and relval_steps::menu.

Referenced by CSGAction::addSCToMenu().

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 }
std::vector< CSGAction * > m_actionList

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().