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 top area widget. More...
#include <musictopareawidget.h>
Public Slots | |
void | showSkinManagerWidget () |
void | setArtistBackground () |
void | backgroundTransparentChanged () |
void | backgroundTransparentChanged (int value) |
void | backgroundTransparentChanged (const QString &fileName) |
void | backgroundSkinChanged (const QString &fileName) |
void | backgroundChanged () |
void | backgroundAnimationChanged (bool state) |
void | backgroundThemeDownloadFinished () |
void | backgroundThemeChangedByResize () |
void | playlistTransparentChanged (int index) |
void | showSquareRemote () |
void | showRectangleRemote () |
void | showSimpleStyleRemote () |
void | showComplexStyleRemote () |
void | showRippleRemote () |
void | showWallpaperRemote (bool create) |
void | deleteCurrentRemote () |
void | remoteTypeChanged (QAction *type) |
void | remoteTypeChanged (int type) |
void | showToolSetsWidget () |
Signals | |
void | originImageChanged (const QImage &image) |
Public Member Functions | |
MusicTopAreaWidget (QWidget *parent=nullptr) | |
~MusicTopAreaWidget () | |
void | setupUi (Ui::MusicApplication *ui) |
void | setBackgroundParameter () |
QString | backgroundPath () const |
int | backgroundTransparent () const |
int | backgroundListTransparent () |
bool | backgroundTransparentEnabled () const |
const QImage & | originImage () const |
const QPixmap & | renderPixmap () const |
void | setBackgroundAnimation (bool state) |
void | setCurrentPlayState (bool state) const |
void | setLabelText (const QString &name) const |
void | setVolumeValue (int value) const |
Static Public Member Functions | |
static MusicTopAreaWidget * | instance () |
Private Member Functions | |
void | backgroundTransparent (int value) |
bool | isArtistBackground () const |
void | createRemoteWidget () |
void | drawWindowBackground () |
void | drawWindowBackground (const QImage &image) |
void | drawWindowBackgroundByImage () |
void | drawWindowBackgroundByPath (const QString &path) |
Private Attributes | |
Ui::MusicApplication * | m_ui |
MusicBackgroundSkinDialog * | m_backgroundWidget |
MusicRemoteWidget * | m_remoteWidget |
QImage | m_backgroundImage |
int | m_lastRemoteBeforeWallpaper |
QString | m_backgroundImagePath |
int | m_backgroundTransparent |
int | m_backgroundListTransparent |
QTimer | m_pictureCarouselTimer |
Static Private Attributes | |
static MusicTopAreaWidget * | m_instance = nullptr |
The class of the app top area widget.
Definition at line 36 of file musictopareawidget.h.
|
explicit |
Object constructor.
Definition at line 21 of file musictopareawidget.cpp.
References backgroundChanged(), G_BACKGROUND_PTR, Visual::initialize(), MusicApplication::instance(), m_instance, m_pictureCarouselTimer, and TTK_DN_S2MS.
MusicTopAreaWidget::~MusicTopAreaWidget | ( | ) |
Object destructor.
Definition at line 37 of file musictopareawidget.cpp.
References m_backgroundWidget, and m_remoteWidget.
|
slot |
Current slider state changed.
Definition at line 251 of file musictopareawidget.cpp.
References m_ui.
Referenced by backgroundThemeChangedByResize(), MusicApplication::MusicApplication(), and setupUi().
|
slot |
Changed current background skin.
Definition at line 237 of file musictopareawidget.cpp.
References drawWindowBackground(), drawWindowBackgroundByPath(), and G_BACKGROUND_PTR.
Referenced by backgroundThemeDownloadFinished(), and MusicTopAreaWidget().
int MusicTopAreaWidget::backgroundListTransparent | ( | ) |
Get list background skin transparent.
Definition at line 109 of file musictopareawidget.cpp.
References MusicBackgroundSkinDialog::backgroundListTransparent(), m_backgroundListTransparent, and m_backgroundWidget.
Referenced by MusicApplication::writeSystemConfigToFile().
|
inline |
Get background skin name.
Definition at line 67 of file musictopareawidget.h.
Referenced by MusicApplication::writeSystemConfigToFile().
|
slot |
Current background skin changed by new path.
Definition at line 228 of file musictopareawidget.cpp.
References backgroundTransparentChanged(), isArtistBackground(), and m_backgroundImagePath.
Referenced by MusicBackgroundSkinDialog::currentColorChanged(), MusicBackgroundSkinDialog::listWidgetItemClicked(), and setArtistBackground().
|
slot |
Resize current background skin when geometry changed.
Definition at line 269 of file musictopareawidget.cpp.
References backgroundAnimationChanged(), drawWindowBackgroundByImage(), isArtistBackground(), and setBackgroundAnimation().
Referenced by MusicApplication::resizeEvent().
|
slot |
Current background skin download is finished.
Definition at line 256 of file musictopareawidget.cpp.
References backgroundChanged(), drawWindowBackground(), isArtistBackground(), m_ui, and setBackgroundAnimation().
Referenced by MusicAbstractDownloadImageRequest::downLoadDataFinished(), MusicApplication::showCurrentSong(), and MusicApplication::switchToPlayState().
|
inline |
Get background skin transparent.
Definition at line 71 of file musictopareawidget.h.
Referenced by drawWindowBackgroundByImage(), playlistTransparentChanged(), and MusicApplication::writeSystemConfigToFile().
|
private |
Set list background skin transparent.
Definition at line 397 of file musictopareawidget.cpp.
References MusicSettingManager::BackgroundListTransparent, G_SETTING_PTR, and m_ui.
|
slot |
Current background transparent changed.
Definition at line 223 of file musictopareawidget.cpp.
References drawWindowBackground().
Referenced by backgroundSkinChanged(), MusicBackgroundSkinDialog::currentColorChanged(), and MusicBackgroundSkinDialog::windowTransparentChanged().
|
slot |
Current background transparent changed by value.
Definition at line 177 of file musictopareawidget.cpp.
References drawWindowBackgroundByImage(), isArtistBackground(), m_backgroundTransparent, m_backgroundWidget, and MusicBackgroundSkinDialog::setSkinTransToolText().
|
slot |
Current background transparent changed by string.
Definition at line 193 of file musictopareawidget.cpp.
References drawWindowBackgroundByPath(), and isArtistBackground().
bool MusicTopAreaWidget::backgroundTransparentEnabled | ( | ) | const |
Get background window skin enable.
Definition at line 118 of file musictopareawidget.cpp.
References MusicBackgroundSkinDialog::backgroundTransparentEnabled(), and m_backgroundWidget.
Referenced by MusicApplication::writeSystemConfigToFile().
|
private |
Create remote widget.
Definition at line 408 of file musictopareawidget.cpp.
References MusicApplication::instance(), m_remoteWidget, m_ui, remoteTypeChanged(), MusicRemoteWidget::setCurrentPlayState(), MusicRemoteWidget::setVolumeValue(), and MusicRemoteWidget::show().
Referenced by showComplexStyleRemote(), showRectangleRemote(), showRippleRemote(), showSimpleStyleRemote(), showSquareRemote(), and showWallpaperRemote().
|
slot |
Delete current remote.
Definition at line 355 of file musictopareawidget.cpp.
References m_remoteWidget.
|
private |
Draw window background.
Definition at line 428 of file musictopareawidget.cpp.
References m_backgroundImagePath, setBackgroundAnimation(), and MusicBackgroundSkinDialog::setBackgroundUrl().
Referenced by backgroundChanged(), backgroundThemeDownloadFinished(), backgroundTransparentChanged(), and drawWindowBackgroundByPath().
|
private |
Draw window background.
Definition at line 434 of file musictopareawidget.cpp.
References drawWindowBackgroundByImage(), m_backgroundImage, and TTK::Image::reRenderImage().
|
private |
Draw window background by qimage.
Definition at line 453 of file musictopareawidget.cpp.
References backgroundTransparent(), G_SETTING_PTR, MusicApplication::instance(), m_backgroundImage, m_backgroundListTransparent, m_backgroundTransparent, m_ui, originImageChanged(), TTK_RN_MAX, and MusicSettingManager::WidgetSize.
Referenced by backgroundThemeChangedByResize(), backgroundTransparentChanged(), and drawWindowBackground().
|
private |
Draw window background by path.
Definition at line 476 of file musictopareawidget.cpp.
References drawWindowBackground().
Referenced by backgroundChanged(), and backgroundTransparentChanged().
|
static |
Get class object instance.
Definition at line 43 of file musictopareawidget.cpp.
References m_instance.
Referenced by MusicRightAreaWidget::containerForWallpaperClicked(), MusicLrcContainerForInterior::contextMenuEvent(), MusicSpectrumWidget::createModuleWidget(), MusicBackgroundSkinDialog::currentColorChanged(), MusicAbstractDownloadImageRequest::downLoadDataFinished(), MusicBackgroundSkinDialog::listWidgetItemClicked(), MusicBackgroundSkinDialog::MusicBackgroundSkinDialog(), MusicSongsToolBoxMaskWidget::paintEvent(), MusicApplicationModule::windowCloseAnimation(), and MusicBackgroundSkinDialog::windowTransparentChanged().
|
private |
Check artist background mode.
Definition at line 403 of file musictopareawidget.cpp.
References m_ui, and MUSIC_LRC_PAGE.
Referenced by backgroundSkinChanged(), backgroundThemeChangedByResize(), backgroundThemeDownloadFinished(), and backgroundTransparentChanged().
const QImage & MusicTopAreaWidget::originImage | ( | ) | const |
Get origin background image.
Definition at line 127 of file musictopareawidget.cpp.
References m_backgroundImage.
|
signal |
Origin background image data changed.
Referenced by drawWindowBackgroundByImage().
|
slot |
Current list background transparent changed.
Definition at line 282 of file musictopareawidget.cpp.
References backgroundTransparent(), m_backgroundListTransparent, m_backgroundWidget, and MusicBackgroundSkinDialog::setListTransToolText().
|
slot |
Switch to diff remote type.
Definition at line 361 of file musictopareawidget.cpp.
References m_remoteWidget.
Referenced by createRemoteWidget(), MusicApplication::readSystemConfigFromFile(), and showWallpaperRemote().
|
slot |
Switch to diff remote type.
Definition at line 379 of file musictopareawidget.cpp.
References MusicRemoteWidget::ComplexStyle, MusicRemoteWidget::Rectangle, MusicRemoteWidget::Ripple, showComplexStyleRemote(), showRectangleRemote(), showRippleRemote(), showSimpleStyleRemote(), showSquareRemote(), MusicRemoteWidget::SimpleStyle, and MusicRemoteWidget::Square.
const QPixmap & MusicTopAreaWidget::renderPixmap | ( | ) | const |
Get render background pixmap.
Definition at line 132 of file musictopareawidget.cpp.
References m_ui.
|
slot |
Set background as artist background picture.
Definition at line 203 of file musictopareawidget.cpp.
References backgroundSkinChanged(), MusicBackgroundSkinDialog::cpoyArtistFileToLocal(), G_BACKGROUND_PTR, m_backgroundWidget, and MusicBackgroundSkinDialog::updateArtistFileTheme().
void MusicTopAreaWidget::setBackgroundAnimation | ( | bool | state | ) |
Stop background skin change timer.
Definition at line 137 of file musictopareawidget.cpp.
References m_pictureCarouselTimer.
Referenced by backgroundThemeChangedByResize(), backgroundThemeDownloadFinished(), drawWindowBackground(), MusicApplication::switchToPlayState(), MusicApplicationModule::windowCloseAnimation(), and MusicApplication::windowConciseChanged().
void MusicTopAreaWidget::setBackgroundParameter | ( | ) |
Set background skin and alpha and list alpha parameter.
Definition at line 102 of file musictopareawidget.cpp.
References MusicSettingManager::BackgroundListTransparent, MusicSettingManager::BackgroundThemeValue, MusicSettingManager::BackgroundTransparent, G_SETTING_PTR, m_backgroundImagePath, m_backgroundListTransparent, and m_backgroundTransparent.
Referenced by MusicApplication::readSystemConfigFromFile().
void MusicTopAreaWidget::setCurrentPlayState | ( | bool | state | ) | const |
Set current play state.
Definition at line 142 of file musictopareawidget.cpp.
References m_remoteWidget, and MusicRemoteWidget::setCurrentPlayState().
Referenced by MusicApplication::readSystemConfigFromFile(), MusicApplication::showCurrentSong(), and MusicApplication::switchToPlayState().
void MusicTopAreaWidget::setLabelText | ( | const QString & | name | ) | const |
Set current song text.
Definition at line 150 of file musictopareawidget.cpp.
References m_remoteWidget, and MusicRemoteWidget::setLabelText().
Referenced by MusicApplication::showCurrentSong().
void MusicTopAreaWidget::setupUi | ( | Ui::MusicApplication * | ui | ) |
Set up app ui.
Definition at line 48 of file musictopareawidget.cpp.
References backgroundAnimationChanged(), TTK::UI::BtnConciseIn, TTK::UI::BtnIdentify, TTK::UI::BtnMinimum, TTK::UI::BtnRemote, TTK::UI::BtnSetting, TTK::UI::BtnSkin, TTK::UI::BtnTClose, TTK::UI::BtnTools, MusicApplication::instance(), TTK::UI::LineEditStyle02, m_ui, TTK::Image::roundedPixmap(), showSkinManagerWidget(), showSquareRemote(), showToolSetsWidget(), and TTK::UI::TinyBtnMainSearch.
Referenced by MusicApplication::MusicApplication().
void MusicTopAreaWidget::setVolumeValue | ( | int | value | ) | const |
Set current volume value by index.
Definition at line 158 of file musictopareawidget.cpp.
References m_remoteWidget, and MusicRemoteWidget::setVolumeValue().
Referenced by MusicApplication::volumeChanged(), and MusicApplication::volumeMute().
|
slot |
Changed current remote to complex style mode.
Definition at line 316 of file musictopareawidget.cpp.
References createRemoteWidget(), m_remoteWidget, m_ui, and MusicRemoteWidget::setLabelText().
Referenced by remoteTypeChanged().
|
slot |
Changed current remote to rectangle mode.
Definition at line 300 of file musictopareawidget.cpp.
References createRemoteWidget(), m_remoteWidget, m_ui, and MusicRemoteWidget::setLabelText().
Referenced by remoteTypeChanged().
|
slot |
Changed current remote to ripple mode.
Definition at line 324 of file musictopareawidget.cpp.
References createRemoteWidget(), m_remoteWidget, m_ui, and MusicRemoteWidget::setLabelText().
Referenced by remoteTypeChanged().
|
slot |
Changed current remote to simple style mode.
Definition at line 308 of file musictopareawidget.cpp.
References createRemoteWidget(), m_remoteWidget, m_ui, and MusicRemoteWidget::setLabelText().
Referenced by remoteTypeChanged().
|
slot |
Show change background skin dialog.
Definition at line 166 of file musictopareawidget.cpp.
References MusicAbstractMoveDialog::exec(), m_backgroundImagePath, m_backgroundListTransparent, m_backgroundTransparent, m_backgroundWidget, and MusicBackgroundSkinDialog::setCurrentBackgroundTheme().
Referenced by setupUi().
|
slot |
Changed current remote to square mode.
Definition at line 293 of file musictopareawidget.cpp.
References createRemoteWidget(), and m_remoteWidget.
Referenced by remoteTypeChanged(), and setupUi().
|
slot |
Change to tool sets widget.
Definition at line 392 of file musictopareawidget.cpp.
References TTKGenerateSingleWidget.
Referenced by setupUi().
|
slot |
Changed current remote to wallpaper mode.
Definition at line 332 of file musictopareawidget.cpp.
References createRemoteWidget(), m_lastRemoteBeforeWallpaper, m_remoteWidget, m_ui, MusicRemoteWidget::mapRemoteTypeIndex(), remoteTypeChanged(), and MusicRemoteWidget::setLabelText().
Referenced by MusicRightAreaWidget::containerForWallpaperClicked().
|
private |
Definition at line 232 of file musictopareawidget.h.
Referenced by drawWindowBackground(), drawWindowBackgroundByImage(), and originImage().
|
private |
Definition at line 234 of file musictopareawidget.h.
Referenced by backgroundSkinChanged(), drawWindowBackground(), setBackgroundParameter(), and showSkinManagerWidget().
|
private |
Definition at line 235 of file musictopareawidget.h.
Referenced by backgroundListTransparent(), drawWindowBackgroundByImage(), playlistTransparentChanged(), setBackgroundParameter(), and showSkinManagerWidget().
|
private |
Definition at line 235 of file musictopareawidget.h.
Referenced by backgroundTransparentChanged(), drawWindowBackgroundByImage(), setBackgroundParameter(), and showSkinManagerWidget().
|
private |
Definition at line 230 of file musictopareawidget.h.
Referenced by backgroundListTransparent(), backgroundTransparentChanged(), backgroundTransparentEnabled(), playlistTransparentChanged(), setArtistBackground(), showSkinManagerWidget(), and ~MusicTopAreaWidget().
|
staticprivate |
Definition at line 238 of file musictopareawidget.h.
Referenced by instance(), and MusicTopAreaWidget().
|
private |
Definition at line 233 of file musictopareawidget.h.
Referenced by showWallpaperRemote().
|
private |
Definition at line 236 of file musictopareawidget.h.
Referenced by MusicTopAreaWidget(), and setBackgroundAnimation().
|
private |
Definition at line 231 of file musictopareawidget.h.
Referenced by createRemoteWidget(), deleteCurrentRemote(), remoteTypeChanged(), setCurrentPlayState(), setLabelText(), setVolumeValue(), showComplexStyleRemote(), showRectangleRemote(), showRippleRemote(), showSimpleStyleRemote(), showSquareRemote(), showWallpaperRemote(), and ~MusicTopAreaWidget().
|
private |
Definition at line 229 of file musictopareawidget.h.
Referenced by backgroundAnimationChanged(), backgroundThemeDownloadFinished(), backgroundTransparent(), createRemoteWidget(), drawWindowBackgroundByImage(), isArtistBackground(), renderPixmap(), setupUi(), showComplexStyleRemote(), showRectangleRemote(), showRippleRemote(), showSimpleStyleRemote(), and showWallpaperRemote().