调整所有messagebox翻译,增加保存提醒对话框
This commit is contained in:
parent
c2db66d6a2
commit
5d9d63dfc4
|
@ -26,8 +26,7 @@ void LoginDialog::on_btnLogin_clicked()
|
|||
{
|
||||
if (ui->editAccount->text() != m_account || ui->editPassword->text() != m_password)
|
||||
{
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), tr("wrong account or password"), QMessageBox::Yes, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), tr("wrong account or password"), QMessageBox::Ok, this);
|
||||
msg.exec();
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -364,8 +364,7 @@ void MainWindow::on_btnGetVersionList_clicked()
|
|||
|
||||
if (m_vVersion.empty())
|
||||
{
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), tr("no version available"), QMessageBox::Yes, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), tr("no version available"), QMessageBox::Ok, this);
|
||||
msg.exec();
|
||||
}
|
||||
}
|
||||
|
@ -410,8 +409,7 @@ void MainWindow::on_btnOpenFilePath_clicked()
|
|||
{
|
||||
if (m_curFwVersion >= fileVersion)
|
||||
{
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), tr("the selected firmware is not newer than the current version"), QMessageBox::Yes, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), tr("the selected firmware is not newer than the current version"), QMessageBox::Ok, this);
|
||||
msg.exec();
|
||||
}
|
||||
else
|
||||
|
@ -424,8 +422,6 @@ void MainWindow::on_btnOpenFilePath_clicked()
|
|||
QMessageBox msg(QMessageBox::Question, tr("tips"),
|
||||
tr("firmware file mismatch, continue?"),
|
||||
QMessageBox::Yes | QMessageBox::No, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
msg.setButtonText(QMessageBox::No, tr("no"));
|
||||
msg.exec();
|
||||
if (msg.clickedButton() == msg.button(QMessageBox::Yes))
|
||||
{
|
||||
|
@ -446,8 +442,7 @@ void MainWindow::on_btnDownloadUpgrade_clicked()
|
|||
|
||||
if (m_curFwVersion >= versionNum)
|
||||
{
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), tr("the selected firmware is not newer than the current version"), QMessageBox::Yes, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), tr("the selected firmware is not newer than the current version"), QMessageBox::Ok, this);
|
||||
msg.exec();
|
||||
return;
|
||||
}
|
||||
|
@ -497,8 +492,7 @@ void MainWindow::on_btnDownloadUpgrade_clicked()
|
|||
}
|
||||
else
|
||||
{
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), tr("download firmware fail"), QMessageBox::Yes, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), tr("download firmware fail"), QMessageBox::Ok, this);
|
||||
msg.exec();
|
||||
}
|
||||
}
|
||||
|
@ -558,8 +552,7 @@ void MainWindow::on_btnClearRollCount_clicked()
|
|||
else
|
||||
info = tr("Roller scanned count reset failed.");
|
||||
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), info, QMessageBox::Yes, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), info, QMessageBox::Ok, this);
|
||||
msg.exec();
|
||||
}
|
||||
|
||||
|
@ -575,32 +568,28 @@ void MainWindow::on_btnModifyPassword_clicked()
|
|||
|
||||
if (password != ui->editOldPassword->text())
|
||||
{
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), tr("old password is wrong"), QMessageBox::Yes, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), tr("old password is wrong"), QMessageBox::Ok, this);
|
||||
msg.exec();
|
||||
return;
|
||||
}
|
||||
|
||||
if (ui->editNewPassword->text().isEmpty())
|
||||
{
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), tr("new password can not be empty"), QMessageBox::Yes, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), tr("new password can not be empty"), QMessageBox::Ok, this);
|
||||
msg.exec();
|
||||
return;
|
||||
}
|
||||
|
||||
if (ui->editNewPassword->text() != ui->editNewPassword_2->text())
|
||||
{
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), tr("new password is inconsistent"), QMessageBox::Yes, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), tr("new password is inconsistent"), QMessageBox::Ok, this);
|
||||
msg.exec();
|
||||
return;
|
||||
}
|
||||
|
||||
if (HGBASE_ERR_OK != HGBase_SetProfileString(cfgPath, "login", "password", passwordEncrypt(ui->editNewPassword->text()).toStdString().c_str()))
|
||||
{
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), tr("modify password fail"), QMessageBox::Yes, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), tr("modify password fail"), QMessageBox::Ok, this);
|
||||
msg.exec();
|
||||
return;
|
||||
}
|
||||
|
@ -609,7 +598,6 @@ void MainWindow::on_btnModifyPassword_clicked()
|
|||
ui->editNewPassword->setText("");
|
||||
ui->editNewPassword_2->setText("");
|
||||
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), tr("modify password success"), QMessageBox::Yes, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
QMessageBox msg(QMessageBox::Information, tr("tips"), tr("modify password success"), QMessageBox::Ok, this);
|
||||
msg.exec();
|
||||
}
|
||||
|
|
|
@ -1236,8 +1236,6 @@ HGResult HGImgThumb::insertItems(const QStringList &fileNames, int pos, bool app
|
|||
QMessageBox msg(QMessageBox::Question, tr("Question"),
|
||||
info,
|
||||
QMessageBox::Yes | QMessageBox::No, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
msg.setButtonText(QMessageBox::No, tr("no"));
|
||||
msg.exec();
|
||||
if (msg.clickedButton() == msg.button(QMessageBox::Yes))
|
||||
{
|
||||
|
@ -1252,8 +1250,6 @@ HGResult HGImgThumb::insertItems(const QStringList &fileNames, int pos, bool app
|
|||
QMessageBox msg(QMessageBox::Question, tr("Question"),
|
||||
info,
|
||||
QMessageBox::Yes | QMessageBox::No, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
msg.setButtonText(QMessageBox::No, tr("no"));
|
||||
msg.exec();
|
||||
if (msg.clickedButton() == msg.button(QMessageBox::Yes))
|
||||
{
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -54,8 +54,6 @@ void Dialog_ClrCache::on_btn_clr_clicked()
|
|||
QMessageBox msg(QMessageBox::Question, tr("Question"),
|
||||
tr("Main window contains temporary files, clear cache would remove all of them.\n Continue to clear?"),
|
||||
QMessageBox::Yes | QMessageBox::No, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
msg.setButtonText(QMessageBox::No, tr("no"));
|
||||
msg.exec();
|
||||
if (msg.clickedButton() != msg.button(QMessageBox::Yes))
|
||||
{
|
||||
|
|
|
@ -282,7 +282,6 @@ void Dialog_ExportImageFile::on_finish(int ret)
|
|||
{
|
||||
QString str = (ret == HGBASE_ERR_OK) ? tr("export succeed") : tr("export failed: ") + MainWindow::getLogInfo(ret);
|
||||
QMessageBox msg(QMessageBox::Information, tr("tip"), str, QMessageBox::Ok, this);
|
||||
msg.setButtonText(QMessageBox::Ok, tr("ok"));
|
||||
close();
|
||||
msg.exec();
|
||||
}
|
||||
|
|
|
@ -138,7 +138,6 @@ void Dialog_MultiRotateImageFile::on_finish(int ret)
|
|||
{
|
||||
QString str = (ret == HGBASE_ERR_OK) ? tr("operation success") : tr("multirotate operation failed: ") + MainWindow::getLogInfo(ret);
|
||||
QMessageBox msg(QMessageBox::Information, tr("tip"), str, QMessageBox::Ok, this);
|
||||
msg.setButtonText(QMessageBox::Ok, tr("ok"));
|
||||
close();
|
||||
msg.exec();
|
||||
}
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
#include "dialog_savemessagebox.h"
|
||||
#include "ui_dialog_savemessagebox.h"
|
||||
|
||||
Dialog_SaveMessageBox::Dialog_SaveMessageBox(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::Dialog_SaveMessageBox)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
setWindowFlags(Qt::Dialog | Qt::WindowCloseButtonHint);
|
||||
ui->pbtn_yesToAll->setText(tr("save, do not remind again"));
|
||||
ui->label->setText(tr("modified, save it?"));
|
||||
}
|
||||
|
||||
Dialog_SaveMessageBox::~Dialog_SaveMessageBox()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void Dialog_SaveMessageBox::on_pbtn_yes_clicked()
|
||||
{
|
||||
m_result = result_Yes;
|
||||
accept();
|
||||
}
|
||||
|
||||
void Dialog_SaveMessageBox::on_pbtn_yesToAll_clicked()
|
||||
{
|
||||
m_result = result_YesToAll;
|
||||
accept();
|
||||
}
|
||||
|
||||
void Dialog_SaveMessageBox::on_pbtn_No_clicked()
|
||||
{
|
||||
m_result = result_No;
|
||||
reject();
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
#ifndef DIALOG_SAVEMESSAGEBOX_H
|
||||
#define DIALOG_SAVEMESSAGEBOX_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class Dialog_SaveMessageBox;
|
||||
}
|
||||
|
||||
class Dialog_SaveMessageBox : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Dialog_SaveMessageBox(QWidget *parent = nullptr);
|
||||
~Dialog_SaveMessageBox();
|
||||
|
||||
enum Result
|
||||
{
|
||||
result_Yes = 0,
|
||||
result_YesToAll,
|
||||
result_No
|
||||
};
|
||||
|
||||
Result m_result;
|
||||
|
||||
|
||||
private slots:
|
||||
void on_pbtn_yes_clicked();
|
||||
|
||||
void on_pbtn_yesToAll_clicked();
|
||||
|
||||
void on_pbtn_No_clicked();
|
||||
|
||||
private:
|
||||
Ui::Dialog_SaveMessageBox *ui;
|
||||
};
|
||||
|
||||
#endif // DIALOG_SAVEMESSAGEBOX_H
|
|
@ -0,0 +1,109 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Dialog_SaveMessageBox</class>
|
||||
<widget class="QDialog" name="Dialog_SaveMessageBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>387</width>
|
||||
<height>104</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pbtn_yes">
|
||||
<property name="text">
|
||||
<string>Yes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pbtn_yesToAll">
|
||||
<property name="text">
|
||||
<string>Yes to All</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pbtn_No">
|
||||
<property name="text">
|
||||
<string>No</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -1914,8 +1914,6 @@ void hg_settingdialog::slot_pushButton_scheme_management(void)
|
|||
|
||||
QMessageBox msg(QMessageBox::Question, tr("be sure to delete the configuration"),
|
||||
tr("Are you sure you want to delete the configuration \"") + text + tr("\" ?"), QMessageBox::Yes | QMessageBox::No, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
msg.setButtonText(QMessageBox::No, tr("no"));
|
||||
msg.exec();
|
||||
if (msg.clickedButton() != msg.button(QMessageBox::Yes))
|
||||
return;
|
||||
|
@ -1938,8 +1936,6 @@ void hg_settingdialog::slot_pushButton_scheme_management(void)
|
|||
{
|
||||
QMessageBox msg(QMessageBox::Question, tr("be sure to delete the configuration"),
|
||||
tr("Are you sure you want to delete the configuration?"), QMessageBox::Yes | QMessageBox::No, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
msg.setButtonText(QMessageBox::No, tr("no"));
|
||||
msg.exec();
|
||||
if (msg.clickedButton() != msg.button(QMessageBox::Yes))
|
||||
return;
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "dialog_upgrade.h"
|
||||
#include "dialog_feedback.h"
|
||||
#include "dialog_upgradefirmware.h"
|
||||
#include "dialog_savemessagebox.h"
|
||||
#include "hg_settingdialog.h"
|
||||
#include "base/HGInfo.h"
|
||||
#include "huagao/hgscanner_error.h"
|
||||
|
@ -613,30 +614,32 @@ void MainWindow::on_currItemChanged(int index)
|
|||
bool save = false;
|
||||
if(auto_save_changes_)
|
||||
{
|
||||
// 閸掑洦宕查崶鍓у閺冭绱濋懛顏勫З娣囨繂鐡ㄧ紓鏍帆鏉╁洨娈戦崶鎯у剼閵嗗倽瀚㈤幆鍐插絿濞戝牞绱濈拠宄板絿濞戝牆瀣€闁褰嶉崡鏇€嶉敍姘禈閸?>閼奉亜濮╂穱婵嗙摠
|
||||
QString info(tr("Automatically save the edited the edited iamge when switching pictures. To cancel, uncheck the menu item: image-> automatically save"));
|
||||
m_wndStatusBar->setDeviceStatusInfo(info, false);
|
||||
save = true;
|
||||
}
|
||||
else {
|
||||
QMessageBox msg(QMessageBox::Question, tr("Question"),
|
||||
tr("modified, save it?"),
|
||||
QMessageBox::Yes | QMessageBox::No | QMessageBox::YesToAll, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
msg.setButtonText(QMessageBox::YesToAll, tr("save, do not remind again"));
|
||||
msg.setButtonText(QMessageBox::No, tr("no"));
|
||||
msg.exec();
|
||||
if (msg.clickedButton() == msg.button(QMessageBox::No))
|
||||
else
|
||||
{
|
||||
Dialog_SaveMessageBox dlg(this);
|
||||
if (dlg.exec())
|
||||
{
|
||||
if (dlg.m_result == dlg.result_Yes)
|
||||
{
|
||||
save = true;
|
||||
}
|
||||
else if (dlg.m_result == dlg.result_YesToAll)
|
||||
{
|
||||
save = true;
|
||||
auto_save_changes_ = true;
|
||||
ui->act_autoSave->setChecked(true);
|
||||
}
|
||||
else if (dlg.m_result == dlg.result_No)
|
||||
{
|
||||
m_modify = false;
|
||||
}
|
||||
else {
|
||||
save = true;
|
||||
auto_save_changes_ = msg.clickedButton() == msg.button(QMessageBox::YesToAll);
|
||||
if(auto_save_changes_)
|
||||
ui->act_autoSave->setChecked(true);
|
||||
}
|
||||
}
|
||||
|
||||
if(save)
|
||||
{
|
||||
save_from_changed_ = true;
|
||||
|
@ -677,8 +680,6 @@ void MainWindow::on_currItemChanged(int index)
|
|||
QMessageBox msg(QMessageBox::Question, tr("Question"),
|
||||
tr("file lost, remove it?"),
|
||||
QMessageBox::Yes | QMessageBox::No, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
msg.setButtonText(QMessageBox::No, tr("no"));
|
||||
msg.exec();
|
||||
if (msg.clickedButton() == msg.button(QMessageBox::Yes))
|
||||
{
|
||||
|
@ -1698,8 +1699,6 @@ void MainWindow::startSaveMessageBox(QWidget* parent)
|
|||
QMessageBox msg(QMessageBox::Question, tr("Question"),
|
||||
tr("modified, save it?"),
|
||||
QMessageBox::Yes | QMessageBox::No, parent);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
msg.setButtonText(QMessageBox::No, tr("no"));
|
||||
msg.exec();
|
||||
if (msg.clickedButton() != msg.button(QMessageBox::Yes))
|
||||
{
|
||||
|
@ -2493,8 +2492,6 @@ void MainWindow::closeEvent(QCloseEvent *e)
|
|||
QMessageBox msg(QMessageBox::Question, tr("Question"),
|
||||
tr("There are pictures that have not been saved.\nAre you sure to close?"),
|
||||
QMessageBox::Yes | QMessageBox::No, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
msg.setButtonText(QMessageBox::No, tr("no"));
|
||||
msg.exec();
|
||||
if (msg.clickedButton() != msg.button(QMessageBox::Yes))
|
||||
{
|
||||
|
@ -2507,8 +2504,6 @@ void MainWindow::closeEvent(QCloseEvent *e)
|
|||
QMessageBox msg(QMessageBox::Question, tr("tips"),
|
||||
tr("Are you sure to close?"),
|
||||
QMessageBox::Yes | QMessageBox::No, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
msg.setButtonText(QMessageBox::No, tr("no"));
|
||||
msg.exec();
|
||||
if (msg.clickedButton() != msg.button(QMessageBox::Yes))
|
||||
{
|
||||
|
@ -2942,8 +2937,6 @@ void MainWindow::on_act_signOut_triggered()
|
|||
|
||||
QMessageBox msg(QMessageBox::Question, tr("Question"),
|
||||
tr("Sure to sign out administrator account?"), QMessageBox::Yes | QMessageBox::No);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
msg.setButtonText(QMessageBox::No, tr("no"));
|
||||
msg.exec();
|
||||
if(msg.clickedButton() == msg.button(QMessageBox::Yes))
|
||||
{
|
||||
|
@ -2997,8 +2990,6 @@ void MainWindow::on_act_clearRoller_triggered()
|
|||
QMessageBox msg(QMessageBox::Question, tr("confirm operation"),
|
||||
tr("are you sure to clear the roller count?"),
|
||||
QMessageBox::Yes | QMessageBox::No, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
msg.setButtonText(QMessageBox::No, tr("no"));
|
||||
msg.exec();
|
||||
if(msg.clickedButton() != msg.button(QMessageBox::Yes))
|
||||
return;
|
||||
|
@ -3085,8 +3076,6 @@ void MainWindow::my_url_handler(const QUrl& url)
|
|||
QMessageBox msg(QMessageBox::Question, tr("confirm the operation"),
|
||||
tr("Are you sure to clear the rollor acount?"),
|
||||
QMessageBox::Yes | QMessageBox::No, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
msg.setButtonText(QMessageBox::No, tr("no"));
|
||||
msg.exec();
|
||||
if(msg.clickedButton() == msg.button(QMessageBox::Yes))
|
||||
{
|
||||
|
@ -3136,6 +3125,7 @@ void MainWindow::on_act_about_triggered()
|
|||
info.push_back(tr("<p>CopyRight: © %1</p>").arg(QString::fromStdString(about->copyright)));
|
||||
|
||||
const char* cmp[] = {
|
||||
BRAND_TITLE_DEVICE_MODEL,
|
||||
about->version,
|
||||
BRAND_TITLE_FIRM_VERSION,
|
||||
BRAND_TITLE_SERIAL_NUM,
|
||||
|
@ -3874,7 +3864,6 @@ void MainWindow::upgradeApp(QString pkgPath)
|
|||
QMessageBox msg(QMessageBox::Critical, tr("error"),
|
||||
tr("start failed!"),
|
||||
QMessageBox::Ok, this);
|
||||
msg.setButtonText(QMessageBox::Ok, tr("yes"));
|
||||
msg.exec();
|
||||
}
|
||||
}
|
||||
|
@ -4215,8 +4204,6 @@ void MainWindow::on_scanOptions_changed(const QString &device, const QString &op
|
|||
QMessageBox msg(QMessageBox::Question, title,
|
||||
tr("Are you sure to close ") + device + tr(" ?"),
|
||||
QMessageBox::Yes | QMessageBox::No, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
msg.setButtonText(QMessageBox::No, tr("no"));
|
||||
msg.exec();
|
||||
if(msg.clickedButton() == msg.button(QMessageBox::Yes))
|
||||
{
|
||||
|
@ -4383,7 +4370,6 @@ void MainWindow::on_act_simpCN_triggered()
|
|||
QMessageBox msg(QMessageBox::Information, tr("tips"),
|
||||
tr("The language switch is successful and takes effect the next time the software is started!"),
|
||||
QMessageBox::Ok, this);
|
||||
msg.setButtonText(QMessageBox::Ok, tr("yes"));
|
||||
msg.exec();
|
||||
}
|
||||
|
||||
|
@ -4403,7 +4389,6 @@ void MainWindow::on_act_English_triggered()
|
|||
QMessageBox msg(QMessageBox::Information, tr("tips"),
|
||||
tr("The language switch is successful and takes effect the next time the software is started!"),
|
||||
QMessageBox::Ok, this);
|
||||
msg.setButtonText(QMessageBox::Ok, tr("yes"));
|
||||
msg.exec();
|
||||
}
|
||||
|
||||
|
@ -4442,8 +4427,6 @@ void MainWindow::on_act_deleteFile_triggered()
|
|||
|
||||
QMessageBox msg(QMessageBox::Question, tr("tips"), tr("Are you sure to delete selected file?"),
|
||||
QMessageBox::Yes | QMessageBox::No, this);
|
||||
msg.setButtonText(QMessageBox::Yes, tr("yes"));
|
||||
msg.setButtonText(QMessageBox::No, tr("no"));
|
||||
msg.exec();
|
||||
if (msg.clickedButton() == msg.button(QMessageBox::Yes))
|
||||
{
|
||||
|
|
|
@ -101,7 +101,6 @@ int main(int argc, char *argv[])
|
|||
QMessageBox msg(QMessageBox::Information, QObject::tr("tip"),
|
||||
QObject::tr("install succeed!"),
|
||||
QMessageBox::Ok);
|
||||
msg.setButtonText(QMessageBox::Ok, QObject::tr("yes"));
|
||||
msg.exec();
|
||||
|
||||
if (!AppIsRun(appName))
|
||||
|
@ -112,7 +111,6 @@ int main(int argc, char *argv[])
|
|||
QMessageBox msg(QMessageBox::Critical, QObject::tr("error"),
|
||||
QObject::tr("install failed!") + "\n" + w.getUpgradeFailInfo(),
|
||||
QMessageBox::Ok);
|
||||
msg.setButtonText(QMessageBox::Ok, QObject::tr("yes"));
|
||||
msg.exec();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue