TTKMusicPlayer
4.1.3.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
|
The class of the video play widget. More...
#include <musicvideoplaywidget.h>
Public Slots | |
void | switchToSearchTable () |
void | switchToPlayView () |
void | videoResearchButtonSearched (const QString &name) |
void | videoResearchButtonSearched (const QVariant &data) |
void | startToSearchByID (const QString &name) |
void | mediaUrlChanged (const QString &url) |
void | mediaUrlPathChanged (const MusicVideoItem &item) |
void | popupButtonClicked () |
void | fullscreenButtonClicked () |
void | downloadButtonClicked () |
void | shareButtonClicked () |
Signals | |
void | popupButtonClicked (bool popup) |
void | fullscreenButtonClicked (bool popup) |
Public Member Functions | |
MusicVideoPlayWidget (QWidget *parent=nullptr) | |
~MusicVideoPlayWidget () | |
void | popupMode (bool popup) |
bool | isPopupMode () const |
void | resizeWindow () |
void | resizeGeometry (bool resize) |
void | resizeGeometry (int width, int height) |
![]() | |
TTKAbstractMoveWidget (QWidget *parent=nullptr) | |
TTKAbstractMoveWidget (bool transparent, QWidget *parent=nullptr) | |
void | drawWindowShadow (bool show) |
void | blockOption (bool block) |
Private Slots | |
void | leaveTimeout () |
Private Member Functions | |
virtual void | resizeEvent (QResizeEvent *event) overridefinal |
virtual void | enterEvent (QtEnterEvent *event) overridefinal |
virtual void | leaveEvent (QEvent *event) overridefinal |
void | setTitleText (const QString &text) |
void | start (int topst, int topend, int ctrlst, int ctrlend) |
Private Attributes | |
QTimer * | m_leaverTimer |
QParallelAnimationGroup * | m_leaverAnimation |
QWidget * | m_topWidget |
QLabel * | m_textLabel |
QToolButton * | m_backButton |
QPushButton * | m_closeButton |
QStackedWidget * | m_stackedWidget |
MusicVideoItem | m_videoItem |
MusicVideoView * | m_videoView |
MusicVideoSearchTableWidget * | m_tableWidget |
MusicItemQueryEdit * | m_searchEdit |
MusicVideoFloatWidget * | m_videoFloatWidget |
Additional Inherited Members | |
![]() | |
virtual void | paintEvent (QPaintEvent *event) override |
virtual void | mousePressEvent (QMouseEvent *event) override |
virtual void | mouseMoveEvent (QMouseEvent *event) override |
virtual void | mouseReleaseEvent (QMouseEvent *event) override |
![]() | |
QPoint | m_mousePressedAt |
bool | m_blockOption |
bool | m_shadowOption |
bool | m_mouseLeftPressed |
The class of the video play widget.
Definition at line 37 of file musicvideoplaywidget.h.
|
explicit |
Object constructor.
Definition at line 16 of file musicvideoplaywidget.cpp.
References TTK::UI::BackgroundStyle02, TTK::UI::BackgroundStyle08, TTK::UI::BackgroundStyle10, TTK::UI::BorderStyle01, TTK::UI::BtnPClose, TTK::UI::ColorStyle06, MusicVideoView::controlBarWidget(), downloadButtonClicked(), fullscreenButtonClicked(), leaveTimeout(), m_closeButton, m_leaverAnimation, m_leaverTimer, m_searchEdit, m_stackedWidget, m_tableWidget, m_textLabel, m_topWidget, m_videoFloatWidget, m_videoView, mediaUrlPathChanged(), popupButtonClicked(), shareButtonClicked(), switchToSearchTable(), TTK_DN_S2MS, and videoResearchButtonSearched().
MusicVideoPlayWidget::~MusicVideoPlayWidget | ( | ) |
Object destructor.
Definition at line 118 of file musicvideoplaywidget.cpp.
References m_backButton, m_closeButton, m_leaverAnimation, m_leaverTimer, m_searchEdit, m_stackedWidget, m_textLabel, and m_videoView.
|
slot |
Download button clicked.
Definition at line 317 of file musicvideoplaywidget.cpp.
References MusicVideoSearchTableWidget::downloadLocalFromControl(), and m_tableWidget.
Referenced by MusicVideoPlayWidget().
|
finaloverrideprivatevirtual |
Definition at line 362 of file musicvideoplaywidget.cpp.
References MusicVideoView::controlBarWidget(), m_leaverTimer, m_stackedWidget, m_topWidget, m_videoView, and start().
|
signal |
Fullscreen button clicked.
|
slot |
Fullscreen button clicked.
Definition at line 305 of file musicvideoplaywidget.cpp.
References MusicVideoFloatWidget::fullscreenMode(), MusicVideoFloatWidget::isFullscreenMode(), MusicVideoFloatWidget::isPopupMode(), and m_videoFloatWidget.
Referenced by MusicVideoPlayWidget().
bool MusicVideoPlayWidget::isPopupMode | ( | ) | const |
Get the window is popup or not.
Definition at line 155 of file musicvideoplaywidget.cpp.
References TTKAbstractMoveWidget::m_blockOption.
Referenced by resizeWindow(), MusicRightAreaWidget::resizeWindow(), MusicRightAreaWidget::showMovieSearchRadioFound(), and MusicRightAreaWidget::showVideoSearchedFound().
|
finaloverrideprivatevirtual |
Definition at line 375 of file musicvideoplaywidget.cpp.
References m_leaverTimer.
|
privateslot |
Leave Timeout.
Definition at line 343 of file musicvideoplaywidget.cpp.
References MusicVideoView::controlBarWidget(), m_stackedWidget, m_topWidget, m_videoView, and start().
Referenced by MusicVideoPlayWidget().
|
slot |
Set current media url by selected quality.
stop current song play while mv starts.
Definition at line 271 of file musicvideoplaywidget.cpp.
References MusicApplication::instance(), MusicApplication::isPlaying(), m_videoView, MusicVideoView::play(), MusicVideoView::setMedia(), MusicApplication::switchToPlayState(), and switchToPlayView().
Referenced by mediaUrlPathChanged().
|
slot |
Set current media name and url to play.
Definition at line 291 of file musicvideoplaywidget.cpp.
References MusicVideoItem::m_id, MusicVideoItem::m_name, MusicVideoItem::m_url, m_videoItem, m_videoView, mediaUrlChanged(), MusicVideoView::setBarrage(), and setTitleText().
Referenced by MusicVideoPlayWidget(), and videoResearchButtonSearched().
|
signal |
Popup button state changed.
|
slot |
Popup button clicked.
Definition at line 300 of file musicvideoplaywidget.cpp.
References MusicVideoFloatWidget::isPopupMode(), and m_videoFloatWidget.
Referenced by MusicVideoPlayWidget().
void MusicVideoPlayWidget::popupMode | ( | bool | popup | ) |
Set the window is popup or not.
Definition at line 130 of file musicvideoplaywidget.cpp.
References TTKAbstractMoveWidget::blockOption(), MusicVideoFloatWidget::fullscreenMode(), G_SETTING_PTR, m_videoFloatWidget, MusicVideoFloatWidget::popupMode(), resizeGeometry(), MusicSettingManager::ScreenSize, WINDOW_HEIGHT, and WINDOW_WIDTH.
Referenced by MusicRightAreaWidget::functionClicked(), and MusicRightAreaWidget::videoSetPopup().
|
finaloverrideprivatevirtual |
Override the widget event.
Definition at line 353 of file musicvideoplaywidget.cpp.
References m_leaverAnimation, m_leaverTimer, and resizeWindow().
void MusicVideoPlayWidget::resizeGeometry | ( | bool | resize | ) |
Resize geometry bound by resize called.
Definition at line 176 of file musicvideoplaywidget.cpp.
References TTKDesktopWrapper::screenGeometry(), WINDOW_HEIGHT, and WINDOW_WIDTH.
Referenced by popupMode(), resizeWindow(), and MusicRightAreaWidget::videoFullscreen().
Resize geometry bound by resize called.
Definition at line 204 of file musicvideoplaywidget.cpp.
References m_tableWidget, m_topWidget, m_videoFloatWidget, m_videoView, MusicVideoFloatWidget::resizeGeometry(), MusicVideoView::resizeGeometry(), and MusicVideoSearchTableWidget::resizeSection().
void MusicVideoPlayWidget::resizeWindow | ( | ) |
Resize window bound by resize called.
Definition at line 160 of file musicvideoplaywidget.cpp.
References G_SETTING_PTR, isPopupMode(), resizeGeometry(), MusicSettingManager::WidgetSize, WINDOW_HEIGHT_MIN, and WINDOW_WIDTH_MIN.
Referenced by resizeEvent(), and MusicRightAreaWidget::resizeWindow().
|
private |
Set current title text(song name).
Definition at line 381 of file musicvideoplaywidget.cpp.
References TTK::Widget::elidedText(), and m_textLabel.
Referenced by mediaUrlPathChanged(), and switchToPlayView().
|
slot |
Share button clicked.
Definition at line 322 of file musicvideoplaywidget.cpp.
References MusicAbstractMoveDialog::exec(), MusicSongSharingWidget::initialize(), MusicVideoItem::m_cover, MusicSongSharingWidget::Item::m_cover, MusicVideoItem::m_id, MusicSongSharingWidget::Item::m_id, MusicVideoItem::m_name, MusicSongSharingWidget::Item::m_name, MusicVideoItem::m_server, MusicSongSharingWidget::Item::m_server, m_videoItem, MusicSongSharingWidget::Movie, and name.
Referenced by MusicVideoPlayWidget().
Start to turn on animation.
Definition at line 386 of file musicvideoplaywidget.cpp.
References m_leaverAnimation, and TTKObjectCast.
Referenced by enterEvent(), and leaveTimeout().
|
slot |
Video search query by given id.
Definition at line 265 of file musicvideoplaywidget.cpp.
References m_tableWidget, MusicVideoSearchTableWidget::startToSearchByID(), and switchToSearchTable().
Referenced by MusicRightAreaWidget::showVideoSearchedFound().
|
slot |
Switch to play view.
Definition at line 229 of file musicvideoplaywidget.cpp.
References m_backButton, MusicVideoItem::m_name, m_searchEdit, m_stackedWidget, m_videoItem, and setTitleText().
Referenced by mediaUrlChanged(), and switchToSearchTable().
|
slot |
Switch to search table.
Definition at line 212 of file musicvideoplaywidget.cpp.
References TTK::UI::BtnBackBack, m_backButton, m_searchEdit, m_stackedWidget, m_textLabel, m_topWidget, switchToPlayView(), and TTKObjectCast.
Referenced by MusicVideoPlayWidget(), startToSearchByID(), and videoResearchButtonSearched().
|
slot |
Video research button searched by name.
Definition at line 239 of file musicvideoplaywidget.cpp.
References MusicItemQueryEdit::editor(), m_searchEdit, m_tableWidget, MusicVideoSearchTableWidget::startToSearchByText(), and switchToSearchTable().
Referenced by MusicVideoPlayWidget(), MusicRightAreaWidget::showMovieSearchRadioFound(), and MusicRightAreaWidget::showVideoSearchedFound().
|
slot |
Video research button searched by name.
Definition at line 246 of file musicvideoplaywidget.cpp.
References TTK::generateSongName(), TTK::MusicSongInformation::m_artistName, MusicVideoItem::m_cover, TTK::MusicSongInformation::m_coverUrl, MusicVideoItem::m_id, MusicVideoItem::m_name, MusicVideoItem::m_server, TTK::MusicSongInformation::m_songId, TTK::MusicSongInformation::m_songName, TTK::MusicSongInformation::m_songProps, m_tableWidget, MusicVideoItem::m_url, TTK::MusicSongProperty::m_url, mediaUrlPathChanged(), MUSIC_MOVIE_RADIO, and MusicVideoSearchTableWidget::startToSearchByID().
|
private |
Definition at line 157 of file musicvideoplaywidget.h.
Referenced by switchToPlayView(), switchToSearchTable(), and ~MusicVideoPlayWidget().
|
private |
Definition at line 158 of file musicvideoplaywidget.h.
Referenced by MusicVideoPlayWidget(), and ~MusicVideoPlayWidget().
|
private |
Definition at line 153 of file musicvideoplaywidget.h.
Referenced by MusicVideoPlayWidget(), resizeEvent(), start(), and ~MusicVideoPlayWidget().
|
private |
Definition at line 152 of file musicvideoplaywidget.h.
Referenced by enterEvent(), leaveEvent(), MusicVideoPlayWidget(), resizeEvent(), and ~MusicVideoPlayWidget().
|
private |
Definition at line 163 of file musicvideoplaywidget.h.
Referenced by MusicVideoPlayWidget(), switchToPlayView(), switchToSearchTable(), videoResearchButtonSearched(), and ~MusicVideoPlayWidget().
|
private |
Definition at line 159 of file musicvideoplaywidget.h.
Referenced by enterEvent(), leaveTimeout(), MusicVideoPlayWidget(), switchToPlayView(), switchToSearchTable(), and ~MusicVideoPlayWidget().
|
private |
Definition at line 162 of file musicvideoplaywidget.h.
Referenced by downloadButtonClicked(), MusicVideoPlayWidget(), resizeGeometry(), startToSearchByID(), and videoResearchButtonSearched().
|
private |
Definition at line 156 of file musicvideoplaywidget.h.
Referenced by MusicVideoPlayWidget(), setTitleText(), switchToSearchTable(), and ~MusicVideoPlayWidget().
|
private |
Definition at line 155 of file musicvideoplaywidget.h.
Referenced by enterEvent(), leaveTimeout(), MusicVideoPlayWidget(), resizeGeometry(), and switchToSearchTable().
|
private |
Definition at line 164 of file musicvideoplaywidget.h.
Referenced by fullscreenButtonClicked(), MusicVideoPlayWidget(), popupButtonClicked(), popupMode(), and resizeGeometry().
|
private |
Definition at line 160 of file musicvideoplaywidget.h.
Referenced by mediaUrlPathChanged(), shareButtonClicked(), and switchToPlayView().
|
private |
Definition at line 161 of file musicvideoplaywidget.h.
Referenced by enterEvent(), leaveTimeout(), mediaUrlChanged(), mediaUrlPathChanged(), MusicVideoPlayWidget(), resizeGeometry(), and ~MusicVideoPlayWidget().