full screen ui
This commit is contained in:
parent
a212ca4d4d
commit
fa00a0b3f0
34
camera.cpp
34
camera.cpp
@ -22,7 +22,7 @@ static MIL_ID MilImage0;
|
||||
static MIL_ID MilImage_Color0;
|
||||
static MIL_ID ModifiedBufferId0;
|
||||
static MIL_ID MilGrabBufferList0[20] = {0};
|
||||
static MIL_INT BufSizeX0 = 2048;
|
||||
static MIL_INT BufSizeX0 = 4096;
|
||||
static MIL_INT BufSizeY0 = 512;
|
||||
unsigned char* m_AvsBuffer0 = (unsigned char*)malloc(BufSizeX0 * BufSizeY0 * 3);
|
||||
static int FuncCount0 = 1;
|
||||
@ -32,7 +32,7 @@ static MIL_ID MilImage1;
|
||||
static MIL_ID MilImage_Color1;
|
||||
static MIL_ID ModifiedBufferId1;
|
||||
static MIL_ID MilGrabBufferList1[20] = {0};
|
||||
static MIL_INT BufSizeX1 = 2048;
|
||||
static MIL_INT BufSizeX1 = 4096;
|
||||
static MIL_INT BufSizeY1 = 512;
|
||||
unsigned char* m_AvsBuffer1 = (unsigned char*)malloc(BufSizeX1 * BufSizeY1 * 3);
|
||||
static int FuncCount1 = 1;
|
||||
@ -177,9 +177,9 @@ MIL_INT ProcessingFunction0(MIL_INT HookType, MIL_ID HookId, void *HookDataPtr)
|
||||
|
||||
// 拷贝艳丽色检测图像
|
||||
MbufCopy(ModifiedBufferId0, MilImage_Color0);
|
||||
// MIL_UNIQUE_BUF_ID MimResizedestination = MbufAllocColor(MilSystem, 3, 2048, 512, 8+M_UNSIGNED, M_IMAGE+M_PROC+M_DISP, M_UNIQUE_ID);
|
||||
// MbufClear(MimResizedestination, M_COLOR_BLACK);
|
||||
// MimResize(MilImage_Color0, MimResizedestination, 0.5, 1 , M_DEFAULT);
|
||||
MIL_UNIQUE_BUF_ID MimResizedestination = MbufAllocColor(MilSystem, 3, 1024, 512, 8+M_UNSIGNED, M_IMAGE+M_PROC+M_DISP, M_UNIQUE_ID);
|
||||
MbufClear(MimResizedestination, M_COLOR_BLACK);
|
||||
MimResize(MilImage_Color0, MimResizedestination, 0.5, 1 , M_DEFAULT);
|
||||
|
||||
#if(GlobalDebug && DebugDetectionTime)
|
||||
timer_detection_time.printElapsedTime("CallBack1: High sat detection resize");
|
||||
@ -187,9 +187,9 @@ MIL_INT ProcessingFunction0(MIL_INT HookType, MIL_ID HookId, void *HookDataPtr)
|
||||
#endif
|
||||
|
||||
// 图片镜像翻转
|
||||
MIL_UNIQUE_BUF_ID MimFlipDedtination = MbufClone(MilImage_Color0, M_DEFAULT, M_DEFAULT, M_DEFAULT, M_DEFAULT, M_DEFAULT, M_DEFAULT, M_UNIQUE_ID);
|
||||
MIL_UNIQUE_BUF_ID MimFlipDedtination = MbufClone(MimResizedestination, M_DEFAULT, M_DEFAULT, M_DEFAULT, M_DEFAULT, M_DEFAULT, M_DEFAULT, M_UNIQUE_ID);
|
||||
MbufClear(MimFlipDedtination, M_COLOR_BLACK);
|
||||
MimFlip(MilImage_Color0, MimFlipDedtination, M_FLIP_HORIZONTAL, M_DEFAULT);
|
||||
MimFlip(MimResizedestination, MimFlipDedtination, M_FLIP_HORIZONTAL, M_DEFAULT);
|
||||
cv::Mat img = ImageUtils::mil2Mat(MimFlipDedtination);
|
||||
|
||||
// 将图像推入识别队列
|
||||
@ -214,13 +214,13 @@ MIL_INT ProcessingFunction0(MIL_INT HookType, MIL_ID HookId, void *HookDataPtr)
|
||||
// 使用 std::async 将 high_sat_detect 封装为异步任务
|
||||
auto future = std::async(std::launch::async, [&]() {
|
||||
MIL_ID detection_result_id;
|
||||
high_sat_detect(MilImage_Color0, detection_result_id, params);
|
||||
high_sat_detect(MimFlipDedtination, detection_result_id, params);
|
||||
matrox_mat = ImageUtils::mil2Mat(detection_result_id);
|
||||
MbufFree(detection_result_id);
|
||||
});
|
||||
|
||||
// 等待最多20毫秒
|
||||
if(future.wait_for(std::chrono::milliseconds(30)) == std::future_status::ready)
|
||||
if(future.wait_for(std::chrono::milliseconds(20)) == std::future_status::ready)
|
||||
{
|
||||
#if(GlobalDebug && DebugDetectionTime)
|
||||
timer_detection_time.printElapsedTime("CallBack1: High sat detection finish");
|
||||
@ -263,7 +263,7 @@ MIL_INT ProcessingFunction0(MIL_INT HookType, MIL_ID HookId, void *HookDataPtr)
|
||||
});
|
||||
|
||||
// 等待最多20毫秒
|
||||
if (future_dl.wait_for(std::chrono::milliseconds(30)) == std::future_status::ready && future_dl.get())
|
||||
if (future_dl.wait_for(std::chrono::milliseconds(20)) == std::future_status::ready && future_dl.get())
|
||||
{
|
||||
#if(GlobalDebug && DebugDetectionTime)
|
||||
timer_detection_time.printElapsedTime("CallBack1: DL detection finished within 20ms");
|
||||
@ -352,9 +352,9 @@ MIL_INT ProcessingFunction1(MIL_INT HookType, MIL_ID HookId, void *HookDataPtr)
|
||||
|
||||
//拷贝艳丽色检测图像
|
||||
MbufCopy(ModifiedBufferId1,MilImage_Color1);
|
||||
// MIL_UNIQUE_BUF_ID MimResizedestination = MbufAllocColor(MilSystem, 3, 2048, 512, 8+M_UNSIGNED, M_IMAGE+M_PROC+M_DISP, M_UNIQUE_ID);
|
||||
// MbufClear(MimResizedestination, M_COLOR_BLACK);
|
||||
// MimResize(MilImage_Color1, MimResizedestination, 0.5, 1 , M_DEFAULT);
|
||||
MIL_UNIQUE_BUF_ID MimResizedestination = MbufAllocColor(MilSystem, 3, 1024, 512, 8+M_UNSIGNED, M_IMAGE+M_PROC+M_DISP, M_UNIQUE_ID);
|
||||
MbufClear(MimResizedestination, M_COLOR_BLACK);
|
||||
MimResize(MilImage_Color1, MimResizedestination, 0.5, 1 , M_DEFAULT);
|
||||
|
||||
#if(GlobalDebug && DebugDetectionTime)
|
||||
timer_detection_time.printElapsedTime("CallBack2: High sat detection resize");
|
||||
@ -364,7 +364,7 @@ MIL_INT ProcessingFunction1(MIL_INT HookType, MIL_ID HookId, void *HookDataPtr)
|
||||
if(g_dl_enable[camera_id])
|
||||
{
|
||||
// 将图像推入识别队列
|
||||
cv::Mat img = ImageUtils::mil2Mat(MilImage_Color1);
|
||||
cv::Mat img = ImageUtils::mil2Mat(MimResizedestination);
|
||||
ImageData recognitionData;
|
||||
recognitionData.camera_id = 1;
|
||||
recognitionData.image = img;
|
||||
@ -384,13 +384,13 @@ MIL_INT ProcessingFunction1(MIL_INT HookType, MIL_ID HookId, void *HookDataPtr)
|
||||
// 使用 std::async 将 high_sat_detect 封装为异步任务
|
||||
auto future = std::async(std::launch::async, [&]() {
|
||||
MIL_ID detection_result_id;
|
||||
high_sat_detect(MilImage_Color0, detection_result_id, params);
|
||||
high_sat_detect(MimResizedestination, detection_result_id, params);
|
||||
matrox_mat = ImageUtils::mil2Mat(detection_result_id);
|
||||
MbufFree(detection_result_id);
|
||||
});
|
||||
|
||||
// 等待最多20毫秒
|
||||
if(future.wait_for(std::chrono::milliseconds(30)) == std::future_status::ready)
|
||||
if(future.wait_for(std::chrono::milliseconds(20)) == std::future_status::ready)
|
||||
{
|
||||
#if(GlobalDebug && DebugDetectionTime)
|
||||
timer_detection_time.printElapsedTime("CallBack2: High sat detection finish");
|
||||
@ -437,7 +437,7 @@ MIL_INT ProcessingFunction1(MIL_INT HookType, MIL_ID HookId, void *HookDataPtr)
|
||||
});
|
||||
|
||||
// 等待最多20毫秒
|
||||
if (future_dl.wait_for(std::chrono::milliseconds(30)) == std::future_status::ready && future_dl.get())
|
||||
if (future_dl.wait_for(std::chrono::milliseconds(20)) == std::future_status::ready && future_dl.get())
|
||||
{
|
||||
#if(GlobalDebug && DebugDetectionTime)
|
||||
timer_detection_time.printElapsedTime("CallBack1: DL detection finished within 20ms");
|
||||
|
||||
29
config/1.dcf
29
config/1.dcf
@ -22,12 +22,13 @@
|
||||
/
|
||||
/
|
||||
/
|
||||
/
|
||||
[CAMERA_NAME]
|
||||
no name
|
||||
[CONFIG_FILE]
|
||||
50CF
|
||||
ODYSSEY
|
||||
Wed Dec 25 13:24:12 2024
|
||||
Thu Dec 26 15:46:40 2024
|
||||
[INFO_FILE_REV]
|
||||
0010.0019.0000
|
||||
RADIENT/eVCL/DUAL
|
||||
@ -118,9 +119,9 @@ VDT_NOVERT
|
||||
VDT_HSYNC 0x0
|
||||
VDT_HBPORCH 0x10
|
||||
VDT_HFPORCH 0x0
|
||||
VDT_HACTIVE 0x800
|
||||
VDT_HTOTAL 0x810
|
||||
VDT_HSYNC_FREQ 0x9767
|
||||
VDT_HACTIVE 0x1000
|
||||
VDT_HTOTAL 0x1010
|
||||
VDT_HSYNC_FREQ 0x4bff
|
||||
VDT_VSYNC 0x0
|
||||
VDT_VBPORCH 0x0
|
||||
VDT_VFPORCH 0x0
|
||||
@ -1563,8 +1564,8 @@ DEF_INFO_XSIZE_DIVISOR
|
||||
DEF_INFO_YSIZE_DIVISOR 0x1
|
||||
DEF_ADD_HACTIVE_MULTIPLEX 0x0
|
||||
DEF_ADD_VACTIVE_MULTIPLEX 0x0
|
||||
DEF_HTOTAL_ENTRY 0x810
|
||||
DEF_HACTIVE_ENTRY 0x800
|
||||
DEF_HTOTAL_ENTRY 0x1010
|
||||
DEF_HACTIVE_ENTRY 0x1000
|
||||
DEF_VTOTAL_ENTRY 0x200
|
||||
DEF_VACTIVE_ENTRY 0x200
|
||||
DEF_CL_NEW_HCROPPING 0x10
|
||||
@ -1586,7 +1587,7 @@ DEF_ADD_3MAX_TOTAL_HVBLANK_ZERO
|
||||
DEF_ADD_HTOTAL_EQUA_HEVAL 0x0
|
||||
DEF_HOR_COUNT_MAX_BITWISE 0xffff
|
||||
DEF_VERT_COUNT_MAX_BITWISE 0xffff
|
||||
DEF_DIG_HTOTAL 0x80f
|
||||
DEF_DIG_HTOTAL 0x100f
|
||||
DEF_DIG_VTOTAL 0x1ff
|
||||
DEF_TEST_MODE_HFP_MIN 0x0
|
||||
DEF_TEST_MODE_HSY_HBP_MIN_CL 0x0
|
||||
@ -1617,8 +1618,8 @@ DEF_TIMER0_PIPE_DELAY1
|
||||
DEF_TIMER1_PIPE_DELAY1 0x0
|
||||
DEF_TMR0_CLKTMR1_CNT 0x0
|
||||
DEF_TMR1_CLKTMR0_CNT 0x0
|
||||
DEF_TIMER01_CLK_HS_FREQ 0x977a
|
||||
DEF_TIMER01_CLK_HS_PERIOD 0x64bc
|
||||
DEF_TIMER01_CLK_HS_FREQ 0x4c03
|
||||
DEF_TIMER01_CLK_HS_PERIOD 0xc8be
|
||||
DEF_TIMER0_CLK_HS_PERIOD_DLY1_CNT 0x0
|
||||
DEF_TIMER0_CLK_HS_PERIOD_DLY2_CNT 0x0
|
||||
DEF_TIMER0_CLK_HS_PERIOD_T1_CNT 0x0
|
||||
@ -1733,7 +1734,7 @@ DEF_DIG1_BYTESORDER
|
||||
[REG_DIGIT]
|
||||
INFO_CUSTOM 0x0
|
||||
INFO_REGISTER_REV 0x1
|
||||
INFO_XSIZE 0x800
|
||||
INFO_XSIZE 0x1000
|
||||
INFO_YSIZE 0x200
|
||||
INFO_TYPE 0x1
|
||||
INFO_BAYER 0x0
|
||||
@ -1927,13 +1928,13 @@ INFO_MASK_T2CTLH
|
||||
INFO_MASK_T3CTLL 0x0
|
||||
INFO_MASK_T3CTLH 0x0
|
||||
DIG_HCNT 0x1
|
||||
DIG_HTOTAL 0x80f
|
||||
DIG_HTOTAL 0x100f
|
||||
DIG_HSCNT 0x0
|
||||
DIG_HECNT 0x1
|
||||
DIG_HSSYNC 0x0
|
||||
DIG_HESYNC 0x0
|
||||
DIG_HSVAL 0x10
|
||||
DIG_HEVAL 0x80f
|
||||
DIG_HEVAL 0x100f
|
||||
DIG_HSCLM 0x0
|
||||
DIG_HECLM 0x0
|
||||
DIG_HCTL 0x1e0
|
||||
@ -2353,5 +2354,5 @@ DIG_IOCTL1H
|
||||
DIG_IOCTL0_L not_modified
|
||||
DIG_ENCTL not_modified
|
||||
[EOF]
|
||||
00007FF726A5AAA8 0x400c3
|
||||
00007FF726A5AA90 0x76edfd9e
|
||||
00007FF65B44AAA8 0x400ce
|
||||
00007FF65B44AA90 0xb579adfb
|
||||
29
config/2.dcf
29
config/2.dcf
@ -20,12 +20,13 @@
|
||||
/
|
||||
/
|
||||
/
|
||||
/
|
||||
[CAMERA_NAME]
|
||||
no name
|
||||
[CONFIG_FILE]
|
||||
50CF
|
||||
ODYSSEY
|
||||
Wed Dec 25 13:24:25 2024
|
||||
Thu Dec 26 15:47:03 2024
|
||||
[INFO_FILE_REV]
|
||||
0010.0019.0000
|
||||
RADIENT/eVCL/DUAL
|
||||
@ -116,9 +117,9 @@ VDT_NOVERT
|
||||
VDT_HSYNC 0x0
|
||||
VDT_HBPORCH 0x10
|
||||
VDT_HFPORCH 0x0
|
||||
VDT_HACTIVE 0x800
|
||||
VDT_HTOTAL 0x810
|
||||
VDT_HSYNC_FREQ 0x9767
|
||||
VDT_HACTIVE 0x1000
|
||||
VDT_HTOTAL 0x1010
|
||||
VDT_HSYNC_FREQ 0x4bff
|
||||
VDT_VSYNC 0x0
|
||||
VDT_VBPORCH 0x0
|
||||
VDT_VFPORCH 0x0
|
||||
@ -1561,8 +1562,8 @@ DEF_INFO_XSIZE_DIVISOR
|
||||
DEF_INFO_YSIZE_DIVISOR 0x1
|
||||
DEF_ADD_HACTIVE_MULTIPLEX 0x0
|
||||
DEF_ADD_VACTIVE_MULTIPLEX 0x0
|
||||
DEF_HTOTAL_ENTRY 0x810
|
||||
DEF_HACTIVE_ENTRY 0x800
|
||||
DEF_HTOTAL_ENTRY 0x1010
|
||||
DEF_HACTIVE_ENTRY 0x1000
|
||||
DEF_VTOTAL_ENTRY 0x200
|
||||
DEF_VACTIVE_ENTRY 0x200
|
||||
DEF_CL_NEW_HCROPPING 0x10
|
||||
@ -1584,7 +1585,7 @@ DEF_ADD_3MAX_TOTAL_HVBLANK_ZERO
|
||||
DEF_ADD_HTOTAL_EQUA_HEVAL 0x0
|
||||
DEF_HOR_COUNT_MAX_BITWISE 0xffff
|
||||
DEF_VERT_COUNT_MAX_BITWISE 0xffff
|
||||
DEF_DIG_HTOTAL 0x80f
|
||||
DEF_DIG_HTOTAL 0x100f
|
||||
DEF_DIG_VTOTAL 0x1ff
|
||||
DEF_TEST_MODE_HFP_MIN 0x0
|
||||
DEF_TEST_MODE_HSY_HBP_MIN_CL 0x0
|
||||
@ -1615,8 +1616,8 @@ DEF_TIMER0_PIPE_DELAY1
|
||||
DEF_TIMER1_PIPE_DELAY1 0x0
|
||||
DEF_TMR0_CLKTMR1_CNT 0x0
|
||||
DEF_TMR1_CLKTMR0_CNT 0x0
|
||||
DEF_TIMER01_CLK_HS_FREQ 0x977a
|
||||
DEF_TIMER01_CLK_HS_PERIOD 0x64bc
|
||||
DEF_TIMER01_CLK_HS_FREQ 0x4c03
|
||||
DEF_TIMER01_CLK_HS_PERIOD 0xc8be
|
||||
DEF_TIMER0_CLK_HS_PERIOD_DLY1_CNT 0x0
|
||||
DEF_TIMER0_CLK_HS_PERIOD_DLY2_CNT 0x0
|
||||
DEF_TIMER0_CLK_HS_PERIOD_T1_CNT 0x0
|
||||
@ -1731,7 +1732,7 @@ DEF_DIG1_BYTESORDER
|
||||
[REG_DIGIT]
|
||||
INFO_CUSTOM 0x0
|
||||
INFO_REGISTER_REV 0x1
|
||||
INFO_XSIZE 0x800
|
||||
INFO_XSIZE 0x1000
|
||||
INFO_YSIZE 0x200
|
||||
INFO_TYPE 0x1
|
||||
INFO_BAYER 0x0
|
||||
@ -1925,13 +1926,13 @@ INFO_MASK_T2CTLH
|
||||
INFO_MASK_T3CTLL 0x0
|
||||
INFO_MASK_T3CTLH 0x0
|
||||
DIG_HCNT 0x1
|
||||
DIG_HTOTAL 0x80f
|
||||
DIG_HTOTAL 0x100f
|
||||
DIG_HSCNT 0x0
|
||||
DIG_HECNT 0x1
|
||||
DIG_HSSYNC 0x0
|
||||
DIG_HESYNC 0x0
|
||||
DIG_HSVAL 0x10
|
||||
DIG_HEVAL 0x80f
|
||||
DIG_HEVAL 0x100f
|
||||
DIG_HSCLM 0x0
|
||||
DIG_HECLM 0x0
|
||||
DIG_HCTL 0x1e0
|
||||
@ -2351,5 +2352,5 @@ DIG_IOCTL1H
|
||||
DIG_IOCTL0_L not_modified
|
||||
DIG_ENCTL not_modified
|
||||
[EOF]
|
||||
00007FF726A5AAA8 0x400bd
|
||||
00007FF726A5AA90 0x5616b879
|
||||
00007FF65B44AAA8 0x400c8
|
||||
00007FF65B44AA90 0x11cf9d48
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE QtCreatorProject>
|
||||
<!-- Written by QtCreator 15.0.0, 2024-12-25T23:24:15. -->
|
||||
<!-- Written by QtCreator 15.0.0, 2024-12-26T20:39:49. -->
|
||||
<qtcreator>
|
||||
<data>
|
||||
<variable>EnvironmentId</variable>
|
||||
|
||||
8
main.cpp
8
main.cpp
@ -32,6 +32,7 @@ int main(int argc, char *argv[])
|
||||
// 安装自定义消息处理器,保存原始处理器
|
||||
originalHandler = qInstallMessageHandler(customMessageHandler);
|
||||
|
||||
|
||||
// QFile file("C:/Users/Administrator/Documents/cotton_double/styles/style.qss"); // 或者使用文件路径
|
||||
// if (file.open(QFile::ReadOnly)) {
|
||||
// QString styleSheet = QLatin1String(file.readAll());
|
||||
@ -40,6 +41,11 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
Widget w;
|
||||
w.show();
|
||||
// 设置窗口标志以隐藏标题栏和边框,并确保窗口是顶级窗口
|
||||
w.setWindowFlags(Qt::Window | Qt::FramelessWindowHint /*| Qt::WindowStaysOnTopHint*/);
|
||||
|
||||
// 显示全屏
|
||||
w.showFullScreen();
|
||||
// w.show();
|
||||
return a.exec();
|
||||
}
|
||||
|
||||
@ -22,12 +22,13 @@
|
||||
/
|
||||
/
|
||||
/
|
||||
/
|
||||
[CAMERA_NAME]
|
||||
no name
|
||||
[CONFIG_FILE]
|
||||
50CF
|
||||
ODYSSEY
|
||||
Wed Dec 25 13:24:12 2024
|
||||
Thu Dec 26 16:28:39 2024
|
||||
[INFO_FILE_REV]
|
||||
0010.0019.0000
|
||||
RADIENT/eVCL/DUAL
|
||||
@ -118,9 +119,9 @@ VDT_NOVERT
|
||||
VDT_HSYNC 0x0
|
||||
VDT_HBPORCH 0x10
|
||||
VDT_HFPORCH 0x0
|
||||
VDT_HACTIVE 0x800
|
||||
VDT_HTOTAL 0x810
|
||||
VDT_HSYNC_FREQ 0x9767
|
||||
VDT_HACTIVE 0x1000
|
||||
VDT_HTOTAL 0x1010
|
||||
VDT_HSYNC_FREQ 0x4bff
|
||||
VDT_VSYNC 0x0
|
||||
VDT_VBPORCH 0x0
|
||||
VDT_VFPORCH 0x0
|
||||
@ -1563,8 +1564,8 @@ DEF_INFO_XSIZE_DIVISOR
|
||||
DEF_INFO_YSIZE_DIVISOR 0x1
|
||||
DEF_ADD_HACTIVE_MULTIPLEX 0x0
|
||||
DEF_ADD_VACTIVE_MULTIPLEX 0x0
|
||||
DEF_HTOTAL_ENTRY 0x810
|
||||
DEF_HACTIVE_ENTRY 0x800
|
||||
DEF_HTOTAL_ENTRY 0x1010
|
||||
DEF_HACTIVE_ENTRY 0x1000
|
||||
DEF_VTOTAL_ENTRY 0x200
|
||||
DEF_VACTIVE_ENTRY 0x200
|
||||
DEF_CL_NEW_HCROPPING 0x10
|
||||
@ -1586,7 +1587,7 @@ DEF_ADD_3MAX_TOTAL_HVBLANK_ZERO
|
||||
DEF_ADD_HTOTAL_EQUA_HEVAL 0x0
|
||||
DEF_HOR_COUNT_MAX_BITWISE 0xffff
|
||||
DEF_VERT_COUNT_MAX_BITWISE 0xffff
|
||||
DEF_DIG_HTOTAL 0x80f
|
||||
DEF_DIG_HTOTAL 0x100f
|
||||
DEF_DIG_VTOTAL 0x1ff
|
||||
DEF_TEST_MODE_HFP_MIN 0x0
|
||||
DEF_TEST_MODE_HSY_HBP_MIN_CL 0x0
|
||||
@ -1617,8 +1618,8 @@ DEF_TIMER0_PIPE_DELAY1
|
||||
DEF_TIMER1_PIPE_DELAY1 0x0
|
||||
DEF_TMR0_CLKTMR1_CNT 0x0
|
||||
DEF_TMR1_CLKTMR0_CNT 0x0
|
||||
DEF_TIMER01_CLK_HS_FREQ 0x977a
|
||||
DEF_TIMER01_CLK_HS_PERIOD 0x64bc
|
||||
DEF_TIMER01_CLK_HS_FREQ 0x4c03
|
||||
DEF_TIMER01_CLK_HS_PERIOD 0xc8be
|
||||
DEF_TIMER0_CLK_HS_PERIOD_DLY1_CNT 0x0
|
||||
DEF_TIMER0_CLK_HS_PERIOD_DLY2_CNT 0x0
|
||||
DEF_TIMER0_CLK_HS_PERIOD_T1_CNT 0x0
|
||||
@ -1733,7 +1734,7 @@ DEF_DIG1_BYTESORDER
|
||||
[REG_DIGIT]
|
||||
INFO_CUSTOM 0x0
|
||||
INFO_REGISTER_REV 0x1
|
||||
INFO_XSIZE 0x800
|
||||
INFO_XSIZE 0x1000
|
||||
INFO_YSIZE 0x200
|
||||
INFO_TYPE 0x1
|
||||
INFO_BAYER 0x0
|
||||
@ -1927,13 +1928,13 @@ INFO_MASK_T2CTLH
|
||||
INFO_MASK_T3CTLL 0x0
|
||||
INFO_MASK_T3CTLH 0x0
|
||||
DIG_HCNT 0x1
|
||||
DIG_HTOTAL 0x80f
|
||||
DIG_HTOTAL 0x100f
|
||||
DIG_HSCNT 0x0
|
||||
DIG_HECNT 0x1
|
||||
DIG_HSSYNC 0x0
|
||||
DIG_HESYNC 0x0
|
||||
DIG_HSVAL 0x10
|
||||
DIG_HEVAL 0x80f
|
||||
DIG_HEVAL 0x100f
|
||||
DIG_HSCLM 0x0
|
||||
DIG_HECLM 0x0
|
||||
DIG_HCTL 0x1e0
|
||||
@ -2353,5 +2354,5 @@ DIG_IOCTL1H
|
||||
DIG_IOCTL0_L not_modified
|
||||
DIG_ENCTL not_modified
|
||||
[EOF]
|
||||
00007FF726A5AAA8 0x400c3
|
||||
00007FF726A5AA90 0x76edfd9e
|
||||
00007FF65B44AAA8 0x400ce
|
||||
00007FF65B44AA90 0xa5046900
|
||||
@ -20,12 +20,13 @@
|
||||
/
|
||||
/
|
||||
/
|
||||
/
|
||||
[CAMERA_NAME]
|
||||
no name
|
||||
[CONFIG_FILE]
|
||||
50CF
|
||||
ODYSSEY
|
||||
Wed Dec 25 13:24:25 2024
|
||||
Thu Dec 26 16:28:58 2024
|
||||
[INFO_FILE_REV]
|
||||
0010.0019.0000
|
||||
RADIENT/eVCL/DUAL
|
||||
@ -116,9 +117,9 @@ VDT_NOVERT
|
||||
VDT_HSYNC 0x0
|
||||
VDT_HBPORCH 0x10
|
||||
VDT_HFPORCH 0x0
|
||||
VDT_HACTIVE 0x800
|
||||
VDT_HTOTAL 0x810
|
||||
VDT_HSYNC_FREQ 0x9767
|
||||
VDT_HACTIVE 0x1000
|
||||
VDT_HTOTAL 0x1010
|
||||
VDT_HSYNC_FREQ 0x4bff
|
||||
VDT_VSYNC 0x0
|
||||
VDT_VBPORCH 0x0
|
||||
VDT_VFPORCH 0x0
|
||||
@ -1561,8 +1562,8 @@ DEF_INFO_XSIZE_DIVISOR
|
||||
DEF_INFO_YSIZE_DIVISOR 0x1
|
||||
DEF_ADD_HACTIVE_MULTIPLEX 0x0
|
||||
DEF_ADD_VACTIVE_MULTIPLEX 0x0
|
||||
DEF_HTOTAL_ENTRY 0x810
|
||||
DEF_HACTIVE_ENTRY 0x800
|
||||
DEF_HTOTAL_ENTRY 0x1010
|
||||
DEF_HACTIVE_ENTRY 0x1000
|
||||
DEF_VTOTAL_ENTRY 0x200
|
||||
DEF_VACTIVE_ENTRY 0x200
|
||||
DEF_CL_NEW_HCROPPING 0x10
|
||||
@ -1584,7 +1585,7 @@ DEF_ADD_3MAX_TOTAL_HVBLANK_ZERO
|
||||
DEF_ADD_HTOTAL_EQUA_HEVAL 0x0
|
||||
DEF_HOR_COUNT_MAX_BITWISE 0xffff
|
||||
DEF_VERT_COUNT_MAX_BITWISE 0xffff
|
||||
DEF_DIG_HTOTAL 0x80f
|
||||
DEF_DIG_HTOTAL 0x100f
|
||||
DEF_DIG_VTOTAL 0x1ff
|
||||
DEF_TEST_MODE_HFP_MIN 0x0
|
||||
DEF_TEST_MODE_HSY_HBP_MIN_CL 0x0
|
||||
@ -1615,8 +1616,8 @@ DEF_TIMER0_PIPE_DELAY1
|
||||
DEF_TIMER1_PIPE_DELAY1 0x0
|
||||
DEF_TMR0_CLKTMR1_CNT 0x0
|
||||
DEF_TMR1_CLKTMR0_CNT 0x0
|
||||
DEF_TIMER01_CLK_HS_FREQ 0x977a
|
||||
DEF_TIMER01_CLK_HS_PERIOD 0x64bc
|
||||
DEF_TIMER01_CLK_HS_FREQ 0x4c03
|
||||
DEF_TIMER01_CLK_HS_PERIOD 0xc8be
|
||||
DEF_TIMER0_CLK_HS_PERIOD_DLY1_CNT 0x0
|
||||
DEF_TIMER0_CLK_HS_PERIOD_DLY2_CNT 0x0
|
||||
DEF_TIMER0_CLK_HS_PERIOD_T1_CNT 0x0
|
||||
@ -1731,7 +1732,7 @@ DEF_DIG1_BYTESORDER
|
||||
[REG_DIGIT]
|
||||
INFO_CUSTOM 0x0
|
||||
INFO_REGISTER_REV 0x1
|
||||
INFO_XSIZE 0x800
|
||||
INFO_XSIZE 0x1000
|
||||
INFO_YSIZE 0x200
|
||||
INFO_TYPE 0x1
|
||||
INFO_BAYER 0x0
|
||||
@ -1925,13 +1926,13 @@ INFO_MASK_T2CTLH
|
||||
INFO_MASK_T3CTLL 0x0
|
||||
INFO_MASK_T3CTLH 0x0
|
||||
DIG_HCNT 0x1
|
||||
DIG_HTOTAL 0x80f
|
||||
DIG_HTOTAL 0x100f
|
||||
DIG_HSCNT 0x0
|
||||
DIG_HECNT 0x1
|
||||
DIG_HSSYNC 0x0
|
||||
DIG_HESYNC 0x0
|
||||
DIG_HSVAL 0x10
|
||||
DIG_HEVAL 0x80f
|
||||
DIG_HEVAL 0x100f
|
||||
DIG_HSCLM 0x0
|
||||
DIG_HECLM 0x0
|
||||
DIG_HCTL 0x1e0
|
||||
@ -2351,5 +2352,5 @@ DIG_IOCTL1H
|
||||
DIG_IOCTL0_L not_modified
|
||||
DIG_ENCTL not_modified
|
||||
[EOF]
|
||||
00007FF726A5AAA8 0x400bd
|
||||
00007FF726A5AA90 0x5616b879
|
||||
00007FF65B44AAA8 0x400c8
|
||||
00007FF65B44AA90 0x6c01ddfa
|
||||
90
ui_widget.h
90
ui_widget.h
@ -35,7 +35,7 @@ public:
|
||||
QLabel *label_3;
|
||||
QWidget *tab_2;
|
||||
QHBoxLayout *horizontalLayout_3;
|
||||
QGroupBox *groupBox_7;
|
||||
QFrame *frame_7;
|
||||
QVBoxLayout *verticalLayout_3;
|
||||
QLabel *lab_info;
|
||||
QPushButton *btn_start;
|
||||
@ -45,7 +45,7 @@ public:
|
||||
QPushButton *btn_quit;
|
||||
QSpacerItem *verticalSpacer;
|
||||
QFrame *frame_6;
|
||||
QVBoxLayout *verticalLayout_2;
|
||||
QVBoxLayout *verticalLayout;
|
||||
QFrame *frame;
|
||||
QHBoxLayout *horizontalLayout_4;
|
||||
QLabel *label_2;
|
||||
@ -96,13 +96,15 @@ public:
|
||||
{
|
||||
if (Widget->objectName().isEmpty())
|
||||
Widget->setObjectName("Widget");
|
||||
Widget->resize(2173, 1117);
|
||||
Widget->resize(2173, 1191);
|
||||
horizontalLayout = new QHBoxLayout(Widget);
|
||||
horizontalLayout->setObjectName("horizontalLayout");
|
||||
horizontalLayout->setContentsMargins(0, 0, 0, 0);
|
||||
tabWidget = new QTabWidget(Widget);
|
||||
tabWidget->setObjectName("tabWidget");
|
||||
tabWidget->setEnabled(true);
|
||||
tabWidget->setStyleSheet(QString::fromUtf8("background-color: rgb(228, 223, 186);"));
|
||||
tabWidget->setTabBarAutoHide(true);
|
||||
tab = new QWidget();
|
||||
tab->setObjectName("tab");
|
||||
label = new QLabel(tab);
|
||||
@ -118,14 +120,14 @@ public:
|
||||
tab_2->setObjectName("tab_2");
|
||||
horizontalLayout_3 = new QHBoxLayout(tab_2);
|
||||
horizontalLayout_3->setObjectName("horizontalLayout_3");
|
||||
groupBox_7 = new QGroupBox(tab_2);
|
||||
groupBox_7->setObjectName("groupBox_7");
|
||||
groupBox_7->setMinimumSize(QSize(450, 0));
|
||||
verticalLayout_3 = new QVBoxLayout(groupBox_7);
|
||||
frame_7 = new QFrame(tab_2);
|
||||
frame_7->setObjectName("frame_7");
|
||||
frame_7->setMinimumSize(QSize(0, 0));
|
||||
verticalLayout_3 = new QVBoxLayout(frame_7);
|
||||
verticalLayout_3->setSpacing(20);
|
||||
verticalLayout_3->setObjectName("verticalLayout_3");
|
||||
verticalLayout_3->setContentsMargins(9, 9, 9, -1);
|
||||
lab_info = new QLabel(groupBox_7);
|
||||
lab_info = new QLabel(frame_7);
|
||||
lab_info->setObjectName("lab_info");
|
||||
lab_info->setEnabled(true);
|
||||
QFont font;
|
||||
@ -139,9 +141,14 @@ public:
|
||||
|
||||
verticalLayout_3->addWidget(lab_info);
|
||||
|
||||
btn_start = new QPushButton(groupBox_7);
|
||||
btn_start = new QPushButton(frame_7);
|
||||
btn_start->setObjectName("btn_start");
|
||||
btn_start->setMinimumSize(QSize(70, 170));
|
||||
QSizePolicy sizePolicy(QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Preferred);
|
||||
sizePolicy.setHorizontalStretch(0);
|
||||
sizePolicy.setVerticalStretch(0);
|
||||
sizePolicy.setHeightForWidth(btn_start->sizePolicy().hasHeightForWidth());
|
||||
btn_start->setSizePolicy(sizePolicy);
|
||||
btn_start->setMinimumSize(QSize(0, 120));
|
||||
btn_start->setStyleSheet(QString::fromUtf8("/* btn_start \346\240\267\345\274\217 */\n"
|
||||
"QPushButton#btn_start {\n"
|
||||
" background-color: #4b5b47; /* \346\232\227\347\273\277\350\211\262\350\203\214\346\231\257 */\n"
|
||||
@ -174,9 +181,11 @@ public:
|
||||
|
||||
verticalLayout_3->addWidget(btn_start);
|
||||
|
||||
btn_stop = new QPushButton(groupBox_7);
|
||||
btn_stop = new QPushButton(frame_7);
|
||||
btn_stop->setObjectName("btn_stop");
|
||||
btn_stop->setMinimumSize(QSize(70, 170));
|
||||
sizePolicy.setHeightForWidth(btn_stop->sizePolicy().hasHeightForWidth());
|
||||
btn_stop->setSizePolicy(sizePolicy);
|
||||
btn_stop->setMinimumSize(QSize(0, 120));
|
||||
btn_stop->setStyleSheet(QString::fromUtf8("/* btn_stop \346\240\267\345\274\217 */\n"
|
||||
"QPushButton#btn_stop\n"
|
||||
" {\n"
|
||||
@ -211,14 +220,16 @@ public:
|
||||
|
||||
verticalLayout_3->addWidget(btn_stop);
|
||||
|
||||
btn_take_photos = new QPushButton(groupBox_7);
|
||||
btn_take_photos = new QPushButton(frame_7);
|
||||
btn_take_photos->setObjectName("btn_take_photos");
|
||||
btn_take_photos->setMinimumSize(QSize(70, 170));
|
||||
sizePolicy.setHeightForWidth(btn_take_photos->sizePolicy().hasHeightForWidth());
|
||||
btn_take_photos->setSizePolicy(sizePolicy);
|
||||
btn_take_photos->setMinimumSize(QSize(0, 120));
|
||||
btn_take_photos->setStyleSheet(QString::fromUtf8("/* btn_take_photos \346\240\267\345\274\217 */\n"
|
||||
"QPushButton#btn_take_photos {\n"
|
||||
" background-color: #7c8876; /* \346\232\227\350\223\235\350\211\262\350\203\214\346\231\257 */\n"
|
||||
" color: #ffffff; /* \347\231\275\350\211\262\346\226\207\345\255\227 */\n"
|
||||
" border: 2px solid #145a86; /* \346\233\264\346\267\261\347\232\204\350\223\235\350\211\262\350\276\271\346\241\206 */\n"
|
||||
" border: 2px solid #6c7766; /* \346\233\264\346\267\261\347\232\204\350\223\235\350\211\262\350\276\271\346\241\206 */\n"
|
||||
" padding: 20px 40px; /* \345\206\205\350\276\271\350\267\235 */\n"
|
||||
" border-radius: 12px; /* \345\234\206\350\247\222\345\215\212\345\276\204 */\n"
|
||||
" font-size: 48px; /* \345\255\227\344\275\223\345\244\247\345\260\217 */\n"
|
||||
@ -248,9 +259,9 @@ public:
|
||||
|
||||
verticalLayout_3->addWidget(btn_take_photos);
|
||||
|
||||
btn_set_valve = new QPushButton(groupBox_7);
|
||||
btn_set_valve = new QPushButton(frame_7);
|
||||
btn_set_valve->setObjectName("btn_set_valve");
|
||||
btn_set_valve->setMinimumSize(QSize(0, 170));
|
||||
btn_set_valve->setMinimumSize(QSize(0, 120));
|
||||
btn_set_valve->setStyleSheet(QString::fromUtf8("/* btn_set_value \346\240\267\345\274\217 */\n"
|
||||
"QPushButton#btn_set_valve {\n"
|
||||
" background-color: #be9970; /* \346\251\231\350\211\262\350\203\214\346\231\257 */\n"
|
||||
@ -283,9 +294,9 @@ public:
|
||||
|
||||
verticalLayout_3->addWidget(btn_set_valve);
|
||||
|
||||
btn_quit = new QPushButton(groupBox_7);
|
||||
btn_quit = new QPushButton(frame_7);
|
||||
btn_quit->setObjectName("btn_quit");
|
||||
btn_quit->setMinimumSize(QSize(70, 170));
|
||||
btn_quit->setMinimumSize(QSize(0, 120));
|
||||
btn_quit->setStyleSheet(QString::fromUtf8("/* btn_quit \346\240\267\345\274\217 */\n"
|
||||
"QPushButton#btn_quit {\n"
|
||||
" background-color: #716244; /* \347\272\242\350\211\262\350\203\214\346\231\257 */\n"
|
||||
@ -318,17 +329,17 @@ public:
|
||||
|
||||
verticalLayout_3->addWidget(btn_quit);
|
||||
|
||||
verticalSpacer = new QSpacerItem(20, 40, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding);
|
||||
verticalSpacer = new QSpacerItem(0, 0, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding);
|
||||
|
||||
verticalLayout_3->addItem(verticalSpacer);
|
||||
|
||||
|
||||
horizontalLayout_3->addWidget(groupBox_7);
|
||||
horizontalLayout_3->addWidget(frame_7);
|
||||
|
||||
frame_6 = new QFrame(tab_2);
|
||||
frame_6->setObjectName("frame_6");
|
||||
verticalLayout_2 = new QVBoxLayout(frame_6);
|
||||
verticalLayout_2->setObjectName("verticalLayout_2");
|
||||
verticalLayout = new QVBoxLayout(frame_6);
|
||||
verticalLayout->setObjectName("verticalLayout");
|
||||
frame = new QFrame(frame_6);
|
||||
frame->setObjectName("frame");
|
||||
frame->setFrameShape(QFrame::Shape::NoFrame);
|
||||
@ -340,7 +351,7 @@ public:
|
||||
|
||||
horizontalLayout_4->addWidget(label_2);
|
||||
|
||||
horizontalSpacer = new QSpacerItem(864, 20, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding);
|
||||
horizontalSpacer = new QSpacerItem(0, 0, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum);
|
||||
|
||||
horizontalLayout_4->addItem(horizontalSpacer);
|
||||
|
||||
@ -378,22 +389,22 @@ public:
|
||||
horizontalLayout_4->addWidget(img_1_mirror);
|
||||
|
||||
|
||||
verticalLayout_2->addWidget(frame);
|
||||
verticalLayout->addWidget(frame);
|
||||
|
||||
camera_1_img = new QLabel(frame_6);
|
||||
camera_1_img->setObjectName("camera_1_img");
|
||||
QSizePolicy sizePolicy(QSizePolicy::Policy::Ignored, QSizePolicy::Policy::Ignored);
|
||||
sizePolicy.setHorizontalStretch(0);
|
||||
sizePolicy.setVerticalStretch(0);
|
||||
sizePolicy.setHeightForWidth(camera_1_img->sizePolicy().hasHeightForWidth());
|
||||
camera_1_img->setSizePolicy(sizePolicy);
|
||||
QSizePolicy sizePolicy1(QSizePolicy::Policy::Ignored, QSizePolicy::Policy::Ignored);
|
||||
sizePolicy1.setHorizontalStretch(0);
|
||||
sizePolicy1.setVerticalStretch(0);
|
||||
sizePolicy1.setHeightForWidth(camera_1_img->sizePolicy().hasHeightForWidth());
|
||||
camera_1_img->setSizePolicy(sizePolicy1);
|
||||
camera_1_img->setStyleSheet(QString::fromUtf8("background-color: rgb(129, 129, 129);\n"
|
||||
"border: 4px solid black;\n"
|
||||
"\n"
|
||||
" border-radius: 12px; /* \345\234\206\350\247\222\345\215\212\345\276\204 */"));
|
||||
camera_1_img->setLineWidth(1);
|
||||
|
||||
verticalLayout_2->addWidget(camera_1_img);
|
||||
verticalLayout->addWidget(camera_1_img);
|
||||
|
||||
frame_2 = new QFrame(frame_6);
|
||||
frame_2->setObjectName("frame_2");
|
||||
@ -406,7 +417,7 @@ public:
|
||||
|
||||
horizontalLayout_5->addWidget(label_4);
|
||||
|
||||
horizontalSpacer_2 = new QSpacerItem(840, 20, QSizePolicy::Policy::Minimum, QSizePolicy::Policy::Expanding);
|
||||
horizontalSpacer_2 = new QSpacerItem(0, 0, QSizePolicy::Policy::Expanding, QSizePolicy::Policy::Minimum);
|
||||
|
||||
horizontalLayout_5->addItem(horizontalSpacer_2);
|
||||
|
||||
@ -445,25 +456,25 @@ public:
|
||||
horizontalLayout_5->addWidget(img_0_mirror);
|
||||
|
||||
|
||||
verticalLayout_2->addWidget(frame_2);
|
||||
verticalLayout->addWidget(frame_2);
|
||||
|
||||
camera_0_img = new QLabel(frame_6);
|
||||
camera_0_img->setObjectName("camera_0_img");
|
||||
sizePolicy.setHeightForWidth(camera_0_img->sizePolicy().hasHeightForWidth());
|
||||
camera_0_img->setSizePolicy(sizePolicy);
|
||||
sizePolicy1.setHeightForWidth(camera_0_img->sizePolicy().hasHeightForWidth());
|
||||
camera_0_img->setSizePolicy(sizePolicy1);
|
||||
camera_0_img->setStyleSheet(QString::fromUtf8("background-color: rgb(129, 129, 129);\n"
|
||||
"border: 4px solid black;\n"
|
||||
" border-radius: 12px; /* \345\234\206\350\247\222\345\215\212\345\276\204 */"));
|
||||
camera_0_img->setLineWidth(1);
|
||||
|
||||
verticalLayout_2->addWidget(camera_0_img);
|
||||
verticalLayout->addWidget(camera_0_img);
|
||||
|
||||
verticalLayout_2->setStretch(1, 5);
|
||||
verticalLayout_2->setStretch(3, 5);
|
||||
verticalLayout->setStretch(1, 5);
|
||||
verticalLayout->setStretch(3, 5);
|
||||
|
||||
horizontalLayout_3->addWidget(frame_6);
|
||||
|
||||
horizontalLayout_3->setStretch(0, 6);
|
||||
horizontalLayout_3->setStretch(0, 2);
|
||||
horizontalLayout_3->setStretch(1, 10);
|
||||
tabWidget->addTab(tab_2, QString());
|
||||
tab_3 = new QWidget();
|
||||
@ -599,7 +610,6 @@ public:
|
||||
label->setText(QCoreApplication::translate("Widget", "\345\245\216\345\261\257\351\223\266\345\212\233\346\243\211\346\262\271\346\234\272\346\242\260\346\234\211\351\231\220\345\205\254\345\217\270", nullptr));
|
||||
label_3->setText(QCoreApplication::translate("Widget", "\347\261\275\346\243\211\345\274\202\347\272\244\346\235\202\350\264\250\345\210\206\351\200\211\346\234\272", nullptr));
|
||||
tabWidget->setTabText(tabWidget->indexOf(tab), QCoreApplication::translate("Widget", "Tab 1", nullptr));
|
||||
groupBox_7->setTitle(QCoreApplication::translate("Widget", "\346\216\247\345\210\266\345\217\212\347\212\266\346\200\201", nullptr));
|
||||
lab_info->setText(QCoreApplication::translate("Widget", "\347\212\266\346\200\201", nullptr));
|
||||
btn_start->setText(QCoreApplication::translate("Widget", "\345\274\200\345\247\213\345\210\206\351\200\211", nullptr));
|
||||
btn_stop->setText(QCoreApplication::translate("Widget", "\345\201\234\346\255\242\345\210\206\351\200\211", nullptr));
|
||||
|
||||
18
widget.cpp
18
widget.cpp
@ -12,6 +12,7 @@
|
||||
#include <QImage>
|
||||
#include <QPixmap>
|
||||
#include <QDateTime>
|
||||
#include <QTabBar>
|
||||
#include <img_utils.h>
|
||||
#include <detectionworker.h>
|
||||
|
||||
@ -19,7 +20,7 @@ using namespace std;
|
||||
|
||||
|
||||
// 硬编码参数值
|
||||
int file_delay = 1050; // 延迟时间(毫秒)
|
||||
int file_delay = 1200; // 延迟时间(毫秒)
|
||||
int file_encoder = 12000; // 行频
|
||||
int file_valve = 200; // 喷阀触发频率
|
||||
|
||||
@ -28,8 +29,21 @@ Widget::Widget(QWidget *parent)
|
||||
, ui(new Ui::Widget)
|
||||
{
|
||||
this->isCamRunning = false;
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
// 确认 tabWidget 是 QTabWidget 类型
|
||||
QTabWidget* tab = qobject_cast<QTabWidget*>(ui->tabWidget);
|
||||
if (tab) {
|
||||
QTabBar* tabBar = tab->tabBar();
|
||||
if (tabBar) {
|
||||
tabBar->hide(); // 隐藏 TabBar
|
||||
} else {
|
||||
qWarning() << "tabBar() 返回 nullptr!";
|
||||
}
|
||||
} else {
|
||||
qWarning() << "ui->tabWidget 不是 QTabWidget 类型!";
|
||||
}
|
||||
|
||||
ui->camera_0_img->setScaledContents(false);
|
||||
ui->camera_1_img->setScaledContents(false);
|
||||
|
||||
|
||||
84
widget.ui
84
widget.ui
@ -7,13 +7,25 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>2173</width>
|
||||
<height>1117</height>
|
||||
<height>1191</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Widget</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="enabled">
|
||||
@ -25,6 +37,9 @@
|
||||
<property name="currentIndex">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="tabBarAutoHide">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>Tab 1</string>
|
||||
@ -66,18 +81,15 @@
|
||||
<attribute name="title">
|
||||
<string>Tab 2</string>
|
||||
</attribute>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3" stretch="6,10">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3" stretch="2,10">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox_7">
|
||||
<widget class="QFrame" name="frame_7">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>450</width>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>控制及状态</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>20</number>
|
||||
@ -115,10 +127,16 @@ color: rgb(34, 40, 49);</string>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_start">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>170</height>
|
||||
<width>0</width>
|
||||
<height>120</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
@ -158,10 +176,16 @@ QPushButton#btn_start:disabled {
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_stop">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>170</height>
|
||||
<width>0</width>
|
||||
<height>120</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
@ -203,10 +227,16 @@ QPushButton#btn_stop:disabled {
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_take_photos">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>170</height>
|
||||
<width>0</width>
|
||||
<height>120</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
@ -214,7 +244,7 @@ QPushButton#btn_stop:disabled {
|
||||
QPushButton#btn_take_photos {
|
||||
background-color: #7c8876; /* 暗蓝色背景 */
|
||||
color: #ffffff; /* 白色文字 */
|
||||
border: 2px solid #145a86; /* 更深的蓝色边框 */
|
||||
border: 2px solid #6c7766; /* 更深的蓝色边框 */
|
||||
padding: 20px 40px; /* 内边距 */
|
||||
border-radius: 12px; /* 圆角半径 */
|
||||
font-size: 48px; /* 字体大小 */
|
||||
@ -251,7 +281,7 @@ QPushButton#btn_take_photos:disabled {
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>170</height>
|
||||
<height>120</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
@ -293,8 +323,8 @@ QPushButton#btn_set_valve:disabled {
|
||||
<widget class="QPushButton" name="btn_quit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>170</height>
|
||||
<width>0</width>
|
||||
<height>120</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
@ -339,8 +369,8 @@ QPushButton#btn_quit:disabled {
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
@ -350,13 +380,13 @@ QPushButton#btn_quit:disabled {
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame_6">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,5,0,5">
|
||||
<layout class="QVBoxLayout" name="verticalLayout" stretch="0,5,0,5">
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::Shape::NoFrame</enum>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4" stretch="0,0,0,0,0,0,0">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="styleSheet">
|
||||
@ -370,12 +400,12 @@ QPushButton#btn_quit:disabled {
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>864</width>
|
||||
<height>20</height>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
@ -483,12 +513,12 @@ border: 4px solid black;
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Orientation::Vertical</enum>
|
||||
<enum>Qt::Orientation::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>840</width>
|
||||
<height>20</height>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user