将配置参数和检查参数功能移至初检界面
This commit is contained in:
parent
09e434af1b
commit
d00a4ce584
Binary file not shown.
|
@ -62,7 +62,7 @@
|
|||
<message>
|
||||
<location filename="dialog_inputserialnum.ui" line="14"/>
|
||||
<source>Dialog</source>
|
||||
<translation>设备标识</translation>
|
||||
<translation>设备初检</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Input SN:</source>
|
||||
|
@ -73,87 +73,201 @@
|
|||
<translation type="vanished">设备型号:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.ui" line="59"/>
|
||||
<source>G100</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.ui" line="64"/>
|
||||
<source>G200</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.ui" line="69"/>
|
||||
<source>G300</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.ui" line="74"/>
|
||||
<source>G400</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.ui" line="88"/>
|
||||
<source>devType :</source>
|
||||
<translation>设备类型:</translation>
|
||||
<translation type="vanished">设备类型:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.ui" line="101"/>
|
||||
<location filename="dialog_inputserialnum.ui" line="22"/>
|
||||
<source>Scanner:</source>
|
||||
<translation>设备名:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.ui" line="95"/>
|
||||
<source>serialNum:</source>
|
||||
<translation>序列号:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.ui" line="130"/>
|
||||
<location filename="dialog_inputserialnum.ui" line="118"/>
|
||||
<source>Set Sn</source>
|
||||
<translation>设置序列号</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.ui" line="26"/>
|
||||
<location filename="dialog_inputserialnum.ui" line="189"/>
|
||||
<source>Set configuration</source>
|
||||
<translation>目标配置写入到设备</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.ui" line="211"/>
|
||||
<source>Check configuration</source>
|
||||
<translation>检查配置是否一致</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.ui" line="233"/>
|
||||
<source>Enter Test</source>
|
||||
<translation>进入测试</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>OK</source>
|
||||
<translation>确定</translation>
|
||||
<translation type="vanished">确定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.ui" line="39"/>
|
||||
<source>Cancel</source>
|
||||
<translation>取消</translation>
|
||||
<translation type="vanished">取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="141"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="148"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="157"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="164"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="183"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="188"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="312"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="317"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="381"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="388"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="397"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="404"/>
|
||||
<source>tips</source>
|
||||
<translation>提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="141"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="342"/>
|
||||
<source>Speed mode</source>
|
||||
<translation>速度模式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="349"/>
|
||||
<source>Sleep time</source>
|
||||
<translation>休眠时间</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="356"/>
|
||||
<source>Vid and Pid</source>
|
||||
<translation>Vid和Pid</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="363"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="367"/>
|
||||
<source>Prompt</source>
|
||||
<translation>提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Inconsistent configuration %1detected, reconfigured, please check again</source>
|
||||
<translation type="vanished">检测到配置%1不一致,已重新配置,请再次检查</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="367"/>
|
||||
<source>Consistent configuration</source>
|
||||
<translation>配置一致!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="381"/>
|
||||
<source>device is lost</source>
|
||||
<translation>设备已丢失</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="148"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="388"/>
|
||||
<source>Serial num is empty</source>
|
||||
<translation>序列号为空</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="157"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="397"/>
|
||||
<source>sn is illegal</source>
|
||||
<translation>序列号不合法</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="164"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="404"/>
|
||||
<source>The device is testing</source>
|
||||
<translation>该设备正在进行测试</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="183"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="312"/>
|
||||
<source>set sn failed</source>
|
||||
<translation>设置序列号失败</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="188"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="41"/>
|
||||
<source>Device name: %1</source>
|
||||
<translation>设备名: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="230"/>
|
||||
<source>Target Configration:</source>
|
||||
<oldsource>Target Configration:
|
||||
</oldsource>
|
||||
<translation>目标配置:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="231"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="258"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="431"/>
|
||||
<source>Speep mode: %1PPM</source>
|
||||
<oldsource>Speep mode: %1PPM
|
||||
</oldsource>
|
||||
<translation>速度模式: %1PPM</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="232"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="259"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="432"/>
|
||||
<source>Sleep time: %1minute</source>
|
||||
<oldsource>Sleep time: %1minute
|
||||
</oldsource>
|
||||
<translation>休眠时间: %1分钟</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="233"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="260"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="433"/>
|
||||
<source>Vid: %1 Pid: %2</source>
|
||||
<oldsource>Vid: %1 Pid: %2
|
||||
</oldsource>
|
||||
<translation>Vid: %1 Pid: %2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="257"/>
|
||||
<source>Current Configration of device:</source>
|
||||
<translation>当前设备配置:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="309"/>
|
||||
<source>Set serial number: %1 </source>
|
||||
<translation>设置序列号: %1 </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="313"/>
|
||||
<source>Test result: Failed!</source>
|
||||
<translation>测试结果:失败!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="318"/>
|
||||
<source>Test result: Succeed!</source>
|
||||
<translation>测试结果:成功!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="363"/>
|
||||
<source>Inconsistent configuration %1detected, please reconfigure, and check again</source>
|
||||
<translation>检测到配置 %1不一致,请重新配置后再次检查</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="435"/>
|
||||
<source>Set configuration to device </source>
|
||||
<translation>将目标配置设置到设备 </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="436"/>
|
||||
<source>Test content: </source>
|
||||
<translation>测试内容: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="232"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="259"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="432"/>
|
||||
<source>Sleep time: Not sleeping</source>
|
||||
<translation>休眠时间: 不休眠</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="309"/>
|
||||
<location filename="dialog_inputserialnum.cpp" line="435"/>
|
||||
<source>Tester: %1, Test item: %2</source>
|
||||
<translation>测试员: %1, 测试项: %2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_inputserialnum.cpp" line="317"/>
|
||||
<source>set sn succeed</source>
|
||||
<translation>设置序列号成功</translation>
|
||||
</message>
|
||||
|
@ -511,55 +625,55 @@
|
|||
<translation type="vanished">退出</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_login.cpp" line="29"/>
|
||||
<location filename="dialog_login.cpp" line="31"/>
|
||||
<source>Set host and port</source>
|
||||
<translation>设置IP与端口</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_login.cpp" line="30"/>
|
||||
<location filename="dialog_login.cpp" line="32"/>
|
||||
<source>Minimize</source>
|
||||
<translation>最小化</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_login.cpp" line="31"/>
|
||||
<location filename="dialog_login.cpp" line="33"/>
|
||||
<source>Close</source>
|
||||
<translation>关闭</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_login.cpp" line="32"/>
|
||||
<location filename="dialog_login.cpp" line="34"/>
|
||||
<source>LogIn</source>
|
||||
<translation>登录</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_login.cpp" line="143"/>
|
||||
<location filename="dialog_login.cpp" line="149"/>
|
||||
<location filename="dialog_login.cpp" line="155"/>
|
||||
<location filename="dialog_login.cpp" line="161"/>
|
||||
<location filename="dialog_login.cpp" line="147"/>
|
||||
<location filename="dialog_login.cpp" line="153"/>
|
||||
<location filename="dialog_login.cpp" line="159"/>
|
||||
<location filename="dialog_login.cpp" line="165"/>
|
||||
<source>Prompt</source>
|
||||
<translation>提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_login.cpp" line="143"/>
|
||||
<location filename="dialog_login.cpp" line="147"/>
|
||||
<source>Account dose not exist</source>
|
||||
<translation>账户不存在</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_login.cpp" line="149"/>
|
||||
<location filename="dialog_login.cpp" line="153"/>
|
||||
<source>Password can not be empty</source>
|
||||
<translation>密码不能为空</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_login.cpp" line="155"/>
|
||||
<location filename="dialog_login.cpp" line="159"/>
|
||||
<source>Password error</source>
|
||||
<translation>密码错误</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_login.cpp" line="161"/>
|
||||
<location filename="dialog_login.cpp" line="165"/>
|
||||
<source>Please select a profile first</source>
|
||||
<translation>请先选择配置文件</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="dialog_login.cpp" line="237"/>
|
||||
<location filename="dialog_login.cpp" line="241"/>
|
||||
<source>Select profile</source>
|
||||
<translation>选择配置文件</translation>
|
||||
</message>
|
||||
|
@ -715,29 +829,30 @@
|
|||
<translation>烧录模式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.ui" line="92"/>
|
||||
<location filename="form_burnmode.ui" line="32"/>
|
||||
<source>SelectAll</source>
|
||||
<translation>全选</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.ui" line="54"/>
|
||||
<source>Entering burning mode</source>
|
||||
<translation>进入烧录模式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.ui" line="154"/>
|
||||
<source>Confirm completion of burning</source>
|
||||
<translation>确认烧录完成并重启</translation>
|
||||
<translation type="vanished">确认烧录完成并重启</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.ui" line="219"/>
|
||||
<source>Check configuration</source>
|
||||
<translation>检查配置是否一致</translation>
|
||||
<translation type="vanished">检查配置是否一致</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.ui" line="284"/>
|
||||
<source>Complete</source>
|
||||
<translation>完成</translation>
|
||||
<translation type="vanished">完成</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.ui" line="335"/>
|
||||
<source>Abnormal exit</source>
|
||||
<translation>异常退出</translation>
|
||||
<translation type="vanished">异常退出</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select All</source>
|
||||
|
@ -756,110 +871,91 @@
|
|||
<translation type="vanished">关闭设备</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="125"/>
|
||||
<location filename="form_burnmode.cpp" line="107"/>
|
||||
<source>ID</source>
|
||||
<translation>序号</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="125"/>
|
||||
<location filename="form_burnmode.cpp" line="107"/>
|
||||
<source>selected</source>
|
||||
<translation>选择</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="125"/>
|
||||
<location filename="form_burnmode.cpp" line="107"/>
|
||||
<source>device</source>
|
||||
<translation>设备</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="179"/>
|
||||
<source>Target Configration:
|
||||
</source>
|
||||
<translation>目标配置:
|
||||
<translation type="vanished">目标配置:
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="180"/>
|
||||
<source>Speep mode: %1PPM
|
||||
</source>
|
||||
<translation>速度模式: %1PPM
|
||||
<translation type="vanished">速度模式: %1PPM
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="181"/>
|
||||
<source>Sleep time: %1minute
|
||||
</source>
|
||||
<translation>休眠时间: %1分钟
|
||||
<translation type="vanished">休眠时间: %1分钟
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="181"/>
|
||||
<source>Sleep time: Not sleeping
|
||||
</source>
|
||||
<translation>休眠时间: 不休眠
|
||||
<translation type="vanished">休眠时间: 不休眠
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="182"/>
|
||||
<source>Vid: %1 Pid: %2
|
||||
</source>
|
||||
<translation>Vid: %1 Pid: %2
|
||||
<translation type="vanished">Vid: %1 Pid: %2
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="207"/>
|
||||
<source>Current Configration of device:</source>
|
||||
<translation>当前设备配置:</translation>
|
||||
<translation type="vanished">当前设备配置:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="208"/>
|
||||
<location filename="form_burnmode.cpp" line="544"/>
|
||||
<source>Speep mode: %1PPM</source>
|
||||
<translation>速度模式: %1PPM</translation>
|
||||
<translation type="vanished">速度模式: %1PPM</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="209"/>
|
||||
<location filename="form_burnmode.cpp" line="545"/>
|
||||
<source>Sleep time: %1minute</source>
|
||||
<translation>休眠时间: %1分钟</translation>
|
||||
<translation type="vanished">休眠时间: %1分钟</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="209"/>
|
||||
<location filename="form_burnmode.cpp" line="545"/>
|
||||
<source>Sleep time: Not sleeping</source>
|
||||
<translation>休眠时间: 不休眠</translation>
|
||||
<translation type="vanished">休眠时间: 不休眠</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="210"/>
|
||||
<location filename="form_burnmode.cpp" line="546"/>
|
||||
<source>Vid: %1 Pid: %2</source>
|
||||
<translation>Vid: %1 Pid: %2</translation>
|
||||
<translation type="vanished">Vid: %1 Pid: %2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="543"/>
|
||||
<source>Complete burning and configure device parameters: </source>
|
||||
<oldsource>Complete burning and configure device parameters:</oldsource>
|
||||
<translation>完成烧录并且配置设备参数: </translation>
|
||||
<translation type="vanished">完成烧录并且配置设备参数: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="576"/>
|
||||
<source>Speed mode</source>
|
||||
<oldsource>Speed time</oldsource>
|
||||
<translation>速度模式</translation>
|
||||
<translation type="vanished">速度模式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="617"/>
|
||||
<source>Tester: %1, Test item: Burn, Test completed</source>
|
||||
<translation>测试员: %1, 测试项: 烧录, 测试完成!</translation>
|
||||
<translation type="vanished">测试员: %1, 测试项: 烧录, 测试完成!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="630"/>
|
||||
<source>Tester: %1, Test item: Burn, Test result: Failed! Reason: %2</source>
|
||||
<translation>测试员: %1, 测试项: 烧录, 测试失败! 原因:%2</translation>
|
||||
<translation type="vanished">测试员: %1, 测试项: 烧录, 测试失败! 原因:%2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="547"/>
|
||||
<source>Tester: %1, Test item: Burn, Test contents: %2</source>
|
||||
<translation>测试员: %1, 测试项: 烧录, 测试内容: %2</translation>
|
||||
<translation type="vanished">测试员: %1, 测试项: 烧录, 测试内容: %2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Current Configration of device:
|
||||
|
@ -868,42 +964,36 @@
|
|||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="584"/>
|
||||
<source>Sleep time</source>
|
||||
<translation>休眠时间</translation>
|
||||
<translation type="vanished">休眠时间</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="592"/>
|
||||
<source>Vid and Pid</source>
|
||||
<translation>Vid和Pid</translation>
|
||||
<translation type="vanished">Vid和Pid</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="600"/>
|
||||
<location filename="form_burnmode.cpp" line="604"/>
|
||||
<source>Prompt</source>
|
||||
<translation>提示</translation>
|
||||
<translation type="vanished">提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="600"/>
|
||||
<source>Inconsistent configuration %1detected, reconfigured, please check again</source>
|
||||
<translation>检测到配置%1不一致,已重新配置,请再次检查</translation>
|
||||
<translation type="vanished">检测到配置%1不一致,已重新配置,请再次检查</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="604"/>
|
||||
<source>Consistent configuration</source>
|
||||
<translation>配置一致!</translation>
|
||||
<translation type="vanished">配置一致!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>serialNum</source>
|
||||
<translation type="vanished">序列号</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="282"/>
|
||||
<location filename="form_burnmode.cpp" line="173"/>
|
||||
<source>tips</source>
|
||||
<translation>提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_burnmode.cpp" line="282"/>
|
||||
<location filename="form_burnmode.cpp" line="173"/>
|
||||
<source>Please check a devices at least</source>
|
||||
<translation>请至少勾选一台设备</translation>
|
||||
</message>
|
||||
|
@ -1057,12 +1147,12 @@
|
|||
<translation type="vanished">设备未连接</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="67"/>
|
||||
<location filename="form_maininterface.cpp" line="66"/>
|
||||
<source>Device type:</source>
|
||||
<translation>设备类型:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="67"/>
|
||||
<location filename="form_maininterface.cpp" line="66"/>
|
||||
<source> SerialNum:</source>
|
||||
<translation> 序列号:</translation>
|
||||
</message>
|
||||
|
@ -1079,7 +1169,7 @@
|
|||
<translation type="vanished"> 休眠时间: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="85"/>
|
||||
<location filename="form_maininterface.cpp" line="84"/>
|
||||
<source>load last image which uploaded last time</source>
|
||||
<translation>加载上一次上传的图片</translation>
|
||||
</message>
|
||||
|
@ -1088,14 +1178,14 @@
|
|||
<translation type="vanished">设备已断开</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="164"/>
|
||||
<location filename="form_maininterface.cpp" line="163"/>
|
||||
<source>tips</source>
|
||||
<translation>提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="207"/>
|
||||
<location filename="form_maininterface.cpp" line="217"/>
|
||||
<location filename="form_maininterface.cpp" line="227"/>
|
||||
<location filename="form_maininterface.cpp" line="206"/>
|
||||
<location filename="form_maininterface.cpp" line="216"/>
|
||||
<location filename="form_maininterface.cpp" line="226"/>
|
||||
<source>destortion value: </source>
|
||||
<translation>畸变修正值: </translation>
|
||||
</message>
|
||||
|
@ -1108,68 +1198,68 @@
|
|||
<translation type="vanished">取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="69"/>
|
||||
<location filename="form_maininterface.cpp" line="68"/>
|
||||
<source> speed mode:</source>
|
||||
<translation> 目标配置: 速度模式:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="70"/>
|
||||
<location filename="form_maininterface.cpp" line="69"/>
|
||||
<source> sleep time:</source>
|
||||
<translation> 休眠时间:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="161"/>
|
||||
<location filename="form_maininterface.cpp" line="160"/>
|
||||
<source>,but correct information is abnormal</source>
|
||||
<translation>,但是校正有异常</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="266"/>
|
||||
<location filename="form_maininterface.cpp" line="265"/>
|
||||
<source>please verify the configuration of the device:</source>
|
||||
<translation>请验证设备配置:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="267"/>
|
||||
<location filename="form_maininterface.cpp" line="266"/>
|
||||
<source>vid:%1
|
||||
</source>
|
||||
<translation>vid:%1
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="268"/>
|
||||
<location filename="form_maininterface.cpp" line="267"/>
|
||||
<source>pid:%1
|
||||
</source>
|
||||
<translation>pid:%1
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="269"/>
|
||||
<location filename="form_maininterface.cpp" line="268"/>
|
||||
<source>sleep time:%1minute
|
||||
</source>
|
||||
<translation>休眠时间:%1分钟
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="269"/>
|
||||
<location filename="form_maininterface.cpp" line="268"/>
|
||||
<source>sleep time:%1
|
||||
</source>
|
||||
<translation>休眠时间:%1
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="269"/>
|
||||
<location filename="form_maininterface.cpp" line="599"/>
|
||||
<location filename="form_maininterface.cpp" line="268"/>
|
||||
<location filename="form_maininterface.cpp" line="598"/>
|
||||
<source>Not sleeping</source>
|
||||
<translation>不休眠</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="270"/>
|
||||
<location filename="form_maininterface.cpp" line="269"/>
|
||||
<source>speed mode:%1PPM
|
||||
</source>
|
||||
<translation>速度模式:%1PPM
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="274"/>
|
||||
<location filename="form_maininterface.cpp" line="273"/>
|
||||
<source>device model:%1</source>
|
||||
<translation>设备型号:%1</translation>
|
||||
</message>
|
||||
|
@ -1184,46 +1274,46 @@
|
|||
<translation type="vanished">设备序列号: %1, 测试项: %2, 测试结果: 通过!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="764"/>
|
||||
<location filename="form_maininterface.cpp" line="835"/>
|
||||
<location filename="form_maininterface.cpp" line="763"/>
|
||||
<location filename="form_maininterface.cpp" line="834"/>
|
||||
<source>device history scan count:</source>
|
||||
<translation>设备历史扫描张数:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="658"/>
|
||||
<location filename="form_maininterface.cpp" line="662"/>
|
||||
<location filename="form_maininterface.cpp" line="666"/>
|
||||
<location filename="form_maininterface.cpp" line="670"/>
|
||||
<location filename="form_maininterface.cpp" line="657"/>
|
||||
<location filename="form_maininterface.cpp" line="661"/>
|
||||
<location filename="form_maininterface.cpp" line="665"/>
|
||||
<location filename="form_maininterface.cpp" line="669"/>
|
||||
<source>Prompt</source>
|
||||
<translation>提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="349"/>
|
||||
<location filename="form_maininterface.cpp" line="348"/>
|
||||
<source>Tester: %1, Test item: %2, Test result: Failed! Reason: %3</source>
|
||||
<translation>测试员: %1, 测试项: %2, 测试结果: 不通过! 原因: %3</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="374"/>
|
||||
<location filename="form_maininterface.cpp" line="373"/>
|
||||
<source>Tester: %1, Test item: %2, Test result: Pass!</source>
|
||||
<translation>测试员: %1, 测试项: %2, 测试结果: 通过!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="658"/>
|
||||
<location filename="form_maininterface.cpp" line="657"/>
|
||||
<source>No paper</source>
|
||||
<translation>无纸</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="662"/>
|
||||
<location filename="form_maininterface.cpp" line="661"/>
|
||||
<source>Device is sleeping</source>
|
||||
<translation>设备处于休眠模式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="666"/>
|
||||
<location filename="form_maininterface.cpp" line="665"/>
|
||||
<source>Counting mode</source>
|
||||
<translation>设备处于计数模式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="670"/>
|
||||
<location filename="form_maininterface.cpp" line="669"/>
|
||||
<source>Other error</source>
|
||||
<translation>其他错误</translation>
|
||||
</message>
|
||||
|
@ -1232,39 +1322,39 @@
|
|||
<translation type="vanished">设备序列号:%1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="417"/>
|
||||
<location filename="form_maininterface.cpp" line="416"/>
|
||||
<source>ID</source>
|
||||
<translation>序号</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="417"/>
|
||||
<location filename="form_maininterface.cpp" line="416"/>
|
||||
<source>Test items</source>
|
||||
<translation>测试项</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="417"/>
|
||||
<location filename="form_maininterface.cpp" line="416"/>
|
||||
<source>status</source>
|
||||
<translation>测试状态</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="493"/>
|
||||
<location filename="form_maininterface.cpp" line="492"/>
|
||||
<source>not test</source>
|
||||
<translation>未测试</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="339"/>
|
||||
<location filename="form_maininterface.cpp" line="493"/>
|
||||
<location filename="form_maininterface.cpp" line="338"/>
|
||||
<location filename="form_maininterface.cpp" line="492"/>
|
||||
<source>not pass</source>
|
||||
<translation>不通过</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="493"/>
|
||||
<location filename="form_maininterface.cpp" line="492"/>
|
||||
<source>not support</source>
|
||||
<translation>不支持</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="369"/>
|
||||
<location filename="form_maininterface.cpp" line="493"/>
|
||||
<location filename="form_maininterface.cpp" line="368"/>
|
||||
<location filename="form_maininterface.cpp" line="492"/>
|
||||
<source>pass</source>
|
||||
<translation>通过</translation>
|
||||
</message>
|
||||
|
@ -1290,31 +1380,31 @@
|
|||
<translation type="vanished">Pid:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="758"/>
|
||||
<location filename="form_maininterface.cpp" line="829"/>
|
||||
<location filename="form_maininterface.cpp" line="757"/>
|
||||
<location filename="form_maininterface.cpp" line="828"/>
|
||||
<source>device roller count:</source>
|
||||
<translation>设备滚轴张数:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="202"/>
|
||||
<location filename="form_maininterface.cpp" line="559"/>
|
||||
<location filename="form_maininterface.cpp" line="201"/>
|
||||
<location filename="form_maininterface.cpp" line="558"/>
|
||||
<source>image pixel: </source>
|
||||
<translation>标准圆:宽 * 高: </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="67"/>
|
||||
<location filename="form_maininterface.cpp" line="66"/>
|
||||
<source>FirmwareNum:</source>
|
||||
<translation>固件号:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="271"/>
|
||||
<location filename="form_maininterface.cpp" line="270"/>
|
||||
<source>device serial number:%1
|
||||
</source>
|
||||
<translation>设备序列号:%1
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="272"/>
|
||||
<location filename="form_maininterface.cpp" line="271"/>
|
||||
<source>device firmware number:%1
|
||||
</source>
|
||||
<oldsource>device firmware number:%1</oldsource>
|
||||
|
@ -1322,17 +1412,17 @@
|
|||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="601"/>
|
||||
<location filename="form_maininterface.cpp" line="600"/>
|
||||
<source> minute</source>
|
||||
<translation> 分钟</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="72"/>
|
||||
<location filename="form_maininterface.cpp" line="71"/>
|
||||
<source> VID:</source>
|
||||
<translation> VID:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="form_maininterface.cpp" line="72"/>
|
||||
<location filename="form_maininterface.cpp" line="71"/>
|
||||
<source> PID:</source>
|
||||
<translation> PID:</translation>
|
||||
</message>
|
||||
|
@ -1428,38 +1518,38 @@
|
|||
<translation type="vanished">数据库错误</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="318"/>
|
||||
<location filename="mainwindow.cpp" line="546"/>
|
||||
<location filename="mainwindow.cpp" line="586"/>
|
||||
<location filename="mainwindow.cpp" line="598"/>
|
||||
<location filename="mainwindow.cpp" line="674"/>
|
||||
<location filename="mainwindow.cpp" line="321"/>
|
||||
<location filename="mainwindow.cpp" line="554"/>
|
||||
<location filename="mainwindow.cpp" line="594"/>
|
||||
<location filename="mainwindow.cpp" line="606"/>
|
||||
<location filename="mainwindow.cpp" line="683"/>
|
||||
<source>tips</source>
|
||||
<translation>提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="53"/>
|
||||
<location filename="mainwindow.cpp" line="57"/>
|
||||
<source>production tool-burn station</source>
|
||||
<translation>华高生产工具-烧录工位</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="98"/>
|
||||
<location filename="mainwindow.cpp" line="101"/>
|
||||
<source>production tool-init test station</source>
|
||||
<translation>华高生产工具-初检工位</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="100"/>
|
||||
<location filename="mainwindow.cpp" line="103"/>
|
||||
<source>production tool-image test station</source>
|
||||
<translation>华高生产工具-图像测试工位</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="102"/>
|
||||
<location filename="mainwindow.cpp" line="105"/>
|
||||
<source>production tool-pressure test station</source>
|
||||
<translation>华高生产工具-压力测试工位</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="318"/>
|
||||
<location filename="mainwindow.cpp" line="586"/>
|
||||
<location filename="mainwindow.cpp" line="598"/>
|
||||
<location filename="mainwindow.cpp" line="321"/>
|
||||
<location filename="mainwindow.cpp" line="594"/>
|
||||
<location filename="mainwindow.cpp" line="606"/>
|
||||
<source>Is testing, do not close!</source>
|
||||
<translation>测试中,请勿关闭!</translation>
|
||||
</message>
|
||||
|
@ -1481,8 +1571,8 @@
|
|||
<translation type="vanished">取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="mainwindow.cpp" line="546"/>
|
||||
<location filename="mainwindow.cpp" line="674"/>
|
||||
<location filename="mainwindow.cpp" line="554"/>
|
||||
<location filename="mainwindow.cpp" line="683"/>
|
||||
<source>cannot create more table</source>
|
||||
<translation>不能创建更多项目</translation>
|
||||
</message>
|
||||
|
|
|
@ -1,20 +1,23 @@
|
|||
#include "dialog_inputserialnum.h"
|
||||
#include "ui_dialog_inputserialnum.h"
|
||||
#include "mainwindow.h"
|
||||
#include "base/HGBase.h"
|
||||
#include "HGUIGlobal.h"
|
||||
|
||||
Dialog_InputSerialNum::Dialog_InputSerialNum(class MainWindow *mainWnd, const QString &devName, const QString &profileName,
|
||||
SANE_Handle handle, const QString &serialNum, const QString &devType) :
|
||||
Dialog_InputSerialNum::Dialog_InputSerialNum(class MainWindow *mainWnd, Dialog_logIn::LogInType logInType, const QString &devName, const QString &profileName,
|
||||
const QString &accountName, SANE_Handle handle, const QString &serialNum, const QString &devType) :
|
||||
QDialog(mainWnd),
|
||||
ui(new Ui::Dialog_InputSerialNum),
|
||||
m_mainWnd(mainWnd),
|
||||
m_logInType(logInType),
|
||||
m_handle(handle),
|
||||
m_valid(true),
|
||||
m_profileName(profileName),
|
||||
m_accountName(accountName),
|
||||
m_serialNum(serialNum),
|
||||
m_devType(devType),
|
||||
m_devName(devName),
|
||||
m_hg(nullptr)
|
||||
m_hg(nullptr),
|
||||
m_curIndex(0)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
|
@ -24,19 +27,29 @@ Dialog_InputSerialNum::Dialog_InputSerialNum(class MainWindow *mainWnd, const QS
|
|||
ft.setPointSize(15);
|
||||
this->setFont(ft);
|
||||
|
||||
if (m_logInType != Dialog_logIn::LogInType_InitTest)
|
||||
{
|
||||
ui->lineEdit_sn->setEnabled(false);
|
||||
ui->pbtn_setSn->setEnabled(false);
|
||||
ui->pbtn_setConfig->setEnabled(false);
|
||||
}
|
||||
|
||||
ui->pbtn_enterTest->setEnabled(false);
|
||||
ui->textEdit_curConfig->setReadOnly(true);
|
||||
ui->textEdit_target->setReadOnly(true);
|
||||
|
||||
ui->label_scanner->setText(tr("Device name: %1").arg(m_devName));
|
||||
|
||||
ui->lineEdit_sn->setValidator(new QRegExpValidator(QRegExp("[a-zA-Z0-9]+$")));
|
||||
ui->lineEdit_sn->setMaxLength(14);
|
||||
|
||||
if (handle != nullptr)
|
||||
{
|
||||
ui->cbox_devType->setEnabled(false);
|
||||
ui->cbox_devType->setCurrentText(devType);
|
||||
ui->lineEdit_sn->setText(serialNum);
|
||||
ui->lineEdit_sn->selectAll();
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->cbox_devType->setCurrentIndex(0);
|
||||
ui->lineEdit_sn->setText("");
|
||||
ui->pbtn_setSn->setEnabled(false);
|
||||
}
|
||||
|
@ -45,6 +58,10 @@ Dialog_InputSerialNum::Dialog_InputSerialNum(class MainWindow *mainWnd, const QS
|
|||
m_hg = new hgscanner(nullptr, nullptr, this, m_handle);
|
||||
|
||||
connect(this, SIGNAL(testResult()), this, SLOT(on_testResult()));
|
||||
|
||||
setSleepTime();
|
||||
updateTargetCfg();
|
||||
updateCurDeviceCfg();
|
||||
}
|
||||
|
||||
Dialog_InputSerialNum::~Dialog_InputSerialNum()
|
||||
|
@ -62,7 +79,7 @@ QString Dialog_InputSerialNum::GetSn()
|
|||
|
||||
QString Dialog_InputSerialNum::GetDevType()
|
||||
{
|
||||
return ui->cbox_devType->currentText();
|
||||
return m_devType;
|
||||
}
|
||||
|
||||
void Dialog_InputSerialNum::Invalid(const QString &devName)
|
||||
|
@ -76,65 +93,288 @@ void Dialog_InputSerialNum::Invalid(const QString &devName)
|
|||
}
|
||||
}
|
||||
|
||||
void Dialog_InputSerialNum::setSpeedAndSleep(bool updateSleep)
|
||||
void Dialog_InputSerialNum::setSpeedMode()
|
||||
{
|
||||
if (m_hg == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//HGPdtToolDb_DownloadFile(m_pdtToolDbuserMgr, m_devType.toStdString().c_str(), cfgPath);
|
||||
|
||||
AnalysisJson analysisJson(m_profileName);
|
||||
AnalysisJson::json_global jsonGlobal = analysisJson.GetGlobal();
|
||||
LPWRITECFG lp = new WRITECFG;
|
||||
|
||||
if (updateSleep)
|
||||
{
|
||||
int sleepTime = jsonGlobal.sleep_time;
|
||||
lp->cat = WRITE_CAT_SLEEP;
|
||||
lp->val = (void*)&sleepTime;
|
||||
m_mainWnd->addTestingRef();
|
||||
func_test_go(WRITE_CFG_NAME, (const wchar_t*)lp, m_hg);
|
||||
|
||||
delete lp;
|
||||
return;
|
||||
}
|
||||
|
||||
// VIDPID vidpid;
|
||||
// vidpid.VID = jsonGlobal.vid_to;
|
||||
// vidpid.PID = jsonGlobal.pid_to;
|
||||
// int vidpidValue = vidpid.Value;
|
||||
// lp->cat = WRITE_CAT_VID_PID;
|
||||
// lp->val = (void*)&vidpidValue;
|
||||
// m_mainWnd->addTestingRef();
|
||||
// func_test_go(WRITE_CFG_NAME, (const wchar_t*)lp, m_hg);
|
||||
|
||||
// int speedMode = jsonGlobal.speed_mode ;
|
||||
// lp->cat = WRITE_CAT_SPEED;
|
||||
// lp->val = (void*)&speedMode;
|
||||
// m_mainWnd->addTestingRef();
|
||||
// func_test_go(WRITE_CFG_NAME, (const wchar_t*)lp, m_hg);
|
||||
|
||||
// QString device_model = jsonGlobal.device_model;
|
||||
// if (!device_model.isEmpty())
|
||||
// {
|
||||
// std::wstring devModel = device_model.toStdWString();
|
||||
// lp->cat = WRITE_CAT_DEVS_MODEL;
|
||||
// lp->val = (void*)devModel.c_str();
|
||||
// m_mainWnd->addTestingRef();
|
||||
// func_test_go(WRITE_CFG_NAME, (const wchar_t*)lp, m_hg);
|
||||
// }
|
||||
int speedMode = jsonGlobal.speed_mode;
|
||||
lp->cat = WRITE_CAT_SPEED;
|
||||
lp->val = (void*)&speedMode;
|
||||
func_test_go(WRITE_CFG_NAME, (const wchar_t*)lp, m_hg);
|
||||
|
||||
delete lp;
|
||||
}
|
||||
|
||||
void Dialog_InputSerialNum::on_testResult()
|
||||
void Dialog_InputSerialNum::setSleepTime()
|
||||
{
|
||||
m_mainWnd->releaseTesting();
|
||||
AnalysisJson analysisJson(m_profileName);
|
||||
AnalysisJson::json_global jsonGlobal = analysisJson.GetGlobal();
|
||||
LPWRITECFG lp = new WRITECFG;
|
||||
|
||||
int sleepTime = jsonGlobal.sleep_time;
|
||||
lp->cat = WRITE_CAT_SLEEP;
|
||||
lp->val = (void*)&sleepTime;
|
||||
func_test_go(WRITE_CFG_NAME, (const wchar_t*)lp, m_hg);
|
||||
|
||||
delete lp;
|
||||
}
|
||||
|
||||
void Dialog_InputSerialNum::on_pbtn_ok_clicked()
|
||||
void Dialog_InputSerialNum::setVidPid()
|
||||
{
|
||||
AnalysisJson analysisJson(m_profileName);
|
||||
AnalysisJson::json_global jsonGlobal = analysisJson.GetGlobal();
|
||||
LPWRITECFG lp = new WRITECFG;
|
||||
|
||||
VIDPID vidpid;
|
||||
vidpid.VID = jsonGlobal.vid_to;
|
||||
vidpid.PID = jsonGlobal.pid_to;
|
||||
int vidpidValue = vidpid.Value;
|
||||
lp->cat = WRITE_CAT_VID_PID;
|
||||
lp->val = (void*)&vidpidValue;
|
||||
func_test_go(WRITE_CFG_NAME, (const wchar_t*)lp, m_hg);
|
||||
|
||||
delete lp;
|
||||
}
|
||||
|
||||
void Dialog_InputSerialNum::rebootDevice()
|
||||
{
|
||||
const wchar_t *p = L"0";
|
||||
func_test_go(HGPDTTOOLDB_NAME_REBOOT_DEVICE, p, m_hg);
|
||||
}
|
||||
|
||||
int Dialog_InputSerialNum::getSpeedMode()
|
||||
{
|
||||
SANE_Int speedMode = 0;
|
||||
unsigned int len = sizeof(SANE_Int);
|
||||
sane_io_control(m_handle, IO_CTRL_CODE_GET_SPEED_MODE, &speedMode, &len);
|
||||
|
||||
const wchar_t G100[6] = { 70,80,90,110 };
|
||||
const wchar_t G200[6] = { 100,110,120,130 };
|
||||
const wchar_t G300[6] = { 40,50,60,70,80,90 };
|
||||
const wchar_t G400[6] = { 40,50,60,70,80,90 };
|
||||
|
||||
int speed = 0;
|
||||
|
||||
if ((int)speedMode >= 40)
|
||||
speed = (int)speedMode;
|
||||
else
|
||||
{
|
||||
if (m_devType == "G100")
|
||||
speed = G100[(int)speedMode - 1];
|
||||
else if (m_devType == "G200")
|
||||
speed = G200[(int)speedMode - 1];
|
||||
else if (m_devType == "G300")
|
||||
speed = G300[(int)speedMode - 1];
|
||||
else if (m_devType == "G400")
|
||||
speed = G400[(int)speedMode - 1];
|
||||
}
|
||||
|
||||
return speed;
|
||||
}
|
||||
|
||||
int Dialog_InputSerialNum::getSleepTime()
|
||||
{
|
||||
int sleepTime = SANE_POWER_FIRST;
|
||||
unsigned int len2 = sizeof(int);
|
||||
sane_io_control(m_handle, IO_CTRL_CODE_GET_POWER_LEVEL, &sleepTime, &len2);
|
||||
|
||||
if (sleepTime > 99999 || sleepTime == -1)
|
||||
return 0;
|
||||
|
||||
return (sleepTime / 60);
|
||||
}
|
||||
|
||||
int Dialog_InputSerialNum::getDevVid()
|
||||
{
|
||||
VIDPID vidpid;
|
||||
int vidpid_val;
|
||||
unsigned int len = sizeof(int);
|
||||
sane_io_control(m_handle, IO_CTRL_CODE_GET_VIDPID, &vidpid_val, &len);
|
||||
vidpid.Value = vidpid_val;
|
||||
int vid = vidpid.VID;
|
||||
return vid;
|
||||
}
|
||||
|
||||
int Dialog_InputSerialNum::getDevPid()
|
||||
{
|
||||
VIDPID vidpid;
|
||||
int vidpid_val;
|
||||
unsigned int len = sizeof(int);
|
||||
sane_io_control(m_handle, IO_CTRL_CODE_GET_VIDPID, &vidpid_val, &len);
|
||||
vidpid.Value = vidpid_val;
|
||||
int pid = vidpid.PID;
|
||||
return pid;
|
||||
}
|
||||
|
||||
void Dialog_InputSerialNum::updateTargetCfg()
|
||||
{
|
||||
ui->textEdit_target->clear();
|
||||
|
||||
AnalysisJson analysisJson(m_profileName);
|
||||
AnalysisJson::json_global jsonGlobal = analysisJson.GetGlobal();
|
||||
|
||||
int speedMode = jsonGlobal.speed_mode;
|
||||
int sleepTime = jsonGlobal.sleep_time;
|
||||
int vid_to = jsonGlobal.vid_to;
|
||||
int pid_to = jsonGlobal.pid_to;
|
||||
|
||||
char buf[10];
|
||||
sprintf(buf, "%x", vid_to);
|
||||
|
||||
char buf2[10];
|
||||
sprintf(buf2, "%x", pid_to);
|
||||
|
||||
QString content;
|
||||
content.append(tr("Target Configration:") + "\n\t");
|
||||
content.append(tr("Speep mode: %1PPM").arg(QString::number(speedMode)) + "\n\t");
|
||||
content.append((sleepTime > 0 ? tr("Sleep time: %1minute").arg(QString::number(sleepTime)) : tr("Sleep time: Not sleeping")) + "\n\t");
|
||||
content.append(tr("Vid: %1 Pid: %2").arg(QString::fromStdString(buf)).arg(QString::fromStdString(buf2)) + "\n\t");
|
||||
|
||||
ui->textEdit_target->setText(content);
|
||||
}
|
||||
|
||||
void Dialog_InputSerialNum::updateCurDeviceCfg()
|
||||
{
|
||||
ui->textEdit_curConfig->clear();
|
||||
|
||||
if (m_handle == nullptr)
|
||||
return;
|
||||
|
||||
int speedMode = getSpeedMode();
|
||||
int sleepTime = getSleepTime();
|
||||
int vid_to = getDevVid();
|
||||
int pid_to = getDevPid();
|
||||
|
||||
char buf[10];
|
||||
sprintf(buf, "%x", vid_to);
|
||||
|
||||
char buf2[10];
|
||||
sprintf(buf2, "%x", pid_to);
|
||||
|
||||
QString content;
|
||||
content.append(tr("Current Configration of device:") + "\n\t");
|
||||
content.append(tr("Speep mode: %1PPM").arg(QString::number(speedMode)) + "\n\t");
|
||||
content.append(sleepTime > 0 ? tr("Sleep time: %1minute").arg(QString::number(sleepTime)) : tr("Sleep time: Not sleeping") + "\n\t");
|
||||
content.append(tr("Vid: %1 Pid: %2").arg(QString::fromStdString(buf)).arg(QString::fromStdString(buf2)) + "\n\t");
|
||||
|
||||
ui->textEdit_curConfig->setText(content);
|
||||
}
|
||||
|
||||
QString Dialog_InputSerialNum::getLogPath()
|
||||
{
|
||||
HGChar cachePath[512];
|
||||
HGBase_GetDocumentsPath(cachePath, 512);
|
||||
HGChar procName[512];
|
||||
HGBase_GetProcessName(procName, 512);
|
||||
strcat(cachePath, procName);
|
||||
strcat(cachePath, "/Test_Log/");
|
||||
|
||||
return getStdFileName(cachePath);
|
||||
}
|
||||
|
||||
void Dialog_InputSerialNum::writeTestLog(QString logContent)
|
||||
{
|
||||
QString logPath = getLogPath();
|
||||
HGBase_CreateDir(getStdString(logPath).c_str());
|
||||
|
||||
QString fileName = logPath + m_serialNum + ".log";
|
||||
QFile file(fileName);
|
||||
if(!file.open(QIODevice::ReadWrite | QIODevice::Append))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
QDateTime dateTime= QDateTime::currentDateTime();
|
||||
QString curTime = dateTime .toString("yyyy-MM-dd hh:mm:ss");
|
||||
QString content = "[" + curTime + "] ";
|
||||
content += logContent;
|
||||
|
||||
QTextStream txtOutput(&file);
|
||||
txtOutput << content << endl;
|
||||
file.close();
|
||||
}
|
||||
|
||||
void Dialog_InputSerialNum::on_testResult()
|
||||
{
|
||||
//m_mainWnd->releaseTesting();
|
||||
}
|
||||
|
||||
void Dialog_InputSerialNum::on_pbtn_setSn_clicked()
|
||||
{
|
||||
QString sn = ui->lineEdit_sn->text();
|
||||
std::string serialNum = sn.toStdString();
|
||||
|
||||
QString testLog = tr("Tester: %1, Test item: %2").arg(m_accountName).arg(QString(tr("Set serial number: %1 ").arg(sn)));
|
||||
if(SANE_STATUS_GOOD != sane_io_control(m_handle, IO_CTRL_CODE_SET_SERIAL, &serialNum[0], nullptr))
|
||||
{
|
||||
QMessageBox::information(this, tr("tips"), tr("set sn failed"));
|
||||
writeTestLog(testLog + tr("Test result: Failed!"));
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::information(this, tr("tips"), tr("set sn succeed"));
|
||||
writeTestLog(testLog + tr("Test result: Succeed!"));
|
||||
}
|
||||
}
|
||||
|
||||
void Dialog_InputSerialNum::on_pbtn_checkConfig_clicked()
|
||||
{
|
||||
AnalysisJson analysisJson(m_profileName);
|
||||
AnalysisJson::json_global jsonGlobal = analysisJson.GetGlobal();
|
||||
|
||||
int speedMode_to = jsonGlobal.speed_mode;
|
||||
int sleepTime_to = jsonGlobal.sleep_time;
|
||||
int vid_to = jsonGlobal.vid_to;
|
||||
int pid_to = jsonGlobal.pid_to;
|
||||
|
||||
int speedMode = getSpeedMode();
|
||||
int sleepTime = getSleepTime();
|
||||
int vid = getDevVid();
|
||||
int pid = getDevPid();
|
||||
|
||||
QString item;
|
||||
bool right = true;
|
||||
LPWRITECFG lp = new WRITECFG;
|
||||
if (speedMode_to != speedMode)
|
||||
{
|
||||
item.append(tr("Speed mode"));
|
||||
item.append(" ");
|
||||
right = false;
|
||||
}
|
||||
|
||||
if (sleepTime_to != sleepTime)
|
||||
{
|
||||
item.append(tr("Sleep time"));
|
||||
item.append(" ");
|
||||
right = false;
|
||||
}
|
||||
|
||||
if (vid != vid_to || pid != pid_to)
|
||||
{
|
||||
item.append(tr("Vid and Pid"));
|
||||
item.append(" ");
|
||||
right = false;
|
||||
}
|
||||
|
||||
if (!right)
|
||||
{
|
||||
QMessageBox::information(this, tr("Prompt"), tr("Inconsistent configuration %1detected, please reconfigure, and check again").arg(item));
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::information(this, tr("Prompt"), tr("Consistent configuration"));
|
||||
ui->pbtn_enterTest->setEnabled(true);
|
||||
}
|
||||
|
||||
delete lp;
|
||||
|
||||
updateTargetCfg();
|
||||
updateCurDeviceCfg();
|
||||
}
|
||||
|
||||
void Dialog_InputSerialNum::on_pbtn_enterTest_clicked()
|
||||
{
|
||||
if (!m_valid)
|
||||
{
|
||||
|
@ -165,28 +405,36 @@ void Dialog_InputSerialNum::on_pbtn_ok_clicked()
|
|||
return;
|
||||
}
|
||||
|
||||
setSpeedAndSleep(true);
|
||||
accept();
|
||||
}
|
||||
|
||||
void Dialog_InputSerialNum::on_pbtn_cancel_clicked()
|
||||
void Dialog_InputSerialNum::on_pbtn_setConfig_clicked()
|
||||
{
|
||||
reject();
|
||||
}
|
||||
setSpeedMode();
|
||||
setSleepTime();
|
||||
setVidPid();
|
||||
|
||||
void Dialog_InputSerialNum::on_pbtn_setSn_clicked()
|
||||
{
|
||||
QString sn = ui->lineEdit_sn->text();
|
||||
std::string serialNum = sn.toStdString();
|
||||
if(SANE_STATUS_GOOD != sane_io_control(m_handle, IO_CTRL_CODE_SET_SERIAL, &serialNum[0], nullptr))
|
||||
{
|
||||
QMessageBox::information(this, tr("tips"), tr("set sn failed"));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->lineEdit_sn->setText(m_mainWnd->getDevSn(m_handle));
|
||||
QMessageBox::information(this, tr("tips"), tr("set sn succeed"));
|
||||
}
|
||||
AnalysisJson analysisJson(m_profileName);
|
||||
AnalysisJson::json_global jsonGlobal = analysisJson.GetGlobal();
|
||||
|
||||
setSpeedAndSleep(false);
|
||||
int speedMode = jsonGlobal.speed_mode;
|
||||
int sleepTime = jsonGlobal.sleep_time;
|
||||
int vid_to = jsonGlobal.vid_to;
|
||||
int pid_to = jsonGlobal.pid_to;
|
||||
|
||||
char buf[10];
|
||||
sprintf(buf, "%x", vid_to);
|
||||
char buf2[10];
|
||||
sprintf(buf2, "%x", pid_to);
|
||||
|
||||
QString content;
|
||||
content.append(tr("Speep mode: %1PPM").arg(QString::number(speedMode)) + " ");
|
||||
content.append((sleepTime > 0 ? tr("Sleep time: %1minute").arg(QString::number(sleepTime)) : tr("Sleep time: Not sleeping")) + " ");
|
||||
content.append(tr("Vid: %1 Pid: %2").arg(QString::fromStdString(buf)).arg(QString::fromStdString(buf2)));
|
||||
|
||||
writeTestLog(tr("Tester: %1, Test item: %2").arg(m_accountName).arg(tr("Set configuration to device ") +
|
||||
tr("Test content: ") + content));
|
||||
|
||||
updateTargetCfg();
|
||||
updateCurDeviceCfg();
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "sane/sane_ex.h"
|
||||
//#include "HGPdtToolDb.h"
|
||||
#include "hgscanner.h"
|
||||
#include "mainwindow.h"
|
||||
|
||||
namespace Ui {
|
||||
class Dialog_InputSerialNum;
|
||||
|
@ -15,14 +16,29 @@ class Dialog_InputSerialNum : public QDialog
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Dialog_InputSerialNum(class MainWindow *mainWnd, const QString &devName, const QString &profileName,
|
||||
SANE_Handle handle, const QString &serialNum, const QString &devType);
|
||||
explicit Dialog_InputSerialNum(class MainWindow *mainWnd, Dialog_logIn::LogInType logInType, const QString &devName, const QString &profileName,
|
||||
const QString &accountName, SANE_Handle handle, const QString &serialNum, const QString &devType);
|
||||
~Dialog_InputSerialNum();
|
||||
|
||||
QString GetSn();
|
||||
QString GetDevType();
|
||||
void Invalid(const QString &devName);
|
||||
void setSpeedAndSleep(bool updateSleep);
|
||||
|
||||
void setSpeedMode();
|
||||
void setSleepTime();
|
||||
void setVidPid();
|
||||
void rebootDevice();
|
||||
|
||||
int getSpeedMode();
|
||||
int getSleepTime();
|
||||
int getDevVid();
|
||||
int getDevPid();
|
||||
|
||||
private:
|
||||
void updateTargetCfg();
|
||||
void updateCurDeviceCfg();
|
||||
QString getLogPath();
|
||||
void writeTestLog(QString logContent);
|
||||
|
||||
signals:
|
||||
void testResult();
|
||||
|
@ -42,24 +58,31 @@ private:
|
|||
};
|
||||
|
||||
private slots:
|
||||
void on_pbtn_ok_clicked();
|
||||
|
||||
void on_pbtn_cancel_clicked();
|
||||
|
||||
void on_pbtn_setSn_clicked();
|
||||
|
||||
void on_pbtn_checkConfig_clicked();
|
||||
|
||||
void on_pbtn_enterTest_clicked();
|
||||
|
||||
void on_pbtn_setConfig_clicked();
|
||||
|
||||
private:
|
||||
Ui::Dialog_InputSerialNum *ui;
|
||||
|
||||
class MainWindow *m_mainWnd;
|
||||
Dialog_logIn::LogInType m_logInType;
|
||||
SANE_Handle m_handle;
|
||||
bool m_valid;
|
||||
QString m_profileName;
|
||||
QString m_accountName;
|
||||
QString m_serialNum;
|
||||
QString m_devType;
|
||||
QString m_devName;
|
||||
//HGPdtToolDbUserMgr m_pdtToolDbuserMgr;
|
||||
hgscanner *m_hg;
|
||||
|
||||
int m_curIndex;
|
||||
};
|
||||
|
||||
#endif // DIALOG_INPUTSERIALNUM_H
|
||||
|
|
|
@ -6,130 +6,250 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>572</width>
|
||||
<height>212</height>
|
||||
<width>614</width>
|
||||
<height>384</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<widget class="QPushButton" name="pbtn_ok">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>210</x>
|
||||
<y>150</y>
|
||||
<width>75</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>OK</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pbtn_cancel">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>330</x>
|
||||
<y>150</y>
|
||||
<width>75</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Cancel</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QComboBox" name="cbox_devType">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>80</y>
|
||||
<width>191</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>130</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G100</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_scanner">
|
||||
<property name="text">
|
||||
<string>Scanner:</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>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G200</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit_target"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit_curConfig"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G300</string>
|
||||
</property>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>25</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>G400</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<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>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_sn">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>71</width>
|
||||
<height>21</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>serialNum:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_sn">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>241</width>
|
||||
<height>31</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pbtn_setSn">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>131</width>
|
||||
<height>31</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Set Sn</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>43</width>
|
||||
<height>23</height>
|
||||
</size>
|
||||
</property>
|
||||
<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>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_type">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>80</y>
|
||||
<width>91</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>devType :</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_sn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>100</x>
|
||||
<y>30</y>
|
||||
<width>71</width>
|
||||
<height>21</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>serialNum:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="lineEdit_sn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>190</x>
|
||||
<y>30</y>
|
||||
<width>191</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>130</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QPushButton" name="pbtn_setSn">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>390</x>
|
||||
<y>30</y>
|
||||
<width>131</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Set Sn</string>
|
||||
</property>
|
||||
</widget>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>7</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<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_setConfig">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>190</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>190</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Set configuration</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pbtn_checkConfig">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>190</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>190</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Check configuration</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pbtn_enterTest">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>190</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>190</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Enter Test</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<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/>
|
||||
|
|
|
@ -11,26 +11,15 @@
|
|||
#include <QLineEdit>
|
||||
#include <QInputDialog>
|
||||
|
||||
Form_BurnMode::Form_BurnMode(class MainWindow *mainwnd, const QString &profileName, const QString &accountName, QWidget *parent) :
|
||||
Form_BurnMode::Form_BurnMode(class MainWindow *mainwnd, QWidget *parent) :
|
||||
QWidget(parent),
|
||||
m_curIndex(0),
|
||||
m_profileName(profileName),
|
||||
m_accountName(accountName),
|
||||
m_mainwnd(mainwnd),
|
||||
m_hg(nullptr),
|
||||
ui(new Ui::Form_BurnMode)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->textEdit_target->setReadOnly(true);
|
||||
ui->textEdit_curConfig->setReadOnly(true);
|
||||
|
||||
ui->pbtn_enterBurnMode->setEnabled(true);
|
||||
ui->pbtn_confirmFinishBurn->setEnabled(false);
|
||||
ui->pbtn_checkConfig->setEnabled(false);
|
||||
ui->pbtn_complete->setEnabled(false);
|
||||
ui->pbtn_abnormal->setEnabled(false);
|
||||
|
||||
connect(this, SIGNAL(testResult(bool)), this, SLOT(on_testResult(bool)), Qt::QueuedConnection);
|
||||
|
||||
initTableWidget();
|
||||
|
@ -59,8 +48,6 @@ void Form_BurnMode::addDevice(DeviceManager *devManager)
|
|||
item->setData(Qt::UserRole, var);
|
||||
|
||||
updatetablewidget();
|
||||
updateTargetCfg();
|
||||
updateCurDeviceCfg();
|
||||
|
||||
m_curIndex++;
|
||||
}
|
||||
|
@ -85,8 +72,6 @@ void Form_BurnMode::deleteDevice(QString devName)
|
|||
}
|
||||
}
|
||||
updatetablewidget();
|
||||
updateTargetCfg();
|
||||
updateCurDeviceCfg();
|
||||
}
|
||||
|
||||
DeviceManager *Form_BurnMode::getDevManager()
|
||||
|
@ -151,118 +136,27 @@ void Form_BurnMode:: updatetablewidget()
|
|||
if (item != nullptr)
|
||||
item->setCheckState(Qt::Checked);
|
||||
}
|
||||
//ui->cbox_selectAll->setChecked(true);
|
||||
ui->cbox_selectAll->setChecked(true);
|
||||
}
|
||||
|
||||
void Form_BurnMode::updateTargetCfg()
|
||||
void Form_BurnMode::on_cbox_selectAll_stateChanged(int arg1)
|
||||
{
|
||||
ui->textEdit_target->clear();
|
||||
(void)arg1;
|
||||
bool check = ui->cbox_selectAll->isChecked();
|
||||
|
||||
AnalysisJson analysisJson(m_profileName);
|
||||
AnalysisJson::json_global jsonGlobal = analysisJson.GetGlobal();
|
||||
|
||||
int speedMode = jsonGlobal.speed_mode;
|
||||
int sleepTime = jsonGlobal.sleep_time;
|
||||
int vid_to = jsonGlobal.vid_to;
|
||||
int pid_to = jsonGlobal.pid_to;
|
||||
|
||||
char buf[10];
|
||||
sprintf(buf, "%x", vid_to);
|
||||
|
||||
char buf2[10];
|
||||
sprintf(buf2, "%x", pid_to);
|
||||
|
||||
QString content;
|
||||
content += tr("Target Configration:\n\t");
|
||||
content += tr("Speep mode: %1PPM\n\t").arg(QString::number(speedMode));
|
||||
content.append(sleepTime > 0 ? tr("Sleep time: %1minute\n\t").arg(QString::number(sleepTime)) : tr("Sleep time: Not sleeping\n\t"));
|
||||
content += tr("Vid: %1 Pid: %2\n\t").arg(QString::fromStdString(buf)).arg(QString::fromStdString(buf2));
|
||||
|
||||
ui->textEdit_target->setText(content);
|
||||
}
|
||||
|
||||
void Form_BurnMode::updateCurDeviceCfg()
|
||||
{
|
||||
ui->textEdit_curConfig->clear();
|
||||
|
||||
DeviceManager *devManager = getDevManager();
|
||||
if (devManager == nullptr)
|
||||
return;
|
||||
|
||||
int speedMode = devManager->getSpeedMode();
|
||||
int sleepTime = devManager->getSleepTime();
|
||||
int vid_to = devManager->getDevVid();
|
||||
int pid_to = devManager->getDevPid();
|
||||
|
||||
char buf[10];
|
||||
sprintf(buf, "%x", vid_to);
|
||||
|
||||
char buf2[10];
|
||||
sprintf(buf2, "%x", pid_to);
|
||||
|
||||
QString content;
|
||||
content.append(tr("Current Configration of device:") + "\n\t");
|
||||
content.append(tr("Speep mode: %1PPM").arg(QString::number(speedMode)) + "\n\t");
|
||||
content.append(sleepTime > 0 ? tr("Sleep time: %1minute").arg(QString::number(sleepTime)) : tr("Sleep time: Not sleeping") + "\n\t");
|
||||
content.append(tr("Vid: %1 Pid: %2").arg(QString::fromStdString(buf)).arg(QString::fromStdString(buf2)) + "\n\t");
|
||||
|
||||
ui->textEdit_curConfig->setText(content);
|
||||
}
|
||||
|
||||
QString Form_BurnMode::getLogPath()
|
||||
{
|
||||
HGChar cachePath[512];
|
||||
HGBase_GetDocumentsPath(cachePath, 512);
|
||||
HGChar procName[512];
|
||||
HGBase_GetProcessName(procName, 512);
|
||||
strcat(cachePath, procName);
|
||||
strcat(cachePath, "/Test_Log/");
|
||||
|
||||
return getStdFileName(cachePath);
|
||||
}
|
||||
|
||||
void Form_BurnMode::writeTestLog(QString logContent)
|
||||
{
|
||||
QString logPath = getLogPath();
|
||||
HGBase_CreateDir(getStdString(logPath).c_str());
|
||||
|
||||
DeviceManager *devManager = getDevManager();
|
||||
QString serialNum = devManager->getSerialNum();
|
||||
QString fileName = logPath + serialNum + ".log";
|
||||
QFile file(fileName);
|
||||
if(!file.open(QIODevice::ReadWrite | QIODevice::Append))
|
||||
for(int i = 0; i < ui->tableWidget->rowCount(); i++)
|
||||
{
|
||||
return;
|
||||
QTableWidgetItem *item = ui->tableWidget->item(i, 1);
|
||||
if (item != nullptr)
|
||||
{
|
||||
if (check)
|
||||
item->setCheckState(Qt::Checked);
|
||||
else
|
||||
item->setCheckState(Qt::Unchecked);
|
||||
}
|
||||
}
|
||||
|
||||
QDateTime dateTime= QDateTime::currentDateTime();
|
||||
QString curTime = dateTime .toString("yyyy-MM-dd hh:mm:ss");
|
||||
QString content = "[" + curTime + "] ";
|
||||
content += logContent;
|
||||
|
||||
QTextStream txtOutput(&file);
|
||||
txtOutput << content << endl;
|
||||
file.close();
|
||||
}
|
||||
|
||||
//void Form_BurnMode::on_cbox_selectAll_stateChanged(int arg1)
|
||||
//{
|
||||
// (void)arg1;
|
||||
// bool check = ui->cbox_selectAll->isChecked();
|
||||
|
||||
// for(int i = 0; i < ui->tableWidget->rowCount(); i++)
|
||||
// {
|
||||
// QTableWidgetItem *item = ui->tableWidget->item(i, 1);
|
||||
// if (item != nullptr)
|
||||
// {
|
||||
// if (check)
|
||||
// item->setCheckState(Qt::Checked);
|
||||
// else
|
||||
// item->setCheckState(Qt::Unchecked);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
void Form_BurnMode::on_pbtn_enterBurnMode_clicked()
|
||||
{
|
||||
int select = 0;
|
||||
|
@ -287,13 +181,6 @@ void Form_BurnMode::on_pbtn_enterBurnMode_clicked()
|
|||
{
|
||||
DeviceManager *devManager = (DeviceManager*)item->data(Qt::UserRole).value<void*>();
|
||||
devManager->setBurnMode();
|
||||
|
||||
ui->pbtn_confirmFinishBurn->setEnabled(true);
|
||||
ui->pbtn_checkConfig->setEnabled(false);
|
||||
ui->pbtn_complete->setEnabled(false);
|
||||
ui->pbtn_abnormal->setEnabled(true);
|
||||
|
||||
m_mainwnd->setLogOutStatus(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -514,169 +401,3 @@ void Form_BurnMode::on_tableWidget_itemDoubleClicked(QTableWidgetItem *item)
|
|||
|
||||
// updatetablewidget();
|
||||
//}
|
||||
|
||||
void Form_BurnMode::on_pbtn_confirmFinishBurn_clicked()
|
||||
{
|
||||
int select = 0;
|
||||
for(int i = 0; i < ui->tableWidget->rowCount(); i++)
|
||||
{
|
||||
QTableWidgetItem *item = ui->tableWidget->item(i, 1);
|
||||
if (item != nullptr && Qt::Checked == item->checkState())
|
||||
{
|
||||
select++;
|
||||
}
|
||||
}
|
||||
if (select == 0)
|
||||
{
|
||||
QMessageBox::information(this, tr("tips"), tr("Please check a devices at least"));
|
||||
return;
|
||||
}
|
||||
|
||||
DeviceManager *devManager = getDevManager();
|
||||
if (devManager == nullptr)
|
||||
return;
|
||||
|
||||
devManager->setSpeedMode();
|
||||
devManager->setSleepTime();
|
||||
devManager->setVidPid();
|
||||
devManager->rebootDevice();
|
||||
|
||||
AnalysisJson analysisJson(m_profileName);
|
||||
AnalysisJson::json_global jsonGlobal = analysisJson.GetGlobal();
|
||||
int speedMode_to = jsonGlobal.speed_mode;
|
||||
int sleepTime_to = jsonGlobal.sleep_time;
|
||||
int vid_to = jsonGlobal.vid_to;
|
||||
int pid_to = jsonGlobal.pid_to;
|
||||
|
||||
char buf[10];
|
||||
sprintf(buf, "%x", vid_to);
|
||||
|
||||
char buf2[10];
|
||||
sprintf(buf2, "%x", pid_to);
|
||||
|
||||
QString content;
|
||||
content.append(tr("Complete burning and configure device parameters: "));
|
||||
content.append(tr("Speep mode: %1PPM").arg(QString::number(speedMode_to)) + " ");
|
||||
content.append(sleepTime_to > 0 ? tr("Sleep time: %1minute").arg(QString::number(sleepTime_to)) : tr("Sleep time: Not sleeping") + " ");
|
||||
content.append(tr("Vid: %1 Pid: %2").arg(QString::fromStdString(buf)).arg(QString::fromStdString(buf2)) + " ");
|
||||
writeTestLog(tr("Tester: %1, Test item: Burn, Test contents: %2").arg(m_accountName).arg(content));
|
||||
|
||||
ui->pbtn_checkConfig->setEnabled(true);
|
||||
}
|
||||
|
||||
void Form_BurnMode::on_pbtn_checkConfig_clicked()
|
||||
{
|
||||
int select = 0;
|
||||
for(int i = 0; i < ui->tableWidget->rowCount(); i++)
|
||||
{
|
||||
QTableWidgetItem *item = ui->tableWidget->item(i, 1);
|
||||
if (item != nullptr && Qt::Checked == item->checkState())
|
||||
{
|
||||
select++;
|
||||
}
|
||||
}
|
||||
if (select == 0)
|
||||
{
|
||||
QMessageBox::information(this, tr("tips"), tr("Please check a devices at least"));
|
||||
return;
|
||||
}
|
||||
|
||||
AnalysisJson analysisJson(m_profileName);
|
||||
AnalysisJson::json_global jsonGlobal = analysisJson.GetGlobal();
|
||||
|
||||
int speedMode_to = jsonGlobal.speed_mode;
|
||||
int sleepTime_to = jsonGlobal.sleep_time;
|
||||
int vid_to = jsonGlobal.vid_to;
|
||||
int pid_to = jsonGlobal.pid_to;
|
||||
|
||||
DeviceManager *devManager = getDevManager();
|
||||
if (devManager == nullptr)
|
||||
return;
|
||||
|
||||
int speedMode = devManager->getSpeedMode();
|
||||
int sleepTime = devManager->getSleepTime();
|
||||
int vid = devManager->getDevVid();
|
||||
int pid = devManager->getDevPid();
|
||||
|
||||
QString item;
|
||||
bool right = true;
|
||||
LPWRITECFG lp = new WRITECFG;
|
||||
if (speedMode_to != speedMode)
|
||||
{
|
||||
item.append(tr("Speed mode"));
|
||||
item.append(" ");
|
||||
right = false;
|
||||
devManager->setSpeedMode();
|
||||
}
|
||||
|
||||
if (sleepTime_to != sleepTime)
|
||||
{
|
||||
item.append(tr("Sleep time"));
|
||||
item.append(" ");
|
||||
right = false;
|
||||
devManager->setSleepTime();
|
||||
}
|
||||
|
||||
if (vid != vid_to || pid != pid_to)
|
||||
{
|
||||
item.append(tr("Vid and Pid"));
|
||||
item.append(" ");
|
||||
right = false;
|
||||
devManager->setVidPid();
|
||||
}
|
||||
|
||||
if (!right)
|
||||
{
|
||||
QMessageBox::information(this, tr("Prompt"), tr("Inconsistent configuration %1detected, reconfigured, please check again").arg(item));
|
||||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::information(this, tr("Prompt"), tr("Consistent configuration"));
|
||||
|
||||
ui->pbtn_complete->setEnabled(true);
|
||||
}
|
||||
|
||||
delete lp;
|
||||
|
||||
updateTargetCfg();
|
||||
updateCurDeviceCfg();
|
||||
}
|
||||
|
||||
void Form_BurnMode::on_pbtn_complete_clicked()
|
||||
{
|
||||
writeTestLog(tr("Tester: %1, Test item: Burn, Test completed").arg(m_accountName));
|
||||
ui->pbtn_enterBurnMode->setEnabled(true);
|
||||
ui->pbtn_confirmFinishBurn->setEnabled(false);
|
||||
ui->pbtn_checkConfig->setEnabled(false);
|
||||
ui->pbtn_complete->setEnabled(false);
|
||||
|
||||
m_mainwnd->setLogOutStatus(true);
|
||||
}
|
||||
|
||||
void Form_BurnMode::on_pbtn_abnormal_clicked()
|
||||
{
|
||||
int select = 0;
|
||||
for(int i = 0; i < ui->tableWidget->rowCount(); i++)
|
||||
{
|
||||
QTableWidgetItem *item = ui->tableWidget->item(i, 1);
|
||||
if (item != nullptr && Qt::Checked == item->checkState())
|
||||
{
|
||||
select++;
|
||||
}
|
||||
}
|
||||
if (select == 0)
|
||||
{
|
||||
QMessageBox::information(this, tr("tips"), tr("Please check a devices at least"));
|
||||
return;
|
||||
}
|
||||
|
||||
Dialog_ExcepDesc dlg(this);
|
||||
if (dlg.exec())
|
||||
{
|
||||
QString str = dlg.getExcepDesc();
|
||||
writeTestLog(tr("Tester: %1, Test item: Burn, Test result: Failed! Reason: %2")
|
||||
.arg(m_accountName).arg(str));
|
||||
}
|
||||
|
||||
m_mainwnd->setLogOutStatus(true);
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ class Form_BurnMode : public QWidget
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit Form_BurnMode(class MainWindow *mainwnd, const QString &profileName, const QString &accountName, QWidget *parent = nullptr);
|
||||
explicit Form_BurnMode(class MainWindow *mainwnd, QWidget *parent = nullptr);
|
||||
~Form_BurnMode();
|
||||
|
||||
void addDevice(DeviceManager *devManager);
|
||||
|
@ -86,7 +86,7 @@ private slots:
|
|||
void on_testResult(bool setStatus);
|
||||
|
||||
private slots:
|
||||
//void on_cbox_selectAll_stateChanged(int arg1);
|
||||
void on_cbox_selectAll_stateChanged(int arg1);
|
||||
|
||||
void on_pbtn_enterBurnMode_clicked();
|
||||
|
||||
|
@ -94,21 +94,9 @@ private slots:
|
|||
|
||||
//void on_pbtn_close_clicked();
|
||||
|
||||
void on_pbtn_confirmFinishBurn_clicked();
|
||||
|
||||
void on_pbtn_checkConfig_clicked();
|
||||
|
||||
void on_pbtn_complete_clicked();
|
||||
|
||||
void on_pbtn_abnormal_clicked();
|
||||
|
||||
private:
|
||||
void initTableWidget();
|
||||
void updatetablewidget();
|
||||
void updateTargetCfg();
|
||||
void updateCurDeviceCfg();
|
||||
QString getLogPath();
|
||||
void writeTestLog(QString logContent);
|
||||
|
||||
private:
|
||||
Ui::Form_BurnMode *ui;
|
||||
|
@ -116,8 +104,6 @@ private:
|
|||
hgscanner *m_hg;
|
||||
|
||||
int m_curIndex;
|
||||
QString m_profileName;
|
||||
QString m_accountName;
|
||||
};
|
||||
|
||||
#endif // FORM_BURNMODE_H
|
||||
|
|
|
@ -6,20 +6,20 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>735</width>
|
||||
<height>718</height>
|
||||
<width>720</width>
|
||||
<height>436</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTableWidget" name="tableWidget">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>180</height>
|
||||
<height>9999999</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
|
@ -27,285 +27,36 @@
|
|||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit_target"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
<widget class="QCheckBox" name="cbox_selectAll">
|
||||
<property name="text">
|
||||
<string>SelectAll</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTextEdit" name="textEdit_curConfig"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>33</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<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_enterBurnMode">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>190</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>190</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Entering burning mode</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>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<widget class="QPushButton" name="pbtn_enterBurnMode">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>13</height>
|
||||
<width>190</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<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="QPushButton" name="pbtn_confirmFinishBurn">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>190</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>190</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Confirm completion of burning</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>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>13</height>
|
||||
<width>190</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<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_checkConfig">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>190</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>190</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Check configuration</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_6">
|
||||
<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>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>13</height>
|
||||
</size>
|
||||
<property name="text">
|
||||
<string>Entering burning mode</string>
|
||||
</property>
|
||||
</spacer>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<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_complete">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>190</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>190</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Complete</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_8">
|
||||
<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>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_9">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
|
@ -317,25 +68,6 @@
|
|||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pbtn_abnormal">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>141</width>
|
||||
<height>41</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>141</width>
|
||||
<height>41</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Abnormal exit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -47,7 +47,6 @@ Form_mainInterface::Form_mainInterface(class MainWindow *mainwnd, Dialog_logIn::
|
|||
ui->pbtn_rightRotate->setVisible(false);
|
||||
ui->pbtn_prePage->setVisible(false);
|
||||
ui->pbtn_nextPage->setVisible(false);
|
||||
ui->pbtn_stop->setVisible(false);
|
||||
|
||||
QFont ft;
|
||||
ft.setPointSize(15);
|
||||
|
@ -567,8 +566,8 @@ QString Form_mainInterface::getSpeedMode()
|
|||
|
||||
const wchar_t G100[6] = { 70,80,90,110 };
|
||||
const wchar_t G200[6] = { 100,110,120,130 };
|
||||
const wchar_t G300[6] = { 40,50,60,70 };
|
||||
const wchar_t G400[6] = { 40,50,60,70,80 };
|
||||
const wchar_t G300[6] = { 40,50,60,70,80,90 };
|
||||
const wchar_t G400[6] = { 40,50,60,70,80,90 };
|
||||
|
||||
int speed = 0;
|
||||
|
||||
|
|
|
@ -55,11 +55,9 @@ MainWindow::MainWindow(Dialog_logIn::LogInType loginType, const QString &profile
|
|||
if (m_loginType == Dialog_logIn::LogInType_Burn)
|
||||
{
|
||||
setWindowTitle(tr("production tool-burn station"));
|
||||
setWindowFlags(Qt::SubWindow | Qt::Popup);
|
||||
|
||||
// ui->act_newDevice->setVisible(false);
|
||||
|
||||
m_formBurnMode = new Form_BurnMode(this, m_profileName, m_accountName, this);
|
||||
m_formBurnMode = new Form_BurnMode(this, this);
|
||||
|
||||
QVBoxLayout *vLayout = new QVBoxLayout;
|
||||
vLayout->addWidget(m_formBurnMode);
|
||||
|
@ -543,7 +541,7 @@ void MainWindow::on_update_userStatus()
|
|||
|
||||
void MainWindow::on_act_newDevice_triggered()
|
||||
{
|
||||
m_inputSnDlg = new Dialog_InputSerialNum(this, "", m_profileName, nullptr, "", "");
|
||||
m_inputSnDlg = new Dialog_InputSerialNum(this, m_loginType, "", m_profileName, m_accountName, nullptr, "", "");
|
||||
if (m_inputSnDlg->exec())
|
||||
{
|
||||
//HGPdtToolDbDevice pdtToolDbDevice = nullptr;
|
||||
|
@ -671,7 +669,8 @@ void MainWindow::on_act_refreshDevice_triggered()
|
|||
sane_open(name[i].c_str(), &devHandle);
|
||||
if (nullptr != devHandle)
|
||||
{
|
||||
m_inputSnDlg = new Dialog_InputSerialNum(this, name[i].c_str(), m_profileName, devHandle, getDevSn(devHandle), getDevType(devHandle));
|
||||
m_inputSnDlg = new Dialog_InputSerialNum(this, m_loginType, name[i].c_str(), m_profileName, m_accountName, devHandle, getDevSn(devHandle), getDevType(devHandle));
|
||||
|
||||
if (m_inputSnDlg->exec())
|
||||
{
|
||||
//HGPdtToolDbDevice pdtToolDbDevice = nullptr;
|
||||
|
|
Loading…
Reference in New Issue