#include <Fireworks/Core/interface/FWGUIManager.h>
typedef std::map<std::string, ViewBuildFunctor > FWGUIManager::NameToViewBuilder |
Definition at line 101 of file FWGUIManager.h.
typedef boost::function2<FWViewBase*,TEveWindowSlot*, const std::string& > FWGUIManager::ViewBuildFunctor |
Definition at line 100 of file FWGUIManager.h.
typedef ViewMap_t::iterator FWGUIManager::ViewMap_i [private] |
Definition at line 104 of file FWGUIManager.h.
typedef std::map<TEveWindow*, FWViewBase*> FWGUIManager::ViewMap_t [private] |
Definition at line 103 of file FWGUIManager.h.
FWGUIManager::FWGUIManager | ( | fireworks::Context * | ctx, |
const FWViewManagerManager * | iVMMgr, | ||
FWNavigatorBase * | navigator | ||
) |
Definition at line 95 of file FWGUIManager.cc.
References alignCSCRings::action, CSGAction::activated, addData(), fireworks::Context::colorManager(), FWColorManager::colorsHaveChangedFinished_, createHelpGLPopup(), createHelpPopup(), CmsShowMainFrame::createNewViewerAction(), createShortcutPopup(), delaySliderChanged(), fireworks::Context::eventItemsManager(), exportImageOfMainView(), exportImagesOfAllViews(), finishUpColorChange(), getAction(), i, FWViewType::idToName(), FWViewType::kGlimpse, FWViewType::kLegoPFECAL, FWViewType::kTableHLT, FWViewType::kTypeSize, m_cmsShowMainFrame, m_context, m_contextMenuHandler, CmsShowMainFrame::m_delaySliderListener, m_detailViewManager, CmsShowMainFrame::m_eventEntry, CmsShowMainFrame::m_filterEnableBtn, CmsShowMainFrame::m_filterShowGUIBtn, m_guiManager, CmsShowMainFrame::m_lumiEntry, CmsShowMainFrame::m_runEntry, makeGUIsubview(), measureWMOffsets(), newItem(), FWEventItemsManager::newItem_, newViewSlot(), promptForLoadConfigurationFile(), promptForSaveConfigurationFile(), cmsshow::sBackgroundColor, fireworks::Context::selectionManager(), cmsshow::sExportAllImages, cmsshow::sExportImage, cmsshow::sHelp, cmsshow::sHelpGL, showCommonPopup(), showEDIFrame(), showInvMassDialog(), showModelPopup(), showViewPopup(), cmsshow::sKeyboardShort, cmsshow::sLoadConfig, cmsshow::sSaveConfig, cmsshow::sSaveConfigAs, cmsshow::sShowAddCollection, cmsshow::sShowCommonInsp, cmsshow::sShowEventDisplayInsp, cmsshow::sShowInvMassDialog, cmsshow::sShowMainViewCtl, cmsshow::sShowObjInsp, FWColorManager::switchBackground(), FWIntValueListener::valueChanged_, create_public_lumi_plots::width, and writeToPresentConfigurationFile_.
: m_context(ctx), m_summaryManager(0), m_detailViewManager(0), m_viewManagerManager(iVMMgr), m_contextMenuHandler(0), m_navigator(navigator), m_dataAdder(0), m_ediFrame(0), m_modelPopup(0), m_viewPopup(0), m_commonPopup(0), m_invMassDialog(0), m_helpPopup(0), m_shortcutPopup(0), m_helpGLPopup(0), m_tasks(new CmsShowTaskExecutor), m_WMOffsetX(0), m_WMOffsetY(0), m_WMDecorH(0) { m_guiManager = this; measureWMOffsets(); FWEventItemsManager* im = (FWEventItemsManager*) m_context->eventItemsManager(); im->newItem_.connect(boost::bind(&FWGUIManager::newItem, this, _1) ); m_context->colorManager()->colorsHaveChangedFinished_.connect(boost::bind(&FWGUIManager::finishUpColorChange,this)); TEveCompositeFrame::IconBarCreator_foo foo = &FWGUIManager::makeGUIsubview; TEveCompositeFrame::SetupFrameMarkup(foo, 20, 4, false); { //NOTE: by making sure we defaultly open to a fraction of the full screen size we avoid // causing the program to go into full screen mode under default SL4 window manager UInt_t width = gClient->GetDisplayWidth(); UInt_t height = static_cast<UInt_t>(gClient->GetDisplayHeight()*.8); //try to deal with multiple horizontally placed monitors. Since present monitors usually // have less than 2000 pixels horizontally, when we see more it is a good indicator that // we are dealing with more than one monitor. while(width > 2000) { width /= 2; } width = static_cast<UInt_t>(width*.8); m_cmsShowMainFrame = new CmsShowMainFrame(gClient->GetRoot(), width, height, this); m_cmsShowMainFrame->SetCleanup(kDeepCleanup); /* int mlist[FWViewType::kTypeSize] = {FWViewType::kRhoPhi, FWViewType::kRhoZ, FWViewType::k3D, FWViewType::kISpy, FWViewType::kLego, FWViewType::kLegoHF, FWViewType::kGlimpse, FWViewType::kTable, FWViewType::kTableL1, FWViewType::kTableHLT, FWViewType::kGeometryTable, FWViewType::kRhoPhiPF, FWViewType::kLegoPFECAL}; */ for (int i = 0 ; i < FWViewType::kTypeSize; ++i) { bool separator = (i == FWViewType::kGlimpse || i == FWViewType::kTableHLT || i == FWViewType::kLegoPFECAL); CSGAction* action = m_cmsShowMainFrame->createNewViewerAction(FWViewType::idToName(i), separator); action->activated.connect(boost::bind(&FWGUIManager::newViewSlot, this, FWViewType::idToName(i))); } m_detailViewManager = new FWDetailViewManager(m_context->colorManager()); m_contextMenuHandler = new FWModelContextMenuHandler(m_context->selectionManager(), m_detailViewManager, m_context->colorManager(), this); getAction(cmsshow::sExportImage)->activated.connect(sigc::mem_fun(*this, &FWGUIManager::exportImageOfMainView)); getAction(cmsshow::sExportAllImages)->activated.connect(sigc::mem_fun(*this, &FWGUIManager::exportImagesOfAllViews)); getAction(cmsshow::sLoadConfig)->activated.connect(sigc::mem_fun(*this, &FWGUIManager::promptForLoadConfigurationFile)); getAction(cmsshow::sSaveConfig)->activated.connect(writeToPresentConfigurationFile_); getAction(cmsshow::sSaveConfigAs)->activated.connect(sigc::mem_fun(*this,&FWGUIManager::promptForSaveConfigurationFile)); getAction(cmsshow::sShowEventDisplayInsp)->activated.connect(boost::bind( &FWGUIManager::showEDIFrame,this,-1)); getAction(cmsshow::sShowMainViewCtl)->activated.connect(sigc::mem_fun(*m_guiManager, &FWGUIManager::showViewPopup)); getAction(cmsshow::sShowObjInsp)->activated.connect(sigc::mem_fun(*m_guiManager, &FWGUIManager::showModelPopup)); getAction(cmsshow::sBackgroundColor)->activated.connect(sigc::mem_fun(m_context->colorManager(), &FWColorManager::switchBackground)); getAction(cmsshow::sShowCommonInsp)->activated.connect(sigc::mem_fun(*m_guiManager, &FWGUIManager::showCommonPopup)); getAction(cmsshow::sShowInvMassDialog)->activated.connect(sigc::mem_fun(*m_guiManager, &FWGUIManager::showInvMassDialog)); getAction(cmsshow::sShowAddCollection)->activated.connect(sigc::mem_fun(*m_guiManager, &FWGUIManager::addData)); assert(getAction(cmsshow::sHelp) != 0); getAction(cmsshow::sHelp)->activated.connect(sigc::mem_fun(*m_guiManager, &FWGUIManager::createHelpPopup)); assert(getAction(cmsshow::sKeyboardShort) != 0); getAction(cmsshow::sKeyboardShort)->activated.connect(sigc::mem_fun(*m_guiManager, &FWGUIManager::createShortcutPopup)); getAction(cmsshow::sHelpGL)->activated.connect(sigc::mem_fun(*m_guiManager, &FWGUIManager::createHelpGLPopup)); // toolbar special widget with non-void actions m_cmsShowMainFrame->m_delaySliderListener->valueChanged_.connect(boost::bind(&FWGUIManager::delaySliderChanged,this,_1)); TQObject::Connect(m_cmsShowMainFrame->m_runEntry, "ReturnPressed()", "FWGUIManager", this, "runIdChanged()"); TQObject::Connect(m_cmsShowMainFrame->m_lumiEntry, "ReturnPressed()", "FWGUIManager", this, "lumiIdChanged()"); TQObject::Connect(m_cmsShowMainFrame->m_eventEntry, "ReturnPressed()", "FWGUIManager", this, "eventIdChanged()"); TQObject::Connect(m_cmsShowMainFrame->m_filterShowGUIBtn, "Clicked()", "FWGUIManager", this, "showEventFilterGUI()"); TQObject::Connect(m_cmsShowMainFrame->m_filterEnableBtn, "Clicked()", "FWGUIManager", this, "filterButtonClicked()"); TQObject::Connect(gEve->GetWindowManager(), "WindowSelected(TEveWindow*)", "FWGUIManager", this, "checkSubviewAreaIconState(TEveWindow*)"); TQObject::Connect(gEve->GetWindowManager(), "WindowDocked(TEveWindow*)" , "FWGUIManager", this, "checkSubviewAreaIconState(TEveWindow*)"); TQObject::Connect(gEve->GetWindowManager(), "WindowUndocked(TEveWindow*)", "FWGUIManager", this, "checkSubviewAreaIconState(TEveWindow*)"); } }
FWGUIManager::~FWGUIManager | ( | ) | [virtual] |
Definition at line 212 of file FWGUIManager.cc.
References m_cmsShowMainFrame, m_contextMenuHandler, m_detailViewManager, m_ediFrame, m_invMassDialog, m_summaryManager, and m_viewPopup.
{ delete m_invMassDialog; delete m_summaryManager; delete m_detailViewManager; delete m_cmsShowMainFrame; delete m_viewPopup; delete m_ediFrame; delete m_contextMenuHandler; }
FWGUIManager::FWGUIManager | ( | const FWGUIManager & | ) | [private] |
void FWGUIManager::addData | ( | ) |
Definition at line 410 of file FWGUIManager.cc.
References fireworks::Context::eventItemsManager(), m_cmsShowMainFrame, m_context, m_dataAdder, fireworks::Context::metadataManager(), and FWGUIEventDataAdder::show().
Referenced by FWGUIManager().
{ if (0==m_dataAdder) { m_dataAdder = new FWGUIEventDataAdder(100,100, (FWEventItemsManager*) m_context->eventItemsManager(), m_cmsShowMainFrame, m_context->metadataManager()); } m_dataAdder->show(); }
void FWGUIManager::addTo | ( | FWConfiguration & | oTo | ) | const [virtual] |
Implements FWConfigurable.
Definition at line 1038 of file FWGUIManager.cc.
References addAreaInfoTo(), FWConfiguration::addKeyValue(), FWConfigurableParameterizable::addTo(), addWindowInfoTo(), CmsShowMainFrame::getSummaryViewWeight(), kCollectionController(), kCommonController(), kControllers(), kMainWindow(), kObjectController(), kViewArea(), kViewController(), kViews(), m_cmsShowMainFrame, m_commonPopup, m_ediFrame, m_modelPopup, m_viewMap, m_viewPopup, m_viewPrimPack, m_viewSecPack, createTree::pp, groupFilesInBlocks::temp, FWViewBase::typeName(), and FWConfigurableParameterizable::version().
{ Int_t cfgVersion=3; FWConfiguration mainWindow(cfgVersion); float leftWeight, rightWeight; addWindowInfoTo(m_cmsShowMainFrame, mainWindow); { // write summary view weight { std::stringstream ss; ss << m_cmsShowMainFrame->getSummaryViewWeight(); mainWindow.addKeyValue("summaryWeight",FWConfiguration(ss.str())); } // write proportions of horizontal pack (can be standalone item outside main frame) if ( m_viewPrimPack->GetPack()->GetList()->GetSize() > 2) { TGFrameElementPack *frameEL; frameEL = (TGFrameElementPack*) m_viewPrimPack->GetPack()->GetList()->At(1); // read every second element, first on is splitter leftWeight = frameEL->fWeight; frameEL = (TGFrameElementPack*) m_viewPrimPack->GetPack()->GetList()->At(3); rightWeight = frameEL->fWeight; } else { leftWeight = 0; rightWeight = 1; } std::stringstream sL; sL<<leftWeight; mainWindow.addKeyValue("leftWeight",FWConfiguration(sL.str())); std::stringstream sR; sR<<rightWeight; mainWindow.addKeyValue("rightWeight",FWConfiguration(sR.str())); } oTo.addKeyValue(kMainWindow, mainWindow, true); //------------------------------------------------------------ // organize info about all docked frames includding hidden, which point to undocked std::vector<areaInfo> wpacked; if (leftWeight > 0) { TGPack* pp = m_viewPrimPack->GetPack(); TGFrameElementPack *frameEL = (TGFrameElementPack*) pp->GetList()->At(1); if (frameEL->fWeight > 0) wpacked.push_back(areaInfo(frameEL)); } TGPack* sp = m_viewSecPack->GetPack(); TGFrameElementPack *seFE; TIter frame_iterator(sp->GetList()); while ((seFE = (TGFrameElementPack*)frame_iterator() )) { if (seFE->fWeight) wpacked.push_back(areaInfo(seFE)); } // undocked info for(ViewMap_i wIt = m_viewMap.begin(); wIt != m_viewMap.end(); ++wIt) { TEveWindow* ew = wIt->first; TEveCompositeFrameInMainFrame* mainFrame = dynamic_cast<TEveCompositeFrameInMainFrame*>(ew->GetEveFrame()); if (mainFrame) { for(std::vector<areaInfo>::iterator pIt = wpacked.begin(); pIt != wpacked.end(); ++pIt) { if ((*pIt).originalSlot && mainFrame->GetOriginalSlot() == (*pIt).originalSlot) { (*pIt).eveWindow = wIt->first; (*pIt).undockedMainFrame = (TGMainFrame*)mainFrame; // printf("found original slot for docked view %s\n", pInfo->viewBase->typeName().c_str()); break; }// found match } }// end main frames } //------------------------------------------------------------ // add sorted list in view area and FW-views configuration FWConfiguration views(1); FWConfiguration viewArea(cfgVersion); for(std::vector<areaInfo>::iterator it = wpacked.begin(); it != wpacked.end(); ++it) { TEveWindow* ew = (*it).eveWindow; if (ew) { FWViewBase* wb = m_viewMap[ew]; FWConfiguration tempWiew(wb->version()); wb->addTo(tempWiew); views.addKeyValue(wb->typeName(), tempWiew, true); FWConfiguration tempArea(cfgVersion); addAreaInfoTo((*it), tempArea); viewArea.addKeyValue(wb->typeName(), tempArea, true); } } oTo.addKeyValue(kViews, views, true); oTo.addKeyValue(kViewArea, viewArea, true); //------------------------------------------------------------ //Remember where controllers were placed if they are open FWConfiguration controllers(1); { if(0!=m_ediFrame && m_ediFrame->IsMapped()) { FWConfiguration temp(1); addWindowInfoTo(m_ediFrame, temp); controllers.addKeyValue(kCollectionController,temp,true); } if(0!=m_viewPopup && m_viewPopup->IsMapped()) { FWConfiguration temp(1); addWindowInfoTo(m_viewPopup, temp); controllers.addKeyValue(kViewController,temp,true); } if(0!=m_modelPopup && m_modelPopup->IsMapped()) { FWConfiguration temp(1); addWindowInfoTo(m_modelPopup, temp); controllers.addKeyValue(kObjectController,temp,true); } if(0!=m_commonPopup && m_commonPopup->IsMapped()) { FWConfiguration temp(1); addWindowInfoTo(m_commonPopup, temp); controllers.addKeyValue(kCommonController,temp,true); } } oTo.addKeyValue(kControllers,controllers,true); }
void FWGUIManager::checkSubviewAreaIconState | ( | TEveWindow * | ) |
Definition at line 472 of file FWGUIManager.cc.
References cond::rpcobimon::current, CmsShowViewPopup::getEveWindow(), getSwapCandidate(), FWGUISubviewArea::getToolBarFromWindow(), m_viewMap, m_viewPopup, CmsShowViewPopup::mapped(), FWGUISubviewArea::setInfoButton(), and FWGUISubviewArea::setSwapIcon().
Referenced by setFrom(), and subviewSwapped().
{ // First argumet is needed for signals/slot symetry // disable swap on the first left TEveCompositeFrame // check info button TEveWindow* current = getSwapCandidate(); bool checkInfoBtn = m_viewPopup ? m_viewPopup->mapped() : 0; TEveWindow* selected = m_viewPopup ? m_viewPopup->getEveWindow() : 0; for (ViewMap_i it = m_viewMap.begin(); it != m_viewMap.end(); it++) { FWGUISubviewArea* ar = FWGUISubviewArea::getToolBarFromWindow(it->first); ar->setSwapIcon(current != it->first); if (checkInfoBtn && selected) ar->setInfoButton(selected == it->first); } }
void FWGUIManager::clearStatus | ( | ) |
Definition at line 393 of file FWGUIManager.cc.
References CmsShowMainFrame::clearStatusBar(), and m_cmsShowMainFrame.
Referenced by CmsShowMain::appendData(), CmsShowMain::openData(), CmsShowMain::openDataViaURL(), CmsShowMain::postFiltering(), and CmsShowMainBase::setup().
{ m_cmsShowMainFrame->clearStatusBar(); }
void FWGUIManager::connectSubviewAreaSignals | ( | FWGUISubviewArea * | a | ) |
Definition at line 201 of file FWGUIManager.cc.
References FWGUISubviewArea::goingToBeDestroyed_, FWGUISubviewArea::selected_, subviewInfoSelected(), subviewInfoUnselected(), subviewIsBeingDestroyed(), subviewSwapped(), FWGUISubviewArea::swap_, and FWGUISubviewArea::unselected_.
Referenced by FWGUISubviewArea::FWGUISubviewArea().
{ a->goingToBeDestroyed_.connect(boost::bind(&FWGUIManager::subviewIsBeingDestroyed, this, _1)); a->selected_.connect(boost::bind(&FWGUIManager::subviewInfoSelected, this, _1)); a->unselected_.connect(boost::bind(&FWGUIManager::subviewInfoUnselected, this, _1)); a->swap_.connect(boost::bind(&FWGUIManager::subviewSwapped, this, _1)); }
void FWGUIManager::createEDIFrame | ( | ) |
Definition at line 616 of file FWGUIManager.cc.
References CmsShowMainFrame::bindCSGActionKeys(), fireworks::Context::colorManager(), m_cmsShowMainFrame, m_context, m_ediFrame, and fireworks::Context::selectionManager().
Referenced by showEDIFrame().
{ if (m_ediFrame == 0) { m_ediFrame = new CmsShowEDI(m_cmsShowMainFrame, 200, 200, m_context->selectionManager(),m_context->colorManager()); m_ediFrame->CenterOnParent(kTRUE,TGTransientFrame::kTopRight); m_cmsShowMainFrame->bindCSGActionKeys(m_ediFrame); } }
void FWGUIManager::createHelpGLPopup | ( | ) |
Definition at line 736 of file FWGUIManager.cc.
References getAction(), m_cmsShowMainFrame, m_helpGLPopup, and cmsshow::sHelpGL.
Referenced by FWGUIManager().
{ if (m_helpGLPopup == 0) { m_helpGLPopup = new CmsShowHelpPopup("helpGL.html", getAction(cmsshow::sHelpGL)->getName().c_str(), m_cmsShowMainFrame, 800, 600); m_helpGLPopup->CenterOnParent(kTRUE,TGTransientFrame::kBottomRight); } m_helpGLPopup->MapWindow(); }
void FWGUIManager::createHelpPopup | ( | ) |
Definition at line 709 of file FWGUIManager.cc.
References m_cmsShowMainFrame, and m_helpPopup.
Referenced by FWGUIManager().
{ if (m_helpPopup == 0) { m_helpPopup = new CmsShowHelpPopup("help.html", "CmsShow Help", m_cmsShowMainFrame, 800, 600); m_helpPopup->CenterOnParent(kTRUE,TGTransientFrame::kBottomRight); } m_helpPopup->MapWindow(); }
TGVerticalFrame * FWGUIManager::createList | ( | TGCompositeFrame * | p | ) |
Definition at line 576 of file FWGUIManager.cc.
References fireworks::Context::colorManager(), fireworks::Context::eventItemsManager(), m_context, m_summaryManager, fireworks::Context::modelChangeManager(), fireworks::Context::selectionManager(), and FWSummaryManager::widget().
Referenced by CmsShowMainFrame::CmsShowMainFrame().
{ TGVerticalFrame *listFrame = new TGVerticalFrame(p, p->GetWidth(), p->GetHeight()); TGHorizontalFrame* addFrame = new TGHorizontalFrame(listFrame, p->GetWidth(), 10, kRaisedFrame); TGLabel* addLabel = new TGLabel(addFrame,"Summary View"); addFrame->AddFrame(addLabel, new TGLayoutHints(kLHintsCenterX, 0,0,2,2)); listFrame->AddFrame(addFrame, new TGLayoutHints(kLHintsExpandX | kLHintsTop)); m_summaryManager = new FWSummaryManager(listFrame, m_context->selectionManager(), (FWEventItemsManager*) m_context->eventItemsManager(), this, m_context->modelChangeManager(), m_context->colorManager()); const unsigned int backgroundColor=0x2f2f2f; TGTextButton* addDataButton = new TGTextButton(m_summaryManager->widget(), "Add Collection"); addDataButton->ChangeOptions(kRaisedFrame); addDataButton->SetBackgroundColor(backgroundColor); addDataButton->SetTextColor(0xFFFFFF); addDataButton->SetToolTipText("Show additional collections"); addDataButton->Connect("Clicked()", "FWGUIManager", this, "addData()"); m_summaryManager->widget()->AddFrame(addDataButton, new TGLayoutHints(kLHintsExpandX|kLHintsLeft|kLHintsTop)); listFrame->AddFrame(m_summaryManager->widget(), new TGLayoutHints(kLHintsExpandX|kLHintsExpandY)); return listFrame; }
void FWGUIManager::createModelPopup | ( | ) |
Definition at line 649 of file FWGUIManager.cc.
References CmsShowMainFrame::bindCSGActionKeys(), fireworks::Context::colorManager(), ecaldqm::kRight, m_cmsShowMainFrame, m_context, m_detailViewManager, m_modelPopup, and fireworks::Context::selectionManager().
Referenced by showModelPopup().
{ m_modelPopup = new CmsShowModelPopup(m_detailViewManager,m_context->selectionManager(), m_context->colorManager(), m_cmsShowMainFrame, 200, 200); m_modelPopup->CenterOnParent(kTRUE,TGTransientFrame::kRight); m_cmsShowMainFrame->bindCSGActionKeys(m_modelPopup); }
void FWGUIManager::createShortcutPopup | ( | ) |
Definition at line 723 of file FWGUIManager.cc.
References getAction(), m_cmsShowMainFrame, m_shortcutPopup, and cmsshow::sKeyboardShort.
Referenced by FWGUIManager().
{ if (m_shortcutPopup == 0) { m_shortcutPopup = new CmsShowHelpPopup("shortcuts.html", getAction(cmsshow::sKeyboardShort)->getName().c_str(), m_cmsShowMainFrame, 800, 600); m_shortcutPopup->CenterOnParent(kTRUE,TGTransientFrame::kBottomRight); } m_shortcutPopup->MapWindow(); }
FWGUIManager::ViewMap_i FWGUIManager::createView | ( | const std::string & | iName, |
TEveWindowSlot * | slot = 0 |
||
) |
Definition at line 275 of file FWGUIManager.cc.
References FWViewBase::contextMenuHandler(), m_guiManager, m_nameToViewBuilder, m_viewMap, m_viewPrimPack, m_viewSecPack, FWViewBase::openSelectedModelContextMenu_, showSelectedModelContextMenu(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by newViewSlot(), and setFrom().
{ NameToViewBuilder::iterator itFind = m_nameToViewBuilder.find(iName); assert (itFind != m_nameToViewBuilder.end()); if(itFind == m_nameToViewBuilder.end()) { throw std::runtime_error(std::string("Unable to create view named ")+iName+" because it is unknown"); } if (!slot) { if (m_viewSecPack) { slot = m_viewSecPack->NewSlot(); } else { slot = m_viewPrimPack->NewSlot(); m_viewSecPack = m_viewPrimPack->NewSlot()->MakePack(); m_viewSecPack->SetShowTitleBar(kFALSE); } } TEveCompositeFrame *ef = slot->GetEveFrame(); FWViewBase* viewBase = itFind->second(slot, iName); //in future, get context from 'view' FWViewContextMenuHandlerBase* base= viewBase->contextMenuHandler(); viewBase->openSelectedModelContextMenu_.connect(boost::bind(&FWGUIManager::showSelectedModelContextMenu ,m_guiManager,_1,_2,base)); TEveWindow *eveWindow = ef->GetEveWindow(); eveWindow->SetElementName(iName.c_str()); std::pair<ViewMap_i,bool> insertPair = m_viewMap.insert(std::make_pair(eveWindow, viewBase)); return insertPair.first; }
void FWGUIManager::createViews | ( | TEveWindowSlot * | slot | ) |
Definition at line 606 of file FWGUIManager.cc.
References m_viewPrimPack, and m_viewSecPack.
Referenced by CmsShowMainFrame::CmsShowMainFrame().
{ m_viewPrimPack = slot->MakePack(); m_viewPrimPack->SetHorizontal(); m_viewPrimPack->SetElementName("Views"); m_viewPrimPack->SetShowTitleBar(kFALSE); m_viewSecPack = 0; }
void FWGUIManager::delaySliderChanged | ( | Int_t | val | ) | [private] |
Definition at line 1320 of file FWGUIManager.cc.
References changedDelayBetweenEvents_, m_cmsShowMainFrame, and CmsShowMainFrame::setPlayDelayGUI().
Referenced by FWGUIManager().
{ Float_t sec = val*0.001; m_cmsShowMainFrame->setPlayDelayGUI(sec, kFALSE); changedDelayBetweenEvents_.emit(sec); }
void FWGUIManager::disableNext | ( | ) |
Definition at line 375 of file FWGUIManager.cc.
References CmsShowMainFrame::enableNext(), and m_cmsShowMainFrame.
Referenced by CmsShowMain::checkPosition(), FWFFService::checkPosition(), and FWFFLooper::checkPosition().
{ m_cmsShowMainFrame->enableNext(false); }
void FWGUIManager::disablePrevious | ( | ) |
Definition at line 369 of file FWGUIManager.cc.
References CmsShowMainFrame::enablePrevious(), and m_cmsShowMainFrame.
Referenced by CmsShowMain::checkPosition(), FWFFService::checkPosition(), and FWFFLooper::checkPosition().
{ m_cmsShowMainFrame->enablePrevious(false); }
void FWGUIManager::enableActions | ( | bool | enable = true | ) |
Definition at line 315 of file FWGUIManager.cc.
References CmsShowMainFrame::enableActions(), and m_cmsShowMainFrame.
Referenced by CmsShowMain::autoLoadNewEvent(), FWFFLooper::autoLoadNewEvent(), CmsShowMainBase::playBackward(), CmsShowMainBase::playForward(), CmsShowMain::stopPlaying(), and FWFFLooper::stopPlaying().
{ m_cmsShowMainFrame->enableActions(enable); }
void FWGUIManager::eventChangedCallback | ( | ) |
Definition at line 329 of file FWGUIManager.cc.
References getCurrentEvent(), i, CmsShowMainFrame::loadEvent(), m_cmsShowMainFrame, m_detailViewManager, and FWDetailViewManager::newEventCallback().
Referenced by CmsShowMainBase::eventChangedImp().
{ // To be replaced when we can get index from fwlite::Event TEveViewerList* viewers = gEve->GetViewers(); for (TEveElement::List_i i=viewers->BeginChildren(); i!= viewers->EndChildren(); ++i) { TEveViewer* ev = dynamic_cast<TEveViewer*>(*i); if (ev) ev->GetGLViewer()->DeleteOverlayAnnotations(); } m_cmsShowMainFrame->loadEvent(*getCurrentEvent()); m_detailViewManager->newEventCallback(); }
void FWGUIManager::eventIdChanged | ( | ) |
Definition at line 1345 of file FWGUIManager.cc.
References changedEventId_, FWNumberEntryField::GetUIntNumber(), m_cmsShowMainFrame, CmsShowMainFrame::m_eventEntry, CmsShowMainFrame::m_lumiEntry, and CmsShowMainFrame::m_runEntry.
void FWGUIManager::evePreTerminate | ( | ) |
Definition at line 225 of file FWGUIManager.cc.
References m_cmsShowMainFrame, and m_viewMap.
Referenced by CmsShowMain::doExit().
{ gEve->GetWindowManager()->Disconnect("WindowSelected(TEveWindow*)", this, "checkSubviewAreaIconState(TEveWindow*)"); gEve->GetWindowManager()->Disconnect("WindowDocked(TEveWindow*)", this, "checkSubviewAreaIconState(TEveWindow*)"); gEve->GetWindowManager()->Disconnect("WindowUndocked(TEveWindow*)", this, "checkSubviewAreaIconState(TEveWindow*)"); // avoid emit signals at end gEve->GetSelection()->Disconnect(); gEve->GetHighlight()->Disconnect(); gEve->GetSelection()->RemoveElements(); gEve->GetHighlight()->RemoveElements(); m_cmsShowMainFrame->UnmapWindow(); for(ViewMap_i wIt = m_viewMap.begin(); wIt != m_viewMap.end(); ++wIt) { TEveCompositeFrameInMainFrame* mainFrame = dynamic_cast<TEveCompositeFrameInMainFrame*>((*wIt).first->GetEveFrame()); // main frames not to watch dying if (mainFrame) mainFrame->UnmapWindow(); // destroy (*wIt).second->destroy(); } }
void FWGUIManager::exportAllViews | ( | const std::string & | format | ) |
Definition at line 885 of file FWGUIManager.cc.
References mergeVDriftHistosByStation::file, getCurrentEvent(), i, j, prof2calltree::l, m_viewMap, and mergeVDriftHistosByStation::name.
Referenced by exportImagesOfAllViews().
{ // Save all GL views. // Expects format to have "%d %d %d %s" which are replaced with // run-number, event number, lumi block and view-name. // Blanks in view-name are removed. // If several views shave the same name, they are post-fixed // with "_%d". They are sorted by view diagonal. typedef std::list<TEveViewer*> viewer_list_t; typedef viewer_list_t::iterator viewer_list_i; typedef std::map<TString, viewer_list_t> name_map_t; typedef name_map_t::iterator name_map_i; name_map_t vls; for (ViewMap_i i = m_viewMap.begin(); i != m_viewMap.end(); ++i) { TEveViewer *ev = dynamic_cast<TEveViewer*>(i->first); if (ev) { TString name(ev->GetElementName()); name.ReplaceAll(" ", ""); viewer_list_t &l = vls[name]; viewer_list_i li = l.begin(); while (li != l.end() && (*li)->GetGLViewer()->ViewportDiagonal() < ev->GetGLViewer()->ViewportDiagonal()) ++li; l.insert(li, ev); } } const edm::EventBase *event = getCurrentEvent(); for (name_map_i i = vls.begin(); i != vls.end(); ++i) { bool multi_p = (i->second.size() > 1); int view_count = 1; for (viewer_list_i j = i->second.begin(); j != i->second.end(); ++j, ++view_count) { TString view_name(i->first); if (multi_p) { view_name += "_"; view_name += view_count; } TString file; file.Form(format.c_str(), event->id().run(), event->id().event(), event->luminosityBlock(), view_name.Data()); (*j)->GetGLViewer()->SavePicture(file); } } }
void FWGUIManager::exportImageOfMainView | ( | ) |
Definition at line 836 of file FWGUIManager.cc.
References fwLog, fwlog::kError, m_cmsShowMainFrame, m_viewMap, and m_viewPrimPack.
Referenced by FWGUIManager().
{ if (m_viewPrimPack->GetPack()->GetList()->GetSize() > 2) { TGFrameElementPack* frameEL = (TGFrameElementPack*) m_viewPrimPack->GetPack()->GetList()->At(1); TEveCompositeFrame* ef = dynamic_cast<TEveCompositeFrame*>(frameEL->fFrame); m_viewMap[ef->GetEveWindow()]->promptForSaveImageTo(m_cmsShowMainFrame); } else { fwLog(fwlog::kError) << "Main view has been destroyed." << std::endl; } }
void FWGUIManager::exportImagesOfAllViews | ( | ) |
Definition at line 851 of file FWGUIManager.cc.
References gather_cfg::cout, dir, alignCSCRings::e, exportAllViews(), m_cmsShowMainFrame, mergeVDriftHistosByStation::name, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by FWGUIManager().
{ try { static TString dir("."); const char * kImageExportTypes[] = {"PNG", "*.png", "GIF", "*.gif", "JPEG", "*.jpg", "PDF", "*.pdf", "Encapsulated PostScript", "*.eps", 0, 0}; TGFileInfo fi; fi.fFileTypes = kImageExportTypes; fi.fIniDir = StrDup(dir); new TGFileDialog(gClient->GetDefaultRoot(), m_cmsShowMainFrame, kFDSave,&fi); dir = fi.fIniDir; if (fi.fFilename != 0) { std::string name = fi.fFilename; // fi.fFileTypeIdx points to the name of the file type // selected in the drop-down menu, so fi.fFileTypeIdx gives us // the extension std::string ext = kImageExportTypes[fi.fFileTypeIdx + 1] + 1; if (name.find(ext) == name.npos) name += ext; // now add format trailing before the extension name.insert(name.rfind('.'), "-%u_%u_%u_%s"); exportAllViews(name); } } catch (std::runtime_error &e) { std::cout << e.what() << std::endl; } }
void FWGUIManager::filterButtonClicked | ( | ) |
Definition at line 1370 of file FWGUIManager.cc.
References filterButtonClicked_.
{ filterButtonClicked_.emit(); }
void FWGUIManager::finishUpColorChange | ( | ) | [private] |
Definition at line 1353 of file FWGUIManager.cc.
References CmsShowModelPopup::colorSetChanged(), CmsShowEDI::colorSetChanged(), CmsShowCommonPopup::colorSetChanged(), m_commonPopup, m_ediFrame, and m_modelPopup.
Referenced by FWGUIManager().
{ if (m_commonPopup) m_commonPopup->colorSetChanged(); if (m_modelPopup) m_modelPopup->colorSetChanged(); if (m_ediFrame) m_ediFrame->colorSetChanged(); gEve->FullRedraw3D(); }
CSGAction * FWGUIManager::getAction | ( | const std::string | name | ) |
Definition at line 345 of file FWGUIManager.cc.
References CSGActionSupervisor::getAction(), and m_cmsShowMainFrame.
Referenced by createHelpGLPopup(), createShortcutPopup(), FWGUIManager(), and CmsShowMain::setupDataHandling().
{ return m_cmsShowMainFrame->getAction(name); }
const edm::EventBase * FWGUIManager::getCurrentEvent | ( | ) | const |
Definition at line 769 of file FWGUIManager.cc.
References FWNavigatorBase::getCurrentEvent(), and m_navigator.
Referenced by FWTriggerTableView::dataChanged(), eventChangedCallback(), exportAllViews(), FWHLTValidator::fillOptions(), and FWEventAnnotation::updateOverlayText().
{ return m_navigator->getCurrentEvent(); }
FWGUIManager * FWGUIManager::getGUIManager | ( | ) | [static] |
Definition at line 763 of file FWGUIManager.cc.
References m_guiManager.
Referenced by FWTriggerTableView::dataChanged(), FWHLTValidator::fillOptions(), FWGUISubviewArea::FWGUISubviewArea(), FWGUIEventFilter::HandleKey(), FWGUISubviewArea::undock(), and FWEventAnnotation::updateOverlayText().
{ return m_guiManager; }
CmsShowMainFrame* FWGUIManager::getMainFrame | ( | ) | const [inline] |
Definition at line 200 of file FWGUIManager.h.
References m_cmsShowMainFrame.
Referenced by CmsShowMain::appendData(), FWFFLooper::autoLoadNewEvent(), CmsShowMain::checkPosition(), FWFFService::checkPosition(), FWFFLooper::checkPosition(), FWGUIEventFilter::HandleKey(), CmsShowMain::openData(), FWFFLooper::stopPlaying(), and FWGUISubviewArea::undock().
{ return m_cmsShowMainFrame; }
TEveWindow * FWGUIManager::getSwapCandidate | ( | ) | [private] |
Definition at line 426 of file FWGUIManager.cc.
References m_viewPrimPack, m_viewSecPack, and createTree::pp.
Referenced by checkSubviewAreaIconState(), and subviewSwapped().
{ TEveWindow* swapCandidate =0; if ( gEve->GetWindowManager()->GetCurrentWindow()) { swapCandidate = gEve->GetWindowManager()->GetCurrentWindow(); } else { // swap with first docked view TEveCompositeFrame* pef; TGFrameElementPack *pel; // check if there is view in prim pack TGPack* pp = m_viewPrimPack->GetPack(); if ( pp->GetList()->GetSize() > 2) { pel = (TGFrameElementPack*) pp->GetList()->At(1); if (pel->fState) // is first undocked { pef = dynamic_cast<TEveCompositeFrame*>(pel->fFrame); if ( pef && pef->GetEveWindow()) swapCandidate = pef->GetEveWindow(); } } if (swapCandidate == 0) { // no eve window found in primary, check secondary TGPack* sp = m_viewSecPack->GetPack(); TIter frame_iterator(sp->GetList()); while ((pel = (TGFrameElementPack*)frame_iterator())) { pef = dynamic_cast<TEveCompositeFrame*>(pel->fFrame); if ( pef && pef->GetEveWindow() && pel->fState) { swapCandidate = pef->GetEveWindow() ; break; } } } } return swapCandidate; }
CSGContinuousAction * FWGUIManager::loopAction | ( | ) |
Definition at line 363 of file FWGUIManager.cc.
References CmsShowMainFrame::loopAction(), and m_cmsShowMainFrame.
{ return m_cmsShowMainFrame->loopAction(); }
void FWGUIManager::lumiIdChanged | ( | ) |
Definition at line 1339 of file FWGUIManager.cc.
References m_cmsShowMainFrame, and CmsShowMainFrame::m_eventEntry.
{ m_cmsShowMainFrame->m_eventEntry->SetText("", kFALSE); m_cmsShowMainFrame->m_eventEntry->SetFocus(); }
TGFrame * FWGUIManager::makeGUIsubview | ( | TEveCompositeFrame * | cp, |
TGCompositeFrame * | parent, | ||
Int_t | height | ||
) | [static] |
Definition at line 253 of file FWGUIManager.cc.
Referenced by FWGUIManager().
{ TGFrame* frame = new FWGUISubviewArea(cp, parent, height); return frame; }
void FWGUIManager::measureWMOffsets | ( | ) | [private] |
Definition at line 1397 of file FWGUIManager.cc.
References asciidump::attr, fwLog, fwlog::kDebug, m_WMDecorH, m_WMOffsetX, m_WMOffsetY, x, and detailsBasic3DVector::y.
Referenced by FWGUIManager().
{ const Int_t x = 100, y = 100; TGMainFrame *mf1 = new TGMainFrame(0, 0, 0); mf1->MapWindow(); mf1->Move(x, y); // This seems to be the only reliable way to make sure Move() has been processed. { TGMainFrame *mf2 = new TGMainFrame(0, 0, 0); mf2->MapWindow(); while (!mf2->IsMapped()) gClient->HandleInput(); delete mf2; } { Int_t xm, ym; Window_t childdum; WindowAttributes_t attr; gVirtualX->TranslateCoordinates(mf1->GetId(), gClient->GetDefaultRoot()->GetId(), 0, 0, xm, ym, childdum); gVirtualX->GetWindowAttributes(mf1->GetId(), attr); m_WMOffsetX = x - xm; m_WMOffsetY = y - ym; m_WMDecorH = attr.fY; fwLog(fwlog::kDebug) << Form("FWGUIManager::measureWMOffsets: required (%d,%d), measured(%d, %d) => dx=%d, dy=%d; decor_h=%d.\n", x, y, xm, ym, m_WMOffsetX, m_WMOffsetY, m_WMDecorH); } delete mf1; }
void FWGUIManager::newItem | ( | const FWEventItem * | iItem | ) | [private] |
Definition at line 399 of file FWGUIManager.cc.
References FWEventItem::id(), and FWEventItem::name().
Referenced by FWGUIManager().
void FWGUIManager::newViewSlot | ( | const std::string & | iName | ) |
Definition at line 268 of file FWGUIManager.cc.
References createView().
Referenced by FWGUIManager().
{ // this function have to exist, becuse CSGAction binds to void functions createView(iName); }
void FWGUIManager::openEveBrowserForDebugging | ( | ) | const |
Definition at line 1311 of file FWGUIManager.cc.
{ gEve->GetBrowser()->MapWindow(); }
const FWGUIManager& FWGUIManager::operator= | ( | const FWGUIManager & | ) | [private] |
CSGContinuousAction * FWGUIManager::playEventsAction | ( | ) |
Definition at line 351 of file FWGUIManager.cc.
References m_cmsShowMainFrame, and CmsShowMainFrame::playEventsAction().
Referenced by CmsShowMain::checkLiveMode(), CmsShowMain::checkPosition(), FWFFService::checkPosition(), and FWFFLooper::checkPosition().
{ return m_cmsShowMainFrame->playEventsAction(); }
CSGContinuousAction * FWGUIManager::playEventsBackwardsAction | ( | ) |
Definition at line 357 of file FWGUIManager.cc.
References m_cmsShowMainFrame, and CmsShowMainFrame::playEventsBackwardsAction().
{ return m_cmsShowMainFrame->playEventsBackwardsAction(); }
void FWGUIManager::popupViewClosed | ( | ) |
Definition at line 664 of file FWGUIManager.cc.
References CmsShowViewPopup::getEveWindow(), FWGUISubviewArea::getToolBarFromWindow(), m_viewPopup, and FWGUISubviewArea::setInfoButton().
Referenced by setViewPopup().
{ if (m_viewPopup->getEveWindow()) { FWGUISubviewArea* sa = FWGUISubviewArea::getToolBarFromWindow(m_viewPopup->getEveWindow()); sa->setInfoButton(kFALSE); } }
bool FWGUIManager::promptForConfigurationFile | ( | std::string & | result, |
enum EFileDialogMode | mode | ||
) | [private] |
Helper method for a load / save configuration dialog.
result where the picked file is stored.
mode the mode for the dialog (i.e. Load / Save).
Definition at line 783 of file FWGUIManager.cc.
References dir, m_cmsShowMainFrame, alignBH_cfg::mode, mergeVDriftHistosByStation::name, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by promptForLoadConfigurationFile(), and promptForSaveConfigurationFile().
{ const static char* kFileTypes[] = {"Fireworks Configuration files","*.fwc", "All Files","*", 0,0}; static TString dir("."); TGFileInfo fi; fi.fFileTypes = kFileTypes; fi.fIniDir = StrDup(dir); new TGFileDialog(gClient->GetDefaultRoot(), m_cmsShowMainFrame, mode, &fi); dir = fi.fIniDir; if (fi.fFilename == 0) // to handle "cancel" button properly return false; std::string name = fi.fFilename; // if the extension isn't already specified by hand, specify it now std::string ext = kFileTypes[fi.fFileTypeIdx + 1] + 1; if (ext.size() != 0 && name.find(ext) == name.npos) name += ext; result = name; return true; }
void FWGUIManager::promptForLoadConfigurationFile | ( | ) | [private] |
Emits the signal which request to load the configuration file picked up in a dialog.
Definition at line 813 of file FWGUIManager.cc.
References loadFromConfigurationFile_, mergeVDriftHistosByStation::name, promptForConfigurationFile(), and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by FWGUIManager().
{ std::string name; if (!promptForConfigurationFile(name, kFDOpen)) return; loadFromConfigurationFile_(name); }
void FWGUIManager::promptForSaveConfigurationFile | ( | ) | [private] |
Emits the signal which requests to save the current configuration in the file picked up in the dialog.
Definition at line 827 of file FWGUIManager.cc.
References mergeVDriftHistosByStation::name, promptForConfigurationFile(), AlCaHLTBitMon_QueryRunRegistry::string, and writeToConfigurationFile_.
Referenced by FWGUIManager().
{ std::string name; if (!promptForConfigurationFile(name, kFDSave)) return; writeToConfigurationFile_(name); }
void FWGUIManager::registerViewBuilder | ( | const std::string & | iName, |
ViewBuildFunctor & | iBuilder | ||
) |
Definition at line 260 of file FWGUIManager.cc.
References m_nameToViewBuilder.
Referenced by FWEveViewManager::FWEveViewManager(), FWGeometryTableViewManager::FWGeometryTableViewManager(), FWTableViewManager::FWTableViewManager(), and FWTriggerTableViewManager::FWTriggerTableViewManager().
{ m_nameToViewBuilder[iName]=iBuilder; }
void FWGUIManager::resetWMOffsets | ( | ) |
Definition at line 1429 of file FWGUIManager.cc.
References m_WMDecorH, m_WMOffsetX, and m_WMOffsetY.
Referenced by CmsShowMain::CmsShowMain().
{ m_WMOffsetX = m_WMOffsetY = m_WMDecorH = 0; }
void FWGUIManager::runIdChanged | ( | ) |
Definition at line 1333 of file FWGUIManager.cc.
References m_cmsShowMainFrame, and CmsShowMainFrame::m_lumiEntry.
{ m_cmsShowMainFrame->m_lumiEntry->SetText("", kFALSE); m_cmsShowMainFrame->m_lumiEntry->SetFocus(); }
void FWGUIManager::setDelayBetweenEvents | ( | Float_t | val | ) |
Definition at line 1328 of file FWGUIManager.cc.
References m_cmsShowMainFrame, and CmsShowMainFrame::setPlayDelayGUI().
{ m_cmsShowMainFrame->setPlayDelayGUI(val, kTRUE); }
void FWGUIManager::setFilterButtonIcon | ( | int | state | ) |
Definition at line 1382 of file FWGUIManager.cc.
References i, m_cmsShowMainFrame, CmsShowMainFrame::m_filterEnableBtn, CmsShowMainFrame::m_filterIcons, and FWCustomIconsButton::setIcons().
Referenced by CmsShowMain::navigatorChangedFilterState(), and CmsShowMain::setupDataHandling().
{ int i = state*3; m_cmsShowMainFrame->m_filterEnableBtn->setIcons(m_cmsShowMainFrame->m_filterIcons[i], m_cmsShowMainFrame->m_filterIcons[i+1], m_cmsShowMainFrame->m_filterIcons[i+2]); }
void FWGUIManager::setFilterButtonText | ( | const char * | txt | ) |
Definition at line 1376 of file FWGUIManager.cc.
References m_cmsShowMainFrame, and CmsShowMainFrame::m_filterShowGUIBtn.
Referenced by FWFFLooper::beginRun(), CmsShowMain::navigatorChangedFilterState(), CmsShowMain::postFiltering(), and FWFFLooper::showPathsGUI().
{ m_cmsShowMainFrame->m_filterShowGUIBtn->SetText(txt); }
void FWGUIManager::setFrom | ( | const FWConfiguration & | iFrom | ) | [virtual] |
Implements FWConfigurable.
Definition at line 1179 of file FWGUIManager.cc.
References CmsShowMainFrame::bindCSGActionKeys(), FWViewType::checkNameWithViewVersion(), checkSubviewAreaIconState(), createView(), fwLog, kCollectionController(), kCommonController(), kControllers(), FWConfiguration::keyValues(), FWViewType::kGeometryTable, kMainWindow(), kObjectController(), kUndocked(), kViewArea(), kViewController(), kViews(), fwlog::kWarning, m_cmsShowMainFrame, m_commonPopup, m_ediFrame, m_modelPopup, m_viewMap, m_viewPopup, m_viewPrimPack, m_viewSecPack, mergeVDriftHistosByStation::name, FWGeometryTableViewBase::populate3DViewsFromConfig(), CmsShowMainFrame::setSummaryViewWeight(), setViewPopup(), setWindowInfoFrom(), showCommonPopup(), showEDIFrame(), showModelPopup(), AlCaHLTBitMon_QueryRunRegistry::string, subviewDestroyAll(), FWConfiguration::value(), FWConfiguration::valueForKey(), FWConfiguration::version(), and histoStyle::weight.
{ // main window if (m_viewSecPack) subviewDestroyAll(); const FWConfiguration* mw = iFrom.valueForKey(kMainWindow); assert(mw != 0); // Window needs to mapped before moving, otherwise move can lead // to wrong results on some window managers. m_cmsShowMainFrame->MapWindow(); setWindowInfoFrom(*mw, m_cmsShowMainFrame); m_cmsShowMainFrame->MapSubwindows(); m_cmsShowMainFrame->Layout(); m_cmsShowMainFrame->MapRaised(); // set from view reading area info nd view info float_t leftWeight =1; float_t rightWeight=1; if ( mw->version() >= 2 ) { leftWeight = atof(mw->valueForKey("leftWeight")->value().c_str()); rightWeight = atof(mw->valueForKey("rightWeight")->value().c_str()); } if ( mw->version() >= 3 ) { float summaryWeight = atof(mw->valueForKey("summaryWeight")->value().c_str()); m_cmsShowMainFrame->setSummaryViewWeight(summaryWeight); } TEveWindowSlot* primSlot = (leftWeight > 0) ? m_viewPrimPack->NewSlotWithWeight(leftWeight) : 0; m_viewSecPack = m_viewPrimPack->NewSlotWithWeight(rightWeight)->MakePack(); m_viewSecPack->SetVertical(); m_viewSecPack->SetShowTitleBar(kFALSE); // views list const FWConfiguration* views = iFrom.valueForKey(kViews); assert(0!=views); const FWConfiguration::KeyValues* keyVals = views->keyValues(); const FWConfiguration* viewArea = iFrom.valueForKey(kViewArea); // area list (ignored in older version) if ( viewArea->version() > 1) { const FWConfiguration::KeyValues* akv = viewArea->keyValues(); FWConfiguration::KeyValuesIt areaIt = akv->begin(); for(FWConfiguration::KeyValuesIt it = keyVals->begin(); it!= keyVals->end(); ++it) { float weight = atof((areaIt->second).valueForKey("weight")->value().c_str()); TEveWindowSlot* slot = ( m_viewMap.size() || (primSlot == 0) ) ? m_viewSecPack->NewSlotWithWeight(weight) : primSlot; std::string name = FWViewType::checkNameWithViewVersion(it->first, it->second.version()); ViewMap_i lastViewIt = createView(name, slot); lastViewIt->second->setFrom(it->second); bool undocked = atof((areaIt->second).valueForKey("undocked")->value().c_str()); if (undocked) { TEveWindow* lastWindow = lastViewIt->first; lastWindow->UndockWindow(); TEveCompositeFrameInMainFrame* emf = dynamic_cast<TEveCompositeFrameInMainFrame*>(lastWindow->GetEveFrame()); if (emf ) { const TGMainFrame* mf = dynamic_cast<const TGMainFrame*>(emf->GetParent()); if (mf) { m_cmsShowMainFrame->bindCSGActionKeys(mf); TGMainFrame* mfp = (TGMainFrame*)mf; // have to cast in non-const const FWConfiguration* mwc = (areaIt->second).valueForKey("UndockedWindowPos"); setWindowInfoFrom(*mwc, mfp); } } } areaIt++; } } else { // create views with same weight in old version for(FWConfiguration::KeyValuesIt it = keyVals->begin(); it!= keyVals->end(); ++it) { std::string name = FWViewType::checkNameWithViewVersion(it->first, it->second.version()); createView(name, m_viewMap.size() ? m_viewSecPack->NewSlot() : primSlot); ViewMap_i lastViewIt = m_viewMap.end(); lastViewIt--; lastViewIt->second->setFrom(it->second); } // handle undocked windows in old version const FWConfiguration* undocked = iFrom.valueForKey(kUndocked); if(0!=undocked) { fwLog(fwlog::kWarning) << "Restrore of undocked windows with old window management not supported." << std::endl; } } //handle controllers const FWConfiguration* controllers = iFrom.valueForKey(kControllers); if (0 != controllers) { const FWConfiguration::KeyValues* keyVals = controllers->keyValues(); if (0 != keyVals) { //we have open controllers for(FWConfiguration::KeyValuesIt it = keyVals->begin(); it != keyVals->end(); ++it) { const std::string& controllerName = it->first; // std::cout <<"found controller "<<controllerName<<std::endl; if (controllerName == kCollectionController) { showEDIFrame(); setWindowInfoFrom(it->second,m_ediFrame); } else if (controllerName == kViewController) { setViewPopup(0); setWindowInfoFrom(it->second, m_viewPopup); } else if (controllerName == kObjectController) { showModelPopup(); setWindowInfoFrom(it->second, m_modelPopup); } else if (controllerName == kCommonController) { showCommonPopup(); setWindowInfoFrom(it->second, m_commonPopup); } } } } for(ViewMap_i it = m_viewMap.begin(); it != m_viewMap.end(); ++it) { if (it->second->typeId() >= FWViewType::kGeometryTable) { FWGeometryTableViewBase* gv = ( FWGeometryTableViewBase*)it->second; gv->populate3DViewsFromConfig(); } } // disable first docked view checkSubviewAreaIconState(0); }
void FWGUIManager::setPlayMode | ( | bool | play | ) |
Definition at line 381 of file FWGUIManager.cc.
References m_cmsShowMainFrame, CmsShowMainFrame::m_eventEntry, and CmsShowMainFrame::m_runEntry.
{ m_cmsShowMainFrame->m_runEntry->SetEnabled(!play); m_cmsShowMainFrame->m_eventEntry->SetEnabled(!play); }
void FWGUIManager::setViewPopup | ( | TEveWindow * | ew | ) | [private] |
Definition at line 681 of file FWGUIManager.cc.
References CmsShowViewPopup::closed_, fireworks::Context::colorManager(), m_context, m_guiManager, m_viewMap, m_viewPopup, popupViewClosed(), CmsShowViewPopup::reset(), and CmsShowViewPopup::UnmapWindow().
Referenced by setFrom(), showViewPopup(), subviewDestroyAll(), subviewInfoSelected(), and subviewIsBeingDestroyed().
{ FWViewBase* vb = ew ? m_viewMap[ew] : 0; if (m_viewPopup == 0) { m_viewPopup = new CmsShowViewPopup(0, 200, 200, m_context->colorManager(), vb, ew); m_viewPopup->closed_.connect(sigc::mem_fun(*m_guiManager, &FWGUIManager::popupViewClosed)); } else { m_viewPopup->UnmapWindow(); } m_viewPopup->reset(vb, ew); m_viewPopup->MapRaised(); }
void FWGUIManager::setWindowInfoFrom | ( | const FWConfiguration & | iFrom, |
TGMainFrame * | iFrame | ||
) |
Definition at line 1166 of file FWGUIManager.cc.
References m_WMDecorH, m_WMOffsetX, m_WMOffsetY, FWConfiguration::value(), FWConfiguration::valueForKey(), create_public_lumi_plots::width, x, and detailsBasic3DVector::y.
Referenced by setFrom().
{ int x = atoi(iFrom.valueForKey("x")->value().c_str()) + m_WMOffsetX; int y = atoi(iFrom.valueForKey("y")->value().c_str()) + m_WMOffsetY; if (y < m_WMDecorH) y = m_WMDecorH; int width = atoi(iFrom.valueForKey("width")->value().c_str()); int height = atoi(iFrom.valueForKey("height")->value().c_str()); iFrame->MoveResize(x,y,width,height); iFrame->SetWMPosition(x, y); }
void FWGUIManager::showCommonPopup | ( | ) |
Definition at line 638 of file FWGUIManager.cc.
References CmsShowMainFrame::bindCSGActionKeys(), fireworks::Context::commonPrefs(), m_cmsShowMainFrame, m_commonPopup, and m_context.
Referenced by FWGUIManager(), and setFrom().
{ if (! m_commonPopup) { m_commonPopup = new CmsShowCommonPopup(m_context->commonPrefs(), m_cmsShowMainFrame, 200, 200); m_cmsShowMainFrame->bindCSGActionKeys(m_commonPopup); } m_commonPopup->MapRaised(); }
void FWGUIManager::showEDIFrame | ( | int | iInfoToShow = -1 | ) |
Allowed values are -1 or ones from FWDataCategories enum.
Definition at line 627 of file FWGUIManager.cc.
References createEDIFrame(), m_ediFrame, and CmsShowEDI::show().
Referenced by FWModelContextMenuHandler::chosenItem(), FWGUIManager(), FWSummaryManager::requestForController(), FWSummaryManager::requestForError(), FWSummaryManager::requestForFilter(), FWSummaryManager::requestForInfo(), and setFrom().
{ createEDIFrame(); if (-1 != iToShow) { m_ediFrame->show(static_cast<FWDataCategories>(iToShow)); } m_ediFrame->MapRaised(); }
void FWGUIManager::showEventFilterGUI | ( | ) |
Definition at line 1364 of file FWGUIManager.cc.
References m_cmsShowMainFrame, and showEventFilterGUI_.
Referenced by FWFFLooper::beginRun(), and CmsShowMain::filterButtonClicked().
{ showEventFilterGUI_.emit(m_cmsShowMainFrame); }
void FWGUIManager::showInvMassDialog | ( | ) |
Definition at line 698 of file FWGUIManager.cc.
References CmsShowMainFrame::bindCSGActionKeys(), m_cmsShowMainFrame, m_context, m_invMassDialog, and fireworks::Context::selectionManager().
Referenced by FWGUIManager().
{ if (! m_invMassDialog) { m_invMassDialog = new FWInvMassDialog(m_context->selectionManager()); m_cmsShowMainFrame->bindCSGActionKeys(m_invMassDialog); } m_invMassDialog->MapRaised(); }
void FWGUIManager::showModelPopup | ( | ) |
Definition at line 657 of file FWGUIManager.cc.
References createModelPopup(), and m_modelPopup.
Referenced by FWModelContextMenuHandler::chosenItem(), FWGUIManager(), and setFrom().
{ if (! m_modelPopup) createModelPopup(); m_modelPopup->MapRaised(); }
void FWGUIManager::showSelectedModelContextMenu | ( | Int_t | iGlobalX, |
Int_t | iGlobalY, | ||
FWViewContextMenuHandlerBase * | iHandler | ||
) |
Definition at line 750 of file FWGUIManager.cc.
References m_context, m_contextMenuHandler, FWSelectionManager::selected(), fireworks::Context::selectionManager(), and FWModelContextMenuHandler::showSelectedModelContext().
Referenced by createView(), and FWSummaryManager::requestForSelectedModelContextMenu().
{ if (! m_context->selectionManager()->selected().empty()) { m_contextMenuHandler->showSelectedModelContext(iGlobalX,iGlobalY, iHandler); } }
void FWGUIManager::showViewPopup | ( | ) |
Definition at line 674 of file FWGUIManager.cc.
References setViewPopup().
Referenced by FWGUIManager().
{ // CSG action. setViewPopup(0); }
void FWGUIManager::subviewDestroy | ( | FWGUISubviewArea * | sva | ) |
Definition at line 504 of file FWGUIManager.cc.
References FWViewBase::destroy(), FWGUISubviewArea::getEveWindow(), and m_viewMap.
Referenced by subviewDestroyAll(), and subviewIsBeingDestroyed().
{ TEveWindow* ew = sva->getEveWindow(); FWViewBase* viewBase = m_viewMap[ew]; m_viewMap.erase(ew); viewBase->destroy(); }
void FWGUIManager::subviewDestroyAll | ( | ) |
Definition at line 513 of file FWGUIManager.cc.
References FWGUISubviewArea::getToolBarFromWindow(), i, m_viewMap, m_viewPrimPack, m_viewSecPack, sd, setViewPopup(), subviewDestroy(), and w().
Referenced by setFrom().
{ std::vector<FWGUISubviewArea*> sd; for(ViewMap_i wIt = m_viewMap.begin(); wIt != m_viewMap.end(); ++wIt) { FWGUISubviewArea* ar = FWGUISubviewArea::getToolBarFromWindow(wIt->first); sd.push_back(ar); } for (std::vector<FWGUISubviewArea*>::iterator i= sd.begin(); i !=sd.end(); ++i) { if ((*i)->isSelected()) setViewPopup(0); subviewDestroy(*i); } gSystem->ProcessEvents(); gSystem->Sleep(200); while (m_viewPrimPack->HasChildren()) { TEveWindow* w = dynamic_cast<TEveWindow*>(m_viewPrimPack->FirstChild()); if (w) w->DestroyWindowAndSlot(); } gSystem->Sleep(200); m_viewSecPack = 0; gSystem->ProcessEvents(); }
void FWGUIManager::subviewInfoSelected | ( | FWGUISubviewArea * | sva | ) |
Definition at line 547 of file FWGUIManager.cc.
References FWGUISubviewArea::getEveWindow(), FWGUISubviewArea::getToolBarFromWindow(), m_viewMap, FWGUISubviewArea::setInfoButton(), and setViewPopup().
Referenced by connectSubviewAreaSignals().
{ // release button on previously selected TEveWindow* ew = sva->getEveWindow(); for(ViewMap_i wIt = m_viewMap.begin(); wIt != m_viewMap.end(); ++wIt) { if (wIt->first != ew) FWGUISubviewArea::getToolBarFromWindow(wIt->first)->setInfoButton(kFALSE); } setViewPopup(sva->getEveWindow()); }
void FWGUIManager::subviewInfoUnselected | ( | FWGUISubviewArea * | sva | ) |
Definition at line 560 of file FWGUIManager.cc.
References m_viewPopup, and CmsShowViewPopup::UnmapWindow().
Referenced by connectSubviewAreaSignals().
{ m_viewPopup->UnmapWindow(); }
void FWGUIManager::subviewIsBeingDestroyed | ( | FWGUISubviewArea * | sva | ) |
Definition at line 492 of file FWGUIManager.cc.
References f, FWGUISubviewArea::isSelected(), m_tasks, setViewPopup(), and subviewDestroy().
Referenced by connectSubviewAreaSignals().
{ if (sva->isSelected()) setViewPopup(0); CmsShowTaskExecutor::TaskFunctor f; f = boost::bind(&FWGUIManager::subviewDestroy, this, sva); m_tasks->addTask(f); m_tasks->startDoingTasks(); }
void FWGUIManager::subviewSwapped | ( | FWGUISubviewArea * | sva | ) |
Definition at line 566 of file FWGUIManager.cc.
References checkSubviewAreaIconState(), FWGUISubviewArea::getEveWindow(), getSwapCandidate(), and swap().
Referenced by connectSubviewAreaSignals().
{ TEveWindow* curr = getSwapCandidate(); TEveWindow* swap = sva->getEveWindow(); if (curr) swap->SwapWindow(curr); checkSubviewAreaIconState(0); }
void FWGUIManager::titleChanged | ( | const char * | title | ) |
Definition at line 321 of file FWGUIManager.cc.
References m_cmsShowMainFrame, and indexGen::title.
Referenced by CmsShowMain::appendData(), CmsShowMain::eventChangedImp(), and CmsShowMain::fileChangedSlot().
{ char title[128]; snprintf(title,127,"cmsShow: %s", subtitle); m_cmsShowMainFrame->SetWindowName(title); }
void FWGUIManager::updateEventFilterEnable | ( | bool | btnEnabled | ) |
Definition at line 1391 of file FWGUIManager.cc.
References m_cmsShowMainFrame, and CmsShowMainFrame::m_filterEnableBtn.
Referenced by CmsShowMain::setupDataHandling().
{ m_cmsShowMainFrame->m_filterEnableBtn->SetEnabled(btnEnabled); }
void FWGUIManager::updateStatus | ( | const char * | status | ) |
Definition at line 388 of file FWGUIManager.cc.
References m_cmsShowMainFrame, and CmsShowMainFrame::updateStatusBar().
Referenced by CmsShowMain::appendData(), FWFFLooper::beginRun(), CmsShowMainBase::loadGeometry(), CmsShowMain::notified(), CmsShowMain::openData(), CmsShowMain::openDataViaURL(), FWFFService::postBeginRun(), FWPathsPopup::postModule(), FWPathsPopup::postProcessEvent(), CmsShowMain::preFiltering(), FWPathsPopup::preModule(), CmsShowMain::setupDataHandling(), and CmsShowMainBase::setupViewManagers().
sigc::signal<void, Float_t> FWGUIManager::changedDelayBetweenEvents_ |
Definition at line 216 of file FWGUIManager.h.
Referenced by delaySliderChanged().
sigc::signal<void> FWGUIManager::changedEventEntry_ |
Definition at line 215 of file FWGUIManager.h.
sigc::signal<void, edm::RunNumber_t, edm::LuminosityBlockNumber_t, edm::EventNumber_t> FWGUIManager::changedEventId_ |
Definition at line 210 of file FWGUIManager.h.
Referenced by eventIdChanged().
sigc::signal<void> FWGUIManager::changedRunEntry_ |
Definition at line 214 of file FWGUIManager.h.
sigc::signal<void> FWGUIManager::filterButtonClicked_ |
Definition at line 206 of file FWGUIManager.h.
Referenced by FWFFLooper::beginRun(), filterButtonClicked(), and CmsShowMain::setupDataHandling().
sigc::signal<void> FWGUIManager::goingToQuit_ |
Definition at line 211 of file FWGUIManager.h.
sigc::signal<void, const std::string&> FWGUIManager::loadFromConfigurationFile_ |
Definition at line 209 of file FWGUIManager.h.
Referenced by promptForLoadConfigurationFile().
CmsShowMainFrame* FWGUIManager::m_cmsShowMainFrame [private] |
Definition at line 252 of file FWGUIManager.h.
Referenced by addData(), addTo(), clearStatus(), createEDIFrame(), createHelpGLPopup(), createHelpPopup(), createModelPopup(), createShortcutPopup(), delaySliderChanged(), disableNext(), disablePrevious(), enableActions(), eventChangedCallback(), eventIdChanged(), evePreTerminate(), exportImageOfMainView(), exportImagesOfAllViews(), FWGUIManager(), getAction(), getMainFrame(), loopAction(), lumiIdChanged(), playEventsAction(), playEventsBackwardsAction(), promptForConfigurationFile(), runIdChanged(), setDelayBetweenEvents(), setFilterButtonIcon(), setFilterButtonText(), setFrom(), setPlayMode(), showCommonPopup(), showEventFilterGUI(), showInvMassDialog(), titleChanged(), updateEventFilterEnable(), updateStatus(), and ~FWGUIManager().
CmsShowCommonPopup* FWGUIManager::m_commonPopup [private] |
Definition at line 261 of file FWGUIManager.h.
Referenced by addTo(), finishUpColorChange(), setFrom(), and showCommonPopup().
fireworks::Context* FWGUIManager::m_context [private] |
Definition at line 243 of file FWGUIManager.h.
Referenced by addData(), createEDIFrame(), createList(), createModelPopup(), FWGUIManager(), setViewPopup(), showCommonPopup(), showInvMassDialog(), and showSelectedModelContextMenu().
Definition at line 250 of file FWGUIManager.h.
Referenced by FWGUIManager(), showSelectedModelContextMenu(), and ~FWGUIManager().
FWGUIEventDataAdder* FWGUIManager::m_dataAdder [private] |
Definition at line 255 of file FWGUIManager.h.
Referenced by addData().
Definition at line 248 of file FWGUIManager.h.
Referenced by createModelPopup(), eventChangedCallback(), FWGUIManager(), and ~FWGUIManager().
CmsShowEDI* FWGUIManager::m_ediFrame [private] |
Definition at line 258 of file FWGUIManager.h.
Referenced by addTo(), createEDIFrame(), finishUpColorChange(), setFrom(), showEDIFrame(), and ~FWGUIManager().
TGPopupMenu* FWGUIManager::m_fileMenu [private] |
Definition at line 254 of file FWGUIManager.h.
FWGUIManager * FWGUIManager::m_guiManager = 0 [static, private] |
Definition at line 240 of file FWGUIManager.h.
Referenced by createView(), FWGUIManager(), getGUIManager(), and setViewPopup().
CmsShowHelpPopup* FWGUIManager::m_helpGLPopup [private] |
Definition at line 267 of file FWGUIManager.h.
Referenced by createHelpGLPopup().
CmsShowHelpPopup* FWGUIManager::m_helpPopup [private] |
Definition at line 265 of file FWGUIManager.h.
Referenced by createHelpPopup().
FWInvMassDialog* FWGUIManager::m_invMassDialog [private] |
Definition at line 262 of file FWGUIManager.h.
Referenced by showInvMassDialog(), and ~FWGUIManager().
sigc::connection FWGUIManager::m_modelChangeConn [private] |
Definition at line 276 of file FWGUIManager.h.
CmsShowModelPopup* FWGUIManager::m_modelPopup [private] |
Definition at line 259 of file FWGUIManager.h.
Referenced by addTo(), createModelPopup(), finishUpColorChange(), setFrom(), and showModelPopup().
Definition at line 271 of file FWGUIManager.h.
Referenced by createView(), and registerViewBuilder().
FWNavigatorBase* FWGUIManager::m_navigator [private] |
Definition at line 251 of file FWGUIManager.h.
Referenced by getCurrentEvent().
CmsShowHelpPopup* FWGUIManager::m_shortcutPopup [private] |
Definition at line 266 of file FWGUIManager.h.
Referenced by createShortcutPopup().
FWSummaryManager* FWGUIManager::m_summaryManager [private] |
Definition at line 245 of file FWGUIManager.h.
Referenced by createList(), and ~FWGUIManager().
std::auto_ptr<CmsShowTaskExecutor> FWGUIManager::m_tasks [private] |
Definition at line 278 of file FWGUIManager.h.
Referenced by subviewIsBeingDestroyed().
const FWViewManagerManager* FWGUIManager::m_viewManagerManager [private] |
Definition at line 249 of file FWGUIManager.h.
ViewMap_t FWGUIManager::m_viewMap [mutable, private] |
Definition at line 270 of file FWGUIManager.h.
Referenced by addTo(), checkSubviewAreaIconState(), createView(), evePreTerminate(), exportAllViews(), exportImageOfMainView(), setFrom(), setViewPopup(), subviewDestroy(), subviewDestroyAll(), and subviewInfoSelected().
CmsShowViewPopup* FWGUIManager::m_viewPopup [private] |
Definition at line 260 of file FWGUIManager.h.
Referenced by addTo(), checkSubviewAreaIconState(), popupViewClosed(), setFrom(), setViewPopup(), subviewInfoUnselected(), and ~FWGUIManager().
TEveWindowPack* FWGUIManager::m_viewPrimPack [private] |
Definition at line 273 of file FWGUIManager.h.
Referenced by addTo(), createView(), createViews(), exportImageOfMainView(), getSwapCandidate(), setFrom(), and subviewDestroyAll().
TEveWindowPack* FWGUIManager::m_viewSecPack [private] |
Definition at line 274 of file FWGUIManager.h.
Referenced by addTo(), createView(), createViews(), getSwapCandidate(), setFrom(), and subviewDestroyAll().
int FWGUIManager::m_WMDecorH [private] |
Definition at line 280 of file FWGUIManager.h.
Referenced by measureWMOffsets(), resetWMOffsets(), and setWindowInfoFrom().
int FWGUIManager::m_WMOffsetX [private] |
Definition at line 280 of file FWGUIManager.h.
Referenced by measureWMOffsets(), resetWMOffsets(), and setWindowInfoFrom().
int FWGUIManager::m_WMOffsetY [private] |
Definition at line 280 of file FWGUIManager.h.
Referenced by measureWMOffsets(), resetWMOffsets(), and setWindowInfoFrom().
sigc::signal<void, const TGWindow*> FWGUIManager::showEventFilterGUI_ |
Definition at line 207 of file FWGUIManager.h.
Referenced by FWFFLooper::beginRun(), CmsShowMain::setupDataHandling(), and showEventFilterGUI().
sigc::signal<void, const std::string&> FWGUIManager::writeToConfigurationFile_ |
Definition at line 208 of file FWGUIManager.h.
Referenced by promptForSaveConfigurationFile().
sigc::signal<void> FWGUIManager::writeToPresentConfigurationFile_ |
Definition at line 212 of file FWGUIManager.h.
Referenced by FWGUIManager().