void CSVWorld::SceneSubView::cellSelectionChanged (const CSMWorld::CellSelection& selection) { setUniversalId(CSMWorld::UniversalId(CSMWorld::UniversalId::Type_Scene, "sys::default")); int size = selection.getSize(); std::ostringstream stream; stream << "Scene: " << getUniversalId().getId(); if (size==0) stream << " (empty)"; else if (size==1) { stream << " (" << *selection.begin() << ")"; } else { stream << " (" << selection.getCentre() << " and " << size-1 << " more "; if (size>1) stream << "cells around it)"; else stream << "cell around it)"; } mTitle = stream.str(); setWindowTitle (QString::fromUtf8 (mTitle.c_str())); emit updateTitle(); }
void CSVWorld::SceneSubView::cellSelectionChanged (const CSMWorld::UniversalId& id) { setUniversalId(id); std::ostringstream stream; stream << "Scene: " << getUniversalId().getId(); setWindowTitle (QString::fromUtf8 (stream.str().c_str())); }