qml ui fixes
This commit is contained in:
parent
d90211ef48
commit
d9ae10f5bc
5 changed files with 14 additions and 43 deletions
|
|
@ -1,45 +1,16 @@
|
||||||
//#include <QApplication>
|
|
||||||
//#include <QClipboard>
|
|
||||||
//#include <QDebug>
|
|
||||||
//#include <QDesktopServices>
|
|
||||||
//#include <QFileDialog>
|
|
||||||
//#include <QHBoxLayout>
|
|
||||||
//#include <QHostInfo>
|
|
||||||
//#include <QItemSelectionModel>
|
|
||||||
//#include <QJsonDocument>
|
|
||||||
//#include <QJsonObject>
|
|
||||||
//#include <QKeyEvent>
|
|
||||||
//#include <QMenu>
|
|
||||||
//#include <QMessageBox>
|
|
||||||
//#include <QMetaEnum>
|
|
||||||
//#include <QSysInfo>
|
|
||||||
//#include <QThread>
|
|
||||||
//#include <QTimer>
|
|
||||||
//#include <QRegularExpression>
|
|
||||||
//#include <QSaveFile>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//#include "debug.h"
|
|
||||||
//#include "defines.h"
|
|
||||||
#include "StartPageLogic.h"
|
#include "StartPageLogic.h"
|
||||||
#include "core/errorstrings.h"
|
#include "core/errorstrings.h"
|
||||||
//#include "utils.h"
|
|
||||||
//#include "vpnconnection.h"
|
|
||||||
//#include <functional>
|
|
||||||
|
|
||||||
#include "configurators/ssh_configurator.h"
|
#include "configurators/ssh_configurator.h"
|
||||||
|
#include "../uilogic.h"
|
||||||
|
|
||||||
using namespace amnezia;
|
using namespace amnezia;
|
||||||
using namespace PageEnumNS;
|
using namespace PageEnumNS;
|
||||||
|
|
||||||
#include "../uilogic.h"
|
|
||||||
|
|
||||||
|
|
||||||
StartPageLogic::StartPageLogic(UiLogic *uiLogic, QObject *parent):
|
StartPageLogic::StartPageLogic(UiLogic *uiLogic, QObject *parent):
|
||||||
QObject(parent),
|
QObject(parent),
|
||||||
m_uiLogic(uiLogic),
|
m_uiLogic(uiLogic),
|
||||||
m_pushButtonNewServerConnectEnabled{},
|
m_pushButtonNewServerConnectEnabled{true},
|
||||||
m_pushButtonNewServerConnectText{tr("Connect")},
|
m_pushButtonNewServerConnectText{tr("Connect")},
|
||||||
m_pushButtonNewServerConnectKeyChecked{false},
|
m_pushButtonNewServerConnectKeyChecked{false},
|
||||||
m_lineEditStartExistingCodeText{},
|
m_lineEditStartExistingCodeText{},
|
||||||
|
|
|
||||||
|
|
@ -89,9 +89,9 @@ Item {
|
||||||
width: 331
|
width: 331
|
||||||
height: 25
|
height: 25
|
||||||
text: qsTr("High censorship level")
|
text: qsTr("High censorship level")
|
||||||
checked: UiLogic.radioButtonSetupWizardHighChecked
|
checked: WizardLogic.radioButtonSetupWizardHighChecked
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
UiLogic.radioButtonSetupWizardHighChecked = checked
|
WizardLogic.radioButtonSetupWizardHighChecked = checked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RadioButtonType {
|
RadioButtonType {
|
||||||
|
|
@ -101,9 +101,9 @@ Item {
|
||||||
width: 331
|
width: 331
|
||||||
height: 25
|
height: 25
|
||||||
text: qsTr("Low censorship level")
|
text: qsTr("Low censorship level")
|
||||||
checked: UiLogic.radioButtonSetupWizardLowChecked
|
checked: WizardLogic.radioButtonSetupWizardLowChecked
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
UiLogic.radioButtonSetupWizardLowChecked = checked
|
WizardLogic.radioButtonSetupWizardLowChecked = checked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RadioButtonType {
|
RadioButtonType {
|
||||||
|
|
@ -113,9 +113,9 @@ Item {
|
||||||
width: 331
|
width: 331
|
||||||
height: 25
|
height: 25
|
||||||
text: qsTr("Medium censorship level")
|
text: qsTr("Medium censorship level")
|
||||||
checked: UiLogic.radioButtonSetupWizardMediumChecked
|
checked: WizardLogic.radioButtonSetupWizardMediumChecked
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
UiLogic.radioButtonSetupWizardMediumChecked = checked
|
WizardLogic.radioButtonSetupWizardMediumChecked = checked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ Item {
|
||||||
y: 360
|
y: 360
|
||||||
width: 301
|
width: 301
|
||||||
height: 41
|
height: 41
|
||||||
text: UiLogic.lineEditSetupWizardHighWebsiteMaskingText
|
text: WizardLogic.lineEditSetupWizardHighWebsiteMaskingText
|
||||||
onEditingFinished: {
|
onEditingFinished: {
|
||||||
let _text = website_masking.text
|
let _text = website_masking.text
|
||||||
_text.replace("http://", "");
|
_text.replace("http://", "");
|
||||||
|
|
@ -72,7 +72,7 @@ Item {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
_text = _text.split("/").first();
|
_text = _text.split("/").first();
|
||||||
UiLogic.lineEditSetupWizardHighWebsiteMaskingText = _text
|
WizardLogic.lineEditSetupWizardHighWebsiteMaskingText = _text
|
||||||
}
|
}
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
next_button.clicked()
|
next_button.clicked()
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ Item {
|
||||||
height: 40
|
height: 40
|
||||||
text: qsTr("Start configuring")
|
text: qsTr("Start configuring")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
UiLogic.onPushButtonSetupWizardLowFinishClicked()
|
WizardLogic.onPushButtonSetupWizardLowFinishClicked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,9 +41,9 @@ Item {
|
||||||
width: 301
|
width: 301
|
||||||
height: 71
|
height: 71
|
||||||
text: qsTr('Turn on mode "VPN for selected sites"')
|
text: qsTr('Turn on mode "VPN for selected sites"')
|
||||||
checked: UiLogic.checkBoxSetupWizardVpnModeChecked
|
checked: WizardLogic.checkBoxSetupWizardVpnModeChecked
|
||||||
onCheckedChanged: {
|
onCheckedChanged: {
|
||||||
UiLogic.checkBoxSetupWizardVpnModeChecked = checked
|
WizardLogic.checkBoxSetupWizardVpnModeChecked = checked
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LabelType {
|
LabelType {
|
||||||
|
|
@ -61,7 +61,7 @@ Item {
|
||||||
height: 40
|
height: 40
|
||||||
text: qsTr("Start configuring")
|
text: qsTr("Start configuring")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
UiLogic.onPushButtonSetupWizardVpnModeFinishClicked()
|
WizardLogic.onPushButtonSetupWizardVpnModeFinishClicked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue