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.SplitView.maximumWidth: 300
|
||||||
}
|
}
|
||||||
|
|
||||||
Controls.StackView {
|
Item {
|
||||||
id: mainPageArea
|
id: mainPageArea
|
||||||
Controls.SplitView.fillHeight: true
|
Controls.SplitView.fillHeight: true
|
||||||
Controls.SplitView.fillWidth: true
|
Controls.SplitView.fillWidth: true
|
||||||
Controls.SplitView.preferredWidth: 500
|
Controls.SplitView.preferredWidth: 500
|
||||||
Controls.SplitView.minimumWidth: 200
|
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 {
|
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 {
|
Loader {
|
||||||
id: presentLoader
|
id: presentLoader
|
||||||
active: presenting
|
active: presenting
|
||||||
|
@ -137,7 +124,6 @@ Controls.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
FileDialog {
|
FileDialog {
|
||||||
id: videoFileDialog
|
id: videoFileDialog
|
||||||
title: "Please choose a background"
|
title: "Please choose a background"
|
||||||
|
@ -181,12 +167,6 @@ Controls.Page {
|
||||||
id: videosqlmodel
|
id: videosqlmodel
|
||||||
}
|
}
|
||||||
|
|
||||||
Timer {
|
|
||||||
id: popTimer
|
|
||||||
interval: 800
|
|
||||||
onTriggered: mainPageArea.push(presentationComp, Controls.StackView.Immediate)
|
|
||||||
}
|
|
||||||
|
|
||||||
function changeSlideType(type) {
|
function changeSlideType(type) {
|
||||||
/* showPassiveNotification("used to be: " + presentation.text); */
|
/* showPassiveNotification("used to be: " + presentation.text); */
|
||||||
presentation.itemType = type;
|
presentation.itemType = type;
|
||||||
|
@ -241,42 +221,26 @@ Controls.Page {
|
||||||
if (editMode) {
|
if (editMode) {
|
||||||
switch (editType) {
|
switch (editType) {
|
||||||
case "song" :
|
case "song" :
|
||||||
mainPageArea.pop(Controls.StackView.Immediate);
|
presentation.visible = false;
|
||||||
mainPageArea.push(songEditorComp, Controls.StackView.Immediate);
|
videoEditor.visible = false;
|
||||||
|
songEditor.visible = true;
|
||||||
break;
|
break;
|
||||||
case "video" :
|
case "video" :
|
||||||
if (mainPageArea.currentItem.type === "video") {
|
presentation.visible = false;
|
||||||
print(mainPageArea.currentItem.type);
|
songEditor.visible = false;
|
||||||
mainPageArea.currentItem.changeVideo(item);
|
videoEditor.visible = true;
|
||||||
} else {
|
|
||||||
print(mainPageArea.depth);
|
|
||||||
mainPageArea.pop(Controls.StackView.Immediate);
|
|
||||||
print(mainPageArea.depth);
|
|
||||||
mainPageArea.push(videoEditorComp, {"video": item}, Controls.StackView.Immediate);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case "image" :
|
case "image" :
|
||||||
mainPageArea.pop(Controls.StackView.Immediate);
|
mainPageArea.pop(Controls.StackView.Immediate);
|
||||||
mainPageArea.push(imageEditorComp, Controls.StackView.Immediate);
|
mainPageArea.push(imageEditorComp, Controls.StackView.Immediate);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (mainPageArea.currentItem.type === "video") {
|
videoEditor
|
||||||
print(mainPageArea.currentItem.type);
|
|
||||||
mainPageArea.currentItem.prePop();
|
|
||||||
}
|
|
||||||
popTimer.restart();
|
|
||||||
print(mainPageArea.depth);
|
|
||||||
editMode = false;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (mainPageArea.currentItem.type === "video") {
|
videoEditor.visible = false;
|
||||||
print(mainPageArea.currentItem.type);
|
songEditor.visible = false;
|
||||||
mainPageArea.currentItem.prePop();
|
presentation.visible = true;
|
||||||
}
|
|
||||||
editStackItem = mainPageArea.currentItem;
|
|
||||||
print(mainPageArea.depth);
|
|
||||||
popTimer.restart();
|
|
||||||
print(mainPageArea.depth);
|
|
||||||
editMode = false;
|
editMode = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue