parent
a5e5c3d941
commit
7351fe9633
69 changed files with 141 additions and 141 deletions
|
|
@ -12,7 +12,7 @@ ServerConfiguringProgressLogic::ServerConfiguringProgressLogic(UiLogic *logic, Q
|
|||
m_labelWaitInfoVisible{true},
|
||||
m_labelWaitInfoText{tr("Please wait, configuring process may take up to 5 minutes")},
|
||||
m_progressBarVisible{true},
|
||||
m_progressBarMaximium{100},
|
||||
m_progressBarMaximum{100},
|
||||
m_progressBarTextVisible{true},
|
||||
m_progressBarText{tr("Configuring...")},
|
||||
m_labelServerBusyVisible{false},
|
||||
|
|
@ -46,8 +46,8 @@ ErrorCode ServerConfiguringProgressLogic::doInstallAction(const std::function<Er
|
|||
progress.getValueFunc = [this] (void) -> int {
|
||||
return progressBarValue();
|
||||
};
|
||||
progress.getMaximiumFunc = [this] (void) -> int {
|
||||
return progressBarMaximium();
|
||||
progress.getMaximumFunc = [this] (void) -> int {
|
||||
return progressBarMaximum();
|
||||
};
|
||||
|
||||
LabelFunc busyInfo;
|
||||
|
|
@ -149,7 +149,7 @@ ErrorCode ServerConfiguringProgressLogic::doInstallAction(const std::function<Er
|
|||
// just ui progressbar tweak
|
||||
timer.stop();
|
||||
|
||||
int remainingVal = progress.getMaximiumFunc() - progress.getValueFunc();
|
||||
int remainingVal = progress.getMaximumFunc() - progress.getValueFunc();
|
||||
|
||||
if (remainingVal > 0) {
|
||||
QTimer timer1;
|
||||
|
|
@ -157,7 +157,7 @@ ErrorCode ServerConfiguringProgressLogic::doInstallAction(const std::function<Er
|
|||
|
||||
connect(&timer1, &QTimer::timeout, [&](){
|
||||
progress.setValueFunc(progress.getValueFunc() + 1);
|
||||
if (progress.getValueFunc() >= progress.getMaximiumFunc()) {
|
||||
if (progress.getValueFunc() >= progress.getMaximumFunc()) {
|
||||
loop1.quit();
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class ServerConfiguringProgressLogic : public PageLogicBase
|
|||
AUTO_PROPERTY(bool, labelWaitInfoVisible)
|
||||
AUTO_PROPERTY(QString, labelWaitInfoText)
|
||||
AUTO_PROPERTY(bool, progressBarVisible)
|
||||
AUTO_PROPERTY(int, progressBarMaximium)
|
||||
AUTO_PROPERTY(int, progressBarMaximum)
|
||||
AUTO_PROPERTY(bool, progressBarTextVisible)
|
||||
AUTO_PROPERTY(QString, progressBarText)
|
||||
AUTO_PROPERTY(bool, labelServerBusyVisible)
|
||||
|
|
@ -32,7 +32,7 @@ private:
|
|||
std::function<void(bool)> setVisibleFunc;
|
||||
std::function<void(int)> setValueFunc;
|
||||
std::function<int(void)> getValueFunc;
|
||||
std::function<int(void)> getMaximiumFunc;
|
||||
std::function<int(void)> getMaximumFunc;
|
||||
std::function<void(bool)> setTextVisibleFunc;
|
||||
std::function<void(const QString&)> setTextFunc;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ void VpnLogic::onConnect()
|
|||
}
|
||||
|
||||
if (container == DockerContainer::None) {
|
||||
set_labelErrorText(tr("VPN Protocol not choosen"));
|
||||
set_labelErrorText(tr("VPN Protocol not chosen"));
|
||||
set_pushButtonConnectChecked(false);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ CloakLogic::CloakLogic(UiLogic *logic, QObject *parent):
|
|||
m_labelInfoVisible{true},
|
||||
m_labelInfoText{},
|
||||
m_progressBarResetValue{0},
|
||||
m_progressBarResetMaximium{100}
|
||||
m_progressBarResetMaximum{100}
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -87,8 +87,8 @@ void CloakLogic::onPushButtonSaveClicked()
|
|||
progressBarFunc.getValueFunc = [this] (void) -> int {
|
||||
return progressBarResetValue();
|
||||
};
|
||||
progressBarFunc.getMaximiumFunc = [this] (void) -> int {
|
||||
return progressBarResetMaximium();
|
||||
progressBarFunc.getMaximumFunc = [this] (void) -> int {
|
||||
return progressBarResetMaximum();
|
||||
};
|
||||
progressBarFunc.setTextVisibleFunc = [this] (bool visible) -> void {
|
||||
set_progressBarTextVisible(visible);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ class CloakLogic : public PageProtocolLogicBase
|
|||
AUTO_PROPERTY(bool, labelInfoVisible)
|
||||
AUTO_PROPERTY(QString, labelInfoText)
|
||||
AUTO_PROPERTY(int, progressBarResetValue)
|
||||
AUTO_PROPERTY(int, progressBarResetMaximium)
|
||||
AUTO_PROPERTY(int, progressBarResetMaximum)
|
||||
AUTO_PROPERTY(bool, progressBarTextVisible)
|
||||
AUTO_PROPERTY(QString, progressBarText)
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ OpenVpnLogic::OpenVpnLogic(UiLogic *logic, QObject *parent):
|
|||
m_labelProtoOpenVpnInfoVisible{true},
|
||||
m_labelProtoOpenVpnInfoText{},
|
||||
m_progressBarResetValue{0},
|
||||
m_progressBarResetMaximium{100}
|
||||
m_progressBarResetMaximum{100}
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -51,17 +51,17 @@ void OpenVpnLogic::updateProtocolPage(const QJsonObject &openvpnConfig, DockerCo
|
|||
set_lineEditSubnetText(openvpnConfig.value(config_key::subnet_address).
|
||||
toString(protocols::openvpn::defaultSubnetAddress));
|
||||
|
||||
QString trasnsport;
|
||||
QString transport;
|
||||
if (container == DockerContainer::ShadowSocks || container == DockerContainer::Cloak) {
|
||||
trasnsport = "tcp";
|
||||
transport = "tcp";
|
||||
set_radioButtonUdpEnabled(false);
|
||||
set_radioButtonTcpEnabled(false);
|
||||
} else {
|
||||
trasnsport = openvpnConfig.value(config_key::transport_proto).
|
||||
transport = openvpnConfig.value(config_key::transport_proto).
|
||||
toString(protocols::openvpn::defaultTransportProto);
|
||||
}
|
||||
set_radioButtonUdpChecked(trasnsport == protocols::openvpn::defaultTransportProto);
|
||||
set_radioButtonTcpChecked(trasnsport != protocols::openvpn::defaultTransportProto);
|
||||
set_radioButtonUdpChecked(transport == protocols::openvpn::defaultTransportProto);
|
||||
set_radioButtonTcpChecked(transport != protocols::openvpn::defaultTransportProto);
|
||||
|
||||
set_comboBoxVpnCipherText(openvpnConfig.value(config_key::cipher).
|
||||
toString(protocols::openvpn::defaultCipher));
|
||||
|
|
@ -137,8 +137,8 @@ void OpenVpnLogic::onPushButtonSaveClicked()
|
|||
progressBarFunc.getValueFunc = [this] (void) -> int {
|
||||
return progressBarResetValue();
|
||||
};
|
||||
progressBarFunc.getMaximiumFunc = [this] (void) -> int {
|
||||
return progressBarResetMaximium();
|
||||
progressBarFunc.getMaximumFunc = [this] (void) -> int {
|
||||
return progressBarResetMaximum();
|
||||
};
|
||||
progressBarFunc.setTextVisibleFunc = [this] (bool visible) -> void {
|
||||
set_progressBarTextVisible(visible);
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class OpenVpnLogic : public PageProtocolLogicBase
|
|||
AUTO_PROPERTY(bool, labelProtoOpenVpnInfoVisible)
|
||||
AUTO_PROPERTY(QString, labelProtoOpenVpnInfoText)
|
||||
AUTO_PROPERTY(int, progressBarResetValue)
|
||||
AUTO_PROPERTY(int, progressBarResetMaximium)
|
||||
AUTO_PROPERTY(int, progressBarResetMaximum)
|
||||
AUTO_PROPERTY(bool, progressBarTextVisible)
|
||||
AUTO_PROPERTY(QString, progressBarText)
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ ShadowSocksLogic::ShadowSocksLogic(UiLogic *logic, QObject *parent):
|
|||
m_labelInfoVisible{true},
|
||||
m_labelInfoText{},
|
||||
m_progressBarResetValue{0},
|
||||
m_progressBarResetMaximium{100}
|
||||
m_progressBarResetMaximum{100}
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -79,8 +79,8 @@ void ShadowSocksLogic::onPushButtonSaveClicked()
|
|||
progressBarFunc.getValueFunc = [this] (void) -> int {
|
||||
return progressBarResetValue();
|
||||
};
|
||||
progressBarFunc.getMaximiumFunc = [this] (void) -> int {
|
||||
return progressBarResetMaximium();
|
||||
progressBarFunc.getMaximumFunc = [this] (void) -> int {
|
||||
return progressBarResetMaximum();
|
||||
};
|
||||
progressBarFunc.setTextVisibleFunc = [this] (bool visible) -> void {
|
||||
set_progressBarTextVisible(visible);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class ShadowSocksLogic : public PageProtocolLogicBase
|
|||
AUTO_PROPERTY(bool, labelInfoVisible)
|
||||
AUTO_PROPERTY(QString, labelInfoText)
|
||||
AUTO_PROPERTY(int, progressBarResetValue)
|
||||
AUTO_PROPERTY(int, progressBarResetMaximium)
|
||||
AUTO_PROPERTY(int, progressBarResetMaximum)
|
||||
AUTO_PROPERTY(bool, progressBarTextVisible)
|
||||
AUTO_PROPERTY(QString, progressBarText)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue