mirror of
https://github.com/lubosz/overte.git
synced 2025-04-10 03:22:52 +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
|
||||
Jet = {}
|
||||
/*Jet = {}
|
||||
Jet.task_traverse = task_traverse
|
||||
Jet.task_traverseTree = task_traverseTree
|
||||
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/controls-uit" as HifiControls
|
||||
|
||||
//import QtQuick 2.7
|
||||
//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
|
||||
import "../jet.js" as Jet
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
width: parent ? parent.width : 200
|
||||
height: parent ? parent.height : 400
|
||||
property var rootConfig
|
||||
// width: parent ? parent.width : 200
|
||||
// height: parent ? parent.height : 400
|
||||
property var rootConfig : Workload
|
||||
|
||||
Original.TextArea {
|
||||
id: textArea
|
||||
|
@ -44,7 +33,7 @@ Rectangle {
|
|||
Component.onCompleted: {
|
||||
var message = ""
|
||||
var functor = Jet.job_print_functor(function (line) { message += line + "\n"; });
|
||||
Jet.task_traverseTree(Workload, functor);
|
||||
Jet.task_traverseTree(rootConfig, functor);
|
||||
textArea.append(message);
|
||||
}
|
||||
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/controls-uit" as HifiControls
|
||||
import "configSlider"
|
||||
import "../lib/jet/qml" as Jet
|
||||
|
||||
Rectangle {
|
||||
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
|
||||
//jet.task_traverseTree(Render, printJob);
|
||||
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 qml = Script.resolvePath('./workloadInspector.qml');
|
||||
var window = new OverlayWindow({
|
||||
title: 'Inspect Engine',
|
||||
source: qml,
|
||||
width: 400,
|
||||
height: 500
|
||||
height: 600
|
||||
});
|
||||
|
||||
window.sendToQml(message)
|
||||
|
||||
window.closed.connect(function () { Script.stop(); });
|
||||
Script.scriptEnding.connect(function () {
|
||||
/* var geometry = JSON.stringify({
|
||||
|
|
|
@ -13,14 +13,16 @@ import QtQuick.Layouts 1.3
|
|||
|
||||
import "qrc:///qml/styles-uit"
|
||||
import "qrc:///qml/controls-uit" as HifiControls
|
||||
import "../render/configSlider"
|
||||
|
||||
//import "../lib/jet";
|
||||
import "../render/configSlider"
|
||||
import "../lib/jet/qml" as Jet
|
||||
|
||||
|
||||
Rectangle {
|
||||
HifiConstants { id: hifi;}
|
||||
id: _workload;
|
||||
|
||||
width: parent ? parent.width : 400
|
||||
height: parent ? parent.height : 600
|
||||
anchors.margins: hifi.dimensions.contentMargin.x
|
||||
|
||||
color: hifi.colors.baseGray;
|
||||
|
@ -118,5 +120,13 @@ Rectangle {
|
|||
onCheckedChanged: { Workload.getConfig("SpaceToRender")["showViews"] = checked }
|
||||
}
|
||||
Separator {}
|
||||
|
||||
Jet.TaskList {
|
||||
rootConfig: Workload
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
height: 300
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue