mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
TabletEntityStatistics.qml refactored. Text now wrapped. TODO: coloring, server stats
This commit is contained in:
parent
99c74cec41
commit
d9ca8a826d
3 changed files with 74 additions and 119 deletions
|
@ -55,179 +55,91 @@ Rectangle {
|
||||||
y: hifi.dimensions.tabletMenuHeader //-bgNavBar
|
y: hifi.dimensions.tabletMenuHeader //-bgNavBar
|
||||||
spacing: 20
|
spacing: 20
|
||||||
|
|
||||||
HifiControls.Label {
|
TabletEntityStatisticsItem {
|
||||||
size: 20
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
text: qsTr("Elements on Servers:")
|
titleText: qsTr("Elements on Servers:")
|
||||||
colorScheme: root.colorScheme
|
|
||||||
}
|
|
||||||
HifiControls.Label {
|
|
||||||
id: elementsOnServerLabel
|
|
||||||
size: 16
|
|
||||||
text: OctreeStats.serverElements
|
text: OctreeStats.serverElements
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
colorScheme: root.colorScheme
|
colorScheme: root.colorScheme
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControls.Label {
|
TabletEntityStatisticsItem {
|
||||||
size: 20
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
text: qsTr("Local Elements:")
|
titleText: qsTr("Local Elements:")
|
||||||
colorScheme: root.colorScheme
|
|
||||||
}
|
|
||||||
HifiControls.Label {
|
|
||||||
id: localElementsLabel
|
|
||||||
size: 16
|
|
||||||
text: OctreeStats.localElements
|
text: OctreeStats.localElements
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
colorScheme: root.colorScheme
|
colorScheme: root.colorScheme
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControls.Label {
|
TabletEntityStatisticsItem {
|
||||||
size: 20
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
text: qsTr("Elements Memory:")
|
titleText: qsTr("Elements Memory:")
|
||||||
colorScheme: root.colorScheme
|
|
||||||
}
|
|
||||||
HifiControls.Label {
|
|
||||||
id: elementsMemoryLabel
|
|
||||||
size: 16
|
|
||||||
text: OctreeStats.localElementsMemory
|
text: OctreeStats.localElementsMemory
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
colorScheme: root.colorScheme
|
colorScheme: root.colorScheme
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControls.Label {
|
TabletEntityStatisticsItem {
|
||||||
size: 20
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
text: qsTr("Sending Mode:")
|
titleText: qsTr("Sending Mode:")
|
||||||
colorScheme: root.colorScheme
|
|
||||||
}
|
|
||||||
HifiControls.Label {
|
|
||||||
id: sendingModeLabel
|
|
||||||
size: 16
|
|
||||||
text: OctreeStats.sendingMode
|
text: OctreeStats.sendingMode
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
colorScheme: root.colorScheme
|
colorScheme: root.colorScheme
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControls.Label {
|
TabletEntityStatisticsItem {
|
||||||
size: 20
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
text: qsTr("Incoming Entity Packets:")
|
titleText: qsTr("Incoming Entity Packets:")
|
||||||
colorScheme: root.colorScheme
|
|
||||||
}
|
|
||||||
HifiControls.Label {
|
|
||||||
id: incomingEntityPacketsLabel
|
|
||||||
size: 16
|
|
||||||
text: OctreeStats.processedPackets
|
text: OctreeStats.processedPackets
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
colorScheme: root.colorScheme
|
colorScheme: root.colorScheme
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControls.Label {
|
TabletEntityStatisticsItem {
|
||||||
size: 20
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
text: qsTr("Processed Packets Elements:")
|
titleText: qsTr("Processed Packets Elements:")
|
||||||
colorScheme: root.colorScheme
|
|
||||||
}
|
|
||||||
HifiControls.Label {
|
|
||||||
id: processedPacketsElementsLabel
|
|
||||||
size: 16
|
|
||||||
text: OctreeStats.processedPacketsElements
|
text: OctreeStats.processedPacketsElements
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
colorScheme: root.colorScheme
|
colorScheme: root.colorScheme
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControls.Label {
|
TabletEntityStatisticsItem {
|
||||||
size: 20
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
text: qsTr("Processed Packets Entities:")
|
titleText: qsTr("Processed Packets Entities:")
|
||||||
colorScheme: root.colorScheme
|
|
||||||
}
|
|
||||||
HifiControls.Label {
|
|
||||||
id: processedPacketsEntitiesLabel
|
|
||||||
size: 16
|
|
||||||
text: OctreeStats.processedPacketsEntities
|
text: OctreeStats.processedPacketsEntities
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
colorScheme: root.colorScheme
|
colorScheme: root.colorScheme
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControls.Label {
|
TabletEntityStatisticsItem {
|
||||||
size: 20
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
text: qsTr("Processed Packets Timing:")
|
titleText: qsTr("Processed Packets Timing:")
|
||||||
colorScheme: root.colorScheme
|
|
||||||
}
|
|
||||||
HifiControls.Label {
|
|
||||||
id: processedPacketsTimingLabel
|
|
||||||
size: 16
|
|
||||||
text: OctreeStats.processedPacketsTiming
|
text: OctreeStats.processedPacketsTiming
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
colorScheme: root.colorScheme
|
colorScheme: root.colorScheme
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControls.Label {
|
TabletEntityStatisticsItem {
|
||||||
size: 20
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
text: qsTr("Outbound Entity Packets:")
|
titleText: qsTr("Outbound Entity Packets:")
|
||||||
colorScheme: root.colorScheme
|
|
||||||
}
|
|
||||||
HifiControls.Label {
|
|
||||||
id: outboundEntityPacketsLabel
|
|
||||||
size: 16
|
|
||||||
text: OctreeStats.outboundEditPackets
|
text: OctreeStats.outboundEditPackets
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
colorScheme: root.colorScheme
|
colorScheme: root.colorScheme
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControls.Label {
|
TabletEntityStatisticsItem {
|
||||||
size: 20
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
text: qsTr("Entity Update Time:")
|
titleText: qsTr("Entity Update Time:")
|
||||||
colorScheme: root.colorScheme
|
|
||||||
}
|
|
||||||
HifiControls.Label {
|
|
||||||
id: entityUpdateTimeLabel
|
|
||||||
size: 16
|
|
||||||
text: OctreeStats.entityUpdateTime
|
text: OctreeStats.entityUpdateTime
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
colorScheme: root.colorScheme
|
colorScheme: root.colorScheme
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControls.Label {
|
TabletEntityStatisticsItem {
|
||||||
size: 20
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
text: qsTr("Entity Updates:")
|
titleText: qsTr("Entity Updates:")
|
||||||
colorScheme: root.colorScheme
|
|
||||||
}
|
|
||||||
HifiControls.Label {
|
|
||||||
id: entityUpdatesLabel
|
|
||||||
size: 16
|
|
||||||
text: OctreeStats.entityUpdates
|
text: OctreeStats.entityUpdates
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
colorScheme: root.colorScheme
|
colorScheme: root.colorScheme
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,18 +154,12 @@ Rectangle {
|
||||||
|
|
||||||
state: "less"
|
state: "less"
|
||||||
|
|
||||||
HifiControls.Label {
|
TabletEntityStatisticsItem {
|
||||||
size: 20
|
|
||||||
width: parent.width
|
|
||||||
text: qsTr("Entity Server ") + (index+1) + ":"
|
|
||||||
colorScheme: root.colorScheme
|
|
||||||
}
|
|
||||||
HifiControls.Label {
|
|
||||||
id: entityServer1Label
|
|
||||||
size: 20
|
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
titleText: qsTr("Entity Server ") + (index+1) + ":"
|
||||||
colorScheme: root.colorScheme
|
colorScheme: root.colorScheme
|
||||||
}
|
}
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
id: buttonsRow
|
id: buttonsRow
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
//
|
||||||
|
// TabletEntityStatistics.qml
|
||||||
|
//
|
||||||
|
// Created by Vlad Stelmahovsky on 3/11/17
|
||||||
|
// Copyright 2017 High Fidelity, Inc.
|
||||||
|
//
|
||||||
|
// Distributed under the Apache License, Version 2.0.
|
||||||
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
|
//
|
||||||
|
|
||||||
|
import QtQuick 2.5
|
||||||
|
import QtQuick.Controls 1.4
|
||||||
|
import Qt.labs.settings 1.0
|
||||||
|
|
||||||
|
import "../../styles-uit"
|
||||||
|
import "../../controls-uit" as HifiControls
|
||||||
|
|
||||||
|
Column {
|
||||||
|
id: root
|
||||||
|
property int colorScheme: hifi.colorSchemes.dark
|
||||||
|
|
||||||
|
property alias titleText: titleLabel.text
|
||||||
|
property alias text: valueLabel.text
|
||||||
|
|
||||||
|
HifiConstants { id: hifi }
|
||||||
|
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
spacing: 10
|
||||||
|
|
||||||
|
HifiControls.Label {
|
||||||
|
id: titleLabel
|
||||||
|
size: 20
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
colorScheme: root.colorScheme
|
||||||
|
}
|
||||||
|
|
||||||
|
RalewaySemiBold {
|
||||||
|
id: valueLabel
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
size: 16
|
||||||
|
color: enabled ? (root.colorScheme == hifi.colorSchemes.light ? hifi.colors.lightGray : hifi.colors.lightGrayText)
|
||||||
|
: (root.colorScheme == hifi.colorSchemes.light ? hifi.colors.lightGrayText : hifi.colors.baseGrayHighlight);
|
||||||
|
}
|
||||||
|
}
|
|
@ -151,6 +151,7 @@ void OctreeStatsProvider::updateOctreeStatsData() {
|
||||||
unsigned long totalInternal = 0;
|
unsigned long totalInternal = 0;
|
||||||
unsigned long totalLeaves = 0;
|
unsigned long totalLeaves = 0;
|
||||||
|
|
||||||
|
m_sendingMode.clear();
|
||||||
NodeToOctreeSceneStats* sceneStats = qApp->getOcteeSceneStats();
|
NodeToOctreeSceneStats* sceneStats = qApp->getOcteeSceneStats();
|
||||||
sceneStats->withReadLock([&] {
|
sceneStats->withReadLock([&] {
|
||||||
for (NodeToOctreeSceneStatsIterator i = sceneStats->begin(); i != sceneStats->end(); i++) {
|
for (NodeToOctreeSceneStatsIterator i = sceneStats->begin(); i != sceneStats->end(); i++) {
|
||||||
|
|
Loading…
Reference in a new issue