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
FWSummaryManager Class Reference

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

Public Member Functions

void colorsChanged ()
 
 FWSummaryManager (TGFrame *iParent, FWSelectionManager *, FWEventItemsManager *, FWGUIManager *, FWModelChangeManager *, FWColorManager *)
 
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 ()
 
 FWSummaryManager (const FWSummaryManager &)
 
void itemChanged (const FWEventItem *)
 
void itemDestroyed (const FWEventItem *)
 
void newItem (FWEventItem *iItem)
 
const FWSummaryManageroperator= (const FWSummaryManager &)
 
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 42 of file FWSummaryManager.h.

Constructor & Destructor Documentation

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

Definition at line 44 of file FWSummaryManager.cc.

References changesDone(), FWModelChangeManager::changeSignalsAreDone_, colorsChanged(), FWColorManager::colorsHaveChanged_, FWEventItemsManager::goingToClearItems_, FWModelChangeManager::itemsGoingToBeClearedSlot(), m_pack, newItem(), FWEventItemsManager::newItem_, removeAllItems(), selectionChanged(), and FWSelectionManager::selectionChanged_.

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

Definition at line 74 of file FWSummaryManager.cc.

75 {
76 }
FWSummaryManager::FWSummaryManager ( const FWSummaryManager )
private

Member Function Documentation

void FWSummaryManager::changesDone ( )
private

Definition at line 153 of file FWSummaryManager.cc.

References m_itemChanged, and m_pack.

Referenced by FWSummaryManager().

154 {
155  if(m_itemChanged) {
156  m_pack->Layout();
157  m_itemChanged=false;
158  }
159 }
TGCompositeFrame * m_pack
void FWSummaryManager::colorsChanged ( )

Definition at line 162 of file FWSummaryManager.cc.

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

Referenced by FWSummaryManager().

163 {
165 
167  m_pack->SetBackgroundColor(TGFrame::GetDefaultFrameBackground());
168  } else {
169  const unsigned int backgroundColor=0x2f2f2f;
170  m_pack->SetBackgroundColor(backgroundColor);
171  }
172  gClient->NeedRedraw(m_pack);
173  for(std::vector<FWCollectionSummaryWidget*>::iterator it = m_collectionWidgets.begin(),
174  itEnd = m_collectionWidgets.end();
175  it != itEnd;
176  ++it) {
177  if(0!=*it) {
178  (*it)->setBackgroundToWhite(backgroundIsWhite);
179  }
180  }
181 }
Bool_t isColorSetLight() const
std::vector< FWCollectionSummaryWidget * > m_collectionWidgets
FWColorManager * m_colorManager
TGCompositeFrame * m_pack
BackgroundColorIndex backgroundColorIndex() const
void FWSummaryManager::itemChanged ( const FWEventItem )
private

Definition at line 123 of file FWSummaryManager.cc.

References m_itemChanged.

Referenced by newItem().

124 {
125  m_itemChanged = true;
126 }
void FWSummaryManager::itemDestroyed ( const FWEventItem iItem)
private

Definition at line 112 of file FWSummaryManager.cc.

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

Referenced by newItem().

113 {
114  m_pack->HideFrame(m_collectionWidgets[iItem->id()]);
115  m_pack->RemoveFrame(m_collectionWidgets[iItem->id()]);
116  delete m_collectionWidgets[iItem->id()];
117  m_collectionWidgets[iItem->id()]=0;
118  m_pack->Layout();
119  gClient->NeedRedraw(m_pack);
120 }
std::vector< FWCollectionSummaryWidget * > m_collectionWidgets
TGCompositeFrame * m_pack
unsigned int id() const
Definition: FWEventItem.cc:494
void FWSummaryManager::newItem ( FWEventItem iItem)
private

Definition at line 94 of file FWSummaryManager.cc.

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

Referenced by FWSummaryManager().

95 {
96  TGLayoutHints* hints = new TGLayoutHints(kLHintsExpandX);
98  m_pack->AddFrame(lst, hints);
99  m_collectionWidgets.push_back(lst);
101  lst->setBackgroundToWhite(backgroundIsWhite);
102  iItem->goingToBeDestroyed_.connect(boost::bind(&FWSummaryManager::itemDestroyed,this,_1));
103  iItem->itemChanged_.connect(boost::bind(&FWSummaryManager::itemChanged,this,_1));
104  lst->Connect("requestForInfo(FWEventItem*)","FWSummaryManager",this,"requestForInfo(FWEventItem*)");
105  lst->Connect("requestForFilter(FWEventItem*)","FWSummaryManager",this,"requestForFilter(FWEventItem*)");
106  lst->Connect("requestForErrorInfo(FWEventItem*)","FWSummaryManager",this,"requestForError(FWEventItem*)");
107  lst->Connect("requestForController(FWEventItem*)","FWSummaryManager",this,"requestForController(FWEventItem*)");
108  lst->Connect("requestForModelContextMenu(Int_t,Int_t)","FWSummaryManager",this,"requestForSelectedModelContextMenu(Int_t,Int_t)");
109 }
std::vector< FWCollectionSummaryWidget * > m_collectionWidgets
FWItemChangeSignal goingToBeDestroyed_
Definition: FWEventItem.h:215
FWColorManager * m_colorManager
int lst[30]
TGCompositeFrame * m_pack
void itemChanged(const FWEventItem *)
BackgroundColorIndex backgroundColorIndex() const
FWItemChangeSignal itemChanged_
Definition: FWEventItem.h:199
void itemDestroyed(const FWEventItem *)
const FWSummaryManager& FWSummaryManager::operator= ( const FWSummaryManager )
private
void FWSummaryManager::removeAllItems ( )
private

Definition at line 129 of file FWSummaryManager.cc.

References m_collectionWidgets, and m_pack.

Referenced by FWSummaryManager().

130 {
131  for(std::vector<FWCollectionSummaryWidget*>::iterator it = m_collectionWidgets.begin(),
132  itEnd = m_collectionWidgets.end();
133  it != itEnd;
134  ++it) {
135  if(0!=*it) {
136  m_pack->HideFrame(*it);
137  m_pack->RemoveFrame(*it);
138  delete *it;
139  *it=0;
140  }
141  }
142  m_collectionWidgets.clear();
143  m_pack->Layout();
144  gClient->NeedRedraw(m_pack);
145 }
std::vector< FWCollectionSummaryWidget * > m_collectionWidgets
TGCompositeFrame * m_pack
void FWSummaryManager::requestForController ( FWEventItem iItem)

Definition at line 200 of file FWSummaryManager.cc.

References m_guiManager, and FWGUIManager::showEDIFrame().

201 {
203 }
void showEDIFrame(int iInfoToShow=-1)
Allowed values are -1 or ones from FWDataCategories enum.
FWGUIManager * m_guiManager
void FWSummaryManager::requestForError ( FWEventItem iItem)

Definition at line 194 of file FWSummaryManager.cc.

References m_guiManager, and FWGUIManager::showEDIFrame().

195 {
197 }
void showEDIFrame(int iInfoToShow=-1)
Allowed values are -1 or ones from FWDataCategories enum.
FWGUIManager * m_guiManager
void FWSummaryManager::requestForFilter ( FWEventItem iItem)

Definition at line 189 of file FWSummaryManager.cc.

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

190 {
192 }
void showEDIFrame(int iInfoToShow=-1)
Allowed values are -1 or ones from FWDataCategories enum.
FWGUIManager * m_guiManager
void FWSummaryManager::requestForInfo ( FWEventItem iItem)

Definition at line 184 of file FWSummaryManager.cc.

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

185 {
187 }
void showEDIFrame(int iInfoToShow=-1)
Allowed values are -1 or ones from FWDataCategories enum.
FWGUIManager * m_guiManager
void FWSummaryManager::requestForSelectedModelContextMenu ( Int_t  iGlobalX,
Int_t  iGlobalY 
)

Definition at line 206 of file FWSummaryManager.cc.

References m_guiManager, and FWGUIManager::showSelectedModelContextMenu().

207 {
208  m_guiManager->showSelectedModelContextMenu(iGlobalX,iGlobalY,0);
209 }
void showSelectedModelContextMenu(Int_t iGlobalX, Int_t iGlobalY, FWViewContextMenuHandlerBase *iHandler)
FWGUIManager * m_guiManager
void FWSummaryManager::selectionChanged ( const FWSelectionManager iSM)
private

Definition at line 148 of file FWSummaryManager.cc.

Referenced by FWSummaryManager().

149 {
150 }
TGCompositeFrame * FWSummaryManager::widget ( ) const

Member Data Documentation

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

Definition at line 84 of file FWSummaryManager.h.

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

FWColorManager* FWSummaryManager::m_colorManager
private

Definition at line 86 of file FWSummaryManager.h.

Referenced by colorsChanged(), and newItem().

FWGUIManager* FWSummaryManager::m_guiManager
private
bool FWSummaryManager::m_itemChanged
private

Definition at line 87 of file FWSummaryManager.h.

Referenced by changesDone(), and itemChanged().

TGCompositeFrame* FWSummaryManager::m_pack
private