Tablet ui entity statistics
Showing the changes to interface/src/Application.cpp (1 of 8 files). Show all
Unified · Split
| @@ -173,6 +173,7 @@ · 172 unmodified lines | ||
| 173 | 173 | #include "ui/overlays/Overlays.h" |
| 174 | 174 | #include "Util.h" |
| 175 | 175 | #include "InterfaceParentFinder.h" |
| 176 | +#include "ui/OctreeStatsProvider.h" | |
| 176 | 177 | |
| 177 | 178 | #include "FrameTimingsScriptingInterface.h" |
| 178 | 179 | #include <GPUIdent.h> |
| @@ -523,6 +524,7 @@ bool setupEssentials(int& argc, char** argv) { · 344 unmodified lines | ||
| 523 | 524 | DependencyManager::set<OffscreenQmlSurfaceCache>(); |
| 524 | 525 | DependencyManager::set<EntityScriptClient>(); |
| 525 | 526 | DependencyManager::set<EntityScriptServerLogClient>(); |
| 527 | + DependencyManager::set<OctreeStatsProvider>(nullptr, qApp->getOcteeSceneStats()); | |
| 526 | 528 | return previousSessionCrashed; |
| 527 | 529 | } |
| 528 | 530 | |
| @@ -1807,6 +1809,7 @@ Application::~Application() { · 1278 unmodified lines | ||
| 1807 | 1809 | DependencyManager::destroy<GeometryCache>(); |
| 1808 | 1810 | DependencyManager::destroy<ScriptCache>(); |
| 1809 | 1811 | DependencyManager::destroy<SoundCache>(); |
| 1812 | + DependencyManager::destroy<OctreeStatsProvider>(); | |
| 1810 | 1813 | |
| 1811 | 1814 | ResourceManager::cleanup(); |
| 1812 | 1815 | |
| @@ -6398,6 +6401,18 @@ void Application::loadLODToolsDialog() { · 4585 unmodified lines | ||
| 6398 | 6401 | |
| 6399 | 6402 | } |
| 6400 | 6403 | |
| 6404 | + | |
| 6405 | +void Application::loadEntityStatisticsDialog() { | |
| 6406 | + auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>(); | |
| 6407 | + auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system")); | |
| 6408 | + if (tablet->getToolbarMode() || (!tablet->getTabletRoot() && !isHMDMode())) { | |
| 6409 | + auto dialogsManager = DependencyManager::get<DialogsManager>(); | |
| 6410 | + dialogsManager->octreeStatsDetails(); | |
| 6411 | + } else { | |
| 6412 | + tablet->pushOntoStack("../../hifi/dialogs/TabletEntityStatistics.qml"); | |
| 6413 | + } | |
| 6414 | + | |
| 6415 | +} | |
| 6401 | 6416 | void Application::toggleLogDialog() { |
| 6402 | 6417 | if (! _logDialog) { |
| 6403 | 6418 | _logDialog = new LogDialog(nullptr, getLogger()); |