From ee228485dc3352775bb7e289b650ba702683294e Mon Sep 17 00:00:00 2001 From: lenn Date: Thu, 25 Sep 2025 23:53:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8B=E4=B8=80=E6=AD=A5=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E6=97=8B=E8=BD=AC=E7=AD=89=E7=94=BB=E9=9D=A2=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 5 +- customslider.cpp | 2 +- displaywind.cpp | 30 +- homewindow.cpp | 109 +++-- homewindow.h | 15 +- homewindow.ui | 848 ++++++++++++++++++++----------------- logo.ico | Bin 22254 -> 0 bytes logo.png | Bin 4557 -> 0 bytes 播放器.png => res/logo.png | Bin res/qss/homewindow.css | 1 + res/qss/homewindow.qss | 82 +++- res/qss/show.css | 2 +- resource.qrc | 3 +- setting.cpp | 24 ++ setting.h | 15 + setting.ui | 526 ++++++++++++----------- 16 files changed, 940 insertions(+), 722 deletions(-) delete mode 100644 logo.ico delete mode 100644 logo.png rename 播放器.png => res/logo.png (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 49c4e10..a4a7759 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/customslider.cpp b/customslider.cpp index 670be62..fc48e35 100644 --- a/customslider.cpp +++ b/customslider.cpp @@ -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) diff --git a/displaywind.cpp b/displaywind.cpp index 5d44ce2..422c623 100644 --- a/displaywind.cpp +++ b/displaywind.cpp @@ -2,6 +2,7 @@ #include "ui_displaywind.h" #include #include +#include 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(); } diff --git a/homewindow.cpp b/homewindow.cpp index c490fcc..2a037d1 100644 --- a/homewindow.cpp +++ b/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() { - emit sig_troggleFull(true); + 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(); } diff --git a/homewindow.h b/homewindow.h index feff675..ded241b 100644 --- a/homewindow.h +++ b/homewindow.h @@ -5,6 +5,7 @@ #include #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); @@ -53,8 +57,8 @@ private slots: // 进度条响应 // 拖动触发 - // void on_playSliderValueChanged(); - // void on_volumeSliderValueChanged(); + // void on_playSliderValueChanged(); + // void on_volumeSliderValueChanged(); void on_updateCurrentPosition(long position); void onTimeOut(); @@ -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; }; diff --git a/homewindow.ui b/homewindow.ui index 620e569..732178b 100644 --- a/homewindow.ui +++ b/homewindow.ui @@ -6,7 +6,7 @@ 0 0 - 1115 + 1236 757 @@ -26,411 +26,465 @@ GDMP - + - - - - - 160 - 160 - 400 - 240 - - - - - 400 - 240 - - - - - - - - - - 720 - 160 - 240 - 240 - - - - - 240 - 0 - - - - - 240 - 16777215 - - - - - - - + + + 0 + + + 6 + + + + + + 0 + 0 + + + + + 0 + 0 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 400 + 240 + + + + + + + + + + + + + + + 0 + 0 + + + + + 800 + 128 + + + + + 16777215 + 95 + + + + + + + + + + 0 + 0 + + + + + 300 + 20 + + + + + 16777215 + 20 + + + + PointingHandCursor + + + 65536 + + + Qt::Horizontal + + + + + + + + 65 + 16777215 + + + + 20:10:00 + + + + + + + + 5 + 16777215 + + + + / + + + + + + + + 65 + 16777215 + + + + 24:00:00 + + + + + + + + + + + + 0 + 0 + + + + + + + + 64 + 64 + + + + + 64 + 64 + + + + + + + + + + + + 64 + 64 + + + + + 64 + 64 + + + + + + + + + + + + + + + 64 + 64 + + + + + 64 + 64 + + + + + + + + + + + + 64 + 64 + + + + + 64 + 64 + + + + + + + + + + + + 64 + 64 + + + + + 64 + 64 + + + + + + + + + + + + 64 + 64 + + + + + 64 + 64 + + + + + + + + + + + + 64 + 64 + + + + + 64 + 64 + + + + + + + + + + + + 0 + 0 + + + + + 100 + 20 + + + + + 100 + 20 + + + + PointingHandCursor + + + Qt::ClickFocus + + + Qt::Horizontal + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + 0 + + + + + + + + 64 + 64 + + + + + 64 + 64 + + + + + + + + + + + + 64 + 64 + + + + + 64 + 64 + + + + Qt::LeftToRight + + + + + + + + + + + 64 + 64 + + + + + 64 + 64 + + + + + + + + + + + + 64 + 64 + + + + + 64 + 64 + + + + + + + + + + + + + + + + - - - - 0 - 0 - - + - 800 - 128 + 240 + 0 - 16777215 - 95 + 240 + 16777215 - - - - - - - - 0 - 0 - - - - - 300 - 20 - - - - - 16777215 - 20 - - - - 65536 - - - Qt::Horizontal - - - - - - - - 65 - 16777215 - - - - 20:10:00 - - - - - - - - 5 - 16777215 - - - - / - - - - - - - - 65 - 16777215 - - - - 24:00:00 - - - - - - - - - - - - - - - 64 - 64 - - - - - 64 - 64 - - - - - - - - - - - - 64 - 64 - - - - - 64 - 64 - - - - - - - - - - - - 64 - 64 - - - - - 64 - 64 - - - - - - - - - - - - 64 - 64 - - - - - 64 - 64 - - - - - - - - - - - - 64 - 64 - - - - - 64 - 64 - - - - - - - - - - - - 64 - 64 - - - - - 64 - 64 - - - - - - - - - - - - 64 - 64 - - - - - 64 - 64 - - - - - - - - - - - - 0 - 0 - - - - - 100 - 20 - - - - - 100 - 20 - - - - Qt::Horizontal - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - 64 - 64 - - - - - 64 - 64 - - - - - - - - - - - - 64 - 64 - - - - - 64 - 64 - - - - - - - - - - - - 64 - 64 - - - - - 64 - 64 - - - - - - - - - - - - 64 - 64 - - - - - 64 - 64 - - - - - - - - - - - - - + + + @@ -440,8 +494,8 @@ 0 0 - 1115 - 22 + 1236 + 27 diff --git a/logo.ico b/logo.ico deleted file mode 100644 index 4a0d65d20e052f3d263a768251bfb19331b97486..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22254 zcmeHP32+qWnH_XM;&`+1A%Zb$%K-`$b4grl#|9fa4ws#^ox@3L&)mXSc{z(SGBC<0Lgq6maUpv&z1#`}=P?p8RnjH^w zR$o-VH4|-)(ul^<+2zLW@}2mf_0M8r+RaFs7mvZS;xR2d33ERBZ=5}UIwCvQ<3*j$ zX4HQ0tcr^z*90Y}4=mn~H7^dfH(S2jc7eOK4mF#92g{OvDmG>VJ~~d8+!)yYItDG~ZRA~N&=6Xjmr%GX8w39s zM{N28U=x5-Y7Bn)#v~kfd`bHDj=w=S{hCg6T(raS?yq6VjHTbi_`f#xU{}_zGOOicPhZn_4uW;tsaiIeoo(s zqXzl86%rr$J-ZJS;$&NvfV#5fz9FsnG>e+k7by#3!}^bolVFrg9*#?m!_SH)!CYVA zvva*2xLa!A`0zI{XNvD={$s>Rj*Z_{+=!8!Q}X)2zG5(%Ppl*DI;bxvF?HEkp9Trn zMyq_&Ip^PN7>Q2N-{^DC7Ei^gnxoep?_5olu&;fT`Xl`6?myJ)>=>9ch{qBh=XU>H z`>s%*thocwbf^d({&%waFs5dW#jrUV9?7XD-2E35?)b9_cg-?U$9aCf_>kx`J~9u~pq{#nVNP;?9>ui-K_)pY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nEJ?)jgk*?}DRM*7~ht zpSs20bKiSr2j}iti*nrEYpo!xRBU1y-~WZZyTEmomwD7{_>;yvEA>gqk~yEtV`Rzc z$GYt2jD3M?I;2nWx5MwTW=X&Z)-A@|sXIm~3*vA;`#&1L+}CjIy}31cM}4U(7|FR6 z=9GGj^K#7SPxduGVLzmb#)ESonY%w|*~cDJqJ|SSYP9&3kAJL<`F%L^hIbB@T-W>x zhn~#6*_c0RzT}@r6s=Nn`f_f63g^%o!~MDMe3|)k>h$ftJV3{2Y-&92O;5z8qwo5z z{pKC8ZsGc(x{rR#b+b1^S=yKLWXuop??C;IS#xgtn$oJh_`~|=sW~@eIM?<~ zT6_oQe*AmvulfSv*0_C>@RB(V7w5a%YQ5S?|}|t$Xd#^>g8&G zx3@N;*GCbEA`nF&ia->BC<0Lgq6kD0h$0Y0Ac{Z~fhYn|1iB*-@ITayeu*LwMc}F- F@c++MK|ufj diff --git a/logo.png b/logo.png deleted file mode 100644 index 0c85b1331b57441b5f29086c244c466a427aa91f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4557 zcmV;;5i;(HP)V*r#ps0u!*>seL z&N!fe9Y9b7SycpvB8xy<)-LImwrTd9`TmonP13YIE$wrkJ5S!n0!_~Om-qjc_xt}} zP9VUC1|j>u9>D(x_(+lfA4wA6BS`{$BuRjeBnj}5Bmq8>B)~_K1o%jj03S&b;3G)_ zd?ZPLytO;1GTD%;wV=Xig+&0ORWh^>Rlr}~wDqYr>5)@*hyKzr z-O*|!vHh1{?&-1q7ag*0R})!)l|D^SahTFYjaMHEK~zBF-P;5Kr}BQrr$1%l%e>R5 z(3K-TI2uoN8-^(lK8XSC`hl0Vu0wFGwV(7`sR@&J7vX%h6*ksUZI@8cpUG-q=i~&0 z`ST67b1Lr_JoEW1^#YQ~6>n_e!2@nL% zWoq^(%=GiUPQc_{1;{No!`muZZ8rRP^DO=&^CjF9tn?bkmbB)3o6U+_W&@tvwE)}C z?t;-`YU!!ephZbyQ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-X$QGp zw|cfx{#m5Q$Q=bJ;$`m1vu0!zV2S6|gH@P6II3R9V6UZYo{Yn{es-jJ&vs-O64efw z6E~nuXk1gLYM)PYUW!!7v3@jJR0OS(g?A5(u-_eGCn|FemQXNv*HH%2Ia|(^A$5BJ z3gmLnYeynjUQ3{nz4urU<`0UZ_Pp=)+}7q}?AGZxoO=o!J9+T{JIEZUj+N#H*z5k6oLoqmBX+OJj-G8Sb-JcZn zXA?hYa*+0h7P-WgQ*Oem6s-3ZSYY!wv=vY1#H%;<15M6PR(I85*Fn)l)ryCMFtc|E zF63XqEXr1AOLM`IAhfYjwruhvf|v!ZNnL^mV>;jO)azZqr`o%n)*WM-T zk~Qvx-u~ugay$~-k!rE!=o#Cs z#Rw9|*kUaaB2+xqjf}!XwrOu_T+gxtj6T6~d^$RWVpe3$=hFs0i$%#Zpt2afp4NDR zCo4>C+nW-}YRRQWQ_w2+xQnYTSpGvXwp}(-CC?^U_jV{-=p;3dHABNNyqy}n2M<+7 z9X|On6AQlnBdipJIn*;uVmdjtGu|6X)qGs{7PX+7v9{J_cUE@HKTwSAw@fgz{Uf0^ zz_J_so&7m%NeRP{M9<3&?#Mj18}t6L9HnC1k;65MF<0#u9)~UC-bIhtF0C;Q5v@iN zLw=PRAD%A9rYkyVMOjTQNJ29;UWtr{LoqPE@lzLeBlr0Allbi1F6_xUjY?Am=`s^K z5h*DT48WX0)6g}lV{1)8M5~g-U?hcox!8o?%FU>>2uL6o>m8*;jJolCAy?>3dgM|O zTV<{SyWkrc7>T&x7^oEftv7fFTAieS2l)PfHwo~OBmq8>B)~_K1o%jj03S&b;3G)_ rd?ZPLk0c53kt6{=k|e-Kk_7w 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; diff --git a/res/qss/show.css b/res/qss/show.css index bfd3697..d30b415 100644 --- a/res/qss/show.css +++ b/res/qss/show.css @@ -3,4 +3,4 @@ QWidget{ color:white; border: 1px solid black; border-bottom: none; -} +} \ No newline at end of file diff --git a/resource.qrc b/resource.qrc index 5588cc1..ff9fd80 100644 --- a/resource.qrc +++ b/resource.qrc @@ -1,6 +1,6 @@ - logo.ico + res/logo.png res/qss/homewindow.qss @@ -16,6 +16,7 @@ res/radiobutton_checked.png res/radiobutton_checked_disable.png res/radiobutton_unchecked.png + res/qss/show.css res/icon/fast-backward.png diff --git a/setting.cpp b/setting.cpp index b154a29..675e86a 100644 --- a/setting.cpp +++ b/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()); +} + diff --git a/setting.h b/setting.h index d0604bd..933dbd6 100644 --- a/setting.h +++ b/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; }; diff --git a/setting.ui b/setting.ui index a1e1ba6..2dee731 100644 --- a/setting.ui +++ b/setting.ui @@ -13,255 +13,291 @@ Form - + - 80 - 90 - 274 - 79 + 180 + 200 + 45 + 22 - - - - - - 60 - 0 - - - - - 70 - 30 - - - - 音频缓存 - - - - - - - - 0 - 0 - - - - - 50 - 0 - - - - - 60 - 16777215 - - - - 视频缓存 - - - - - - - - 0 - 0 - - - - - 80 - 30 - - - - - 30ms - - - - - 100ms - - - - - 200ms - - - - - 400ms - - - - - 600ms - - - - - 800ms - - - - - 1000ms - - - - - - - - - 60 - 0 - - - - - 70 - 30 - - - - 视频缓存 - - - - - - - - 0 - 0 - - - - - 80 - 30 - - - - - 30ms - - - - - 100ms - - - - - 200ms - - - - - 400ms - - - - - 600ms - - - - - 800ms - - - - - 1000ms - - - - - 2000ms - - - - - 4000ms - - - - - - - - - 50 - 0 - - - - - 60 - 16777215 - - - - 音频缓存 - - - - - - - - 40 - 0 - - - - - 60 - 16777215 - - - - 缓存阈值 - - - - - - - - 0 - 0 - - - - - 40 - 0 - - - - - 60 - 16777215 - - - - 抖动值 - - - - + + + 0 + 0 + + + + + 40 + 0 + + + + + 60 + 16777215 + + + + 抖动值 + + + + + + 250 + 160 + 80 + 30 + + + + + 0 + 0 + + + + + 80 + 30 + + + + + 30ms + + + + + 100ms + + + + + 200ms + + + + + 400ms + + + + + 600ms + + + + + 800ms + + + + + 1000ms + + + + + 2000ms + + + + + 4000ms + + + + + + + 250 + 80 + 64 + 30 + + + + + 60 + 0 + + + + + 70 + 30 + + + + 音频缓存 + + + + + + 180 + 120 + 60 + 30 + + + + + 0 + 0 + + + + + 50 + 0 + + + + + 60 + 16777215 + + + + 视频缓存 + + + + + + 180 + 160 + 60 + 30 + + + + + 40 + 0 + + + + + 60 + 16777215 + + + + 缓存阈值 + + + + + + 250 + 200 + 80 + 30 + + + + + 0 + 0 + + + + + 80 + 30 + + + + + 30ms + + + + + 100ms + + + + + 200ms + + + + + 400ms + + + + + 600ms + + + + + 800ms + + + + + 1000ms + + + + + + + 180 + 80 + 60 + 30 + + + + + 50 + 0 + + + + + 60 + 16777215 + + + + 音频缓存 + + + + + + 250 + 120 + 64 + 30 + + + + + 60 + 0 + + + + + 70 + 30 + + + + 视频缓存 +