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 | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
MusicTopAreaWidget Class Reference

The class of the app top area widget. More...

#include <musictopareawidget.h>

+ Inheritance diagram for MusicTopAreaWidget:

Public Slots

void showSkinManagerWidget ()
 
void setAsArtistBackground ()
 
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 playlistTransparent (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 backgroundAlpha () const
 
int backgroundListAlpha ()
 
bool backgroundTransparentEnable () const
 
const QImage & originImage () const
 
const QPixmap & rendererPixmap () 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 MusicTopAreaWidgetinstance ()
 

Private Member Functions

void backgroundTransparent (int value)
 
bool isEnableBackground () const
 
void createRemoteWidget ()
 
void drawWindowBackgroundRect ()
 
void drawWindowBackgroundRect (const QImage &image)
 
void drawWindowBackgroundRectString ()
 
void drawWindowBackgroundRectString (const QString &path)
 

Private Attributes

Ui::MusicApplication * m_ui
 
MusicBackgroundSkinDialogm_backgroundWidget
 
MusicRemoteWidgetm_remoteWidget
 
QImage m_backgroundImage
 
int m_lastRemoteBeforeWallpaper
 
QString m_backgroundImagePath
 
int m_backgroundAlpha
 
int m_backgroundListAlpha
 
QTimer m_pictureCarouselTimer
 

Static Private Attributes

static MusicTopAreaWidgetm_instance = nullptr
 

Detailed Description

The class of the app top area widget.

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

Definition at line 36 of file musictopareawidget.h.

Constructor & Destructor Documentation

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

Object destructor.

Definition at line 37 of file musictopareawidget.cpp.

References m_backgroundWidget, and m_remoteWidget.

Member Function Documentation

int MusicTopAreaWidget::backgroundAlpha ( ) const
inline

Get background skin alpha.

Definition at line 71 of file musictopareawidget.h.

Referenced by MusicApplication::writeSystemConfigToFile().

void MusicTopAreaWidget::backgroundAnimationChanged ( bool  state)
slot

Current slider state changed.

Definition at line 251 of file musictopareawidget.cpp.

References m_ui.

Referenced by backgroundThemeChangedByResize(), MusicApplication::MusicApplication(), and setupUi().

void MusicTopAreaWidget::backgroundChanged ( )
slot

Changed current background skin.

Definition at line 237 of file musictopareawidget.cpp.

References drawWindowBackgroundRect(), drawWindowBackgroundRectString(), and G_BACKGROUND_PTR.

Referenced by backgroundThemeDownloadFinished(), and MusicTopAreaWidget().

int MusicTopAreaWidget::backgroundListAlpha ( )
QString MusicTopAreaWidget::backgroundPath ( ) const
inline

Get background skin name.

Definition at line 67 of file musictopareawidget.h.

Referenced by MusicApplication::writeSystemConfigToFile().

void MusicTopAreaWidget::backgroundSkinChanged ( const QString &  fileName)
slot
void MusicTopAreaWidget::backgroundThemeChangedByResize ( )
slot

Resize current background skin when geometry changed.

Definition at line 269 of file musictopareawidget.cpp.

References backgroundAnimationChanged(), drawWindowBackgroundRectString(), isEnableBackground(), and setBackgroundAnimation().

Referenced by MusicApplication::resizeEvent().

void MusicTopAreaWidget::backgroundThemeDownloadFinished ( )
slot
void MusicTopAreaWidget::backgroundTransparent ( int  value)
private

Set list background skin transparent.

Definition at line 397 of file musictopareawidget.cpp.

References MusicSettingManager::BackgroundListTransparent, G_SETTING_PTR, and m_ui.

Referenced by drawWindowBackgroundRectString(), and playlistTransparent().

void MusicTopAreaWidget::backgroundTransparentChanged ( )
slot
void MusicTopAreaWidget::backgroundTransparentChanged ( int  value)
slot
void MusicTopAreaWidget::backgroundTransparentChanged ( const QString &  fileName)
slot

Current background transparent changed by string.

Definition at line 193 of file musictopareawidget.cpp.

References drawWindowBackgroundRectString(), and isEnableBackground().

bool MusicTopAreaWidget::backgroundTransparentEnable ( ) const

Get background window skin enable.

Definition at line 118 of file musictopareawidget.cpp.

References MusicBackgroundSkinDialog::backgroundTransparentEnable(), and m_backgroundWidget.

Referenced by MusicApplication::writeSystemConfigToFile().

void MusicTopAreaWidget::createRemoteWidget ( )
private
void MusicTopAreaWidget::deleteCurrentRemote ( )
slot

Delete current remote.

Definition at line 355 of file musictopareawidget.cpp.

References m_remoteWidget.

void MusicTopAreaWidget::drawWindowBackgroundRect ( )
private
void MusicTopAreaWidget::drawWindowBackgroundRect ( const QImage &  image)
private

Draw window background rect.

Definition at line 434 of file musictopareawidget.cpp.

References drawWindowBackgroundRectString(), m_backgroundImage, and TTK::Image::reRenderImage().

void MusicTopAreaWidget::drawWindowBackgroundRectString ( )
private
void MusicTopAreaWidget::drawWindowBackgroundRectString ( const QString &  path)
private

Draw window background rect by picture.

Definition at line 475 of file musictopareawidget.cpp.

References drawWindowBackgroundRect().

MusicTopAreaWidget * MusicTopAreaWidget::instance ( )
static
bool MusicTopAreaWidget::isEnableBackground ( ) const
private
const QImage & MusicTopAreaWidget::originImage ( ) const

Get origin background image.

Definition at line 127 of file musictopareawidget.cpp.

References m_backgroundImage.

void MusicTopAreaWidget::originImageChanged ( const QImage &  image)
signal

Origin background image data changed.

Referenced by drawWindowBackgroundRectString().

void MusicTopAreaWidget::playlistTransparent ( int  index)
slot

Current list background transparent changed.

Definition at line 282 of file musictopareawidget.cpp.

References backgroundTransparent(), m_backgroundListAlpha, m_backgroundWidget, and MusicBackgroundSkinDialog::setListTransToolText().

void MusicTopAreaWidget::remoteTypeChanged ( QAction *  type)
slot

Switch to diff remote type.

Definition at line 361 of file musictopareawidget.cpp.

References m_remoteWidget.

Referenced by createRemoteWidget(), MusicApplication::readSystemConfigFromFile(), and showWallpaperRemote().

void MusicTopAreaWidget::remoteTypeChanged ( int  type)
slot
const QPixmap & MusicTopAreaWidget::rendererPixmap ( ) const

Get renderer background pixmap.

Definition at line 132 of file musictopareawidget.cpp.

References m_ui.

void MusicTopAreaWidget::setAsArtistBackground ( )
slot
void MusicTopAreaWidget::setBackgroundAnimation ( bool  state)
void MusicTopAreaWidget::setBackgroundParameter ( )
void MusicTopAreaWidget::setCurrentPlayState ( bool  state) const
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)
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().

void MusicTopAreaWidget::showComplexStyleRemote ( )
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().

void MusicTopAreaWidget::showRectangleRemote ( )
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().

void MusicTopAreaWidget::showRippleRemote ( )
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().

void MusicTopAreaWidget::showSimpleStyleRemote ( )
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().

void MusicTopAreaWidget::showSkinManagerWidget ( )
slot
void MusicTopAreaWidget::showSquareRemote ( )
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().

void MusicTopAreaWidget::showToolSetsWidget ( )
slot

Change to tool sets widget.

Definition at line 392 of file musictopareawidget.cpp.

References TTKGenerateSingleWidget.

Referenced by setupUi().

void MusicTopAreaWidget::showWallpaperRemote ( bool  create)
slot

Member Data Documentation

int MusicTopAreaWidget::m_backgroundAlpha
private
QImage MusicTopAreaWidget::m_backgroundImage
private
QString MusicTopAreaWidget::m_backgroundImagePath
private
int MusicTopAreaWidget::m_backgroundListAlpha
private
MusicBackgroundSkinDialog* MusicTopAreaWidget::m_backgroundWidget
private
MusicTopAreaWidget * MusicTopAreaWidget::m_instance = nullptr
staticprivate

Definition at line 238 of file musictopareawidget.h.

Referenced by instance(), and MusicTopAreaWidget().

int MusicTopAreaWidget::m_lastRemoteBeforeWallpaper
private

Definition at line 233 of file musictopareawidget.h.

Referenced by showWallpaperRemote().

QTimer MusicTopAreaWidget::m_pictureCarouselTimer
private

Definition at line 236 of file musictopareawidget.h.

Referenced by MusicTopAreaWidget(), and setBackgroundAnimation().

MusicRemoteWidget* MusicTopAreaWidget::m_remoteWidget
private
Ui::MusicApplication* MusicTopAreaWidget::m_ui
private

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