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 local manager widget. More...
#include <musiclocalmanagerwidget.h>
Public Member Functions | |
MusicLocalManagerWidget (QWidget *parent=nullptr) | |
~MusicLocalManagerWidget () | |
virtual void | resizeWidget () overridefinal |
![]() | |
virtual | ~TTKAbstractResizeInterface ()=default |
Private Slots | |
void | typeIndexChanged (int index) |
void | refreshItems () |
void | updateMediaLibraryPath () |
void | searchResultChanged (int row, int column) |
void | itemDoubleClicked (int row, int column) |
Private Member Functions | |
virtual void | resizeEvent (QResizeEvent *event) overridefinal |
void | updateStatisticWidget (int index, const MusicSongInfoItemList &items) |
![]() | |
MusicItemSearchInterface () | |
bool | hasSearchResult () const |
void | clearSearchResult () |
void | mappedSearchRow (int pos, int &row) const |
Private Attributes | |
QLabel * | m_sizeLabel |
TTKTabButton * | m_tabButton |
MusicItemQueryEdit * | m_searchEdit |
MusicGifLabelValueWidget * | m_loadingLabel |
MusicLocalManagerSongsTableWidget * | m_songTableWidget |
MusicLocalManagerStatisticTableWidget * | m_statisticTableWidget |
![]() | |
MusicSongInfoItemList | m_containerItems |
int | m_searchResultLevel |
TTKSearchItems | m_searchResultItems |
Additional Inherited Members | |
![]() | |
using | TTKSearchItems = QMap< int, TTKIntList > |
using | MusicItemSearchInterfaceClass = MusicItemSearchInterface< MusicSongInfoItemList > |
The class of the local manager widget.
Definition at line 117 of file musiclocalmanagerwidget.h.
|
explicit |
Object constructor.
Definition at line 232 of file musiclocalmanagerwidget.cpp.
References TTKTabButton::addButtons(), TTK::UI::BackgroundStyle01, TTK::UI::BackgroundStyle10, TTK::UI::ColorStyle01, TTK::UI::ColorStyle02, MusicItemQueryEdit::editor(), itemDoubleClicked(), m_loadingLabel, m_searchEdit, m_sizeLabel, m_songTableWidget, m_statisticTableWidget, m_tabButton, TTK::UI::PushButtonStyle03, refreshItems(), searchResultChanged(), TTK_SIGNLE_SHOT, TTK_SLOT, typeIndexChanged(), and updateMediaLibraryPath().
MusicLocalManagerWidget::~MusicLocalManagerWidget | ( | ) |
Object destructor.
Definition at line 335 of file musiclocalmanagerwidget.cpp.
References m_loadingLabel, m_searchEdit, m_sizeLabel, m_songTableWidget, and m_statisticTableWidget.
Item cell on double click by row and col.
Definition at line 478 of file musiclocalmanagerwidget.cpp.
References MusicSongsContainerWidget::addSongToPlaylist(), MusicItemQueryEdit::editor(), MusicSongsContainerWidget::instance(), MusicItemSearchInterface< MusicSongInfoItemList >::m_containerItems, m_searchEdit, and MusicItemSearchInterface< MusicSongInfoItemList >::mappedSearchRow().
Referenced by MusicLocalManagerWidget().
|
privateslot |
Refresh table items.
Definition at line 369 of file musiclocalmanagerwidget.cpp.
References MusicLocalManagerSongsTableWidget::addCellItems(), MusicSongMeta::album(), MusicSongMeta::artist(), TTKTabButton::currentIndex(), MusicItemQueryEdit::editor(), TTK::Core::enableBreakPoint(), TTK::File::fileListByPath(), G_SETTING_PTR, TTK::generateAlbum(), TTK::generateArtist(), TTK::generateGenre(), TTK::generateSongName(), TTK::generateYear(), MusicSongMeta::genre(), TTK::Core::isBreakPointEnabled(), MusicGifLabelMaskWidget::isRunning(), MusicSongInfoItem::m_album, MusicSongInfoItem::m_artist, MusicItemSearchInterface< MusicSongInfoItemList >::m_containerItems, MusicSongInfoItem::m_genre, m_loadingLabel, MusicSongInfoItem::m_path, m_searchEdit, m_sizeLabel, m_songTableWidget, m_tabButton, MusicSongInfoItem::m_title, MusicSongInfoItem::m_track, MusicSongInfoItem::m_year, MusicSettingManager::MediaLibraryPath, qAsConst, MusicSongMeta::read(), MusicLocalManagerSongsTableWidget::removeItems(), MusicGifLabelMaskWidget::run(), MusicGifLabelValueWidget::setValue(), MusicFormats::supportMusicInputFilterFormats(), MusicSongMeta::title(), MusicSongMeta::trackNum(), TTK_SEPARATOR, TTK_SIGNLE_SHOT, TTK_SLOT, updateStatisticWidget(), and MusicSongMeta::year().
Referenced by MusicLocalManagerWidget(), and updateMediaLibraryPath().
|
finaloverrideprivatevirtual |
Override the widget event.
Definition at line 485 of file musiclocalmanagerwidget.cpp.
References resizeWidget().
|
finaloverridevirtual |
Resize widget bound by resize called.
Implements TTKAbstractResizeInterface.
Definition at line 344 of file musiclocalmanagerwidget.cpp.
References m_loadingLabel, m_songTableWidget, m_statisticTableWidget, MusicLocalManagerStatisticTableWidget::resizeSection(), and MusicLocalManagerSongsTableWidget::resizeSection().
Referenced by resizeEvent().
Search result from list.
Definition at line 442 of file musiclocalmanagerwidget.cpp.
References MusicLocalManagerSongsTableWidget::addCellItems(), TTKTabButton::currentIndex(), MusicItemQueryEdit::editor(), MusicItemSearchInterface< MusicSongInfoItemList >::m_containerItems, m_searchEdit, MusicItemSearchInterface< MusicSongInfoItemList >::m_searchResultItems, MusicItemSearchInterface< MusicSongInfoItemList >::m_searchResultLevel, m_songTableWidget, m_tabButton, qAsConst, MusicLocalManagerSongsTableWidget::removeItems(), and updateStatisticWidget().
Referenced by MusicLocalManagerWidget().
|
privateslot |
Type index changed.
Definition at line 351 of file musiclocalmanagerwidget.cpp.
References MusicItemSearchInterface< MusicSongInfoItemList >::clearSearchResult(), MusicItemQueryEdit::editor(), MusicItemSearchInterface< MusicSongInfoItemList >::m_containerItems, m_searchEdit, m_statisticTableWidget, and updateStatisticWidget().
Referenced by MusicLocalManagerWidget().
|
privateslot |
Update media library path.
Definition at line 432 of file musiclocalmanagerwidget.cpp.
References G_SETTING_PTR, TTK::File::getExistingDirectory(), MusicSettingManager::MediaLibraryPath, and refreshItems().
Referenced by MusicLocalManagerWidget().
|
private |
Update statistic widget.
Definition at line 491 of file musiclocalmanagerwidget.cpp.
References MusicLocalManagerStatisticTableWidget::addCellItem(), m_statisticTableWidget, and qAsConst.
Referenced by refreshItems(), searchResultChanged(), and typeIndexChanged().
|
private |
Definition at line 171 of file musiclocalmanagerwidget.h.
Referenced by MusicLocalManagerWidget(), refreshItems(), resizeWidget(), and ~MusicLocalManagerWidget().
|
private |
Definition at line 170 of file musiclocalmanagerwidget.h.
Referenced by itemDoubleClicked(), MusicLocalManagerWidget(), refreshItems(), searchResultChanged(), typeIndexChanged(), and ~MusicLocalManagerWidget().
|
private |
Definition at line 168 of file musiclocalmanagerwidget.h.
Referenced by MusicLocalManagerWidget(), refreshItems(), and ~MusicLocalManagerWidget().
|
private |
Definition at line 172 of file musiclocalmanagerwidget.h.
Referenced by MusicLocalManagerWidget(), refreshItems(), resizeWidget(), searchResultChanged(), and ~MusicLocalManagerWidget().
|
private |
Definition at line 173 of file musiclocalmanagerwidget.h.
Referenced by MusicLocalManagerWidget(), resizeWidget(), typeIndexChanged(), updateStatisticWidget(), and ~MusicLocalManagerWidget().
|
private |
Definition at line 169 of file musiclocalmanagerwidget.h.
Referenced by MusicLocalManagerWidget(), refreshItems(), and searchResultChanged().