调整维护工具提示信息

This commit is contained in:
yangjiaxuan 2023-06-27 21:04:39 +08:00
parent 6c346a8770
commit fbf6e44334
4 changed files with 171 additions and 144 deletions

Binary file not shown.

View File

@ -98,7 +98,7 @@
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="206"/>
<location filename="mainwindow.ui" line="410"/>
<source>update firmware</source>
<translation></translation>
</message>
@ -113,42 +113,42 @@
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="218"/>
<location filename="mainwindow.ui" line="422"/>
<source>online upgrade</source>
<translation>线</translation>
</message>
<message>
<location filename="mainwindow.ui" line="240"/>
<location filename="mainwindow.ui" line="444"/>
<source>get version list</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="253"/>
<location filename="mainwindow.ui" line="457"/>
<source>download and upgrade</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="266"/>
<location filename="mainwindow.ui" line="470"/>
<source>version list</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="280"/>
<location filename="mainwindow.ui" line="484"/>
<source>local upgrade</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="292"/>
<location filename="mainwindow.ui" line="496"/>
<source>file path</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="315"/>
<location filename="mainwindow.ui" line="519"/>
<source>open file path</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="328"/>
<location filename="mainwindow.ui" line="532"/>
<source>upgrade</source>
<translation></translation>
</message>
@ -162,149 +162,147 @@
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="109"/>
<location filename="mainwindow.ui" line="122"/>
<source>0</source>
<translation>0</translation>
<translation type="vanished">0</translation>
</message>
<message>
<location filename="mainwindow.ui" line="135"/>
<location filename="mainwindow.ui" line="115"/>
<source>scan count:</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="148"/>
<location filename="mainwindow.ui" line="128"/>
<source>clear roll count</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="161"/>
<location filename="mainwindow.ui" line="141"/>
<source>Serial number:</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="174"/>
<location filename="mainwindow.ui" line="154"/>
<source>Firmware number:</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="187"/>
<location filename="mainwindow.ui" line="167"/>
<source>Speed mode:</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="200"/>
<location filename="mainwindow.ui" line="180"/>
<source>motor version:</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="348"/>
<location filename="mainwindow.ui" line="186"/>
<source>flat correct</source>
<oldsource>correction</oldsource>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="389"/>
<location filename="mainwindow.ui" line="227"/>
<source>distortion correct</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="402"/>
<location filename="mainwindow.ui" line="240"/>
<source>Color</source>
<translation>24</translation>
</message>
<message>
<location filename="mainwindow.ui" line="407"/>
<location filename="mainwindow.ui" line="245"/>
<source>Gray</source>
<translation>256</translation>
</message>
<message>
<location filename="mainwindow.ui" line="422"/>
<location filename="mainwindow.ui" line="260"/>
<source>200</source>
<translation>200</translation>
</message>
<message>
<location filename="mainwindow.ui" line="427"/>
<location filename="mainwindow.ui" line="265"/>
<source>300</source>
<translation>300</translation>
</message>
<message>
<location filename="mainwindow.ui" line="432"/>
<location filename="mainwindow.ui" line="270"/>
<source>600</source>
<translation>600</translation>
</message>
<message>
<location filename="mainwindow.ui" line="446"/>
<location filename="mainwindow.ui" line="284"/>
<source>Color mode:</source>
<translation>:</translation>
</message>
<message>
<location filename="mainwindow.ui" line="459"/>
<location filename="mainwindow.ui" line="297"/>
<source>Dpi:</source>
<translation>:</translation>
</message>
<message>
<location filename="mainwindow.ui" line="485"/>
<location filename="mainwindow.ui" line="323"/>
<source>Get distortion</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="498"/>
<location filename="mainwindow.ui" line="336"/>
<source>Set distortion</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="534"/>
<location filename="mainwindow.ui" line="378"/>
<source>Start scan</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="360"/>
<location filename="mainwindow.ui" line="198"/>
<source>Correct</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="373"/>
<location filename="mainwindow.ui" line="211"/>
<source>Have not corrected</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="521"/>
<location filename="mainwindow.ui" line="365"/>
<source>Export test paper</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="547"/>
<location filename="mainwindow.ui" line="391"/>
<source>Count distortion:</source>
<translation>:</translation>
</message>
<message>
<location filename="mainwindow.ui" line="566"/>
<location filename="mainwindow.ui" line="552"/>
<source>password change</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="578"/>
<location filename="mainwindow.ui" line="564"/>
<source>old password</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="591"/>
<location filename="mainwindow.ui" line="577"/>
<source>new password</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="624"/>
<location filename="mainwindow.ui" line="610"/>
<source>modify password</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="647"/>
<location filename="mainwindow.ui" line="633"/>
<source>confirm new password</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.ui" line="671"/>
<location filename="mainwindow.ui" line="657"/>
<source>exit</source>
<translation></translation>
</message>
@ -327,7 +325,13 @@
<location filename="mainwindow.cpp" line="496"/>
<location filename="mainwindow.cpp" line="508"/>
<location filename="mainwindow.cpp" line="520"/>
<location filename="mainwindow.cpp" line="527"/>
<location filename="mainwindow.cpp" line="526"/>
<location filename="mainwindow.cpp" line="853"/>
<location filename="mainwindow.cpp" line="854"/>
<location filename="mainwindow.cpp" line="886"/>
<location filename="mainwindow.cpp" line="887"/>
<location filename="mainwindow.cpp" line="921"/>
<location filename="mainwindow.cpp" line="922"/>
<source>do not support</source>
<translation></translation>
</message>
@ -336,27 +340,27 @@
<translation type="vanished">%1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="554"/>
<location filename="mainwindow.cpp" line="553"/>
<source>no device opened</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="599"/>
<location filename="mainwindow.cpp" line="644"/>
<location filename="mainwindow.cpp" line="654"/>
<location filename="mainwindow.cpp" line="677"/>
<location filename="mainwindow.cpp" line="727"/>
<location filename="mainwindow.cpp" line="791"/>
<location filename="mainwindow.cpp" line="807"/>
<location filename="mainwindow.cpp" line="814"/>
<location filename="mainwindow.cpp" line="821"/>
<location filename="mainwindow.cpp" line="828"/>
<location filename="mainwindow.cpp" line="837"/>
<location filename="mainwindow.cpp" line="598"/>
<location filename="mainwindow.cpp" line="643"/>
<location filename="mainwindow.cpp" line="653"/>
<location filename="mainwindow.cpp" line="676"/>
<location filename="mainwindow.cpp" line="726"/>
<location filename="mainwindow.cpp" line="790"/>
<location filename="mainwindow.cpp" line="806"/>
<location filename="mainwindow.cpp" line="813"/>
<location filename="mainwindow.cpp" line="820"/>
<location filename="mainwindow.cpp" line="827"/>
<location filename="mainwindow.cpp" line="836"/>
<source>tips</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="599"/>
<location filename="mainwindow.cpp" line="598"/>
<source>no version available</source>
<translation></translation>
</message>
@ -365,7 +369,7 @@
<translation type="vanished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="630"/>
<location filename="mainwindow.cpp" line="629"/>
<source>Open File</source>
<translation></translation>
</message>
@ -374,9 +378,9 @@
<translation type="vanished">(* .zip)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="718"/>
<location filename="mainwindow.cpp" line="738"/>
<location filename="mainwindow.cpp" line="759"/>
<location filename="mainwindow.cpp" line="717"/>
<location filename="mainwindow.cpp" line="737"/>
<location filename="mainwindow.cpp" line="758"/>
<source>device: %1 upgrade firmware success</source>
<translation>%1 </translation>
</message>
@ -400,13 +404,13 @@
<translation>: %1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="630"/>
<location filename="mainwindow.cpp" line="629"/>
<source>ZIP Files(*.zip *.zip)</source>
<translation>(*.zip)</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="644"/>
<location filename="mainwindow.cpp" line="677"/>
<location filename="mainwindow.cpp" line="643"/>
<location filename="mainwindow.cpp" line="676"/>
<source>the selected firmware is not newer than the current version</source>
<translation></translation>
</message>
@ -415,7 +419,7 @@
<translation type="vanished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="655"/>
<location filename="mainwindow.cpp" line="654"/>
<source>firmware file mismatch, continue?</source>
<translation></translation>
</message>
@ -444,84 +448,83 @@
</message>
<message>
<location filename="mainwindow.cpp" line="526"/>
<location filename="mainwindow.cpp" line="527"/>
<source>Motor Version: %1</source>
<translation> %1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="545"/>
<location filename="mainwindow.cpp" line="544"/>
<source>Device is opened by other process</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="549"/>
<location filename="mainwindow.cpp" line="548"/>
<source>open device error</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="722"/>
<location filename="mainwindow.cpp" line="742"/>
<location filename="mainwindow.cpp" line="763"/>
<location filename="mainwindow.cpp" line="721"/>
<location filename="mainwindow.cpp" line="741"/>
<location filename="mainwindow.cpp" line="762"/>
<source>device: %1 upgrade firmware failed, io error</source>
<translation>%1 IO错误</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="727"/>
<location filename="mainwindow.cpp" line="726"/>
<source>download firmware fail</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="782"/>
<location filename="mainwindow.cpp" line="781"/>
<source>Roller scanned count has been set to 0.</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="786"/>
<location filename="mainwindow.cpp" line="785"/>
<source>Do not supported</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="789"/>
<location filename="mainwindow.cpp" line="788"/>
<source>Roller scanned count reset failed.</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="807"/>
<location filename="mainwindow.cpp" line="806"/>
<source>old password is wrong</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="814"/>
<location filename="mainwindow.cpp" line="813"/>
<source>new password can not be empty</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="821"/>
<location filename="mainwindow.cpp" line="820"/>
<source>new password is inconsistent</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="828"/>
<location filename="mainwindow.cpp" line="827"/>
<source>modify password fail</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="837"/>
<location filename="mainwindow.cpp" line="836"/>
<source>modify password success</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="908"/>
<location filename="mainwindow.cpp" line="917"/>
<source>correcting...</source>
<translation>...</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="915"/>
<location filename="mainwindow.cpp" line="936"/>
<source>Export special test paper</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="915"/>
<location filename="mainwindow.cpp" line="936"/>
<source>jpg(*.jpg)</source>
<translation>jpg(*.jpg)</translation>
</message>
@ -532,16 +535,19 @@
<message>
<location filename="mainwindow.cpp" line="288"/>
<location filename="mainwindow.cpp" line="303"/>
<location filename="mainwindow.cpp" line="852"/>
<location filename="mainwindow.cpp" line="875"/>
<location filename="mainwindow.cpp" line="886"/>
<location filename="mainwindow.cpp" line="903"/>
<location filename="mainwindow.cpp" line="854"/>
<location filename="mainwindow.cpp" line="860"/>
<location filename="mainwindow.cpp" line="887"/>
<location filename="mainwindow.cpp" line="893"/>
<location filename="mainwindow.cpp" line="900"/>
<location filename="mainwindow.cpp" line="921"/>
<location filename="mainwindow.cpp" line="927"/>
<source>Prompt</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="53"/>
<location filename="mainwindow.cpp" line="886"/>
<location filename="mainwindow.cpp" line="900"/>
<source>Please confirm that the device has correctly placed the calibration paper!</source>
<translation></translation>
</message>
@ -572,38 +578,51 @@
<translation>: %1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="851"/>
<location filename="mainwindow.cpp" line="437"/>
<location filename="mainwindow.cpp" line="504"/>
<location filename="mainwindow.cpp" line="780"/>
<source>roll count: %1</source>
<translation> %1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="438"/>
<location filename="mainwindow.cpp" line="516"/>
<source>scan count: %1</source>
<translation> %1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="859"/>
<source>Get distortion failed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="852"/>
<location filename="mainwindow.cpp" line="860"/>
<source>Get failed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="856"/>
<location filename="mainwindow.cpp" line="865"/>
<source>Get distortion succeed: %1</source>
<translation>: %1</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="922"/>
<location filename="mainwindow.cpp" line="943"/>
<source>Color mode: %1, Dpi: %2</source>
<translation>: %1, :%2</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="874"/>
<location filename="mainwindow.cpp" line="875"/>
<location filename="mainwindow.cpp" line="892"/>
<location filename="mainwindow.cpp" line="893"/>
<source>Set failed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="880"/>
<location filename="mainwindow.cpp" line="882"/>
<source>Set succeed</source>
<translation></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="903"/>
<location filename="mainwindow.cpp" line="927"/>
<source>Correct failed</source>
<translation></translation>
</message>

View File

@ -434,8 +434,8 @@ void MainWindow::on_comboDevList_currentIndexChanged(int index)
ui->comboVersionList->clear();
ui->editFilePath->clear();
ui->labelRollCount->setText("0");
ui->labelScanCount->setText("0");
ui->label_rollerCout->setText(QString(tr("roll count: %1")).arg(QString::number(0)));
ui->label_scanCount->setText(QString(tr("scan count: %1")).arg(QString::number(0)));
ui->label_deviceError->clear();
ui->labelDevInfo->clear();
@ -501,11 +501,11 @@ void MainWindow::on_comboDevList_currentIndexChanged(int index)
SANE_Status ret = sane_io_control(m_curDevHandle, IO_CTRL_CODE_GET_ROLLER_NUM, &rollCount, &rollCountSize);
if(ret == SANE_STATUS_GOOD && rollCount >= 0)
{
ui->labelRollCount->setText(QString("%1").arg(rollCount));
ui->label_rollerCout->setText(QString(tr("roll count: %1")).arg(rollCount));
}
else
{
ui->labelRollCount->setText(tr("do not support"));
ui->label_rollerCout->setText(tr("do not support"));
}
SANE_Int scanCount = 0;
@ -513,11 +513,11 @@ void MainWindow::on_comboDevList_currentIndexChanged(int index)
ret = sane_io_control(m_curDevHandle, IO_CTRL_CODE_GET_HISTORY_SCAN_NUM, &scanCount, &scanCountSize);
if (ret == SANE_STATUS_GOOD && scanCount >= 0)
{
ui->labelScanCount->setText(QString("%1").arg(scanCount));
ui->label_scanCount->setText(QString(tr("scan count: %1")).arg(scanCount));
}
else
{
ui->labelScanCount->setText(tr("do not support"));
ui->label_scanCount->setText(tr("do not support"));
}
char motorVersion[256] = {0};
@ -777,7 +777,7 @@ void MainWindow::on_btnClearRollCount_clicked()
QString info;
if (ret == SANE_STATUS_GOOD)
{
ui->labelRollCount->setText("0");
ui->label_rollerCout->setText(QString(tr("roll count: %1")).arg(QString::number(0)));
info = tr("Roller scanned count has been set to 0.");
}
else if (ret == SANE_STATUS_UNSUPPORTED)
@ -845,12 +845,22 @@ void MainWindow::on_pushButton_getDistortion_clicked()
float distortion = 1.0;
unsigned int len = sizeof(SANE_Bool);
SANE_Status ret = sane_io_control(m_curDevHandle, IO_CTRL_CODE_GET_DISTORTION_DEVS_CHECK_VAL, &distortion, &len);
if (ret != SANE_STATUS_GOOD)
if (ret == SANE_STATUS_GOOD)
{
}
else if (ret == SANE_STATUS_UNSUPPORTED)
{
addContent(ui->textBrowser_disCorrect, tr("do not support"), false);
QMessageBox::information(this, tr("Prompt"), tr("do not support"));
return;
}
else
{
addContent(ui->textBrowser_disCorrect, tr("Get distortion failed"), false);
QMessageBox::information(this, tr("Prompt"), tr("Get failed"));
return;
}
QString value(QString::number(distortion, 'f', 4));
addContent(ui->textBrowser_disCorrect, tr("Get distortion succeed: %1").arg(value), true);
ui->lineEdit_getDistortion->setText(value);
@ -864,19 +874,24 @@ void MainWindow::on_pushButton_setDistortion_clicked()
initColorAndDpi();
float distortion = value.toFloat();
unsigned int len = sizeof(int);
SANE_Status ret = sane_io_control(m_curDevHandle, IO_CTRL_CODE_SET_DISTORTION_DEVS_CHECK_VAL, &distortion, &len);
if (ret != SANE_STATUS_GOOD)
if (ret == SANE_STATUS_GOOD)
{
addContent(ui->textBrowser_disCorrect, tr("Set failed").arg(value), true);
QMessageBox::information(this, tr("Prompt"), tr("Set failed"));
addContent(ui->textBrowser_disCorrect, tr("Set succeed"), true);
}
else if (ret == SANE_STATUS_UNSUPPORTED)
{
addContent(ui->textBrowser_disCorrect, tr("do not support"), false);
QMessageBox::information(this, tr("Prompt"), tr("do not support"));
return;
}
else
{
addContent(ui->textBrowser_disCorrect, tr("Set succeed"), true);
addContent(ui->textBrowser_disCorrect, tr("Set failed").arg(value), true);
QMessageBox::information(this, tr("Prompt"), tr("Set failed"));
return;
}
}
@ -897,15 +912,22 @@ void MainWindow::on_pushButton_correct_clicked()
int type = 0;
unsigned int len = sizeof(int);;
SANE_Status ret = sane_io_control(m_curDevHandle, IO_CTRL_CODE_SET_AUTO_FALT, (void*)&type, &len);
if (ret != SANE_STATUS_GOOD)
if (ret == SANE_STATUS_GOOD)
{
QMessageBox::information(this, tr("Prompt"), tr("Correct failed"));
ui->label_correct->setText(tr("correcting..."));
}
else if (ret == SANE_STATUS_UNSUPPORTED)
{
QMessageBox::information(this, tr("Prompt"), tr("do not support"));
ui->label_correct->setText(tr("do not support"));
return;
}
else
{
ui->label_correct->setText(tr("correcting..."));
QMessageBox::information(this, tr("Prompt"), tr("Correct failed"));
return;
}
}
void MainWindow::on_pushButton_exportTestPaper_clicked()

View File

@ -83,12 +83,12 @@
<attribute name="title">
<string>device information</string>
</attribute>
<widget class="QLabel" name="label_5">
<widget class="QLabel" name="label_rollerCout">
<property name="geometry">
<rect>
<x>220</x>
<y>140</y>
<width>71</width>
<x>221</x>
<y>141</y>
<width>311</width>
<height>20</height>
</rect>
</property>
@ -96,41 +96,21 @@
<string>roll count:</string>
</property>
</widget>
<widget class="QLabel" name="labelRollCount">
<widget class="QLabel" name="label_scanCount">
<property name="geometry">
<rect>
<x>290</x>
<y>140</y>
<width>81</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
<widget class="QLabel" name="labelScanCount">
<property name="geometry">
<rect>
<x>310</x>
<y>180</y>
<width>81</width>
<height>21</height>
</rect>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
<widget class="QLabel" name="label_6">
<property name="geometry">
<rect>
<x>220</x>
<y>180</y>
<width>81</width>
<x>221</x>
<y>181</y>
<width>321</width>
<height>20</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>81</width>
<height>20</height>
</size>
</property>
<property name="text">
<string>scan count:</string>
</property>
@ -371,10 +351,16 @@
<rect>
<x>490</x>
<y>200</y>
<width>141</width>
<width>161</width>
<height>23</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>161</width>
<height>23</height>
</size>
</property>
<property name="text">
<string>Export test paper</string>
</property>