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 web music radio widget. More...
#include <musicttkfmradioplaywidget.h>
Public Slots | |
void | radioItemChanged (QTreeWidgetItem *item, int column) |
void | mediaPlayFinished (int code) |
void | radioPlay () |
void | radioPrevious () |
void | radioNext () |
void | radioVolume (int num) |
void | positionChanged (qint64 position) |
void | addButtonClicked () |
void | deleteButtonClicked () |
void | infoButtonClicked () |
![]() | |
void | backgroundChanged () |
void | show () |
Public Member Functions | |
MusicTTKFMRadioPlayWidget (QWidget *parent=nullptr) | |
~MusicTTKFMRadioPlayWidget () | |
![]() | |
MusicAbstractMoveWidget (QWidget *parent=nullptr) | |
MusicAbstractMoveWidget (bool transparent, QWidget *parent=nullptr) | |
~MusicAbstractMoveWidget () | |
![]() | |
TTKAbstractMoveWidget (QWidget *parent=nullptr) | |
TTKAbstractMoveWidget (bool transparent, QWidget *parent=nullptr) | |
void | drawWindowShadow (bool show) |
void | blockOption (bool block) |
Private Member Functions | |
virtual void | closeEvent (QCloseEvent *event) overridefinal |
void | initialize () |
void | createCoreModule () |
void | startCoreModule () |
int | indexValid (QTreeWidgetItem *item) const |
Private Attributes | |
Ui::MusicTTKFMRadioPlayWidget * | m_ui |
bool | m_isPlaying |
bool | m_statusChanged |
int | m_currentIndex |
MusicCoreMPlayer * | m_player |
MusicFMChannelList | m_items |
MusicFMChannelList | m_favItems |
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 |
![]() | |
void | setBackgroundPixmap (const QSize &size) |
MusicWidgetRenderer () | |
void | setBackgroundLabel (QLabel *label) |
![]() | |
QPoint | m_mousePressedAt |
bool | m_blockOption |
bool | m_shadowOption |
bool | m_mouseLeftPressed |
The class of the web music radio widget.
Definition at line 75 of file musicttkfmradioplaywidget.h.
|
explicit |
Object constructor.
Definition at line 60 of file musicttkfmradioplaywidget.cpp.
References addButtonClicked(), TTK::Widget::adjustWidgetPosition(), TTK::UI::BackgroundStyle01, TTK::UI::ColorStyle02, deleteButtonClicked(), TTKAbstractItemDelegate::DisplayMode, infoButtonClicked(), initialize(), m_ui, TTK::UI::PushButtonStyle04, radioItemChanged(), radioNext(), radioPlay(), radioPrevious(), radioVolume(), TTK::UI::ScrollBarStyle03, TTKLabelItemDelegate::setAlignment(), MusicWidgetRenderer::setBackgroundLabel(), TTKAbstractItemDelegate::setModuleMode(), TTKAbstractItemDelegate::setStyleSheet(), TTK::UI::SliderStyle10, and TTK::UI::ToolButtonStyle04.
MusicTTKFMRadioPlayWidget::~MusicTTKFMRadioPlayWidget | ( | ) |
Object destructor.
Definition at line 140 of file musicttkfmradioplaywidget.cpp.
|
slot |
Add button clicked.
Definition at line 334 of file musicttkfmradioplaywidget.cpp.
References MusicTTKFMRadioInformationWidget::channelInformation(), MusicAbstractMoveDialog::exec(), m_favItems, m_items, MusicFMChannel::m_name, m_statusChanged, m_ui, MusicFMChannel::m_url, MusicToastLabel::popup(), MusicTTKFMRadioInformationWidget::setReadOnly(), TTK_DATA_ROLE, and TTK_DISPLAY_ROLE.
Referenced by MusicTTKFMRadioPlayWidget().
|
finaloverrideprivatevirtual |
Override the widget event.
Definition at line 209 of file musicttkfmradioplaywidget.cpp.
References FMRADIO_PATH, TTKAbstractXml::fromFile(), m_favItems, m_player, m_statusChanged, MusicFMConfigManager::readBuffer(), TTKAbstractXml::reset(), and MusicFMConfigManager::writeBuffer().
|
private |
Create core module.
Definition at line 277 of file musicttkfmradioplaywidget.cpp.
References m_player, mediaPlayFinished(), and positionChanged().
Referenced by initialize(), and startCoreModule().
|
slot |
Delete button clicked.
Definition at line 363 of file musicttkfmradioplaywidget.cpp.
References MusicAbstractMoveDialog::exec(), indexValid(), m_currentIndex, m_favItems, m_items, m_statusChanged, m_ui, MusicToastLabel::popup(), radioPrevious(), MusicMessageBox::setText(), and TTK_DATA_ROLE.
Referenced by MusicTTKFMRadioPlayWidget().
|
private |
Check index valid.
Definition at line 307 of file musicttkfmradioplaywidget.cpp.
References m_items, and TTK_DATA_ROLE.
Referenced by deleteButtonClicked(), infoButtonClicked(), and radioItemChanged().
|
slot |
Info button clicked.
Definition at line 404 of file musicttkfmradioplaywidget.cpp.
References MusicAbstractMoveDialog::exec(), indexValid(), m_items, m_ui, and MusicTTKFMRadioInformationWidget::setChannelInformation().
Referenced by MusicTTKFMRadioPlayWidget().
|
private |
Init parameters.
fix current play volume temporary
Definition at line 231 of file musicttkfmradioplaywidget.cpp.
References createCoreModule(), FMRADIO_PATH, TTKAbstractXml::fromFile(), m_favItems, m_items, m_ui, qAsConst, MusicGifLabelWidget::RadioBlue, MusicFMConfigManager::readBuffer(), TTK_DATA_ROLE, and TTK_DISPLAY_ROLE.
Referenced by MusicTTKFMRadioPlayWidget().
|
slot |
Media play finished.
Definition at line 161 of file musicttkfmradioplaywidget.cpp.
References startCoreModule(), and TTK_LOW_LEVEL.
Referenced by createCoreModule().
|
slot |
Current position changed.
Definition at line 324 of file musicttkfmradioplaywidget.cpp.
References TTKTime::formatDuration(), m_player, m_ui, and TTK_DN_S2MS.
Referenced by createCoreModule(), and startCoreModule().
|
slot |
Radio item clicked changed.
Definition at line 146 of file musicttkfmradioplaywidget.cpp.
References indexValid(), m_currentIndex, and startCoreModule().
Referenced by MusicTTKFMRadioPlayWidget().
|
slot |
Set radio to next.
Definition at line 191 of file musicttkfmradioplaywidget.cpp.
References m_currentIndex, m_items, and startCoreModule().
Referenced by MusicTTKFMRadioPlayWidget().
|
slot |
Set radio to play.
Definition at line 169 of file musicttkfmradioplaywidget.cpp.
References m_isPlaying, m_player, m_ui, and MusicCoreMPlayer::play().
Referenced by MusicTTKFMRadioPlayWidget(), and startCoreModule().
|
slot |
Set radio to previous.
Definition at line 181 of file musicttkfmradioplaywidget.cpp.
References m_currentIndex, and startCoreModule().
Referenced by deleteButtonClicked(), and MusicTTKFMRadioPlayWidget().
|
slot |
Set radio volume.
Definition at line 201 of file musicttkfmradioplaywidget.cpp.
References m_player, and MusicCoreMPlayer::setVolume().
Referenced by MusicTTKFMRadioPlayWidget().
|
private |
Start to core module.
Definition at line 285 of file musicttkfmradioplaywidget.cpp.
References createCoreModule(), m_currentIndex, m_isPlaying, m_items, m_player, m_ui, positionChanged(), MusicCoreMPlayer::Radio, radioPlay(), and MusicCoreMPlayer::setMedia().
Referenced by mediaPlayFinished(), radioItemChanged(), radioNext(), and radioPrevious().
|
private |
Definition at line 157 of file musicttkfmradioplaywidget.h.
Referenced by deleteButtonClicked(), radioItemChanged(), radioNext(), radioPrevious(), and startCoreModule().
|
private |
Definition at line 160 of file musicttkfmradioplaywidget.h.
Referenced by addButtonClicked(), closeEvent(), deleteButtonClicked(), and initialize().
|
private |
Definition at line 155 of file musicttkfmradioplaywidget.h.
Referenced by radioPlay(), and startCoreModule().
|
private |
Definition at line 159 of file musicttkfmradioplaywidget.h.
Referenced by addButtonClicked(), deleteButtonClicked(), indexValid(), infoButtonClicked(), initialize(), radioNext(), and startCoreModule().
|
private |
Definition at line 158 of file musicttkfmradioplaywidget.h.
Referenced by closeEvent(), createCoreModule(), positionChanged(), radioPlay(), radioVolume(), startCoreModule(), and ~MusicTTKFMRadioPlayWidget().
|
private |
Definition at line 156 of file musicttkfmradioplaywidget.h.
Referenced by addButtonClicked(), closeEvent(), and deleteButtonClicked().
|
private |
Definition at line 154 of file musicttkfmradioplaywidget.h.
Referenced by addButtonClicked(), deleteButtonClicked(), infoButtonClicked(), initialize(), MusicTTKFMRadioPlayWidget(), positionChanged(), radioPlay(), startCoreModule(), and ~MusicTTKFMRadioPlayWidget().