switching stackview to manual controlled pages
This commit is contained in:
parent
24106c2c3c
commit
bcdba4fea9
1 changed files with 28 additions and 64 deletions
|
@ -56,13 +56,28 @@ Controls.Page {
|
|||
Controls.SplitView.maximumWidth: 300
|
||||
}
|
||||
|
||||
Controls.StackView {
|
||||
Item {
|
||||
id: mainPageArea
|
||||
Controls.SplitView.fillHeight: true
|
||||
Controls.SplitView.fillWidth: true
|
||||
Controls.SplitView.preferredWidth: 500
|
||||
Controls.SplitView.minimumWidth: 200
|
||||
initialItem: Presenter.Presentation {id: presentation}
|
||||
|
||||
Presenter.Presentation {
|
||||
id: presentation
|
||||
anchors.fill: parent
|
||||
}
|
||||
Presenter.SongEditor {
|
||||
id: songEditor
|
||||
visible: false
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
Presenter.VideoEditor {
|
||||
id: videoEditor
|
||||
visible: false
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
|
||||
Presenter.Library {
|
||||
|
@ -75,34 +90,6 @@ Controls.Page {
|
|||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: presentationComp
|
||||
Presenter.Presentation {
|
||||
id: presentation
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: songEditorComp
|
||||
Presenter.SongEditor {
|
||||
id: songEditor
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: videoEditorComp
|
||||
Presenter.VideoEditor {
|
||||
id: videoEditor
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: imageEditorComp
|
||||
Presenter.ImageEditor {
|
||||
id: imageEditor
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: presentLoader
|
||||
active: presenting
|
||||
|
@ -137,7 +124,6 @@ Controls.Page {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
FileDialog {
|
||||
id: videoFileDialog
|
||||
title: "Please choose a background"
|
||||
|
@ -181,12 +167,6 @@ Controls.Page {
|
|||
id: videosqlmodel
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: popTimer
|
||||
interval: 800
|
||||
onTriggered: mainPageArea.push(presentationComp, Controls.StackView.Immediate)
|
||||
}
|
||||
|
||||
function changeSlideType(type) {
|
||||
/* showPassiveNotification("used to be: " + presentation.text); */
|
||||
presentation.itemType = type;
|
||||
|
@ -241,42 +221,26 @@ Controls.Page {
|
|||
if (editMode) {
|
||||
switch (editType) {
|
||||
case "song" :
|
||||
mainPageArea.pop(Controls.StackView.Immediate);
|
||||
mainPageArea.push(songEditorComp, Controls.StackView.Immediate);
|
||||
presentation.visible = false;
|
||||
videoEditor.visible = false;
|
||||
songEditor.visible = true;
|
||||
break;
|
||||
case "video" :
|
||||
if (mainPageArea.currentItem.type === "video") {
|
||||
print(mainPageArea.currentItem.type);
|
||||
mainPageArea.currentItem.changeVideo(item);
|
||||
} else {
|
||||
print(mainPageArea.depth);
|
||||
mainPageArea.pop(Controls.StackView.Immediate);
|
||||
print(mainPageArea.depth);
|
||||
mainPageArea.push(videoEditorComp, {"video": item}, Controls.StackView.Immediate);
|
||||
}
|
||||
presentation.visible = false;
|
||||
songEditor.visible = false;
|
||||
videoEditor.visible = true;
|
||||
break;
|
||||
case "image" :
|
||||
mainPageArea.pop(Controls.StackView.Immediate);
|
||||
mainPageArea.push(imageEditorComp, Controls.StackView.Immediate);
|
||||
break;
|
||||
default:
|
||||
if (mainPageArea.currentItem.type === "video") {
|
||||
print(mainPageArea.currentItem.type);
|
||||
mainPageArea.currentItem.prePop();
|
||||
}
|
||||
popTimer.restart();
|
||||
print(mainPageArea.depth);
|
||||
editMode = false;
|
||||
videoEditor
|
||||
}
|
||||
} else {
|
||||
if (mainPageArea.currentItem.type === "video") {
|
||||
print(mainPageArea.currentItem.type);
|
||||
mainPageArea.currentItem.prePop();
|
||||
}
|
||||
editStackItem = mainPageArea.currentItem;
|
||||
print(mainPageArea.depth);
|
||||
popTimer.restart();
|
||||
print(mainPageArea.depth);
|
||||
videoEditor.visible = false;
|
||||
songEditor.visible = false;
|
||||
presentation.visible = true;
|
||||
editMode = false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue