Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.5
- import QtQuick.Controls 1.2
- import QtQuick.Controls.Styles 1.4
- import QtQuick.Dialogs 1.2
- import QtQuick.Layouts 1.2
- import org.kde.plasma.core 2.0 as PlasmaCore
- ColumnLayout {
- id: root
- property string cfg_Playlist
- property string cfg_PlaylistFolder
- property bool cfg_Shuffle
- property bool cfg_Muted
- GroupBox {
- title: "Playlist file picker"
- Layout.fillWidth: true
- GridLayout {
- columns: 2
- Label {
- text: "Click to pick"
- Layout.alignment: Qt.AlignRight
- }
- Rectangle {
- width: 256
- height: 144
- color: "transparent"
- PlasmaCore.IconItem {
- source: "org.kde.plasma.folder"
- anchors.fill: parent
- MouseArea {
- anchors.fill: parent
- onClicked: {fileDialog.folder = cfg_PlaylistFolder; fileDialog.open() }
- }
- }
- }
- }
- }
- FileDialog {
- id: fileDialog
- title: "Pick a playlist file"
- nameFilters: [ "Playlist files (*.m3u)"]
- onAccepted: {
- cfg_Playlist = fileDialog.fileUrls[0]
- cfg_PlaylistFolder = fileDialog.folder
- }
- }
- GroupBox {
- title: "Playlist settings"
- Layout.fillWidth: true
- RadioButton {
- text: "Shuffle Playlist"
- checked: wallpaper.configuration.Shuffle
- onCheckedChanged: {
- if (checked)
- { cfg_Shuffle = true }
- else
- { cfg_Shuffle = false }
- }
- }
- }
- GroupBox {
- title: "Audio settings"
- Layout.fillWidth: true
- RadioButton {
- text: "Muted"
- checked: wallpaper.configuration.Muted
- onCheckedChanged: {
- if (checked)
- { cfg_Muted = true }
- else
- { cfg_Muted = false }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement