Merge branch 'master' into alpha-kung
@@ -0,0 +1,95 @@
|
|||||||
|
# Common settings that generally should always be used with your language specific settings
|
||||||
|
|
||||||
|
# Auto detect text files and perform LF normalization
|
||||||
|
# http://davidlaing.com/2012/09/19/customise-your-gitattributes-to-become-a-git-ninja/
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
#
|
||||||
|
# The above will handle all files NOT found below
|
||||||
|
#
|
||||||
|
|
||||||
|
# Documents
|
||||||
|
*.doc diff=astextplain
|
||||||
|
*.DOC diff=astextplain
|
||||||
|
*.docx diff=astextplain
|
||||||
|
*.DOCX diff=astextplain
|
||||||
|
*.dot diff=astextplain
|
||||||
|
*.DOT diff=astextplain
|
||||||
|
*.pdf diff=astextplain
|
||||||
|
*.PDF diff=astextplain
|
||||||
|
*.rtf diff=astextplain
|
||||||
|
*.RTF diff=astextplain
|
||||||
|
*.md text
|
||||||
|
*.tex text
|
||||||
|
*.adoc text
|
||||||
|
*.textile text
|
||||||
|
*.mustache text
|
||||||
|
*.csv text
|
||||||
|
*.tab text
|
||||||
|
*.tsv text
|
||||||
|
*.sql text
|
||||||
|
|
||||||
|
# Graphics
|
||||||
|
*.png binary
|
||||||
|
*.jpg binary
|
||||||
|
*.jpeg binary
|
||||||
|
*.gif binary
|
||||||
|
*.tif binary
|
||||||
|
*.tiff binary
|
||||||
|
*.ico binary
|
||||||
|
# SVG treated as an asset (binary) by default. If you want to treat it as text,
|
||||||
|
# comment-out the following line and uncomment the line after.
|
||||||
|
*.svg binary
|
||||||
|
#*.svg text
|
||||||
|
*.eps binary
|
||||||
|
|
||||||
|
#
|
||||||
|
# Exclude files from exporting
|
||||||
|
#
|
||||||
|
|
||||||
|
.gitattributes export-ignore
|
||||||
|
.gitignore export-ignore
|
||||||
|
|
||||||
|
#sources
|
||||||
|
*.c text diff=cpp
|
||||||
|
*.cc text diff=cpp
|
||||||
|
*.cxx text diff=cpp
|
||||||
|
*.cpp text diff=cpp
|
||||||
|
*.c++ text diff=cpp
|
||||||
|
*.hpp text diff=cpp
|
||||||
|
*.h text diff=cpp
|
||||||
|
*.h++ text diff=cpp
|
||||||
|
*.hh text diff=cpp
|
||||||
|
|
||||||
|
# Compiled Object files
|
||||||
|
*.slo binary
|
||||||
|
*.lo binary
|
||||||
|
*.o binary
|
||||||
|
*.obj binary
|
||||||
|
|
||||||
|
# Precompiled Headers
|
||||||
|
*.gch binary
|
||||||
|
*.pch binary
|
||||||
|
|
||||||
|
# Compiled Dynamic libraries
|
||||||
|
*.so binary
|
||||||
|
*.dylib binary
|
||||||
|
*.dll binary
|
||||||
|
|
||||||
|
# Compiled Static libraries
|
||||||
|
*.lai binary
|
||||||
|
*.la binary
|
||||||
|
*.a binary
|
||||||
|
*.lib binary
|
||||||
|
|
||||||
|
# Executables
|
||||||
|
*.exe binary
|
||||||
|
*.out binary
|
||||||
|
*.app binary
|
||||||
|
|
||||||
|
#Qt Specific
|
||||||
|
*.qml text
|
||||||
|
|
||||||
|
#Linux Shell Scripts
|
||||||
|
#Windows Subsystem for Linux will not run CLRF files.
|
||||||
|
*.sh text eof=lf
|
||||||
@@ -119,39 +119,16 @@ unix:DESTDIR = bin/linux/AdvancedSettings
|
|||||||
|
|
||||||
DISTFILES += \
|
DISTFILES += \
|
||||||
src/res/sounds/alarm01.wav \
|
src/res/sounds/alarm01.wav \
|
||||||
src/res/qml/ptt_notification.png \
|
src/res/img/audio/microphone/ptt_notification.png \
|
||||||
src/res/battery_0.png \
|
src/res/img/audio/microphone/ptt_notification.svg \
|
||||||
src/res/battery_1.png \
|
src/res/img/battery/* \
|
||||||
src/res/battery_2.png \
|
src/res/img/icons/* \
|
||||||
src/res/battery_3.png \
|
|
||||||
src/res/battery_4.png \
|
|
||||||
src/res/battery_5.png \
|
|
||||||
src/res/thumbicon.png \
|
|
||||||
src/res/qml/backarrow.svg \
|
|
||||||
src/res/qml/check.svg \
|
|
||||||
src/res/qml/mic_off.svg \
|
|
||||||
src/res/qml/mic_on.svg \
|
|
||||||
src/res/qml/ptt_notification.svg \
|
|
||||||
src/res/qml/speaker_off.svg \
|
|
||||||
src/res/qml/speaker_on.svg \
|
|
||||||
src/res/qml/qmldir \
|
src/res/qml/qmldir \
|
||||||
src/res/qml/AccessibilityPage.qml \
|
src/res/qml/AccessibilityPage.qml \
|
||||||
src/res/qml/AudioPage.qml \
|
src/res/qml/audio_page/* \
|
||||||
src/res/qml/ChaperonePage.qml \
|
src/res/qml/ChaperonePage.qml \
|
||||||
src/res/qml/ChaperoneWarningsPage.qml \
|
src/res/qml/ChaperoneWarningsPage.qml \
|
||||||
src/res/qml/FixFloorPage.qml \
|
src/res/qml/FixFloorPage.qml \
|
||||||
src/res/qml/mainwidget.qml \
|
|
||||||
src/res/qml/MyComboBox.qml \
|
|
||||||
src/res/qml/MyDialogOkCancelPopup.qml \
|
|
||||||
src/res/qml/MyDialogOkPopup.qml \
|
|
||||||
src/res/qml/MyPushButton.qml \
|
|
||||||
src/res/qml/MyPushButton2.qml \
|
|
||||||
src/res/qml/MyResources.qml \
|
|
||||||
src/res/qml/MySlider.qml \
|
|
||||||
src/res/qml/MyStackViewPage.qml \
|
|
||||||
src/res/qml/MyText.qml \
|
|
||||||
src/res/qml/MyTextField.qml \
|
|
||||||
src/res/qml/MyToggleButton.qml \
|
|
||||||
src/res/qml/PlayspacePage.qml \
|
src/res/qml/PlayspacePage.qml \
|
||||||
src/res/qml/PttControllerConfigDialog.qml \
|
src/res/qml/PttControllerConfigDialog.qml \
|
||||||
src/res/qml/RevivePage.qml \
|
src/res/qml/RevivePage.qml \
|
||||||
@@ -161,7 +138,14 @@ DISTFILES += \
|
|||||||
src/res/qml/SteamVRPage.qml \
|
src/res/qml/SteamVRPage.qml \
|
||||||
src/res/qml/utilities_page/* \
|
src/res/qml/utilities_page/* \
|
||||||
src/res/qml/utilities_page/media_keys/* \
|
src/res/qml/utilities_page/media_keys/* \
|
||||||
src/res/qml/LineSeparator.qml \
|
|
||||||
src/res/qml/utilities_page/keyboard_utils/* \
|
src/res/qml/utilities_page/keyboard_utils/* \
|
||||||
src/res/qml/utilities_page/desktop_size/* \
|
src/res/qml/utilities_page/desktop_size/* \
|
||||||
src/res/qml/utilities_page/alarm_clock/*
|
src/res/qml/utilities_page/alarm_clock/* \
|
||||||
|
src/res/qml/audio_page/dialog_boxes/* \
|
||||||
|
src/res/qml/audio_page/device_selector/* \
|
||||||
|
src/res/qml/audio_page/proximity/* \
|
||||||
|
src/res/qml/audio_page/push_to_talk/* \
|
||||||
|
src/res/qml/audio_page/profiles/* \
|
||||||
|
src/res/qml/common/* \
|
||||||
|
|
||||||
|
RESOURCES += src/res/resources.qrc
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 107 KiB After Width: | Height: | Size: 69 KiB |
@@ -425,7 +425,7 @@ int main( int argc, char* argv[] )
|
|||||||
|
|
||||||
QString path = QStandardPaths::locate(
|
QString path = QStandardPaths::locate(
|
||||||
QStandardPaths::AppDataLocation,
|
QStandardPaths::AppDataLocation,
|
||||||
QStringLiteral( "res/qml/mainwidget.qml" ) );
|
QStringLiteral( "res/qml/common/mainwidget.qml" ) );
|
||||||
|
|
||||||
QQmlComponent component( &qmlEngine, QUrl::fromLocalFile( path ) );
|
QQmlComponent component( &qmlEngine, QUrl::fromLocalFile( path ) );
|
||||||
auto errors = component.errors();
|
auto errors = component.errors();
|
||||||
|
|||||||
@@ -332,9 +332,9 @@ void OverlayController::SetWidget( QQuickItem* quickItem,
|
|||||||
m_ulOverlayHandle,
|
m_ulOverlayHandle,
|
||||||
vr::VROverlayFlags_SendVRSmoothScrollEvents,
|
vr::VROverlayFlags_SendVRSmoothScrollEvents,
|
||||||
true );
|
true );
|
||||||
QString thumbIconPath
|
QString thumbIconPath = QStandardPaths::locate(
|
||||||
= QStandardPaths::locate( QStandardPaths::AppDataLocation,
|
QStandardPaths::AppDataLocation,
|
||||||
QStringLiteral( "res/thumbicon.png" ) );
|
QStringLiteral( "res/img/icons/thumbicon.png" ) );
|
||||||
if ( QFile::exists( thumbIconPath ) )
|
if ( QFile::exists( thumbIconPath ) )
|
||||||
{
|
{
|
||||||
vr::VROverlay()->SetOverlayFromFile(
|
vr::VROverlay()->SetOverlayFromFile(
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 598 B After Width: | Height: | Size: 598 B |
|
Before Width: | Height: | Size: 216 B After Width: | Height: | Size: 216 B |
|
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 219 B |
|
Before Width: | Height: | Size: 181 B After Width: | Height: | Size: 181 B |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 147 B After Width: | Height: | Size: 147 B |
|
Before Width: | Height: | Size: 7.0 KiB After Width: | Height: | Size: 7.0 KiB |
@@ -2,7 +2,7 @@ import QtQuick 2.7
|
|||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import matzman666.advsettings 1.0
|
import matzman666.advsettings 1.0
|
||||||
|
import "common"
|
||||||
|
|
||||||
|
|
||||||
MyStackViewPage {
|
MyStackViewPage {
|
||||||
|
|||||||
@@ -1,741 +0,0 @@
|
|||||||
import QtQuick 2.7
|
|
||||||
import QtQuick.Controls 2.0
|
|
||||||
import QtQuick.Layouts 1.3
|
|
||||||
import matzman666.advsettings 1.0
|
|
||||||
|
|
||||||
|
|
||||||
MyStackViewPage {
|
|
||||||
width: 1200
|
|
||||||
headerText: "Audio Settings"
|
|
||||||
|
|
||||||
property bool componentCompleted: false
|
|
||||||
|
|
||||||
|
|
||||||
MyDialogOkPopup {
|
|
||||||
id: audioMessageDialog
|
|
||||||
function showMessage(title, text) {
|
|
||||||
dialogTitle = title
|
|
||||||
dialogText = text
|
|
||||||
open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MyDialogOkCancelPopup {
|
|
||||||
id: pttDeleteProfileDialog
|
|
||||||
property int profileIndex: -1
|
|
||||||
dialogTitle: "Delete Profile"
|
|
||||||
dialogText: "Do you really want to delete this ptt profile?"
|
|
||||||
onClosed: {
|
|
||||||
if (okClicked) {
|
|
||||||
AudioTabController.deletePttProfile(profileIndex)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MyDialogOkCancelPopup {
|
|
||||||
id: audioDeleteProfileDialog
|
|
||||||
property int profileIndex: -1
|
|
||||||
dialogTitle: "Delete Profile"
|
|
||||||
dialogText: "Do you really want to delete this audio profile?"
|
|
||||||
onClosed: {
|
|
||||||
if (okClicked) {
|
|
||||||
AudioTabController.deleteAudioProfile(profileIndex)
|
|
||||||
pttProfileComboBox.currentIndex = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
PttControllerConfigDialog {
|
|
||||||
id: pttControllerConfigDialog
|
|
||||||
pttControllerConfigClass: AudioTabController
|
|
||||||
}
|
|
||||||
|
|
||||||
MyDialogOkCancelPopup {
|
|
||||||
id: pttNewProfileDialog
|
|
||||||
dialogTitle: "Create New PTT Profile"
|
|
||||||
dialogWidth: 600
|
|
||||||
dialogHeight: 220
|
|
||||||
dialogContentItem: ColumnLayout {
|
|
||||||
RowLayout {
|
|
||||||
Layout.topMargin: 16
|
|
||||||
Layout.leftMargin: 16
|
|
||||||
Layout.rightMargin: 16
|
|
||||||
MyText {
|
|
||||||
text: "Name: "
|
|
||||||
}
|
|
||||||
MyTextField {
|
|
||||||
id: pttNewProfileName
|
|
||||||
keyBoardUID: 590
|
|
||||||
color: "#cccccc"
|
|
||||||
text: ""
|
|
||||||
Layout.fillWidth: true
|
|
||||||
font.pointSize: 20
|
|
||||||
function onInputEvent(input) {
|
|
||||||
pttNewProfileName.text = input
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onClosed: {
|
|
||||||
if (okClicked) {
|
|
||||||
if (pttNewProfileName.text != "") {
|
|
||||||
AudioTabController.addPttProfile(pttNewProfileName.text)
|
|
||||||
|
|
||||||
} else {
|
|
||||||
audioMessageDialog.showMessage("Create New Profile", "ERROR: No name given.")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function openPopup() {
|
|
||||||
pttNewProfileName.text = ""
|
|
||||||
open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
MyDialogOkCancelPopup {
|
|
||||||
id: audioNewProfileDialog
|
|
||||||
dialogTitle: "Create New Audio Profile"
|
|
||||||
dialogWidth: 600
|
|
||||||
dialogHeight: 300
|
|
||||||
dialogContentItem: ColumnLayout {
|
|
||||||
RowLayout {
|
|
||||||
Layout.topMargin: 16
|
|
||||||
Layout.leftMargin: 16
|
|
||||||
Layout.rightMargin: 16
|
|
||||||
MyText {
|
|
||||||
text: "Name: "
|
|
||||||
}
|
|
||||||
MyTextField {
|
|
||||||
id: audioNewProfileName
|
|
||||||
keyBoardUID: 590
|
|
||||||
color: "#cccccc"
|
|
||||||
text: ""
|
|
||||||
Layout.fillWidth: true
|
|
||||||
font.pointSize: 20
|
|
||||||
function onInputEvent(input) {
|
|
||||||
audioNewProfileName.text = input
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
RowLayout {
|
|
||||||
Layout.topMargin: 16
|
|
||||||
Layout.leftMargin: 16
|
|
||||||
Layout.rightMargin: 16
|
|
||||||
MyToggleButton {
|
|
||||||
id: audioDefaultProfileToggle
|
|
||||||
Layout.preferredWidth: 250
|
|
||||||
text: "Make Default"
|
|
||||||
onCheckedChanged: {
|
|
||||||
AudioTabController.setAudioProfileDefault(checked, false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onClosed: {
|
|
||||||
if (okClicked) {
|
|
||||||
if (audioNewProfileName.text != "") {
|
|
||||||
AudioTabController.addAudioProfile(audioNewProfileName.text)
|
|
||||||
} else {
|
|
||||||
audioMessageDialog.showMessage("Create New Profile", "ERROR: No name given.")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function openPopup() {
|
|
||||||
audioNewProfileName.text = ""
|
|
||||||
open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
content: ColumnLayout {
|
|
||||||
spacing: 24
|
|
||||||
|
|
||||||
RowLayout {
|
|
||||||
MyText {
|
|
||||||
text: "Playback Device: "
|
|
||||||
Layout.preferredWidth: 260
|
|
||||||
}
|
|
||||||
MyComboBox {
|
|
||||||
id: audioPlaybackNameCombo
|
|
||||||
Layout.maximumWidth: 850
|
|
||||||
Layout.minimumWidth: 850
|
|
||||||
Layout.preferredWidth: 850
|
|
||||||
onActivated: {
|
|
||||||
if (componentCompleted) {
|
|
||||||
AudioTabController.setPlaybackDeviceIndex(currentIndex)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
spacing: 18
|
|
||||||
RowLayout {
|
|
||||||
MyText {
|
|
||||||
text: "Mirror Device: "
|
|
||||||
Layout.preferredWidth: 260
|
|
||||||
}
|
|
||||||
MyComboBox {
|
|
||||||
id: audioMirrorNameCombo
|
|
||||||
Layout.maximumWidth: 850
|
|
||||||
Layout.minimumWidth: 850
|
|
||||||
Layout.preferredWidth: 850
|
|
||||||
onActivated: {
|
|
||||||
if (componentCompleted) {
|
|
||||||
AudioTabController.setMirrorDeviceIndex(currentIndex - 1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
RowLayout {
|
|
||||||
MyText {
|
|
||||||
text: "Mirror Volume:"
|
|
||||||
Layout.preferredWidth: 260
|
|
||||||
}
|
|
||||||
|
|
||||||
MyPushButton2 {
|
|
||||||
id: audioMirrorVolumeMinusButton
|
|
||||||
text: "-"
|
|
||||||
Layout.preferredWidth: 40
|
|
||||||
onClicked: {
|
|
||||||
audioMirrorVolumeSlider.value -= 0.1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MySlider {
|
|
||||||
id: audioMirrorVolumeSlider
|
|
||||||
from: 0.0
|
|
||||||
to: 1.0
|
|
||||||
stepSize: 0.01
|
|
||||||
value: 1.0
|
|
||||||
Layout.fillWidth: true
|
|
||||||
onPositionChanged: {
|
|
||||||
var val = this.position * 100
|
|
||||||
audioMirrorVolumeText.text = Math.round(val) + "%"
|
|
||||||
}
|
|
||||||
onValueChanged: {
|
|
||||||
AudioTabController.setMirrorVolume(this.value.toFixed(2), false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MyPushButton2 {
|
|
||||||
id: audioMirrorVolumePlusButton
|
|
||||||
text: "+"
|
|
||||||
Layout.preferredWidth: 40
|
|
||||||
onClicked: {
|
|
||||||
audioMirrorVolumeSlider.value += 0.1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MyText {
|
|
||||||
id: audioMirrorVolumeText
|
|
||||||
text: "100%"
|
|
||||||
Layout.preferredWidth: 85
|
|
||||||
horizontalAlignment: Text.AlignRight
|
|
||||||
}
|
|
||||||
|
|
||||||
MyPushButton2 {
|
|
||||||
id: audioMirrorMuteToggle
|
|
||||||
Layout.leftMargin: 12
|
|
||||||
checkable: true
|
|
||||||
contentItem: Image {
|
|
||||||
source: parent.checked ? "speaker_off.svg" : "speaker_on.svg"
|
|
||||||
sourceSize.width: 32
|
|
||||||
sourceSize.height: 32
|
|
||||||
anchors.fill: parent
|
|
||||||
}
|
|
||||||
onCheckedChanged: {
|
|
||||||
AudioTabController.setMirrorMuted(checked, false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
spacing: 18
|
|
||||||
RowLayout {
|
|
||||||
MyText {
|
|
||||||
text: "Microphone: "
|
|
||||||
Layout.preferredWidth: 260
|
|
||||||
}
|
|
||||||
MyComboBox {
|
|
||||||
id: audioMicNameCombo
|
|
||||||
Layout.maximumWidth: 850
|
|
||||||
Layout.minimumWidth: 850
|
|
||||||
Layout.preferredWidth: 850
|
|
||||||
onActivated: {
|
|
||||||
if (componentCompleted) {
|
|
||||||
AudioTabController.setMicDeviceIndex(currentIndex)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
RowLayout {
|
|
||||||
MyText {
|
|
||||||
text: "Microphone Volume:"
|
|
||||||
Layout.preferredWidth: 260
|
|
||||||
}
|
|
||||||
|
|
||||||
MyPushButton2 {
|
|
||||||
id: audioMicVolumeMinusButton
|
|
||||||
text: "-"
|
|
||||||
Layout.preferredWidth: 40
|
|
||||||
onClicked: {
|
|
||||||
audioMicVolumeSlider.value -= 0.1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MySlider {
|
|
||||||
id: audioMicVolumeSlider
|
|
||||||
from: 0.0
|
|
||||||
to: 1.0
|
|
||||||
stepSize: 0.01
|
|
||||||
value: 1.0
|
|
||||||
Layout.fillWidth: true
|
|
||||||
onPositionChanged: {
|
|
||||||
var val = this.position * 100
|
|
||||||
audioMicVolumeText.text = Math.round(val) + "%"
|
|
||||||
}
|
|
||||||
onValueChanged: {
|
|
||||||
AudioTabController.setMicVolume(this.value.toFixed(2))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MyPushButton2 {
|
|
||||||
id: audioMicVolumePlusButton
|
|
||||||
text: "+"
|
|
||||||
Layout.preferredWidth: 40
|
|
||||||
onClicked: {
|
|
||||||
audioMicVolumeSlider.value += 0.1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MyText {
|
|
||||||
id: audioMicVolumeText
|
|
||||||
text: "100%"
|
|
||||||
Layout.preferredWidth: 85
|
|
||||||
horizontalAlignment: Text.AlignRight
|
|
||||||
}
|
|
||||||
|
|
||||||
MyPushButton2 {
|
|
||||||
id: audioMicMuteToggle
|
|
||||||
Layout.leftMargin: 12
|
|
||||||
checkable: true
|
|
||||||
contentItem: Image {
|
|
||||||
source: parent.checked ? "mic_off.svg" : "mic_on.svg"
|
|
||||||
sourceSize.width: 32
|
|
||||||
sourceSize.height: 32
|
|
||||||
anchors.fill: parent
|
|
||||||
}
|
|
||||||
onCheckedChanged: {
|
|
||||||
AudioTabController.setMicMuted(checked)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MyToggleButton {
|
|
||||||
id: audioMuteProximitySensorToggle
|
|
||||||
Layout.preferredWidth: 600
|
|
||||||
text: "Proximity Sensor Mutes/Unmutes Microphone"
|
|
||||||
onClicked: {
|
|
||||||
AudioTabController.setMicProximitySensorCanMute(checked, false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
RowLayout {
|
|
||||||
MyToggleButton {
|
|
||||||
id: audioPttEnabledToggle
|
|
||||||
Layout.preferredWidth: 260
|
|
||||||
text: "Push-to-Talk:"
|
|
||||||
onClicked: {
|
|
||||||
AudioTabController.pttEnabled = checked
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MyToggleButton {
|
|
||||||
id: audioPttLeftControllerToggle
|
|
||||||
text: "Left Controller"
|
|
||||||
onClicked: {
|
|
||||||
AudioTabController.setPttLeftControllerEnabled(checked, false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MyPushButton {
|
|
||||||
text: "Configure"
|
|
||||||
onClicked: {
|
|
||||||
pttControllerConfigDialog.openPopup(0)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Item {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
MyToggleButton {
|
|
||||||
id: audioPttRightControllerToggle
|
|
||||||
text: "Right Controller"
|
|
||||||
onClicked: {
|
|
||||||
AudioTabController.setPttRightControllerEnabled(checked, false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MyPushButton {
|
|
||||||
text: "Configure"
|
|
||||||
onClicked: {
|
|
||||||
pttControllerConfigDialog.openPopup(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
RowLayout {
|
|
||||||
|
|
||||||
MyToggleButton {
|
|
||||||
id: audioPttShowNotificationToggle
|
|
||||||
Layout.leftMargin: 350
|
|
||||||
text: "Show notification in HMD"
|
|
||||||
onCheckedChanged: {
|
|
||||||
AudioTabController.setPttShowNotification(checked, false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MyToggleButton {
|
|
||||||
id: audioPttReverseToggle
|
|
||||||
Layout.leftMargin: 118
|
|
||||||
text: "Push-to-Mute"
|
|
||||||
onClicked: {
|
|
||||||
AudioTabController.setMicReversePtt(checked, false)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
RowLayout {
|
|
||||||
spacing: 10
|
|
||||||
|
|
||||||
MyText {
|
|
||||||
Layout.preferredWidth: 150
|
|
||||||
text: "Audio Profile:"
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
MyComboBox {
|
|
||||||
id: audioProfileComboBox
|
|
||||||
Layout.preferredWidth: 250
|
|
||||||
model: [""]
|
|
||||||
onCurrentIndexChanged: {
|
|
||||||
if (currentIndex > 0) {
|
|
||||||
audioApplyProfileButton.enabled = true
|
|
||||||
audioDeleteProfileButton.enabled = true
|
|
||||||
} else {
|
|
||||||
audioApplyProfileButton.enabled = false
|
|
||||||
audioDeleteProfileButton.enabled = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MyPushButton {
|
|
||||||
id: audioApplyProfileButton
|
|
||||||
enabled: true
|
|
||||||
Layout.preferredWidth: 150
|
|
||||||
text: "Apply"
|
|
||||||
onClicked: {
|
|
||||||
if (audioProfileComboBox.currentIndex > 0) {
|
|
||||||
AudioTabController.applyAudioProfile(audioProfileComboBox.currentIndex - 1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MyText {
|
|
||||||
text: "PTT Profile:"
|
|
||||||
Layout.preferredWidth: 150
|
|
||||||
}
|
|
||||||
|
|
||||||
MyComboBox {
|
|
||||||
id: pttProfileComboBox
|
|
||||||
Layout.preferredWidth: 250
|
|
||||||
model: [""]
|
|
||||||
onCurrentIndexChanged: {
|
|
||||||
if (currentIndex > 0) {
|
|
||||||
pttApplyProfileButton.enabled = true
|
|
||||||
pttDeleteProfileButton.enabled = true
|
|
||||||
} else {
|
|
||||||
pttApplyProfileButton.enabled = false
|
|
||||||
pttDeleteProfileButton.enabled = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MyPushButton {
|
|
||||||
id: pttApplyProfileButton
|
|
||||||
enabled: true
|
|
||||||
Layout.preferredWidth: 150
|
|
||||||
text: "Apply"
|
|
||||||
onClicked: {
|
|
||||||
if (pttProfileComboBox.currentIndex > 0) {
|
|
||||||
AudioTabController.applyPttProfile(pttProfileComboBox.currentIndex - 1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
RowLayout {
|
|
||||||
spacing: 18
|
|
||||||
|
|
||||||
MyPushButton {
|
|
||||||
id: audioDeleteProfileButton
|
|
||||||
enabled: true
|
|
||||||
Layout.preferredWidth: 200
|
|
||||||
text: "Delete Profile"
|
|
||||||
onClicked: {
|
|
||||||
if (audioProfileComboBox.currentIndex > 0) {
|
|
||||||
audioDeleteProfileDialog.profileIndex = audioProfileComboBox.currentIndex - 1
|
|
||||||
audioDeleteProfileDialog.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MyPushButton {
|
|
||||||
Layout.preferredWidth: 200
|
|
||||||
text: "New Profile"
|
|
||||||
onClicked: {
|
|
||||||
audioNewProfileDialog.openPopup()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Item {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
}
|
|
||||||
MyPushButton {
|
|
||||||
id: pttDeleteProfileButton
|
|
||||||
enabled: true
|
|
||||||
Layout.preferredWidth: 200
|
|
||||||
text: "Delete Profile"
|
|
||||||
onClicked: {
|
|
||||||
if (pttProfileComboBox.currentIndex > 0) {
|
|
||||||
pttDeleteProfileDialog.profileIndex = pttProfileComboBox.currentIndex - 1
|
|
||||||
pttDeleteProfileDialog.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
MyPushButton {
|
|
||||||
Layout.preferredWidth: 200
|
|
||||||
text: "New Profile"
|
|
||||||
onClicked: {
|
|
||||||
pttNewProfileDialog.openPopup()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
|
||||||
var devs1 = []
|
|
||||||
var devs2 = ["<None>"]
|
|
||||||
var playbackDeviceCount = AudioTabController.getPlaybackDeviceCount()
|
|
||||||
for (var i = 0; i < playbackDeviceCount; i++) {
|
|
||||||
var name = AudioTabController.getPlaybackDeviceName(i)
|
|
||||||
devs1.push(name)
|
|
||||||
devs2.push(name)
|
|
||||||
}
|
|
||||||
audioPlaybackNameCombo.model = devs1
|
|
||||||
audioPlaybackNameCombo.currentIndex = AudioTabController.playbackDeviceIndex
|
|
||||||
audioMirrorNameCombo.model = devs2
|
|
||||||
if (AudioTabController.mirrorDeviceIndex < 0) {
|
|
||||||
audioMirrorNameCombo.currentIndex = 0
|
|
||||||
audioMirrorVolumeMinusButton.enabled = false
|
|
||||||
audioMirrorVolumeSlider.enabled = false
|
|
||||||
audioMirrorVolumePlusButton.enabled = false
|
|
||||||
audioMirrorMuteToggle.enabled = false
|
|
||||||
} else {
|
|
||||||
audioMirrorVolumeMinusButton.enabled = true
|
|
||||||
audioMirrorVolumeSlider.enabled = true
|
|
||||||
audioMirrorVolumePlusButton.enabled = true
|
|
||||||
audioMirrorMuteToggle.enabled = true
|
|
||||||
audioMirrorVolumeSlider.value = AudioTabController.mirrorVolume
|
|
||||||
audioMirrorMuteToggle.checked = AudioTabController.mirrorMuted
|
|
||||||
audioMirrorNameCombo.currentIndex = AudioTabController.mirrorDeviceIndex + 1
|
|
||||||
}
|
|
||||||
var devs3 = []
|
|
||||||
var micDeviceCount = AudioTabController.getRecordingDeviceCount()
|
|
||||||
for (var i = 0; i < micDeviceCount; i++) {
|
|
||||||
var name = AudioTabController.getRecordingDeviceName(i)
|
|
||||||
devs3.push(name)
|
|
||||||
}
|
|
||||||
audioMicNameCombo.model = devs3
|
|
||||||
if (AudioTabController.micDeviceIndex < 0) {
|
|
||||||
audioMicNameCombo.currentIndex = 0
|
|
||||||
audioMicVolumeMinusButton.enabled = false
|
|
||||||
audioMicVolumeSlider.enabled = false
|
|
||||||
audioMicVolumePlusButton.enabled = false
|
|
||||||
audioMicMuteToggle.enabled = false
|
|
||||||
audioMuteProximitySensorToggle.enabled = false
|
|
||||||
} else {
|
|
||||||
audioMicVolumeMinusButton.enabled = true
|
|
||||||
audioMicVolumeSlider.enabled = true
|
|
||||||
audioMicVolumePlusButton.enabled = true
|
|
||||||
audioMicMuteToggle.enabled = true
|
|
||||||
audioMuteProximitySensorToggle.enabled = true
|
|
||||||
audioMicVolumeSlider.value = AudioTabController.micVolume
|
|
||||||
audioMicMuteToggle.checked = AudioTabController.micMuted
|
|
||||||
audioMuteProximitySensorToggle.checked = AudioTabController.micProximitySensorCanMute
|
|
||||||
audioMicNameCombo.currentIndex = AudioTabController.micDeviceIndex
|
|
||||||
}
|
|
||||||
reloadPttProfiles()
|
|
||||||
reloadAudioProfiles()
|
|
||||||
audioPttEnabledToggle.checked = AudioTabController.pttEnabled
|
|
||||||
audioPttLeftControllerToggle.checked = AudioTabController.pttLeftControllerEnabled
|
|
||||||
audioPttRightControllerToggle.checked = AudioTabController.pttRightControllerEnabled
|
|
||||||
audioPttShowNotificationToggle.checked = AudioTabController.pttShowNotification
|
|
||||||
audioPttReverseToggle.checked = AudioTabController.micReversePtt
|
|
||||||
audioDefaultProfileToggle.checked = AudioTabController.audioProfileDefault
|
|
||||||
componentCompleted = true
|
|
||||||
}
|
|
||||||
|
|
||||||
Connections {
|
|
||||||
target: AudioTabController
|
|
||||||
onPlaybackDeviceIndexChanged: {
|
|
||||||
audioPlaybackNameCombo.currentIndex = index
|
|
||||||
}
|
|
||||||
onMirrorDeviceIndexChanged: {
|
|
||||||
if (index < 0) {
|
|
||||||
audioMirrorNameCombo.currentIndex = 0
|
|
||||||
audioMirrorVolumeMinusButton.enabled = false
|
|
||||||
audioMirrorVolumeSlider.enabled = false
|
|
||||||
audioMirrorVolumePlusButton.enabled = false
|
|
||||||
audioMirrorMuteToggle.enabled = false
|
|
||||||
} else {
|
|
||||||
audioMirrorVolumeMinusButton.enabled = true
|
|
||||||
audioMirrorVolumeSlider.enabled = true
|
|
||||||
audioMirrorVolumePlusButton.enabled = true
|
|
||||||
audioMirrorMuteToggle.enabled = true
|
|
||||||
audioMirrorNameCombo.currentIndex = index + 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onMirrorVolumeChanged: {
|
|
||||||
audioMirrorVolumeSlider.value = AudioTabController.mirrorVolume
|
|
||||||
}
|
|
||||||
onMirrorMutedChanged: {
|
|
||||||
audioMirrorMuteToggle.checked = AudioTabController.mirrorMuted
|
|
||||||
}
|
|
||||||
onMicDeviceIndexChanged: {
|
|
||||||
if (index < 0) {
|
|
||||||
audioMicNameCombo.currentIndex = 0
|
|
||||||
audioMicVolumeMinusButton.enabled = false
|
|
||||||
audioMicVolumeSlider.enabled = false
|
|
||||||
audioMicVolumePlusButton.enabled = false
|
|
||||||
audioMicMuteToggle.enabled = false
|
|
||||||
} else {
|
|
||||||
audioMicVolumeMinusButton.enabled = true
|
|
||||||
audioMicVolumeSlider.enabled = true
|
|
||||||
audioMicVolumePlusButton.enabled = true
|
|
||||||
audioMicMuteToggle.enabled = true
|
|
||||||
audioMicNameCombo.currentIndex = index
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onMicVolumeChanged: {
|
|
||||||
audioMicVolumeSlider.value = AudioTabController.micVolume
|
|
||||||
}
|
|
||||||
onMicMutedChanged: {
|
|
||||||
audioMicMuteToggle.checked = AudioTabController.micMuted
|
|
||||||
}
|
|
||||||
onMicProximitySensorCanMuteChanged: {
|
|
||||||
audioMuteProximitySensorToggle.checked = AudioTabController.micProximitySensorCanMute
|
|
||||||
}
|
|
||||||
onMicReversePttChanged: {
|
|
||||||
audioPttReverseToggle.checked = AudioTabController.micReversePtt
|
|
||||||
}
|
|
||||||
onPttEnabledChanged: {
|
|
||||||
audioPttEnabledToggle.checked = AudioTabController.pttEnabled
|
|
||||||
}
|
|
||||||
onPttActiveChanged: {
|
|
||||||
|
|
||||||
}
|
|
||||||
onPttShowNotificationChanged: {
|
|
||||||
audioPttShowNotificationToggle.checked = AudioTabController.pttShowNotification
|
|
||||||
}
|
|
||||||
onPttLeftControllerEnabledChanged: {
|
|
||||||
audioPttLeftControllerToggle.checked = AudioTabController.pttLeftControllerEnabled
|
|
||||||
}
|
|
||||||
onPttRightControllerEnabledChanged: {
|
|
||||||
audioPttRightControllerToggle.checked = AudioTabController.pttRightControllerEnabled
|
|
||||||
}
|
|
||||||
onAudioProfileDefaultChanged: {
|
|
||||||
audioDefaultProfileToggle.checked = AudioTabController.audioProfileDefault
|
|
||||||
}
|
|
||||||
onPttProfilesUpdated: {
|
|
||||||
reloadPttProfiles()
|
|
||||||
}
|
|
||||||
onAudioProfilesUpdated: {
|
|
||||||
reloadAudioProfiles()
|
|
||||||
}
|
|
||||||
onAudioProfileAdded:{
|
|
||||||
audioProfileComboBox.currentIndex = AudioTabController.getAudioProfileCount()
|
|
||||||
}
|
|
||||||
onPttProfileAdded:{
|
|
||||||
pttProfileComboBox.currentIndex = AudioTabController.getPttProfileCount()
|
|
||||||
}
|
|
||||||
onDefaultProfileDisplay:{
|
|
||||||
audioProfileComboBox.currentIndex = AudioTabController.getDefaultAudioProfileIndex() + 1
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
onPlaybackDeviceListChanged: {
|
|
||||||
var devs1 = []
|
|
||||||
var devs2 = ["<None>"]
|
|
||||||
var playbackDeviceCount = AudioTabController.getPlaybackDeviceCount()
|
|
||||||
for (var i = 0; i < playbackDeviceCount; i++) {
|
|
||||||
var name = AudioTabController.getPlaybackDeviceName(i)
|
|
||||||
devs1.push(name)
|
|
||||||
devs2.push(name)
|
|
||||||
}
|
|
||||||
audioPlaybackNameCombo.model = devs1
|
|
||||||
audioPlaybackNameCombo.currentIndex = AudioTabController.playbackDeviceIndex
|
|
||||||
audioMirrorNameCombo.model = devs2
|
|
||||||
if (AudioTabController.mirrorDeviceIndex < 0) {
|
|
||||||
audioMirrorNameCombo.currentIndex = 0
|
|
||||||
audioMirrorVolumeMinusButton.enabled = false
|
|
||||||
audioMirrorVolumeSlider.enabled = false
|
|
||||||
audioMirrorVolumePlusButton.enabled = false
|
|
||||||
audioMirrorMuteToggle.enabled = false
|
|
||||||
} else {
|
|
||||||
audioMirrorVolumeMinusButton.enabled = true
|
|
||||||
audioMirrorVolumeSlider.enabled = true
|
|
||||||
audioMirrorVolumePlusButton.enabled = true
|
|
||||||
audioMirrorMuteToggle.enabled = true
|
|
||||||
audioMirrorVolumeSlider.value = AudioTabController.mirrorVolume
|
|
||||||
audioMirrorMuteToggle.checked = AudioTabController.mirrorMuted
|
|
||||||
audioMirrorNameCombo.currentIndex = AudioTabController.mirrorDeviceIndex + 1
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onRecordingDeviceListChanged: {
|
|
||||||
var devs3 = []
|
|
||||||
var micDeviceCount = AudioTabController.getRecordingDeviceCount()
|
|
||||||
for (var i = 0; i < micDeviceCount; i++) {
|
|
||||||
var name = AudioTabController.getRecordingDeviceName(i)
|
|
||||||
devs3.push(name)
|
|
||||||
}
|
|
||||||
audioMicNameCombo.model = devs3
|
|
||||||
if (AudioTabController.micDeviceIndex < 0) {
|
|
||||||
audioMicNameCombo.currentIndex = 0
|
|
||||||
audioMicVolumeMinusButton.enabled = false
|
|
||||||
audioMicVolumeSlider.enabled = false
|
|
||||||
audioMicVolumePlusButton.enabled = false
|
|
||||||
audioMicMuteToggle.enabled = false
|
|
||||||
} else {
|
|
||||||
audioMicVolumeMinusButton.enabled = true
|
|
||||||
audioMicVolumeSlider.enabled = true
|
|
||||||
audioMicVolumePlusButton.enabled = true
|
|
||||||
audioMicMuteToggle.enabled = true
|
|
||||||
audioMicVolumeSlider.value = AudioTabController.micVolume
|
|
||||||
audioMicMuteToggle.checked = AudioTabController.micMuted
|
|
||||||
audioMicNameCombo.currentIndex = AudioTabController.micDeviceIndex
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function reloadPttProfiles() {
|
|
||||||
var profiles = [""]
|
|
||||||
var profileCount = AudioTabController.getPttProfileCount()
|
|
||||||
for (var i = 0; i < profileCount; i++) {
|
|
||||||
profiles.push(AudioTabController.getPttProfileName(i))
|
|
||||||
}
|
|
||||||
pttProfileComboBox.currentIndex = 0
|
|
||||||
pttProfileComboBox.model = profiles
|
|
||||||
}
|
|
||||||
|
|
||||||
function reloadAudioProfiles(){
|
|
||||||
var profiles = [""]
|
|
||||||
var profileCount = AudioTabController.getAudioProfileCount()
|
|
||||||
for (var i = 0; i < profileCount; i++) {
|
|
||||||
profiles.push(AudioTabController.getAudioProfileName(i))
|
|
||||||
}
|
|
||||||
audioProfileComboBox.currentIndex = 0;
|
|
||||||
audioProfileComboBox.model = profiles
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -4,6 +4,7 @@ import QtQuick.Layouts 1.3
|
|||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
import matzman666.advsettings 1.0
|
import matzman666.advsettings 1.0
|
||||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||||
|
import "common"
|
||||||
|
|
||||||
MyStackViewPage {
|
MyStackViewPage {
|
||||||
headerText: "Chaperone Settings"
|
headerText: "Chaperone Settings"
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import QtQuick.Layouts 1.3
|
|||||||
import QtQuick.Dialogs 1.2
|
import QtQuick.Dialogs 1.2
|
||||||
import matzman666.advsettings 1.0
|
import matzman666.advsettings 1.0
|
||||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||||
|
import "common"
|
||||||
|
|
||||||
MyStackViewPage {
|
MyStackViewPage {
|
||||||
headerText: "Chaperone Proximity Warning Settings"
|
headerText: "Chaperone Proximity Warning Settings"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import QtQuick 2.7
|
|||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import matzman666.advsettings 1.0
|
import matzman666.advsettings 1.0
|
||||||
|
import "common"
|
||||||
|
|
||||||
|
|
||||||
MyStackViewPage {
|
MyStackViewPage {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import QtQuick 2.7
|
|||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import matzman666.advsettings 1.0
|
import matzman666.advsettings 1.0
|
||||||
|
import "common"
|
||||||
|
|
||||||
|
|
||||||
MyStackViewPage {
|
MyStackViewPage {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import QtQuick 2.7
|
|||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import matzman666.advsettings 1.0
|
import matzman666.advsettings 1.0
|
||||||
|
import "common"
|
||||||
|
|
||||||
MyStackViewPage {
|
MyStackViewPage {
|
||||||
headerText: "Revive Settings"
|
headerText: "Revive Settings"
|
||||||
|
|||||||
@@ -3,7 +3,9 @@ import QtQuick.Controls 2.0
|
|||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import matzman666.advsettings 1.0
|
import matzman666.advsettings 1.0
|
||||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||||
|
import "common"
|
||||||
import "utilities_page"
|
import "utilities_page"
|
||||||
|
import "audio_page"
|
||||||
|
|
||||||
MyStackViewPage {
|
MyStackViewPage {
|
||||||
id: rootPage
|
id: rootPage
|
||||||
@@ -342,7 +344,7 @@ MyStackViewPage {
|
|||||||
Layout.leftMargin: 12
|
Layout.leftMargin: 12
|
||||||
checkable: true
|
checkable: true
|
||||||
contentItem: Image {
|
contentItem: Image {
|
||||||
source: parent.checked ? "mic_off.svg" : "mic_on.svg"
|
source: parent.checked ? "qrc:/microphone/off" : "qrc:/microphone/on"
|
||||||
sourceSize.width: 32
|
sourceSize.width: 32
|
||||||
sourceSize.height: 32
|
sourceSize.height: 32
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import QtQuick 2.7
|
|||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import matzman666.advsettings 1.0
|
import matzman666.advsettings 1.0
|
||||||
|
import "common"
|
||||||
|
|
||||||
MyStackViewPage {
|
MyStackViewPage {
|
||||||
headerText: "Application Settings"
|
headerText: "Application Settings"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import QtQuick 2.7
|
|||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import matzman666.advsettings 1.0
|
import matzman666.advsettings 1.0
|
||||||
|
import "common"
|
||||||
|
|
||||||
|
|
||||||
MyStackViewPage {
|
MyStackViewPage {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import QtQuick 2.7
|
|||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import matzman666.advsettings 1.0
|
import matzman666.advsettings 1.0
|
||||||
|
import "common"
|
||||||
|
|
||||||
MyStackViewPage {
|
MyStackViewPage {
|
||||||
id: myStackViewPage1
|
id: myStackViewPage1
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import matzman666.advsettings 1.0
|
||||||
|
import "../common"
|
||||||
|
import "device_selector"
|
||||||
|
import "proximity"
|
||||||
|
import "push_to_talk"
|
||||||
|
import "profiles"
|
||||||
|
|
||||||
|
MyStackViewPage {
|
||||||
|
width: 1200
|
||||||
|
headerText: "Audio Settings"
|
||||||
|
|
||||||
|
content: ColumnLayout {
|
||||||
|
spacing: 24
|
||||||
|
|
||||||
|
AudioDeviceSelector {
|
||||||
|
}
|
||||||
|
|
||||||
|
MirrorVolumeSlider {
|
||||||
|
}
|
||||||
|
|
||||||
|
MicVolumeSlider {
|
||||||
|
}
|
||||||
|
ColumnLayout {
|
||||||
|
spacing: 18
|
||||||
|
ProximityToggle {
|
||||||
|
}
|
||||||
|
PttButtons {
|
||||||
|
}
|
||||||
|
ProfileButtons {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import matzman666.advsettings 1.0
|
||||||
|
import "../../common"
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: audioPlaybackNameCombo
|
||||||
|
property string deviceText: "Audio Device: "
|
||||||
|
|
||||||
|
property alias devices: selector.model
|
||||||
|
property alias deviceIndex: selector.currentIndex
|
||||||
|
MyText {
|
||||||
|
text: deviceText
|
||||||
|
Layout.preferredWidth: 260
|
||||||
|
}
|
||||||
|
MyComboBox {
|
||||||
|
id: selector
|
||||||
|
Layout.maximumWidth: 850
|
||||||
|
Layout.minimumWidth: 850
|
||||||
|
Layout.preferredWidth: 850
|
||||||
|
onActivated: {
|
||||||
|
if (deviceIndex >= 0) {
|
||||||
|
AudioTabController.setPlaybackDeviceIndex(deviceIndex, false)
|
||||||
|
}
|
||||||
|
setShownAudioDevice(index)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component.onCompleted: {
|
||||||
|
audioPlaybackNameCombo.devices = getAudioDeviceList()
|
||||||
|
setShownAudioDevice(AudioTabController.playbackDeviceIndex)
|
||||||
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: AudioTabController
|
||||||
|
onPlaybackDeviceIndexChanged: {
|
||||||
|
setShownAudioDevice(index)
|
||||||
|
}
|
||||||
|
onPlaybackDeviceListChanged: {
|
||||||
|
audioPlaybackNameCombo.devices = getAudioDeviceList()
|
||||||
|
setShownAudioDevice(AudioTabController.playbackDeviceIndex)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function getAudioDeviceList() {
|
||||||
|
var devices = []
|
||||||
|
var playbackDevicesCount = AudioTabController.getPlaybackDeviceCount()
|
||||||
|
for (var i = 0; i < playbackDevicesCount; i++) {
|
||||||
|
var deviceName = AudioTabController.getPlaybackDeviceName(i)
|
||||||
|
devices.push(deviceName)
|
||||||
|
}
|
||||||
|
// Setting the model zeroes out the
|
||||||
|
// index so we need to set devices first.
|
||||||
|
return devices
|
||||||
|
}
|
||||||
|
function setShownAudioDevice(index) {
|
||||||
|
// If incorrect device, show "None".
|
||||||
|
if (index < 0) {
|
||||||
|
deviceIndex = 0
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
deviceIndex = index
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import matzman666.advsettings 1.0
|
||||||
|
import "../../common"
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: audioMicNameCombo
|
||||||
|
property string deviceText: "Microphone: "
|
||||||
|
|
||||||
|
// The entries in the dropdown box.
|
||||||
|
property alias devices: selector.model
|
||||||
|
// The current index of the chosen device.
|
||||||
|
// Add one for use in the dropdown box because of the "None" entry.
|
||||||
|
property alias deviceIndex: selector.currentIndex
|
||||||
|
MyText {
|
||||||
|
text: deviceText
|
||||||
|
Layout.preferredWidth: 260
|
||||||
|
}
|
||||||
|
MyComboBox {
|
||||||
|
id: selector
|
||||||
|
Layout.maximumWidth: 850
|
||||||
|
Layout.minimumWidth: 850
|
||||||
|
Layout.preferredWidth: 850
|
||||||
|
onActivated: {
|
||||||
|
if (deviceIndex >= 0) {
|
||||||
|
AudioTabController.setMicDeviceIndex(currentIndex)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function getAudioDeviceList() {
|
||||||
|
var devices = []
|
||||||
|
var playbackDevicesCount = AudioTabController.getRecordingDeviceCount()
|
||||||
|
for (var i = 0; i < playbackDevicesCount; i++) {
|
||||||
|
var deviceName = AudioTabController.getRecordingDeviceName(i)
|
||||||
|
devices.push(deviceName)
|
||||||
|
}
|
||||||
|
// Setting the model zeroes out the
|
||||||
|
// index so we need to set devices first.
|
||||||
|
return devices
|
||||||
|
}
|
||||||
|
function setShownAudioDevice(index) {
|
||||||
|
if (index < 0) {
|
||||||
|
deviceIndex = 0
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
deviceIndex = index
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component.onCompleted: {
|
||||||
|
devices = getAudioDeviceList()
|
||||||
|
setShownAudioDevice(AudioTabController.micDeviceIndex)
|
||||||
|
}
|
||||||
|
Connections {
|
||||||
|
target: AudioTabController
|
||||||
|
onMicDeviceIndexChanged: {
|
||||||
|
setShownAudioDevice(index)
|
||||||
|
}
|
||||||
|
onRecordingDeviceListChanged: {
|
||||||
|
devices = getAudioDeviceList()
|
||||||
|
setShownAudioDevice(AudioTabController.micDeviceIndex)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import matzman666.advsettings 1.0
|
||||||
|
import "../../common"
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
spacing: 18
|
||||||
|
MicDeviceSelector {
|
||||||
|
id: audioMicNameCombo
|
||||||
|
}
|
||||||
|
RowLayout {
|
||||||
|
MyText {
|
||||||
|
text: "Microphone Volume:"
|
||||||
|
Layout.preferredWidth: 260
|
||||||
|
}
|
||||||
|
|
||||||
|
MyPushButton2 {
|
||||||
|
id: audioMicVolumeMinusButton
|
||||||
|
text: "-"
|
||||||
|
Layout.preferredWidth: 40
|
||||||
|
onClicked: {
|
||||||
|
audioMicVolumeSlider.value -= 0.1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MySlider {
|
||||||
|
id: audioMicVolumeSlider
|
||||||
|
from: 0.0
|
||||||
|
to: 1.0
|
||||||
|
stepSize: 0.01
|
||||||
|
value: 1.0
|
||||||
|
Layout.fillWidth: true
|
||||||
|
onPositionChanged: {
|
||||||
|
var val = this.position * 100
|
||||||
|
audioMicVolumeText.text = Math.round(val) + "%"
|
||||||
|
}
|
||||||
|
onValueChanged: {
|
||||||
|
AudioTabController.setMicVolume(this.value.toFixed(2))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyPushButton2 {
|
||||||
|
id: audioMicVolumePlusButton
|
||||||
|
text: "+"
|
||||||
|
Layout.preferredWidth: 40
|
||||||
|
onClicked: {
|
||||||
|
audioMicVolumeSlider.value += 0.1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
id: audioMicVolumeText
|
||||||
|
text: "100%"
|
||||||
|
Layout.preferredWidth: 85
|
||||||
|
horizontalAlignment: Text.AlignRight
|
||||||
|
}
|
||||||
|
|
||||||
|
MyPushButton2 {
|
||||||
|
id: audioMicMuteToggle
|
||||||
|
Layout.leftMargin: 12
|
||||||
|
checkable: true
|
||||||
|
contentItem: Image {
|
||||||
|
source: parent.checked ? "qrc:/microphone/off" : "qrc:/microphone/on"
|
||||||
|
sourceSize.width: 32
|
||||||
|
sourceSize.height: 32
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
|
onCheckedChanged: {
|
||||||
|
AudioTabController.setMicMuted(checked)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component.onCompleted: {
|
||||||
|
if (AudioTabController.micDeviceIndex < 0) {
|
||||||
|
audioMicVolumeMinusButton.enabled = false
|
||||||
|
audioMicVolumeSlider.enabled = false
|
||||||
|
audioMicVolumePlusButton.enabled = false
|
||||||
|
audioMicMuteToggle.enabled = false
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
audioMicVolumeMinusButton.enabled = true
|
||||||
|
audioMicVolumeSlider.enabled = true
|
||||||
|
audioMicVolumePlusButton.enabled = true
|
||||||
|
audioMicMuteToggle.enabled = true
|
||||||
|
audioMicVolumeSlider.value = AudioTabController.micVolume
|
||||||
|
audioMicMuteToggle.checked = AudioTabController.micMuted
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Connections {
|
||||||
|
target: AudioTabController
|
||||||
|
onMicDeviceIndexChanged: {
|
||||||
|
if (index < 0) {
|
||||||
|
audioMicVolumeMinusButton.enabled = false
|
||||||
|
audioMicVolumeSlider.enabled = false
|
||||||
|
audioMicVolumePlusButton.enabled = false
|
||||||
|
audioMicMuteToggle.enabled = false
|
||||||
|
} else {
|
||||||
|
audioMicVolumeMinusButton.enabled = true
|
||||||
|
audioMicVolumeSlider.enabled = true
|
||||||
|
audioMicVolumePlusButton.enabled = true
|
||||||
|
audioMicMuteToggle.enabled = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onMicVolumeChanged: {
|
||||||
|
audioMicVolumeSlider.value = AudioTabController.micVolume
|
||||||
|
}
|
||||||
|
onMicMutedChanged: {
|
||||||
|
audioMicMuteToggle.checked = AudioTabController.micMuted
|
||||||
|
}
|
||||||
|
onPlaybackDeviceListChanged: {
|
||||||
|
|
||||||
|
}
|
||||||
|
onRecordingDeviceListChanged: {
|
||||||
|
if (AudioTabController.micDeviceIndex < 0) {
|
||||||
|
audioMicVolumeMinusButton.enabled = false
|
||||||
|
audioMicVolumeSlider.enabled = false
|
||||||
|
audioMicVolumePlusButton.enabled = false
|
||||||
|
audioMicMuteToggle.enabled = false
|
||||||
|
} else {
|
||||||
|
audioMicVolumeMinusButton.enabled = true
|
||||||
|
audioMicVolumeSlider.enabled = true
|
||||||
|
audioMicVolumePlusButton.enabled = true
|
||||||
|
audioMicMuteToggle.enabled = true
|
||||||
|
audioMicVolumeSlider.value = AudioTabController.micVolume
|
||||||
|
audioMicMuteToggle.checked = AudioTabController.micMuted
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import matzman666.advsettings 1.0
|
||||||
|
import "../../common"
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: audioMirrorNameCombo
|
||||||
|
// Text shown to the left.
|
||||||
|
property string deviceText: "Mirror Device: "
|
||||||
|
|
||||||
|
// The entries in the dropdown box.
|
||||||
|
property alias devices: selector.model
|
||||||
|
// The current index of the chosen device.
|
||||||
|
// Add one for use in the dropdown box because of the "None" entry.
|
||||||
|
property alias deviceIndex: selector.currentIndex
|
||||||
|
MyText {
|
||||||
|
text: deviceText
|
||||||
|
Layout.preferredWidth: 260
|
||||||
|
}
|
||||||
|
MyComboBox {
|
||||||
|
id: selector
|
||||||
|
Layout.maximumWidth: 850
|
||||||
|
Layout.minimumWidth: 850
|
||||||
|
Layout.preferredWidth: 850
|
||||||
|
onActivated: {
|
||||||
|
if (deviceIndex >= 0) {
|
||||||
|
// The mirror device list contains a "None" entry, hence
|
||||||
|
// we need to subtract one to get the real index.
|
||||||
|
AudioTabController.setMirrorDeviceIndex(deviceIndex - 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component.onCompleted: {
|
||||||
|
// Populate dropdown with devices
|
||||||
|
audioMirrorNameCombo.devices = getAudioDeviceList()
|
||||||
|
|
||||||
|
var mirrorIndex = AudioTabController.mirrorDeviceIndex
|
||||||
|
setShownAudioDevice(mirrorIndex)
|
||||||
|
|
||||||
|
}
|
||||||
|
Connections {
|
||||||
|
target: AudioTabController
|
||||||
|
onMirrorDeviceIndexChanged: {
|
||||||
|
setShownAudioDevice(index)
|
||||||
|
}
|
||||||
|
onPlaybackDeviceListChanged: {
|
||||||
|
audioPlaybackNameCombo.devices = getAudioDeviceList()
|
||||||
|
setShownAudioDevice(AudioTabController.playbackDeviceIndex)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function getAudioDeviceList() {
|
||||||
|
var devices = ["<None>"]
|
||||||
|
var playbackDevicesCount = AudioTabController.getPlaybackDeviceCount()
|
||||||
|
for (var i = 0; i < playbackDevicesCount; i++) {
|
||||||
|
var deviceName = AudioTabController.getPlaybackDeviceName(i)
|
||||||
|
devices.push(deviceName)
|
||||||
|
}
|
||||||
|
// Setting the model zeroes out the
|
||||||
|
// index so we need to set devices first.
|
||||||
|
return devices
|
||||||
|
}
|
||||||
|
function setShownAudioDevice(index) {
|
||||||
|
// If incorrect device, show "None".
|
||||||
|
if (index < 0) {
|
||||||
|
deviceIndex = 0
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// The mirror device list contains a "None" entry
|
||||||
|
// hence we need to add one to show the correct entry.
|
||||||
|
deviceIndex = index + 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,129 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import matzman666.advsettings 1.0
|
||||||
|
import "../../common"
|
||||||
|
import "."
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
spacing: 18
|
||||||
|
MirrorDeviceSelector {
|
||||||
|
id: audioMirrorNameCombo
|
||||||
|
}
|
||||||
|
RowLayout {
|
||||||
|
MyText {
|
||||||
|
text: "Mirror Volume:"
|
||||||
|
Layout.preferredWidth: 260
|
||||||
|
}
|
||||||
|
|
||||||
|
MyPushButton2 {
|
||||||
|
id: audioMirrorVolumeMinusButton
|
||||||
|
text: "-"
|
||||||
|
Layout.preferredWidth: 40
|
||||||
|
onClicked: {
|
||||||
|
audioMirrorVolumeSlider.value -= 0.1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MySlider {
|
||||||
|
id: audioMirrorVolumeSlider
|
||||||
|
from: 0.0
|
||||||
|
to: 1.0
|
||||||
|
stepSize: 0.01
|
||||||
|
value: 1.0
|
||||||
|
Layout.fillWidth: true
|
||||||
|
onPositionChanged: {
|
||||||
|
var val = this.position * 100
|
||||||
|
audioMirrorVolumeText.text = Math.round(val) + "%"
|
||||||
|
}
|
||||||
|
onValueChanged: {
|
||||||
|
AudioTabController.setMirrorVolume(this.value.toFixed(2), false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyPushButton2 {
|
||||||
|
id: audioMirrorVolumePlusButton
|
||||||
|
text: "+"
|
||||||
|
Layout.preferredWidth: 40
|
||||||
|
onClicked: {
|
||||||
|
audioMirrorVolumeSlider.value += 0.1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
id: audioMirrorVolumeText
|
||||||
|
text: "100%"
|
||||||
|
Layout.preferredWidth: 85
|
||||||
|
horizontalAlignment: Text.AlignRight
|
||||||
|
}
|
||||||
|
|
||||||
|
MyPushButton2 {
|
||||||
|
id: audioMirrorMuteToggle
|
||||||
|
Layout.leftMargin: 12
|
||||||
|
checkable: true
|
||||||
|
contentItem: Image {
|
||||||
|
source: parent.checked ? "qrc:/speaker/off" : "qrc:/speaker/on"
|
||||||
|
sourceSize.width: 32
|
||||||
|
sourceSize.height: 32
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
|
onCheckedChanged: {
|
||||||
|
AudioTabController.setMirrorMuted(checked, false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component.onCompleted: {
|
||||||
|
if (AudioTabController.mirrorDeviceIndex < 0) {
|
||||||
|
audioMirrorVolumeMinusButton.enabled = false
|
||||||
|
audioMirrorVolumeSlider.enabled = false
|
||||||
|
audioMirrorVolumePlusButton.enabled = false
|
||||||
|
audioMirrorMuteToggle.enabled = false
|
||||||
|
} else {
|
||||||
|
audioMirrorVolumeMinusButton.enabled = true
|
||||||
|
audioMirrorVolumeSlider.enabled = true
|
||||||
|
audioMirrorVolumePlusButton.enabled = true
|
||||||
|
audioMirrorMuteToggle.enabled = true
|
||||||
|
audioMirrorVolumeSlider.value = AudioTabController.mirrorVolume
|
||||||
|
audioMirrorMuteToggle.checked = AudioTabController.mirrorMuted
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Connections {
|
||||||
|
target: AudioTabController
|
||||||
|
onMirrorDeviceIndexChanged: {
|
||||||
|
if (index < 0) {
|
||||||
|
audioMirrorNameCombo.deviceIndex = 0
|
||||||
|
audioMirrorVolumeMinusButton.enabled = false
|
||||||
|
audioMirrorVolumeSlider.enabled = false
|
||||||
|
audioMirrorVolumePlusButton.enabled = false
|
||||||
|
audioMirrorMuteToggle.enabled = false
|
||||||
|
} else {
|
||||||
|
audioMirrorVolumeMinusButton.enabled = true
|
||||||
|
audioMirrorVolumeSlider.enabled = true
|
||||||
|
audioMirrorVolumePlusButton.enabled = true
|
||||||
|
audioMirrorMuteToggle.enabled = true
|
||||||
|
audioMirrorNameCombo.deviceIndex = index + 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onMirrorVolumeChanged: {
|
||||||
|
audioMirrorVolumeSlider.value = AudioTabController.mirrorVolume
|
||||||
|
}
|
||||||
|
onMirrorMutedChanged: {
|
||||||
|
audioMirrorMuteToggle.checked = AudioTabController.mirrorMuted
|
||||||
|
}
|
||||||
|
onPlaybackDeviceListChanged: {
|
||||||
|
if (AudioTabController.mirrorDeviceIndex < 0) {
|
||||||
|
audioMirrorVolumeMinusButton.enabled = false
|
||||||
|
audioMirrorVolumeSlider.enabled = false
|
||||||
|
audioMirrorVolumePlusButton.enabled = false
|
||||||
|
audioMirrorMuteToggle.enabled = false
|
||||||
|
} else {
|
||||||
|
audioMirrorVolumeMinusButton.enabled = true
|
||||||
|
audioMirrorVolumeSlider.enabled = true
|
||||||
|
audioMirrorVolumePlusButton.enabled = true
|
||||||
|
audioMirrorMuteToggle.enabled = true
|
||||||
|
audioMirrorVolumeSlider.value = AudioTabController.mirrorVolume
|
||||||
|
audioMirrorMuteToggle.checked = AudioTabController.mirrorMuted
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import matzman666.advsettings 1.0
|
||||||
|
import "../../common"
|
||||||
|
|
||||||
|
MyDialogOkCancelPopup {
|
||||||
|
id: audioDeleteProfileDialog
|
||||||
|
property int profileIndex: -1
|
||||||
|
dialogTitle: "Delete Profile"
|
||||||
|
dialogText: "Do you really want to delete this audio profile?"
|
||||||
|
onClosed: {
|
||||||
|
if (okClicked) {
|
||||||
|
AudioTabController.deleteAudioProfile(profileIndex)
|
||||||
|
pttProfileComboBox.currentIndex = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import matzman666.advsettings 1.0
|
||||||
|
import "../../common"
|
||||||
|
|
||||||
|
MyDialogOkPopup {
|
||||||
|
id: audioMessageDialog
|
||||||
|
function showMessage(title, text) {
|
||||||
|
dialogTitle = title
|
||||||
|
dialogText = text
|
||||||
|
open()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import matzman666.advsettings 1.0
|
||||||
|
import "../../common"
|
||||||
|
|
||||||
|
MyDialogOkCancelPopup {
|
||||||
|
id: audioNewProfileDialog
|
||||||
|
dialogTitle: "Create New Audio Profile"
|
||||||
|
dialogWidth: 600
|
||||||
|
dialogHeight: 300
|
||||||
|
dialogContentItem: ColumnLayout {
|
||||||
|
RowLayout {
|
||||||
|
Layout.topMargin: 16
|
||||||
|
Layout.leftMargin: 16
|
||||||
|
Layout.rightMargin: 16
|
||||||
|
MyText {
|
||||||
|
text: "Name: "
|
||||||
|
}
|
||||||
|
MyTextField {
|
||||||
|
id: audioNewProfileName
|
||||||
|
keyBoardUID: 590
|
||||||
|
color: "#cccccc"
|
||||||
|
text: ""
|
||||||
|
Layout.fillWidth: true
|
||||||
|
font.pointSize: 20
|
||||||
|
function onInputEvent(input) {
|
||||||
|
audioNewProfileName.text = input
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RowLayout {
|
||||||
|
id: test
|
||||||
|
Layout.topMargin: 16
|
||||||
|
Layout.leftMargin: 16
|
||||||
|
Layout.rightMargin: 16
|
||||||
|
MyToggleButton {
|
||||||
|
id: audioDefaultProfileToggle
|
||||||
|
Layout.preferredWidth: 250
|
||||||
|
text: "Make Default"
|
||||||
|
onCheckedChanged: {
|
||||||
|
AudioTabController.setAudioProfileDefault(checked, false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component.onCompleted: {
|
||||||
|
audioDefaultProfileToggle.checked = AudioTabController.audioProfileDefault
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onClosed: {
|
||||||
|
if (okClicked) {
|
||||||
|
if (audioNewProfileName.text != "") {
|
||||||
|
AudioTabController.addAudioProfile(audioNewProfileName.text)
|
||||||
|
} else {
|
||||||
|
audioMessageDialog.showMessage("Create New Profile", "ERROR: No name given.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Connections {
|
||||||
|
target: AudioTabController
|
||||||
|
onAudioProfileDefaultChanged: {
|
||||||
|
defaultProfileToggle = AudioTabController.audioProfileDefault
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function openPopup() {
|
||||||
|
audioNewProfileName.text = ""
|
||||||
|
open()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import matzman666.advsettings 1.0
|
||||||
|
import "../../common"
|
||||||
|
|
||||||
|
MyDialogOkCancelPopup {
|
||||||
|
id: pttDeleteProfileDialog
|
||||||
|
property int profileIndex: -1
|
||||||
|
dialogTitle: "Delete Profile"
|
||||||
|
dialogText: "Do you really want to delete this ptt profile?"
|
||||||
|
onClosed: {
|
||||||
|
if (okClicked) {
|
||||||
|
AudioTabController.deletePttProfile(profileIndex)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import matzman666.advsettings 1.0
|
||||||
|
import "../../common"
|
||||||
|
|
||||||
|
MyDialogOkCancelPopup {
|
||||||
|
id: pttNewProfileDialog
|
||||||
|
dialogTitle: "Create New PTT Profile"
|
||||||
|
dialogWidth: 600
|
||||||
|
dialogHeight: 220
|
||||||
|
dialogContentItem: ColumnLayout {
|
||||||
|
RowLayout {
|
||||||
|
Layout.topMargin: 16
|
||||||
|
Layout.leftMargin: 16
|
||||||
|
Layout.rightMargin: 16
|
||||||
|
MyText {
|
||||||
|
text: "Name: "
|
||||||
|
}
|
||||||
|
MyTextField {
|
||||||
|
id: pttNewProfileName
|
||||||
|
keyBoardUID: 590
|
||||||
|
color: "#cccccc"
|
||||||
|
text: ""
|
||||||
|
Layout.fillWidth: true
|
||||||
|
font.pointSize: 20
|
||||||
|
function onInputEvent(input) {
|
||||||
|
pttNewProfileName.text = input
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onClosed: {
|
||||||
|
if (okClicked) {
|
||||||
|
if (pttNewProfileName.text != "") {
|
||||||
|
AudioTabController.addPttProfile(pttNewProfileName.text)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
audioMessageDialog.showMessage("Create New Profile", "ERROR: No name given.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function openPopup() {
|
||||||
|
pttNewProfileName.text = ""
|
||||||
|
open()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,185 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import matzman666.advsettings 1.0
|
||||||
|
import "../../common"
|
||||||
|
import "../dialog_boxes"
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
AudioMessageDialog {
|
||||||
|
id: audioMessageDialog
|
||||||
|
}
|
||||||
|
|
||||||
|
PttDeleteProfileDialog {
|
||||||
|
id: pttDeleteProfileDialog
|
||||||
|
}
|
||||||
|
|
||||||
|
AudioDeleteProfileDialog {
|
||||||
|
id: audioDeleteProfileDialog
|
||||||
|
}
|
||||||
|
|
||||||
|
PttNewProfileDialog {
|
||||||
|
id: pttNewProfileDialog
|
||||||
|
}
|
||||||
|
|
||||||
|
AudioNewProfileDialog {
|
||||||
|
id: audioNewProfileDialog
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
spacing: 10
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
Layout.preferredWidth: 150
|
||||||
|
text: "Audio Profile:"
|
||||||
|
}
|
||||||
|
|
||||||
|
MyComboBox {
|
||||||
|
id: audioProfileComboBox
|
||||||
|
Layout.preferredWidth: 250
|
||||||
|
model: [""]
|
||||||
|
onCurrentIndexChanged: {
|
||||||
|
if (currentIndex > 0) {
|
||||||
|
audioApplyProfileButton.enabled = true
|
||||||
|
audioDeleteProfileButton.enabled = true
|
||||||
|
} else {
|
||||||
|
audioApplyProfileButton.enabled = false
|
||||||
|
audioDeleteProfileButton.enabled = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyPushButton {
|
||||||
|
id: audioApplyProfileButton
|
||||||
|
enabled: true
|
||||||
|
Layout.preferredWidth: 150
|
||||||
|
text: "Apply"
|
||||||
|
onClicked: {
|
||||||
|
if (audioProfileComboBox.currentIndex > 0) {
|
||||||
|
AudioTabController.applyAudioProfile(
|
||||||
|
audioProfileComboBox.currentIndex - 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyText {
|
||||||
|
text: "PTT Profile:"
|
||||||
|
Layout.preferredWidth: 150
|
||||||
|
}
|
||||||
|
|
||||||
|
MyComboBox {
|
||||||
|
id: pttProfileComboBox
|
||||||
|
Layout.preferredWidth: 250
|
||||||
|
model: [""]
|
||||||
|
onCurrentIndexChanged: {
|
||||||
|
if (currentIndex > 0) {
|
||||||
|
pttApplyProfileButton.enabled = true
|
||||||
|
pttDeleteProfileButton.enabled = true
|
||||||
|
} else {
|
||||||
|
pttApplyProfileButton.enabled = false
|
||||||
|
pttDeleteProfileButton.enabled = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MyPushButton {
|
||||||
|
id: pttApplyProfileButton
|
||||||
|
enabled: true
|
||||||
|
Layout.preferredWidth: 150
|
||||||
|
text: "Apply"
|
||||||
|
onClicked: {
|
||||||
|
if (pttProfileComboBox.currentIndex > 0) {
|
||||||
|
AudioTabController.applyPttProfile(
|
||||||
|
pttProfileComboBox.currentIndex - 1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RowLayout {
|
||||||
|
spacing: 18
|
||||||
|
|
||||||
|
MyPushButton {
|
||||||
|
id: audioDeleteProfileButton
|
||||||
|
enabled: true
|
||||||
|
Layout.preferredWidth: 200
|
||||||
|
text: "Delete Profile"
|
||||||
|
onClicked: {
|
||||||
|
if (audioProfileComboBox.currentIndex > 0) {
|
||||||
|
audioDeleteProfileDialog.profileIndex = audioProfileComboBox.currentIndex - 1
|
||||||
|
audioDeleteProfileDialog.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MyPushButton {
|
||||||
|
Layout.preferredWidth: 200
|
||||||
|
text: "New Profile"
|
||||||
|
onClicked: {
|
||||||
|
audioNewProfileDialog.openPopup()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
MyPushButton {
|
||||||
|
id: pttDeleteProfileButton
|
||||||
|
enabled: true
|
||||||
|
Layout.preferredWidth: 200
|
||||||
|
text: "Delete Profile"
|
||||||
|
onClicked: {
|
||||||
|
if (pttProfileComboBox.currentIndex > 0) {
|
||||||
|
pttDeleteProfileDialog.profileIndex = pttProfileComboBox.currentIndex - 1
|
||||||
|
pttDeleteProfileDialog.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MyPushButton {
|
||||||
|
Layout.preferredWidth: 200
|
||||||
|
text: "New Profile"
|
||||||
|
onClicked: {
|
||||||
|
pttNewProfileDialog.openPopup()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Component.onCompleted: {
|
||||||
|
reloadPttProfiles()
|
||||||
|
reloadAudioProfiles()
|
||||||
|
}
|
||||||
|
Connections {
|
||||||
|
target: AudioTabController
|
||||||
|
onPttProfilesUpdated: {
|
||||||
|
reloadPttProfiles()
|
||||||
|
}
|
||||||
|
onAudioProfilesUpdated: {
|
||||||
|
reloadAudioProfiles()
|
||||||
|
}
|
||||||
|
onAudioProfileAdded: {
|
||||||
|
audioProfileComboBox.currentIndex = AudioTabController.getAudioProfileCount()
|
||||||
|
}
|
||||||
|
onPttProfileAdded: {
|
||||||
|
pttProfileComboBox.currentIndex = AudioTabController.getPttProfileCount()
|
||||||
|
}
|
||||||
|
onDefaultProfileDisplay: {
|
||||||
|
audioProfileComboBox.currentIndex = AudioTabController.getDefaultAudioProfileIndex(
|
||||||
|
) + 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function reloadPttProfiles() {
|
||||||
|
var profiles = [""]
|
||||||
|
var profileCount = AudioTabController.getPttProfileCount()
|
||||||
|
for (var i = 0; i < profileCount; i++) {
|
||||||
|
profiles.push(AudioTabController.getPttProfileName(i))
|
||||||
|
}
|
||||||
|
pttProfileComboBox.currentIndex = 0
|
||||||
|
pttProfileComboBox.model = profiles
|
||||||
|
}
|
||||||
|
|
||||||
|
function reloadAudioProfiles() {
|
||||||
|
var profiles = [""]
|
||||||
|
var profileCount = AudioTabController.getAudioProfileCount()
|
||||||
|
for (var i = 0; i < profileCount; i++) {
|
||||||
|
profiles.push(AudioTabController.getAudioProfileName(i))
|
||||||
|
}
|
||||||
|
audioProfileComboBox.currentIndex = 0
|
||||||
|
audioProfileComboBox.model = profiles
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import matzman666.advsettings 1.0
|
||||||
|
import "../../common"
|
||||||
|
|
||||||
|
MyToggleButton {
|
||||||
|
id: audioMuteProximitySensorToggle
|
||||||
|
Layout.preferredWidth: 600
|
||||||
|
text: "Proximity Sensor Mutes/Unmutes Microphone"
|
||||||
|
onClicked: {
|
||||||
|
AudioTabController.setMicProximitySensorCanMute(checked, false)
|
||||||
|
}
|
||||||
|
Component.onCompleted: {
|
||||||
|
if (AudioTabController.micDeviceIndex < 0) {
|
||||||
|
audioMuteProximitySensorToggle.enabled = false
|
||||||
|
} else {
|
||||||
|
audioMuteProximitySensorToggle.enabled = true
|
||||||
|
audioMuteProximitySensorToggle.checked = AudioTabController.micProximitySensorCanMute
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Connections {
|
||||||
|
target: AudioTabController
|
||||||
|
onMicProximitySensorCanMuteChanged: {
|
||||||
|
audioMuteProximitySensorToggle.checked = AudioTabController.micProximitySensorCanMute
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
import QtQuick 2.7
|
||||||
|
import QtQuick.Controls 2.0
|
||||||
|
import QtQuick.Layouts 1.3
|
||||||
|
import matzman666.advsettings 1.0
|
||||||
|
import "../../common"
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
RowLayout {
|
||||||
|
PttControllerConfigDialog {
|
||||||
|
id: pttControllerConfigDialog
|
||||||
|
pttControllerConfigClass: AudioTabController
|
||||||
|
}
|
||||||
|
|
||||||
|
MyToggleButton {
|
||||||
|
id: audioPttEnabledToggle
|
||||||
|
Layout.preferredWidth: 260
|
||||||
|
text: "Push-to-Talk:"
|
||||||
|
onClicked: {
|
||||||
|
AudioTabController.pttEnabled = checked
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MyToggleButton {
|
||||||
|
id: audioPttLeftControllerToggle
|
||||||
|
text: "Left Controller"
|
||||||
|
onClicked: {
|
||||||
|
AudioTabController.setPttLeftControllerEnabled(checked, false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MyPushButton {
|
||||||
|
text: "Configure"
|
||||||
|
onClicked: {
|
||||||
|
pttControllerConfigDialog.openPopup(0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
MyToggleButton {
|
||||||
|
id: audioPttRightControllerToggle
|
||||||
|
text: "Right Controller"
|
||||||
|
onClicked: {
|
||||||
|
AudioTabController.setPttRightControllerEnabled(checked, false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MyPushButton {
|
||||||
|
text: "Configure"
|
||||||
|
onClicked: {
|
||||||
|
pttControllerConfigDialog.openPopup(1)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RowLayout {
|
||||||
|
|
||||||
|
MyToggleButton {
|
||||||
|
id: audioPttShowNotificationToggle
|
||||||
|
Layout.leftMargin: 350
|
||||||
|
text: "Show notification in HMD"
|
||||||
|
onCheckedChanged: {
|
||||||
|
AudioTabController.setPttShowNotification(checked, false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MyToggleButton {
|
||||||
|
id: audioPttReverseToggle
|
||||||
|
Layout.leftMargin: 118
|
||||||
|
text: "Push-to-Mute"
|
||||||
|
onClicked: {
|
||||||
|
AudioTabController.setMicReversePtt(checked, false)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
audioPttEnabledToggle.checked = AudioTabController.pttEnabled
|
||||||
|
audioPttLeftControllerToggle.checked = AudioTabController.pttLeftControllerEnabled
|
||||||
|
audioPttRightControllerToggle.checked = AudioTabController.pttRightControllerEnabled
|
||||||
|
audioPttShowNotificationToggle.checked = AudioTabController.pttShowNotification
|
||||||
|
audioPttReverseToggle.checked = AudioTabController.micReversePtt
|
||||||
|
}
|
||||||
|
Connections {
|
||||||
|
target: AudioTabController
|
||||||
|
onPttEnabledChanged: {
|
||||||
|
audioPttEnabledToggle.checked = AudioTabController.pttEnabled
|
||||||
|
}
|
||||||
|
onPttLeftControllerEnabledChanged: {
|
||||||
|
audioPttLeftControllerToggle.checked = AudioTabController.pttLeftControllerEnabled
|
||||||
|
}
|
||||||
|
onPttRightControllerEnabledChanged: {
|
||||||
|
audioPttRightControllerToggle.checked = AudioTabController.pttRightControllerEnabled
|
||||||
|
}
|
||||||
|
onMicReversePttChanged: {
|
||||||
|
audioPttReverseToggle.checked = AudioTabController.micReversePtt
|
||||||
|
}
|
||||||
|
onPttShowNotificationChanged: {
|
||||||
|
audioPttShowNotificationToggle.checked = AudioTabController.pttShowNotification
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,8 @@ import QtQuick 2.7
|
|||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||||
|
// Needed for MyResources in the default folder.
|
||||||
|
import ".."
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: "#1b2939"
|
color: "#1b2939"
|
||||||
@@ -24,7 +26,7 @@ Rectangle {
|
|||||||
enabled: headerShowBackButton
|
enabled: headerShowBackButton
|
||||||
opacity: headerShowBackButton ? 1.0 : 0.0
|
opacity: headerShowBackButton ? 1.0 : 0.0
|
||||||
contentItem: Image {
|
contentItem: Image {
|
||||||
source: "backarrow.svg"
|
source: "qrc:/common/backarrow"
|
||||||
sourceSize.width: 50
|
sourceSize.width: 50
|
||||||
sourceSize.height: 50
|
sourceSize.height: 50
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
import "." // QTBUG-34418, singletons require explicit import to load qmldir file
|
||||||
|
// Needed for MyResources in the default folder.
|
||||||
|
import ".."
|
||||||
|
|
||||||
CheckBox {
|
CheckBox {
|
||||||
checkState: Qt.Checked
|
checkState: Qt.Checked
|
||||||
@@ -30,7 +31,7 @@ CheckBox {
|
|||||||
height: 28
|
height: 28
|
||||||
x: (parent.width - width) / 2
|
x: (parent.width - width) / 2
|
||||||
y: (parent.height - height) / 2
|
y: (parent.height - height) / 2
|
||||||
source: "check.svg"
|
source: "qrc:/common/box_checkmark"
|
||||||
sourceSize.width: width
|
sourceSize.width: width
|
||||||
sourceSize.height: height
|
sourceSize.height: height
|
||||||
visible: parent.parent.checked
|
visible: parent.parent.checked
|
||||||
@@ -1,7 +1,9 @@
|
|||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Layouts 1.0
|
import QtQuick.Layouts 1.0
|
||||||
import "utilities_page"
|
import ".."
|
||||||
|
import "../utilities_page"
|
||||||
|
import "../audio_page"
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
@@ -1 +1 @@
|
|||||||
singleton MyResources 1.0 MyResources.qml
|
singleton MyResources 1.0 common/MyResources.qml
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import "media_keys"
|
|||||||
import "alarm_clock"
|
import "alarm_clock"
|
||||||
import "desktop_size"
|
import "desktop_size"
|
||||||
import "keyboard_utils"
|
import "keyboard_utils"
|
||||||
import ".."
|
import "../common"
|
||||||
|
|
||||||
MyStackViewPage {
|
MyStackViewPage {
|
||||||
headerText: "Utilities"
|
headerText: "Utilities"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import QtQuick 2.7
|
|||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import matzman666.advsettings 1.0
|
import matzman666.advsettings 1.0
|
||||||
import "../.."
|
import "../../common"
|
||||||
|
|
||||||
GroupBox {
|
GroupBox {
|
||||||
id: alarmGroupBox
|
id: alarmGroupBox
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import QtQuick 2.7
|
|||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import matzman666.advsettings 1.0
|
import matzman666.advsettings 1.0
|
||||||
import "../.."
|
import "../../common"
|
||||||
|
|
||||||
GroupBox {
|
GroupBox {
|
||||||
id: steamDesktopGroupBox
|
id: steamDesktopGroupBox
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import QtQuick 2.7
|
|||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import matzman666.advsettings 1.0
|
import matzman666.advsettings 1.0
|
||||||
import "../.."
|
import "../../common"
|
||||||
|
|
||||||
GroupBox {
|
GroupBox {
|
||||||
id: keyboardGroupBox
|
id: keyboardGroupBox
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ import QtQuick 2.7
|
|||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import matzman666.advsettings 1.0
|
import matzman666.advsettings 1.0
|
||||||
// Necessary for the project specific Components.
|
import "../../common"
|
||||||
import "../.."
|
|
||||||
|
|
||||||
MyPushButton2 {
|
MyPushButton2 {
|
||||||
// Public properties
|
// Public properties
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ import QtQuick 2.7
|
|||||||
import QtQuick.Controls 2.0
|
import QtQuick.Controls 2.0
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
import matzman666.advsettings 1.0
|
import matzman666.advsettings 1.0
|
||||||
// Necessary for the project specific Components.
|
import "../../common"
|
||||||
import "../.."
|
|
||||||
|
|
||||||
GroupBox {
|
GroupBox {
|
||||||
id: mediaKeysGroupBox
|
id: mediaKeysGroupBox
|
||||||
@@ -26,10 +25,10 @@ GroupBox {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
property string playPauseButtonPath: "outline_play_pause_white_24dp.svg"
|
property string playPauseButtonPath: "qrc:/media_keys/play_pause"
|
||||||
property string stopButtonPath: "outline_stop_white_24dp.svg"
|
property string stopButtonPath: "qrc:/media_keys/stop"
|
||||||
property string previousButtonPath: "outline_skip_previous_white_24dp.svg"
|
property string previousButtonPath: "qrc:/media_keys/previous"
|
||||||
property string nextButtonPath: "outline_skip_next_white_24dp.svg"
|
property string nextButtonPath: "qrc:/media_keys/next"
|
||||||
|
|
||||||
MediaButton {
|
MediaButton {
|
||||||
id: previousSongButton
|
id: previousSongButton
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<!DOCTYPE RCC><RCC version="1.0">
|
||||||
|
<qresource prefix="/common">
|
||||||
|
<file alias="backarrow">img/common/backarrow.svg</file>
|
||||||
|
<file alias="box_checkmark">img/common/check.svg</file>
|
||||||
|
</qresource>
|
||||||
|
<qresource prefix="/microphone">
|
||||||
|
<file alias="on">img/audio/microphone/mic_on.svg</file>
|
||||||
|
<file alias="off">img/audio/microphone/mic_off.svg</file>
|
||||||
|
</qresource>
|
||||||
|
<qresource prefix="/speaker">
|
||||||
|
<file alias="on">img/audio/speaker/speaker_on.svg</file>
|
||||||
|
<file alias="off">img/audio/speaker/speaker_off.svg</file>
|
||||||
|
</qresource>
|
||||||
|
<qresource prefix="/media_keys">
|
||||||
|
<file alias="play_pause">img/audio/media_keys/outline_play_pause_white_24dp.svg</file>
|
||||||
|
<file alias="next">img/audio/media_keys/outline_skip_next_white_24dp.svg</file>
|
||||||
|
<file alias="previous">img/audio/media_keys/outline_skip_previous_white_24dp.svg</file>
|
||||||
|
<file alias="stop">img/audio/media_keys/outline_stop_white_24dp.svg</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
||||||
@@ -72,7 +72,8 @@ void AudioTabController::initStage2( OverlayController* var_parent,
|
|||||||
{
|
{
|
||||||
QString notifIconPath = QStandardPaths::locate(
|
QString notifIconPath = QStandardPaths::locate(
|
||||||
QStandardPaths::AppDataLocation,
|
QStandardPaths::AppDataLocation,
|
||||||
QStringLiteral( "/res/qml/ptt_notification.png" ) );
|
QStringLiteral(
|
||||||
|
"/res/img/audio/microphone/ptt_notification.png" ) );
|
||||||
if ( QFile::exists( notifIconPath ) )
|
if ( QFile::exists( notifIconPath ) )
|
||||||
{
|
{
|
||||||
vr::VROverlay()->SetOverlayFromFile(
|
vr::VROverlay()->SetOverlayFromFile(
|
||||||
|
|||||||
@@ -274,7 +274,7 @@ void UtilitiesTabController::modAlarmTimeMinute( int value, bool notify )
|
|||||||
|
|
||||||
QString getBatteryIconPath( int batteryState )
|
QString getBatteryIconPath( int batteryState )
|
||||||
{
|
{
|
||||||
QString batteryPrefix = "/res/battery_";
|
QString batteryPrefix = "/res/img/battery/battery_";
|
||||||
return QStandardPaths::locate(
|
return QStandardPaths::locate(
|
||||||
QStandardPaths::AppDataLocation,
|
QStandardPaths::AppDataLocation,
|
||||||
batteryPrefix + QString::number( batteryState ) + ".png" );
|
batteryPrefix + QString::number( batteryState ) + ".png" );
|
||||||
|
|||||||