|
TTKMusicPlayer
4.3.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 songs container widget. More...
#include <musicsongscontainerwidget.h>
Inheritance diagram for MusicSongsContainerWidget:Public Member Functions | |
| MusicSongsContainerWidget (QWidget *parent=nullptr) | |
| ~MusicSongsContainerWidget () | |
| void | updateSongItem (const MusicSongItem &item) |
| bool | addSongItemList (const MusicSongItemList &items) |
| void | appendSongItemList (const MusicSongItemList &items) |
| const MusicSongItemList & | items () const noexcept |
| void | importSongsByUrl (const QString &path, int playlistRow) |
| void | importSongsByPath (const QStringList &files, int playlistRow) |
| QStringList | songsFileName (int index) const |
| QStringList | songsFilePath (int index) const |
| int | mapSongIndexByFilePath (int playlistRow, const QString &path) const |
| QString | mapFilePathBySongIndex (int playlistRow, int index) const |
| void | removeSearchResult (int &row) |
| int | playRowIndex () const noexcept |
| void | setPlayRowIndex (int index) |
| void | playLocation (int index) |
| void | selectRow (int index) |
| void | updateDurationLabel (const QString ¤t, const QString &total) const |
Public Member Functions inherited from MusicSongsToolBoxWidget | |
| MusicSongsToolBoxWidget (QWidget *parent=nullptr) | |
| void | setSongSort (QWidget *item, MusicSongSort *sort) |
| int | makeValidIndex () const |
Public Member Functions inherited from MusicFunctionToolBoxWidget | |
| MusicFunctionToolBoxWidget (QWidget *parent=nullptr) | |
| ~MusicFunctionToolBoxWidget () | |
| void | addCellItem (QWidget *item, const QString &text) |
| void | removeItem (QWidget *item) |
| void | swapItem (int start, int end) |
| void | setTitle (QWidget *item, const QString &text) |
| void | resizeScrollIndex (int index) const |
| int | currentIndex () const noexcept |
| int | count () const noexcept |
Static Public Member Functions | |
| static MusicSongsContainerWidget * | instance () |
Private Slots | |
| void | showSearchWidget () |
| void | sliderValueChanaged (int value) |
| void | deleteFunctionWidget () |
Private Member Functions | |
| virtual void | resizeEvent (QResizeEvent *event) overridefinal |
| virtual void | contextMenuEvent (QContextMenuEvent *event) overridefinal |
| virtual void | dragEnterEvent (QDragEnterEvent *event) overridefinal |
| virtual void | dragMoveEvent (QDragMoveEvent *event) overridefinal |
| virtual void | dropEvent (QDropEvent *event) overridefinal |
| bool | isSearchedPlayIndex () const noexcept |
| void | closeSearchWidget () |
| void | closeSearchWidgetInNeed () |
| void | checkTitleNameValid (QString &name) |
| void | createWidgetItem (MusicSongItem *item) |
| MusicSongItem * | createContainerItem (const MusicSongItem &item) |
| void | setItemTitle (MusicSongItem *item) |
| void | setInputModule (QObject *object) const |
| void | resizeGeometry () |
| void | updatePlayedRows (int start, int end) |
| void | importSongsWithProgress (QWidget *progress, int offset, const QStringList &files, int playlistRow) |
Private Member Functions inherited from MusicItemSearchInterface< MusicSongItemList > | |
| MusicItemSearchInterface () noexcept | |
| bool | hasSearchResult () const noexcept |
| void | clearSearchResult () noexcept |
| void | mappedSearchRow (int pos, int &row) const noexcept |
Private Attributes | |
| int | m_playRowIndex |
| int | m_lastSearchIndex |
| int | m_selectDeleteIndex |
| MusicSongsToolBoxMaskWidget * | m_topMaskWidget |
| MusicSongsListFunctionWidget * | m_functionWidget |
| MusicSongSearchDialog * | m_songSearchWidget |
Private Attributes inherited from MusicItemSearchInterface< MusicSongItemList > | |
| MusicSongItemList | m_containerItems |
| int | m_searchResultLevel |
| TTKSearchItems | m_searchResultItems |
Static Private Attributes | |
| static MusicSongsContainerWidget * | m_instance = nullptr |
Additional Inherited Members | |
Protected Member Functions inherited from MusicFunctionToolBoxWidget | |
| virtual void | mousePressEvent (QMouseEvent *event) overridefinal |
| int | foundMappedIndex (int index) |
Protected Attributes inherited from MusicFunctionToolBoxWidget | |
| int | m_currentIndex |
| int | m_itemIndexRaise |
| QVBoxLayout * | m_layout |
| QScrollArea * | m_scrollArea |
| QWidget * | m_contentsWidget |
| QList< Data > | m_items |
Private Types inherited from MusicItemSearchInterface< MusicSongItemList > | |
| using | TTKSearchItems = QMap< int, TTKIntList > |
| using | MusicItemSearchInterfaceClass = MusicItemSearchInterface< MusicSongItemList > |
The class of the songs container widget.
Definition at line 33 of file musicsongscontainerwidget.h.
|
explicit |
Object constructor.
Definition at line 23 of file musicsongscontainerwidget.cpp.
References MusicFunctionToolBoxWidget::itemIndexChanged(), m_instance, MusicFunctionToolBoxWidget::m_scrollArea, m_topMaskWidget, setInputModule(), and sliderValueChanaged().
| MusicSongsContainerWidget::~MusicSongsContainerWidget | ( | ) |
Object destructor.
Definition at line 42 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::m_containerItems, m_functionWidget, m_songSearchWidget, and m_topMaskWidget.
|
slot |
Add new play list item.
Definition at line 375 of file musicsongscontainerwidget.cpp.
References checkTitleNameValid(), createContainerItem(), ITEM_MAX_COUNT, MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicSongItem::m_id, MusicSongItem::m_itemName, MusicToastLabel::popup(), and qAsConst.
Referenced by contextMenuEvent(), and setInputModule().
|
slot |
Add current network media buffer to playlist.
when download finished just play it at once
Definition at line 780 of file musicsongscontainerwidget.cpp.
References TTK::generateNetworkSongMeta(), MusicApplication::instance(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicResultDataItem::m_count, MusicResultDataItem::m_description, MusicResultDataItem::m_id, MusicSongItem::m_itemWidget, MusicResultDataItem::m_name, MusicResultDataItem::m_nickName, MusicSongItem::m_songs, MusicResultDataItem::m_time, MusicResultDataItem::m_title, TTK::Algorithm::md5(), MUSIC_NETWORK_LIST, MUSIC_PLAY_NOW, MusicApplication::playIndexClicked(), MusicFunctionToolBoxWidget::setCurrentIndex(), setItemTitle(), and MusicAbstractSongsListTableWidget::updateSongsList().
Referenced by MusicSongSearchTableWidget::addSearchMusicToPlaylist(), MusicNewSongRecommendQueryTableWidget::downloadDataFrom(), MusicItemQueryTableWidget::downloadDataFrom(), and importSongsByUrl().
| bool MusicSongsContainerWidget::addSongItemList | ( | const MusicSongItemList & | items | ) |
Add media datas into container.
Definition at line 93 of file musicsongscontainerwidget.cpp.
References createWidgetItem(), items(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicSongItem::m_itemIndex, MusicSongItem::m_itemName, MUSIC_LOVEST_LIST, MUSIC_NETWORK_LIST, MUSIC_NORMAL_LIST, MUSIC_RECENT_LIST, and qAsConst.
Referenced by MusicApplication::readSystemConfigFromFile().
|
slot |
Add or remove media list song to lovest list by row.
if current play list contains, call main add and remove function
Add to lovest list
Remove to lovest list
Definition at line 744 of file musicsongscontainerwidget.cpp.
References MusicApplication::addSongToLovestList(), MusicItemSearchInterface< MusicSongItemList >::hasSearchResult(), MusicApplication::instance(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicFunctionToolBoxWidget::m_currentIndex, MusicSongItem::m_itemWidget, m_playRowIndex, MusicSongItem::m_songs, MUSIC_LOVEST_LIST, MusicSong::path(), MusicSongsListPlayTableWidget::removeItems(), MusicApplication::removeLoveItemAt(), setItemTitle(), TTKObjectCast, and MusicSongsListPlayTableWidget::updateSongsList().
Referenced by createWidgetItem().
|
slot |
Add current selected song to play list.
just play it at once
Definition at line 808 of file musicsongscontainerwidget.cpp.
References importSongsByPath(), MusicApplication::instance(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicSongItem::m_songs, MusicSongsToolBoxWidget::makeValidIndex(), MusicApplication::playIndexClicked(), MusicToastLabel::popup(), and MusicFunctionToolBoxWidget::setCurrentIndex().
Referenced by MusicPlaylistBackupTableWidget::itemDoubleClicked(), MusicAbstractDownloadTableWidget::itemDoubleClicked(), MusicMobileSongsManagerWidget::itemDoubleClicked(), MusicLocalManagerWidget::itemDoubleClicked(), MusicSongCheckToolsDuplicateTableWidget::playSong(), MusicSongCheckToolsQualityTableWidget::playSong(), and MusicMobileSongsManagerWidget::selectedItemsToPlaylist().
|
slot |
Add media to played list.
Definition at line 574 of file musicsongscontainerwidget.cpp.
References MusicPlayedListPopWidget::append(), MusicFunctionToolBoxWidget::foundMappedIndex(), MusicPlayedListPopWidget::instance(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicSongItem::m_itemIndex, and MusicSongItem::m_songs.
Referenced by setInputModule().
|
slot |
Add media to played list and play later.
Definition at line 562 of file musicsongscontainerwidget.cpp.
References MusicFunctionToolBoxWidget::foundMappedIndex(), MusicPlayedListPopWidget::insert(), MusicPlayedListPopWidget::instance(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicSongItem::m_itemIndex, and MusicSongItem::m_songs.
Referenced by setInputModule().
|
slot |
Input recent imported media datas into container.
Definition at line 935 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicSongItem::m_itemName, MusicSongItem::m_itemWidget, m_playRowIndex, MusicSongItem::m_songs, MUSIC_NETWORK_LIST, MUSIC_NORMAL_LIST, MUSIC_RECENT_LIST, RECENT_ITEM_MAX_COUNT, MusicSongsListPlayTableWidget::removeItems(), MusicFunctionToolBoxWidget::setTitle(), TTKObjectCast, and MusicSongsListPlayTableWidget::updateSongsList().
Referenced by MusicApplication::showCurrentSong().
| void MusicSongsContainerWidget::appendSongItemList | ( | const MusicSongItemList & | items | ) |
Append media datas into container.
Definition at line 155 of file musicsongscontainerwidget.cpp.
References checkTitleNameValid(), createContainerItem(), and MusicSongItem::m_itemName.
Referenced by MusicApplication::importSongsItemList(), and updateSongItem().
Open rename selected play list item widget.
Definition at line 488 of file musicsongscontainerwidget.cpp.
References MusicFunctionToolBoxWidget::foundMappedIndex(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicSongItem::m_itemName, name, MusicToastLabel::popup(), and setItemTitle().
Referenced by setInputModule().
|
private |
Check title name valid.
Definition at line 1230 of file musicsongscontainerwidget.cpp.
References ITEM_MAX_COUNT, MusicItemSearchInterface< MusicSongItemList >::m_containerItems, name, and qAsConst.
Referenced by addNewRowItem(), appendSongItemList(), and dropEvent().
|
private |
Close searched text widget.
Definition at line 1214 of file musicsongscontainerwidget.cpp.
References MusicSongSearchDialog::close(), and m_songSearchWidget.
Referenced by closeSearchWidgetInNeed(), and removeSearchResult().
|
private |
Close searched text widget in need.
Definition at line 1222 of file musicsongscontainerwidget.cpp.
References closeSearchWidget(), and MusicItemSearchInterface< MusicSongItemList >::hasSearchResult().
Referenced by deleteAllItems(), importSongsByUrl(), importSongsWithProgress(), selectRow(), and songListSortBy().
|
finaloverrideprivatevirtual |
Definition at line 1197 of file musicsongscontainerwidget.cpp.
References addNewRowItem(), TTK::Widget::adjustMenuPosition(), deleteRowItems(), MusicApplication::instance(), ITEM_MIN_COUNT, MusicItemSearchInterface< MusicSongItemList >::m_containerItems, TTK::UI::MenuStyle02, showLrcDownloadBatchWidget(), and showSongCheckToolsWidget().
|
private |
Create container item.
Definition at line 1282 of file musicsongscontainerwidget.cpp.
References createWidgetItem(), and MusicItemSearchInterface< MusicSongItemList >::m_containerItems.
Referenced by addNewRowItem(), appendSongItemList(), and dropEvent().
|
private |
Create widget item.
connect to items
Definition at line 1254 of file musicsongscontainerwidget.cpp.
References MusicFunctionToolBoxWidget::addCellItem(), addSongToLovestList(), MusicFunctionToolBoxWidget::foundMappedIndex(), isCurrentPlaylistRow(), isSearchedResultEmpty(), itemRowSwaped(), MusicSongItem::m_itemIndex, MusicFunctionToolBoxWidget::m_itemIndexRaise, MusicSongItem::m_itemName, MusicFunctionToolBoxWidget::m_items, MusicSongItem::m_itemWidget, MusicFunctionToolBoxWidget::m_scrollArea, MusicSongItem::m_songs, MusicSongItem::m_sort, removeItemAt(), setInputModule(), MusicSmoothMovingTableWidget::setMovedScrollBar(), MusicAbstractSongsListTableWidget::setPlaylistRow(), MusicAbstractSongsListTableWidget::setSongsList(), MusicSongsListPlayTableWidget::setSongSort(), MusicSongsToolBoxWidget::setSongSort(), MusicFunctionToolBoxWidget::setTitle(), showFloatWidget(), and songListSortBy().
Referenced by addSongItemList(), and createContainerItem().
|
slot |
Delete all items in play list item.
Definition at line 461 of file musicsongscontainerwidget.cpp.
References MusicAbstractSongsListTableWidget::clearItems(), closeSearchWidgetInNeed(), MusicFunctionToolBoxWidget::foundMappedIndex(), MusicApplication::instance(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, m_playRowIndex, m_selectDeleteIndex, MUSIC_NONE_LIST, MusicApplication::playIndexBy(), TTK_NORMAL_LEVEL, and TTKObjectCast.
Referenced by setInputModule().
|
privateslot |
Delete the float function widget.
Definition at line 1085 of file musicsongscontainerwidget.cpp.
References m_functionWidget.
Referenced by showFloatWidget().
|
slot |
Delete selected play list item.
Definition at line 401 of file musicsongscontainerwidget.cpp.
References MusicAbstractMoveDialog::exec(), MusicFunctionToolBoxWidget::foundMappedIndex(), MusicApplication::instance(), MusicPlayedListPopWidget::instance(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicSongItem::m_itemIndex, MusicFunctionToolBoxWidget::m_items, MusicSongItem::m_itemWidget, m_playRowIndex, MusicSongItem::m_songs, message(), MUSIC_NORMAL_LIST, MusicApplication::playIndexBy(), MusicPlayedListPopWidget::remove(), MusicFunctionToolBoxWidget::removeItem(), MusicFunctionToolBoxWidget::setCurrentIndex(), MusicMessageBox::setText(), TTK_NORMAL_LEVEL, and updatePlayedRows().
Referenced by setInputModule().
|
slot |
Delete all other item, left than three item.
Definition at line 437 of file musicsongscontainerwidget.cpp.
References MusicAbstractMoveDialog::exec(), MusicApplication::instance(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicFunctionToolBoxWidget::m_items, MusicSongItem::m_itemWidget, m_playRowIndex, message(), MUSIC_NORMAL_LIST, MusicApplication::playIndexBy(), TTK::playlistRowValid(), MusicFunctionToolBoxWidget::removeItem(), MusicFunctionToolBoxWidget::setCurrentIndex(), MusicMessageBox::setText(), and TTK_NORMAL_LEVEL.
Referenced by contextMenuEvent().
|
finaloverrideprivatevirtual |
Definition at line 1097 of file musicsongscontainerwidget.cpp.
|
finaloverrideprivatevirtual |
Definition at line 1104 of file musicsongscontainerwidget.cpp.
References MusicFunctionToolBoxWidget::m_items, TTK::playlistRowValid(), and qAsConst.
|
finaloverrideprivatevirtual |
Definition at line 1122 of file musicsongscontainerwidget.cpp.
References checkTitleNameValid(), MusicFunctionToolBoxWidget::count(), createContainerItem(), TTK::File::fileListByPath(), MusicFunctionToolBoxWidget::foundMappedIndex(), importSongsByPath(), importSongsWithProgress(), MusicSongItem::m_itemIndex, MusicSongItem::m_itemName, MusicFunctionToolBoxWidget::m_items, m_playRowIndex, TTK::playlistRowValid(), MusicToastLabel::popup(), qAsConst, MusicProgressWidget::setTitle(), MusicProgressWidget::show(), and MusicFormats::supportMusicInputFilterFormats().
|
slot |
Import media songs by dir.
Definition at line 606 of file musicsongscontainerwidget.cpp.
References MusicFunctionToolBoxWidget::foundMappedIndex(), TTK::File::getExistingDirectory(), importSongsByUrl(), MusicFunctionToolBoxWidget::m_currentIndex, and TTK_LOW_LEVEL.
Referenced by setInputModule().
|
slot |
Import media songs by files.
Definition at line 586 of file musicsongscontainerwidget.cpp.
References MusicFunctionToolBoxWidget::foundMappedIndex(), TTK::File::getOpenFileNames(), importSongsByPath(), MusicFunctionToolBoxWidget::m_currentIndex, MusicFormats::supportMusicInputFormats(), and TTK_LOW_LEVEL.
Referenced by setInputModule().
Input imported media datas into container.
Definition at line 228 of file musicsongscontainerwidget.cpp.
References importSongsWithProgress(), MusicToastLabel::popup(), MusicProgressWidget::setTitle(), and MusicProgressWidget::show().
Referenced by addSongToPlaylist(), dropEvent(), importSongsByFiles(), MusicApplication::importSongsByOutside(), and importSongsByUrl().
Input imported media urls into container.
Definition at line 165 of file musicsongscontainerwidget.cpp.
References addSongBufferToPlaylist(), APE_FILE_SUFFIX, closeSearchWidgetInNeed(), TTK::fetchFileSizeByUrl(), TTK::File::fileInfoListByPath(), FLAC_FILE_SUFFIX, TTKTime::formatDuration(), importSongsByPath(), TTK::String::isNetworkUrl(), MusicResultDataItem::m_count, MusicResultDataItem::m_description, MusicResultDataItem::m_id, MusicResultDataItem::m_name, MusicResultDataItem::m_nickName, MusicResultDataItem::m_time, MusicResultDataItem::m_title, MusicSongsToolBoxWidget::makeValidIndex(), MP3_FILE_SUFFIX, MUSIC_PLAY_LATER, TTK::String::splitToken(), MusicFormats::supportMusicFormats(), TTK_BN_1000, TTK_BN_128, TTK_FILE_SUFFIX, and TTK_SEPARATOR.
Referenced by importSongsByDir(), and MusicApplication::importSongsByUrl().
|
private |
Input imported media datas into container.
Definition at line 1367 of file musicsongscontainerwidget.cpp.
References closeSearchWidgetInNeed(), TTK::generateSongList(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicSongItem::m_itemWidget, MusicSongItem::m_songs, MusicSongsToolBoxWidget::makeValidIndex(), qAsConst, MusicFunctionToolBoxWidget::setCurrentIndex(), setItemTitle(), TTKStaticCast, and MusicAbstractSongsListTableWidget::updateSongsList().
Referenced by dropEvent(), and importSongsByPath().
|
static |
Get class object instance.
Definition at line 54 of file musicsongscontainerwidget.cpp.
References m_instance.
Referenced by MusicSongSearchTableWidget::addSearchMusicToPlaylist(), MusicConnectTransferWidget::currentPlaylistSelected(), MusicNewSongRecommendQueryTableWidget::downloadDataFrom(), MusicItemQueryTableWidget::downloadDataFrom(), MusicConnectTransferWidget::initialize(), MusicPlaylistBackupTableWidget::itemDoubleClicked(), MusicAbstractDownloadTableWidget::itemDoubleClicked(), MusicMobileSongsManagerWidget::itemDoubleClicked(), MusicLocalManagerWidget::itemDoubleClicked(), MusicSongItemSelectedAreaWidget::modifiedItemButtonClicked(), MusicSongCheckToolsDuplicateTableWidget::playSong(), MusicSongCheckToolsQualityTableWidget::playSong(), MusicPlaylistBackupWidget::restoreButtonClicked(), MusicPlaylistBackupModule::runBackup(), MusicMobileSongsManagerWidget::selectedItemsToPlaylist(), and MusicSongItemSelectedAreaWidget::selectedSongItems().
|
slot |
Check is current play stack widget.
Definition at line 909 of file musicsongscontainerwidget.cpp.
References MusicFunctionToolBoxWidget::currentIndex(), MusicFunctionToolBoxWidget::m_currentIndex, m_playRowIndex, m_selectDeleteIndex, and MUSIC_NONE_LIST.
Referenced by createWidgetItem().
|
inlineprivatenoexcept |
Current index is searched or not.
Definition at line 262 of file musicsongscontainerwidget.h.
References MusicFunctionToolBoxWidget::m_currentIndex.
Referenced by removeSearchResult(), and searchResultChanged().
|
slot |
Check current list is searched or not.
Definition at line 915 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::hasSearchResult().
Referenced by createWidgetItem().
|
slot |
Swap the current play index when user drag and drop.
Definition at line 883 of file musicsongscontainerwidget.cpp.
References MusicPlayedListPopWidget::instance(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicFunctionToolBoxWidget::m_currentIndex, m_playRowIndex, QtContainerSwap, and MusicPlayedListPopWidget::selectCurrentMedia().
Referenced by createWidgetItem().
|
inlinenoexcept |
Query media datas from container.
Definition at line 66 of file musicsongscontainerwidget.h.
References MusicItemSearchInterface< T >::m_containerItems.
Referenced by addSongItemList(), MusicApplication::containsLovestMedia(), MusicApplication::currentFileName(), MusicApplication::currentFilePath(), MusicApplication::exportSongsItem(), MusicApplication::exportSongsItemList(), MusicApplication::playIndexBy(), MusicApplication::playIndexClicked(), updatePlayedRows(), and MusicApplication::writeSystemConfigToFile().
Map media file path by song index.
Definition at line 294 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::m_containerItems.
Referenced by MusicApplication::playIndexBy(), MusicApplication::playSortBy(), and MusicApplication::readSystemConfigFromFile().
| int MusicSongsContainerWidget::mapSongIndexByFilePath | ( | int | playlistRow, |
| const QString & | path | ||
| ) | const |
Map media song index by file path.
Definition at line 276 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::m_containerItems.
Referenced by MusicApplication::addSongToLovestList(), MusicApplication::containsLovestMedia(), MusicApplication::currentFileName(), MusicApplication::currentFilePath(), MusicApplication::currentPlayLocation(), MusicApplication::importSongsByOutside(), MusicApplication::showCurrentSong(), and MusicApplication::writeSystemConfigToFile().
| void MusicSongsContainerWidget::playLocation | ( | int | index | ) |
Show current play index.
Definition at line 345 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::hasSearchResult(), MusicFunctionToolBoxWidget::resizeScrollIndex(), and selectRow().
Referenced by MusicApplication::currentPlayLocation().
|
inlinenoexcept |
Get current play row index.
Definition at line 102 of file musicsongscontainerwidget.h.
Referenced by MusicApplication::containsDownloadMedia(), and MusicApplication::containsLovestMedia().
|
slot |
Query media datas from container.
Definition at line 980 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::m_containerItems.
Referenced by MusicConnectTransferWidget::currentPlaylistSelected(), MusicConnectTransferWidget::initialize(), MusicSongItemSelectedAreaWidget::modifiedItemButtonClicked(), and MusicSongItemSelectedAreaWidget::selectedSongItems().
|
slot |
Remove items from rows and check remove file or not.
Definition at line 835 of file musicsongscontainerwidget.cpp.
References MusicApplication::addSongToLovestList(), MusicFunctionToolBoxWidget::currentIndex(), TTK::generateNetworkSongMetaPath(), TTK::generateNetworkSongPath(), MusicItemSearchInterface< MusicSongItemList >::hasSearchResult(), MusicApplication::instance(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicFunctionToolBoxWidget::m_currentIndex, MusicSongItem::m_itemWidget, m_playRowIndex, m_selectDeleteIndex, MusicSongItem::m_songs, MUSIC_LOVEST_LIST, MUSIC_NETWORK_LIST, MUSIC_NONE_LIST, MusicSong::path(), MusicApplication::removeItemAt(), setItemTitle(), and TTKObjectCast.
Referenced by createWidgetItem().
| void MusicSongsContainerWidget::removeSearchResult | ( | int & | row | ) |
Get search result index from list by given row and clear cache.
Definition at line 310 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::clearSearchResult(), closeSearchWidget(), MusicItemSearchInterface< MusicSongItemList >::hasSearchResult(), isSearchedPlayIndex(), MusicItemSearchInterface< MusicSongItemList >::m_searchResultItems, and MusicItemSearchInterface< MusicSongItemList >::m_searchResultLevel.
Referenced by MusicApplication::playIndexBy().
|
finaloverrideprivatevirtual |
Override the widget event.
Definition at line 1091 of file musicsongscontainerwidget.cpp.
References resizeGeometry().
|
private |
Resize window bound by resize called.
Definition at line 1315 of file musicsongscontainerwidget.cpp.
References m_functionWidget, and m_songSearchWidget.
Referenced by resizeEvent(), showFloatWidget(), and showSearchWidget().
Search result from list.
Definition at line 642 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::clearSearchResult(), isSearchedPlayIndex(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicFunctionToolBoxWidget::m_currentIndex, MusicSongItem::m_itemWidget, m_lastSearchIndex, MusicItemSearchInterface< MusicSongItemList >::m_searchResultItems, MusicItemSearchInterface< MusicSongItemList >::m_searchResultLevel, MusicSongItem::m_songs, m_songSearchWidget, songsFileName(), MusicSongSearchDialog::text(), TTKObjectCast, and MusicAbstractSongsListTableWidget::updateSongsList().
| void MusicSongsContainerWidget::selectRow | ( | int | index | ) |
Select the current play row.
Definition at line 354 of file musicsongscontainerwidget.cpp.
References closeSearchWidgetInNeed(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, m_playRowIndex, and MusicFunctionToolBoxWidget::setCurrentIndex().
Referenced by playLocation(), and MusicApplication::showCurrentSong().
|
private |
Set input connection.
Definition at line 1301 of file musicsongscontainerwidget.cpp.
References addNewRowItem(), addToPlayedList(), addToPlayLater(), changRowItemName(), deleteAllItems(), deleteRowItem(), importSongsByDir(), importSongsByFiles(), songListSortBy(), and swapDragItemIndex().
Referenced by createWidgetItem(), and MusicSongsContainerWidget().
|
private |
Set item title.
Definition at line 1290 of file musicsongscontainerwidget.cpp.
References MusicFunctionToolBoxTopWidget::index(), MusicSongItem::m_itemIndex, MusicSongItem::m_itemName, MusicSongItem::m_itemWidget, MusicSongItem::m_songs, m_topMaskWidget, MusicFunctionToolBoxTopWidget::setTitle(), and MusicFunctionToolBoxWidget::setTitle().
Referenced by addSongBufferToPlaylist(), addSongToLovestList(), changRowItemName(), importSongsWithProgress(), removeItemAt(), songToLovestListAt(), and updateSongItem().
| void MusicSongsContainerWidget::setPlayRowIndex | ( | int | index | ) |
Set current song play index.
Definition at line 330 of file musicsongscontainerwidget.cpp.
References MusicSongsListPlayTableWidget::adjustPlayWidgetRow(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, m_playRowIndex, and TTKObjectCast.
Referenced by MusicApplication::generatePlaylistItems(), and MusicApplication::showCurrentSong().
|
slot |
Set current media song play count by given song index.
Definition at line 920 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::m_containerItems, m_playRowIndex, MusicSong::playCount(), and MusicSong::setPlayCount().
Referenced by MusicApplication::showCurrentSong(), and updateCurrentIndex().
|
slot |
Show the float function widget.
Definition at line 995 of file musicsongscontainerwidget.cpp.
References MusicSongsListFunctionWidget::active(), deleteFunctionWidget(), m_functionWidget, and resizeGeometry().
Referenced by createWidgetItem().
|
slot |
Open lrc batch download.
Definition at line 637 of file musicsongscontainerwidget.cpp.
References TTK_GENERATE_SINGLE_WIDGET.
Referenced by contextMenuEvent().
|
privateslot |
Show searched text widget.
Definition at line 1056 of file musicsongscontainerwidget.cpp.
References m_songSearchWidget, resizeGeometry(), and MusicSongSearchDialog::setVisible().
|
slot |
Open media songs check test tools.
Definition at line 632 of file musicsongscontainerwidget.cpp.
References TTK_GENERATE_SINGLE_WIDGET.
Referenced by contextMenuEvent().
|
privateslot |
Current vertical slider value chanaged.
Definition at line 1067 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicFunctionToolBoxWidget::m_currentIndex, MusicSongItem::m_itemIndex, MusicSongItem::m_itemName, MusicSongItem::m_songs, MusicSongItem::m_sort, m_topMaskWidget, MusicFunctionToolBoxTopWidget::setExpand(), MusicFunctionToolBoxTopWidget::setIndex(), MusicSongsToolBoxTopWidget::setSongSort(), and MusicFunctionToolBoxTopWidget::setTitle().
Referenced by MusicSongsContainerWidget().
|
slot |
Media list songs sort by type.
Definition at line 1011 of file musicsongscontainerwidget.cpp.
References MusicSong::ByFileName, closeSearchWidgetInNeed(), MusicFunctionToolBoxWidget::foundMappedIndex(), MusicApplication::instance(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicFunctionToolBoxWidget::m_currentIndex, m_playRowIndex, MusicApplication::playSortBy(), MusicSongsListPlayTableWidget::removeItems(), MusicAbstractSongsListTableWidget::setSongsList(), TTKObjectCast, and TTKStaticCast.
Referenced by createWidgetItem(), and setInputModule().
| QStringList MusicSongsContainerWidget::songsFileName | ( | int | index | ) | const |
Get media songs file name by index.
Definition at line 245 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::m_containerItems, and qAsConst.
Referenced by MusicApplication::currentPlaylist(), and searchResultChanged().
| QStringList MusicSongsContainerWidget::songsFilePath | ( | int | index | ) | const |
Get media songs file path by index.
Definition at line 261 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::m_containerItems, and qAsConst.
Referenced by MusicApplication::generatePlaylistItems(), and MusicApplication::readSystemConfigFromFile().
|
slot |
Add or remove media song to lovest list by row.
Add to lovest list
Remove to lovest list
Definition at line 715 of file musicsongscontainerwidget.cpp.
References MusicApplication::instance(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicSongItem::m_itemWidget, m_playRowIndex, MusicSongItem::m_songs, MUSIC_LOVEST_LIST, MusicSong::path(), MusicSongsListPlayTableWidget::removeItems(), MusicApplication::removeLoveItemAt(), setItemTitle(), TTKObjectCast, and MusicSongsListPlayTableWidget::updateSongsList().
Referenced by MusicApplication::addSongToLovestList().
Swap the item index by drag adn drop.
Definition at line 522 of file musicsongscontainerwidget.cpp.
References MusicFunctionToolBoxWidget::foundMappedIndex(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicFunctionToolBoxWidget::m_currentIndex, m_playRowIndex, MusicFunctionToolBoxWidget::swapItem(), and updatePlayedRows().
Referenced by setInputModule().
|
slot |
Update current artist when it download finished.
Definition at line 985 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::m_containerItems, m_playRowIndex, and TTKObjectCast.
Referenced by MusicApplication::updateCurrentArtist().
|
slot |
Update current play index from config file.
Definition at line 699 of file musicsongscontainerwidget.cpp.
References G_SETTING_PTR, MusicApplication::instance(), MusicSettingManager::LastPlayIndex, m_playRowIndex, MusicFunctionToolBoxWidget::setCurrentIndex(), setSongPlayCount(), and MusicApplication::showCurrentSong().
| void MusicSongsContainerWidget::updateDurationLabel | ( | const QString & | current, |
| const QString & | total | ||
| ) | const |
Update item duration label.
Definition at line 366 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::m_containerItems, m_playRowIndex, and TTKObjectCast.
Referenced by MusicApplication::positionChanged().
Update current played rows.
Definition at line 1328 of file musicsongscontainerwidget.cpp.
References MusicFunctionToolBoxWidget::foundMappedIndex(), MusicPlayedListPopWidget::instance(), items(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, qAsConst, and MusicPlayedListPopWidget::updatePlayedRows().
Referenced by deleteRowItem(), and swapDragItemIndex().
| void MusicSongsContainerWidget::updateSongItem | ( | const MusicSongItem & | item | ) |
Update media datas from container.
Definition at line 59 of file musicsongscontainerwidget.cpp.
References appendSongItemList(), MusicPlayedListPopWidget::clear(), MusicFunctionToolBoxWidget::foundMappedIndex(), MusicApplication::instance(), MusicPlayedListPopWidget::instance(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicSongItem::m_id, MusicSongItem::m_itemIndex, MusicSongItem::m_itemName, MusicSongItem::m_itemWidget, m_playRowIndex, MusicSongItem::m_songs, MusicSongItem::m_sort, MusicApplication::playIndexBy(), TTKAbstractTableWidget::removeItems(), setItemTitle(), TTK_NORMAL_LEVEL, and MusicAbstractSongsListTableWidget::updateSongsList().
Referenced by MusicPlaylistBackupWidget::restoreButtonClicked().
|
private |
Definition at line 309 of file musicsongscontainerwidget.h.
Referenced by deleteFunctionWidget(), resizeGeometry(), showFloatWidget(), and ~MusicSongsContainerWidget().
|
staticprivate |
Definition at line 312 of file musicsongscontainerwidget.h.
Referenced by instance(), and MusicSongsContainerWidget().
|
private |
Definition at line 305 of file musicsongscontainerwidget.h.
Referenced by searchResultChanged().
|
private |
Definition at line 304 of file musicsongscontainerwidget.h.
Referenced by addSongToLovestList(), appendRecentSongs(), deleteAllItems(), deleteRowItem(), deleteRowItems(), dropEvent(), isCurrentPlaylistRow(), itemRowSwaped(), removeItemAt(), selectRow(), setPlayRowIndex(), setSongPlayCount(), songListSortBy(), songToLovestListAt(), swapDragItemIndex(), updateCurrentArtist(), updateCurrentIndex(), updateDurationLabel(), and updateSongItem().
|
private |
Definition at line 306 of file musicsongscontainerwidget.h.
Referenced by deleteAllItems(), isCurrentPlaylistRow(), and removeItemAt().
|
private |
Definition at line 310 of file musicsongscontainerwidget.h.
Referenced by closeSearchWidget(), resizeGeometry(), searchResultChanged(), showSearchWidget(), and ~MusicSongsContainerWidget().
|
private |
Definition at line 308 of file musicsongscontainerwidget.h.
Referenced by MusicSongsContainerWidget(), setItemTitle(), sliderValueChanaged(), and ~MusicSongsContainerWidget().
1.8.8