AUTO_PROPERTY added

This commit is contained in:
Pokamest Nikak 2021-09-07 22:11:43 +03:00
parent 539bf2ee24
commit 63ffa4a212
19 changed files with 216 additions and 778 deletions

View file

@ -36,10 +36,10 @@ PageBase {
width: 211
height: 31
text: qsTr("Auto connect")
checked: AppSettingsLogic.checkBoxAppSettingsAutoconnectChecked
checked: AppSettingsLogic.checkBoxAutoConnectChecked
onCheckedChanged: {
AppSettingsLogic.checkBoxAppSettingsAutoconnectChecked = checked
AppSettingsLogic.onCheckBoxAppSettingsAutoconnectToggled(checked)
AppSettingsLogic.checkBoxAutoConnectChecked = checked
AppSettingsLogic.onCheckBoxAutoconnectToggled(checked)
}
}
CheckBoxType {
@ -48,10 +48,10 @@ PageBase {
width: 211
height: 31
text: qsTr("Auto start")
checked: AppSettingsLogic.checkBoxAppSettingsAutostartChecked
checked: AppSettingsLogic.checkBoxAutostartChecked
onCheckedChanged: {
AppSettingsLogic.checkBoxAppSettingsAutostartChecked = checked
AppSettingsLogic.onCheckBoxAppSettingsAutostartToggled(checked)
AppSettingsLogic.checkBoxAutostartChecked = checked
AppSettingsLogic.onCheckBoxAutostartToggled(checked)
}
}
CheckBoxType {
@ -60,10 +60,10 @@ PageBase {
width: 211
height: 31
text: qsTr("Start minimized")
checked: AppSettingsLogic.checkBoxAppSettingsStartMinimizedChecked
checked: AppSettingsLogic.checkBoxStartMinimizedChecked
onCheckedChanged: {
AppSettingsLogic.checkBoxAppSettingsStartMinimizedChecked = checked
AppSettingsLogic.onCheckBoxAppSettingsStartMinimizedToggled(checked)
AppSettingsLogic.checkBoxStartMinimizedChecked = checked
AppSettingsLogic.onCheckBoxStartMinimizedToggled(checked)
}
}
Image {
@ -78,7 +78,7 @@ PageBase {
y: 240
width: 281
height: 21
text: AppSettingsLogic.labelAppSettingsVersionText
text: AppSettingsLogic.labelVersionText
}
BlueButtonType {
x: 30
@ -97,7 +97,7 @@ PageBase {
height: 41
text: qsTr("Open logs folder")
onClicked: {
AppSettingsLogic.onPushButtonAppSettingsOpenLogsChecked()
AppSettingsLogic.onPushButtonOpenLogsClicked()
}
}
}

View file

@ -57,10 +57,10 @@ Item {
y: 120
width: 271
height: 40
text: NetworkSettingsLogic.lineEditNetworkSettingsDns1Text
text: NetworkSettingsLogic.lineEditDns1Text
onEditingFinished: {
NetworkSettingsLogic.lineEditNetworkSettingsDns1Text = text
NetworkSettingsLogic.onLineEditNetworkSettingsDns1EditFinished(text)
NetworkSettingsLogic.lineEditDns1Text = text
NetworkSettingsLogic.onLineEditDns1EditFinished(text)
}
validator: RegExpValidator {
regExp: NetworkSettingsLogic.ipAddressValidatorRegex
@ -72,10 +72,10 @@ Item {
y: 200
width: 271
height: 40
text: NetworkSettingsLogic.lineEditNetworkSettingsDns2Text
text: NetworkSettingsLogic.lineEditDns2Text
onEditingFinished: {
NetworkSettingsLogic.lineEditNetworkSettingsDns2Text = text
NetworkSettingsLogic.onLineEditNetworkSettingsDns2EditFinished(text)
NetworkSettingsLogic.lineEditDns2Text = text
NetworkSettingsLogic.onLineEditDns2EditFinished(text)
}
validator: RegExpValidator {
regExp: NetworkSettingsLogic.ipAddressValidatorRegex
@ -89,7 +89,7 @@ Item {
height: 24
icon.source: "qrc:/images/reload.png"
onClicked: {
NetworkSettingsLogic.onPushButtonNetworkSettingsResetdns1Clicked()
NetworkSettingsLogic.onPushButtonResetDns1Clicked()
}
}
ImageButtonType {
@ -100,7 +100,7 @@ Item {
height: 24
icon.source: "qrc:/images/reload.png"
onClicked: {
NetworkSettingsLogic.onPushButtonNetworkSettingsResetdns2Clicked()
NetworkSettingsLogic.onPushButtonResetDns2Clicked()
}
}
}

View file

@ -6,7 +6,7 @@ import "../Config"
Item {
id: root
enabled: NewServerConfiguringLogic.pageNewServerConfiguringEnabled
enabled: NewServerConfiguringLogic.pageEnabled
Text {
font.family: "Lato"
font.styleName: "normal"
@ -32,8 +32,8 @@ Item {
y: 560
width: 301
height: 41
text: NewServerConfiguringLogic.labelNewServerConfiguringWaitInfoText
visible: NewServerConfiguringLogic.labelNewServerConfiguringWaitInfoVisible
text: NewServerConfiguringLogic.labelWaitInfoText
visible: NewServerConfiguringLogic.labelWaitInfoVisible
}
ProgressBar {
id: pr
@ -42,9 +42,9 @@ Item {
width: 301
height: 40
from: 0
to: NewServerConfiguringLogic.progressBarNewServerConfiguringMaximium
value: NewServerConfiguringLogic.progressBarNewServerConfiguringValue
visible: NewServerConfiguringLogic.progressBarNewServerConfiguringVisible
to: NewServerConfiguringLogic.progressBarMaximium
value: NewServerConfiguringLogic.progressBarValue
visible: NewServerConfiguringLogic.progressBarVisible
background: Rectangle {
implicitWidth: parent.width
implicitHeight: parent.height
@ -65,13 +65,13 @@ Item {
LabelType {
anchors.fill: parent
text: NewServerConfiguringLogic.progressBarNewServerConfiguringText
text: NewServerConfiguringLogic.progressBarText
horizontalAlignment: Text.AlignHCenter
font.family: "Lato"
font.styleName: "normal"
font.pixelSize: 16
color: "#D4D4D4"
visible: NewServerConfiguringLogic.progressBarNewServerConfiguringTextVisible
visible: NewServerConfiguringLogic.progressBarTextVisible
}
}
}

View file

@ -36,8 +36,8 @@ Item {
y: 570
width: 301
height: 40
from: NewServerProtocolsLogic.progressBarNewServerConnectionMinimum
to: NewServerProtocolsLogic.progressBarNewServerConnectionMaximum
from: NewServerProtocolsLogic.progressBarConnectionMinimum
to: NewServerProtocolsLogic.progressBarConnectionMaximum
value: 0
background: Rectangle {
implicitWidth: parent.width
@ -74,7 +74,7 @@ Item {
height: 40
text: qsTr("Setup server")
onClicked: {
NewServerProtocolsLogic.pushButtonNewServerConnectConfigureClicked()
NewServerProtocolsLogic.pushButtonConnectConfigureClicked()
}
}
ScrollView {
@ -120,9 +120,9 @@ Item {
TextFieldType {
width: parent.width - 130 - parent.spacing - parent.leftPadding * 2
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
text: NewServerProtocolsLogic.lineEditNewServerCloakPortText
text: NewServerProtocolsLogic.lineEditCloakPortText
onEditingFinished: {
NewServerProtocolsLogic.lineEditNewServerCloakPortText = text
NewServerProtocolsLogic.lineEditCloakPortText = text
}
}
LabelType {
@ -133,9 +133,9 @@ Item {
TextFieldType {
width: parent.width - 130 - parent.spacing - parent.leftPadding * 2
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
text: NewServerProtocolsLogic.lineEditNewServerCloakSiteText
text: NewServerProtocolsLogic.lineEditCloakSiteText
onEditingFinished: {
NewServerProtocolsLogic.lineEditNewServerCloakSiteText = text
NewServerProtocolsLogic.lineEditCloakSiteText = text
}
}
}
@ -151,9 +151,9 @@ Item {
text: qsTr("OpenVPN and ShadowSocks\n with masking using Cloak plugin")
height: parent.height
width: 308
checked: NewServerProtocolsLogic.checkBoxNewServerCloakChecked
checked: NewServerProtocolsLogic.checkBoxCloakChecked
onCheckedChanged: {
NewServerProtocolsLogic.checkBoxNewServerCloakChecked = checked
NewServerProtocolsLogic.checkBoxCloakChecked = checked
}
}
ImageButtonType {
@ -162,9 +162,9 @@ Item {
anchors.verticalCenter: parent.verticalCenter
icon.source: "qrc:/images/settings.png"
checkable: true
checked: NewServerProtocolsLogic.pushButtonNewServerSettingsCloakChecked
checked: NewServerProtocolsLogic.pushButtonSettingsCloakChecked
onCheckedChanged: {
NewServerProtocolsLogic.pushButtonNewServerSettingsCloakChecked = checked
NewServerProtocolsLogic.pushButtonSettingsCloakChecked = checked
if (checked) {
frame_new_server_setting_cloak.visible = true
} else {
@ -209,9 +209,9 @@ Item {
TextFieldType {
width: parent.width - 130 - parent.spacing - parent.leftPadding * 2
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
text: NewServerProtocolsLogic.lineEditNewServerSsPortText
text: NewServerProtocolsLogic.lineEditSsPortText
onEditingFinished: {
NewServerProtocolsLogic.lineEditNewServerSsPortText = text
NewServerProtocolsLogic.lineEditSsPortText = text
}
}
LabelType {
@ -231,14 +231,14 @@ Item {
]
currentIndex: {
for (let i = 0; i < model.length; ++i) {
if (NewServerProtocolsLogic.comboBoxNewServerSsCipherText === model[i]) {
if (NewServerProtocolsLogic.comboBoxSsCipherText === model[i]) {
return i
}
}
return -1
}
onCurrentTextChanged: {
NewServerProtocolsLogic.comboBoxNewServerSsCipherText = currentText
NewServerProtocolsLogic.comboBoxSsCipherText = currentText
}
}
}
@ -254,9 +254,9 @@ Item {
text: qsTr("ShadowSocks")
height: parent.height
width: 308
checked: NewServerProtocolsLogic.checkBoxNewServerSsChecked
checked: NewServerProtocolsLogic.checkBoxSsChecked
onCheckedChanged: {
NewServerProtocolsLogic.checkBoxNewServerSsChecked = checked
NewServerProtocolsLogic.checkBoxSsChecked = checked
}
}
ImageButtonType {
@ -264,10 +264,10 @@ Item {
height: 35
anchors.verticalCenter: parent.verticalCenter
icon.source: "qrc:/images/settings.png"
checked: NewServerProtocolsLogic.pushButtonNewServerSettingsSsChecked
checked: NewServerProtocolsLogic.pushButtonSettingsSsChecked
checkable: true
onCheckedChanged: {
NewServerProtocolsLogic.pushButtonNewServerSettingsSsChecked = checked
NewServerProtocolsLogic.pushButtonSettingsSsChecked = checked
if (checked) {
frame_new_server_settings_ss.visible = true
} else {
@ -312,9 +312,9 @@ Item {
TextFieldType {
width: parent.width - 130 - parent.spacing - parent.leftPadding * 2
height: (parent.height - parent.spacing - parent.topPadding * 2) / 2
text: NewServerProtocolsLogic.lineEditNewServerOpenvpnPortText
text: NewServerProtocolsLogic.lineEditOpenvpnPortText
onEditingFinished: {
NewServerProtocolsLogic.lineEditNewServerOpenvpnPortText = text
NewServerProtocolsLogic.lineEditOpenvpnPortText = text
}
}
LabelType {
@ -331,14 +331,14 @@ Item {
]
currentIndex: {
for (let i = 0; i < model.length; ++i) {
if (NewServerProtocolsLogic.comboBoxNewServerOpenvpnProtoText === model[i]) {
if (NewServerProtocolsLogic.comboBoxOpenvpnProtoText === model[i]) {
return i
}
}
return -1
}
onCurrentTextChanged: {
NewServerProtocolsLogic.comboBoxNewServerOpenvpnProtoText = currentText
NewServerProtocolsLogic.comboBoxOpenvpnProtoText = currentText
}
}
}
@ -354,9 +354,9 @@ Item {
text: qsTr("OpenVPN")
height: parent.height
width: 308
checked: NewServerProtocolsLogic.checkBoxNewServerOpenvpnChecked
checked: NewServerProtocolsLogic.checkBoxOpenvpnChecked
onCheckedChanged: {
NewServerProtocolsLogic.checkBoxNewServerOpenvpnChecked = checked
NewServerProtocolsLogic.checkBoxOpenvpnChecked = checked
}
}
ImageButtonType {
@ -364,10 +364,10 @@ Item {
height: 35
anchors.verticalCenter: parent.verticalCenter
icon.source: "qrc:/images/settings.png"
checked: NewServerProtocolsLogic.pushButtonNewServerSettingsOpenvpnChecked
checked: NewServerProtocolsLogic.pushButtonSettingsOpenvpnChecked
checkable: true
onCheckedChanged: {
NewServerProtocolsLogic.pushButtonNewServerSettingsOpenvpnChecked = checked
NewServerProtocolsLogic.pushButtonSettingsOpenvpnChecked = checked
if (checked) {
frame_new_server_settings_openvpn.visible = true
} else {
@ -379,7 +379,7 @@ Item {
}
Rectangle {
id: frame_new_server_settings_parent_wireguard
visible: NewServerProtocolsLogic.frameNewServerSettingsParentWireguardVisible
visible: NewServerProtocolsLogic.frameSettingsParentWireguardVisible
x: 5
y: 5
width: 368

View file

@ -154,7 +154,7 @@ Window {
UiLogic.updateWizardHighPage();
}
if (page === PageEnum.ServerConfiguring) {
UiLogic.progressBarNewServerConfiguringValue = 0;
UiLogic.progressBarValue = 0;
}
if (page === PageEnum.GeneralSettings) {
GeneralSettingsLogic.updateGeneralSettingPage();
@ -167,16 +167,16 @@ Window {
StartPageLogic.updateStartPage();
}
if (page === PageEnum.NewServerProtocols) {
NewServerProtocolsLogic.updateNewServerProtocolsPage()
NewServerProtocolsLogic.updatePage()
}
if (page === PageEnum.ServerContainers) {
ServerContainersLogic.updateServerContainersPage()
}
if (page === PageEnum.AppSettings) {
AppSettingsLogic.updateAppSettingsPage()
AppSettingsLogic.updatePage()
}
if (page === PageEnum.NetworkSettings) {
NetworkSettingsLogic.updateNetworkSettingsPage()
NetworkSettingsLogic.updatePage()
}
if (page === PageEnum.Sites) {
SitesLogic.updateSitesPage()