添加快捷键
This commit is contained in:
parent
4e19cd2567
commit
9edf27b6e4
Binary file not shown.
|
@ -24,10 +24,15 @@
|
||||||
<translation>取消</translation>
|
<translation>取消</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="dialog_excepdesc.cpp" line="14"/>
|
<location filename="dialog_excepdesc.cpp" line="15"/>
|
||||||
<source>input excep desc: </source>
|
<source>input excep desc: </source>
|
||||||
<translation>请输入异常说明: </translation>
|
<translation>请输入异常说明: </translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="dialog_excepdesc.cpp" line="17"/>
|
||||||
|
<source>Enter to enter, Ctrl+Enter to confirm</source>
|
||||||
|
<translation>Enter换行,Ctrl+Enter确定</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>Dialog_HGMessageBox</name>
|
<name>Dialog_HGMessageBox</name>
|
||||||
|
@ -699,49 +704,99 @@
|
||||||
<translation>VIDPID:</translation>
|
<translation>VIDPID:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.ui" line="101"/>
|
<location filename="form_maininterface.ui" line="66"/>
|
||||||
|
<source>Esc</source>
|
||||||
|
<translation></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="form_maininterface.ui" line="104"/>
|
||||||
<source>Privious Step</source>
|
<source>Privious Step</source>
|
||||||
<translation>上一步</translation>
|
<translation>上一步(↑)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.ui" line="115"/>
|
<location filename="form_maininterface.ui" line="107"/>
|
||||||
|
<source>Up</source>
|
||||||
|
<translation></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="form_maininterface.ui" line="117"/>
|
||||||
|
<source>Down</source>
|
||||||
|
<translation></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="form_maininterface.ui" line="124"/>
|
||||||
<source>PASS</source>
|
<source>PASS</source>
|
||||||
<translation>通过</translation>
|
<translation>通过(P)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.ui" line="122"/>
|
<location filename="form_maininterface.ui" line="127"/>
|
||||||
|
<source>P</source>
|
||||||
|
<translation></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="form_maininterface.ui" line="134"/>
|
||||||
<source>FAIL</source>
|
<source>FAIL</source>
|
||||||
<translation>不通过</translation>
|
<translation>不通过(F)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.ui" line="129"/>
|
<location filename="form_maininterface.ui" line="137"/>
|
||||||
|
<source>F</source>
|
||||||
|
<translation></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="form_maininterface.ui" line="144"/>
|
||||||
<source>START</source>
|
<source>START</source>
|
||||||
<translation>开始测试</translation>
|
<translation>开始测试(Enter)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.ui" line="143"/>
|
<location filename="form_maininterface.ui" line="147"/>
|
||||||
|
<source>Enter</source>
|
||||||
|
<translation></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="form_maininterface.ui" line="161"/>
|
||||||
<source>PrePage</source>
|
<source>PrePage</source>
|
||||||
<translation>上一张</translation>
|
<translation>上一张(←)</translation>
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="form_maininterface.ui" line="150"/>
|
|
||||||
<source>NextPage</source>
|
|
||||||
<translation>下一张</translation>
|
|
||||||
</message>
|
|
||||||
<message>
|
|
||||||
<location filename="form_maininterface.ui" line="157"/>
|
|
||||||
<source>LeftRotate</source>
|
|
||||||
<translation>左旋转</translation>
|
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.ui" line="164"/>
|
<location filename="form_maininterface.ui" line="164"/>
|
||||||
|
<source>Left</source>
|
||||||
|
<translation></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="form_maininterface.ui" line="171"/>
|
||||||
|
<source>NextPage</source>
|
||||||
|
<translation>下一张(→)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="form_maininterface.ui" line="174"/>
|
||||||
|
<source>Right</source>
|
||||||
|
<translation></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="form_maininterface.ui" line="181"/>
|
||||||
|
<source>LeftRotate</source>
|
||||||
|
<translation>左旋转(L)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="form_maininterface.ui" line="184"/>
|
||||||
|
<source>L</source>
|
||||||
|
<translation></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="form_maininterface.ui" line="191"/>
|
||||||
<source>RightRotate</source>
|
<source>RightRotate</source>
|
||||||
<translation>右旋转</translation>
|
<translation>右旋转(R)</translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="form_maininterface.ui" line="194"/>
|
||||||
|
<source>R</source>
|
||||||
|
<translation></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.ui" line="63"/>
|
<location filename="form_maininterface.ui" line="63"/>
|
||||||
<source>STOP</source>
|
<source>STOP</source>
|
||||||
<translation>关闭</translation>
|
<translation>关闭(Esc)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.ui" line="22"/>
|
<location filename="form_maininterface.ui" line="22"/>
|
||||||
|
@ -749,14 +804,14 @@
|
||||||
<translation>设备信息:</translation>
|
<translation>设备信息:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.ui" line="136"/>
|
<location filename="form_maininterface.ui" line="154"/>
|
||||||
<source>SHOWIMG</source>
|
<source>SHOWIMG</source>
|
||||||
<translation>加载图片</translation>
|
<translation>加载图片</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.ui" line="108"/>
|
<location filename="form_maininterface.ui" line="114"/>
|
||||||
<source>Next Step</source>
|
<source>Next Step</source>
|
||||||
<translation>下一步</translation>
|
<translation>下一步(↓)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Device has connected</source>
|
<source>Device has connected</source>
|
||||||
|
@ -866,13 +921,13 @@
|
||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.cpp" line="271"/>
|
<location filename="form_maininterface.cpp" line="272"/>
|
||||||
<source>device model:%1</source>
|
<source>device model:%1</source>
|
||||||
<translation>设备型号:%1</translation>
|
<translation>设备型号:%1</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.cpp" line="705"/>
|
<location filename="form_maininterface.cpp" line="706"/>
|
||||||
<location filename="form_maininterface.cpp" line="766"/>
|
<location filename="form_maininterface.cpp" line="767"/>
|
||||||
<source>device history scan count:</source>
|
<source>device history scan count:</source>
|
||||||
<translation>设备历史扫描张数:</translation>
|
<translation>设备历史扫描张数:</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -881,37 +936,37 @@
|
||||||
<translation type="vanished">设备序列号:%1</translation>
|
<translation type="vanished">设备序列号:%1</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.cpp" line="406"/>
|
<location filename="form_maininterface.cpp" line="407"/>
|
||||||
<source>ID</source>
|
<source>ID</source>
|
||||||
<translation>序号</translation>
|
<translation>序号</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.cpp" line="406"/>
|
<location filename="form_maininterface.cpp" line="407"/>
|
||||||
<source>Test items</source>
|
<source>Test items</source>
|
||||||
<translation>测试项</translation>
|
<translation>测试项</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.cpp" line="406"/>
|
<location filename="form_maininterface.cpp" line="407"/>
|
||||||
<source>status</source>
|
<source>status</source>
|
||||||
<translation>测试状态</translation>
|
<translation>测试状态</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.cpp" line="488"/>
|
<location filename="form_maininterface.cpp" line="489"/>
|
||||||
<source>not test</source>
|
<source>not test</source>
|
||||||
<translation>未测试</translation>
|
<translation>未测试</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.cpp" line="488"/>
|
<location filename="form_maininterface.cpp" line="489"/>
|
||||||
<source>not pass</source>
|
<source>not pass</source>
|
||||||
<translation>不通过</translation>
|
<translation>不通过</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.cpp" line="488"/>
|
<location filename="form_maininterface.cpp" line="489"/>
|
||||||
<source>not support</source>
|
<source>not support</source>
|
||||||
<translation>不支持</translation>
|
<translation>不支持</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.cpp" line="488"/>
|
<location filename="form_maininterface.cpp" line="489"/>
|
||||||
<source>pass</source>
|
<source>pass</source>
|
||||||
<translation>通过</translation>
|
<translation>通过</translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -937,14 +992,14 @@
|
||||||
<translation type="vanished">Pid:</translation>
|
<translation type="vanished">Pid:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.cpp" line="699"/>
|
<location filename="form_maininterface.cpp" line="700"/>
|
||||||
<location filename="form_maininterface.cpp" line="760"/>
|
<location filename="form_maininterface.cpp" line="761"/>
|
||||||
<source>device roller count:</source>
|
<source>device roller count:</source>
|
||||||
<translation>设备滚轴张数:</translation>
|
<translation>设备滚轴张数:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.cpp" line="200"/>
|
<location filename="form_maininterface.cpp" line="200"/>
|
||||||
<location filename="form_maininterface.cpp" line="554"/>
|
<location filename="form_maininterface.cpp" line="555"/>
|
||||||
<source>image pixel: </source>
|
<source>image pixel: </source>
|
||||||
<translation>标准圆:宽 * 高: </translation>
|
<translation>标准圆:宽 * 高: </translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -969,7 +1024,7 @@
|
||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="form_maininterface.cpp" line="596"/>
|
<location filename="form_maininterface.cpp" line="597"/>
|
||||||
<source> minute</source>
|
<source> minute</source>
|
||||||
<translation> 分钟</translation>
|
<translation> 分钟</translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "dialog_excepdesc.h"
|
#include "dialog_excepdesc.h"
|
||||||
#include "ui_dialog_excepdesc.h"
|
#include "ui_dialog_excepdesc.h"
|
||||||
|
#include <QKeyEvent>
|
||||||
|
|
||||||
Dialog_ExcepDesc::Dialog_ExcepDesc(QWidget *parent) :
|
Dialog_ExcepDesc::Dialog_ExcepDesc(QWidget *parent) :
|
||||||
QDialog(parent),
|
QDialog(parent),
|
||||||
|
@ -12,6 +13,8 @@ Dialog_ExcepDesc::Dialog_ExcepDesc(QWidget *parent) :
|
||||||
this->setFont(ft);
|
this->setFont(ft);
|
||||||
|
|
||||||
ui->label->setText(tr("input excep desc: "));
|
ui->label->setText(tr("input excep desc: "));
|
||||||
|
ui->textEdit->installEventFilter(this);
|
||||||
|
ui->textEdit->setPlaceholderText(tr("Enter to enter, Ctrl+Enter to confirm"));
|
||||||
}
|
}
|
||||||
|
|
||||||
Dialog_ExcepDesc::~Dialog_ExcepDesc()
|
Dialog_ExcepDesc::~Dialog_ExcepDesc()
|
||||||
|
@ -24,6 +27,21 @@ QString Dialog_ExcepDesc::getExcepDesc()
|
||||||
return ui->textEdit->toPlainText();
|
return ui->textEdit->toPlainText();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Dialog_ExcepDesc::eventFilter(QObject *obj, QEvent *e)
|
||||||
|
{
|
||||||
|
Q_ASSERT(obj == ui->textEdit);
|
||||||
|
if (e->type() == QEvent::KeyPress)
|
||||||
|
{
|
||||||
|
QKeyEvent *event = static_cast<QKeyEvent*>(e);
|
||||||
|
if (event->key() == Qt::Key_Return && (event->modifiers() & Qt::ControlModifier))
|
||||||
|
{
|
||||||
|
accept();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void Dialog_ExcepDesc::on_pbtn_ok_clicked()
|
void Dialog_ExcepDesc::on_pbtn_ok_clicked()
|
||||||
{
|
{
|
||||||
accept();
|
accept();
|
||||||
|
|
|
@ -17,6 +17,9 @@ public:
|
||||||
|
|
||||||
QString getExcepDesc();
|
QString getExcepDesc();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool eventFilter(QObject *obj, QEvent *e);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_pbtn_ok_clicked();
|
void on_pbtn_ok_clicked();
|
||||||
|
|
||||||
|
|
|
@ -62,6 +62,9 @@
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>STOP</string>
|
<string>STOP</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Esc</string>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
@ -100,6 +103,9 @@
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Privious Step</string>
|
<string>Privious Step</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Up</string>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -107,6 +113,9 @@
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Next Step</string>
|
<string>Next Step</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Down</string>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -114,6 +123,9 @@
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>PASS</string>
|
<string>PASS</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>P</string>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -121,6 +133,9 @@
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>FAIL</string>
|
<string>FAIL</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>F</string>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -128,6 +143,9 @@
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>START</string>
|
<string>START</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Enter</string>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -142,6 +160,9 @@
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>PrePage</string>
|
<string>PrePage</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Left</string>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -149,6 +170,9 @@
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>NextPage</string>
|
<string>NextPage</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>Right</string>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -156,6 +180,9 @@
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>LeftRotate</string>
|
<string>LeftRotate</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>L</string>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -163,6 +190,9 @@
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>RightRotate</string>
|
<string>RightRotate</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="shortcut">
|
||||||
|
<string>R</string>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
|
Loading…
Reference in New Issue