Warning, /maui/vvave/src/widgets/SleepTimerDialog.qml is written in an unsupported language. File is not indexed.
0001 import QtQuick 2.15 0002 import QtQuick.Controls 2.15 0003 import QtQuick.Layouts 1.3 0004 0005 import org.mauikit.controls 1.3 as Maui 0006 0007 Maui.PopupPage 0008 { 0009 id: control 0010 0011 title: i18n("Sleep Timer") 0012 0013 component OptionEntry : CheckBox 0014 { 0015 Layout.fillWidth: true 0016 checkable: true 0017 autoExclusive: true 0018 } 0019 0020 property string option : "none" 0021 0022 0023 ButtonGroup 0024 { 0025 id: _group 0026 } 0027 0028 OptionEntry 0029 { 0030 ButtonGroup.group: _group 0031 text: i18n("15 minutes") 0032 onToggled: () => 0033 { 0034 if(checked) 0035 { 0036 control.option = "15m" 0037 }else 0038 { 0039 control.option = "none" 0040 } 0041 } 0042 } 0043 0044 OptionEntry 0045 { 0046 ButtonGroup.group: _group 0047 text: i18n("30 minutes") 0048 onToggled: () => 0049 { 0050 if(checked) 0051 { 0052 control.option = "30m" 0053 }else 0054 { 0055 control.option = "none" 0056 } 0057 } 0058 } 0059 0060 OptionEntry 0061 { 0062 ButtonGroup.group: _group 0063 text: i18n("1 hour") 0064 onToggled: () => 0065 { 0066 if(checked) 0067 { 0068 control.option = "60m" 0069 }else 0070 { 0071 control.option = "none" 0072 } 0073 } 0074 } 0075 0076 OptionEntry 0077 { 0078 ButtonGroup.group: _group 0079 text: i18n("End of track") 0080 onToggled: () => 0081 { 0082 if(checked) 0083 { 0084 control.option = "eot" 0085 }else 0086 { 0087 control.option = "none" 0088 } 0089 } 0090 } 0091 0092 OptionEntry 0093 { 0094 ButtonGroup.group: _group 0095 text: i18n("End of playlist") 0096 onToggled: () => 0097 { 0098 if(checked) 0099 { 0100 control.option = "eop" 0101 }else 0102 { 0103 control.option = "none" 0104 } 0105 } 0106 } 0107 0108 OptionEntry 0109 { 0110 ButtonGroup.group: _group 0111 text: i18n("Off") 0112 checked: true 0113 onToggled: () => 0114 { 0115 if(checked) 0116 { 0117 control.option = "none" 0118 }else 0119 { 0120 control.option = "none" 0121 } 0122 } 0123 } 0124 0125 MenuSeparator 0126 { 0127 0128 } 0129 0130 CheckBox 0131 { 0132 Layout.fillWidth: true 0133 text: i18n("Close application after sleeping") 0134 onToggled: closeAfterSleep = checked 0135 } 0136 0137 0138 actions: [ 0139 Action 0140 { 0141 text: i18n("Cancel") 0142 onTriggered: control.close() 0143 }, 0144 0145 Action 0146 { 0147 text: i18n("Accept") 0148 onTriggered: 0149 { 0150 setSleepTimer(control.option) 0151 control.close() 0152 } 0153 } 0154 ] 0155 }