mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:09:24 +02:00
Starting to buiuild on the jet component and adding the widget to luci and workload inspectors
This commit is contained in:
parent
efd2b2720b
commit
ff5b418ddf
6 changed files with 34 additions and 38 deletions
|
@ -65,8 +65,9 @@ function job_print_functor(printout, maxDepth) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Expose functions for regular js including this files through the 'Jet' object
|
// Expose functions for regular js including this files through the 'Jet' object
|
||||||
Jet = {}
|
/*Jet = {}
|
||||||
Jet.task_traverse = task_traverse
|
Jet.task_traverse = task_traverse
|
||||||
Jet.task_traverseTree = task_traverseTree
|
Jet.task_traverseTree = task_traverseTree
|
||||||
Jet.job_propKeys = job_propKeys
|
Jet.job_propKeys = job_propKeys
|
||||||
Jet.job_print_functor = job_print_functor
|
Jet.job_print_functor = job_print_functor
|
||||||
|
*/
|
|
@ -15,24 +15,13 @@ import QtQuick.Controls.Styles 1.4
|
||||||
import "qrc:///qml/styles-uit"
|
import "qrc:///qml/styles-uit"
|
||||||
import "qrc:///qml/controls-uit" as HifiControls
|
import "qrc:///qml/controls-uit" as HifiControls
|
||||||
|
|
||||||
//import QtQuick 2.7
|
import "../jet.js" as Jet
|
||||||
//import QtQuick.Controls 1.4 as Original
|
|
||||||
//import QtQuick.Controls.Styles 1.4
|
|
||||||
|
|
||||||
//import QtQuick 2.5
|
|
||||||
//import QtQuick.Controls 1.4
|
|
||||||
//import Hifi 1.0 as Hifi
|
|
||||||
|
|
||||||
//import "qrc:///qml/styles-uit"
|
|
||||||
//import "qrc:///qml/controls-uit" as HifiControls
|
|
||||||
|
|
||||||
import "jet.js" as Jet
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
width: parent ? parent.width : 200
|
// width: parent ? parent.width : 200
|
||||||
height: parent ? parent.height : 400
|
// height: parent ? parent.height : 400
|
||||||
property var rootConfig
|
property var rootConfig : Workload
|
||||||
|
|
||||||
Original.TextArea {
|
Original.TextArea {
|
||||||
id: textArea
|
id: textArea
|
||||||
|
@ -44,7 +33,7 @@ Rectangle {
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
var message = ""
|
var message = ""
|
||||||
var functor = Jet.job_print_functor(function (line) { message += line + "\n"; });
|
var functor = Jet.job_print_functor(function (line) { message += line + "\n"; });
|
||||||
Jet.task_traverseTree(Workload, functor);
|
Jet.task_traverseTree(rootConfig, functor);
|
||||||
textArea.append(message);
|
textArea.append(message);
|
||||||
}
|
}
|
||||||
function fromScript(mope) {
|
function fromScript(mope) {
|
1
scripts/developer/utilities/lib/jet/qml/qmldir
Normal file
1
scripts/developer/utilities/lib/jet/qml/qmldir
Normal file
|
@ -0,0 +1 @@
|
||||||
|
TaskList 1.0 TaskList.qml
|
|
@ -14,6 +14,7 @@ import QtQuick.Layouts 1.3
|
||||||
import "qrc:///qml/styles-uit"
|
import "qrc:///qml/styles-uit"
|
||||||
import "qrc:///qml/controls-uit" as HifiControls
|
import "qrc:///qml/controls-uit" as HifiControls
|
||||||
import "configSlider"
|
import "configSlider"
|
||||||
|
import "../lib/jet/qml" as Jet
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
HifiConstants { id: hifi;}
|
HifiConstants { id: hifi;}
|
||||||
|
@ -274,6 +275,15 @@ Rectangle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Separator {}
|
||||||
|
|
||||||
|
Jet.TaskList {
|
||||||
|
rootConfig: Render
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
height: 200
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +1,12 @@
|
||||||
Script.include('../lib/jet/jet.js');
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
(function() { // BEGIN LOCAL_SCOPE
|
(function() { // BEGIN LOCAL_SCOPE
|
||||||
//jet.task_traverseTree(Render, printJob);
|
var qml = Script.resolvePath('./workloadInspector.qml');
|
||||||
var message = "test";
|
|
||||||
var functor = Jet.job_print_functor(function (line) { message += line + "\n"; });
|
|
||||||
|
|
||||||
Jet.task_traverseTree(Render, functor);
|
|
||||||
|
|
||||||
// print(message)*/
|
|
||||||
|
|
||||||
var qml = Script.resolvePath('../lib/jet/TaskList.qml');
|
|
||||||
var window = new OverlayWindow({
|
var window = new OverlayWindow({
|
||||||
title: 'Inspect Engine',
|
title: 'Inspect Engine',
|
||||||
source: qml,
|
source: qml,
|
||||||
width: 400,
|
width: 400,
|
||||||
height: 500
|
height: 600
|
||||||
});
|
});
|
||||||
|
|
||||||
window.sendToQml(message)
|
|
||||||
|
|
||||||
window.closed.connect(function () { Script.stop(); });
|
window.closed.connect(function () { Script.stop(); });
|
||||||
Script.scriptEnding.connect(function () {
|
Script.scriptEnding.connect(function () {
|
||||||
/* var geometry = JSON.stringify({
|
/* var geometry = JSON.stringify({
|
||||||
|
|
|
@ -13,14 +13,16 @@ import QtQuick.Layouts 1.3
|
||||||
|
|
||||||
import "qrc:///qml/styles-uit"
|
import "qrc:///qml/styles-uit"
|
||||||
import "qrc:///qml/controls-uit" as HifiControls
|
import "qrc:///qml/controls-uit" as HifiControls
|
||||||
import "../render/configSlider"
|
import "../render/configSlider"
|
||||||
|
import "../lib/jet/qml" as Jet
|
||||||
//import "../lib/jet";
|
|
||||||
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
HifiConstants { id: hifi;}
|
HifiConstants { id: hifi;}
|
||||||
id: _workload;
|
id: _workload;
|
||||||
|
|
||||||
|
width: parent ? parent.width : 400
|
||||||
|
height: parent ? parent.height : 600
|
||||||
anchors.margins: hifi.dimensions.contentMargin.x
|
anchors.margins: hifi.dimensions.contentMargin.x
|
||||||
|
|
||||||
color: hifi.colors.baseGray;
|
color: hifi.colors.baseGray;
|
||||||
|
@ -118,5 +120,13 @@ Rectangle {
|
||||||
onCheckedChanged: { Workload.getConfig("SpaceToRender")["showViews"] = checked }
|
onCheckedChanged: { Workload.getConfig("SpaceToRender")["showViews"] = checked }
|
||||||
}
|
}
|
||||||
Separator {}
|
Separator {}
|
||||||
|
|
||||||
|
Jet.TaskList {
|
||||||
|
rootConfig: Workload
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
|
||||||
|
height: 300
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue