|
TTKMusicPlayer
4.2.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 background list widget. More...
#include <musicbackgroundlistwidget.h>
Inheritance diagram for MusicBackgroundListWidget:Public Types | |
| enum | Module { CachedModule, StackedModule, DailyModule, OnlineModule } |
Signals | |
| void | itemClicked (int type, const QString &name) |
Public Member Functions | |
| MusicBackgroundListWidget (QWidget *parent=nullptr) | |
| ~MusicBackgroundListWidget () | |
| void | setCurrentItemName (const QString &name) |
| void | setType (Module type) noexcept |
| Module | type () const noexcept |
| void | clearState () |
| void | clearItems () |
| void | addCellItem (const QString &icon, bool state) |
| void | addCellItem (const QString &name, const QString &path, bool state) |
| void | updateItem (const MusicBackgroundImage &image, const QString &path) |
| bool | contains (const QString &name) const |
| bool | contains (const MusicBackgroundImage &image) const |
| int | find (MusicBackgroundListItem *item) const |
| MusicBackgroundListItem * | find (const QString &name) const |
| MusicBackgroundListItem * | find (const MusicBackgroundImage &image) const |
| void | updateLastItem () |
| int | count () const noexcept |
Private Slots | |
| void | itemCloseClicked (MusicBackgroundListItem *item) |
| void | currentItemClicked (MusicBackgroundListItem *item) |
Private Attributes | |
| Module | m_type |
| QGridLayout * | m_gridLayout |
| MusicBackgroundListItem * | m_currentItem |
| QList< MusicBackgroundListItem * > | m_items |
The class of the background list widget.
Definition at line 135 of file musicbackgroundlistwidget.h.
| Enumerator | |
|---|---|
| CachedModule | |
| StackedModule | |
| DailyModule | |
| OnlineModule | |
Definition at line 140 of file musicbackgroundlistwidget.h.
|
explicit |
Object constructor.
Definition at line 137 of file musicbackgroundlistwidget.cpp.
References m_gridLayout.
| MusicBackgroundListWidget::~MusicBackgroundListWidget | ( | ) |
Object destructor.
Definition at line 148 of file musicbackgroundlistwidget.cpp.
References clearItems(), and m_gridLayout.
| void MusicBackgroundListWidget::addCellItem | ( | const QString & | icon, |
| bool | state | ||
| ) |
Create cell item by input data.
Definition at line 182 of file musicbackgroundlistwidget.cpp.
References currentItemClicked(), itemClicked(), itemCloseClicked(), m_gridLayout, m_items, MIN_ITEM_COUNT, and MusicBackgroundListItem::setCloseEnabled().
Referenced by MusicBackgroundSkinDialog::addThemeListWidgetItem(), MusicBackgroundSkinDialog::classicalListWidgetItemClicked(), MusicBackgroundSkinDialog::cpoyFileFromLocal(), MusicBackgroundSkinDialog::listWidgetItemClicked(), MusicBackgroundSkinDialog::showCustomSkinDialog(), MusicBackgroundRemoteWidget::startToRequest(), and MusicBackgroundSkinDialog::updateArtistFileTheme().
| void MusicBackgroundListWidget::addCellItem | ( | const QString & | name, |
| const QString & | path, | ||
| bool | state | ||
| ) |
Create cell item by input data.
Definition at line 194 of file musicbackgroundlistwidget.cpp.
References currentItemClicked(), itemClicked(), itemCloseClicked(), m_gridLayout, m_items, MIN_ITEM_COUNT, MusicBackgroundListItem::setCloseEnabled(), MusicBackgroundListItem::setFileName(), MusicBackgroundListItem::setFilePath(), and MusicBackgroundListItem::updatePixmap().
| void MusicBackgroundListWidget::clearItems | ( | ) |
Clear All Items.
Definition at line 175 of file musicbackgroundlistwidget.cpp.
References m_currentItem, and m_items.
Referenced by MusicBackgroundOnlineWidget::initialize(), MusicBackgroundRemoteWidget::startToRequest(), and ~MusicBackgroundListWidget().
| void MusicBackgroundListWidget::clearState | ( | ) |
Clear select state.
Definition at line 167 of file musicbackgroundlistwidget.cpp.
References m_items, and qAsConst.
Referenced by MusicBackgroundSkinDialog::listWidgetItemClicked().
| bool MusicBackgroundListWidget::contains | ( | const QString & | name | ) | const |
Current item contains or not.
Definition at line 223 of file musicbackgroundlistwidget.cpp.
References m_items, name, and qAsConst.
Referenced by MusicBackgroundSkinDialog::classicalListWidgetItemClicked(), and MusicBackgroundSkinDialog::listWidgetItemClicked().
| bool MusicBackgroundListWidget::contains | ( | const MusicBackgroundImage & | image | ) | const |
Current item contains or not.
Definition at line 236 of file musicbackgroundlistwidget.cpp.
References MusicBackgroundImage::m_item, m_items, and qAsConst.
|
inlinenoexcept |
Item count.
Definition at line 224 of file musicbackgroundlistwidget.h.
|
privateslot |
Current item has clicked.
Definition at line 325 of file musicbackgroundlistwidget.cpp.
References MusicBackgroundListItem::fileName(), itemClicked(), m_currentItem, m_type, and MusicBackgroundListItem::setSelected().
Referenced by addCellItem(), itemCloseClicked(), and updateLastItem().
| int MusicBackgroundListWidget::find | ( | MusicBackgroundListItem * | item | ) | const |
Current item index at container.
Definition at line 249 of file musicbackgroundlistwidget.cpp.
References m_items.
Referenced by itemCloseClicked(), and MusicBackgroundSkinDialog::listWidgetItemClicked().
| MusicBackgroundListItem * MusicBackgroundListWidget::find | ( | const QString & | name | ) | const |
Find item by name.
Definition at line 262 of file musicbackgroundlistwidget.cpp.
| MusicBackgroundListItem * MusicBackgroundListWidget::find | ( | const MusicBackgroundImage & | image | ) | const |
Find item by image.
Definition at line 275 of file musicbackgroundlistwidget.cpp.
References MusicBackgroundImage::m_item, m_items, and qAsConst.
Current item clicked.
Referenced by addCellItem(), and currentItemClicked().
|
privateslot |
Current item close clicked.
Definition at line 296 of file musicbackgroundlistwidget.cpp.
References currentItemClicked(), MusicBackgroundListItem::filePath(), find(), m_currentItem, m_gridLayout, m_items, MIN_ITEM_COUNT, and MusicToastLabel::popup().
Referenced by addCellItem().
| void MusicBackgroundListWidget::setCurrentItemName | ( | const QString & | name | ) |
Select current item by name when the widget show.
Definition at line 154 of file musicbackgroundlistwidget.cpp.
References m_currentItem, m_items, name, and qAsConst.
Referenced by MusicBackgroundSkinDialog::listWidgetItemClicked(), and MusicBackgroundSkinDialog::setCurrentBackgroundTheme().
|
inlinenoexcept |
Set background list rtpe.
Definition at line 165 of file musicbackgroundlistwidget.h.
Referenced by MusicBackgroundDailyWidget::MusicBackgroundDailyWidget(), MusicBackgroundOnlineWidget::MusicBackgroundOnlineWidget(), and MusicBackgroundSkinDialog::MusicBackgroundSkinDialog().
|
inlinenoexcept |
Get background list rtpe.
Definition at line 169 of file musicbackgroundlistwidget.h.
| void MusicBackgroundListWidget::updateItem | ( | const MusicBackgroundImage & | image, |
| const QString & | path | ||
| ) |
Update item by backgroud image.
Definition at line 208 of file musicbackgroundlistwidget.cpp.
References m_items, and qAsConst.
Referenced by MusicBackgroundRemoteWidget::downLoadFinished().
| void MusicBackgroundListWidget::updateLastItem | ( | ) |
Update last item state.
Definition at line 288 of file musicbackgroundlistwidget.cpp.
References currentItemClicked(), and m_items.
Referenced by MusicBackgroundSkinDialog::showCustomSkinDialog(), MusicBackgroundSkinDialog::showPaletteDialog(), and MusicBackgroundSkinDialog::updateArtistFileTheme().
|
private |
Definition at line 245 of file musicbackgroundlistwidget.h.
Referenced by clearItems(), currentItemClicked(), itemCloseClicked(), and setCurrentItemName().
|
private |
Definition at line 244 of file musicbackgroundlistwidget.h.
Referenced by addCellItem(), itemCloseClicked(), MusicBackgroundListWidget(), and ~MusicBackgroundListWidget().
|
private |
Definition at line 246 of file musicbackgroundlistwidget.h.
Referenced by addCellItem(), clearItems(), clearState(), contains(), find(), itemCloseClicked(), setCurrentItemName(), updateItem(), and updateLastItem().
|
private |
Definition at line 243 of file musicbackgroundlistwidget.h.
Referenced by currentItemClicked().
1.8.8