diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index f4b5e00..289d0f3 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -10,6 +10,7 @@ qt_add_executable(VideoClient communicationsettingdlg.h communicationsettingdlg.cpp communicationsettingdlg.ui commandwidget.h commandwidget.cpp commandwidget.ui streamaddrsettingsdlg.h streamaddrsettingsdlg.cpp streamaddrsettingsdlg.ui + videoControl.h videoControl.ui videoControl.cpp ) qt6_add_resources(VideoClient "resources" diff --git a/src/commandwidget.ui b/src/commandwidget.ui index 023afc0..b9161f4 100644 --- a/src/commandwidget.ui +++ b/src/commandwidget.ui @@ -6,235 +6,167 @@ 0 0 - 1039 - 105 + 295 + 541 Form - - - 4 - - - 2 - - - 4 - - - 4 - + - - - Qt::Orientation::Horizontal - - - - 40 - 20 - - - - - - - - 通信设置 - - - - res/settings.pngres/settings.png - - - - 32 - 32 - - - - - - - - 连接 - - - - - - - 断开 - - - - - - - - - - - 2 - - - 2 - - - 2 - - - 2 - - - 2 - - - - - 6 - - - 12 - - - - - 4-6图拼接 - - - - - - - 画中画开 - - - - - - - 画中画关 - - - - - - - 0-3图拼接 - - - - - - - 俯仰+ - - - - - - - 方位- - - - - - - - 方位+ - - - - - - - 扫描 - - - - - - - 红外小 - - - - - - - 锁定 - - - - - - - 吊舱 - - - - - - - 复位 - - - - - - - 变焦推远 - - - - - - - 变焦拉近 - - - - - - - 红外大 - - - - - - - 俯仰- - - - - - - - 图像切换 - - - - - - - - - - - - Qt::Orientation::Horizontal - - - - 40 - 20 - - - + + + + + 通信设置 + + + + res/settings.pngres/settings.png + + + + 32 + 32 + + + + + + + + 连接 + + + + + + + 断开 + + + + + + + 方位+ + + + + + + + 俯仰+ + + + + + + + 画中画开 + + + + + + + 方位- + + + + + + + 俯仰- + + + + + + + 画中画关 + + + + + + + 变焦推远 + + + + + + + 扫描 + + + + + + + 复位 + + + + + + + 变焦拉近 + + + + + + + 吊舱 + + + + + + + 锁定 + + + + + + + 红外小 + + + + + + + 图像切换 + + + + + + + 0-3图拼接 + + + + + + + 红外大 + + + + + + + 4-6图拼接 + + + + diff --git a/src/communicationsettingdlg.ui b/src/communicationsettingdlg.ui index 32b85e6..9e7ee6b 100644 --- a/src/communicationsettingdlg.ui +++ b/src/communicationsettingdlg.ui @@ -115,7 +115,7 @@ - QAbstractSpinBox::ButtonSymbols::NoButtons + QAbstractSpinBox::NoButtons 65534 @@ -137,7 +137,7 @@ - QAbstractSpinBox::ButtonSymbols::NoButtons + QAbstractSpinBox::NoButtons 65534 @@ -154,7 +154,7 @@ - Qt::Orientation::Horizontal + Qt::Horizontal @@ -179,7 +179,7 @@ - Qt::Orientation::Horizontal + Qt::Horizontal diff --git a/src/mainwindow.ui b/src/mainwindow.ui index 9630c6a..365c6a3 100644 --- a/src/mainwindow.ui +++ b/src/mainwindow.ui @@ -6,90 +6,199 @@ 0 0 - 800 - 600 + 1388 + 854 MainWindow - - - 2 - - - 2 - - - 2 - - - 2 - + - - - - - 2 + + + + + 1 - - 2 - - - 2 - - - 2 - - - 2 - - - - - - - - - - 2 - - - 2 - - - 2 - - - 2 - - - 2 - - - - + + + 2 - - - - - - - - + + 2 + + + 2 + + + 2 + + + - - + + + + + + 2 + + + 2 + + + 2 + + + 2 + + + + + 2 + + + + + + + + + + + + + + - - - - + + + + + + + + 2 + + + 2 + + + 2 + + + 2 + + + + + 14 + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + 00:00:00 + + + + + + + + 854 + 0 + + + + 24 + + + false + + + + + + + 00:00:00 + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + + + Qt::Orientation::Horizontal + + + + 40 + 20 + + + + + + + + @@ -101,7 +210,7 @@ 0 0 - 800 + 1388 24 @@ -111,7 +220,7 @@ VideoWidget QOpenGLWidget -
videowidget.h
+
videowidget.h
CommandWidget @@ -119,6 +228,12 @@
commandwidget.h
1
+ + VideoControl + QWidget +
videoControl.h
+ 1 +
diff --git a/src/resources/Qss/qss.qss b/src/resources/Qss/qss.qss index 7f364e7..28f5f34 100644 --- a/src/resources/Qss/qss.qss +++ b/src/resources/Qss/qss.qss @@ -1,6 +1,6 @@ /************************QWidget窗体设置****************************/ QWidget{ - background-color: rgb(50, 50, 50); + background-color: rgb(55,55,55); } /************************QPushButton按钮设置****************************/ @@ -34,6 +34,27 @@ QPushButton::disabled { +/**播放按钮样式**/ +QPushButton#medio{ + background: transparent; +} + +QPushButton#medio:hover { + + background-color: #646464; + border-color: #2f3640; + border-radius: 15px; + border-style: solid; + border-width: 1px; + padding: 1px; +} +QPushButton#medio:pressed { + background: transparent; +} + + + + /**************************QToolButton设置*************************/ QToolButton{ @@ -63,6 +84,7 @@ QToolButton::disabled { } + /**************************QLineEdit编辑框设置*************************/ QLineEdit{ color:rgb(255,255,255); diff --git a/src/resources/images/playFast.png b/src/resources/images/playFast.png new file mode 100644 index 0000000..7016141 Binary files /dev/null and b/src/resources/images/playFast.png differ diff --git a/src/resources/images/playMedio.png b/src/resources/images/playMedio.png new file mode 100644 index 0000000..cbb5e74 Binary files /dev/null and b/src/resources/images/playMedio.png differ diff --git a/src/resources/images/playSlow.png b/src/resources/images/playSlow.png new file mode 100644 index 0000000..e531731 Binary files /dev/null and b/src/resources/images/playSlow.png differ diff --git a/src/resources/images/stop.png b/src/resources/images/stop.png new file mode 100644 index 0000000..e18ff09 Binary files /dev/null and b/src/resources/images/stop.png differ diff --git a/src/resources/res.qrc b/src/resources/res.qrc index ab1dc5f..b6d2b67 100644 --- a/src/resources/res.qrc +++ b/src/resources/res.qrc @@ -25,5 +25,10 @@ images/playback.png images/videolayout1.png images/videolayout4.png + images/playMedio.png + images/stop.png + images/playFast.png + images/playSlow.png + diff --git a/src/videoControl.cpp b/src/videoControl.cpp new file mode 100644 index 0000000..02bc546 --- /dev/null +++ b/src/videoControl.cpp @@ -0,0 +1,37 @@ +#include "videoControl.h" +#include "ui_videoControl.h" + +VideoControl::VideoControl(QWidget *parent) : + QWidget(parent), + ui(new Ui::VideoControl) +{ + ui->setupUi(this); + // 其他初始化代码... + + + ui->pbPlayer->setIcon(QIcon(":/images/playMedio.png")); + ui->pbPlayer->setIconSize(QSize(56,56)); + ui->pbPlayer->setFixedSize(64, 64); + ui->pbPlayer->setObjectName("medio"); + // ui->pbPlayer->set + ui->pbStop->setIcon(QIcon(":/images/stop.png")); + ui->pbStop->setIconSize(QSize(42,42)); + ui->pbStop->setFixedSize(50, 50); + ui->pbStop->setObjectName("medio"); + + ui->pbFast->setIcon(QIcon(":/images/playFast.png")); + ui->pbFast->setIconSize(QSize(42,42)); + ui->pbFast->setFixedSize(50, 50); + ui->pbFast->setObjectName("medio"); + + + ui->pbSlow->setIcon(QIcon(":/images/playSlow.png")); + ui->pbSlow->setIconSize(QSize(42,42)); + ui->pbSlow->setFixedSize(50, 50); + ui->pbSlow->setObjectName("medio"); +} + +VideoControl::~VideoControl() +{ + delete ui; +} diff --git a/src/videoControl.h b/src/videoControl.h new file mode 100644 index 0000000..54f7282 --- /dev/null +++ b/src/videoControl.h @@ -0,0 +1,30 @@ +#ifndef VIDEOCONTROL_H +#define VIDEOCONTROL_H + +#include + + +namespace Ui { +class VideoControl; +} + + +class VideoControl : public QWidget { + Q_OBJECT + + + +public: + explicit VideoControl(QWidget *parent = nullptr); + ~VideoControl(); + + +private: + Ui::VideoControl *ui; + +}; + + +#endif // VIDEOCONTROL_H + + diff --git a/src/videoControl.ui b/src/videoControl.ui new file mode 100644 index 0000000..710f1e6 --- /dev/null +++ b/src/videoControl.ui @@ -0,0 +1,103 @@ + + + VideoControl + + + + 0 + 0 + 713 + 91 + + + + Form + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + 6 + + + QLayout::SetDefaultConstraint + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + false + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + +