TTKMusicPlayer
3.7.0.0
TTKMusicPlayer imitates Kugou UI, the music player uses of qmmp core library based on Qt for windows and linux
|
The class of the manager of dealing with artist pictures. More...
#include <musicbackgroundmanager.h>
Signals | |
void | artistChanged () |
void | backgroundChanged () |
void | selectIndexChanged () |
Public Member Functions | |
void | setArtistName (const QString &name) |
QString | artistName () const |
int | currentIndex () const |
void | setCurrentIndex (int index) |
int | count () const |
bool | isEmpty () const |
void | photoNext () |
void | photoPrevious () |
QString | artistPhotoPath () |
QString | artistPhotoDefaultPath () const |
void | updateArtistPhotoList () |
QStringList | artistPhotoList () const |
void | setArtistPhotoList (const QStringList &list) |
void | setSelectArtistIndex (int index) |
void | addObserver (QObject *object) |
void | removeObserver (QObject *object) |
void | setBackgroundUrl (const QString &path) |
QString | backgroundUrl () const |
void | backgroundUrlChanged () |
Private Member Functions | |
MusicBackgroundManager () | |
Private Attributes | |
int | m_currentIndex |
QStringList | m_photos |
QObjectList | m_observer |
QString | m_currentArtistName |
QString | m_background |
The class of the manager of dealing with artist pictures.
Definition at line 28 of file musicbackgroundmanager.h.
|
private |
Object constructor.
Definition at line 4 of file musicbackgroundmanager.cpp.
void MusicBackgroundManager::addObserver | ( | QObject * | object | ) |
Add observer.
Definition at line 92 of file musicbackgroundmanager.cpp.
References backgroundChanged(), and m_observer.
|
signal |
New artist has been set.
Referenced by updateArtistPhotoList().
QString MusicBackgroundManager::artistName | ( | ) | const |
Get current artist name.
Definition at line 16 of file musicbackgroundmanager.cpp.
References m_currentArtistName.
QString MusicBackgroundManager::artistPhotoDefaultPath | ( | ) | const |
Get artist photo path by default.
Definition at line 43 of file musicbackgroundmanager.cpp.
References m_currentIndex, and m_photos.
QStringList MusicBackgroundManager::artistPhotoList | ( | ) | const |
Get artist photo path list.
Definition at line 76 of file musicbackgroundmanager.cpp.
References m_photos.
QString MusicBackgroundManager::artistPhotoPath | ( | ) |
Get artist photo path.
Definition at line 31 of file musicbackgroundmanager.cpp.
References m_currentIndex, and m_photos.
|
signal |
Background image changed.
Referenced by addObserver(), backgroundUrlChanged(), and removeObserver().
QString MusicBackgroundManager::backgroundUrl | ( | ) | const |
Get artist background picture path.
Definition at line 109 of file musicbackgroundmanager.cpp.
References m_background.
void MusicBackgroundManager::backgroundUrlChanged | ( | ) |
Get artist background picture path.
Definition at line 114 of file musicbackgroundmanager.cpp.
References backgroundChanged().
|
inline |
Get artist photo count.
Definition at line 53 of file musicbackgroundmanager.h.
|
inline |
Get artist photo current index.
Definition at line 45 of file musicbackgroundmanager.h.
|
inline |
Get artist photo count is 0.
Definition at line 57 of file musicbackgroundmanager.h.
void MusicBackgroundManager::photoNext | ( | ) |
Set artist photo current index + 1.
Definition at line 21 of file musicbackgroundmanager.cpp.
References m_currentIndex.
void MusicBackgroundManager::photoPrevious | ( | ) |
Set artist photo current index - 1.
Definition at line 26 of file musicbackgroundmanager.cpp.
References m_currentIndex.
void MusicBackgroundManager::removeObserver | ( | QObject * | object | ) |
Remove observer.
Definition at line 98 of file musicbackgroundmanager.cpp.
References backgroundChanged(), and m_observer.
|
signal |
User selected index changed.
Referenced by setSelectArtistIndex().
void MusicBackgroundManager::setArtistName | ( | const QString & | name | ) |
Set current artist name.
Definition at line 10 of file musicbackgroundmanager.cpp.
References TTK::generateSongArtist(), m_currentArtistName, and updateArtistPhotoList().
void MusicBackgroundManager::setArtistPhotoList | ( | const QStringList & | list | ) |
Set artist photo path by given path list.
Definition at line 81 of file musicbackgroundmanager.cpp.
References m_photos.
void MusicBackgroundManager::setBackgroundUrl | ( | const QString & | path | ) |
Set artist background picture by path.
Definition at line 104 of file musicbackgroundmanager.cpp.
References m_background.
|
inline |
Set artist photo current index.
Definition at line 49 of file musicbackgroundmanager.h.
void MusicBackgroundManager::setSelectArtistIndex | ( | int | index | ) |
Set user select current index.
Definition at line 86 of file musicbackgroundmanager.cpp.
References m_currentIndex, and selectIndexChanged().
void MusicBackgroundManager::updateArtistPhotoList | ( | ) |
Update artist photo list.
Definition at line 54 of file musicbackgroundmanager.cpp.
References artistChanged(), BACKGROUND_DIR_FULL, m_currentArtistName, m_currentIndex, m_photos, MAX_IMAGE_COUNT, and SKN_FILE.
Referenced by setArtistName().
|
private |
Definition at line 140 of file musicbackgroundmanager.h.
Referenced by backgroundUrl(), and setBackgroundUrl().
|
private |
Definition at line 140 of file musicbackgroundmanager.h.
Referenced by artistName(), setArtistName(), and updateArtistPhotoList().
|
private |
Definition at line 137 of file musicbackgroundmanager.h.
Referenced by artistPhotoDefaultPath(), artistPhotoPath(), photoNext(), photoPrevious(), setSelectArtistIndex(), and updateArtistPhotoList().
|
private |
Definition at line 139 of file musicbackgroundmanager.h.
Referenced by addObserver(), and removeObserver().
|
private |
Definition at line 138 of file musicbackgroundmanager.h.
Referenced by artistPhotoDefaultPath(), artistPhotoList(), artistPhotoPath(), setArtistPhotoList(), and updateArtistPhotoList().