1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2024-10-06 02:50:50 +01:00
cool-retro-term/app/SettingsWindow.qml

206 lines
8.1 KiB
QML
Raw Normal View History

2013-12-28 13:52:10 +00:00
/*******************************************************************************
* Copyright (c) 2013 "Filippo Scognamiglio"
* https://github.com/Swordifish90/cool-old-term
*
* This file is part of cool-old-term.
*
* cool-old-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/>.
*******************************************************************************/
2013-11-25 18:05:31 +00:00
import QtQuick 2.1
import QtQuick.Controls 1.0
import QtQuick.Window 2.1
import QtQuick.Layouts 1.0
import QtQuick.Dialogs 1.1
2013-11-25 18:05:31 +00:00
ApplicationWindow {
id: settings_window
2013-11-25 18:05:31 +00:00
title: qsTr("Settings")
width: 640
height: 400
2013-11-25 18:05:31 +00:00
//modality: Qt.ApplicationModal
2013-11-25 18:05:31 +00:00
TabView{
anchors.fill: parent
Tab{
title: qsTr("Appearance")
anchors.margins: 20
anchors.top: parent.top
GridLayout{
2013-11-25 18:05:31 +00:00
anchors.fill: parent
columns: 2
GroupBox{
Layout.columnSpan: 2
Layout.fillWidth: true
title: qsTr("Profile")
2013-12-26 00:12:14 +00:00
ComboBox{
anchors.fill: parent
model: shadersettings.profiles_list
onCurrentIndexChanged: shadersettings.profiles_index = currentIndex
currentIndex: shadersettings.profiles_index
2013-12-26 00:12:14 +00:00
}
}
GroupBox{
id: fontbox
title: qsTr("Font")
Layout.fillWidth: true
Layout.fillHeight:true
GridLayout{
anchors.fill: parent
columns: 2
Text{text: qsTr("Font style:")}
ComboBox{
Layout.fillWidth: true
model: shadersettings.fonts_list
currentIndex: shadersettings.font_index
onCurrentIndexChanged: shadersettings.font_index = currentIndex
}
Text{text: qsTr("Font scaling:")}
SpinBox{
Layout.fillWidth: true
decimals: 1
stepSize: 0.1
value: shadersettings.font_scaling
minimumValue: 0.5
maximumValue: 1.5
onValueChanged: shadersettings.font_scaling = value;
}
Item{Layout.fillHeight: true}
2013-12-22 23:13:47 +00:00
ColorButton{
height: 50
Layout.fillWidth: true
Layout.columnSpan: 2
onButton_colorChanged: shadersettings._font_color = button_color;
button_color: shadersettings._font_color;
}
2013-11-25 18:05:31 +00:00
}
}
GroupBox{
title: qsTr("Background")
Layout.fillWidth: true
Layout.fillHeight:true
GridLayout{
anchors.fill: parent
columns: 2
Text{text: "Frame texture"}
ComboBox{
Layout.fillWidth: true
model: shadersettings.frames_list
currentIndex: shadersettings.frames_index
onCurrentIndexChanged: shadersettings.frames_index = currentIndex
}
Item{Layout.fillHeight: true}
2013-12-22 23:13:47 +00:00
ColorButton{
height: 50
Layout.fillWidth: true
Layout.columnSpan: 2
2013-12-22 23:13:47 +00:00
onButton_colorChanged: shadersettings._background_color= button_color
button_color: shadersettings._background_color;
}
}
}
GroupBox{
title: qsTr("Background")
Layout.fillWidth: true
Layout.columnSpan: 2
anchors.left: parent.left
anchors.right: parent.right
ColumnLayout{
Layout.columnSpan: 2
anchors.left: parent.left
anchors.right: parent.right
SimpleSlider{
name: "Contrast"
onValueChanged: shadersettings.contrast = value
value: shadersettings.contrast
}
SimpleSlider{
2014-03-31 16:26:51 +01:00
name: "Brightness"
onValueChanged: shadersettings.brightness = value
value: shadersettings.brightness
2014-03-31 16:26:51 +01:00
}
}
2013-11-25 18:05:31 +00:00
}
}
}
Tab{
title: qsTr("Eye-candy")
anchors.fill: parent
anchors.margins: 20
GroupBox{
title: qsTr("Effects")
anchors.fill: parent
2013-12-22 22:08:16 +00:00
ColumnLayout{
anchors.fill: parent
2013-11-25 18:05:31 +00:00
SettingComponent{
name: "Scanlines"
onValueChanged: shadersettings.scanlines = value
_value: shadersettings.scanlines
}
2014-03-23 17:29:19 +00:00
SettingComponent{
name: "Bloom"
onValueChanged: shadersettings.bloom_strength = value
_value: shadersettings.bloom_strength
}
SettingComponent{
name: "Motion Blur"
onValueChanged: shadersettings.motion_blur = value
_value: shadersettings.motion_blur
}
2013-12-22 22:08:16 +00:00
SettingComponent{
name: "Noise"
onValueChanged: shadersettings.noise_strength = value
_value: shadersettings.noise_strength
2013-11-25 18:05:31 +00:00
}
2013-12-22 22:08:16 +00:00
SettingComponent{
name: "Glow"
2013-11-25 18:05:31 +00:00
onValueChanged: shadersettings.glowing_line_strength = value;
_value: shadersettings.glowing_line_strength
2013-11-25 18:05:31 +00:00
}
2013-12-22 22:08:16 +00:00
SettingComponent{
name: "Ambient light"
2013-11-25 18:05:31 +00:00
onValueChanged: shadersettings.ambient_light = value;
_value: shadersettings.ambient_light
2013-11-25 18:05:31 +00:00
}
SettingComponent{
name: "Screen distortion"
onValueChanged: shadersettings.screen_distortion = value;
_value: shadersettings.screen_distortion;
}
2013-12-25 20:04:10 +00:00
SettingComponent{
name: "Brightness flickering"
onValueChanged: shadersettings.brightness_flickering= value;
_value: shadersettings.brightness_flickering;
2013-12-25 20:04:10 +00:00
}
SettingComponent{
name: "Horizontal flickering"
onValueChanged: shadersettings.horizontal_sincronization = value;
_value: shadersettings.horizontal_sincronization;
}
2013-11-25 18:05:31 +00:00
}
}
}
}
}