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

141 lines
5.1 KiB
QML
Raw Normal View History

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: 300
2013-11-25 18:05:31 +00:00
visible: true
modality: Qt.ApplicationModal
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
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:")}
ComboBox{
Layout.fillWidth: true
}
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:48:25 +00:00
onButton_colorChanged: shadersettings.font_color = button_color;
2013-12-22 23:13:47 +00:00
Component.onCompleted: 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
Component.onCompleted: button_color = shadersettings.background_color;
}
}
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
CheckBox{
text: "Scanlines"
checked: shadersettings.scanlines
onCheckedChanged: shadersettings.scanlines = checked;
}
2013-12-22 22:08:16 +00:00
SettingComponent{
name: "Noise"
onValueChanged: shadersettings.noise_strength = value
2013-12-22 23:48:25 +00:00
Component.onCompleted: _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;
2013-12-22 23:48:25 +00:00
Component.onCompleted: _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;
2013-12-22 23:48:25 +00:00
Component.onCompleted: _value = shadersettings.ambient_light
2013-11-25 18:05:31 +00:00
}
SettingComponent{
name: "Screen distortion"
onValueChanged: shadersettings.screen_distortion = value;
Component.onCompleted: _value = shadersettings.screen_distortion;
}
2013-12-25 20:04:10 +00:00
SettingComponent{
name: "Screen flickering"
onValueChanged: shadersettings.screen_flickering = value;
Component.onCompleted: _value = shadersettings.screen_flickering;
2013-12-25 20:04:10 +00:00
}
2013-11-25 18:05:31 +00:00
}
}
}
}
}