commit c7837bcc2e5082e151d6710094d617fc29c96940 Author: 徐超 Date: Tue Oct 22 17:29:54 2024 +0800 feat(初始项目搭建):移植UI diff --git a/HX_CameraLoopPlay.sln b/HX_CameraLoopPlay.sln new file mode 100644 index 0000000..6a70c26 --- /dev/null +++ b/HX_CameraLoopPlay.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.35026.282 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HX_CameraLoopPlay", "HX_CameraLoopPlay\HX_CameraLoopPlay.vcxproj", "{537C2561-05E9-4944-A894-F6CAD93D3FBD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {537C2561-05E9-4944-A894-F6CAD93D3FBD}.Debug|x64.ActiveCfg = Debug|x64 + {537C2561-05E9-4944-A894-F6CAD93D3FBD}.Debug|x64.Build.0 = Debug|x64 + {537C2561-05E9-4944-A894-F6CAD93D3FBD}.Release|x64.ActiveCfg = Release|x64 + {537C2561-05E9-4944-A894-F6CAD93D3FBD}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {3B388C7D-2E78-4B25-B2F3-ACDFF54AA865} + EndGlobalSection +EndGlobal diff --git a/HX_CameraLoopPlay/CameraLoopPlay.cpp b/HX_CameraLoopPlay/CameraLoopPlay.cpp new file mode 100644 index 0000000..dd318d2 --- /dev/null +++ b/HX_CameraLoopPlay/CameraLoopPlay.cpp @@ -0,0 +1,14 @@ +#include "CameraLoopPlay.h" + +CameraLoopPlay::CameraLoopPlay(QWidget *parent) + : QMainWindow(parent) +{ + ui.setupUi(this); + + // ز˵ + setWindowFlag(Qt::FramelessWindowHint); + setWindowFlags(windowFlags() | Qt::WindowMaximizeButtonHint | Qt::WindowMinimizeButtonHint); +} + +CameraLoopPlay::~CameraLoopPlay() +{} diff --git a/HX_CameraLoopPlay/CameraLoopPlay.h b/HX_CameraLoopPlay/CameraLoopPlay.h new file mode 100644 index 0000000..4c2418f --- /dev/null +++ b/HX_CameraLoopPlay/CameraLoopPlay.h @@ -0,0 +1,25 @@ +/*****************************************************************//** + * @file CameraLoopPlay.h + * @brief Ƶֲ + * @author XuChao (xxu715737@163.com) + * @date 2024-10-22 + *********************************************************************/ +#pragma once + +#include +#include "ui_CameraLoopPlay.h" + +class CameraLoopPlay : public QMainWindow +{ + Q_OBJECT + +public: + CameraLoopPlay(QWidget *parent = nullptr); + ~CameraLoopPlay(); + +private slots: + + +private: + Ui::CameraLoopPlayClass ui; +}; diff --git a/HX_CameraLoopPlay/CameraLoopPlay.qrc b/HX_CameraLoopPlay/CameraLoopPlay.qrc new file mode 100644 index 0000000..4e39902 --- /dev/null +++ b/HX_CameraLoopPlay/CameraLoopPlay.qrc @@ -0,0 +1,30 @@ + + + Resource/image/background.png + Resource/image/camera.png + Resource/image/cameraControl.png + Resource/image/cameraList.png + Resource/image/combox_open.png + Resource/image/fixedpoint_title.png + Resource/image/flight.png + Resource/image/focus.png + Resource/image/fold.png + Resource/image/head.png + Resource/image/head_yuquan.png + Resource/image/loopPlay.png + Resource/image/offline.png + Resource/image/online.png + Resource/image/rect.png + Resource/image/rect_select.png + Resource/image/refresh.png + Resource/image/unfold.png + Resource/image/videoControll.svg + Resource/image/windowNum.png + Resource/image/workface_title.png + Resource/image/yuquan_fixedpoint_title.png + Resource/image/yuquan_workface_title.png + Resource/image/zoom.png + Resource/image/close.png + Resource/image/close_hover.png + + diff --git a/HX_CameraLoopPlay/CameraLoopPlay.ui b/HX_CameraLoopPlay/CameraLoopPlay.ui new file mode 100644 index 0000000..c4a3f9c --- /dev/null +++ b/HX_CameraLoopPlay/CameraLoopPlay.ui @@ -0,0 +1,1128 @@ + + + CameraLoopPlayClass + + + + 0 + 0 + 1920 + 1080 + + + + CameraLoopPlay + + + + #centralWidget{ + + border-image: url(:/CameraLoopPlay/Resource/image/background.png); +} + + + + + + 0 + + + 0 + + + 0 + + + + + #widget_title{ + border-image: url(:/CameraLoopPlay/Resource/image/yuquan_workface_title.png); + background-color: transparent; +} + + + + + 1850 + 20 + 30 + 30 + + + + QPushButton{ + border-image: url(:/CameraLoopPlay/Resource/image/close.png); + border:0; +} +QPushButton:hover{ + border-image: url(:/CameraLoopPlay/Resource/image/close_hover.png); + border:0; +} + + + + + + + + + 1480 + 20 + 351 + 31 + + + + color: rgb(255, 255, 255); +background-color: transparent; +font: 16pt "Arial"; + + + + + + Qt::AlignCenter + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + + + + 37 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 10 + + + + + #widget_videoList{ + border-image: url(:/CameraLoopPlay/Resource/image/cameraList.png); +} + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 9 + + + 6 + + + + + 15 + + + + + Qt::Horizontal + + + QSizePolicy::Maximum + + + + 109 + 20 + + + + + + + + #label_cameraList{ + color: rgb(255, 255, 255); + border:none; + background-color: transparent; + font: 18pt "黑体"; +} + + + 摄像机列表 + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + QTreeView#treeView_cameraList { + border: none; + background-color: transparent; + font-size:18px; + color:white; +} + + + + + + + 8 + + + 15 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 25 + 25 + + + + #pushButton_online{ + border-image: url(:/CameraLoopPlay/Resource/image/online.png); + border:none; + background-color: transparent; + +} + + + + + + + + + + color:white; +border:none; + + + 在线 + + + + + + + + 25 + 25 + + + + #pushButton_offline{ + border-image: url(:/CameraLoopPlay/Resource/image/offline.png); + border:none; + background-color: transparent; +} + + + + + + + + + + color:white; +border:none; + + + 离线 + + + + + + + + + + + + + + + 0 + 0 + + + + + 352 + 319 + + + + #widget_videoControl{ + border-image: url(:/CameraLoopPlay/Resource/image/cameraControl.png); +} + + + + 9 + + + 40 + + + 29 + + + + + + + + 0 + 0 + + + + + 163 + 150 + + + + #widget_cameraControll{ + border-image: url(:/CameraLoopPlay/Resource/image/videoControll.svg); +} + + + + + 70 + 30 + 25 + 25 + + + + + 15 + 15 + + + + QPushButton{ + border:none; + background-color: transparent; +} + + + + + + + + + 70 + 110 + 25 + 25 + + + + + 15 + 15 + + + + QPushButton{ + border:none; + background-color: transparent; +} + + + + + + + + + 30 + 70 + 25 + 25 + + + + + 15 + 15 + + + + QPushButton{ + border:none; + background-color: transparent; +} + + + + + + + + + 110 + 70 + 25 + 25 + + + + + 15 + 15 + + + + QPushButton{ + border:none; + background-color: transparent; +} + + + + + + + + + 40 + 40 + 25 + 25 + + + + + 15 + 15 + + + + QPushButton{ + border:none; + background-color: transparent; +} + + + + + + + + + 110 + 40 + 25 + 25 + + + + + 15 + 15 + + + + QPushButton{ + border:none; + background-color: transparent; +} + + + + + + + + + 40 + 100 + 25 + 25 + + + + + 15 + 15 + + + + QPushButton{ + border:none; + background-color: transparent; +} + + + + + + + + + 100 + 100 + 25 + 25 + + + + + 15 + 15 + + + + QPushButton{ + border:none; + background-color: transparent; +} + + + + + + + + + 70 + 70 + 25 + 25 + + + + + 15 + 15 + + + + QPushButton{ + border:none; + background-color: transparent; +} + + + + + + + + + + + 0 + + + + + + + #widget_zoom{ + border-image: url(:/CameraLoopPlay/Resource/image/zoom.png); +} + + + + + + + 35 + 35 + + + + QPushButton{ + border:none; + background-color: transparent; +} + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 35 + 35 + + + + QPushButton{ + border:none; + background-color: transparent; +} + + + + + + + + + + + + + + + + + #widget_focus{ + border-image: url(:/CameraLoopPlay/Resource/image/focus.png); +} + + + + + + + 35 + 35 + + + + QPushButton{ + border:none; + background-color: transparent; +} + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 35 + 35 + + + + QPushButton{ + border:none; + background-color: transparent; +} + + + + + + + + + + + + + + + + + #widget_fligh{ + border-image: url(:/CameraLoopPlay/Resource/image/flight.png); +} + + + + + + + 35 + 35 + + + + QPushButton{ + border:none; + background-color: transparent; +} + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 35 + 35 + + + + QPushButton{ + border:none; + background-color: transparent; +} + + + + + + + + + + + + + + + + + + + 0 + + + + + + 0 + 28 + + + + #label_windowsNum{ + color:white; + border-image: url(:/CameraLoopPlay/Resource/image/windowNum.png); +} + + + 画面窗口数 + + + Qt::AlignCenter + + + + + + + + 0 + 28 + + + + QComboBox { + border: 1px solid #007BFF; /* 边框颜色为蓝色 */ + + padding: 5px; + color:white; + + background-color: rgba(30, 31, 54, 255); + +} + +QComboBox::drop-down { + subcontrol-origin: padding; + subcontrol-position: top right; + width: 20px; + border-left: 1px solid #007BFF; /* 下拉按钮的左边框 */ + background-color: rgba(27, 48, 107, 255); /* 下拉按钮的背景颜色为蓝色 */ +} + +QComboBox::down-arrow { + image: url(:/Resource/image/combox_open.png); /* 替换下拉箭头图片 */ + width: 10px; + height: 10px; +} + +QComboBox QAbstractItemView { + border: 1px solid #007BFF; /* 下拉列表边框颜色为蓝色 */ + selection-background-color: #007BFF; /* 选中项的背景颜色为蓝色 */ + selection-color: white; /* 选中项的文本颜色为白色 */ + color:white; + background-color: rgba(30, 31, 54, 255); +} + +QComboBox:disabled { + background-color: #E0E0E0; /* 禁用时的背景颜色 */ + color: #A0A0A0; /* 禁用时的文字颜色 */ +} + + + + + 1 + + + + + 4 + + + + + 9 + + + + + 16 + + + + + 20 + + + + + 36 + + + + + + + + + + + + #widget_LoopPlay{ + border-image: url(:/CameraLoopPlay/Resource/image/loopPlay.png); +} + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 0 + 28 + + + + QPushButton#pushButton_loopPlay{ +background-color: transparent; +border:none; +color:white; +} + + + 开启轮播 + + + + + + + + + + + + + + + + + + + + + 0 + 0 + + + + + 18 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 0 + 0 + + + + + 21 + 114 + + + + + 21 + 114 + + + + QPushButton#pushButton_slide{ + /* border: 2px solid white; + border-right: 0px; + background: #CFCFCF; + border-top-right-radius:8px; + border-top-left-radius:0px; + border-bottom-left-radius:0px; + border-bottom-right-radius:8px; + color:white;*/ + + border-image: url(:/Resource/image/fold.png); +} + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + #widget_right{ + border-image: url(:/image/rect2.png); +} + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0 + + + 0 + + + + + + + + + + + + + + + + + + + + + + diff --git a/HX_CameraLoopPlay/HX_CameraLoopPlay.vcxproj b/HX_CameraLoopPlay/HX_CameraLoopPlay.vcxproj new file mode 100644 index 0000000..2a0a45e --- /dev/null +++ b/HX_CameraLoopPlay/HX_CameraLoopPlay.vcxproj @@ -0,0 +1,112 @@ + + + + + Debug + x64 + + + Release + x64 + + + + {537C2561-05E9-4944-A894-F6CAD93D3FBD} + QtVS_v304 + 10.0 + 10.0 + $(MSBuildProjectDirectory)\QtMsBuild + + + + Application + v142 + true + Unicode + + + Application + v142 + false + true + Unicode + + + + + + + 5.12.3_msvc2017_64 + core;gui;widgets + debug + + + 5.12.3_msvc2017_64 + core;gui;widgets + release + + + + + + + + + + + + + + + + + + + + + + true + Level3 + true + true + + + Windows + true + + + + + true + Level3 + true + true + true + true + + + Windows + false + true + true + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/HX_CameraLoopPlay/Resource/image/background.png b/HX_CameraLoopPlay/Resource/image/background.png new file mode 100644 index 0000000..1aeeb0e Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/background.png differ diff --git a/HX_CameraLoopPlay/Resource/image/camera.png b/HX_CameraLoopPlay/Resource/image/camera.png new file mode 100644 index 0000000..d4f7b22 Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/camera.png differ diff --git a/HX_CameraLoopPlay/Resource/image/cameraControl.png b/HX_CameraLoopPlay/Resource/image/cameraControl.png new file mode 100644 index 0000000..e805aa6 Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/cameraControl.png differ diff --git a/HX_CameraLoopPlay/Resource/image/cameraList.png b/HX_CameraLoopPlay/Resource/image/cameraList.png new file mode 100644 index 0000000..966cd46 Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/cameraList.png differ diff --git a/HX_CameraLoopPlay/Resource/image/close.png b/HX_CameraLoopPlay/Resource/image/close.png new file mode 100644 index 0000000..de4b0d9 Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/close.png differ diff --git a/HX_CameraLoopPlay/Resource/image/close_hover.png b/HX_CameraLoopPlay/Resource/image/close_hover.png new file mode 100644 index 0000000..f107eba Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/close_hover.png differ diff --git a/HX_CameraLoopPlay/Resource/image/combox_open.png b/HX_CameraLoopPlay/Resource/image/combox_open.png new file mode 100644 index 0000000..bc74c60 Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/combox_open.png differ diff --git a/HX_CameraLoopPlay/Resource/image/fixedpoint_title.png b/HX_CameraLoopPlay/Resource/image/fixedpoint_title.png new file mode 100644 index 0000000..f882432 Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/fixedpoint_title.png differ diff --git a/HX_CameraLoopPlay/Resource/image/flight.png b/HX_CameraLoopPlay/Resource/image/flight.png new file mode 100644 index 0000000..75ad29a Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/flight.png differ diff --git a/HX_CameraLoopPlay/Resource/image/focus.png b/HX_CameraLoopPlay/Resource/image/focus.png new file mode 100644 index 0000000..6ce66a6 Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/focus.png differ diff --git a/HX_CameraLoopPlay/Resource/image/fold.png b/HX_CameraLoopPlay/Resource/image/fold.png new file mode 100644 index 0000000..a037191 Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/fold.png differ diff --git a/HX_CameraLoopPlay/Resource/image/head.png b/HX_CameraLoopPlay/Resource/image/head.png new file mode 100644 index 0000000..1aa754f Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/head.png differ diff --git a/HX_CameraLoopPlay/Resource/image/head_yuquan.png b/HX_CameraLoopPlay/Resource/image/head_yuquan.png new file mode 100644 index 0000000..4927035 Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/head_yuquan.png differ diff --git a/HX_CameraLoopPlay/Resource/image/loopPlay.png b/HX_CameraLoopPlay/Resource/image/loopPlay.png new file mode 100644 index 0000000..aa838d4 Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/loopPlay.png differ diff --git a/HX_CameraLoopPlay/Resource/image/offline.png b/HX_CameraLoopPlay/Resource/image/offline.png new file mode 100644 index 0000000..5ac4aaa Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/offline.png differ diff --git a/HX_CameraLoopPlay/Resource/image/online.png b/HX_CameraLoopPlay/Resource/image/online.png new file mode 100644 index 0000000..f0a4a14 Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/online.png differ diff --git a/HX_CameraLoopPlay/Resource/image/rect.png b/HX_CameraLoopPlay/Resource/image/rect.png new file mode 100644 index 0000000..7d36bfe Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/rect.png differ diff --git a/HX_CameraLoopPlay/Resource/image/rect_select.png b/HX_CameraLoopPlay/Resource/image/rect_select.png new file mode 100644 index 0000000..62bf9b5 Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/rect_select.png differ diff --git a/HX_CameraLoopPlay/Resource/image/refresh.png b/HX_CameraLoopPlay/Resource/image/refresh.png new file mode 100644 index 0000000..d44b325 Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/refresh.png differ diff --git a/HX_CameraLoopPlay/Resource/image/unfold.png b/HX_CameraLoopPlay/Resource/image/unfold.png new file mode 100644 index 0000000..b42bbaf Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/unfold.png differ diff --git a/HX_CameraLoopPlay/Resource/image/videoControll.svg b/HX_CameraLoopPlay/Resource/image/videoControll.svg new file mode 100644 index 0000000..92acf5f --- /dev/null +++ b/HX_CameraLoopPlay/Resource/image/videoControll.svg @@ -0,0 +1,200 @@ + + + Created with Pixso. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HX_CameraLoopPlay/Resource/image/windowNum.png b/HX_CameraLoopPlay/Resource/image/windowNum.png new file mode 100644 index 0000000..6c2839d Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/windowNum.png differ diff --git a/HX_CameraLoopPlay/Resource/image/workface_title.png b/HX_CameraLoopPlay/Resource/image/workface_title.png new file mode 100644 index 0000000..f856ce6 Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/workface_title.png differ diff --git a/HX_CameraLoopPlay/Resource/image/yuquan_fixedpoint_title.png b/HX_CameraLoopPlay/Resource/image/yuquan_fixedpoint_title.png new file mode 100644 index 0000000..a9a31bf Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/yuquan_fixedpoint_title.png differ diff --git a/HX_CameraLoopPlay/Resource/image/yuquan_workface_title.png b/HX_CameraLoopPlay/Resource/image/yuquan_workface_title.png new file mode 100644 index 0000000..2955ba3 Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/yuquan_workface_title.png differ diff --git a/HX_CameraLoopPlay/Resource/image/zoom.png b/HX_CameraLoopPlay/Resource/image/zoom.png new file mode 100644 index 0000000..7d5a767 Binary files /dev/null and b/HX_CameraLoopPlay/Resource/image/zoom.png differ diff --git a/HX_CameraLoopPlay/main.cpp b/HX_CameraLoopPlay/main.cpp new file mode 100644 index 0000000..ceb2493 --- /dev/null +++ b/HX_CameraLoopPlay/main.cpp @@ -0,0 +1,21 @@ +/******************************************************************* + * @file main.cpp + * @brief Ƶֲ + * @author XuChao (xxu715737@163.com) + * @date 2024-10-22 + *********************************************************************/ +#include "CameraLoopPlay.h" +#include +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + + QDesktopWidget* desktop = QApplication::desktop(); + CameraLoopPlay w; + w.setGeometry(desktop->screenGeometry(0)); + w.show(); + + return a.exec(); +}