|
|
|
@ -4,6 +4,7 @@ import QtQuick.Controls 2.12
|
|
|
|
|
import QtQuick.Layouts 1.12 |
|
|
|
|
|
|
|
|
|
import NERvGear 1.0 as NVG |
|
|
|
|
import NERvGear.Controls 1.0 |
|
|
|
|
import NERvGear.Templates 1.0 as T |
|
|
|
|
import NERvGear.Preferences 1.0 as P |
|
|
|
|
|
|
|
|
@ -378,8 +379,6 @@ T.Widget {
|
|
|
|
|
visible: true |
|
|
|
|
minimumWidth: 400 |
|
|
|
|
minimumHeight: 660 |
|
|
|
|
maximumWidth: minimumWidth |
|
|
|
|
maximumHeight: minimumHeight |
|
|
|
|
width: minimumWidth |
|
|
|
|
height: minimumHeight |
|
|
|
|
|
|
|
|
@ -387,280 +386,275 @@ T.Widget {
|
|
|
|
|
|
|
|
|
|
property var configuration |
|
|
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
|
id: root |
|
|
|
|
Page { |
|
|
|
|
id: cfg_page |
|
|
|
|
anchors.fill: parent |
|
|
|
|
anchors.margins: 16 |
|
|
|
|
anchors.topMargin: 0 |
|
|
|
|
|
|
|
|
|
Row { |
|
|
|
|
spacing: 270 |
|
|
|
|
|
|
|
|
|
ToolButton { |
|
|
|
|
text: qsTr("Save") |
|
|
|
|
onClicked: { |
|
|
|
|
configuration = rootPreference.save(); |
|
|
|
|
widget.settings.styles = configuration; |
|
|
|
|
styleDialog.active = false; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
ToolButton { |
|
|
|
|
text: qsTr("Reset") |
|
|
|
|
onClicked: { |
|
|
|
|
rootPreference.load(); |
|
|
|
|
let cfg = rootPreference.save(); |
|
|
|
|
widget.settings.styles = cfg; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Label { |
|
|
|
|
Layout.alignment: Qt.AlignCenter |
|
|
|
|
header: TitleBar { |
|
|
|
|
text: qsTr("Settings") |
|
|
|
|
font.pixelSize: 24 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Flickable { |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
Layout.fillHeight: true |
|
|
|
|
|
|
|
|
|
clip: true |
|
|
|
|
contentWidth: preferenceLayout.implicitWidth |
|
|
|
|
contentHeight: preferenceLayout.implicitHeight |
|
|
|
|
|
|
|
|
|
ColumnLayout { |
|
|
|
|
id: preferenceLayout |
|
|
|
|
width: root.width |
|
|
|
|
|
|
|
|
|
P.PreferenceGroup { |
|
|
|
|
id: rootPreference |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
|
|
|
|
label: qsTr("Configuration") |
|
|
|
|
|
|
|
|
|
onPreferenceEdited: { |
|
|
|
|
widget.settings.styles = rootPreference.save(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.DialogPreference { |
|
|
|
|
name: "BG Settings" |
|
|
|
|
label: qsTr("Background Settings") |
|
|
|
|
live: true |
|
|
|
|
icon.name: "regular:\uf1de" |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "BG Color" |
|
|
|
|
label: qsTr("Color") |
|
|
|
|
defaultValue: "#212121" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.SliderPreference { |
|
|
|
|
name: "BG Alpha" |
|
|
|
|
label: qsTr("Transparency") |
|
|
|
|
from: 0 |
|
|
|
|
to: 100 |
|
|
|
|
stepSize: 1 |
|
|
|
|
defaultValue: 100 |
|
|
|
|
displayValue: value + "%" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.Separator {} |
|
|
|
|
|
|
|
|
|
P.SwitchPreference { |
|
|
|
|
id: show_hgrid |
|
|
|
|
name: "Show HGrid" |
|
|
|
|
label: qsTr("Show Scale") |
|
|
|
|
defaultValue: true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "HGRID Color" |
|
|
|
|
label: qsTr("Scale Color") |
|
|
|
|
enabled: show_hgrid.value |
|
|
|
|
defaultValue: "#616161" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.Separator {} |
|
|
|
|
|
|
|
|
|
P.SwitchPreference { |
|
|
|
|
id: showCenter |
|
|
|
|
name: "Show Center" |
|
|
|
|
label: qsTr("Show Center") |
|
|
|
|
defaultValue: true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "Center Color" |
|
|
|
|
label: qsTr("Center Color") |
|
|
|
|
enabled: showCenter.value |
|
|
|
|
defaultValue: "#ffeb3b" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.SliderPreference { |
|
|
|
|
name: "Center Radius" |
|
|
|
|
label: qsTr("Center Radius") |
|
|
|
|
enabled: showCenter.value |
|
|
|
|
from: 30 |
|
|
|
|
to: 100 |
|
|
|
|
stepSize: 1 |
|
|
|
|
defaultValue: 85 |
|
|
|
|
displayValue: value + "%" |
|
|
|
|
} |
|
|
|
|
standardButtons: Dialog.Save | Dialog.Reset |
|
|
|
|
|
|
|
|
|
P.Separator {} |
|
|
|
|
|
|
|
|
|
P.SwitchPreference { |
|
|
|
|
id: showClock |
|
|
|
|
name: "Show Clock" |
|
|
|
|
label: qsTr("Display Time") |
|
|
|
|
defaultValue: true |
|
|
|
|
} |
|
|
|
|
onAccepted: { |
|
|
|
|
configuration = rootPreference.save(); |
|
|
|
|
widget.settings.styles = configuration; |
|
|
|
|
styleDialog.active = false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "Clock Color" |
|
|
|
|
label: qsTr("Font Color") |
|
|
|
|
enabled: showClock.value |
|
|
|
|
defaultValue: "#616161" |
|
|
|
|
} |
|
|
|
|
onReset: { |
|
|
|
|
rootPreference.load(); |
|
|
|
|
let cfg = rootPreference.save(); |
|
|
|
|
widget.settings.styles = cfg; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.SliderPreference { |
|
|
|
|
name: "Font Size" |
|
|
|
|
label: qsTr("Font Size") |
|
|
|
|
enabled: showClock.value |
|
|
|
|
from: 50 |
|
|
|
|
to: 100 |
|
|
|
|
stepSize: 1 |
|
|
|
|
defaultValue: 100 |
|
|
|
|
displayValue: value + "%" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
ColumnLayout { |
|
|
|
|
id: root |
|
|
|
|
anchors.fill: parent |
|
|
|
|
anchors.margins: 16 |
|
|
|
|
anchors.topMargin: 0 |
|
|
|
|
|
|
|
|
|
P.Separator {} |
|
|
|
|
Flickable { |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
Layout.fillHeight: true |
|
|
|
|
|
|
|
|
|
P.DialogPreference { |
|
|
|
|
name: "Hour Settings" |
|
|
|
|
label: qsTr("Hour Settings") |
|
|
|
|
live: true |
|
|
|
|
icon.name: "regular:\uf1de" |
|
|
|
|
clip: true |
|
|
|
|
contentWidth: preferenceLayout.implicitWidth |
|
|
|
|
contentHeight: preferenceLayout.implicitHeight |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "Hstar Color" |
|
|
|
|
label: qsTr("Star Color") |
|
|
|
|
defaultValue: "#ffa000" |
|
|
|
|
} |
|
|
|
|
ColumnLayout { |
|
|
|
|
id: preferenceLayout |
|
|
|
|
width: root.width |
|
|
|
|
|
|
|
|
|
P.Separator {} |
|
|
|
|
P.PreferenceGroup { |
|
|
|
|
id: rootPreference |
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
|
|
|
|
P.SwitchPreference { |
|
|
|
|
id: hour_settings_show_orbit |
|
|
|
|
name: "Show Orbit" |
|
|
|
|
label: qsTr("Show Orbit") |
|
|
|
|
defaultValue: true |
|
|
|
|
} |
|
|
|
|
label: qsTr("Configuration") |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "Horbit Color" |
|
|
|
|
label: qsTr("Orbit Color") |
|
|
|
|
enabled: hour_settings_show_orbit.value |
|
|
|
|
defaultValue: "#616161" |
|
|
|
|
onPreferenceEdited: { |
|
|
|
|
widget.settings.styles = rootPreference.save(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.DialogPreference { |
|
|
|
|
name: "Min Settings" |
|
|
|
|
label: qsTr("Minute Settings") |
|
|
|
|
live: true |
|
|
|
|
icon.name: "regular:\uf1de" |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "Mstar Color" |
|
|
|
|
label: qsTr("Star Color") |
|
|
|
|
defaultValue: "#ff5722" |
|
|
|
|
P.DialogPreference { |
|
|
|
|
name: "BG Settings" |
|
|
|
|
label: qsTr("Background Settings") |
|
|
|
|
live: true |
|
|
|
|
icon.name: "regular:\uf1de" |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "BG Color" |
|
|
|
|
label: qsTr("Color") |
|
|
|
|
defaultValue: "#212121" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.SliderPreference { |
|
|
|
|
name: "BG Alpha" |
|
|
|
|
label: qsTr("Transparency") |
|
|
|
|
from: 0 |
|
|
|
|
to: 100 |
|
|
|
|
stepSize: 1 |
|
|
|
|
defaultValue: 100 |
|
|
|
|
displayValue: value + "%" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.Separator {} |
|
|
|
|
|
|
|
|
|
P.SwitchPreference { |
|
|
|
|
id: show_hgrid |
|
|
|
|
name: "Show HGrid" |
|
|
|
|
label: qsTr("Show Scale") |
|
|
|
|
defaultValue: true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "HGRID Color" |
|
|
|
|
label: qsTr("Scale Color") |
|
|
|
|
enabled: show_hgrid.value |
|
|
|
|
defaultValue: "#616161" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.Separator {} |
|
|
|
|
|
|
|
|
|
P.SwitchPreference { |
|
|
|
|
id: showCenter |
|
|
|
|
name: "Show Center" |
|
|
|
|
label: qsTr("Show Center") |
|
|
|
|
defaultValue: true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "Center Color" |
|
|
|
|
label: qsTr("Center Color") |
|
|
|
|
enabled: showCenter.value |
|
|
|
|
defaultValue: "#ffeb3b" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.SliderPreference { |
|
|
|
|
name: "Center Radius" |
|
|
|
|
label: qsTr("Center Radius") |
|
|
|
|
enabled: showCenter.value |
|
|
|
|
from: 30 |
|
|
|
|
to: 100 |
|
|
|
|
stepSize: 1 |
|
|
|
|
defaultValue: 85 |
|
|
|
|
displayValue: value + "%" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.Separator {} |
|
|
|
|
|
|
|
|
|
P.SwitchPreference { |
|
|
|
|
id: showClock |
|
|
|
|
name: "Show Clock" |
|
|
|
|
label: qsTr("Display Time") |
|
|
|
|
defaultValue: true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "Clock Color" |
|
|
|
|
label: qsTr("Font Color") |
|
|
|
|
enabled: showClock.value |
|
|
|
|
defaultValue: "#616161" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.SliderPreference { |
|
|
|
|
name: "Font Size" |
|
|
|
|
label: qsTr("Font Size") |
|
|
|
|
enabled: showClock.value |
|
|
|
|
from: 50 |
|
|
|
|
to: 100 |
|
|
|
|
stepSize: 1 |
|
|
|
|
defaultValue: 100 |
|
|
|
|
displayValue: value + "%" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.Separator {} |
|
|
|
|
|
|
|
|
|
P.SwitchPreference { |
|
|
|
|
id: min_settings_show_orbit |
|
|
|
|
name: "Show Orbit" |
|
|
|
|
label: qsTr("Show Orbit") |
|
|
|
|
defaultValue: true |
|
|
|
|
P.DialogPreference { |
|
|
|
|
name: "Hour Settings" |
|
|
|
|
label: qsTr("Hour Settings") |
|
|
|
|
live: true |
|
|
|
|
icon.name: "regular:\uf1de" |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "Hstar Color" |
|
|
|
|
label: qsTr("Star Color") |
|
|
|
|
defaultValue: "#ffa000" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.Separator {} |
|
|
|
|
|
|
|
|
|
P.SwitchPreference { |
|
|
|
|
id: hour_settings_show_orbit |
|
|
|
|
name: "Show Orbit" |
|
|
|
|
label: qsTr("Show Orbit") |
|
|
|
|
defaultValue: true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "Horbit Color" |
|
|
|
|
label: qsTr("Orbit Color") |
|
|
|
|
enabled: hour_settings_show_orbit.value |
|
|
|
|
defaultValue: "#616161" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "Morbit Color" |
|
|
|
|
label: qsTr("Orbit Color") |
|
|
|
|
enabled: min_settings_show_orbit.value |
|
|
|
|
defaultValue: "#616161" |
|
|
|
|
P.DialogPreference { |
|
|
|
|
name: "Min Settings" |
|
|
|
|
label: qsTr("Minute Settings") |
|
|
|
|
live: true |
|
|
|
|
icon.name: "regular:\uf1de" |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "Mstar Color" |
|
|
|
|
label: qsTr("Star Color") |
|
|
|
|
defaultValue: "#ff5722" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.Separator {} |
|
|
|
|
|
|
|
|
|
P.SwitchPreference { |
|
|
|
|
id: min_settings_show_orbit |
|
|
|
|
name: "Show Orbit" |
|
|
|
|
label: qsTr("Show Orbit") |
|
|
|
|
defaultValue: true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "Morbit Color" |
|
|
|
|
label: qsTr("Orbit Color") |
|
|
|
|
enabled: min_settings_show_orbit.value |
|
|
|
|
defaultValue: "#616161" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.DialogPreference { |
|
|
|
|
name: "Sec Settings" |
|
|
|
|
label: qsTr("Second Settings") |
|
|
|
|
live: true |
|
|
|
|
icon.name: "regular:\uf1de" |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "Sstar Color" |
|
|
|
|
label: qsTr("Star Color") |
|
|
|
|
defaultValue: "#2196f3" |
|
|
|
|
P.DialogPreference { |
|
|
|
|
name: "Sec Settings" |
|
|
|
|
label: qsTr("Second Settings") |
|
|
|
|
live: true |
|
|
|
|
icon.name: "regular:\uf1de" |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "Sstar Color" |
|
|
|
|
label: qsTr("Star Color") |
|
|
|
|
defaultValue: "#2196f3" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.Separator {} |
|
|
|
|
|
|
|
|
|
P.SwitchPreference { |
|
|
|
|
id: sec_settings_show_orbit |
|
|
|
|
name: "Show Orbit" |
|
|
|
|
label: qsTr("Show Orbit") |
|
|
|
|
defaultValue: true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "Sorbit Color" |
|
|
|
|
label: qsTr("Orbit Color") |
|
|
|
|
enabled: sec_settings_show_orbit.value |
|
|
|
|
defaultValue: "#616161" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.Separator {} |
|
|
|
|
|
|
|
|
|
P.SwitchPreference { |
|
|
|
|
id: sec_settings_show_orbit |
|
|
|
|
name: "Show Orbit" |
|
|
|
|
label: qsTr("Show Orbit") |
|
|
|
|
defaultValue: true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "Sorbit Color" |
|
|
|
|
label: qsTr("Orbit Color") |
|
|
|
|
enabled: sec_settings_show_orbit.value |
|
|
|
|
defaultValue: "#616161" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.DialogPreference { |
|
|
|
|
name: "MSec Settings" |
|
|
|
|
label: qsTr("Millisecond Settings") |
|
|
|
|
live: true |
|
|
|
|
icon.name: "regular:\uf1de" |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "MSstar Color" |
|
|
|
|
label: qsTr("Star Color") |
|
|
|
|
defaultValue: "#9e9e9e" |
|
|
|
|
P.DialogPreference { |
|
|
|
|
name: "MSec Settings" |
|
|
|
|
label: qsTr("Millisecond Settings") |
|
|
|
|
live: true |
|
|
|
|
icon.name: "regular:\uf1de" |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "MSstar Color" |
|
|
|
|
label: qsTr("Star Color") |
|
|
|
|
defaultValue: "#9e9e9e" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.Separator {} |
|
|
|
|
|
|
|
|
|
P.SwitchPreference { |
|
|
|
|
id: msec_settings_show_orbit |
|
|
|
|
name: "Show Orbit" |
|
|
|
|
label: qsTr("Show Orbit") |
|
|
|
|
defaultValue: true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "MSorbit Color" |
|
|
|
|
label: qsTr("Orbit Color") |
|
|
|
|
enabled: msec_settings_show_orbit.value |
|
|
|
|
defaultValue: "#9e9e9e" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.Separator {} |
|
|
|
|
|
|
|
|
|
P.SwitchPreference { |
|
|
|
|
id: msec_settings_show_orbit |
|
|
|
|
name: "Show Orbit" |
|
|
|
|
label: qsTr("Show Orbit") |
|
|
|
|
defaultValue: true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
P.ColorPreference { |
|
|
|
|
name: "MSorbit Color" |
|
|
|
|
label: qsTr("Orbit Color") |
|
|
|
|
enabled: msec_settings_show_orbit.value |
|
|
|
|
defaultValue: "#9e9e9e" |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Component.onCompleted: { |
|
|
|
|
if(!widget.settings.styles) { |
|
|
|
|
configuration = rootPreference.save(); |
|
|
|
|
widget.settings.styles = configuration; |
|
|
|
|
Component.onCompleted: { |
|
|
|
|
if(!widget.settings.styles) { |
|
|
|
|
configuration = rootPreference.save(); |
|
|
|
|
widget.settings.styles = configuration; |
|
|
|
|
} |
|
|
|
|
rootPreference.load(widget.settings.styles); |
|
|
|
|
configuration = widget.settings.styles; |
|
|
|
|
} |
|
|
|
|
rootPreference.load(widget.settings.styles); |
|
|
|
|
configuration = widget.settings.styles; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|