diff options
Diffstat (limited to 'main.qml')
-rw-r--r-- | main.qml | 45 |
1 files changed, 39 insertions, 6 deletions
@@ -9,8 +9,6 @@ import BassPlayer 0.1 ApplicationWindow { visible: true - width: layout.implicitWidth - height: layout.implicitHeight title: "Bass Player!" @@ -37,7 +35,9 @@ ApplicationWindow { title: "Duration" } onClicked: { - song.song_selected('song') + console.log(song.current_song) + song.song_selected(row) + console.log(song.current_song) } } @@ -118,19 +118,23 @@ ApplicationWindow { timer.stop() } } + Button { + text: "Add segment" + onClicked: { + addSegmentDialog.open() + } + } } } SongController { id: song - title: titleField.text - duration: durationField.text } Audio { id: audioInterface - audioRole: MusicRole + //audioRole: MusicRole } Timer { @@ -141,4 +145,33 @@ ApplicationWindow { slider.value = audioInterface.position / audioInterface.duration } } + + Dialog { + id: addSegmentDialog + title: "Add a segment" + standardButtons: StandardButton.Save | StandardButton.Cancel + + onAccepted: { + song.add_segment( + textviewName.text, + textviewFrom.text, + textviewTo.text + ) + } + + ColumnLayout { + TextField { + id: textviewName + placeholderText: "Name" + } + TextField { + id: textviewFrom + placeholderText: "From" + } + TextField { + id: textviewTo + placeholderText: "To" + } + } + } } |