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 41 of file FWSummaryManager.h.

Constructor & Destructor Documentation

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 FWSelectionManager::selectionChanged_.

49  :
50  m_guiManager(gm),
51  m_colorManager(colorm),
52 m_itemChanged(false)
53 {
54  colorm->colorsHaveChanged_.connect(boost::bind(&FWSummaryManager::colorsChanged,this));
55  sm->selectionChanged_.connect(boost::bind(&FWSummaryManager::selectionChanged,this,_1));
56  eim->newItem_.connect(boost::bind(&FWSummaryManager::newItem,
57  this, _1) );
58  eim->goingToClearItems_.connect(boost::bind(&FWSummaryManager::removeAllItems, this));
60 
61  m_pack = new TGVerticalFrame(iParent);
62  m_pack->SetLayoutManager( new FWCompactVerticalLayout(m_pack));
63  const unsigned int backgroundColor=0x2f2f2f;
64  m_pack->SetBackgroundColor(backgroundColor);
65  cm->changeSignalsAreDone_.connect(boost::bind(&FWSummaryManager::changesDone,this));
66 }
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 73 of file FWSummaryManager.cc.

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

Member Function Documentation

void FWSummaryManager::changesDone ( )
private

Definition at line 152 of file FWSummaryManager.cc.

References m_itemChanged, and m_pack.

Referenced by FWSummaryManager().

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

Definition at line 161 of file FWSummaryManager.cc.

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

Referenced by FWSummaryManager().

162 {
164 
166  m_pack->SetBackgroundColor(TGFrame::GetDefaultFrameBackground());
167  } else {
168  const unsigned int backgroundColor=0x2f2f2f;
169  m_pack->SetBackgroundColor(backgroundColor);
170  }
171  gClient->NeedRedraw(m_pack);
172  for(std::vector<FWCollectionSummaryWidget*>::iterator it = m_collectionWidgets.begin(),
173  itEnd = m_collectionWidgets.end();
174  it != itEnd;
175  ++it) {
176  if(0!=*it) {
177  (*it)->setBackgroundToWhite(backgroundIsWhite);
178  }
179  }
180 }
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 122 of file FWSummaryManager.cc.

References m_itemChanged.

Referenced by newItem().

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

Definition at line 111 of file FWSummaryManager.cc.

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

Referenced by newItem().

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

Definition at line 93 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().

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

Definition at line 128 of file FWSummaryManager.cc.

References m_collectionWidgets, and m_pack.

Referenced by FWSummaryManager().

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

Definition at line 199 of file FWSummaryManager.cc.

References m_guiManager, and FWGUIManager::showEDIFrame().

200 {
202 }
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 193 of file FWSummaryManager.cc.

References m_guiManager, and FWGUIManager::showEDIFrame().

194 {
196 }
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 188 of file FWSummaryManager.cc.

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

189 {
191 }
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 183 of file FWSummaryManager.cc.

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

184 {
186 }
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 205 of file FWSummaryManager.cc.

References m_guiManager, and FWGUIManager::showSelectedModelContextMenu().

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

Definition at line 147 of file FWSummaryManager.cc.

Referenced by FWSummaryManager().

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

Member Data Documentation

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

Definition at line 83 of file FWSummaryManager.h.

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

FWColorManager* FWSummaryManager::m_colorManager
private

Definition at line 85 of file FWSummaryManager.h.

Referenced by colorsChanged(), and newItem().

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

Definition at line 86 of file FWSummaryManager.h.

Referenced by changesDone(), and itemChanged().

TGCompositeFrame* FWSummaryManager::m_pack
private