#include <FWGeometryTableView.h>
Definition at line 46 of file FWGeometryTableView.h.
FWGeometryTableView::FWGeometryTableView | ( | TEveWindowSlot * | iParent, |
FWColorManager * | colMng, | ||
TGeoNode * | tn, | ||
TObjArray * | volumes | ||
) |
Definition at line 211 of file FWGeometryTableView.cc.
References FWEnumParameter::addEntry(), autoExpandChanged(), cdTop(), FWGenericParameter< T >::changed_, FWTableWidget::disableGrowInWidth(), FWGUIValidatingTextEntry::getListBox(), FWGeometryTableManager::loadGeometry(), m_autoExpand, m_eveWindow, m_filterEntry, m_filterValidator, m_frame, m_mode, m_settersFrame, m_tableManager, m_tableWidget, m_viewBox, m_visLevel, m_visLevelFilter, modeChanged(), refreshTable3D(), resetSetters(), FWTableWidget::SetBackgroundColor(), FWTableWidget::SetHeaderBackgroundColor(), FWTableWidget::SetLineSeparatorColor(), FWGUIValidatingTextEntry::setMaxListBoxHeight(), and FWGUIValidatingTextEntry::setValidator().
: FWViewBase(FWViewType::kGeometryTable), m_mode(this, "Mode:", 0l, 0l, 1l), m_filter(this,"Materials:",std::string()), m_autoExpand(this,"ExpandList:", 1l, 0l, 100l), m_visLevel(this,"VisLevel:", 3l, 1l, 100l), m_visLevelFilter(this,"IgnoreVisLevelOnFilter", true), m_topNodeIdx(this, "TopNodeIndex", -1l, 0, 1e7), m_colorManager(colMng), m_tableManager(0), m_eveTopNode(0), m_colorPopup(0), m_eveWindow(0), m_frame(0), m_viewBox(0), m_filterEntry(0), m_filterValidator(0), m_viewersConfig(0) { m_eveWindow = iParent->MakeFrame(0); TGCompositeFrame* xf = m_eveWindow->GetGUICompositeFrame(); m_frame = new TGVerticalFrame(xf); xf->AddFrame(m_frame, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY)); m_mode.addEntry(0, "Node"); m_mode.addEntry(1, "Volume"); m_tableManager = new FWGeometryTableManager(this); m_mode.changed_.connect(boost::bind(&FWGeometryTableView::modeChanged,this)); m_autoExpand.changed_.connect(boost::bind(&FWGeometryTableView::autoExpandChanged, this)); m_visLevel.changed_.connect(boost::bind(&FWGeometryTableView::refreshTable3D,this)); m_visLevelFilter.changed_.connect(boost::bind(&FWGeometryTableView::refreshTable3D,this)); // top row { TGHorizontalFrame* hp = new TGHorizontalFrame(m_frame); if (0) { TGTextButton* fileOpen = new TGTextButton (hp, "Open Geometry File"); hp->AddFrame(fileOpen); fileOpen->Connect("Clicked()","FWGeometryTableView",this,"browse()"); } { TGTextButton* rb = new TGTextButton (hp, "CdTop"); hp->AddFrame(rb, new TGLayoutHints(kLHintsNormal, 2, 2, 0, 0) ); rb->Connect("Clicked()","FWGeometryTableView",this,"cdTop()"); } { TGTextButton* rb = new TGTextButton (hp, "CdUp"); hp->AddFrame(rb, new TGLayoutHints(kLHintsNormal, 2, 2, 0, 0)); rb->Connect("Clicked()","FWGeometryTableView",this,"cdUp()"); } { m_viewBox = new FWViewCombo(hp, this); hp->AddFrame( m_viewBox,new TGLayoutHints(kLHintsExpandY, 2, 2, 0, 0)); } { hp->AddFrame(new TGLabel(hp, "Filter:"), new TGLayoutHints(kLHintsBottom, 10, 0, 0, 2)); m_filterEntry = new FWGUIValidatingTextEntry(hp); m_filterEntry->SetHeight(20); m_filterValidator = new FWGeoMaterialValidator(m_tableManager); m_filterEntry->setValidator(m_filterValidator); hp->AddFrame(m_filterEntry, new TGLayoutHints(kLHintsExpandX, 1, 2, 1, 0)); m_filterEntry->setMaxListBoxHeight(150); m_filterEntry->getListBox()->Connect("Selected(int)", "FWGeometryTableView", this, "filterListCallback()"); m_filterEntry->Connect("ReturnPressed()", "FWGeometryTableView", this, "filterTextEntryCallback()"); gVirtualX->GrabKey( m_filterEntry->GetId(),gVirtualX->KeysymToKeycode((int)kKey_A), kKeyControlMask, true); } m_frame->AddFrame(hp,new TGLayoutHints(kLHintsLeft|kLHintsExpandX, 4, 2, 2, 0)); } m_settersFrame = new TGHorizontalFrame(m_frame); m_frame->AddFrame( m_settersFrame, new TGLayoutHints(kLHintsExpandX,4,2,2,2)); m_settersFrame->SetCleanup(kDeepCleanup); m_tableWidget = new FWTableWidget(m_tableManager, m_frame); m_frame->AddFrame(m_tableWidget,new TGLayoutHints(kLHintsExpandX|kLHintsExpandY,2,2,0,0)); m_tableWidget->SetBackgroundColor(0xffffff); m_tableWidget->SetLineSeparatorColor(0x000000); m_tableWidget->SetHeaderBackgroundColor(0xececec); m_tableWidget->Connect("cellClicked(Int_t,Int_t,Int_t,Int_t,Int_t,Int_t)", "FWGeometryTableView",this, "cellClicked(Int_t,Int_t,Int_t,Int_t,Int_t,Int_t)"); m_tableWidget->disableGrowInWidth(); resetSetters(); if (tn) { m_tableManager->loadGeometry(tn, volumes); cdTop(); } m_frame->MapSubwindows(); m_frame->Layout(); xf->Layout(); m_frame->MapWindow(); }
FWGeometryTableView::~FWGeometryTableView | ( | ) | [virtual] |
Definition at line 311 of file FWGeometryTableView.cc.
References m_eveTopNode, m_eveWindow, m_frame, m_tableManager, and x.
{ if (m_eveTopNode) { while ( m_eveTopNode->HasParents()) { TEveElement* x = *m_eveTopNode->BeginParents(); x->RemoveElement(m_eveTopNode); } m_eveTopNode->DecDenyDestroy(); } // take out composite frame and delete it directly (zwithout the timeout) TGCompositeFrame *frame = m_eveWindow->GetGUICompositeFrame(); frame->RemoveFrame( m_frame ); delete m_frame; m_eveWindow->DestroyWindowAndSlot(); delete m_tableManager; }
FWGeometryTableView::FWGeometryTableView | ( | const FWGeometryTableView & | ) | [private] |
void FWGeometryTableView::addTo | ( | FWConfiguration & | iTo | ) | const [virtual] |
Reimplemented from FWConfigurableParameterizable.
Definition at line 334 of file FWGeometryTableView.cc.
References FWConfiguration::addKeyValue(), m_eveTopNode, and n.
{ FWConfigurableParameterizable::addTo(iTo); FWConfiguration viewers(1); if (m_eveTopNode) { for (TEveElement::List_i it = m_eveTopNode->BeginParents(); it != m_eveTopNode->EndParents(); ++it ) { FWConfiguration tempArea; TEveScene* scene = dynamic_cast<TEveScene*>(*it); std::string n = scene->GetElementName(); viewers.addKeyValue(n, tempArea); } } iTo.addKeyValue("Viewers", viewers, true); }
void FWGeometryTableView::autoExpandChanged | ( | ) | [private] |
Definition at line 768 of file FWGeometryTableView.cc.
References FWGeometryTableManager::checkExpandLevel(), m_tableManager, and FWGeometryTableManager::redrawTable().
Referenced by FWGeometryTableView().
{ m_tableManager->checkExpandLevel(); m_tableManager->redrawTable(); }
void FWGeometryTableView::cdNode | ( | int | idx | ) |
Definition at line 647 of file FWGeometryTableView.cc.
References FWGeometryTableManager::getNodePath(), m_tableManager, AlCaHLTBitMon_ParallelJobs::p, and setPath().
Referenced by chosenItem(), and setFrom().
{ std::string p; m_tableManager->getNodePath(idx, p); setPath(idx, p); }
void FWGeometryTableView::cdTop | ( | ) |
Definition at line 654 of file FWGeometryTableView.cc.
References m_tableManager, path(), FWGeometryTableManager::refEntries(), and setPath().
Referenced by FWGeometryTableView().
{ std::string path = "/" ; path += m_tableManager->refEntries().at(0).name(); setPath(-1, path ); }
void FWGeometryTableView::cdUp | ( | ) |
Definition at line 661 of file FWGeometryTableView.cc.
References FWGeometryTableManager::getNodePath(), getTopNodeIdx(), m_tableManager, AlCaHLTBitMon_ParallelJobs::p, FWGeometryTableManager::refEntries(), and setPath().
{ if ( getTopNodeIdx() != -1) { int pIdx = m_tableManager->refEntries()[getTopNodeIdx()].m_parent; std::string p; m_tableManager->getNodePath(pIdx, p); setPath(pIdx, p); } }
void FWGeometryTableView::cellClicked | ( | Int_t | iRow, |
Int_t | iColumn, | ||
Int_t | iButton, | ||
Int_t | iKeyMod, | ||
Int_t | iGlobalX, | ||
Int_t | iGlobalY | ||
) |
Definition at line 472 of file FWGeometryTableView.cc.
References FWColorManager::backgroundColorIndex(), colors, FWTableManagerBase::dataChanged(), FWColorManager::fillLimitedColors(), FWGeometryTableManager::firstColumnClicked(), FWGeometryTableManager::getVisibility(), FWGeometryTableManager::getVisibilityChld(), FWColorPopup::InitContent(), FWColorManager::kBlackIndex, kCamera, FWGeometryTableManager::kColor, kInspectMaterial, kInspectShape, FWGeometryTableManager::kName, kSetTopNode, kSetTopNodeCam, kTableDebug, FWGeometryTableManager::kVisChild, kVisOff, kVisOn, FWGeometryTableManager::kVisSelf, m_colorManager, m_colorPopup, m_eveTopNode, m_tableManager, FWColorPopup::PlacePopup(), FWGeometryTableManager::refSelected(), FWColorPopup::ResetColors(), FWColorPopup::SetName(), FWGeometryTableManager::setSelection(), FWGeometryTableManager::setVisibility(), and FWGeometryTableManager::setVisibilityChld().
{ m_tableManager->setSelection(iRow, iColumn, iButton); FWGeometryTableManager::NodeInfo& ni = *m_tableManager->refSelected(); if (iButton == kButton1) { if (iColumn == FWGeometryTableManager::kName) { m_tableManager->firstColumnClicked(iRow); return; } else if (iColumn == FWGeometryTableManager::kColor) { std::vector<Color_t> colors; m_colorManager->fillLimitedColors(colors); if (!m_colorPopup) { m_colorPopup = new FWColorPopup(gClient->GetDefaultRoot(), colors.front()); m_colorPopup->InitContent("", colors); m_colorPopup->Connect("ColorSelected(Color_t)","FWGeometryTableView", const_cast<FWGeometryTableView*>(this), "nodeColorChangeRequested(Color_t)"); } m_colorPopup->SetName("Selected"); m_colorPopup->ResetColors(colors, m_colorManager->backgroundColorIndex()==FWColorManager::kBlackIndex); m_colorPopup->PlacePopup(x, y, m_colorPopup->GetDefaultWidth(), m_colorPopup->GetDefaultHeight()); return; } else { bool elementChanged = false; if (iColumn == FWGeometryTableManager::kVisSelf) { m_tableManager->setVisibility(ni, !m_tableManager->getVisibility(ni)); elementChanged = true; } if (iColumn == FWGeometryTableManager::kVisChild) { m_tableManager->setVisibilityChld(ni, !m_tableManager->getVisibilityChld(ni));; elementChanged = true; } if (m_eveTopNode && elementChanged) { m_eveTopNode->ElementChanged(); gEve->RegisterRedraw3D(); } } m_tableManager->dataChanged(); } else if (iColumn == FWGeometryTableManager::kName) { FWPopupMenu* m_nodePopup = new FWPopupMenu(); m_nodePopup->AddEntry("Set As Top Node", kSetTopNode); m_nodePopup->AddEntry("Set As Top Node And Camera Center", kSetTopNodeCam); m_nodePopup->AddSeparator(); m_nodePopup->AddEntry("Rnr Off For All Children", kVisOff); m_nodePopup->AddEntry("Rnr On For All Children", kVisOn); m_nodePopup->AddSeparator(); m_nodePopup->AddEntry("Set Camera Center", kCamera); m_nodePopup->AddSeparator(); m_nodePopup->AddEntry("InspectMaterial", kInspectMaterial); m_nodePopup->AddEntry("InspectShape", kInspectShape); m_nodePopup->AddEntry("Table Debug", kTableDebug); m_nodePopup->PlaceMenu(x,y,true,true); m_nodePopup->Connect("Activated(Int_t)", "FWGeometryTableView", const_cast<FWGeometryTableView*>(this), "chosenItem(Int_t)"); } }
void FWGeometryTableView::chosenItem | ( | int | x | ) |
Definition at line 548 of file FWGeometryTableView.cc.
References cdNode(), FWGeometryTableManager::getNodeMatrix(), kCamera, kInspectMaterial, kInspectShape, kSetTopNode, kSetTopNodeCam, kTableDebug, kVisOff, kVisOn, FWGeometryTableManager::NodeInfo::m_node, FWGeometryTableManager::m_selectedIdx, m_tableManager, mergeVDriftHistosByStation::name, FWGeometryTableManager::printMaterials(), refreshTable3D(), FWGeometryTableManager::refSelected(), FWGeometryTableManager::setDaughtersSelfVisibility(), and v.
{ FWGeometryTableManager::NodeInfo& ni = *m_tableManager->refSelected(); TGeoVolume* gv = ni.m_node->GetVolume(); bool visible = true; bool resetHome = false; if (gv) { switch (x) { case kVisOff: visible = false; case kVisOn: m_tableManager->setDaughtersSelfVisibility(visible); refreshTable3D(); break; case kInspectMaterial: gv->InspectMaterial(); break; case kInspectShape: gv->InspectShape(); break; case kTableDebug: // std::cout << "node name " << ni.name() << "parent " <<m_tableManager->refEntries()[ni.m_parent].name() << std::endl; // printf("node expanded [%d] imported[%d] children[%d]\n", ni.m_expanded,m_tableManager->nodeImported(m_tableManager->m_selectedIdx) , ni.m_node->GetNdaughters()); // m_tableManager->printChildren( // m_tableManager->m_selectedIdx); m_tableManager->printMaterials(); break; case kSetTopNode: cdNode(m_tableManager->m_selectedIdx); break; case kSetTopNodeCam: cdNode(m_tableManager->m_selectedIdx); resetHome = true; case kCamera: { TGeoHMatrix mtx; m_tableManager->getNodeMatrix( ni, mtx); static double pnt[3]; TGeoBBox* bb = static_cast<TGeoBBox*>( ni.m_node->GetVolume()->GetShape()); const double* origin = bb->GetOrigin(); mtx.LocalToMaster(origin, pnt); TEveElementList* vl = gEve->GetViewers(); for (TEveElement::List_i it = vl->BeginChildren(); it != vl->EndChildren(); ++it) { TEveViewer* v = ((TEveViewer*)(*it)); TString name = v->GetElementName(); if (name.Contains("3D")) { v->GetGLViewer()->SetDrawCameraCenter(true); TGLCamera& cam = v->GetGLViewer()->CurrentCamera(); cam.SetExternalCenter(true); cam.SetCenterVec(pnt[0], pnt[1], pnt[2]); } } if (resetHome) gEve->FullRedraw3D(true, true); break; } } } }
FWGeometryTableView::ClassDef | ( | FWGeometryTableView | , |
0 | |||
) | [private] |
void FWGeometryTableView::filterListCallback | ( | ) |
Definition at line 712 of file FWGeometryTableView.cc.
References FWGUIValidatingTextEntry::getListBox(), list(), m_filterEntry, m_filterValidator, FWGeoMaterialValidator::m_list, and updateFilter().
{ // std::cout << "list click ed \n" ; TGListBox* list = m_filterEntry->getListBox(); TList selected; list->GetSelectedEntries(&selected); if (selected.GetEntries() == 1) { const TGLBEntry* entry = dynamic_cast<TGLBEntry*> (selected.First()); updateFilter( m_filterValidator->m_list[ entry->EntryId()].n); } }
void FWGeometryTableView::filterTextEntryCallback | ( | ) |
Definition at line 697 of file FWGeometryTableView.cc.
References funct::exp(), fwLog, FWGeoMaterialValidator::isStringValid(), fwlog::kError, m_filterEntry, m_filterValidator, and updateFilter().
{ // std::cout << "text entry click ed \n" ; std::string exp = m_filterEntry->GetText(); if ( m_filterValidator->isStringValid(exp)) { updateFilter(exp); } else { fwLog(fwlog::kError) << "filter expression not valid." << std::endl; return; } }
int FWGeometryTableView::getAutoExpand | ( | ) | const [inline] |
Definition at line 78 of file FWGeometryTableView.h.
References m_autoExpand, and FWGenericParameter< T >::value().
Referenced by FWGeometryTableManager::checkExpandLevel(), FWGeometryTableManager::importChildren(), and FWGeometryTableManager::loadGeometry().
{ return m_autoExpand.value(); }
std::string FWGeometryTableView::getFilter | ( | ) | const [inline] |
Definition at line 77 of file FWGeometryTableView.h.
References m_filter, and FWGenericParameter< T >::value().
Referenced by FWGeoTopNode::Paint(), and FWGeometryTableManager::updateFilter().
bool FWGeometryTableView::getIgnoreVisLevelWhenFilter | ( | ) | const [inline] |
Definition at line 80 of file FWGeometryTableView.h.
References m_visLevelFilter, and FWGenericParameter< T >::value().
Referenced by FWGeoTopNode::paintChildNodesRecurse().
{return m_visLevelFilter.value(); }
FWGeometryTableManager* FWGeometryTableView::getTableManager | ( | ) | [inline] |
Definition at line 83 of file FWGeometryTableView.h.
References m_tableManager.
Referenced by FWGeoTopNode::FWGeoTopNode(), FWGeoTopNode::Paint(), and FWGeoTopNode::paintChildNodesRecurse().
{ return m_tableManager;}
int FWGeometryTableView::getTopNodeIdx | ( | ) | const [inline] |
Definition at line 82 of file FWGeometryTableView.h.
References m_topNodeIdx, and FWGenericParameter< T >::value().
Referenced by cdUp(), FWGeoTopNode::Paint(), FWGeometryTableManager::recalculateVisibility(), and FWGeometryTableManager::updateFilter().
{ return m_topNodeIdx.value(); }
int FWGeometryTableView::getVisLevel | ( | ) | const [inline] |
Definition at line 79 of file FWGeometryTableView.h.
References m_visLevel, and FWGenericParameter< T >::value().
Referenced by FWGeoTopNode::Paint().
{return m_visLevel.value(); }
bool FWGeometryTableView::getVolumeMode | ( | ) | const [inline] |
Definition at line 76 of file FWGeometryTableView.h.
References m_mode, and FWGenericParameter< T >::value().
Referenced by FWGeometryTableManager::cellRenderer(), FWGeometryTableManager::getTitles(), FWGeometryTableManager::getVisibility(), FWGeometryTableManager::getVisibilityChld(), FWGeoTopNode::paintShape(), FWGeometryTableManager::recalculateVisibility(), FWGeometryTableManager::setVisibility(), and FWGeometryTableManager::setVisibilityChld().
void FWGeometryTableView::loadGeometry | ( | ) | [private] |
void FWGeometryTableView::makeSetter | ( | TGCompositeFrame * | frame, |
FWParameterBase * | param | ||
) | [private] |
Definition at line 420 of file FWGeometryTableView.cc.
References m_frame, m_setters, and FWParameterSetterBase::makeSetterFor().
Referenced by resetSetters().
{ boost::shared_ptr<FWParameterSetterBase> ptr( FWParameterSetterBase::makeSetterFor(param) ); ptr->attach(param, this); TGFrame* m_frame = ptr->build(frame, false); frame->AddFrame(m_frame, new TGLayoutHints(kLHintsExpandX)); m_setters.push_back(ptr); }
void FWGeometryTableView::modeChanged | ( | ) | [private] |
Definition at line 758 of file FWGeometryTableView.cc.
References m_tableManager, refreshTable3D(), and FWGeometryTableManager::updateFilter().
Referenced by FWGeometryTableView().
{ // reset filter when change mode // std::cout << "chage mode \n"; m_tableManager->updateFilter(); refreshTable3D(); }
void FWGeometryTableView::nodeColorChangeRequested | ( | Color_t | col | ) |
Definition at line 629 of file FWGeometryTableView.cc.
References FWGeometryTableManager::NodeInfo::m_color, FWGeometryTableManager::NodeInfo::m_node, m_tableManager, refreshTable3D(), and FWGeometryTableManager::refSelected().
{ FWGeometryTableManager::NodeInfo& ni = *m_tableManager->refSelected(); ni.m_color = col; ni.m_node->GetVolume()->SetLineColor(col); refreshTable3D(); }
const FWGeometryTableView& FWGeometryTableView::operator= | ( | const FWGeometryTableView & | ) | [private] |
void FWGeometryTableView::populate3DViewsFromConfig | ( | ) |
Definition at line 368 of file FWGeometryTableView.cc.
References FWConfiguration::keyValues(), m_eveTopNode, m_viewBox, m_viewersConfig, asciidump::s, and FWViewCombo::setElement().
Referenced by FWGUIManager::setFrom().
{ // post-config if (m_viewersConfig) { TEveElementList* scenes = gEve->GetScenes(); const FWConfiguration::KeyValues* keyVals = m_viewersConfig->keyValues(); if(0!=keyVals) { for(FWConfiguration::KeyValuesIt it = keyVals->begin(); it!= keyVals->end(); ++it) { TString sname = it->first; TEveElement* s = scenes->FindChild(sname); if (s) { // std::cout << sname.Data() << std::endl; if (!m_eveTopNode) { m_eveTopNode = new FWGeoTopNode(this); m_eveTopNode->IncDenyDestroy(); m_viewBox->setElement(m_eveTopNode); } s->AddElement(m_eveTopNode); } } } } }
void FWGeometryTableView::printTable | ( | ) |
Definition at line 638 of file FWGeometryTableView.cc.
References m_tableManager, and FWGeometryTableManager::printChildren().
{ // print all entries m_tableManager->printChildren(-1); }
void FWGeometryTableView::refreshTable3D | ( | ) | [private] |
Definition at line 775 of file FWGeometryTableView.cc.
References m_eveTopNode, m_tableManager, and FWGeometryTableManager::redrawTable().
Referenced by chosenItem(), FWGeometryTableView(), modeChanged(), nodeColorChangeRequested(), setPath(), and updateFilter().
{ m_tableManager->redrawTable(); if ( m_eveTopNode) { m_eveTopNode->ElementChanged(); gEve->FullRedraw3D(false, true); } }
void FWGeometryTableView::resetSetters | ( | ) | [private] |
Definition at line 396 of file FWGeometryTableView.cc.
References f, m_autoExpand, m_frame, m_mode, m_setters, m_settersFrame, m_visLevel, m_visLevelFilter, and makeSetter().
Referenced by FWGeometryTableView(), and setFrom().
{ if (!m_settersFrame->GetList()->IsEmpty()) { m_setters.clear(); TGFrameElement *el = (TGFrameElement*) m_settersFrame->GetList()->First(); TGHorizontalFrame* f = (TGHorizontalFrame*) el->fFrame; m_settersFrame->RemoveFrame(f); } TGHorizontalFrame* frame = new TGHorizontalFrame(m_settersFrame); m_settersFrame->AddFrame(frame, new TGLayoutHints(kLHintsExpandX,4,2,2,2) ); m_settersFrame->SetCleanup(kDeepCleanup); makeSetter(frame, &m_mode); makeSetter(frame, &m_autoExpand); makeSetter(frame, &m_visLevel); makeSetter(frame, &m_visLevelFilter); m_settersFrame->MapSubwindows(); m_frame->Layout(); }
virtual void FWGeometryTableView::saveImageTo | ( | const std::string & | iName | ) | const [inline, virtual] |
void FWGeometryTableView::selectView | ( | int | idx | ) |
Definition at line 435 of file FWGeometryTableView.cc.
References m_eveTopNode, m_viewBox, FWViewCombo::setElement(), and v.
{ TEveElement::List_i it = gEve->GetViewers()->BeginChildren(); std::advance(it, idx); TEveViewer* v = (TEveViewer*)(*it); TEveSceneInfo* si = (TEveSceneInfo*)v->FindChild(Form("SI - EventScene %s",v->GetElementName())); bool added = false; if (!m_eveTopNode) { m_eveTopNode = new FWGeoTopNode(this); m_eveTopNode->IncDenyDestroy(); m_viewBox->setElement(m_eveTopNode); } else { for (TEveElement::List_i it = m_eveTopNode->BeginParents(); it != m_eveTopNode->EndParents(); ++it ){ if (*it == si->GetScene()) { added = true; break; } } } printf("add node %s \n", si->GetElementName()); if (added) si->GetScene()->RemoveElement(m_eveTopNode); else si->GetScene()->AddElement(m_eveTopNode); m_eveTopNode->ElementChanged(); gEve->Redraw3D(); }
void FWGeometryTableView::setBackgroundColor | ( | ) |
Definition at line 615 of file FWGeometryTableView.cc.
References FWColorManager::backgroundColorIndex(), FWColorManager::kWhiteIndex, m_colorManager, m_tableManager, m_tableWidget, FWTableWidget::SetBackgroundColor(), FWGeometryTableManager::setBackgroundToWhite(), and FWTableWidget::SetLineSeparatorColor().
{ bool backgroundIsWhite = m_colorManager->backgroundColorIndex()==FWColorManager::kWhiteIndex; if(backgroundIsWhite) { m_tableWidget->SetBackgroundColor(0xffffff); m_tableWidget->SetLineSeparatorColor(0x000000); } else { m_tableWidget->SetBackgroundColor(0x000000); m_tableWidget->SetLineSeparatorColor(0xffffff); } m_tableManager->setBackgroundToWhite(backgroundIsWhite); gClient->NeedRedraw(m_tableWidget); }
void FWGeometryTableView::setFrom | ( | const FWConfiguration & | iFrom | ) | [virtual] |
Reimplemented from FWConfigurableParameterizable.
Definition at line 353 of file FWGeometryTableView.cc.
References FWParameterizable::begin(), cdNode(), FWParameterizable::end(), m_filter, m_filterEntry, m_topNodeIdx, m_viewersConfig, resetSetters(), FWGenericParameter< T >::value(), and FWConfiguration::valueForKey().
{ for(const_iterator it =begin(), itEnd = end(); it != itEnd; ++it) { (*it)->setFrom(iFrom); } m_filterEntry->SetText(m_filter.value().c_str(), false); resetSetters(); cdNode(m_topNodeIdx.value()); m_viewersConfig = iFrom.valueForKey("Viewers"); }
void FWGeometryTableView::setPath | ( | int | parentIdx, |
std::string & | path | ||
) |
Definition at line 672 of file FWGeometryTableView.cc.
References FWGeometryTableManager::checkExpandLevel(), m_eveTopNode, m_tableManager, m_topNodeIdx, FWGeometryTableManager::redrawTable(), refreshTable3D(), FWGenericParameter< T >::set(), FWGeometryTableManager::topGeoNodeChanged(), and FWGeometryTableManager::updateFilter().
Referenced by cdNode(), cdTop(), and cdUp().
{ m_topNodeIdx.set(parentIdx); #ifdef PERFTOOL_BROWSER ProfilerStart(Form("cdPath%d.prof", parentIdx)); #endif m_tableManager->topGeoNodeChanged(parentIdx); m_tableManager->updateFilter(); m_tableManager->checkExpandLevel(); refreshTable3D(); // printf("END Set Path to [%s], curren node %s \n", m_path.value().c_str(), topNode->GetName()); m_tableManager->redrawTable(); if ( m_eveTopNode) { m_eveTopNode->ElementChanged(); gEve->FullRedraw3D(false, true); } #ifdef PERFTOOL_BROWSER ProfilerStop(); #endif }
void FWGeometryTableView::updateFilter | ( | std::string & | exp | ) |
Definition at line 727 of file FWGeometryTableView.cc.
References FWGeometryTableManager::checkExpandLevel(), i, m_filter, m_filterEntry, m_filterValidator, FWGeoMaterialValidator::m_list, m_tableManager, FWGeometryTableManager::refEntries(), refreshTable3D(), FWGenericParameter< T >::set(), FWGeometryTableManager::setVisibility(), FWGeometryTableManager::setVisibilityChld(), FWGeometryTableManager::updateFilter(), and FWGenericParameter< T >::value().
Referenced by filterListCallback(), and filterTextEntryCallback().
{ // std::cout << "=FWGeometryTableView::updateFilter()" << m_filterEntry->GetText() <<std::endl; if (exp == m_filterValidator->m_list.begin()->n) exp.clear(); if (exp == m_filter.value()) return; if (exp.empty()) { // std::cout << "FITLER OFF \n"; for (FWGeometryTableManager::Entries_i i = m_tableManager->refEntries().begin(); i != m_tableManager->refEntries().end(); ++i) { m_tableManager->setVisibility(*i, true); m_tableManager->setVisibilityChld(*i, true); } // NOTE: entry should be cleared automatically m_filterEntry->Clear(); m_tableManager->checkExpandLevel(); } m_filter.set(exp); m_tableManager->updateFilter(); refreshTable3D(); }
Definition at line 103 of file FWGeometryTableView.h.
Referenced by FWGeometryTableView(), getAutoExpand(), and resetSetters().
Definition at line 109 of file FWGeometryTableView.h.
Referenced by cellClicked(), and setBackgroundColor().
FWColorPopup* FWGeometryTableView::m_colorPopup [private] |
Definition at line 116 of file FWGeometryTableView.h.
Referenced by cellClicked().
FWGeoTopNode* FWGeometryTableView::m_eveTopNode [private] |
Definition at line 114 of file FWGeometryTableView.h.
Referenced by addTo(), cellClicked(), populate3DViewsFromConfig(), refreshTable3D(), selectView(), setPath(), and ~FWGeometryTableView().
TEveWindowFrame* FWGeometryTableView::m_eveWindow [private] |
Definition at line 118 of file FWGeometryTableView.h.
Referenced by FWGeometryTableView(), and ~FWGeometryTableView().
Definition at line 102 of file FWGeometryTableView.h.
Referenced by getFilter(), setFrom(), and updateFilter().
Definition at line 123 of file FWGeometryTableView.h.
Referenced by filterListCallback(), filterTextEntryCallback(), FWGeometryTableView(), setFrom(), and updateFilter().
Definition at line 124 of file FWGeometryTableView.h.
Referenced by filterListCallback(), filterTextEntryCallback(), FWGeometryTableView(), and updateFilter().
TGCompositeFrame* FWGeometryTableView::m_frame [private] |
Definition at line 119 of file FWGeometryTableView.h.
Referenced by FWGeometryTableView(), makeSetter(), resetSetters(), and ~FWGeometryTableView().
FWEnumParameter FWGeometryTableView::m_mode [private] |
Definition at line 101 of file FWGeometryTableView.h.
Referenced by FWGeometryTableView(), getVolumeMode(), and resetSetters().
std::vector<boost::shared_ptr<FWParameterSetterBase> > FWGeometryTableView::m_setters [private] |
Definition at line 129 of file FWGeometryTableView.h.
Referenced by makeSetter(), and resetSetters().
TGCompositeFrame* FWGeometryTableView::m_settersFrame [private] |
Definition at line 113 of file FWGeometryTableView.h.
Referenced by FWGeometryTableView(), and resetSetters().
Definition at line 111 of file FWGeometryTableView.h.
Referenced by autoExpandChanged(), cdNode(), cdTop(), cdUp(), cellClicked(), chosenItem(), FWGeometryTableView(), getTableManager(), modeChanged(), nodeColorChangeRequested(), printTable(), refreshTable3D(), setBackgroundColor(), setPath(), updateFilter(), and ~FWGeometryTableView().
FWTableWidget* FWGeometryTableView::m_tableWidget [private] |
Definition at line 110 of file FWGeometryTableView.h.
Referenced by FWGeometryTableView(), and setBackgroundColor().
Definition at line 106 of file FWGeometryTableView.h.
Referenced by getTopNodeIdx(), setFrom(), and setPath().
FWViewCombo* FWGeometryTableView::m_viewBox [private] |
Definition at line 121 of file FWGeometryTableView.h.
Referenced by FWGeometryTableView(), populate3DViewsFromConfig(), and selectView().
const FWConfiguration* FWGeometryTableView::m_viewersConfig [private] |
Definition at line 126 of file FWGeometryTableView.h.
Referenced by populate3DViewsFromConfig(), and setFrom().
Definition at line 104 of file FWGeometryTableView.h.
Referenced by FWGeometryTableView(), getVisLevel(), and resetSetters().
Definition at line 105 of file FWGeometryTableView.h.
Referenced by FWGeometryTableView(), getIgnoreVisLevelWhenFilter(), and resetSetters().