mirror of
https://github.com/overte-org/overte.git
synced 2025-04-08 19:14:59 +02:00
Adding more style widgets andbringing luci1 into the panels of luci2
This commit is contained in:
parent
0359caec8d
commit
3d78592bb8
9 changed files with 306 additions and 98 deletions
|
@ -9,7 +9,6 @@
|
|||
//
|
||||
|
||||
import QtQuick 2.7
|
||||
import controlsUit 1.0 as HifiControls
|
||||
|
||||
PropItem {
|
||||
Global { id: global }
|
||||
|
@ -21,13 +20,12 @@ PropItem {
|
|||
valueVar = root.valueVarGetter();
|
||||
}
|
||||
|
||||
HifiControls.CheckBox {
|
||||
PropCheckBox {
|
||||
id: checkboxControl
|
||||
|
||||
anchors.left: root.splitter.right
|
||||
anchors.verticalCenter: root.verticalCenter
|
||||
width: root.width * global.valueAreaWidthScale
|
||||
height: global.slimHeight
|
||||
|
||||
onCheckedChanged: { root.valueVarSetter(checked); }
|
||||
}
|
||||
|
|
|
@ -10,19 +10,35 @@
|
|||
|
||||
import QtQuick 2.7
|
||||
|
||||
Item {
|
||||
//Item {
|
||||
PropFolderPanel {
|
||||
Global { id: global }
|
||||
id: root
|
||||
|
||||
property var label: "group"
|
||||
// property var label: "group"
|
||||
|
||||
property alias isUnfold: headerFolderIcon.icon
|
||||
property var indentDepth: 0
|
||||
// property alias isUnfold: headerFolderIcon.icon
|
||||
// property var indentDepth: 0
|
||||
|
||||
property alias propItemsPanel: propItemsContainer
|
||||
//property alias propItemsPanel: _panelFrameData
|
||||
// property alias propItemsPanel: propItemsContainer
|
||||
//property var propItemsPanel: propItemsContainer
|
||||
|
||||
panelFrameData: Component { // default is a column
|
||||
id: groupPanelFrameData
|
||||
Column {
|
||||
id: propItemsContainer
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 0
|
||||
anchors.rightMargin: 0
|
||||
|
||||
clip: true
|
||||
}
|
||||
}
|
||||
|
||||
// Panel Header Data Component
|
||||
property Component panelHeaderData: defaultPanelHeaderData
|
||||
/* property Component panelHeaderData: defaultPanelHeaderData
|
||||
Component { // default is a Label
|
||||
id: defaultPanelHeaderData
|
||||
PropLabel {
|
||||
|
@ -110,7 +126,7 @@ Item {
|
|||
anchors.margins: 0
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
*/
|
||||
|
||||
// Prop Group is designed to author an array of ProItems, they are defined with an array of the tuplets describing each individual item:
|
||||
// [ ..., PropItemInfo, ...]
|
||||
|
|
|
@ -5,6 +5,8 @@ PropLabel 1.0 style/PiLabel.qml
|
|||
PropSplitter 1.0 style/PiSplitter.qml
|
||||
PropComboBox 1.0 style/PiComboBox.qml
|
||||
PropCanvasIcon 1.0 style/PiCanvasIcon.qml
|
||||
PropCheckBox 1.0 style/PiCheckBox.qml
|
||||
PropFolderPanel 1.0 style/PiFolderPanel.qml
|
||||
|
||||
PropItem 1.0 PropItem.qml
|
||||
PropScalar 1.0 PropScalar.qml
|
||||
|
|
25
scripts/developer/utilities/lib/prop/style/PiCheckBox.qml
Normal file
25
scripts/developer/utilities/lib/prop/style/PiCheckBox.qml
Normal file
|
@ -0,0 +1,25 @@
|
|||
//
|
||||
// Prop/style/PiCheckBox.qml
|
||||
//
|
||||
// Created by Sam Gateau on 3/2/2019
|
||||
// Copyright 2019 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
import QtQuick 2.7
|
||||
import controlsUit 1.0 as HifiControls
|
||||
|
||||
HifiControls.CheckBox {
|
||||
Global { id: global }
|
||||
|
||||
color: global.fontColor
|
||||
|
||||
//anchors.left: root.splitter.right
|
||||
//anchors.verticalCenter: root.verticalCenter
|
||||
//width: root.width * global.valueAreaWidthScale
|
||||
height: global.slimHeight
|
||||
|
||||
onCheckedChanged: { root.valueVarSetter(checked); }
|
||||
}
|
133
scripts/developer/utilities/lib/prop/style/PiFolderPanel.qml
Normal file
133
scripts/developer/utilities/lib/prop/style/PiFolderPanel.qml
Normal file
|
@ -0,0 +1,133 @@
|
|||
//
|
||||
// Prop/style/PiFoldedPanel.qml
|
||||
//
|
||||
// Created by Sam Gateau on 4/17/2019
|
||||
// Copyright 2019 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
import QtQuick 2.7
|
||||
|
||||
Item {
|
||||
Global { id: global }
|
||||
id: root
|
||||
|
||||
property var label: "panel"
|
||||
|
||||
property alias isUnfold: headerFolderIcon.icon
|
||||
property var indentDepth: 0
|
||||
|
||||
// Panel Header Data Component
|
||||
property Component panelHeaderData: defaultPanelHeaderData
|
||||
Component { // default is a Label
|
||||
id: defaultPanelHeaderData
|
||||
PiLabel {
|
||||
text: root.label
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
}
|
||||
|
||||
// Panel Frame Data Component
|
||||
property Component panelFrameData: defaultPanelFrameData
|
||||
Component { // default is a column
|
||||
id: defaultPanelFrameData
|
||||
Column {
|
||||
}
|
||||
}
|
||||
|
||||
//property alias panelFrameContent: frame._panelFrameData.data
|
||||
|
||||
// Header Item
|
||||
Rectangle {
|
||||
id: header
|
||||
height: global.slimHeight
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
color: global.colorBackShadow // header of group is darker
|
||||
|
||||
// First in the header, some indentation spacer
|
||||
Item {
|
||||
id: indentSpacer
|
||||
width: (headerFolderIcon.width * root.indentDepth) + global.horizontalMargin // Must be non-zero
|
||||
height: parent.height
|
||||
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
// Second, the folder button / indicator
|
||||
Item {
|
||||
id: headerFolder
|
||||
anchors.left: indentSpacer.right
|
||||
width: headerFolderIcon.width * 2
|
||||
anchors.verticalCenter: header.verticalCenter
|
||||
height: parent.height
|
||||
|
||||
PiCanvasIcon {
|
||||
id: headerFolderIcon
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
fillColor: global.colorOrangeAccent
|
||||
filled: root.frame.height > 4
|
||||
iconMouseArea.onClicked: { root.isUnfold = !root.isUnfold }
|
||||
}
|
||||
}
|
||||
|
||||
// Next the header container
|
||||
// by default containing a Label showing the root.label
|
||||
Loader {
|
||||
sourceComponent: panelHeaderData
|
||||
anchors.left: headerFolder.right
|
||||
anchors.right: header.right
|
||||
anchors.verticalCenter: header.verticalCenter
|
||||
height: parent.height
|
||||
}
|
||||
}
|
||||
|
||||
// The Panel container
|
||||
Rectangle {
|
||||
id: frame
|
||||
visible: root.isUnfold
|
||||
|
||||
color: "transparent"
|
||||
border.color: global.colorBorderLight
|
||||
border.width: global.valueBorderWidth
|
||||
radius: global.valueBorderRadius
|
||||
|
||||
anchors.margins: 0
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: header.bottom
|
||||
anchors.bottom: root.bottom
|
||||
|
||||
// Next the panel frame data
|
||||
Loader {
|
||||
sourceComponent: panelFrameData
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 0
|
||||
anchors.rightMargin: 0
|
||||
id: _panelFrameData
|
||||
clip: true
|
||||
}
|
||||
|
||||
/* Column {
|
||||
id: propItemsContainer
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.leftMargin: 0
|
||||
anchors.rightMargin: 0
|
||||
|
||||
clip: true
|
||||
|
||||
// Where the propItems are added
|
||||
}*/
|
||||
}
|
||||
|
||||
height: header.height + isUnfold * _panelFrameData.height
|
||||
anchors.margins: 0
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
}
|
|
@ -14,6 +14,7 @@ import QtQuick.Layouts 1.3
|
|||
import stylesUit 1.0
|
||||
import controlsUit 1.0 as HifiControls
|
||||
import "configSlider"
|
||||
import "luci"
|
||||
|
||||
Rectangle {
|
||||
HifiConstants { id: hifi;}
|
||||
|
@ -32,76 +33,8 @@ Rectangle {
|
|||
HifiControls.Label {
|
||||
text: "Shading"
|
||||
}
|
||||
Row {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
spacing: 5
|
||||
Column {
|
||||
spacing: 5
|
||||
// padding: 10
|
||||
Repeater {
|
||||
model: [
|
||||
"Unlit:LightingModel:enableUnlit",
|
||||
"Emissive:LightingModel:enableEmissive",
|
||||
"Lightmap:LightingModel:enableLightmap",
|
||||
"Background:LightingModel:enableBackground",
|
||||
"Haze:LightingModel:enableHaze",
|
||||
"AO:LightingModel:enableAmbientOcclusion",
|
||||
"Textures:LightingModel:enableMaterialTexturing"
|
||||
]
|
||||
HifiControls.CheckBox {
|
||||
boxSize: 20
|
||||
text: modelData.split(":")[0]
|
||||
checked: render.mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]]
|
||||
onCheckedChanged: { render.mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]] = checked }
|
||||
}
|
||||
}
|
||||
}
|
||||
ShadingModel {
|
||||
|
||||
|
||||
Column {
|
||||
spacing: 5
|
||||
Repeater {
|
||||
model: [
|
||||
"Obscurance:LightingModel:enableObscurance",
|
||||
"Scattering:LightingModel:enableScattering",
|
||||
"Diffuse:LightingModel:enableDiffuse",
|
||||
"Specular:LightingModel:enableSpecular",
|
||||
"Albedo:LightingModel:enableAlbedo",
|
||||
"Wireframe:LightingModel:enableWireframe",
|
||||
"Skinning:LightingModel:enableSkinning",
|
||||
"Blendshape:LightingModel:enableBlendshape"
|
||||
]
|
||||
HifiControls.CheckBox {
|
||||
boxSize: 20
|
||||
text: modelData.split(":")[0]
|
||||
checked: render.mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]]
|
||||
onCheckedChanged: { render.mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]] = checked }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
spacing: 5
|
||||
Repeater {
|
||||
model: [
|
||||
"Ambient:LightingModel:enableAmbientLight",
|
||||
"Directional:LightingModel:enableDirectionalLight",
|
||||
"Point:LightingModel:enablePointLight",
|
||||
"Spot:LightingModel:enableSpotLight",
|
||||
"Light Contour:LightingModel:showLightContour",
|
||||
"Zone Stack:DrawZoneStack:enabled",
|
||||
"Shadow:LightingModel:enableShadow"
|
||||
]
|
||||
HifiControls.CheckBox {
|
||||
boxSize: 20
|
||||
text: modelData.split(":")[0]
|
||||
checked: render.mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]]
|
||||
onCheckedChanged: { render.mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]] = checked }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Separator {}
|
||||
Column {
|
||||
|
|
|
@ -15,6 +15,7 @@ import controlsUit 1.0 as HifiControls
|
|||
|
||||
import "../lib/prop" as Prop
|
||||
import "../lib/jet/qml" as Jet
|
||||
import "luci"
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
|
@ -31,7 +32,14 @@ Rectangle {
|
|||
|
||||
Column {
|
||||
width: render.width
|
||||
|
||||
Prop.PropFolderPanel {
|
||||
id: "shadingModel"
|
||||
label: "Shading Model"
|
||||
panelFrameData: Component {
|
||||
ShadingModel {
|
||||
}
|
||||
}
|
||||
}
|
||||
/* Prop.PropEnum {
|
||||
label: "Tone Curve"
|
||||
object: render.mainViewTask.getConfig("ToneMapping")
|
||||
|
@ -45,14 +53,6 @@ Rectangle {
|
|||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
} */
|
||||
Jet.TaskPropView {
|
||||
id: "lightingModel"
|
||||
jobPath: "RenderMainView.LightingModel"
|
||||
label: "Le LightingModel"
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
}
|
||||
Jet.TaskPropView {
|
||||
id: "theView"
|
||||
jobPath: "RenderMainView"
|
||||
|
@ -69,20 +69,14 @@ Rectangle {
|
|||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
}
|
||||
/* Jet.TaskPropView {
|
||||
jobPath: "RenderMainView.ToneMapping"
|
||||
label: "Le ToneMapping Job"
|
||||
Jet.TaskPropView {
|
||||
id: "le"
|
||||
jobPath: ""
|
||||
label: "Le Render Engine"
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
}
|
||||
Jet.TaskPropView {
|
||||
jobPath: "RenderMainView.Antialiasing"
|
||||
label: "Le Antialiasing Job"
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
105
scripts/developer/utilities/render/luci/ShadingModel.qml
Normal file
105
scripts/developer/utilities/render/luci/ShadingModel.qml
Normal file
|
@ -0,0 +1,105 @@
|
|||
//
|
||||
// ShadingModel.qml
|
||||
//
|
||||
// Created by Sam Gateau on 4/17/2019
|
||||
// Copyright 2019 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
import QtQuick 2.7
|
||||
|
||||
import stylesUit 1.0
|
||||
import controlsUit 1.0 as HifiControls
|
||||
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Layouts 1.3
|
||||
|
||||
import stylesUit 1.0
|
||||
import controlsUit 1.0 as HifiControls
|
||||
|
||||
import "../../lib/prop" as Prop
|
||||
|
||||
|
||||
Column {
|
||||
|
||||
id: shadingModel;
|
||||
|
||||
property var mainViewTask: Render.getConfig("RenderMainView")
|
||||
|
||||
spacing: 5
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.margins: hifi.dimensions.contentMargin.x
|
||||
HifiControls.Label {
|
||||
text: "Shading"
|
||||
}
|
||||
Row {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
||||
spacing: 5
|
||||
Column {
|
||||
spacing: 5
|
||||
Repeater {
|
||||
model: [
|
||||
"Unlit:LightingModel:enableUnlit",
|
||||
"Emissive:LightingModel:enableEmissive",
|
||||
"Lightmap:LightingModel:enableLightmap",
|
||||
"Background:LightingModel:enableBackground",
|
||||
"Haze:LightingModel:enableHaze",
|
||||
"AO:LightingModel:enableAmbientOcclusion",
|
||||
"Textures:LightingModel:enableMaterialTexturing"
|
||||
]
|
||||
Prop.PropCheckBox {
|
||||
text: modelData.split(":")[0]
|
||||
checked: render.mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]]
|
||||
onCheckedChanged: { render.mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]] = checked }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Column {
|
||||
spacing: 5
|
||||
Repeater {
|
||||
model: [
|
||||
"Obscurance:LightingModel:enableObscurance",
|
||||
"Scattering:LightingModel:enableScattering",
|
||||
"Diffuse:LightingModel:enableDiffuse",
|
||||
"Specular:LightingModel:enableSpecular",
|
||||
"Albedo:LightingModel:enableAlbedo",
|
||||
"Wireframe:LightingModel:enableWireframe",
|
||||
"Skinning:LightingModel:enableSkinning",
|
||||
"Blendshape:LightingModel:enableBlendshape"
|
||||
]
|
||||
Prop.PropCheckBox {
|
||||
text: modelData.split(":")[0]
|
||||
checked: render.mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]]
|
||||
onCheckedChanged: { render.mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]] = checked }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
spacing: 5
|
||||
Repeater {
|
||||
model: [
|
||||
"Ambient:LightingModel:enableAmbientLight",
|
||||
"Directional:LightingModel:enableDirectionalLight",
|
||||
"Point:LightingModel:enablePointLight",
|
||||
"Spot:LightingModel:enableSpotLight",
|
||||
"Light Contour:LightingModel:showLightContour",
|
||||
"Zone Stack:DrawZoneStack:enabled",
|
||||
"Shadow:LightingModel:enableShadow"
|
||||
]
|
||||
Prop.PropCheckBox {
|
||||
text: modelData.split(":")[0]
|
||||
checked: render.mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]]
|
||||
onCheckedChanged: { render.mainViewTask.getConfig(modelData.split(":")[1])[modelData.split(":")[2]] = checked }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
2
scripts/developer/utilities/render/luci/qmldir
Normal file
2
scripts/developer/utilities/render/luci/qmldir
Normal file
|
@ -0,0 +1,2 @@
|
|||
|
||||
ShadingModel 1.0 ShadingModel.qml
|
Loading…
Reference in a new issue