mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 07:47:30 +02:00
fixing the broken binding dependency for the propitems
This commit is contained in:
parent
ba30892c0e
commit
34bae25d0e
7 changed files with 14 additions and 16 deletions
|
@ -14,12 +14,6 @@ PropItem {
|
|||
Global { id: global }
|
||||
id: root
|
||||
|
||||
property alias valueVar : checkboxControl.checked
|
||||
|
||||
Component.onCompleted: {
|
||||
valueVar = root.valueVarGetter();
|
||||
}
|
||||
|
||||
PropCheckBox {
|
||||
id: checkboxControl
|
||||
|
||||
|
@ -27,6 +21,7 @@ PropItem {
|
|||
anchors.verticalCenter: root.verticalCenter
|
||||
width: root.width * global.valueAreaWidthScale
|
||||
|
||||
checked: root.valueVarGetter();
|
||||
onCheckedChanged: { root.valueVarSetter(checked); }
|
||||
}
|
||||
}
|
|
@ -15,13 +15,8 @@ PropItem {
|
|||
Global { id: global }
|
||||
id: root
|
||||
|
||||
property alias valueVar : valueCombo.currentIndex
|
||||
property alias enums : valueCombo.model
|
||||
|
||||
Component.onCompleted: {
|
||||
valueVar = root.valueVarGetter();
|
||||
}
|
||||
|
||||
PropComboBox {
|
||||
id: valueCombo
|
||||
|
||||
|
@ -33,6 +28,6 @@ PropItem {
|
|||
height: global.slimHeight
|
||||
|
||||
currentIndex: root.valueVarGetter()
|
||||
onCurrentIndexChanged: { root.valueVarSetter(currentIndex); }
|
||||
onCurrentIndexChanged: root.valueVarSetter(currentIndex)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ Item {
|
|||
// value is accessed through the "valueVarSetter" and "valueVarGetter"
|
||||
// By default, these just go get or set the value from the object[property]
|
||||
//
|
||||
function defaultGet() { return root.object[root.property]; }
|
||||
function defaultGet() { var v = root.object[root.property]; return v; }
|
||||
function defaultSet(value) { root.object[root.property] = value; }
|
||||
// function defaultSetReadOnly(value) { log ( "read only " + property + ", NOT setting to " + value); }
|
||||
// function defaultSetReadOnly(value) {}
|
||||
|
|
|
@ -32,6 +32,13 @@ PropItem {
|
|||
valueVar = root.valueVarGetter();
|
||||
}
|
||||
|
||||
Connections
|
||||
{
|
||||
target: obj;
|
||||
onValueChanged: console.log('changed');
|
||||
}
|
||||
|
||||
|
||||
PropLabel {
|
||||
id: valueLabel
|
||||
enabled: root.showValue
|
||||
|
|
|
@ -29,7 +29,7 @@ Column {
|
|||
label: "Debug Buffer"
|
||||
object: config
|
||||
property: "mode"
|
||||
valueVar: 0
|
||||
// valueVar: 0
|
||||
enums: [
|
||||
"Off",
|
||||
"Depth",
|
||||
|
|
|
@ -32,6 +32,7 @@ Column {
|
|||
}
|
||||
|
||||
Prop.PropEnum {
|
||||
id: refreshrateProfileControl
|
||||
label: "Refresh Rate Profile"
|
||||
object: Performance
|
||||
property: "refreshRateProfile"
|
||||
|
|
|
@ -50,7 +50,7 @@ Rectangle {
|
|||
}
|
||||
}
|
||||
}
|
||||
/* Prop.PropFolderPanel {
|
||||
Prop.PropFolderPanel {
|
||||
label: "Platform"
|
||||
panelFrameData: Component {
|
||||
Platform {
|
||||
|
@ -58,7 +58,7 @@ Rectangle {
|
|||
anchors.right: parent.right
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue