summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatias Linares <matias.linares@comprandoengrupo.net>2022-07-05 17:38:04 -0300
committerMatias Linares <matias.linares@comprandoengrupo.net>2022-07-05 17:38:04 -0300
commit0ec54c65ccaa1e2b65ff1a75cf0e4a00da448c10 (patch)
treef5541c2ee067bd6cd964a7423cf27219c7c11bf4
parentb0f1f03eaee7a716d2966a206fc33d1dcce49c8e (diff)
downloadbass-player-0ec54c65ccaa1e2b65ff1a75cf0e4a00da448c10.tar.gz
Another layout for the buttons.HEADmaster
-rw-r--r--main.qml124
1 files changed, 71 insertions, 53 deletions
diff --git a/main.qml b/main.qml
index c7b8a33..c067b6e 100644
--- a/main.qml
+++ b/main.qml
@@ -19,53 +19,79 @@ ApplicationWindow {
anchors.margins: 10
width: 700
RowLayout {
- TableView {
- id: songTable
- model: song.model
- Layout.fillHeight: true
- Layout.fillWidth: true
- Layout.alignment: Qt.AlignTop
- //Layout.minimumWidth: 300
- alternatingRowColors: true
-
- TableViewColumn {
- role: "title"
- title: "Title"
+ ColumnLayout {
+ Label {
+ text: "Songs"
}
- TableViewColumn {
- role: "duration"
- title: "Duration"
+ TableView {
+ id: songTable
+ model: song.model
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ Layout.alignment: Qt.AlignTop
+ //Layout.minimumWidth: 300
+ alternatingRowColors: true
+
+ TableViewColumn {
+ role: "title"
+ title: "Title"
+ }
+ TableViewColumn {
+ role: "duration"
+ title: "Duration"
+ }
+ onClicked: {
+ var tmp = song.song_selected(row)
+ audioInterface.source = tmp.path
+ durationText.text = song.ms_to_time(tmp.duration)
+ }
}
- onClicked: {
- var tmp = song.song_selected(row)
- audioInterface.source = tmp.path
- durationText.text = song.ms_to_time(tmp.duration)
+ RowLayout {
+ Button {
+ icon.name: "cursor-cross"
+ onClicked: {
+ fileDialog.open()
+ }
+ }
}
}
-
- TableView {
- id: songPartTable
- model: song.segment_model
- Layout.fillHeight: true
- Layout.fillWidth: true
- Layout.alignment: Qt.AlignTop
- //Layout.minimumWidth: 300
- alternatingRowColors: true
-
- TableViewColumn {
- role: "name"
- title: "Name"
+ ColumnLayout {
+ Label {
+ text: "Segments"
}
- TableViewColumn {
- role: "from"
- title: "From"
+ TableView {
+ id: songPartTable
+ model: song.segment_model
+ Layout.fillHeight: true
+ Layout.fillWidth: true
+ Layout.alignment: Qt.AlignTop
+ //Layout.minimumWidth: 300
+ alternatingRowColors: true
+
+ TableViewColumn {
+ role: "name"
+ title: "Name"
+ }
+ TableViewColumn {
+ role: "from"
+ title: "From"
+ }
+ TableViewColumn {
+ role: "to"
+ title: "To"
+ }
+ onClicked: {
+ song.segment_selected(row)
+ }
}
- TableViewColumn {
- role: "to"
- title: "To"
- }
- onClicked: {
- song.segment_selected(row)
+
+ RowLayout {
+ Button {
+ icon.name: "cursor-cross"
+ onClicked: {
+ addSegmentDialog.open()
+ }
+ }
}
}
}
@@ -104,14 +130,10 @@ ApplicationWindow {
}
RowLayout {
- Button {
- text: "Add"
- onClicked: {
- fileDialog.open()
- }
- }
+ Layout.alignment: Qt.AlignHCenter
Button {
text: "Play"
+ icon.name: "media-playback-start"
onClicked: {
audioInterface.play()
timer.start()
@@ -119,6 +141,7 @@ ApplicationWindow {
}
Button {
text: "Stop"
+ icon.name: "media-playback-stop"
onClicked: {
audioInterface.stop()
timer.restart()
@@ -126,17 +149,12 @@ ApplicationWindow {
}
Button {
text: "Pause"
+ icon.name: "media-playback-pause"
onClicked: {
audioInterface.pause()
timer.stop()
}
}
- Button {
- text: "Add segment"
- onClicked: {
- addSegmentDialog.open()
- }
- }
}
}