TTKMusicPlayer  3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
Public Slots | Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
MusicVideoPlayWidget Class Reference

The class of the video play widget. More...

#include <musicvideoplaywidget.h>

+ Inheritance diagram for MusicVideoPlayWidget:

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)
 
- Public Member Functions inherited from TTKAbstractMoveWidget
 TTKAbstractMoveWidget (QWidget *parent=nullptr)
 
 TTKAbstractMoveWidget (bool transparent, QWidget *parent=nullptr)
 
void drawWindowShadow (bool show)
 
void blockMoveOption (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
 
MusicVideoViewm_videoView
 
MusicVideoSearchTableWidgetm_tableWidget
 
MusicItemQueryEditm_searchEdit
 
MusicVideoFloatWidgetm_videoFloatWidget
 

Additional Inherited Members

- Protected Member Functions inherited from TTKAbstractMoveWidget
virtual void paintEvent (QPaintEvent *event) override
 
virtual void mousePressEvent (QMouseEvent *event) override
 
virtual void mouseMoveEvent (QMouseEvent *event) override
 
virtual void mouseReleaseEvent (QMouseEvent *event) override
 
- Protected Attributes inherited from TTKAbstractMoveWidget
QPoint m_pressAt
 
bool m_moveOption
 
bool m_showShadow
 
bool m_leftButtonPress
 

Detailed Description

The class of the video play widget.

Author
Greedysky greed.nosp@m.ysky.nosp@m.@163..nosp@m.com

Definition at line 37 of file musicvideoplaywidget.h.

Constructor & Destructor Documentation

MusicVideoPlayWidget::MusicVideoPlayWidget ( QWidget *  parent = nullptr)
explicit
MusicVideoPlayWidget::~MusicVideoPlayWidget ( )

Member Function Documentation

void MusicVideoPlayWidget::downloadButtonClicked ( )
slot

Download button clicked.

Definition at line 317 of file musicvideoplaywidget.cpp.

References MusicVideoSearchTableWidget::downloadLocalFromControl(), and m_tableWidget.

Referenced by MusicVideoPlayWidget().

void MusicVideoPlayWidget::enterEvent ( QtEnterEvent event)
finaloverrideprivatevirtual
void MusicVideoPlayWidget::fullscreenButtonClicked ( bool  popup)
signal

Fullscreen button clicked.

void MusicVideoPlayWidget::fullscreenButtonClicked ( )
slot
bool MusicVideoPlayWidget::isPopupMode ( ) const
void MusicVideoPlayWidget::leaveEvent ( QEvent *  event)
finaloverrideprivatevirtual

Definition at line 375 of file musicvideoplaywidget.cpp.

References m_leaverTimer.

void MusicVideoPlayWidget::leaveTimeout ( )
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().

void MusicVideoPlayWidget::mediaUrlChanged ( const QString &  url)
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().

void MusicVideoPlayWidget::mediaUrlPathChanged ( const MusicVideoItem item)
slot
void MusicVideoPlayWidget::popupButtonClicked ( bool  popup)
signal

Popup button state changed.

void MusicVideoPlayWidget::popupButtonClicked ( )
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)
void MusicVideoPlayWidget::resizeEvent ( QResizeEvent *  event)
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().

void MusicVideoPlayWidget::resizeGeometry ( int  width,
int  height 
)
void MusicVideoPlayWidget::resizeWindow ( )
void MusicVideoPlayWidget::setTitleText ( const QString &  text)
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().

void MusicVideoPlayWidget::shareButtonClicked ( )
slot
void MusicVideoPlayWidget::start ( int  topst,
int  topend,
int  ctrlst,
int  ctrlend 
)
private

Start to turn on animation.

Definition at line 386 of file musicvideoplaywidget.cpp.

References m_leaverAnimation, and TTKObjectCast.

Referenced by enterEvent(), and leaveTimeout().

void MusicVideoPlayWidget::startToSearchByID ( const QString &  name)
slot
void MusicVideoPlayWidget::switchToPlayView ( )
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().

void MusicVideoPlayWidget::switchToSearchTable ( )
slot
void MusicVideoPlayWidget::videoResearchButtonSearched ( const QString &  name)
slot
void MusicVideoPlayWidget::videoResearchButtonSearched ( const QVariant &  data)
slot

Member Data Documentation

QToolButton* MusicVideoPlayWidget::m_backButton
private
QPushButton* MusicVideoPlayWidget::m_closeButton
private

Definition at line 158 of file musicvideoplaywidget.h.

Referenced by MusicVideoPlayWidget(), and ~MusicVideoPlayWidget().

QParallelAnimationGroup* MusicVideoPlayWidget::m_leaverAnimation
private
QTimer* MusicVideoPlayWidget::m_leaverTimer
private
MusicItemQueryEdit* MusicVideoPlayWidget::m_searchEdit
private
QStackedWidget* MusicVideoPlayWidget::m_stackedWidget
private
MusicVideoSearchTableWidget* MusicVideoPlayWidget::m_tableWidget
private
QLabel* MusicVideoPlayWidget::m_textLabel
private
QWidget* MusicVideoPlayWidget::m_topWidget
private
MusicVideoFloatWidget* MusicVideoPlayWidget::m_videoFloatWidget
private
MusicVideoItem MusicVideoPlayWidget::m_videoItem
private
MusicVideoView* MusicVideoPlayWidget::m_videoView
private

The documentation for this class was generated from the following files: