CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
FWSummaryManager Class Reference

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

Public Member Functions

void colorsChanged ()
 
 FWSummaryManager (TGFrame *iParent, FWSelectionManager *, FWEventItemsManager *, FWGUIManager *, FWModelChangeManager *, FWColorManager *)
 
 FWSummaryManager (const FWSummaryManager &)=delete
 
const FWSummaryManageroperator= (const FWSummaryManager &)=delete
 
void requestForController (FWEventItem *)
 
void requestForError (FWEventItem *)
 
void requestForFilter (FWEventItem *)
 
void requestForInfo (FWEventItem *)
 
void requestForSelectedModelContextMenu (Int_t iGlobalX, Int_t iGlobalY)
 
TGCompositeFrame * widget () const
 
virtual ~FWSummaryManager ()
 

Private Member Functions

void changesDone ()
 
void itemChanged (const FWEventItem *)
 
void itemDestroyed (const FWEventItem *)
 
void newItem (FWEventItem *iItem)
 
void removeAllItems ()
 
void selectionChanged (const FWSelectionManager &)
 

Private Attributes

std::vector< FWCollectionSummaryWidget * > m_collectionWidgets
 
FWColorManagerm_colorManager
 
FWGUIManagerm_guiManager
 
bool m_itemChanged
 
TGCompositeFrame * m_pack
 

Detailed Description

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

Usage: <usage>

Definition at line 41 of file FWSummaryManager.h.

Constructor & Destructor Documentation

◆ FWSummaryManager() [1/2]

FWSummaryManager::FWSummaryManager ( TGFrame *  iParent,
FWSelectionManager sm,
FWEventItemsManager eim,
FWGUIManager gm,
FWModelChangeManager cm,
FWColorManager colorm 
)

Definition at line 43 of file FWSummaryManager.cc.

References changesDone(), FWModelChangeManager::changeSignalsAreDone_, colorsChanged(), FWColorManager::colorsHaveChanged_, FWEventItemsManager::goingToClearItems_, FWModelChangeManager::itemsGoingToBeClearedSlot(), m_pack, newItem(), FWEventItemsManager::newItem_, removeAllItems(), selectionChanged(), and ALPAKA_ACCELERATOR_NAMESPACE::ecal::reconstruction::internal::barrel::sm().

49  : m_guiManager(gm), m_colorManager(colorm), m_itemChanged(false) {
50  colorm->colorsHaveChanged_.connect(std::bind(&FWSummaryManager::colorsChanged, this));
51  sm->selectionChanged_.connect(std::bind(&FWSummaryManager::selectionChanged, this, std::placeholders::_1));
52  eim->newItem_.connect(std::bind(&FWSummaryManager::newItem, this, std::placeholders::_1));
53  eim->goingToClearItems_.connect(std::bind(&FWSummaryManager::removeAllItems, this));
55 
56  m_pack = new TGVerticalFrame(iParent);
57  m_pack->SetLayoutManager(new FWCompactVerticalLayout(m_pack));
58  const unsigned int backgroundColor = 0x2f2f2f;
59  m_pack->SetBackgroundColor(backgroundColor);
60  cm->changeSignalsAreDone_.connect(std::bind(&FWSummaryManager::changesDone, this));
61 }
sigc::signal< void(FWEventItem *)> newItem_
FWColorManager * m_colorManager
TGCompositeFrame * m_pack
sigc::signal< void()> changeSignalsAreDone_
void selectionChanged(const FWSelectionManager &)
void newItem(FWEventItem *iItem)
sigc::signal< void()> colorsHaveChanged_
sigc::signal< void()> goingToClearItems_
FWGUIManager * m_guiManager

◆ ~FWSummaryManager()

FWSummaryManager::~FWSummaryManager ( )
virtual

Definition at line 68 of file FWSummaryManager.cc.

68 {}

◆ FWSummaryManager() [2/2]

FWSummaryManager::FWSummaryManager ( const FWSummaryManager )
delete

Member Function Documentation

◆ changesDone()

void FWSummaryManager::changesDone ( )
private

Definition at line 134 of file FWSummaryManager.cc.

References m_itemChanged, and m_pack.

Referenced by FWSummaryManager().

134  {
135  if (m_itemChanged) {
136  m_pack->Layout();
137  m_itemChanged = false;
138  }
139 }
TGCompositeFrame * m_pack

◆ colorsChanged()

void FWSummaryManager::colorsChanged ( )

Definition at line 141 of file FWSummaryManager.cc.

References FWColorManager::backgroundColorIndex(), FWColorManager::isColorSetLight(), ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, FWColorManager::kWhiteIndex, m_collectionWidgets, m_colorManager, and m_pack.

Referenced by FWSummaryManager().

141  {
142  bool backgroundIsWhite = m_colorManager->backgroundColorIndex() == FWColorManager::kWhiteIndex;
143 
145  m_pack->SetBackgroundColor(TGFrame::GetDefaultFrameBackground());
146  } else {
147  const unsigned int backgroundColor = 0x2f2f2f;
148  m_pack->SetBackgroundColor(backgroundColor);
149  }
150  gClient->NeedRedraw(m_pack);
151  for (std::vector<FWCollectionSummaryWidget*>::iterator it = m_collectionWidgets.begin(),
152  itEnd = m_collectionWidgets.end();
153  it != itEnd;
154  ++it) {
155  if (nullptr != *it) {
156  (*it)->setBackgroundToWhite(backgroundIsWhite);
157  }
158  }
159 }
std::vector< FWCollectionSummaryWidget * > m_collectionWidgets
FWColorManager * m_colorManager
TGCompositeFrame * m_pack
BackgroundColorIndex backgroundColorIndex() const
Bool_t isColorSetLight() const

◆ itemChanged()

void FWSummaryManager::itemChanged ( const FWEventItem )
private

Definition at line 113 of file FWSummaryManager.cc.

References m_itemChanged.

Referenced by newItem().

113 { m_itemChanged = true; }

◆ itemDestroyed()

void FWSummaryManager::itemDestroyed ( const FWEventItem iItem)
private

Definition at line 104 of file FWSummaryManager.cc.

References FWEventItem::id(), m_collectionWidgets, and m_pack.

Referenced by newItem().

104  {
105  m_pack->HideFrame(m_collectionWidgets[iItem->id()]);
106  m_pack->RemoveFrame(m_collectionWidgets[iItem->id()]);
107  delete m_collectionWidgets[iItem->id()];
108  m_collectionWidgets[iItem->id()] = nullptr;
109  m_pack->Layout();
110  gClient->NeedRedraw(m_pack);
111 }
std::vector< FWCollectionSummaryWidget * > m_collectionWidgets
unsigned int id() const
Definition: FWEventItem.cc:433
TGCompositeFrame * m_pack

◆ newItem()

void FWSummaryManager::newItem ( FWEventItem iItem)
private

Definition at line 85 of file FWSummaryManager.cc.

References FWColorManager::backgroundColorIndex(), FWEventItem::goingToBeDestroyed_, itemChanged(), FWEventItem::itemChanged_, itemDestroyed(), FWColorManager::kWhiteIndex, m_collectionWidgets, m_colorManager, and m_pack.

Referenced by FWSummaryManager().

85  {
86  TGLayoutHints* hints = new TGLayoutHints(kLHintsExpandX);
88  m_pack->AddFrame(lst, hints);
89  m_collectionWidgets.push_back(lst);
91  lst->setBackgroundToWhite(backgroundIsWhite);
92  iItem->goingToBeDestroyed_.connect(std::bind(&FWSummaryManager::itemDestroyed, this, std::placeholders::_1));
93  iItem->itemChanged_.connect(std::bind(&FWSummaryManager::itemChanged, this, std::placeholders::_1));
94  lst->Connect("requestForInfo(FWEventItem*)", "FWSummaryManager", this, "requestForInfo(FWEventItem*)");
95  lst->Connect("requestForFilter(FWEventItem*)", "FWSummaryManager", this, "requestForFilter(FWEventItem*)");
96  lst->Connect("requestForErrorInfo(FWEventItem*)", "FWSummaryManager", this, "requestForError(FWEventItem*)");
97  lst->Connect("requestForController(FWEventItem*)", "FWSummaryManager", this, "requestForController(FWEventItem*)");
98  lst->Connect("requestForModelContextMenu(Int_t,Int_t)",
99  "FWSummaryManager",
100  this,
101  "requestForSelectedModelContextMenu(Int_t,Int_t)");
102 }
std::vector< FWCollectionSummaryWidget * > m_collectionWidgets
Definition: Common.h:15
FWItemChangeSignal goingToBeDestroyed_
Definition: FWEventItem.h:197
FWColorManager * m_colorManager
TGCompositeFrame * m_pack
void itemChanged(const FWEventItem *)
BackgroundColorIndex backgroundColorIndex() const
FWItemChangeSignal itemChanged_
Definition: FWEventItem.h:181
void itemDestroyed(const FWEventItem *)

◆ operator=()

const FWSummaryManager& FWSummaryManager::operator= ( const FWSummaryManager )
delete

◆ removeAllItems()

void FWSummaryManager::removeAllItems ( )
private

Definition at line 115 of file FWSummaryManager.cc.

References ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, m_collectionWidgets, and m_pack.

Referenced by FWSummaryManager().

115  {
116  for (std::vector<FWCollectionSummaryWidget*>::iterator it = m_collectionWidgets.begin(),
117  itEnd = m_collectionWidgets.end();
118  it != itEnd;
119  ++it) {
120  if (nullptr != *it) {
121  m_pack->HideFrame(*it);
122  m_pack->RemoveFrame(*it);
123  delete *it;
124  *it = nullptr;
125  }
126  }
127  m_collectionWidgets.clear();
128  m_pack->Layout();
129  gClient->NeedRedraw(m_pack);
130 }
std::vector< FWCollectionSummaryWidget * > m_collectionWidgets
TGCompositeFrame * m_pack

◆ requestForController()

void FWSummaryManager::requestForController ( FWEventItem iItem)

Definition at line 165 of file FWSummaryManager.cc.

References m_guiManager, and FWGUIManager::showEDIFrame().

void showEDIFrame(int iInfoToShow=-1)
Allowed values are -1 or ones from FWDataCategories enum.
FWGUIManager * m_guiManager

◆ requestForError()

void FWSummaryManager::requestForError ( FWEventItem iItem)

Definition at line 163 of file FWSummaryManager.cc.

References m_guiManager, and FWGUIManager::showEDIFrame().

void showEDIFrame(int iInfoToShow=-1)
Allowed values are -1 or ones from FWDataCategories enum.
FWGUIManager * m_guiManager

◆ requestForFilter()

void FWSummaryManager::requestForFilter ( FWEventItem iItem)

Definition at line 162 of file FWSummaryManager.cc.

References kFilter, m_guiManager, and FWGUIManager::showEDIFrame().

void showEDIFrame(int iInfoToShow=-1)
Allowed values are -1 or ones from FWDataCategories enum.
FWGUIManager * m_guiManager

◆ requestForInfo()

void FWSummaryManager::requestForInfo ( FWEventItem iItem)

Definition at line 161 of file FWSummaryManager.cc.

References kData, m_guiManager, and FWGUIManager::showEDIFrame().

void showEDIFrame(int iInfoToShow=-1)
Allowed values are -1 or ones from FWDataCategories enum.
FWGUIManager * m_guiManager

◆ requestForSelectedModelContextMenu()

void FWSummaryManager::requestForSelectedModelContextMenu ( Int_t  iGlobalX,
Int_t  iGlobalY 
)

Definition at line 167 of file FWSummaryManager.cc.

References m_guiManager, and FWGUIManager::showSelectedModelContextMenu().

167  {
168  m_guiManager->showSelectedModelContextMenu(iGlobalX, iGlobalY, nullptr);
169 }
void showSelectedModelContextMenu(Int_t iGlobalX, Int_t iGlobalY, FWViewContextMenuHandlerBase *iHandler)
FWGUIManager * m_guiManager

◆ selectionChanged()

void FWSummaryManager::selectionChanged ( const FWSelectionManager iSM)
private

Definition at line 132 of file FWSummaryManager.cc.

Referenced by FWSummaryManager().

132 {}

◆ widget()

TGCompositeFrame * FWSummaryManager::widget ( ) const

Definition at line 174 of file FWSummaryManager.cc.

References m_pack.

Referenced by FWGUIManager::createList().

174 { return m_pack; }
TGCompositeFrame * m_pack

Member Data Documentation

◆ m_collectionWidgets

std::vector<FWCollectionSummaryWidget*> FWSummaryManager::m_collectionWidgets
private

Definition at line 81 of file FWSummaryManager.h.

Referenced by colorsChanged(), itemDestroyed(), newItem(), and removeAllItems().

◆ m_colorManager

FWColorManager* FWSummaryManager::m_colorManager
private

Definition at line 83 of file FWSummaryManager.h.

Referenced by colorsChanged(), and newItem().

◆ m_guiManager

FWGUIManager* FWSummaryManager::m_guiManager
private

◆ m_itemChanged

bool FWSummaryManager::m_itemChanged
private

Definition at line 84 of file FWSummaryManager.h.

Referenced by changesDone(), and itemChanged().

◆ m_pack

TGCompositeFrame* FWSummaryManager::m_pack
private