Move UtilitiesPage and media_keys into separate folder

The QML at the moment is a giant mess. Moving pages into individual
folders and properly abstracting the sub components of the pages will
allow for much easier development and better error messages.
Additionally it will prevent polluting the global namespace. Really, all
the reasons for avoiding globally available values and using
abstractions in regular programming also come into play here.
This commit is contained in:
Vasily
2019-01-26 18:32:29 +01:00
parent 25d2854248
commit a94c37b858
10 changed files with 7 additions and 5 deletions
@@ -0,0 +1,67 @@
import QtQuick 2.7
import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3
import matzman666.advsettings 1.0
// Necessary for the project specific Components.
import "../.."
GroupBox {
id: mediaKeysGroupBox
Layout.fillWidth: true
label: MyText {
leftPadding: 10
text: "Media Control Keys"
bottomPadding: -10
}
background: Rectangle {
color: "transparent"
border.color: "#ffffff"
radius: 8
}
ColumnLayout {
anchors.fill: parent
LineSeparator {
}
RowLayout {
property string playPauseButtonPath: "outline_play_pause_white_24dp.svg"
property string stopButtonPath: "outline_stop_white_24dp.svg"
property string previousButtonPath: "outline_skip_previous_white_24dp.svg"
property string nextButtonPath: "outline_skip_next_white_24dp.svg"
MediaButton {
id: previousSongButton
imagePath: parent.previousButtonPath
onClicked: {
UtilitiesTabController.sendMediaPreviousSong()
}
}
MediaButton {
id: stopSongButton
imagePath: parent.stopButtonPath
onClicked: {
UtilitiesTabController.sendMediaStopSong()
}
}
MediaButton {
id: playPauseSongButton
imagePath: parent.playPauseButtonPath
onClicked: {
UtilitiesTabController.sendMediaPausePlay()
}
}
MediaButton {
id: nextSongButton
imagePath: parent.nextButtonPath
onClicked: {
UtilitiesTabController.sendMediaNextSong()
}
}
}
}
}