refactor: Protocals text and update tanslate text.
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user