Using StackView for the main area to swap between edit and present
This commit is contained in:
parent
9993542d57
commit
3e646d8728
5 changed files with 44 additions and 21 deletions
|
@ -21,10 +21,6 @@ Kirigami.ApplicationWindow {
|
||||||
width: 1800
|
width: 1800
|
||||||
height: 900
|
height: 900
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Presenter.MainWindow {
|
Presenter.MainWindow {
|
||||||
id: mainPage
|
id: mainPage
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,8 @@ Controls.Page {
|
||||||
|
|
||||||
property string dragSongTitle: ""
|
property string dragSongTitle: ""
|
||||||
|
|
||||||
|
property bool editing: true
|
||||||
|
|
||||||
property Item slideItem
|
property Item slideItem
|
||||||
property var song
|
property var song
|
||||||
property var draggedLibraryItem
|
property var draggedLibraryItem
|
||||||
|
@ -56,22 +58,16 @@ Controls.Page {
|
||||||
Controls.SplitView.maximumWidth: 300
|
Controls.SplitView.maximumWidth: 300
|
||||||
}
|
}
|
||||||
|
|
||||||
Presenter.SongEditor {
|
Controls.StackView {
|
||||||
id: songEditor
|
id: mainPageArea
|
||||||
Controls.SplitView.fillHeight: true
|
Controls.SplitView.fillHeight: true
|
||||||
Controls.SplitView.fillWidth: true
|
Controls.SplitView.fillWidth: true
|
||||||
Controls.SplitView.preferredWidth: 700
|
Controls.SplitView.preferredWidth: 700
|
||||||
Controls.SplitView.minimumWidth: 500
|
Controls.SplitView.minimumWidth: 500
|
||||||
|
initialItem: presenterComp
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Presenter.Presentation { */
|
|
||||||
/* id: presentation */
|
|
||||||
/* Controls.SplitView.fillHeight: true */
|
|
||||||
/* Controls.SplitView.fillWidth: true */
|
|
||||||
/* Controls.SplitView.preferredWidth: 700 */
|
|
||||||
/* Controls.SplitView.minimumWidth: 500 */
|
|
||||||
/* } */
|
|
||||||
|
|
||||||
Presenter.Library {
|
Presenter.Library {
|
||||||
id: library
|
id: library
|
||||||
Controls.SplitView.fillHeight: true
|
Controls.SplitView.fillHeight: true
|
||||||
|
@ -82,6 +78,21 @@ Controls.Page {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: songEditorComp
|
||||||
|
Presenter.SongEditor {
|
||||||
|
id: songEditor
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: presenterComp
|
||||||
|
Presenter.Presentation {
|
||||||
|
id: presentation
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Loader {
|
Loader {
|
||||||
id: presentLoader
|
id: presentLoader
|
||||||
active: presenting
|
active: presenting
|
||||||
|
|
|
@ -46,22 +46,39 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Icon {
|
Item {
|
||||||
source: "arrow-left"
|
/* Layout.preferredHeight: 200 */
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: 25
|
Layout.columnSpan: 3
|
||||||
|
}
|
||||||
|
|
||||||
|
Kirigami.Icon {
|
||||||
|
source: "arrow-left"
|
||||||
|
Layout.preferredWidth: 200
|
||||||
|
Layout.preferredHeight: 200
|
||||||
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
|
|
||||||
Presenter.Slide {
|
Presenter.Slide {
|
||||||
Layout.preferredWidth: 50
|
Layout.preferredWidth: 700
|
||||||
|
Layout.preferredHeight: 500
|
||||||
|
Layout.alignment: Qt.AlignCenter
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Icon {
|
Kirigami.Icon {
|
||||||
source: "arrow-right"
|
source: "arrow-right"
|
||||||
|
Layout.preferredWidth: 200
|
||||||
|
Layout.preferredHeight: 200
|
||||||
|
Layout.alignment: Qt.AlignLeft
|
||||||
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
/* Layout.preferredHeight: 200 */
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredWidth: 25
|
Layout.columnSpan: 3
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,6 @@ import mpv 1.0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
// Let's make this slide editable
|
// Let's make this slide editable
|
||||||
property bool editMode: false
|
property bool editMode: false
|
||||||
|
|
|
@ -26,7 +26,7 @@ Item {
|
||||||
model: Qt.fontFamilies()
|
model: Qt.fontFamilies()
|
||||||
implicitWidth: 300
|
implicitWidth: 300
|
||||||
editable: true
|
editable: true
|
||||||
onCurrentIndexChanged: showPassiveNotification(currentText)
|
onCurrentTextChanged: showPassiveNotification(currentText)
|
||||||
}
|
}
|
||||||
Controls.SpinBox {
|
Controls.SpinBox {
|
||||||
editable: true
|
editable: true
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue