Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 2.0
- import QtMultimedia 5.0
- import Sailfish.Silica 1.0
- Dialog {
- id: soundDialog;
- allowedOrientations: Orientation.Portrait | Orientation.Landscape;
- //canAccept: false;
- property bool vibrate: false;
- property bool sound: true;
- // SilicaFlickable {
- // y: header.height + Theme.paddingMedium;
- // height: parent.height - (header.height + Theme.paddingMedium);
- // anchors.leftMargin: Theme.paddingLarge;
- // anchors.rightMargin: Theme.paddingLarge;
- Column {
- id: column;
- // anchors.fill: parent;
- width: soundDialog.width;
- spacing: Theme.paddingLarge;
- DialogHeader {
- id: header;
- dialog: soundDialog;
- title: qsTr('Sound');
- }
- TextSwitch {
- id: noSound;
- // anchors.top: parent.top;
- checked: !sound;
- // leftMargin: Theme.paddingMedium;
- text: qsTr('Disable sound');
- onCheckedChanged: {
- console.log('NoSound', checked)
- // sound = !checked;
- }
- onClicked: {
- console.log('NoSound tapped', automaticCheck)
- }
- }
- TextSwitch {
- id: doVibrate;
- // anchors.top: noSound.bottom;
- checked: vibrate;
- // leftMargin: Theme.paddingMedium;
- text: qsTr('Vibrate');
- description: 'Since <code>QtFeedback</code> is not yet allowed, this does nothing.';
- onCheckedChanged: {
- console.log('Vibrate', checked)
- // vibrate = checked;
- }
- }
- BackgroundItem {
- //enabled: sound;
- // anchors.top: doVibrate.bottom;
- // width: parent.width;
- Label {
- textFormat: Text.StyledText;
- text: '<img src="image://theme/icon-l-music" /> ' + qsTr('Select music file');
- }
- onClicked: {
- console.log('Select file', checked)
- pageStack.push(Qt.resolvedUrl('SoundSelectDialog.qml'));
- }
- }
- }
- // }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement