refactor: Protocals text and update tanslate text.

This commit is contained in:
sunwen
2024-05-24 15:17:20 +08:00
parent 6b2abfdb55
commit 1a722ee521
9 changed files with 633 additions and 282 deletions

View File

@@ -34,6 +34,7 @@
#include "windows/LoginDialog.h"
#include "screensaver/ScreenSaverWindow.h"
#include "utilities/GetLockScreenTimeHelper.h"
#include "utilities/GetProtocalHelper.h"
#include "appvals/AppGlobalValues.h"
#include "json/jsonobject.h"
@@ -243,8 +244,8 @@ DialogResult DialogManager::requestSelectProtocal()
SelectDialog dialog(mTopWidget);
setTopWidget(&dialog);
dialog.setWindowModality(Qt::WindowModal);
dialog.setValues(JsonObject::Instance()->protocals());
dialog.setSelectedValue(JsonObject::Instance()->defaultProtocal());
dialog.setValues(GetProtocalHelper::getProtocalList());
dialog.setSelectedValue(GetProtocalHelper::getProtocalStr());
int ret = dialog.exec();
releaseTopWidget(&dialog);
return DialogResult(ret,dialog.getSelectedValue());

View File

@@ -4,6 +4,8 @@
#include "forms/select/PatientInformation.h"
#include "json/jsonobject.h"
#include "utilities/GetProtocalHelper.h"
#include <QButtonGroup>
StartScanProcessDialog::StartScanProcessDialog(QWidget *aParent) :
@@ -35,26 +37,28 @@ void StartScanProcessDialog::initButtons()
buttonGroup->addButton(mUI->mOnlyLeftButton, LONE);
buttonGroup->addButton(mUI->mOnlyRightButton, RONE);
QString protocol = JsonObject::Instance()->defaultProtocal();
if(protocol == "LSTAND")
int protocol = GetProtocalHelper::getProtocal();
switch (protocol)
{
case LSTAND:
mUI->mLeftToRightButton->setChecked(true);
mScanProtocal = LSTAND;
}
else if(protocol == "RSTAND")
{
break;
case RSTAND:
mUI->mRightToLeftButton->setChecked(true);
mScanProtocal = RSTAND;
}
else if(protocol == "LONE")
{
break;
case LONE:
mUI->mOnlyLeftButton->setChecked(true);
mScanProtocal = LONE;
}
else
{
break;
case RONE:
mUI->mOnlyRightButton->setChecked(true);
mScanProtocal = RONE;
break;
default:
mUI->mLeftToRightButton->setChecked(true);
mScanProtocal = LSTAND;
}
}