下一步完善旋转等画面功能
This commit is contained in:
@@ -6,13 +6,14 @@ find_package(Qt6 6.5 REQUIRED COMPONENTS Core Widgets)
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/log
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/third_party/FFmpeg/include
|
||||
"~/ffmpeg4.2_build/include"
|
||||
# ${CMAKE_CURRENT_SOURCE_DIR}/third_party/FFmpeg/include
|
||||
)
|
||||
file(GLOB EASYLOG_SOURCES "log/*.cc" "log/*.h")
|
||||
file(GLOB UI_SOURCES "*.ui")
|
||||
file(GLOB SOURCES "*.cpp" "*.h")
|
||||
|
||||
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/third_party/FFmpeg/lib)
|
||||
link_directories("~/ffmpeg4.2_build/lib")
|
||||
|
||||
find_package(SDL2 REQUIRED)
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ void CustomSlider::mouseReleaseEvent(QMouseEvent *ev)
|
||||
bIsPressed = false;
|
||||
QSlider::mouseReleaseEvent(ev);
|
||||
|
||||
//emit SigCustomSliderValueChanged();
|
||||
emit SigCustomSliderValueChanged(this->value());
|
||||
}
|
||||
|
||||
void CustomSlider::mouseMoveEvent(QMouseEvent *ev)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include "ui_displaywind.h"
|
||||
#include <QDebug>
|
||||
#include <QPainter>
|
||||
#include <globalhelper.h>
|
||||
DisplayWind::DisplayWind(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::DisplayWind),
|
||||
@@ -9,6 +10,7 @@ DisplayWind::DisplayWind(QWidget *parent) :
|
||||
// stParentWidget_(parent)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
// this->setStyleSheet(GlobalHelper::GetQssStr(":/res/qss/show.css"));
|
||||
win_width_ = width();
|
||||
win_height_ = height();
|
||||
memset(&dst_video_frame_, sizeof(VideoFrame), 0);
|
||||
@@ -128,8 +130,19 @@ void DisplayWind::enterFullScreen()
|
||||
}
|
||||
setParent(nullptr);
|
||||
}
|
||||
setWindowFlags(Qt::Window);
|
||||
showFullScreen();
|
||||
setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
|
||||
|
||||
QScreen *currentScreen = screen() ? screen() : QGuiApplication::primaryScreen();
|
||||
if (currentScreen) {
|
||||
QRect availableGeometry = currentScreen->availableGeometry();
|
||||
this->setGeometry(availableGeometry);
|
||||
this->setStyleSheet("background-color: black;");
|
||||
show();
|
||||
}
|
||||
else {
|
||||
show();
|
||||
}
|
||||
// showFullScreen();
|
||||
|
||||
setFocus();
|
||||
|
||||
@@ -144,7 +157,7 @@ void DisplayWind::exitFullScreen()
|
||||
|
||||
bIsFull_ = false;
|
||||
setWindowFlags(Qt::Widget);
|
||||
hide();
|
||||
// hide();
|
||||
|
||||
if (stParentWidget_) {
|
||||
setParent(stParentWidget_);
|
||||
@@ -158,12 +171,13 @@ void DisplayWind::exitFullScreen()
|
||||
setGeometry(stOriginalGeometry_);
|
||||
}
|
||||
}
|
||||
resize(nWinWidthBack_, nWinHeightBack_);
|
||||
show();
|
||||
|
||||
// show();
|
||||
// resize(nWinWidthBack_, nWinHeightBack_);
|
||||
setFocus();
|
||||
stParentLayout_ = nullptr;
|
||||
nParentLayoutIndex_ = 0;
|
||||
stOriginalGeometry_ = QRect();
|
||||
// stParentLayout_ = nullptr;
|
||||
// nParentLayoutIndex_ = 0;
|
||||
// stOriginalGeometry_ = QRect();
|
||||
|
||||
emit signalFullScreenChanged();
|
||||
}
|
||||
|
||||
107
homewindow.cpp
107
homewindow.cpp
@@ -43,6 +43,7 @@ HomeWindow::HomeWindow(QWidget *parent) :
|
||||
bIsFull(false)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setWindowIcon(QIcon(":/logo/res/logo.png"));
|
||||
ui->playList->Init();
|
||||
QString str = QString("%1:%2:%3").arg(0, 2, 10, QLatin1Char('0')).arg(0, 2, 10, QLatin1Char('0')).arg(0, 2, 10, QLatin1Char('0'));
|
||||
ui->curPosition->setText(str);
|
||||
@@ -94,6 +95,8 @@ int HomeWindow::InitSignalsAndSlots()
|
||||
connect(ui->openUrlAction, &QAction::triggered, this, &HomeWindow::on_openNetworkUrl);
|
||||
connect(this, &HomeWindow::sig_updatePlayOrPause, this, &HomeWindow::on_updatePlayOrPause);
|
||||
connect(this, &HomeWindow::sig_troggleFull, ui->display, &DisplayWind::onToggleFullScreen);
|
||||
connect(&setting_wid_, &Setting::sig_bufDurationBox_currentIndexChanged, this, &HomeWindow::on_bufDurationBox_currentIndexChanged);
|
||||
connect(&setting_wid_, &Setting::sig_jitterBufBox_currentIndexChanged, this, &HomeWindow::on_jitterBufBox_currentIndexChanged);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -188,49 +191,52 @@ void HomeWindow::resizeEvent(QResizeEvent *event)
|
||||
|
||||
void HomeWindow::resizeUI()
|
||||
{
|
||||
int width = this->width();
|
||||
int height = this->height();
|
||||
LOG(INFO) << "width: " << width;
|
||||
// 获取当前ctrlwidget的位置
|
||||
QRect rect = ui->ctrlBar->geometry();
|
||||
rect.setY(height - ui->menuBar->height() - rect.height());
|
||||
// LOG(INFO) << "rect: " << rect;
|
||||
rect.setWidth(width);
|
||||
ui->ctrlBar->setGeometry(rect);
|
||||
// 设置setting和listbutton的位置
|
||||
rect = ui->settingBtn->geometry();
|
||||
// 获取 ctrlBar的大小 计算list的 x位置
|
||||
int x1 = ui->ctrlBar->width() - rect.width() - rect.width() / 8 * 2;
|
||||
ui->listBtn->setGeometry(x1, rect.y(), rect.width(), rect.height());
|
||||
// LOG(INFO) << "listBtn: " << ui->listBtn->geometry();
|
||||
// 设置setting button的位置,在listbutton左侧
|
||||
rect = ui->listBtn->geometry();
|
||||
x1 = rect.x() - rect.width() - rect.width() / 8 ;
|
||||
ui->settingBtn->setGeometry(x1, rect.y(), rect.width(), rect.height());
|
||||
// LOG(INFO) << "settingBtn: " << ui->settingBtn->geometry();
|
||||
// 设置 显示画面
|
||||
if(is_show_file_list_) {
|
||||
width = this->width() - ui->playList->width();
|
||||
} else {
|
||||
width = this->width();
|
||||
}
|
||||
height = this->height() - ui->ctrlBar->height() - ui->menuBar->height();
|
||||
// int y1 = ui->menuBar->height();
|
||||
int y1 = 0;
|
||||
ui->display->setGeometry(0, y1, width, height);
|
||||
// 设置文件列表 list
|
||||
if(is_show_file_list_) {
|
||||
ui->playList->setGeometry(ui->display->width(), y1, ui->playList->width(), height);
|
||||
}
|
||||
// 设置播放进度条的长度,设置成和显示控件宽度一致
|
||||
rect = ui->playSlider->geometry();
|
||||
width = ui->display->width() - 5 - 5;
|
||||
rect.setWidth(width);
|
||||
ui->playSlider->setGeometry(5, rect.y(), rect.width(), rect.height());
|
||||
// 设置音量条位置
|
||||
x1 = this->width() - 5 - ui->volumeSlider->width();
|
||||
rect = ui->volumeSlider->geometry();
|
||||
ui->volumeSlider->setGeometry(x1, rect.y(), rect.width(), rect.height());
|
||||
int width = ui->playwidget->width();
|
||||
int height = ui->playwidget->height();
|
||||
QRect rect = ui->playwidget->geometry();
|
||||
qDebug() << rect;
|
||||
ui->display->setGeometry(rect);
|
||||
// LOG(INFO) << "width: " << width;
|
||||
// // 获取当前ctrlwidget的位置
|
||||
// QRect rect = ui->ctrlBar->geometry();
|
||||
// rect.setY(height - ui->menuBar->height() - rect.height());
|
||||
// // LOG(INFO) << "rect: " << rect;
|
||||
// rect.setWidth(width);
|
||||
// ui->ctrlBar->setGeometry(rect);
|
||||
// // 设置setting和listbutton的位置
|
||||
// rect = ui->settingBtn->geometry();
|
||||
// // 获取 ctrlBar的大小 计算list的 x位置
|
||||
// int x1 = ui->ctrlBar->width() - rect.width() - rect.width() / 8 * 2;
|
||||
// ui->listBtn->setGeometry(x1, rect.y(), rect.width(), rect.height());
|
||||
// // LOG(INFO) << "listBtn: " << ui->listBtn->geometry();
|
||||
// // 设置setting button的位置,在listbutton左侧
|
||||
// rect = ui->listBtn->geometry();
|
||||
// x1 = rect.x() - rect.width() - rect.width() / 8 ;
|
||||
// ui->settingBtn->setGeometry(x1, rect.y(), rect.width(), rect.height());
|
||||
// // LOG(INFO) << "settingBtn: " << ui->settingBtn->geometry();
|
||||
// // 设置 显示画面
|
||||
// if(is_show_file_list_) {
|
||||
// width = this->width() - ui->playList->width();
|
||||
// } else {
|
||||
// width = this->width();
|
||||
// }
|
||||
// height = this->height() - ui->ctrlBar->height() - ui->menuBar->height();
|
||||
// // int y1 = ui->menuBar->height();
|
||||
// int y1 = 0;
|
||||
// ui->display->setGeometry(0, y1, width, height);
|
||||
// // 设置文件列表 list
|
||||
// if(is_show_file_list_) {
|
||||
// ui->playList->setGeometry(ui->display->width(), y1, ui->playList->width(), height);
|
||||
// }
|
||||
// // 设置播放进度条的长度,设置成和显示控件宽度一致
|
||||
// rect = ui->playSlider->geometry();
|
||||
// width = ui->display->width() - 5 - 5;
|
||||
// rect.setWidth(width);
|
||||
// ui->playSlider->setGeometry(5, rect.y(), rect.width(), rect.height());
|
||||
// // 设置音量条位置
|
||||
// x1 = this->width() - 5 - ui->volumeSlider->width();
|
||||
// rect = ui->volumeSlider->geometry();
|
||||
// ui->volumeSlider->setGeometry(x1, rect.y(), rect.width(), rect.height());
|
||||
}
|
||||
|
||||
void HomeWindow::closeEvent(QCloseEvent *event)
|
||||
@@ -448,9 +454,10 @@ void HomeWindow::on_playOrPauseBtn_clicked()
|
||||
void HomeWindow::on_updatePlayOrPause(int state)
|
||||
{
|
||||
if(state == MP_STATE_STARTED) {
|
||||
ui->playOrPauseBtn->setText("暂停");
|
||||
// ui->playOrPauseBtn->setText("暂停");
|
||||
GlobalHelper::SetToolbuttonIcon(ui->playOrPauseBtn, ":/icon/res/icon/pause.png");
|
||||
} else {
|
||||
ui->playOrPauseBtn->setText("播放");
|
||||
GlobalHelper::SetToolbuttonIcon(ui->playOrPauseBtn, ":/icon/res/icon/play.png");
|
||||
}
|
||||
LOG(INFO) << "play state: " << state;
|
||||
}
|
||||
@@ -566,7 +573,7 @@ bool HomeWindow::stop()
|
||||
real_time_ = 0;
|
||||
is_accelerate_speed_ = false;
|
||||
ui->display->StopPlay(); // 停止渲染,后续刷黑屏
|
||||
ui->playOrPauseBtn->setText("播放");
|
||||
GlobalHelper::SetToolbuttonIcon(ui->playOrPauseBtn, ":/icon/res/icon/play.png");
|
||||
return 0;
|
||||
} else {
|
||||
return -1;
|
||||
@@ -747,6 +754,14 @@ void HomeWindow::on_backFastBtn_clicked()
|
||||
|
||||
void HomeWindow::on_fullBtn_clicked()
|
||||
{
|
||||
if (mp_ && ((mp_->ijkmp_get_state() == MP_STATE_STARTED) || (mp_->ijkmp_get_state() == MP_STATE_PAUSED))) {
|
||||
emit sig_troggleFull(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void HomeWindow::on_settingBtn_clicked()
|
||||
{
|
||||
setting_wid_.show();
|
||||
}
|
||||
|
||||
|
||||
11
homewindow.h
11
homewindow.h
@@ -5,6 +5,7 @@
|
||||
#include <QTimer>
|
||||
#include "toast.h"
|
||||
#include "ijkmediaplayer.h"
|
||||
#include "setting.h"
|
||||
namespace Ui
|
||||
{
|
||||
class HomeWindow;
|
||||
@@ -36,6 +37,9 @@ signals:
|
||||
|
||||
void sig_stopped(); // 被动停止
|
||||
void sig_troggleFull(bool);
|
||||
public slots:
|
||||
void on_bufDurationBox_currentIndexChanged(int index);
|
||||
void on_jitterBufBox_currentIndexChanged(int index);
|
||||
private slots:
|
||||
void on_UpdateAudioCacheDuration(int64_t duration);
|
||||
void on_UpdateVideoCacheDuration(int64_t duration);
|
||||
@@ -65,9 +69,7 @@ private slots:
|
||||
|
||||
void on_screenBtn_clicked();
|
||||
void on_showTips(Toast::Level leve, QString tips);
|
||||
void on_bufDurationBox_currentIndexChanged(int index);
|
||||
|
||||
void on_jitterBufBox_currentIndexChanged(int index);
|
||||
|
||||
void on_prevBtn_clicked();
|
||||
|
||||
@@ -79,6 +81,8 @@ private slots:
|
||||
|
||||
void on_fullBtn_clicked();
|
||||
|
||||
void on_settingBtn_clicked();
|
||||
|
||||
private:
|
||||
|
||||
void startTimer();
|
||||
@@ -140,6 +144,9 @@ private:
|
||||
int64_t audio_bitrate_duration = 0;
|
||||
int64_t video_bitrate_duration = 0;
|
||||
|
||||
// setting dialog
|
||||
Setting setting_wid_;
|
||||
|
||||
bool bIsFull;
|
||||
};
|
||||
|
||||
|
||||
124
homewindow.ui
124
homewindow.ui
@@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1115</width>
|
||||
<width>1236</width>
|
||||
<height>757</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -26,53 +26,59 @@
|
||||
<string>GDMP</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralWidget">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QWidget" name="playwidget" native="true">
|
||||
<widget class="DisplayWind" name="display" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>160</x>
|
||||
<y>160</y>
|
||||
<width>400</width>
|
||||
<height>240</height>
|
||||
</rect>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>240</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="Playlist" name="playList" native="true">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>720</x>
|
||||
<y>160</y>
|
||||
<width>240</width>
|
||||
<height>240</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>240</width>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<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="DisplayWind" name="display" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>240</width>
|
||||
<height>16777215</height>
|
||||
<width>400</width>
|
||||
<height>240</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
@@ -101,7 +107,7 @@
|
||||
<item>
|
||||
<widget class="CustomSlider" name="playSlider">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -118,6 +124,9 @@
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>65536</number>
|
||||
</property>
|
||||
@@ -171,6 +180,12 @@
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QToolButton" name="playOrPauseBtn">
|
||||
@@ -205,6 +220,9 @@
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
@@ -325,6 +343,12 @@
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="cursor">
|
||||
<cursorShape>PointingHandCursor</cursorShape>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::ClickFocus</enum>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
@@ -348,6 +372,12 @@
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="ctrlrightWidget" native="true">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QToolButton" name="screenBtn">
|
||||
@@ -382,6 +412,9 @@
|
||||
<height>64</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::LeftToRight</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
@@ -434,14 +467,35 @@
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Playlist" name="playList" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>240</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>240</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menuBar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1115</width>
|
||||
<height>22</height>
|
||||
<width>1236</width>
|
||||
<height>27</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu_2">
|
||||
|
||||
|
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 4.1 KiB |
@@ -6,6 +6,7 @@ QMainWindow {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
|
||||
.QToolButton {
|
||||
background-color: transparent;
|
||||
border-style: none;
|
||||
|
||||
@@ -1,27 +1,77 @@
|
||||
/*#COLOR#;MAIN_COLOR=#45b0c4;BTN_HOVER_COLOR=#6bc3ce;BTN_PRESSED_COLOR=#30889b;ITEM_HOVER_COLOR=#f1fcfc;ITEM_SELECTED_COLOR=#e9f4f4*/
|
||||
/**********窗口样式*************/
|
||||
|
||||
QMainWindow {
|
||||
/* background: #FFFFFF; */
|
||||
border-style: none;
|
||||
color: white;
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
.QToolButton {
|
||||
background-color: transparent;
|
||||
/* border-style: none; */
|
||||
border: 1px solid #FFFFFF;
|
||||
/* icon-size: 48px; */
|
||||
padding: 8px;
|
||||
/* margin: 2px; */
|
||||
/* transition: all 0.3s ease; */
|
||||
QWidget {
|
||||
border-style: none;
|
||||
color: white;
|
||||
background-color: black;
|
||||
}
|
||||
.QToolButton::hover {
|
||||
|
||||
|
||||
QWidget#ctrlBar > QLabel {
|
||||
color: white;
|
||||
}
|
||||
|
||||
QPushButton {
|
||||
color: white;
|
||||
}
|
||||
|
||||
QSlider::groove:horizontal, QSlider::add-page:horizontal {
|
||||
background-color: #F3F4F4;
|
||||
height: 8px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
QSlider::sub-page:horizontal {
|
||||
height: 8px;
|
||||
border-radius: 3px;
|
||||
background-color: #F56C3C;
|
||||
}
|
||||
QSlider::handle:horizontal {
|
||||
width: 13px;
|
||||
margin-top: -3px;
|
||||
margin-bottom: -3px;
|
||||
border-radius: 6px;;
|
||||
background-color: #F56C3C;
|
||||
}
|
||||
QSlider::handle:horizontal:hover {
|
||||
background-color: #ef794e;
|
||||
}
|
||||
|
||||
QListView {
|
||||
border: none;
|
||||
selection-background-color: #F56C3C;
|
||||
outline: 0px;
|
||||
}
|
||||
|
||||
QListView::item {
|
||||
padding: 5px;
|
||||
margin: 0px;
|
||||
size: 16px;
|
||||
}
|
||||
|
||||
QListView::item:selected {
|
||||
color: white;
|
||||
background-color: #F56C3C;
|
||||
}
|
||||
|
||||
QListView::item:hover {
|
||||
color: white;
|
||||
background-color: #ef794e;
|
||||
}
|
||||
|
||||
QToolButton {
|
||||
background-color: transparent;
|
||||
border-style: none;
|
||||
/* icon-size: 60px; */
|
||||
padding: 3px;
|
||||
|
||||
|
||||
padding: 10px;
|
||||
}
|
||||
QToolButton:hover {
|
||||
background-color: transparent;
|
||||
border-style: none;
|
||||
padding: 0px;
|
||||
}
|
||||
/*QGroupBox#typeGroupBox{
|
||||
border:1px solid #45b0c4;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<RCC>
|
||||
<qresource prefix="/logo">
|
||||
<file>logo.ico</file>
|
||||
<file>res/logo.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/">
|
||||
<file>res/qss/homewindow.qss</file>
|
||||
@@ -16,6 +16,7 @@
|
||||
<file>res/radiobutton_checked.png</file>
|
||||
<file>res/radiobutton_checked_disable.png</file>
|
||||
<file>res/radiobutton_unchecked.png</file>
|
||||
<file>res/qss/show.css</file>
|
||||
</qresource>
|
||||
<qresource prefix="/icon">
|
||||
<file>res/icon/fast-backward.png</file>
|
||||
|
||||
24
setting.cpp
24
setting.cpp
@@ -16,3 +16,27 @@ Setting::~Setting()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void Setting::on_bufDurationBox_currentIndexChanged(int index)
|
||||
{
|
||||
emit sig_bufDurationBox_currentIndexChanged(index);
|
||||
}
|
||||
|
||||
|
||||
void Setting::on_jitterBufBox_currentIndexChanged(int index)
|
||||
{
|
||||
emit sig_jitterBufBox_currentIndexChanged(index);
|
||||
}
|
||||
|
||||
|
||||
void Setting::on_audioBufEdit_editingFinished()
|
||||
{
|
||||
emit sig_audioBufEdit_textChangded(ui->audioBufEdit->text());
|
||||
}
|
||||
|
||||
|
||||
void Setting::on_videoBufEdit_editingFinished()
|
||||
{
|
||||
emit sig_videoBufEdit_textChangded(ui->videoBufEdit->text());
|
||||
}
|
||||
|
||||
|
||||
15
setting.h
15
setting.h
@@ -15,6 +15,21 @@ public:
|
||||
explicit Setting(QWidget *parent = nullptr);
|
||||
~Setting();
|
||||
|
||||
signals:
|
||||
void sig_bufDurationBox_currentIndexChanged(int);
|
||||
void sig_jitterBufBox_currentIndexChanged(int);
|
||||
void sig_audioBufEdit_textChangded(QString);
|
||||
void sig_videoBufEdit_textChangded(QString);
|
||||
|
||||
private slots:
|
||||
void on_bufDurationBox_currentIndexChanged(int index);
|
||||
|
||||
void on_jitterBufBox_currentIndexChanged(int index);
|
||||
|
||||
void on_audioBufEdit_editingFinished();
|
||||
|
||||
void on_videoBufEdit_editingFinished();
|
||||
|
||||
private:
|
||||
Ui::Setting *ui;
|
||||
};
|
||||
|
||||
262
setting.ui
262
setting.ui
@@ -13,37 +13,15 @@
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>80</x>
|
||||
<y>90</y>
|
||||
<width>274</width>
|
||||
<height>79</height>
|
||||
<x>180</x>
|
||||
<y>200</y>
|
||||
<width>45</width>
|
||||
<height>22</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="audioBufEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>音频缓存</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
@@ -52,7 +30,7 @@
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
<width>40</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
@@ -63,82 +41,18 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>视频缓存</string>
|
||||
<string>抖动值</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QComboBox" name="jitterBufBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<widget class="QComboBox" name="bufDurationBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>160</y>
|
||||
<width>80</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</rect>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>30ms</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>100ms</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>200ms</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>400ms</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>600ms</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>800ms</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1000ms</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLineEdit" name="videoBufEdit">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>视频缓存</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QComboBox" name="bufDurationBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
@@ -197,9 +111,46 @@
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<widget class="QLineEdit" name="audioBufEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>80</y>
|
||||
<width>64</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>音频缓存</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>180</x>
|
||||
<y>120</y>
|
||||
<width>60</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>50</width>
|
||||
@@ -213,12 +164,18 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>音频缓存</string>
|
||||
<string>视频缓存</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>180</x>
|
||||
<y>160</y>
|
||||
<width>60</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
@@ -235,18 +192,75 @@
|
||||
<string>缓存阈值</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<widget class="QComboBox" name="jitterBufBox">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>200</y>
|
||||
<width>80</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>80</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>30ms</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>100ms</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>200ms</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>400ms</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>600ms</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>800ms</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>1000ms</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>180</x>
|
||||
<y>80</y>
|
||||
<width>60</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<width>50</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
@@ -257,11 +271,33 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>抖动值</string>
|
||||
<string>音频缓存</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<widget class="QLineEdit" name="videoBufEdit">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>250</x>
|
||||
<y>120</y>
|
||||
<width>64</width>
|
||||
<height>30</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>60</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>70</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>视频缓存</string>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<resources/>
|
||||
|
||||
Reference in New Issue
Block a user