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 app bottom area widget. More...
#include <musicbottomareawidget.h>
Public Slots | |
void | lrcWidgetShowFullScreen () |
void | lockDesktopLrc (bool lock) |
void | desktopLrcClosed () |
void | iconActivated (QSystemTrayIcon::ActivationReason) |
Public Member Functions | |
MusicBottomAreaWidget (QWidget *parent=nullptr) | |
~MusicBottomAreaWidget () | |
void | setupUi (Ui::MusicApplication *ui) |
void | setDestopLrcVisible (bool status) const |
void | setCurrentPlayState (bool state) const |
void | setVolumeValue (int value) const |
void | setLabelText (const QString &name) const |
void | setSystemCloseConfig (bool status) |
bool | systemCloseConfig () |
bool | systemTrayIsVisible () |
void | showMessage (const QString &title, const QString &text) |
void | setWindowConcise () |
bool | isLrcWidgetShowFullScreen () const |
void | resizeWindow () |
void | applyParameter () |
Static Public Member Functions | |
static MusicBottomAreaWidget * | instance () |
Private Member Functions | |
void | createSystemTrayIcon () |
Private Attributes | |
Ui::MusicApplication * | m_ui |
bool | m_systemCloseConfig |
bool | m_lrcWidgetShowFullScreen |
QSystemTrayIcon * | m_systemTray |
MusicSystemTrayMenu * | m_systemTrayMenu |
MusicPlatformExtras * | m_platformExtras |
MusicBlurSpecturmModule * | m_blurModule |
Static Private Attributes | |
static MusicBottomAreaWidget * | m_instance = nullptr |
The class of the app bottom area widget.
Definition at line 37 of file musicbottomareawidget.h.
|
explicit |
Object constructor.
Definition at line 13 of file musicbottomareawidget.cpp.
References createSystemTrayIcon(), m_blurModule, m_instance, and m_platformExtras.
MusicBottomAreaWidget::~MusicBottomAreaWidget | ( | ) |
Object destructor.
Definition at line 25 of file musicbottomareawidget.cpp.
References m_blurModule, m_platformExtras, m_systemTray, and m_systemTrayMenu.
void MusicBottomAreaWidget::applyParameter | ( | ) |
Apply settings parameters.
Definition at line 200 of file musicbottomareawidget.cpp.
References MusicSettingManager::CloseEventMode, G_SETTING_PTR, m_blurModule, MusicSettingManager::RippleLowPowerMode, MusicSettingManager::RippleSpectrumEnable, setDestopLrcVisible(), setSystemCloseConfig(), MusicSettingManager::ShowDesktopLrc, and MusicBlurSpecturmModule::update().
Referenced by MusicApplication::applyParameter().
|
private |
Create system tray icon.
Definition at line 68 of file musicbottomareawidget.cpp.
References iconActivated(), MusicApplication::instance(), m_systemTray, and m_systemTrayMenu.
Referenced by MusicBottomAreaWidget().
|
slot |
Set desktop lrc close state.
Definition at line 247 of file musicbottomareawidget.cpp.
References G_SETTING_PTR, m_systemTrayMenu, m_ui, MusicSystemTrayMenu::showDesktopLrc(), and MusicSettingManager::ShowDesktopLrc.
Referenced by MusicLrcContainerForDesktop::closeEvent().
|
slot |
System tray icon activate.
Definition at line 49 of file musicbottomareawidget.cpp.
References MusicApplication::instance().
Referenced by createSystemTrayIcon().
|
static |
Get class object instance.
Definition at line 33 of file musicbottomareawidget.cpp.
References m_instance.
Referenced by MusicLrcContainerForDesktop::closeEvent(), MusicLrcContainerForInterior::contextMenuEvent(), MusicLrcContainerForInterior::createFloatPlayWidget(), MusicLrcContainerForInterior::lrcWidgetShowFullScreen(), MusicLrcContainerForInterior::mouseDoubleClickEvent(), MusicDownloadStatusModule::networkConnectionStateChanged(), MusicLrcContainerForInterior::resizeWindow(), MusicLrcContainerForDesktop::setWindowLockedChanged(), MusicLrcContainerForInterior::showSongMovieClicked(), and MusicLrcFloatWidget::wallpaperButtonClicked().
bool MusicBottomAreaWidget::isLrcWidgetShowFullScreen | ( | ) | const |
Current is show full container.
Definition at line 189 of file musicbottomareawidget.cpp.
References m_lrcWidgetShowFullScreen.
Referenced by MusicLrcContainerForInterior::lrcWidgetShowFullScreen(), and MusicLrcContainerForInterior::showSongMovieClicked().
|
slot |
Lock or not current desktop lrc.
Definition at line 242 of file musicbottomareawidget.cpp.
References MusicSystemTrayMenu::lockDesktopLrc(), and m_systemTrayMenu.
Referenced by MusicApplication::readSystemConfigFromFile(), and MusicLrcContainerForDesktop::setWindowLockedChanged().
|
slot |
Show full container or not.
Definition at line 215 of file musicbottomareawidget.cpp.
References G_SETTING_PTR, MusicApplication::instance(), MusicRightAreaWidget::instance(), MusicRightAreaWidget::lrcDisplayAllClicked(), m_blurModule, m_lrcWidgetShowFullScreen, m_ui, MusicSettingManager::OtherSideByInMode, and MusicBlurSpecturmModule::setVisible().
Referenced by MusicLrcContainerForInterior::mouseDoubleClickEvent(), MusicLrcContainerForInterior::showSongMovieClicked(), and MusicLrcFloatWidget::wallpaperButtonClicked().
void MusicBottomAreaWidget::resizeWindow | ( | ) |
Resize window bound by resize called.
Definition at line 194 of file musicbottomareawidget.cpp.
References G_SETTING_PTR, m_ui, and MusicSettingManager::WidgetSize.
Referenced by MusicApplication::resizeEvent().
void MusicBottomAreaWidget::setCurrentPlayState | ( | bool | state | ) | const |
Set current play state.
Definition at line 86 of file musicbottomareawidget.cpp.
References m_platformExtras, m_systemTrayMenu, MusicPlatformExtras::setCurrentPlayState(), and MusicSystemTrayMenu::setCurrentPlayState().
Referenced by MusicApplication::readSystemConfigFromFile(), MusicApplication::showCurrentSong(), and MusicApplication::switchToPlayState().
void MusicBottomAreaWidget::setDestopLrcVisible | ( | bool | status | ) | const |
Set destop lrc visible by string.
Definition at line 81 of file musicbottomareawidget.cpp.
References m_systemTrayMenu, and MusicSystemTrayMenu::showDesktopLrc().
Referenced by applyParameter(), and MusicApplication::readSystemConfigFromFile().
void MusicBottomAreaWidget::setLabelText | ( | const QString & | name | ) | const |
Set current song text.
Definition at line 97 of file musicbottomareawidget.cpp.
References m_systemTray, m_systemTrayMenu, and MusicSystemTrayMenu::setLabelText().
Referenced by MusicApplication::showCurrentSong().
|
inline |
Set system close config or not.
Definition at line 80 of file musicbottomareawidget.h.
Referenced by applyParameter().
void MusicBottomAreaWidget::setupUi | ( | Ui::MusicApplication * | ui | ) |
Set up app ui.
Definition at line 38 of file musicbottomareawidget.cpp.
References MusicBlurSpecturmModule::initialize(), m_blurModule, m_systemTrayMenu, and m_ui.
Referenced by MusicApplication::MusicApplication().
void MusicBottomAreaWidget::setVolumeValue | ( | int | value | ) | const |
Set current play volume.
Definition at line 92 of file musicbottomareawidget.cpp.
References m_systemTrayMenu, and MusicSystemTrayMenu::setVolumeValue().
Referenced by MusicApplication::volumeChanged(), and MusicApplication::volumeMute().
void MusicBottomAreaWidget::setWindowConcise | ( | ) |
Set window concise.
Definition at line 108 of file musicbottomareawidget.cpp.
References TTK::UI::BtnConciseIn, TTK::UI::BtnConciseOut, TTK::UI::BtnNext, TTK::UI::BtnPause, TTK::UI::BtnPlay, TTK::UI::BtnPrevious, CONCISE_WIDTH_MIN, MusicPlatformExtras::disableBlurBehindWindow(), G_SETTING_PTR, MusicApplication::instance(), MusicPlatformExtras::isDisableBlurBehindWindow(), MusicApplication::isPlaying(), m_platformExtras, m_ui, MusicSettingManager::ScreenSize, TTK::UI::TinyBtnNext, TTK::UI::TinyBtnPause, TTK::UI::TinyBtnPlay, TTK::UI::TinyBtnPrevious, WINDOW_HEIGHT_MIN, WINDOW_WIDTH_MIN, and MusicSettingManager::WindowConciseMode.
Referenced by MusicApplication::windowConciseChanged().
Set system tray message show title and context.
Definition at line 103 of file musicbottomareawidget.cpp.
References m_systemTray.
Referenced by MusicApplication::closeEvent(), and MusicDownloadStatusModule::networkConnectionStateChanged().
|
inline |
Get system close config state.
Definition at line 84 of file musicbottomareawidget.h.
Referenced by MusicApplication::closeEvent().
|
inline |
Get system tray visible state.
Definition at line 88 of file musicbottomareawidget.h.
Referenced by MusicApplication::closeEvent().
|
private |
Definition at line 142 of file musicbottomareawidget.h.
Referenced by applyParameter(), lrcWidgetShowFullScreen(), MusicBottomAreaWidget(), setupUi(), and ~MusicBottomAreaWidget().
|
staticprivate |
Definition at line 144 of file musicbottomareawidget.h.
Referenced by instance(), and MusicBottomAreaWidget().
|
private |
Definition at line 138 of file musicbottomareawidget.h.
Referenced by isLrcWidgetShowFullScreen(), and lrcWidgetShowFullScreen().
|
private |
Definition at line 141 of file musicbottomareawidget.h.
Referenced by MusicBottomAreaWidget(), setCurrentPlayState(), setWindowConcise(), and ~MusicBottomAreaWidget().
|
private |
Definition at line 137 of file musicbottomareawidget.h.
|
private |
Definition at line 139 of file musicbottomareawidget.h.
Referenced by createSystemTrayIcon(), setLabelText(), showMessage(), and ~MusicBottomAreaWidget().
|
private |
Definition at line 140 of file musicbottomareawidget.h.
Referenced by createSystemTrayIcon(), desktopLrcClosed(), lockDesktopLrc(), setCurrentPlayState(), setDestopLrcVisible(), setLabelText(), setupUi(), setVolumeValue(), and ~MusicBottomAreaWidget().
|
private |
Definition at line 136 of file musicbottomareawidget.h.
Referenced by desktopLrcClosed(), lrcWidgetShowFullScreen(), resizeWindow(), setupUi(), and setWindowConcise().