2014-09-29 02:00:54 +02:00
|
|
|
/*******************************************************************************
|
|
|
|
* Copyright (c) 2013 "Filippo Scognamiglio"
|
|
|
|
* https://github.com/Swordfish90/cool-retro-term
|
|
|
|
*
|
|
|
|
* This file is part of cool-retro-term.
|
|
|
|
*
|
|
|
|
* cool-retro-term is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*******************************************************************************/
|
|
|
|
|
|
|
|
import QtQuick 2.2
|
|
|
|
import QtQuick.Controls 1.1
|
|
|
|
import QtQuick.Layouts 1.1
|
|
|
|
|
2015-01-08 03:55:19 +01:00
|
|
|
import "Components"
|
|
|
|
|
2014-09-29 02:00:54 +02:00
|
|
|
Tab{
|
|
|
|
ColumnLayout{
|
|
|
|
anchors.fill: parent
|
2018-12-16 23:46:05 +01:00
|
|
|
|
|
|
|
GroupBox{
|
|
|
|
Layout.fillWidth: true
|
|
|
|
title: qsTr("Command")
|
|
|
|
ColumnLayout {
|
|
|
|
anchors.fill: parent
|
|
|
|
CheckBox{
|
|
|
|
id: useCustomCommand
|
|
|
|
text: qsTr("Use custom command instead of shell at startup")
|
|
|
|
checked: appSettings.useCustomCommand
|
|
|
|
onCheckedChanged: appSettings.useCustomCommand = checked
|
|
|
|
}
|
|
|
|
// Workaround for QTBUG-31627 for pre 5.3.0
|
|
|
|
Binding{
|
|
|
|
target: useCustomCommand
|
|
|
|
property: "checked"
|
|
|
|
value: appSettings.useCustomCommand
|
|
|
|
}
|
|
|
|
TextField{
|
|
|
|
id: customCommand
|
|
|
|
Layout.fillWidth: true
|
|
|
|
text: appSettings.customCommand
|
|
|
|
enabled: useCustomCommand.checked
|
|
|
|
onEditingFinished: appSettings.customCommand = text
|
|
|
|
|
|
|
|
// Save text even if user forgets to press enter or unfocus
|
|
|
|
function saveSetting() {
|
|
|
|
appSettings.customCommand = text;
|
|
|
|
}
|
|
|
|
Component.onCompleted: settings_window.closing.connect(saveSetting)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-09-29 02:00:54 +02:00
|
|
|
GroupBox{
|
2018-12-16 23:46:05 +01:00
|
|
|
title: qsTr("Performance")
|
2014-09-29 02:00:54 +02:00
|
|
|
Layout.fillWidth: true
|
|
|
|
GridLayout{
|
|
|
|
anchors.fill: parent
|
|
|
|
rows: 2
|
|
|
|
columns: 3
|
2018-12-16 23:46:05 +01:00
|
|
|
|
2015-01-24 18:06:37 +01:00
|
|
|
Label{text: qsTr("Effects FPS")}
|
2014-09-29 02:00:54 +02:00
|
|
|
Slider{
|
|
|
|
Layout.fillWidth: true
|
2015-01-24 18:06:37 +01:00
|
|
|
id: fpsSlider
|
|
|
|
onValueChanged: {
|
|
|
|
if (enabled) {
|
|
|
|
appSettings.fps = value !== 60 ? value + 1 : 0;
|
|
|
|
}
|
|
|
|
}
|
2014-09-29 02:00:54 +02:00
|
|
|
stepSize: 1
|
2015-01-24 18:06:37 +01:00
|
|
|
enabled: false
|
|
|
|
Component.onCompleted: {
|
|
|
|
minimumValue = 0;
|
|
|
|
maximumValue = 60;
|
|
|
|
value = appSettings.fps !== 0 ? appSettings.fps - 1 : 60;
|
|
|
|
enabled = true;
|
|
|
|
}
|
2014-09-29 02:00:54 +02:00
|
|
|
}
|
2018-12-16 23:46:05 +01:00
|
|
|
|
2015-01-24 18:06:37 +01:00
|
|
|
SizedLabel{text: appSettings.fps !== 0 ? appSettings.fps : qsTr("Max")}
|
2015-01-08 03:55:19 +01:00
|
|
|
Label{text: qsTr("Texture Quality")}
|
2014-09-29 02:00:54 +02:00
|
|
|
Slider{
|
|
|
|
Layout.fillWidth: true
|
|
|
|
id: txtslider
|
2014-12-26 00:44:32 +01:00
|
|
|
onValueChanged: if (enabled) appSettings.windowScaling = value;
|
2015-01-05 22:08:06 +01:00
|
|
|
stepSize: 0.05
|
2014-12-26 00:44:32 +01:00
|
|
|
enabled: false
|
|
|
|
Component.onCompleted: {
|
2015-01-05 22:08:06 +01:00
|
|
|
minimumValue = 0.25 //Without this value gets set to 0.5
|
2014-12-26 00:44:32 +01:00
|
|
|
value = appSettings.windowScaling;
|
|
|
|
enabled = true;
|
|
|
|
}
|
2014-09-29 02:00:54 +02:00
|
|
|
}
|
2015-01-08 03:55:19 +01:00
|
|
|
SizedLabel{text: Math.round(txtslider.value * 100) + "%"}
|
2018-12-16 23:46:05 +01:00
|
|
|
|
2015-01-08 03:55:19 +01:00
|
|
|
Label{text: qsTr("Bloom Quality")}
|
2014-09-30 00:57:57 +02:00
|
|
|
Slider{
|
|
|
|
Layout.fillWidth: true
|
2014-12-14 18:53:37 +01:00
|
|
|
id: bloomSlider
|
2014-12-26 00:44:32 +01:00
|
|
|
onValueChanged: if (enabled) appSettings.bloomQuality = value;
|
2015-01-05 22:08:06 +01:00
|
|
|
stepSize: 0.05
|
2014-12-26 00:44:32 +01:00
|
|
|
enabled: false
|
|
|
|
Component.onCompleted: {
|
2015-01-05 22:08:06 +01:00
|
|
|
minimumValue = 0.25
|
2014-12-26 00:44:32 +01:00
|
|
|
value = appSettings.bloomQuality;
|
|
|
|
enabled = true;
|
|
|
|
}
|
2014-09-30 00:57:57 +02:00
|
|
|
}
|
2015-01-08 03:55:19 +01:00
|
|
|
SizedLabel{text: Math.round(bloomSlider.value * 100) + "%"}
|
2014-12-15 02:35:13 +01:00
|
|
|
|
2015-01-08 03:55:19 +01:00
|
|
|
Label{text: qsTr("BurnIn Quality")}
|
2014-12-15 02:35:13 +01:00
|
|
|
Slider{
|
|
|
|
Layout.fillWidth: true
|
2014-12-26 00:44:32 +01:00
|
|
|
id: burnInSlider
|
|
|
|
onValueChanged: if (enabled) appSettings.burnInQuality = value;
|
2015-01-05 22:08:06 +01:00
|
|
|
stepSize: 0.05
|
2014-12-26 00:44:32 +01:00
|
|
|
enabled: false
|
|
|
|
Component.onCompleted: {
|
2015-01-05 22:08:06 +01:00
|
|
|
minimumValue = 0.25
|
2014-12-26 00:44:32 +01:00
|
|
|
value = appSettings.burnInQuality;
|
|
|
|
enabled = true;
|
|
|
|
}
|
2014-12-15 02:35:13 +01:00
|
|
|
}
|
2015-01-08 03:55:19 +01:00
|
|
|
SizedLabel{text: Math.round(burnInSlider.value * 100) + "%"}
|
2019-01-09 19:01:11 +01:00
|
|
|
CheckBox{
|
|
|
|
Layout.columnSpan: 2
|
|
|
|
text: qsTr("Burnin optimization (Might display timing artifacts)")
|
|
|
|
checked: appSettings.useFastBurnIn
|
|
|
|
onCheckedChanged: appSettings.useFastBurnIn = checked
|
|
|
|
}
|
2014-12-15 02:35:13 +01:00
|
|
|
}
|
|
|
|
}
|
2014-09-29 02:00:54 +02:00
|
|
|
}
|
|
|
|
}
|