mirror of
https://github.com/overte-org/overte.git
synced 2025-06-16 10:00:20 +02:00
FInding a path
This commit is contained in:
parent
f6001c178d
commit
4ce7d75720
2 changed files with 42 additions and 15 deletions
|
@ -30,6 +30,36 @@ Prop.PropGroup {
|
||||||
|
|
||||||
property var showProps: true
|
property var showProps: true
|
||||||
property var showSubs: true
|
property var showSubs: true
|
||||||
|
property var jobEnabled: true
|
||||||
|
|
||||||
|
// Panel Header Data Component
|
||||||
|
panelHeaderData: Component {
|
||||||
|
Item {
|
||||||
|
id: header
|
||||||
|
Prop.PropLabel {
|
||||||
|
text: root.label
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: enabledIcon.left
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
}
|
||||||
|
Prop.PropCanvasIcon {
|
||||||
|
id: enabledIcon
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
fillColor: global.colorOrangeAccent
|
||||||
|
filled: jobEnabled
|
||||||
|
|
||||||
|
MouseArea{
|
||||||
|
id: mousearea
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: {
|
||||||
|
root.jobEnabled = !root.jobEnabled
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function populatePropItems() {
|
function populatePropItems() {
|
||||||
var propsModel = []
|
var propsModel = []
|
||||||
|
|
|
@ -20,7 +20,16 @@ Item {
|
||||||
property var indentDepth: 0
|
property var indentDepth: 0
|
||||||
|
|
||||||
property alias propItemsPanel: propItemsContainer
|
property alias propItemsPanel: propItemsContainer
|
||||||
default property alias extHeader: headerContainer.data
|
|
||||||
|
// Panel Header Data Component
|
||||||
|
property Component panelHeaderData: defaultPanelHeaderData
|
||||||
|
Component { // default is a Label
|
||||||
|
id: defaultPanelHeaderData
|
||||||
|
PropLabel {
|
||||||
|
text: root.label
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Header Item
|
// Header Item
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
@ -67,22 +76,12 @@ Item {
|
||||||
|
|
||||||
// Next the header container
|
// Next the header container
|
||||||
// by default containing a Label showing the root.label
|
// by default containing a Label showing the root.label
|
||||||
Item {
|
Loader {
|
||||||
id: headerContainer
|
sourceComponent: panelHeaderData
|
||||||
anchors.left: headerFolder.right
|
anchors.left: headerFolder.right
|
||||||
anchors.right: header.right
|
anchors.right: header.right
|
||||||
anchors.verticalCenter: header.verticalCenter
|
anchors.verticalCenter: header.verticalCenter
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
PropLabel {
|
|
||||||
id: labelControl
|
|
||||||
anchors.left: headerContainer.left
|
|
||||||
anchors.right: headerContainer.right
|
|
||||||
anchors.verticalCenter: headerContainer.verticalCenter
|
|
||||||
text: root.label
|
|
||||||
horizontalAlignment: Text.AlignHCenter
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,8 +114,6 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
height: header.height + isUnfold * propItemsContainer.height
|
height: header.height + isUnfold * propItemsContainer.height
|
||||||
// anchors.leftMargin: global.horizontalMargin
|
|
||||||
// anchors.rightMargin: global.horizontalMargin
|
|
||||||
anchors.margins: 0
|
anchors.margins: 0
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
|
|
Loading…
Reference in a new issue