Multi-language fix
This commit is contained in:
@@ -60,6 +60,9 @@ AccountTableForm::AccountTableForm(QWidget *parent) {
|
|||||||
ADD_TOOL_BTN_TO_LAYOUT(Add,":/icons/add.png",cmdLayout);
|
ADD_TOOL_BTN_TO_LAYOUT(Add,":/icons/add.png",cmdLayout);
|
||||||
ADD_TOOL_BTN_TO_LAYOUT(Edit,":/icons/details.png",cmdLayout);
|
ADD_TOOL_BTN_TO_LAYOUT(Edit,":/icons/details.png",cmdLayout);
|
||||||
ADD_TOOL_BTN_TO_LAYOUT(Delete,":/icons/close_circle.png",cmdLayout);
|
ADD_TOOL_BTN_TO_LAYOUT(Delete,":/icons/close_circle.png",cmdLayout);
|
||||||
|
btnAdd->setText(tr("Add"));
|
||||||
|
btnEdit->setText(tr("Edit"));
|
||||||
|
btnDelete->setText(tr("Delete"));
|
||||||
layout->addWidget(cmdPanel);
|
layout->addWidget(cmdPanel);
|
||||||
//index change
|
//index change
|
||||||
connect(table,&QTableView::clicked,[=](const QModelIndex & modelIndex){
|
connect(table,&QTableView::clicked,[=](const QModelIndex & modelIndex){
|
||||||
|
|||||||
@@ -50,6 +50,9 @@ ScanFormWidget::ScanFormWidget(QWidget *parent) : TabFormWidget(parent) {
|
|||||||
layout->addWidget(spacerLine);
|
layout->addWidget(spacerLine);
|
||||||
ADD_TOOL_BTN(Left,":/icons/left.png");
|
ADD_TOOL_BTN(Left,":/icons/left.png");
|
||||||
ADD_TOOL_BTN(Right,":/icons/right.png");
|
ADD_TOOL_BTN(Right,":/icons/right.png");
|
||||||
|
btnLeft->setText(tr("Left"));
|
||||||
|
btnRight->setText(tr("Right"));
|
||||||
|
|
||||||
QButtonGroup* group = new QButtonGroup(this);
|
QButtonGroup* group = new QButtonGroup(this);
|
||||||
btnLeft->setCheckable(true);
|
btnLeft->setCheckable(true);
|
||||||
btnLeft->setChecked(true);
|
btnLeft->setChecked(true);
|
||||||
@@ -67,6 +70,11 @@ ScanFormWidget::ScanFormWidget(QWidget *parent) : TabFormWidget(parent) {
|
|||||||
ADD_TOOL_BTN(Stop,":/icons/stop.png");
|
ADD_TOOL_BTN(Stop,":/icons/stop.png");
|
||||||
ADD_TOOL_BTN(Scan,":/icons/scan.png");
|
ADD_TOOL_BTN(Scan,":/icons/scan.png");
|
||||||
|
|
||||||
|
btnRefresh->setText(tr("Refresh"));
|
||||||
|
btnPreview->setText(tr("Preview"));
|
||||||
|
btnStop->setText(tr("Stop"));
|
||||||
|
btnScan->setText(tr("Scan"));
|
||||||
|
|
||||||
QHBoxLayout* contentLayout =new QHBoxLayout();
|
QHBoxLayout* contentLayout =new QHBoxLayout();
|
||||||
this->ui->contentWidget->setLayout(contentLayout);
|
this->ui->contentWidget->setLayout(contentLayout);
|
||||||
PatientInformationForm* patient_information= new PatientInformationForm(this);
|
PatientInformationForm* patient_information= new PatientInformationForm(this);
|
||||||
|
|||||||
@@ -56,6 +56,9 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) :
|
|||||||
ui->commandWidget->setLayout(layout);
|
ui->commandWidget->setLayout(layout);
|
||||||
ADD_TOOL_BTN(Account, ":/icons/account.png");
|
ADD_TOOL_BTN(Account, ":/icons/account.png");
|
||||||
ADD_TOOL_BTN(Worklist, ":/icons/setting.png");
|
ADD_TOOL_BTN(Worklist, ":/icons/setting.png");
|
||||||
|
btnAccount->setText(tr("Account"));
|
||||||
|
btnWorklist->setText(tr("Worklist"));
|
||||||
|
|
||||||
layout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding));
|
layout->addSpacerItem(new QSpacerItem(20, 20, QSizePolicy::Expanding));
|
||||||
QWidget* spacerLine = new QWidget(this);
|
QWidget* spacerLine = new QWidget(this);
|
||||||
spacerLine->setFixedWidth(2);
|
spacerLine->setFixedWidth(2);
|
||||||
@@ -65,6 +68,10 @@ SelectFormWidget::SelectFormWidget(QWidget* parent) :
|
|||||||
ADD_TOOL_BTN(Edit, ":/icons/details.png");
|
ADD_TOOL_BTN(Edit, ":/icons/details.png");
|
||||||
ADD_TOOL_BTN(Delete, ":/icons/close_circle.png");
|
ADD_TOOL_BTN(Delete, ":/icons/close_circle.png");
|
||||||
ADD_TOOL_BTN(Select, ":/icons/selected.png");
|
ADD_TOOL_BTN(Select, ":/icons/selected.png");
|
||||||
|
btnAdd->setText(tr("Add"));
|
||||||
|
btnEdit->setText(tr("Edit"));
|
||||||
|
btnDelete->setText(tr("Delete"));
|
||||||
|
btnSelect->setText(tr("Select"));
|
||||||
|
|
||||||
//Init content widget
|
//Init content widget
|
||||||
QHBoxLayout* contentLayout = new QHBoxLayout();
|
QHBoxLayout* contentLayout = new QHBoxLayout();
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ EditPatientForm::EditPatientForm(QWidget *parent) :
|
|||||||
sexlayout->setMargin(6);
|
sexlayout->setMargin(6);
|
||||||
ADD_TOOL_SIZE_BTN_TO_LAYOUT(F,":/icons/female_d.png",30, sexlayout);
|
ADD_TOOL_SIZE_BTN_TO_LAYOUT(F,":/icons/female_d.png",30, sexlayout);
|
||||||
ADD_TOOL_SIZE_BTN_TO_LAYOUT(M,":/icons/male_d.png", 30,sexlayout);
|
ADD_TOOL_SIZE_BTN_TO_LAYOUT(M,":/icons/male_d.png", 30,sexlayout);
|
||||||
|
btnF->setText(tr("Female"));
|
||||||
|
btnM->setText(tr("Male"));
|
||||||
|
|
||||||
// btnFemale->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
// btnFemale->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||||||
// btnMale->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
// btnMale->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||||||
|
|
||||||
@@ -38,6 +41,8 @@ EditPatientForm::EditPatientForm(QWidget *parent) :
|
|||||||
|
|
||||||
ADD_TOOL_BTN(Cancel,":/icons/close_circle.png");
|
ADD_TOOL_BTN(Cancel,":/icons/close_circle.png");
|
||||||
ADD_TOOL_BTN(Accpet,":/icons/selected.png");
|
ADD_TOOL_BTN(Accpet,":/icons/selected.png");
|
||||||
|
btnCancel->setText(tr("Cancel"));
|
||||||
|
btnAccpet->setText(tr("Accept"));
|
||||||
btnCancel->setEnabled(editEnable);
|
btnCancel->setEnabled(editEnable);
|
||||||
btnCancel->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
btnCancel->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||||||
btnCancel->setIcon(QIcon(editEnable?":/icons/close_circle.png":":/icons/close_circle_d.png"));
|
btnCancel->setIcon(QIcon(editEnable?":/icons/close_circle.png":":/icons/close_circle_d.png"));
|
||||||
|
|||||||
@@ -10,7 +10,6 @@
|
|||||||
btn##name->setIcon(QIcon(img));\
|
btn##name->setIcon(QIcon(img));\
|
||||||
btn##name->setIconSize(QSize(size,size));\
|
btn##name->setIconSize(QSize(size,size));\
|
||||||
btn##name->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);\
|
btn##name->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);\
|
||||||
btn##name->setText(QObject::tr(#name));\
|
|
||||||
layout->addWidget(btn##name);
|
layout->addWidget(btn##name);
|
||||||
|
|
||||||
#define ADD_TOOL_BTN_TO_LAYOUT(name,img,layout)\
|
#define ADD_TOOL_BTN_TO_LAYOUT(name,img,layout)\
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ void LoginWindow::initUi()
|
|||||||
m_pUserCodeLayout->addWidget(m_pPassWordEdit);
|
m_pUserCodeLayout->addWidget(m_pPassWordEdit);
|
||||||
|
|
||||||
ADD_TOOL_BTN_TO_LAYOUT(login, ":/icons/login.png", m_pUserCodeLayout);
|
ADD_TOOL_BTN_TO_LAYOUT(login, ":/icons/login.png", m_pUserCodeLayout);
|
||||||
|
btnlogin->setText(tr("Login"));
|
||||||
m_pUserCodeLayout->removeWidget(btnlogin);
|
m_pUserCodeLayout->removeWidget(btnlogin);
|
||||||
m_pUserCodeLayout->addWidget(btnlogin, 0, Qt::AlignCenter);
|
m_pUserCodeLayout->addWidget(btnlogin, 0, Qt::AlignCenter);
|
||||||
m_pLoginButton = btnlogin;
|
m_pLoginButton = btnlogin;
|
||||||
|
|||||||
Reference in New Issue
Block a user