TTKMusicPlayer
4.1.3.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 |
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 |
void | setCurrentSongTreeIndex (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 |
int | count () const |
Static Public Member Functions | |
static MusicSongsContainerWidget * | instance () |
Private Slots | |
void | showSearchWidget () |
void | sliderValueChanaged (int value) |
void | deleteFloatWidget () |
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 |
void | closeSearchWidget () |
void | closeSearchWidgetInNeed () |
void | checkTitleNameValid (QString &name) |
void | createWidgetItem (MusicSongItem *item) |
void | setItemTitle (MusicSongItem *item) |
void | setInputModule (QObject *object) const |
void | resizeWindow () |
void | updatePlayedList (int start, int end) |
![]() | |
MusicItemSearchInterface () | |
bool | hasSearchResult () const |
void | clearSearchResult () |
void | mappedSearchRow (int pos, int &row) const |
Private Attributes | |
int | m_playRowIndex |
int | m_lastSearchIndex |
int | m_selectDeleteIndex |
MusicSongsToolBoxMaskWidget * | m_listMaskWidget |
MusicSongsListFunctionWidget * | m_listFunctionWidget |
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_itemList |
![]() | |
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, m_listMaskWidget, MusicFunctionToolBoxWidget::m_scrollArea, setInputModule(), and sliderValueChanaged().
MusicSongsContainerWidget::~MusicSongsContainerWidget | ( | ) |
Object destructor.
Definition at line 47 of file musicsongscontainerwidget.cpp.
References G_CONNECTION_PTR, MusicItemSearchInterface< MusicSongItemList >::m_containerItems, m_listFunctionWidget, m_listMaskWidget, and m_songSearchWidget.
|
slot |
Add new play list item.
Definition at line 407 of file musicsongscontainerwidget.cpp.
References checkTitleNameValid(), createWidgetItem(), ITEM_MAX_COUNT, MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicSongItem::m_id, MusicSongItem::m_itemName, name, 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 808 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 772 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 833 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 608 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 596 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 952 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicSongItem::m_itemName, MusicSongItem::m_itemWidget, m_playRowIndex, MusicSongItem::m_songs, MUSIC_NETWORK_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 160 of file musicsongscontainerwidget.cpp.
References checkTitleNameValid(), createWidgetItem(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicSongItem::m_itemIndex, MusicFunctionToolBoxWidget::m_itemIndexRaise, MusicSongItem::m_itemName, and name.
Referenced by MusicApplication::importSongsItemList(), and updateSongItem().
Open rename selected play list item widget.
Definition at line 522 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 1229 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 1213 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 1221 of file musicsongscontainerwidget.cpp.
References closeSearchWidget(), and MusicItemSearchInterface< MusicSongItemList >::hasSearchResult().
Referenced by deleteAllItems(), importSongsByPath(), importSongsByUrl(), selectRow(), and songListSortBy().
|
finaloverrideprivatevirtual |
Definition at line 1196 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 widget item.
connect to items
Definition at line 1253 of file musicsongscontainerwidget.cpp.
References MusicFunctionToolBoxWidget::addCellItem(), addSongToLovestList(), MusicFunctionToolBoxWidget::foundMappedIndex(), isCurrentPlaylistRow(), isSearchedResultEmpty(), itemIndexSwaped(), MusicSongItem::m_itemIndex, MusicFunctionToolBoxWidget::m_itemIndexRaise, MusicFunctionToolBoxWidget::m_itemList, MusicSongItem::m_itemName, 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(), songListSortBy(), and TTK_NORMAL_LEVEL.
Referenced by addNewRowItem(), addSongItemList(), appendSongItemList(), and dropEvent().
|
slot |
Delete all items in play list item.
Definition at line 495 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 1102 of file musicsongscontainerwidget.cpp.
References m_listFunctionWidget.
Referenced by showFloatWidget().
|
slot |
Delete selected play list item.
Definition at line 435 of file musicsongscontainerwidget.cpp.
References MusicAbstractMoveDialog::exec(), MusicFunctionToolBoxWidget::foundMappedIndex(), MusicApplication::instance(), MusicPlayedListPopWidget::instance(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicSongItem::m_itemIndex, MusicFunctionToolBoxWidget::m_itemList, 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 471 of file musicsongscontainerwidget.cpp.
References MusicAbstractMoveDialog::exec(), MusicApplication::instance(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicFunctionToolBoxWidget::m_itemList, 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 1114 of file musicsongscontainerwidget.cpp.
|
finaloverrideprivatevirtual |
Definition at line 1121 of file musicsongscontainerwidget.cpp.
References MusicFunctionToolBoxWidget::m_itemList, TTK::playlistRowValid(), and qAsConst.
|
finaloverrideprivatevirtual |
Definition at line 1144 of file musicsongscontainerwidget.cpp.
References checkTitleNameValid(), createWidgetItem(), TTK::File::fileListByPath(), MusicFunctionToolBoxWidget::foundMappedIndex(), TTK::generateSongList(), importSongsByPath(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicFunctionToolBoxWidget::m_itemList, MusicSongItem::m_itemName, MusicSongItem::m_songs, TTK::playlistRowValid(), qAsConst, and MusicFormats::supportMusicInputFilterFormats().
|
slot |
Import music songs by dir.
Definition at line 640 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 620 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 234 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 178 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 926 of file musicsongscontainerwidget.cpp.
References MusicFunctionToolBoxWidget::currentIndex(), MusicFunctionToolBoxWidget::m_currentIndex, m_playRowIndex, m_selectDeleteIndex, and MUSIC_NONE_LIST.
Referenced by createWidgetItem().
|
inlineprivate |
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 932 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 900 of file musicsongscontainerwidget.cpp.
References MusicPlayedListPopWidget::instance(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicFunctionToolBoxWidget::m_currentIndex, m_playRowIndex, QtContainerSwap, and MusicPlayedListPopWidget::selectCurrentIndex().
Referenced by createWidgetItem().
|
inline |
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 326 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 308 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 377 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::hasSearchResult(), MusicFunctionToolBoxWidget::resizeScrollIndex(), and selectRow().
Referenced by MusicApplication::currentPlayLocation().
|
inline |
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 997 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 860 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 342 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 1108 of file musicsongscontainerwidget.cpp.
References resizeWindow().
|
private |
Resize window bound by resize called.
Definition at line 1306 of file musicsongscontainerwidget.cpp.
References m_listFunctionWidget, and m_songSearchWidget.
Referenced by resizeEvent(), showFloatWidget(), and showSearchWidget().
Search result from list.
Definition at line 670 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 386 of file musicsongscontainerwidget.cpp.
References closeSearchWidgetInNeed(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, m_playRowIndex, and MusicFunctionToolBoxWidget::setCurrentIndex().
Referenced by playLocation(), and MusicApplication::showCurrentSong().
void MusicSongsContainerWidget::setCurrentSongTreeIndex | ( | int | index | ) |
Set current song tree index.
Definition at line 362 of file musicsongscontainerwidget.cpp.
References MusicSongsListPlayTableWidget::adjustPlayWidgetRow(), MusicItemSearchInterface< MusicSongItemList >::m_containerItems, m_playRowIndex, and TTKObjectCast.
Referenced by MusicApplication::setPlayIndex(), and MusicApplication::showCurrentSong().
|
private |
Set input connection.
Definition at line 1292 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 1281 of file musicsongscontainerwidget.cpp.
References MusicFunctionToolBoxTopWidget::index(), MusicSongItem::m_itemIndex, MusicSongItem::m_itemName, MusicSongItem::m_itemWidget, m_listMaskWidget, MusicSongItem::m_songs, MusicFunctionToolBoxTopWidget::setTitle(), and MusicFunctionToolBoxWidget::setTitle().
Referenced by addSongBufferToPlaylist(), addSongToLovestList(), changRowItemName(), importSongsByPath(), importSongsByUrl(), removeItemAt(), songToLovestListAt(), and updateSongItem().
|
slot |
Set current music song play count by given song index.
Definition at line 937 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 1012 of file musicsongscontainerwidget.cpp.
References MusicSongsListFunctionWidget::active(), deleteFloatWidget(), m_listFunctionWidget, and resizeWindow().
Referenced by createWidgetItem().
|
slot |
Open lrc batch download.
Definition at line 665 of file musicsongscontainerwidget.cpp.
References TTKGenerateSingleWidget.
Referenced by contextMenuEvent().
|
privateslot |
Show searched text widget.
Definition at line 1073 of file musicsongscontainerwidget.cpp.
References m_songSearchWidget, resizeWindow(), and MusicSongSearchDialog::setVisible().
|
slot |
Open music songs check test tools.
Definition at line 660 of file musicsongscontainerwidget.cpp.
References TTKGenerateSingleWidget.
Referenced by contextMenuEvent().
|
privateslot |
Current vertical slider value chanaged.
Definition at line 1084 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::m_containerItems, MusicFunctionToolBoxWidget::m_currentIndex, MusicSongItem::m_itemIndex, MusicSongItem::m_itemName, m_listMaskWidget, MusicSongItem::m_songs, MusicSongItem::m_sort, MusicFunctionToolBoxTopWidget::setExpand(), MusicFunctionToolBoxTopWidget::setIndex(), MusicSongsToolBoxTopWidget::setSongSort(), and MusicFunctionToolBoxTopWidget::setTitle().
Referenced by MusicSongsContainerWidget().
|
slot |
Music list songs sort by type.
Definition at line 1028 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 277 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 293 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 743 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 556 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 1002 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 727 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 398 of file musicsongscontainerwidget.cpp.
References MusicItemSearchInterface< MusicSongItemList >::m_containerItems, m_playRowIndex, and TTKObjectCast.
Referenced by MusicApplication::positionChanged().
Update current played list.
Definition at line 1319 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().
|
staticprivate |
Definition at line 305 of file musicsongscontainerwidget.h.
Referenced by instance(), and MusicSongsContainerWidget().
|
private |
Definition at line 298 of file musicsongscontainerwidget.h.
Referenced by searchResultChanged().
|
private |
Definition at line 302 of file musicsongscontainerwidget.h.
Referenced by deleteFloatWidget(), resizeWindow(), showFloatWidget(), and ~MusicSongsContainerWidget().
|
private |
Definition at line 301 of file musicsongscontainerwidget.h.
Referenced by MusicSongsContainerWidget(), setItemTitle(), sliderValueChanaged(), and ~MusicSongsContainerWidget().
|
private |
Definition at line 297 of file musicsongscontainerwidget.h.
Referenced by addSongToLovestList(), appendRecentSongs(), deleteAllItems(), deleteRowItem(), deleteRowItems(), isCurrentPlaylistRow(), itemIndexSwaped(), removeItemAt(), selectRow(), setCurrentSongTreeIndex(), setSongPlayCount(), songListSortBy(), songToLovestListAt(), swapDragItemIndex(), updateCurrentArtist(), updateCurrentIndex(), updateDurationLabel(), and updateSongItem().
|
private |
Definition at line 299 of file musicsongscontainerwidget.h.
Referenced by deleteAllItems(), isCurrentPlaylistRow(), and removeItemAt().
|
private |
Definition at line 303 of file musicsongscontainerwidget.h.
Referenced by closeSearchWidget(), resizeWindow(), searchResultChanged(), showSearchWidget(), and ~MusicSongsContainerWidget().