添加启动提示自动关闭、重启客户端弹出提示功能

main
Chu Jun 1 year ago
parent 85d59b3ee9
commit 805cdc855c

@ -26,7 +26,7 @@ Global
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0AF1A30E-A12C-4014-ACD5-65A1E6D54D46}
Qt5Version = 5.15.2_msvc2019_64 Qt5Version = 5.15.2_msvc2019_64
SolutionGuid = {0AF1A30E-A12C-4014-ACD5-65A1E6D54D46}
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

@ -2,11 +2,11 @@
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup /> <PropertyGroup />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<QTDIR>D:\Qt\5.15.2\msvc2019_64</QTDIR> <QTDIR>C:\Qt\5.15.2\msvc2019_64</QTDIR>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3bD:\Qt\5.15.2\msvc2019_64\bin%3b$(PATH)</LocalDebuggerEnvironment> <LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3bD:\Qt\5.15.2\msvc2019_64\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<QTDIR>D:\Qt\5.15.2\msvc2019_64</QTDIR> <QTDIR>C:\Qt\5.15.2\msvc2019_64</QTDIR>
<LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3bD:\Qt\5.15.2\msvc2019_64\bin%3b$(PATH)</LocalDebuggerEnvironment> <LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3bD:\Qt\5.15.2\msvc2019_64\bin%3b$(PATH)</LocalDebuggerEnvironment>
</PropertyGroup> </PropertyGroup>
</Project> </Project>

@ -247,10 +247,6 @@ Cigarette::Cigarette(QWidget *parent)
rThread->init(g_sys_conf.MonitorIP ,g_sys_conf.MonitorPort); rThread->init(g_sys_conf.MonitorIP ,g_sys_conf.MonitorPort);
connect(rThread, &threadReceive::sendMsgToCigratte, this, &Cigarette::recMsgFromUdp); connect(rThread, &threadReceive::sendMsgToCigratte, this, &Cigarette::recMsgFromUdp);
rThread->start_work(); rThread->start_work();
sThread.sendData("ReStartOk", g_sys_conf.FeedbackPort);
sThread.sendData("DebugDis", g_sys_conf.FeedbackPort);
sThread.sendData("LockOk", g_sys_conf.FeedbackPort);
#endif #endif
#ifdef __ExportData #ifdef __ExportData
@ -289,11 +285,6 @@ Cigarette::Cigarette(QWidget *parent)
EnumerateCameras((SingleCamInfoStruct*)&SingleCamInfo,true,g_sys_conf); EnumerateCameras((SingleCamInfoStruct*)&SingleCamInfo,true,g_sys_conf);
/*if (!license_pass) 授权检查失败
{
QMessageBox::information(NULL, QStringLiteral("授权检查失败"), QStringLiteral("授权检查失败,请联系系统供应商!"), QMessageBox::Ok);
exit(0);
}*/
// 剔除值清0 // 剔除值清0
int ret = m_PLCDevice->write_bit_2_plc(g_modbus_conf.shift, 1);//给PLC发送换班消息 int ret = m_PLCDevice->write_bit_2_plc(g_modbus_conf.shift, 1);//给PLC发送换班消息
@ -388,7 +379,11 @@ Cigarette::Cigarette(QWidget *parent)
} }
} }
} }
#ifdef __UDPSend
sThread.sendData("ReStartOk", g_sys_conf.FeedbackPort);
sThread.sendData("DebugDis", g_sys_conf.FeedbackPort);
sThread.sendData("LockOk", g_sys_conf.FeedbackPort);
#endif
DisableDebugMode(); DisableDebugMode();
m_pTimer = new QTimer(this); m_pTimer = new QTimer(this);

@ -21,7 +21,7 @@
#endif #endif
//#define identify_Hik_YSXID//识别海康相机YSXID //#define identify_Hik_YSXID//识别海康相机YSXID
//#define __ExportData // 输出检测数据到XML文档 //#define __ExportData // 输出检测数据到XML文档
#define DRAW_RECT // 鼠标画框功能 //#define DRAW_RECT // 鼠标画框功能
#define Queue_Size 15 #define Queue_Size 15
#define Unit_Queue_Size Queue_Size*3 #define Unit_Queue_Size Queue_Size*3

@ -48,56 +48,56 @@ void output_statistic::recMsgFromDialogSetup()
} }
#else #else
QFile file("../conf/camera0_statistic.txt"); QFile file("D:/conf/camera0_statistic.txt");
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) if (file.open(QIODevice::ReadOnly | QIODevice::Text))
{ {
QTextStream in(&file); QTextStream in(&file);
ui.textBrowser_1->setText(in.readAll()); ui.textBrowser_1->setText(in.readAll());
} }
file.close(); file.close();
file.setFileName("../conf/camera1_statistic.txt"); file.setFileName("D:/conf/camera1_statistic.txt");
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) if (file.open(QIODevice::ReadOnly | QIODevice::Text))
{ {
QTextStream in(&file); QTextStream in(&file);
ui.textBrowser_2->setText(in.readAll()); ui.textBrowser_2->setText(in.readAll());
} }
file.close(); file.close();
file.setFileName("../conf/camera2_statistic.txt"); file.setFileName("D:/conf/camera2_statistic.txt");
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) if (file.open(QIODevice::ReadOnly | QIODevice::Text))
{ {
QTextStream in(&file); QTextStream in(&file);
ui.textBrowser_3->setText(in.readAll()); ui.textBrowser_3->setText(in.readAll());
} }
file.close(); file.close();
file.setFileName("../conf/camera3_statistic.txt"); file.setFileName("D:/conf/camera3_statistic.txt");
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) if (file.open(QIODevice::ReadOnly | QIODevice::Text))
{ {
QTextStream in(&file); QTextStream in(&file);
ui.textBrowser_4->setText(in.readAll()); ui.textBrowser_4->setText(in.readAll());
} }
file.close(); file.close();
file.setFileName("../conf/camera4_statistic.txt"); file.setFileName("D:/conf/camera4_statistic.txt");
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) if (file.open(QIODevice::ReadOnly | QIODevice::Text))
{ {
QTextStream in(&file); QTextStream in(&file);
ui.textBrowser_5->setText(in.readAll()); ui.textBrowser_5->setText(in.readAll());
} }
file.close(); file.close();
file.setFileName("../conf/camera5_statistic.txt"); file.setFileName("D:/conf/camera5_statistic.txt");
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) if (file.open(QIODevice::ReadOnly | QIODevice::Text))
{ {
QTextStream in(&file); QTextStream in(&file);
ui.textBrowser_6->setText(in.readAll()); ui.textBrowser_6->setText(in.readAll());
} }
file.close(); file.close();
file.setFileName("../conf/camera6_statistic.txt"); file.setFileName("D:/conf/camera6_statistic.txt");
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) if (file.open(QIODevice::ReadOnly | QIODevice::Text))
{ {
QTextStream in(&file); QTextStream in(&file);
ui.textBrowser_7->setText(in.readAll()); ui.textBrowser_7->setText(in.readAll());
} }
file.close(); file.close();
file.setFileName("../conf/camera7_statistic.txt"); file.setFileName("D:/conf/camera7_statistic.txt");
if (file.open(QIODevice::ReadOnly | QIODevice::Text)) if (file.open(QIODevice::ReadOnly | QIODevice::Text))
{ {
QTextStream in(&file); QTextStream in(&file);

@ -82,7 +82,8 @@ void threadSend::sendImage(_UDPSendInfo *UDPSendInfo,int port)
cv::Mat mat = UDPSendInfo->image; cv::Mat mat = UDPSendInfo->image;
char cnt = UDPSendInfo->cnt; char cnt = UDPSendInfo->cnt;
cv::resize(mat, mat, cv::Size(image_width, image_heigh)); //cv::resize(mat, mat, cv::Size(image_width, image_heigh));
cv::resize(mat, mat, cv::Size(image_width, image_heigh),4,4,2);
int length = image_width * image_heigh * 3; int length = image_width * image_heigh * 3;
char* data = (char*)malloc(sizeof(char) * length + 1); char* data = (char*)malloc(sizeof(char) * length + 1);

Loading…
Cancel
Save