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 songs container widget. More...
#include <musicsongscontainerwidget.h>
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 |
![]() | |
MusicSongsToolBoxWidget (QWidget *parent=nullptr) | |
void | setSongSort (QWidget *item, MusicSongSort *sort) |
int | makeValidIndex () const |
![]() | |
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 | resizeWindow () |
void | updatePlayedList (int start, int end) |
![]() | |
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 |
![]() | |
MusicSongItemList | m_containerItems |
int | m_searchResultLevel |
TTKSearchItems | m_searchResultItems |
Static Private Attributes | |
static MusicSongsContainerWidget * | m_instance = nullptr |
Additional Inherited Members | |
![]() | |
virtual void | mousePressEvent (QMouseEvent *event) overridefinal |
int | foundMappedIndex (int index) |
![]() | |
int | m_currentIndex |
int | m_itemIndexRaise |
QVBoxLayout * | m_layout |
QScrollArea * | m_scrollArea |
QWidget * | m_contentsWidget |
MusicToolBoxWidgetItemList | m_items |
![]() | |
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 24 of file musicsongscontainerwidget.cpp.
References G_CONNECTION_PTR, MusicFunctionToolBoxWidget::itemIndexChanged(), m_instance, MusicFunctionToolBoxWidget::m_scrollArea, m_topMaskWidget, setInputModule(), and sliderValueChanaged().
MusicSongsContainerWidget::~MusicSongsContainerWidget | ( | ) |
Object destructor.
Definition at line 47 of file musicsongscontainerwidget.cpp.
References G_CONNECTION_PTR, MusicItemSearchInterface< MusicSongItemList >::m_containerItems, m_functionWidget, m_songSearchWidget, and m_topMaskWidget.
|
slot |
Add new play list item.
Definition at line 400 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 music buffer to playlist.
when download finished just play it at once
Definition at line 799 of file musicsongscontainerwidget.cpp.
References 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(), and MusicItemQueryTableWidget::downloadDataFrom().
bool MusicSongsContainerWidget::addSongItemList | ( | const MusicSongItemList & | items | ) |
Add music datas into container.
Definition at line 99 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 music 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 763 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 824 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 music to played list.
Definition at line 599 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 music to played list and play later.
Definition at line 587 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 music datas into container.
Definition at line 943 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 music datas into container.
Definition at line 161 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 513 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 1217 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 1201 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 1209 of file musicsongscontainerwidget.cpp.
References closeSearchWidget(), and MusicItemSearchInterface< MusicSongItemList >::hasSearchResult().
Referenced by deleteAllItems(), importSongsByPath(), importSongsByUrl(), selectRow(), and songListSortBy().
|
finaloverrideprivatevirtual |
Definition at line 1184 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 1269 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 1241 of file musicsongscontainerwidget.cpp.
References MusicFunctionToolBoxWidget::addCellItem(), addSongToLovestList(), MusicFunctionToolBoxWidget::foundMappedIndex(), isCurrentPlaylistRow(), isSearchedResultEmpty(), itemIndexSwaped(), 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 486 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 1093 of file musicsongscontainerwidget.cpp.
References m_functionWidget.
Referenced by showFloatWidget().
|
slot |
Delete selected play list item.
Definition at line 426 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, MUSIC_NORMAL_LIST, MusicApplication::playIndexBy(), MusicPlayedListPopWidget::remove(), MusicFunctionToolBoxWidget::removeItem(), MusicFunctionToolBoxWidget::setCurrentIndex(), MusicMessageBox::setText(), TTK_NORMAL_LEVEL, and updatePlayedList().
Referenced by setInputModule().
|
slot |
Delete all other item, left than three item.
Definition at line 462 of file musicsongscontainerwidget.cpp.
References MusicAbstractMoveDialog::exec(), MusicApplication::instance(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicFunctionToolBoxWidget::m_items, MusicSongItem::m_itemWidget, m_playRowIndex, MUSIC_NORMAL_LIST, MusicApplication::playIndexBy(), TTK::playlistRowValid(), MusicFunctionToolBoxWidget::removeItem(), MusicFunctionToolBoxWidget::setCurrentIndex(), MusicMessageBox::setText(), and TTK_NORMAL_LEVEL.
Referenced by contextMenuEvent().
|
finaloverrideprivatevirtual |
Definition at line 1105 of file musicsongscontainerwidget.cpp.
|
finaloverrideprivatevirtual |
Definition at line 1112 of file musicsongscontainerwidget.cpp.
References MusicFunctionToolBoxWidget::m_items, TTK::playlistRowValid(), and qAsConst.
|
finaloverrideprivatevirtual |
Definition at line 1130 of file musicsongscontainerwidget.cpp.
References checkTitleNameValid(), createContainerItem(), TTK::File::fileListByPath(), MusicFunctionToolBoxWidget::foundMappedIndex(), importSongsByPath(), MusicSongItem::m_itemIndex, MusicSongItem::m_itemName, MusicFunctionToolBoxWidget::m_items, m_playRowIndex, TTK::playlistRowValid(), qAsConst, and MusicFormats::supportMusicInputFilterFormats().
|
slot |
Import music songs by dir.
Definition at line 631 of file musicsongscontainerwidget.cpp.
References MusicFunctionToolBoxWidget::foundMappedIndex(), MusicApplication::importSongsByDir(), MusicApplication::instance(), MusicFunctionToolBoxWidget::m_currentIndex, and TTK_LOW_LEVEL.
Referenced by setInputModule().
|
slot |
Import music songs by files.
Definition at line 611 of file musicsongscontainerwidget.cpp.
References MusicFunctionToolBoxWidget::foundMappedIndex(), MusicApplication::importSongsByFiles(), MusicApplication::instance(), MusicFunctionToolBoxWidget::m_currentIndex, and TTK_LOW_LEVEL.
Referenced by setInputModule().
Input imported music datas into container.
Definition at line 227 of file musicsongscontainerwidget.cpp.
References closeSearchWidgetInNeed(), TTK::generateSongList(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicSongItem::m_itemWidget, MusicSongItem::m_songs, MusicSongsToolBoxWidget::makeValidIndex(), MusicToastLabel::popup(), qAsConst, MusicFunctionToolBoxWidget::setCurrentIndex(), setItemTitle(), MusicProgressWidget::setTitle(), MusicProgressWidget::show(), and MusicAbstractSongsListTableWidget::updateSongsList().
Referenced by addSongToPlaylist(), dropEvent(), MusicApplication::importSongsByFiles(), MusicApplication::importSongsByOutside(), and importSongsByUrl().
Input imported music urls into container.
Definition at line 171 of file musicsongscontainerwidget.cpp.
References closeSearchWidgetInNeed(), TTK::File::fileInfoListByPath(), importSongsByPath(), TTK::String::isNetworkUrl(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicSongItem::m_itemWidget, MusicSongItem::m_songs, MusicSongsToolBoxWidget::makeValidIndex(), TTK::Algorithm::md5(), MUSIC_NETWORK_LIST, TTK::String::pefix(), setItemTitle(), TTK::String::splitToken(), MusicFormats::supportMusicFormats(), TTK_DEFAULT_STR, TTK_FILE_SUFFIX, TTK_SEPARATOR, and MusicAbstractSongsListTableWidget::updateSongsList().
Referenced by MusicApplication::importSongsByDir(), and MusicApplication::importSongsByUrl().
|
static |
Get class object instance.
Definition at line 60 of file musicsongscontainerwidget.cpp.
References m_instance.
Referenced by MusicSongSearchTableWidget::addSearchMusicToPlaylist(), MusicConnectTransferWidget::currentPlaylistSelected(), MusicItemQueryTableWidget::downloadDataFrom(), MusicConnectTransferWidget::initialize(), MusicPlaylistBackupTableWidget::itemDoubleClicked(), MusicAbstractDownloadTableWidget::itemDoubleClicked(), MusicMobileSongsManagerWidget::itemDoubleClicked(), MusicLocalManagerWidget::itemDoubleClicked(), MusicSongItemSelectedAreaWidget::modifiedItemButtonClicked(), MusicSongCheckToolsDuplicateTableWidget::playSong(), MusicSongCheckToolsQualityTableWidget::playSong(), MusicSongDlnaTransferWidget::playSongClicked(), MusicPlaylistBackupWidget::restoreButtonClicked(), MusicPlaylistBackupModule::runBackup(), MusicMobileSongsManagerWidget::selectedItemsToPlaylist(), and MusicSongItemSelectedAreaWidget::selectedSongItems().
|
slot |
Check is current play stack widget.
Definition at line 917 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 263 of file musicsongscontainerwidget.h.
References MusicFunctionToolBoxWidget::m_currentIndex.
Referenced by removeSearchResult(), and searchResultChanged().
|
slot |
Check current list is searched or not.
Definition at line 923 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 891 of file musicsongscontainerwidget.cpp.
References MusicPlayedListPopWidget::instance(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicFunctionToolBoxWidget::m_currentIndex, m_playRowIndex, QtContainerSwap, and MusicPlayedListPopWidget::selectCurrentIndex().
Referenced by createWidgetItem().
|
inlinenoexcept |
Query music datas from container.
Definition at line 67 of file musicsongscontainerwidget.h.
References MusicItemSearchInterface< T >::m_containerItems.
Referenced by addSongItemList(), MusicApplication::containsLovestItem(), MusicApplication::currentFileName(), MusicApplication::currentFilePath(), MusicApplication::exportSongsItem(), MusicApplication::exportSongsItemList(), MusicApplication::playIndexBy(), MusicApplication::playIndexClicked(), updatePlayedList(), and MusicApplication::writeSystemConfigToFile().
Map music file path by song index.
Definition at line 319 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 music song index by file path.
Definition at line 301 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::m_containerItems.
Referenced by MusicApplication::addSongToLovestList(), MusicApplication::containsLovestItem(), MusicApplication::currentFileName(), MusicApplication::currentFilePath(), MusicApplication::currentPlayLocation(), MusicApplication::showCurrentSong(), and MusicApplication::writeSystemConfigToFile().
void MusicSongsContainerWidget::playLocation | ( | int | index | ) |
Show current play index.
Definition at line 370 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 103 of file musicsongscontainerwidget.h.
Referenced by MusicApplication::containsDownloadItem(), and MusicApplication::containsLovestItem().
|
slot |
Query music datas from container.
Definition at line 988 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::m_containerItems.
Referenced by MusicConnectTransferWidget::currentPlaylistSelected(), MusicConnectTransferWidget::initialize(), MusicSongItemSelectedAreaWidget::modifiedItemButtonClicked(), MusicSongDlnaTransferWidget::playSongClicked(), and MusicSongItemSelectedAreaWidget::selectedSongItems().
|
slot |
Remove items from indexs and check remove file or not.
Definition at line 851 of file musicsongscontainerwidget.cpp.
References MusicApplication::addSongToLovestList(), MusicFunctionToolBoxWidget::currentIndex(), 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 335 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 1099 of file musicsongscontainerwidget.cpp.
References resizeWindow().
|
private |
Resize window bound by resize called.
Definition at line 1302 of file musicsongscontainerwidget.cpp.
References m_functionWidget, and m_songSearchWidget.
Referenced by resizeEvent(), showFloatWidget(), and showSearchWidget().
Search result from list.
Definition at line 661 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 379 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 1288 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 1277 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(), importSongsByPath(), importSongsByUrl(), removeItemAt(), songToLovestListAt(), and updateSongItem().
void MusicSongsContainerWidget::setPlayRowIndex | ( | int | index | ) |
Set current song play index.
Definition at line 355 of file musicsongscontainerwidget.cpp.
References MusicSongsListPlayTableWidget::adjustPlayWidgetRow(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, m_playRowIndex, and TTKObjectCast.
Referenced by MusicApplication::setPlayIndex(), and MusicApplication::showCurrentSong().
|
slot |
Set current music song play count by given song index.
Definition at line 928 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 1003 of file musicsongscontainerwidget.cpp.
References MusicSongsListFunctionWidget::active(), deleteFunctionWidget(), m_functionWidget, and resizeWindow().
Referenced by createWidgetItem().
|
slot |
Open lrc batch download.
Definition at line 656 of file musicsongscontainerwidget.cpp.
References TTKGenerateSingleWidget.
Referenced by contextMenuEvent().
|
privateslot |
Show searched text widget.
Definition at line 1064 of file musicsongscontainerwidget.cpp.
References m_songSearchWidget, resizeWindow(), and MusicSongSearchDialog::setVisible().
|
slot |
Open music songs check test tools.
Definition at line 651 of file musicsongscontainerwidget.cpp.
References TTKGenerateSingleWidget.
Referenced by contextMenuEvent().
|
privateslot |
Current vertical slider value chanaged.
Definition at line 1075 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 |
Music list songs sort by type.
Definition at line 1019 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 music songs file name by index.
Definition at line 270 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::m_containerItems, and qAsConst.
Referenced by MusicApplication::currentPlaylist(), and searchResultChanged().
QStringList MusicSongsContainerWidget::songsFilePath | ( | int | index | ) | const |
Get music songs file path by index.
Definition at line 286 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::m_containerItems, and qAsConst.
Referenced by MusicApplication::readSystemConfigFromFile(), and MusicApplication::setPlayIndex().
|
slot |
Add or remove music song to lovest list by row.
Add to lovest list
Remove to lovest list
Definition at line 734 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 547 of file musicsongscontainerwidget.cpp.
References MusicFunctionToolBoxWidget::foundMappedIndex(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicFunctionToolBoxWidget::m_currentIndex, m_playRowIndex, MusicFunctionToolBoxWidget::swapItem(), and updatePlayedList().
Referenced by setInputModule().
|
slot |
Update current artist when it download finished.
Definition at line 993 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 718 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 391 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::m_containerItems, m_playRowIndex, and TTKObjectCast.
Referenced by MusicApplication::positionChanged().
Update current played list.
Definition at line 1315 of file musicsongscontainerwidget.cpp.
References MusicFunctionToolBoxWidget::foundMappedIndex(), MusicPlayedListPopWidget::instance(), items(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, qAsConst, and MusicPlayedListPopWidget::updatePlayedList().
Referenced by deleteRowItem(), and swapDragItemIndex().
void MusicSongsContainerWidget::updateSongItem | ( | const MusicSongItem & | item | ) |
Update music datas from container.
Definition at line 65 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 306 of file musicsongscontainerwidget.h.
Referenced by deleteFunctionWidget(), resizeWindow(), showFloatWidget(), and ~MusicSongsContainerWidget().
|
staticprivate |
Definition at line 309 of file musicsongscontainerwidget.h.
Referenced by instance(), and MusicSongsContainerWidget().
|
private |
Definition at line 302 of file musicsongscontainerwidget.h.
Referenced by searchResultChanged().
|
private |
Definition at line 301 of file musicsongscontainerwidget.h.
Referenced by addSongToLovestList(), appendRecentSongs(), deleteAllItems(), deleteRowItem(), deleteRowItems(), dropEvent(), isCurrentPlaylistRow(), itemIndexSwaped(), removeItemAt(), selectRow(), setPlayRowIndex(), setSongPlayCount(), songListSortBy(), songToLovestListAt(), swapDragItemIndex(), updateCurrentArtist(), updateCurrentIndex(), updateDurationLabel(), and updateSongItem().
|
private |
Definition at line 303 of file musicsongscontainerwidget.h.
Referenced by deleteAllItems(), isCurrentPlaylistRow(), and removeItemAt().
|
private |
Definition at line 307 of file musicsongscontainerwidget.h.
Referenced by closeSearchWidget(), resizeWindow(), searchResultChanged(), showSearchWidget(), and ~MusicSongsContainerWidget().
|
private |
Definition at line 305 of file musicsongscontainerwidget.h.
Referenced by MusicSongsContainerWidget(), setItemTitle(), sliderValueChanaged(), and ~MusicSongsContainerWidget().