QML gui refact started
This commit is contained in:
parent
febf9cfafb
commit
135b96a280
35 changed files with 1700 additions and 523 deletions
|
@ -36,10 +36,10 @@ PageBase {
|
|||
width: 211
|
||||
height: 31
|
||||
text: qsTr("Auto connect")
|
||||
checked: UiLogic.checkBoxAppSettingsAutoconnectChecked
|
||||
checked: AppSettingsLogic.checkBoxAppSettingsAutoconnectChecked
|
||||
onCheckedChanged: {
|
||||
UiLogic.checkBoxAppSettingsAutoconnectChecked = checked
|
||||
UiLogic.onCheckBoxAppSettingsAutoconnectToggled(checked)
|
||||
AppSettingsLogic.checkBoxAppSettingsAutoconnectChecked = checked
|
||||
AppSettingsLogic.onCheckBoxAppSettingsAutoconnectToggled(checked)
|
||||
}
|
||||
}
|
||||
CheckBoxType {
|
||||
|
@ -48,10 +48,10 @@ PageBase {
|
|||
width: 211
|
||||
height: 31
|
||||
text: qsTr("Auto start")
|
||||
checked: UiLogic.checkBoxAppSettingsAutostartChecked
|
||||
checked: AppSettingsLogic.checkBoxAppSettingsAutostartChecked
|
||||
onCheckedChanged: {
|
||||
UiLogic.checkBoxAppSettingsAutostartChecked = checked
|
||||
UiLogic.onCheckBoxAppSettingsAutostartToggled(checked)
|
||||
AppSettingsLogic.checkBoxAppSettingsAutostartChecked = checked
|
||||
AppSettingsLogic.onCheckBoxAppSettingsAutostartToggled(checked)
|
||||
}
|
||||
}
|
||||
CheckBoxType {
|
||||
|
@ -60,10 +60,10 @@ PageBase {
|
|||
width: 211
|
||||
height: 31
|
||||
text: qsTr("Start minimized")
|
||||
checked: UiLogic.checkBoxAppSettingsStartMinimizedChecked
|
||||
checked: AppSettingsLogic.checkBoxAppSettingsStartMinimizedChecked
|
||||
onCheckedChanged: {
|
||||
UiLogic.checkBoxAppSettingsStartMinimizedChecked = checked
|
||||
UiLogic.onCheckBoxAppSettingsStartMinimizedToggled(checked)
|
||||
AppSettingsLogic.checkBoxAppSettingsStartMinimizedChecked = checked
|
||||
AppSettingsLogic.onCheckBoxAppSettingsStartMinimizedToggled(checked)
|
||||
}
|
||||
}
|
||||
Image {
|
||||
|
@ -78,7 +78,7 @@ PageBase {
|
|||
y: 240
|
||||
width: 281
|
||||
height: 21
|
||||
text: UiLogic.labelAppSettingsVersionText
|
||||
text: AppSettingsLogic.labelAppSettingsVersionText
|
||||
}
|
||||
BlueButtonType {
|
||||
x: 30
|
||||
|
@ -97,7 +97,7 @@ PageBase {
|
|||
height: 41
|
||||
text: qsTr("Open logs folder")
|
||||
onClicked: {
|
||||
UiLogic.onPushButtonAppSettingsOpenLogsChecked()
|
||||
AppSettingsLogic.onPushButtonAppSettingsOpenLogsChecked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ Item {
|
|||
icon.source: "qrc:/images/server_settings.png"
|
||||
text: qsTr("Server management")
|
||||
onClicked: {
|
||||
UiLogic.onPushButtonGeneralSettingsServerSettingsClicked()
|
||||
GeneralSettingsLogic.onPushButtonGeneralSettingsServerSettingsClicked()
|
||||
}
|
||||
}
|
||||
SettingButtonType {
|
||||
|
@ -130,9 +130,9 @@ Item {
|
|||
height: 30
|
||||
icon.source: "qrc:/images/share.png"
|
||||
text: qsTr("Share connection")
|
||||
enabled: UiLogic.pushButtonGeneralSettingsShareConnectionEnable
|
||||
enabled: GeneralSettingsLogic.pushButtonGeneralSettingsShareConnectionEnable
|
||||
onClicked: {
|
||||
UiLogic.onPushButtonGeneralSettingsShareConnectionClicked()
|
||||
GeneralSettingsLogic.onPushButtonGeneralSettingsShareConnectionClicked()
|
||||
}
|
||||
}
|
||||
SettingButtonType {
|
||||
|
|
|
@ -57,13 +57,13 @@ Item {
|
|||
y: 120
|
||||
width: 271
|
||||
height: 40
|
||||
text: UiLogic.lineEditNetworkSettingsDns1Text
|
||||
text: NetworkSettingsLogic.lineEditNetworkSettingsDns1Text
|
||||
onEditingFinished: {
|
||||
UiLogic.lineEditNetworkSettingsDns1Text = text
|
||||
UiLogic.onLineEditNetworkSettingsDns1EditFinished(text)
|
||||
NetworkSettingsLogic.lineEditNetworkSettingsDns1Text = text
|
||||
NetworkSettingsLogic.onLineEditNetworkSettingsDns1EditFinished(text)
|
||||
}
|
||||
validator: RegExpValidator {
|
||||
regExp: UiLogic.ipAddressValidatorRegex
|
||||
regExp: NetworkSettingsLogic.ipAddressValidatorRegex
|
||||
}
|
||||
}
|
||||
TextFieldType {
|
||||
|
@ -72,13 +72,13 @@ Item {
|
|||
y: 200
|
||||
width: 271
|
||||
height: 40
|
||||
text: UiLogic.lineEditNetworkSettingsDns2Text
|
||||
text: NetworkSettingsLogic.lineEditNetworkSettingsDns2Text
|
||||
onEditingFinished: {
|
||||
UiLogic.lineEditNetworkSettingsDns2Text = text
|
||||
UiLogic.onLineEditNetworkSettingsDns2EditFinished(text)
|
||||
NetworkSettingsLogic.lineEditNetworkSettingsDns2Text = text
|
||||
NetworkSettingsLogic.onLineEditNetworkSettingsDns2EditFinished(text)
|
||||
}
|
||||
validator: RegExpValidator {
|
||||
regExp: UiLogic.ipAddressValidatorRegex
|
||||
regExp: NetworkSettingsLogic.ipAddressValidatorRegex
|
||||
}
|
||||
}
|
||||
ImageButtonType {
|
||||
|
@ -89,7 +89,7 @@ Item {
|
|||
height: 24
|
||||
icon.source: "qrc:/images/reload.png"
|
||||
onClicked: {
|
||||
UiLogic.onPushButtonNetworkSettingsResetdns1Clicked()
|
||||
NetworkSettingsLogic.onPushButtonNetworkSettingsResetdns1Clicked()
|
||||
}
|
||||
}
|
||||
ImageButtonType {
|
||||
|
@ -100,7 +100,7 @@ Item {
|
|||
height: 24
|
||||
icon.source: "qrc:/images/reload.png"
|
||||
onClicked: {
|
||||
UiLogic.onPushButtonNetworkSettingsResetdns2Clicked()
|
||||
NetworkSettingsLogic.onPushButtonNetworkSettingsResetdns2Clicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -388,7 +388,7 @@ Item {
|
|||
border.width: 1
|
||||
border.color: "lightgray"
|
||||
radius: 2
|
||||
visible: UiLogic.frameFireguardVisible
|
||||
visible: UiLogic.frameWireguardVisible
|
||||
Item {
|
||||
x: 5
|
||||
y: 5
|
||||
|
|
|
@ -28,7 +28,7 @@ Item {
|
|||
color: "#100A44"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
verticalAlignment: Text.AlignTop
|
||||
text: UiLogic.labelSitesAddCustomText
|
||||
text: SitesLogic.labelSitesAddCustomText
|
||||
x: 20
|
||||
y: 40
|
||||
width: 340
|
||||
|
@ -40,12 +40,12 @@ Item {
|
|||
width: 231
|
||||
height: 31
|
||||
placeholderText: qsTr("yousite.com or IP address")
|
||||
text: UiLogic.lineEditSitesAddCustomText
|
||||
text: SitesLogic.lineEditSitesAddCustomText
|
||||
onEditingFinished: {
|
||||
UiLogic.lineEditSitesAddCustomText = text
|
||||
SitesLogic.lineEditSitesAddCustomText = text
|
||||
}
|
||||
onAccepted: {
|
||||
UiLogic.onPushButtonAddCustomSitesClicked()
|
||||
SitesLogic.onPushButtonAddCustomSitesClicked()
|
||||
}
|
||||
}
|
||||
ImageButtonType {
|
||||
|
@ -68,7 +68,7 @@ Item {
|
|||
font.pixelSize: 24
|
||||
text: "+"
|
||||
onClicked: {
|
||||
UiLogic.onPushButtonAddCustomSitesClicked()
|
||||
SitesLogic.onPushButtonAddCustomSitesClicked()
|
||||
}
|
||||
}
|
||||
BlueButtonType {
|
||||
|
@ -80,7 +80,7 @@ Item {
|
|||
font.pixelSize: 16
|
||||
text: qsTr("Delete selected")
|
||||
onClicked: {
|
||||
UiLogic.onPushButtonSitesDeleteClicked(tb.currentRow)
|
||||
SitesLogic.onPushButtonSitesDeleteClicked(tb.currentRow)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ Item {
|
|||
visible: false
|
||||
folder: StandardPaths.writableLocation(StandardPaths.DocumentsLocation)
|
||||
onAccepted: {
|
||||
UiLogic.onPushButtonSitesImportClicked(fileUrl)
|
||||
SitesLogic.onPushButtonSitesImportClicked(fileUrl)
|
||||
}
|
||||
}
|
||||
ListView {
|
||||
|
@ -129,7 +129,7 @@ Item {
|
|||
spacing: 1
|
||||
clip: true
|
||||
property int currentRow: -1
|
||||
model: UiLogic.tableViewSitesModel
|
||||
model: SitesLogic.tableViewSitesModel
|
||||
|
||||
delegate: Item {
|
||||
implicitWidth: 170 * 2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue