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 desktop remote widget base. More...
#include <musicremotewidget.h>
Public Types | |
enum | Module { Null = 0, Square, Rectangle, SimpleStyle, ComplexStyle, Ripple } |
Public Slots | |
void | volumeSliderChanged (int value) |
void | show () |
bool | close () |
Signals | |
void | showMainWindow () |
void | playStateChanged () |
void | playPreviousChanged () |
void | playNextChanged () |
void | volumeChanged (int value) |
void | settingChanged () |
void | remoteTypeChanged (QAction *type) |
Public Member Functions | |
MusicRemoteWidget (QWidget *parent=nullptr) | |
~MusicRemoteWidget () | |
void | setCurrentPlayState (bool state) const |
void | setVolumeValue (int index) |
int | mapRemoteTypeIndex () |
virtual void | setLabelText (const QString &text) |
![]() | |
TTKAbstractMoveWidget (QWidget *parent=nullptr) | |
TTKAbstractMoveWidget (bool transparent, QWidget *parent=nullptr) | |
void | drawWindowShadow (bool show) |
void | blockOption (bool block) |
Protected Member Functions | |
virtual void | contextMenuEvent (QContextMenuEvent *event) override |
void | adjustPosition (QWidget *w) |
![]() | |
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 | |
QPushButton * | m_showMainWindowButton |
QPushButton * | m_preSongButton |
QPushButton * | m_nextSongButton |
QPushButton * | m_playButton |
QPushButton * | m_settingButton |
QWidget * | m_mainWidget |
QWidget * | m_volumeWidget |
QToolButton * | m_volumeButton |
TTKClickedSlider * | m_volumeSlider |
![]() | |
QPoint | m_mousePressedAt |
bool | m_blockOption |
bool | m_shadowOption |
bool | m_mouseLeftPressed |
The class of the desktop remote widget base.
Definition at line 32 of file musicremotewidget.h.
Definition at line 37 of file musicremotewidget.h.
|
explicit |
Object constructor.
Definition at line 13 of file musicremotewidget.cpp.
References TTK::UI::BackgroundStyle04, TTKAbstractMoveWidget::drawWindowShadow(), MusicApplication::instance(), m_mainWidget, m_nextSongButton, m_playButton, m_preSongButton, m_settingButton, m_showMainWindowButton, m_volumeButton, m_volumeSlider, m_volumeWidget, playNextChanged(), playPreviousChanged(), playStateChanged(), TTK::UI::PushButtonStyle02, settingChanged(), showMainWindow(), TTK::UI::SliderStyle01, TTK::UI::TinyBtnNext, TTK::UI::TinyBtnPlay, TTK::UI::TinyBtnPrevious, TTK::UI::TinyBtnSetting, and volumeSliderChanged().
MusicRemoteWidget::~MusicRemoteWidget | ( | ) |
Object destructor.
Definition at line 93 of file musicremotewidget.cpp.
References m_mainWidget, m_nextSongButton, m_playButton, m_preSongButton, m_settingButton, m_showMainWindowButton, m_volumeButton, m_volumeSlider, and m_volumeWidget.
|
protected |
Adjust the widget position.
Definition at line 220 of file musicremotewidget.cpp.
References G_SETTING_PTR, and MusicSettingManager::ScreenSize.
Referenced by MusicRemoteWidgetForComplexStyle::MusicRemoteWidgetForComplexStyle(), MusicRemoteWidgetForRectangle::MusicRemoteWidgetForRectangle(), MusicRemoteWidgetForRipple::MusicRemoteWidgetForRipple(), MusicRemoteWidgetForSimpleStyle::MusicRemoteWidgetForSimpleStyle(), MusicRemoteWidgetForSquare::MusicRemoteWidgetForSquare(), and MusicRemoteWidgetForStrip::MusicRemoteWidgetForStrip().
|
slot |
Override close function.
Definition at line 182 of file musicremotewidget.cpp.
References G_SETTING_PTR, Null, and MusicSettingManager::RemoteWidgetMode.
Referenced by MusicRemoteWidgetForStrip::contextMenuEvent(), contextMenuEvent(), and MusicRemoteWidgetForStrip::MusicRemoteWidgetForStrip().
|
overrideprotectedvirtual |
Override the widget event.
Reimplemented in MusicRemoteWidgetForStrip.
Definition at line 188 of file musicremotewidget.cpp.
References close(), ComplexStyle, TTK::UI::MenuStyle04, Rectangle, remoteTypeChanged(), Ripple, showMainWindow(), SimpleStyle, Square, and TTKObjectCast.
int MusicRemoteWidget::mapRemoteTypeIndex | ( | ) |
Map remote type to index.
Definition at line 119 of file musicremotewidget.cpp.
References ComplexStyle, Null, Rectangle, Ripple, SimpleStyle, Square, and TTKObjectCast.
Referenced by show(), and MusicTopAreaWidget::showWallpaperRemote().
|
signal |
Set current play to next.
Referenced by MusicRemoteWidget().
|
signal |
Set current play to previous.
Referenced by MusicRemoteWidget().
|
signal |
Set current play state.
Referenced by MusicRemoteWidget().
|
signal |
Change diff remote style by type.
Referenced by contextMenuEvent().
void MusicRemoteWidget::setCurrentPlayState | ( | bool | state | ) | const |
Set current play state.
Definition at line 106 of file musicremotewidget.cpp.
References m_playButton, TTK::UI::TinyBtnPause, and TTK::UI::TinyBtnPlay.
Referenced by MusicTopAreaWidget::createRemoteWidget(), and MusicTopAreaWidget::setCurrentPlayState().
|
virtual |
Set current song text.
Reimplemented in MusicRemoteWidgetForRectangle, MusicRemoteWidgetForRipple, MusicRemoteWidgetForSimpleStyle, MusicRemoteWidgetForStrip, and MusicRemoteWidgetForComplexStyle.
Definition at line 147 of file musicremotewidget.cpp.
Referenced by MusicTopAreaWidget::setLabelText(), MusicTopAreaWidget::showComplexStyleRemote(), MusicTopAreaWidget::showRectangleRemote(), MusicTopAreaWidget::showRippleRemote(), MusicTopAreaWidget::showSimpleStyleRemote(), and MusicTopAreaWidget::showWallpaperRemote().
|
signal |
Show current setting widget.
Referenced by MusicRemoteWidget().
void MusicRemoteWidget::setVolumeValue | ( | int | index | ) |
Set current volume value by index.
Definition at line 111 of file musicremotewidget.cpp.
References m_volumeSlider, and volumeChanged().
Referenced by MusicTopAreaWidget::createRemoteWidget(), and MusicTopAreaWidget::setVolumeValue().
|
slot |
Override show function.
Definition at line 176 of file musicremotewidget.cpp.
References G_SETTING_PTR, mapRemoteTypeIndex(), and MusicSettingManager::RemoteWidgetMode.
Referenced by MusicTopAreaWidget::createRemoteWidget().
|
signal |
Set show application normal.
Referenced by MusicRemoteWidgetForStrip::contextMenuEvent(), contextMenuEvent(), and MusicRemoteWidget().
|
signal |
Set current play volume by value.
Referenced by setVolumeValue(), and volumeSliderChanged().
|
slot |
Set current play volume change by value.
Definition at line 152 of file musicremotewidget.cpp.
References m_volumeButton, TTK::UI::TinyBtnSoundWhite, and volumeChanged().
Referenced by MusicRemoteWidget().
|
protected |
Definition at line 131 of file musicremotewidget.h.
Referenced by MusicRemoteWidget(), MusicRemoteWidgetForComplexStyle::MusicRemoteWidgetForComplexStyle(), MusicRemoteWidgetForRectangle::MusicRemoteWidgetForRectangle(), MusicRemoteWidgetForRipple::MusicRemoteWidgetForRipple(), MusicRemoteWidgetForSimpleStyle::MusicRemoteWidgetForSimpleStyle(), MusicRemoteWidgetForSquare::MusicRemoteWidgetForSquare(), MusicRemoteWidgetForStrip::MusicRemoteWidgetForStrip(), and ~MusicRemoteWidget().
|
protected |
Definition at line 129 of file musicremotewidget.h.
Referenced by MusicRemoteWidgetForSquare::enterTimeout(), MusicRemoteWidgetForSquare::leaveTimeout(), MusicRemoteWidget(), MusicRemoteWidgetForComplexStyle::MusicRemoteWidgetForComplexStyle(), MusicRemoteWidgetForRectangle::MusicRemoteWidgetForRectangle(), MusicRemoteWidgetForRipple::MusicRemoteWidgetForRipple(), MusicRemoteWidgetForSimpleStyle::MusicRemoteWidgetForSimpleStyle(), MusicRemoteWidgetForSquare::MusicRemoteWidgetForSquare(), MusicRemoteWidgetForStrip::MusicRemoteWidgetForStrip(), and ~MusicRemoteWidget().
|
protected |
Definition at line 129 of file musicremotewidget.h.
Referenced by MusicRemoteWidgetForSquare::enterTimeout(), MusicRemoteWidgetForSquare::leaveTimeout(), MusicRemoteWidget(), MusicRemoteWidgetForComplexStyle::MusicRemoteWidgetForComplexStyle(), MusicRemoteWidgetForRectangle::MusicRemoteWidgetForRectangle(), MusicRemoteWidgetForRipple::MusicRemoteWidgetForRipple(), MusicRemoteWidgetForSimpleStyle::MusicRemoteWidgetForSimpleStyle(), MusicRemoteWidgetForSquare::MusicRemoteWidgetForSquare(), MusicRemoteWidgetForStrip::MusicRemoteWidgetForStrip(), setCurrentPlayState(), and ~MusicRemoteWidget().
|
protected |
Definition at line 128 of file musicremotewidget.h.
Referenced by MusicRemoteWidgetForSquare::enterTimeout(), MusicRemoteWidgetForSquare::leaveTimeout(), MusicRemoteWidget(), MusicRemoteWidgetForComplexStyle::MusicRemoteWidgetForComplexStyle(), MusicRemoteWidgetForRectangle::MusicRemoteWidgetForRectangle(), MusicRemoteWidgetForRipple::MusicRemoteWidgetForRipple(), MusicRemoteWidgetForSimpleStyle::MusicRemoteWidgetForSimpleStyle(), MusicRemoteWidgetForSquare::MusicRemoteWidgetForSquare(), MusicRemoteWidgetForStrip::MusicRemoteWidgetForStrip(), and ~MusicRemoteWidget().
|
protected |
Definition at line 130 of file musicremotewidget.h.
Referenced by MusicRemoteWidgetForSquare::enterTimeout(), MusicRemoteWidgetForSquare::leaveTimeout(), MusicRemoteWidget(), MusicRemoteWidgetForComplexStyle::MusicRemoteWidgetForComplexStyle(), MusicRemoteWidgetForRectangle::MusicRemoteWidgetForRectangle(), MusicRemoteWidgetForRipple::MusicRemoteWidgetForRipple(), MusicRemoteWidgetForSimpleStyle::MusicRemoteWidgetForSimpleStyle(), MusicRemoteWidgetForSquare::MusicRemoteWidgetForSquare(), MusicRemoteWidgetForStrip::MusicRemoteWidgetForStrip(), and ~MusicRemoteWidget().
|
protected |
Definition at line 128 of file musicremotewidget.h.
Referenced by MusicRemoteWidget(), MusicRemoteWidgetForComplexStyle::MusicRemoteWidgetForComplexStyle(), MusicRemoteWidgetForRectangle::MusicRemoteWidgetForRectangle(), MusicRemoteWidgetForRipple::MusicRemoteWidgetForRipple(), MusicRemoteWidgetForSimpleStyle::MusicRemoteWidgetForSimpleStyle(), MusicRemoteWidgetForSquare::MusicRemoteWidgetForSquare(), MusicRemoteWidgetForStrip::MusicRemoteWidgetForStrip(), and ~MusicRemoteWidget().
|
protected |
Definition at line 132 of file musicremotewidget.h.
Referenced by MusicRemoteWidget(), volumeSliderChanged(), and ~MusicRemoteWidget().
|
protected |
Definition at line 133 of file musicremotewidget.h.
Referenced by MusicRemoteWidget(), setVolumeValue(), and ~MusicRemoteWidget().
|
protected |
Definition at line 131 of file musicremotewidget.h.
Referenced by MusicRemoteWidget(), MusicRemoteWidgetForComplexStyle::MusicRemoteWidgetForComplexStyle(), MusicRemoteWidgetForRectangle::MusicRemoteWidgetForRectangle(), MusicRemoteWidgetForRipple::MusicRemoteWidgetForRipple(), MusicRemoteWidgetForSimpleStyle::MusicRemoteWidgetForSimpleStyle(), MusicRemoteWidgetForSquare::MusicRemoteWidgetForSquare(), MusicRemoteWidgetForStrip::MusicRemoteWidgetForStrip(), and ~MusicRemoteWidget().