資源簡介
流媒體播放器(接收音頻廣播、電視直播)。基于Qt+LibVLC編寫,壓縮包內是項目文件夾和LibVLC的SDK。

代碼片段和文件信息
#include?“fulldialog.h“
#include?“ui_fulldialog.h“
#include?
fullDialog::fullDialog(QWidget?*parent)?:
????QDialog(parent)
????ui(new?Ui::fullDialog)
{
????ui->setupUi(this);
????ui->ctrlWidget->setMouseTracking(true);
????ui->ctrlWidget->installEventFilter(this);
????ui->disWidget->setAttribute(Qt::WA_TransparentForMouseEvents);
????isHide?=?true;
????ctrlHeight?=?60;
????fWidth?=?QApplication::desktop()->width();
????fHeight?=?QApplication::desktop()->height();
????//根據屏幕大小設置控件位置。
????this->resize(QApplication::desktop()->size());
????ui->disWidget->setGeometry(00?fWidth?fHeight);
????ui->ctrlWidget->setGeometry(0fHeight-1?fWidthctrlHeight);
????//設置浮動條中的控件布局。
????int?objectY?=?(ui->ctrlWidget->height()-ui->lastButton->height())?/?2;
????int?objectW?=?ui->lastButton->width();
????int?space?=?(this->width()?-?objectW*5)?/?15;
????ui->lastButton->move(space*5?objectY);
????ui->pauseButton->move(space*6+objectW?objectY);
????ui->playButton->move(ui->pauseButton->pos());
????ui->nextButton->move(space*7+objectW*2?objectY);
????ui->refreshButton->move(space*9+objectW*3?objectY);
????ui->fullButton->move(space*10+objectW*4?objectY);
????/********信號與槽********/
????//上個電臺
????connect(ui->lastButton?SIGNAL(clicked(bool))?this?SIGNAL(lastStation()));
????connect(ui->lastButton?SIGNAL(clicked(bool))?this?SLOT(showPause()));
????//暫停
????connect(ui->pauseButton?SIGNAL(clicked(bool))?this?SIGNAL(pause()));
????connect(ui->pauseButton?SIGNAL(clicked(bool))?this?SLOT(showPlay()));
????//播放
????connect(ui->playButton?SIGNAL(clicked(bool))?this?SIGNAL(play()));
????connect(ui->playButton?SIGNAL(clicked(bool))?this?SLOT(showPause()));
????//下個電臺
????connect(ui->nextButton?SIGNAL(clicked(bool))?this?SIGNAL(nextStation()));
????connect(ui->nextButton?SIGNAL(clicked(bool))?this?SLOT(showPause()));
????//刷新
????connect(ui->refreshButton?SIGNAL(clicked(bool))?this?SIGNAL(refreshStation()));
????connect(ui->refreshButton?SIGNAL(clicked(bool))?this?SLOT(showPause()));
????//退出全屏
????connect(ui->fullButton?SIGNAL(clicked(bool))?SIGNAL(normalScreen()));
}
fullDialog::~fullDialog()
{
????delete?ui;
}
WId?fullDialog::getWinID()
{
????return?ui->disWidget->winId();
}
void?fullDialog::setPlaying(bool?playing)
{
????if?(playing)
????????this->showPause();
????else
????????this->showPlay();
}
bool?fullDialog::getPlaying()
{
????if?(ui->playButton->isHidden())
????????return?true;
????else
????????return?false;
}
bool?fullDialog::eventFilter(Qobject?*target?QEvent?*event)
{
????if?(event->type()?==?QEvent::MouseMove)
????{
????????QMouseEvent?*mousevent?=?static_cast(event);
????????if?(isHide)
????????{??????
????????????QPropertyAnimation?*animation?=?new?QPropertyAnimation(ui->ctrlWidget?“pos“);
????????????animation->setDuration(200);
????????????animation->setStartValue(ui->ctrlWidget->pos());
?????????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-06-07?15:47??sdk\
?????目錄???????????0??2016-06-07?15:47??sdk\include\
?????目錄???????????0??2016-06-07?15:47??sdk\include\vlc\
?????文件????????2449??2016-01-21?07:57??sdk\include\vlc\deprecated.h
?????文件???????20620??2016-01-21?07:57??sdk\include\vlc\libvlc.h
?????文件????????6701??2016-01-21?07:57??sdk\include\vlc\libvlc_events.h
?????文件???????18189??2016-01-21?07:57??sdk\include\vlc\libvlc_media.h
?????文件????????3687??2016-01-21?07:57??sdk\include\vlc\libvlc_media_discoverer.h
?????文件????????2982??2016-01-21?07:57??sdk\include\vlc\libvlc_media_library.h
?????文件????????6554??2016-01-21?07:57??sdk\include\vlc\libvlc_media_list.h
?????文件????????6717??2016-01-21?07:57??sdk\include\vlc\libvlc_media_list_pla
?????文件???????63694??2016-01-21?07:57??sdk\include\vlc\libvlc_media_pla
?????文件????????2093??2016-01-21?07:57??sdk\include\vlc\libvlc_structures.h
?????文件????????2147??2016-01-21?07:57??sdk\include\vlc\libvlc_version.h
?????文件???????12560??2016-01-21?07:57??sdk\include\vlc\libvlc_vlm.h
?????目錄???????????0??2016-06-07?15:47??sdk\include\vlc\plugins\
?????文件???????46113??2016-01-21?07:57??sdk\include\vlc\plugins\vlc_about.h
?????文件????????6288??2016-01-21?07:57??sdk\include\vlc\plugins\vlc_access.h
?????文件????????5821??2016-01-21?07:57??sdk\include\vlc\plugins\vlc_addons.h
?????文件???????13754??2016-01-21?07:57??sdk\include\vlc\plugins\vlc_aout.h
?????文件????????1719??2016-01-21?07:57??sdk\include\vlc\plugins\vlc_aout_volume.h
?????文件???????22492??2016-01-21?07:57??sdk\include\vlc\plugins\vlc_arrays.h
?????文件???????14719??2016-01-21?07:57??sdk\include\vlc\plugins\vlc_atomic.h
?????文件????????1318??2016-01-21?07:57??sdk\include\vlc\plugins\vlc_avcodec.h
?????文件????????4679??2016-01-21?07:57??sdk\include\vlc\plugins\vlc_bits.h
?????文件???????11714??2016-01-21?07:57??sdk\include\vlc\plugins\vlc_block.h
?????文件???????13904??2016-01-21?07:57??sdk\include\vlc\plugins\vlc_block_helper.h
?????文件????????5976??2016-01-21?07:57??sdk\include\vlc\plugins\vlc_charset.h
?????文件????????8609??2016-01-21?07:57??sdk\include\vlc\plugins\vlc_codec.h
?????文件???????26291??2016-01-21?07:57??sdk\include\vlc\plugins\vlc_common.h
?????文件????????4504??2016-01-21?07:57??sdk\include\vlc\plugins\vlc_config.h
............此處省略218個文件信息
評論
共有 條評論