11 property SourceModel configModel;
13 //property SourceModel model;
14 //property SourceConfigComponentView viewComponent;
18 name: "showSourceConfig"
20 // In this state, we bring the configuration UI of the source
21 PropertyChanges { target: configDialog; color: "#80000000" }
22 PropertyChanges { target: sourceConfigLoader; opacity: 1 }
23 PropertyChanges { target: sourceConfigLoader; source: configModel.settingsComponent }
24 PropertyChanges { target: configTitle; text: configModel.name + " Settings"}
26 AnchorChanges { target: quitApplyConfigButton; anchors.left: undefined; anchors.right: configDialog.right }
27 AnchorChanges { target: quitCancelConfigButton; anchors.right: undefined; anchors.left: configDialog.left }
34 to: "showSourceConfig"
38 PropertyAction { target: configDialog; property: "visible"; value: true }
39 // Bring the UI elements
41 AnchorAnimation { duration: 500 }
42 ColorAnimation { duration: 400 }
47 from: "showSourceConfig"
51 // Move out the UI elements
53 AnchorAnimation { duration: 500 }
54 ColorAnimation { duration: 400 }
57 PropertyAction { target: configDialog; property: "visible"; value: false }
63 anchors.top: parent.top
64 anchors.left: parent.left
65 anchors.right: parent.right
66 anchors.bottom: quitApplyConfigButton.top
72 anchors.top: parent.top
73 anchors.left: parent.left
74 anchors.right: parent.right
75 horizontalAlignment: Text.AlignHCenter
81 id: sourceConfigLoader
83 anchors.top: configTitle.bottom
84 anchors.left: parent.left
85 anchors.right: parent.right
86 anchors.bottom: quitApplyConfigButton.top
89 NumberAnimation { duration: 1000; easing.type: Easing.InOutQuad }
93 // fill the UI with information from the model
94 configModel.loadConfiguration(sourceConfigLoader.item)
99 id: quitApplyConfigButton
100 icon: "../images/apply.png"
101 anchors.bottom: parent.bottom
102 anchors.left: parent.right
105 // ask the model to store the configuration
106 configModel.storeConfiguration(sourceConfigLoader.item)
108 // Store the configuration of this source, and disappear
109 configDialog.state = "hidden"
114 id: quitCancelConfigButton
115 icon: "../images/cancel.png"
116 anchors.bottom: parent.bottom
117 anchors.right: parent.left
120 // Store the configuration of this source, and disappear
121 configDialog.state = "hidden"