debugging adding an asset
This commit is contained in:
parent
1597bd9522
commit
6e16292f06
6 changed files with 169 additions and 9 deletions
|
@ -4,13 +4,48 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
import magpie.API
|
||||
|
||||
Item {
|
||||
Label {
|
||||
anchors.centerIn: parent
|
||||
text: "This is Assets screen"
|
||||
font {
|
||||
pixelSize: 24
|
||||
bold: true
|
||||
signal add
|
||||
|
||||
Column {
|
||||
anchors.fill: parent
|
||||
|
||||
Label {
|
||||
text: "This is Assets screen"
|
||||
font {
|
||||
pixelSize: 24
|
||||
bold: true
|
||||
}
|
||||
}
|
||||
|
||||
ListView {
|
||||
anchors.centerIn: parent
|
||||
model: API.assets
|
||||
delegate: Rectangle {
|
||||
Text {
|
||||
text: title
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
anchors {
|
||||
bottom: parent.bottom
|
||||
right: parent.right
|
||||
bottomMargin: 20
|
||||
rightMargin: 20
|
||||
}
|
||||
onClicked: add()
|
||||
|
||||
width: 50
|
||||
height: 50
|
||||
icon {
|
||||
name: "list-add"
|
||||
height: 50
|
||||
width: 50
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@ import QtQuick.Controls
|
|||
import QtQuick.Layouts
|
||||
|
||||
Item {
|
||||
signal addAsset
|
||||
|
||||
property string currentPage: "home"
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
|
@ -53,6 +55,7 @@ Item {
|
|||
StackView {
|
||||
id: content
|
||||
initialItem: home
|
||||
clip: true
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
|
||||
|
@ -67,6 +70,7 @@ Item {
|
|||
id: assets
|
||||
Assets {
|
||||
StackView.onActivating: currentPage = "assets"
|
||||
onAdd: addAsset()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
|
||||
import magpie.Forms as Forms
|
||||
|
||||
Item {
|
||||
StackView {
|
||||
id: stack
|
||||
|
@ -14,7 +16,15 @@ Item {
|
|||
Component {
|
||||
id: main
|
||||
Main {
|
||||
onAddAsset: stack.push(addAssetForm);
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: addAssetForm
|
||||
Forms.AddAsset {
|
||||
onCancel: stack.pop()
|
||||
onSuccess: stack.pop()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue