mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
BUGZ-746: About tab: Better CPU/GPU info reporting; New copied info (including OS version)
This commit is contained in:
parent
8ee482f7ab
commit
3e2e020731
2 changed files with 74 additions and 5 deletions
|
@ -122,12 +122,22 @@ Flickable {
|
|||
}
|
||||
|
||||
HifiStylesUit.GraphikRegular {
|
||||
text: "<b>CPU:</b> " + PlatformInfo.getCPUBrand()
|
||||
text: "<b>CPU:</b>"
|
||||
Layout.maximumWidth: parent.width
|
||||
height: paintedHeight
|
||||
size: 16
|
||||
color: simplifiedUI.colors.text.white
|
||||
wrapMode: Text.Wrap
|
||||
|
||||
Component.onCompleted: {
|
||||
var cpu = JSON.parse(PlatformInfo.getCPU(0));
|
||||
var cpuModel = cpu.model;
|
||||
if (cpuModel.length === 0) {
|
||||
cpuModel = "Unknown";
|
||||
}
|
||||
|
||||
text = "<b>CPU:</b> " + cpuModel;
|
||||
}
|
||||
}
|
||||
|
||||
HifiStylesUit.GraphikRegular {
|
||||
|
@ -158,12 +168,22 @@ Flickable {
|
|||
}
|
||||
|
||||
HifiStylesUit.GraphikRegular {
|
||||
text: "<b>GPU:</b> " + PlatformInfo.getGraphicsCardType()
|
||||
text: "<b>GPU:</b> "
|
||||
Layout.maximumWidth: parent.width
|
||||
height: paintedHeight
|
||||
size: 16
|
||||
color: simplifiedUI.colors.text.white
|
||||
wrapMode: Text.Wrap
|
||||
|
||||
Component.onCompleted: {
|
||||
var gpu = JSON.parse(PlatformInfo.getGPU(0));
|
||||
var gpuModel = gpu.model;
|
||||
if (gpuModel.length === 0) {
|
||||
gpuModel = "Unknown";
|
||||
}
|
||||
|
||||
text = "<b>GPU:</b> " + gpuModel;
|
||||
}
|
||||
}
|
||||
|
||||
HifiStylesUit.GraphikRegular {
|
||||
|
@ -180,9 +200,11 @@ Flickable {
|
|||
width: 200
|
||||
height: 32
|
||||
text: "Copy to Clipboard"
|
||||
temporaryText: "Copied!"
|
||||
|
||||
onClicked: {
|
||||
Window.copyToClipboard(root.buildPlatformInfoTextToCopy());
|
||||
showTemporaryText();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -206,12 +228,29 @@ Flickable {
|
|||
textToCopy += "Computer Vendor/Model: " + computerVendor + "/" + computerModel + "\n";
|
||||
textToCopy += "Profiled Platform Tier: " + PlatformInfo.getTierProfiled() + "\n";
|
||||
textToCopy += "OS Type: " + PlatformInfo.getOperatingSystemType() + "\n";
|
||||
textToCopy += "CPU: " + PlatformInfo.getCPUBrand() + "\n";
|
||||
|
||||
var cpu = JSON.parse(PlatformInfo.getCPU(0));
|
||||
var cpuModel = cpu.model;
|
||||
if (cpuModel.length === 0) {
|
||||
cpuModel = "Unknown";
|
||||
}
|
||||
|
||||
textToCopy += "CPU: " + cpuModel + "\n";
|
||||
textToCopy += "# CPUs: " + PlatformInfo.getNumCPUs() + "\n";
|
||||
textToCopy += "# CPU Cores: " + PlatformInfo.getNumLogicalCores() + "\n";
|
||||
textToCopy += "RAM: " + PlatformInfo.getTotalSystemMemoryMB() + " MB\n";
|
||||
textToCopy += "GPU: " + PlatformInfo.getGraphicsCardType() + "\n";
|
||||
textToCopy += "VR Hand Controllers: " + (PlatformInfo.hasRiftControllers() ? "Rift" : (PlatformInfo.hasViveControllers() ? "Vive" : "None"));
|
||||
|
||||
var gpu = JSON.parse(PlatformInfo.getGPU(0));
|
||||
var gpuModel = gpu.model;
|
||||
if (gpuModel.length === 0) {
|
||||
gpuModel = "Unknown";
|
||||
}
|
||||
|
||||
textToCopy += "GPU: " + gpuModel + "\n";
|
||||
textToCopy += "VR Hand Controllers: " + (PlatformInfo.hasRiftControllers() ? "Rift" : (PlatformInfo.hasViveControllers() ? "Vive" : "None")) + "\n";
|
||||
|
||||
textToCopy += "\n**All Platform Info**\n";
|
||||
textToCopy += JSON.stringify(JSON.parse(PlatformInfo.getPlatform()), null, 4);
|
||||
|
||||
return textToCopy;
|
||||
}
|
||||
|
|
|
@ -16,6 +16,9 @@ import TabletScriptingInterface 1.0
|
|||
|
||||
Original.Button {
|
||||
id: root
|
||||
// The two properties below are used when calling showTemporaryText()
|
||||
property string originalText: ""
|
||||
property string temporaryText: ""
|
||||
|
||||
SimplifiedConstants.SimplifiedConstants {
|
||||
id: simplifiedUI
|
||||
|
@ -103,4 +106,31 @@ Original.Button {
|
|||
horizontalAlignment: Text.AlignHCenter
|
||||
text: root.text
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: showTemporaryTextTimer
|
||||
interval: 1500
|
||||
repeat: false
|
||||
running: false
|
||||
|
||||
onTriggered: {
|
||||
buttonText.text = root.originalText;
|
||||
root.originalText = "";
|
||||
}
|
||||
}
|
||||
|
||||
function showTemporaryText() {
|
||||
if (root.temporaryText === "") {
|
||||
return;
|
||||
}
|
||||
|
||||
if (showTemporaryTextTimer.running) {
|
||||
showTemporaryTextTimer.restart();
|
||||
return;
|
||||
}
|
||||
|
||||
root.originalText = buttonText.text;
|
||||
buttonText.text = root.temporaryText;
|
||||
showTemporaryTextTimer.start();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue