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 app main widget. More...
#include <musicapplication.h>
Public Member Functions | |
MusicApplication (QWidget *parent=nullptr) | |
~MusicApplication () | |
QString | currentFileName () const |
QString | currentFilePath () const |
bool | checkMusicListCurrentIndex () const |
void | loadCurrentSongLrc () |
void | importSongsByOutside (const QString &path, bool play) |
QString | containsDownloadItem (bool &contains) const |
bool | containsLovestItem () const |
bool | containsLovestItem (int index) const |
void | updateCurrentArtist () |
bool | isPlaying () const |
qint64 | duration () const |
TTK::PlayMode | playMode () const |
![]() | |
TTKAbstractMoveResizeWidget (QWidget *parent=nullptr) | |
TTKAbstractMoveResizeWidget (bool transparent, QWidget *parent=nullptr) | |
Static Public Member Functions | |
static MusicApplication * | instance () |
Private Member Functions | |
virtual void | resizeEvent (QResizeEvent *event) overridefinal |
virtual void | closeEvent (QCloseEvent *event) overridefinal |
virtual void | contextMenuEvent (QContextMenuEvent *event) overridefinal |
virtual void | enterEvent (QtEnterEvent *event) overridefinal |
virtual void | leaveEvent (QEvent *event) overridefinal |
virtual void | mouseMoveEvent (QMouseEvent *event) overridefinal |
virtual void | mouseReleaseEvent (QMouseEvent *event) overridefinal |
virtual void | mouseDoubleClickEvent (QMouseEvent *event) overridefinal |
virtual bool | eventFilter (QObject *object, QEvent *event) overridefinal |
void | setPlayIndex () |
void | readSystemConfigFromFile () |
void | writeSystemConfigToFile () |
Private Attributes | |
Ui::MusicApplication * | m_ui |
bool | m_quitWindowMode |
int | m_currentSongTreeIndex |
MusicPlayer * | m_player |
MusicPlaylist * | m_playlist |
MusicSongsContainerWidget * | m_songTreeWidget |
MusicBottomAreaWidget * | m_bottomAreaWidget |
MusicTopAreaWidget * | m_topAreaWidget |
MusicRightAreaWidget * | m_rightAreaWidget |
MusicLeftAreaWidget * | m_leftAreaWidget |
MusicApplicationModule * | m_applicationModule |
Static Private Attributes | |
static MusicApplication * | m_instance = nullptr |
Friends | |
class | MusicMPRISPlayerCore |
Additional Inherited Members | |
![]() | |
virtual void | paintEvent (QPaintEvent *event) override |
virtual void | mousePressEvent (QMouseEvent *event) override |
void | sizeDirection () |
void | moveDirection () |
void | setObjectsTracking (const QWidgetList &objects) |
![]() | |
MoveResizeData | m_struct |
TTK::Direction | m_direction |
The class of the app main widget.
Definition at line 43 of file musicapplication.h.
|
explicit |
Object constructor.
Definition at line 29 of file musicapplication.cpp.
References MusicTopAreaWidget::backgroundAnimationChanged(), durationChanged(), G_HOTKEY_PTR, G_SETTING_PTR, importSongsPopup(), m_applicationModule, m_bottomAreaWidget, m_instance, m_leftAreaWidget, m_player, m_playlist, m_rightAreaWidget, m_songTreeWidget, m_topAreaWidget, m_ui, MUSIC_SEARCH_PAGE, TTK::Order, playerStateChanged(), playNext(), playPrevious(), positionChanged(), readSystemConfigFromFile(), MusicSettingManager::ScreenSize, TTKAbstractMoveResizeWidget::setObjectsTracking(), MusicPlaylist::setPlaybackMode(), MusicLeftAreaWidget::setupUi(), MusicTopAreaWidget::setupUi(), MusicBottomAreaWidget::setupUi(), MusicRightAreaWidget::setupUi(), showCurrentSong(), showSettingWidget(), switchToPlayState(), TTK_SIGNLE_SHOT, TTK_SLOT, volumeDown(), volumeMute(), volumeUp(), WINDOW_HEIGHT_MIN, and WINDOW_WIDTH_MIN.
MusicApplication::~MusicApplication | ( | ) |
Object destructor.
Definition at line 95 of file musicapplication.cpp.
References m_applicationModule, m_bottomAreaWidget, m_leftAreaWidget, m_player, m_playlist, m_rightAreaWidget, m_songTreeWidget, m_topAreaWidget, and m_ui.
|
slot |
Add music song to lovest list.
Definition at line 712 of file musicapplication.cpp.
References containsLovestItem(), MusicPlaylist::currentItem(), MusicPlaylist::isEmpty(), m_leftAreaWidget, MusicPlayItem::m_path, m_playlist, MusicPlayItem::m_playlistRow, m_songTreeWidget, MusicSongsContainerWidget::mapSongIndexByFilePath(), MusicToastLabel::popup(), MusicLeftAreaWidget::setSongLoveState(), and MusicSongsContainerWidget::songToLovestListAt().
Referenced by MusicSongsContainerWidget::addSongToLovestList(), and MusicSongsContainerWidget::removeItemAt().
|
slot |
Apply settings parameters.
Definition at line 842 of file musicapplication.cpp.
References MusicApplicationModule::applyParameter(), MusicBottomAreaWidget::applyParameter(), MusicRightAreaWidget::applyParameter(), G_SETTING_PTR, m_applicationModule, m_bottomAreaWidget, m_playlist, m_rightAreaWidget, MusicSettingManager::OtherRandomShuffleMode, and MusicPlaylist::setShuffleMode().
Referenced by readSystemConfigFromFile().
bool MusicApplication::checkMusicListCurrentIndex | ( | ) | const |
Check current list index is -1 or not.
Definition at line 151 of file musicapplication.cpp.
References MusicPlaylist::currentIndex(), m_playlist, and TTK_NORMAL_LEVEL.
Referenced by MusicDownloadStatusModule::checkMetaDataValid(), and loadCurrentSongLrc().
|
finaloverrideprivatevirtual |
Definition at line 1002 of file musicapplication.cpp.
References m_bottomAreaWidget, quitWindow(), MusicBottomAreaWidget::showMessage(), MusicBottomAreaWidget::systemCloseConfig(), and MusicBottomAreaWidget::systemTrayIsVisible().
QString MusicApplication::containsDownloadItem | ( | bool & | contains | ) | const |
Get music current song item download contains.
Definition at line 206 of file musicapplication.cpp.
References currentFileName(), MusicPlaylist::currentItem(), MusicSettingManager::DownloadMusicDirPath, MusicSong::format(), G_SETTING_PTR, MusicPlayItem::isValid(), MusicPlayItem::m_path, m_playlist, m_songTreeWidget, MUSIC_NETWORK_LIST, MusicSongsContainerWidget::playRowIndex(), and TTK_NORMAL_LEVEL.
Referenced by MusicSongsListPlayWidget::currentDownloadStateClicked(), MusicLeftAreaWidget::downloadSongFinished(), MusicDownloadMgmtWidget::initialize(), MusicDownloadResetWidget::openFileLocation(), and showCurrentSong().
bool MusicApplication::containsLovestItem | ( | ) | const |
Get music current song lovest item contains.
Definition at line 231 of file musicapplication.cpp.
References MusicPlaylist::currentItem(), MusicPlayItem::isValid(), MusicSongsContainerWidget::items(), MusicPlayItem::m_path, m_playlist, MusicPlayItem::m_playlistRow, m_songTreeWidget, MusicSongsContainerWidget::mapSongIndexByFilePath(), MUSIC_LOVEST_LIST, MusicSongsContainerWidget::playRowIndex(), and TTK_NORMAL_LEVEL.
Referenced by addSongToLovestList(), MusicSongsListPlayWidget::currentLoveStateClicked(), MusicSongsListPlayTableWidget::itemCellClicked(), MusicSongsListPlayTableWidget::itemCellEntered(), and showCurrentSong().
bool MusicApplication::containsLovestItem | ( | int | index | ) | const |
Get music list current song lovest item contains.
Definition at line 248 of file musicapplication.cpp.
References MusicFunctionToolBoxWidget::currentIndex(), MusicSongsContainerWidget::items(), m_songTreeWidget, MUSIC_LOVEST_LIST, and TTK_NORMAL_LEVEL.
|
finaloverrideprivatevirtual |
Definition at line 1018 of file musicapplication.cpp.
References createRightMenu(), and m_ui.
|
slot |
Create right menu.
Definition at line 756 of file musicapplication.cpp.
References TTK::Widget::adjustMenuPosition(), MusicSettingManager::DownloadLimitEnable, G_SETTING_PTR, importSongsByDir(), importSongsByFiles(), importSongsByUrl(), MusicRightAreaWidget::instance(), MusicApplicationModule::isLastedVersion(), TTK::ListLoop, m_applicationModule, m_topAreaWidget, TTK::UI::MenuStyle02, TTK::Once, TTK::OneLoop, TTK::Order, playlistLoop(), playMode(), playOnce(), playOneLoop(), playOrder(), playRandom(), quitWindow(), TTK::Random, showSettingWidget(), TTK_NORMAL_LEVEL, TTK_STR_CAT, TTK_VERSION_STR, TTK_VERSION_TIME_STR, and MusicApplicationModule::windowToTop().
Referenced by contextMenuEvent().
QString MusicApplication::currentFileName | ( | ) | const |
Get current file name.
Definition at line 113 of file musicapplication.cpp.
References MusicPlaylist::currentIndex(), MusicPlaylist::currentItem(), MusicSongsContainerWidget::items(), m_currentSongTreeIndex, MusicPlayItem::m_path, m_playlist, m_songTreeWidget, and MusicSongsContainerWidget::mapSongIndexByFilePath().
Referenced by MusicDownloadStatusModule::checkArtistBackgroundValid(), MusicDownloadStatusModule::checkArtistCoverValid(), MusicDownloadStatusModule::checkLrcValid(), MusicDownloadStatusModule::checkMetaDataValid(), containsDownloadItem(), currentLrcUpdated(), loadCurrentSongLrc(), and showCurrentSong().
QString MusicApplication::currentFilePath | ( | ) | const |
Get current file path.
Definition at line 132 of file musicapplication.cpp.
References MusicPlaylist::currentIndex(), MusicPlaylist::currentItem(), MusicSongsContainerWidget::items(), m_currentSongTreeIndex, MusicPlayItem::m_path, m_playlist, m_songTreeWidget, and MusicSongsContainerWidget::mapSongIndexByFilePath().
Referenced by loadCurrentSongLrc().
|
slot |
The current lrc should update.
Definition at line 938 of file musicapplication.cpp.
References MusicRightAreaWidget::checkMetaDataValid(), currentFileName(), LRC_FILE, TTK::String::lrcDirPrefix(), and m_rightAreaWidget.
|
slot |
Get current play list.
Definition at line 973 of file musicapplication.cpp.
References MusicFunctionToolBoxWidget::currentIndex(), m_songTreeWidget, and MusicSongsContainerWidget::songsFileName().
Referenced by MusicToolSetsWidget::currentItemClicked(), and MusicApplicationModule::showTimerWidget().
|
slot |
Show current play index.
Definition at line 700 of file musicapplication.cpp.
References MusicPlaylist::currentItem(), MusicPlaylist::isEmpty(), MusicPlayItem::m_path, m_playlist, MusicPlayItem::m_playlistRow, m_songTreeWidget, MusicSongsContainerWidget::mapSongIndexByFilePath(), and MusicSongsContainerWidget::playLocation().
qint64 MusicApplication::duration | ( | ) | const |
Get current player duration.
Definition at line 273 of file musicapplication.cpp.
References MusicPlayer::duration(), and m_player.
Referenced by MusicLrcAnalysis::setData().
|
slot |
Set current player duration.
Definition at line 311 of file musicapplication.cpp.
References TTKTime::formatDuration(), loadCurrentSongLrc(), m_ui, and TTK_SEPARATOR.
Referenced by MusicApplication(), and showCurrentSong().
|
slot |
Set current song enhanced effect by type.
Definition at line 751 of file musicapplication.cpp.
References m_player, MusicPlayer::setEnhanced(), and TTKStaticCast.
|
finaloverrideprivatevirtual |
Definition at line 1032 of file musicapplication.cpp.
References m_applicationModule, and MusicApplicationModule::sideAnimationByOff().
|
finaloverrideprivatevirtual |
Override the widget event.
Reimplemented from TTKAbstractMoveResizeWidget.
Definition at line 1082 of file musicapplication.cpp.
References TTKAbstractMoveResizeWidget::eventFilter(), and m_ui.
|
slot |
Export music songs by item.
Definition at line 564 of file musicapplication.cpp.
References TTK::File::getSaveFileName(), MusicSongsContainerWidget::items(), m_songTreeWidget, MusicToastLabel::popup(), MusicFormats::supportPlaylistOutputFormats(), and MusicPlaylistManager::writeSongItem().
Referenced by MusicSongsToolBoxTopWidget::exportSongsItem().
|
slot |
Export music songs by item list.
Definition at line 584 of file musicapplication.cpp.
References TTK::File::getSaveFileName(), MusicSongsContainerWidget::items(), m_songTreeWidget, MusicToastLabel::popup(), MusicFormats::supportPlaylistOutputFormats(), and MusicPlaylistManager::writeSongItem().
|
slot |
Import music songs by dir.
Definition at line 521 of file musicapplication.cpp.
References TTK::File::getExistingDirectory(), MusicSongsContainerWidget::importSongsByUrl(), and m_songTreeWidget.
Referenced by createRightMenu(), MusicSongsContainerWidget::importSongsByDir(), and importSongsPopup().
|
slot |
Import music songs by files.
Definition at line 515 of file musicapplication.cpp.
References TTK::File::getOpenFileNames(), MusicSongsContainerWidget::importSongsByPath(), m_songTreeWidget, and MusicFormats::supportMusicInputFormats().
Referenced by createRightMenu(), MusicSongsContainerWidget::importSongsByFiles(), and importSongsPopup().
void MusicApplication::importSongsByOutside | ( | const QString & | path, |
bool | play | ||
) |
Import outside music datas into container.
Definition at line 192 of file musicapplication.cpp.
References MusicPlaylist::count(), MusicSongsContainerWidget::importSongsByPath(), m_playlist, m_songTreeWidget, MUSIC_NORMAL_LIST, playIndexBy(), and TTK_NORMAL_LEVEL.
Referenced by MusicMPRISPlayerCore::OpenUri(), and MusicProcessServer::run().
|
slot |
Import music songs by url.
Definition at line 532 of file musicapplication.cpp.
References MusicAbstractMoveDialog::exec(), MusicSongsContainerWidget::importSongsByUrl(), m_songTreeWidget, MusicInputDialog::setPlaceholderText(), MusicInputDialog::text(), and TTK_LOW_LEVEL.
Referenced by createRightMenu(), and importSongsPopup().
|
slot |
Import music songs by item list.
Definition at line 550 of file musicapplication.cpp.
References MusicSongsContainerWidget::appendSongItemList(), TTK::File::getOpenFileNames(), m_songTreeWidget, MusicPlaylistManager::readSongItems(), and MusicFormats::supportPlaylistInputFormats().
|
slot |
Import music songs.
Definition at line 501 of file musicapplication.cpp.
References TTK::Widget::adjustMenuPosition(), importSongsByDir(), importSongsByFiles(), importSongsByUrl(), and TTK::UI::MenuStyle02.
Referenced by MusicApplication().
|
static |
Get class object instance.
Definition at line 108 of file musicapplication.cpp.
References m_instance.
Referenced by MusicSongsContainerWidget::addSongBufferToPlaylist(), MusicSongsContainerWidget::addSongToLovestList(), MusicSongsContainerWidget::addSongToPlaylist(), MusicLrcMakerWidget::backToMakeLrcWidget(), MusicApplicationModule::cleanup(), MusicAbstractSongsListTableWidget::clearItems(), MusicPlayedListPopWidget::clearPlaylist(), MusicRightAreaWidget::containerForWallpaperClicked(), MusicSongsContainerWidget::contextMenuEvent(), MusicLrcMakerWidget::createCurrentLine(), MusicLrcMakerWidget::createFirstWidget(), MusicTopAreaWidget::createRemoteWidget(), MusicBottomAreaWidget::createSystemTrayIcon(), MusicLrcMakerWidget::createThirdWidget(), MusicLrcContainerForDesktop::creatToolBarWidget(), MusicSongsListPlayWidget::currentDownloadStateClicked(), MusicToolSetsWidget::currentItemClicked(), MusicSongsListPlayWidget::currentLoveStateClicked(), MusicSongsContainerWidget::deleteAllItems(), MusicSongsContainerWidget::deleteRowItem(), MusicSongsContainerWidget::deleteRowItems(), MusicLeftAreaWidget::downloadSongFinished(), MusicTopAreaWidget::drawWindowBackgroundByImage(), MusicSongsToolBoxTopWidget::exportSongsItem(), MusicLrcMakerWidget::firstWidgetStateButtonClicked(), MusicRightAreaWidget::functionInitialize(), MusicBottomAreaWidget::iconActivated(), MusicSongsContainerWidget::importSongsByDir(), MusicSongsContainerWidget::importSongsByFiles(), MusicPlayBackModePopWidget::initialize(), MusicDownloadMgmtWidget::initialize(), MusicSongsListPlayTableWidget::itemCellClicked(), MusicSongsListPlayTableWidget::itemCellEntered(), MusicPlayedListPopWidget::itemDoubleClicked(), MusicBottomAreaWidget::lrcWidgetShowFullScreen(), MusicVideoPlayWidget::mediaUrlChanged(), MusicLrcFloatPlayWidget::MusicLrcFloatPlayWidget(), MusicLrcMakerWidget::MusicLrcMakerWidget(), MusicMPRISPlayerCore::MusicMPRISPlayerCore(), MusicRemoteWidget::MusicRemoteWidget(), MusicSongsListFunctionWidget::MusicSongsListFunctionWidget(), MusicSongsListPlayTableWidget::MusicSongsListPlayTableWidget(), MusicSongsListPlayWidget::MusicSongsListPlayWidget(), MusicTopAreaWidget::MusicTopAreaWidget(), MusicDownloadResetWidget::openFileLocation(), MusicToastLabel::popup(), MusicMPRISPlayerRoot::Quit(), MusicMPRISPlayerRoot::Raise(), MusicLrcMakerWidget::reMakeButtonClicked(), MusicPlayedListPopWidget::removeItemAt(), MusicSongsContainerWidget::removeItemAt(), MusicLrcMakerWidget::resetToOriginPlayMode(), MusicApplicationModule::resetWindowGeometry(), MusicProcessServer::run(), MusicLrcFloatPlayWidget::setCurrentPlayState(), MusicLrcMakerWidget::setCurrentSecondWidget(), MusicLrcMakerWidget::setCurrentThirdWidget(), MusicLrcAnalysis::setData(), MusicLeftAreaWidget::setupUi(), MusicTopAreaWidget::setupUi(), MusicRightAreaWidget::setupUi(), MusicBottomAreaWidget::setWindowConcise(), MusicRightAreaWidget::setWindowLrcTypeChanged(), MusicApplicationModule::setWindowToTop(), MusicRightAreaWidget::showCommentsFound(), MusicApplicationModule::showTimerWidget(), MusicApplicationModule::showVersionWidget(), MusicApplicationModule::sideAnimationByOff(), MusicApplicationModule::sideAnimationByOn(), MusicSongsContainerWidget::songListSortBy(), MusicSongsContainerWidget::songToLovestListAt(), MusicLrcFloatPlayWidget::switchToPlayState(), MusicLrcMakerWidget::thirdWidgetStateButtonClicked(), MusicTimerAutoModule::timeout(), MusicLrcMakerWidget::timeSliderValueChanged(), MusicSongsContainerWidget::updateCurrentIndex(), MusicSongsContainerWidget::updateSongItem(), MusicRightAreaWidget::videoActiveWindow(), MusicApplicationModule::windowCloseAnimation(), and MusicApplicationModule::windowCloseAnimationFinished().
bool MusicApplication::isPlaying | ( | ) | const |
Get current play state.
Definition at line 268 of file musicapplication.cpp.
References MusicPlayer::isPlaying(), and m_player.
Referenced by MusicVideoPlayWidget::mediaUrlChanged(), positionChanged(), readSystemConfigFromFile(), MusicPlayedListPopWidget::removeItemAt(), MusicLrcMakerWidget::setCurrentSecondWidget(), MusicBottomAreaWidget::setWindowConcise(), showCurrentSong(), switchToPlayState(), switchToStopState(), and updateCurrentTime().
|
finaloverrideprivatevirtual |
Definition at line 1038 of file musicapplication.cpp.
References m_applicationModule, and MusicApplicationModule::sideAnimationByOn().
void MusicApplication::loadCurrentSongLrc | ( | ) |
Load current song lrc.
Definition at line 156 of file musicapplication.cpp.
References checkMusicListCurrentIndex(), currentFileName(), currentFilePath(), KRC_FILE, MusicRightAreaWidget::loadCurrentSongLrc(), LRC_FILE, TTK::String::lrcDirPrefix(), m_rightAreaWidget, resetCurrentSongLrcIndex(), TTK_SIGNLE_SHOT, and TTK_SLOT.
Referenced by durationChanged(), and MusicDownloadStatusModule::showDownLoadInfoFinished().
|
finaloverrideprivatevirtual |
Definition at line 1066 of file musicapplication.cpp.
References G_SETTING_PTR, m_ui, and MusicSettingManager::WindowConciseMode.
|
finaloverrideprivatevirtual |
Reimplemented from TTKAbstractMoveResizeWidget.
Definition at line 1044 of file musicapplication.cpp.
References G_SETTING_PTR, m_ui, TTKAbstractMoveResizeWidget::mouseMoveEvent(), MusicSettingManager::ScreenSize, MusicSettingManager::WidgetSize, WINDOW_HEIGHT_MIN, and WINDOW_WIDTH_MIN.
|
finaloverrideprivatevirtual |
Reimplemented from TTKAbstractMoveResizeWidget.
Definition at line 1060 of file musicapplication.cpp.
References m_applicationModule, TTKAbstractMoveResizeWidget::mouseReleaseEvent(), and MusicApplicationModule::sideAnimationByOn().
|
slot |
Set song speed and slow by given pos.
Definition at line 665 of file musicapplication.cpp.
References m_player, m_rightAreaWidget, MusicPlayer::setPosition(), and MusicRightAreaWidget::setSongTimeSpeed().
Referenced by MusicLrcMakerWidget::backToMakeLrcWidget(), MusicLrcMakerWidget::createCurrentLine(), MusicLrcMakerWidget::reMakeButtonClicked(), MusicLrcMakerWidget::setCurrentSecondWidget(), MusicLrcMakerWidget::setCurrentThirdWidget(), and MusicLrcMakerWidget::timeSliderValueChanged().
|
slot |
Set played list row index music to play.
Definition at line 604 of file musicapplication.cpp.
References m_player, m_playlist, MusicPlaylist::setCurrentIndex(), MusicPlayer::stop(), and switchToPlayState().
Referenced by MusicPlayedListPopWidget::itemDoubleClicked().
|
slot |
Current state changed.
Definition at line 322 of file musicapplication.cpp.
References TTK::UI::BtnPlay, G_SETTING_PTR, m_ui, TTK::Stopped, TTK::UI::TinyBtnPlay, and MusicSettingManager::WindowConciseMode.
Referenced by MusicApplication().
|
slot |
Set current row index music to play.
Definition at line 611 of file musicapplication.cpp.
References MusicPlaylist::clear(), m_currentSongTreeIndex, m_player, m_playlist, m_songTreeWidget, MusicSongsContainerWidget::mapFilePathBySongIndex(), MusicPlaylist::setCurrentIndex(), setPlayIndex(), and MusicPlayer::stop().
Referenced by MusicAbstractSongsListTableWidget::clearItems(), MusicPlayedListPopWidget::clearPlaylist(), MusicSongsContainerWidget::deleteAllItems(), MusicSongsContainerWidget::deleteRowItem(), MusicSongsContainerWidget::deleteRowItems(), importSongsByOutside(), playIndexClicked(), setPlaySongChanged(), and MusicSongsContainerWidget::updateSongItem().
Set current row index music to play.
Definition at line 629 of file musicapplication.cpp.
References MusicFunctionToolBoxWidget::currentIndex(), MusicPlaylist::isEmpty(), MusicSongsContainerWidget::items(), m_currentSongTreeIndex, m_player, m_playlist, m_songTreeWidget, m_ui, MusicSongsContainerWidget::mapFilePathBySongIndex(), MusicSongsContainerWidget::removeSearchResult(), MusicPlaylist::setCurrentIndex(), setPlayIndex(), MusicPlayer::stop(), and switchToPlayState().
Set current row index music to play.
Definition at line 649 of file musicapplication.cpp.
References MusicFunctionToolBoxWidget::currentIndex(), MusicSongsContainerWidget::items(), m_currentSongTreeIndex, m_songTreeWidget, m_ui, playIndexBy(), and setPlayIndex().
Referenced by MusicSongsContainerWidget::addSongBufferToPlaylist(), and MusicSongsContainerWidget::addSongToPlaylist().
|
slot |
Set current play mdoe to list loop.
Definition at line 463 of file musicapplication.cpp.
References TTK::ListLoop, m_playlist, m_ui, and MusicPlaylist::setPlaybackMode().
Referenced by createRightMenu(), readSystemConfigFromFile(), MusicLrcMakerWidget::resetToOriginPlayMode(), and MusicMPRISPlayerCore::setLoopStatus().
TTK::PlayMode MusicApplication::playMode | ( | ) | const |
Get current play mode.
Definition at line 278 of file musicapplication.cpp.
References m_playlist, and MusicPlaylist::playbackMode().
Referenced by createRightMenu(), MusicMPRISPlayerCore::loopStatus(), MusicLrcMakerWidget::MusicLrcMakerWidget(), and MusicMPRISPlayerCore::shuffle().
|
slot |
Set current player to play next.
Definition at line 438 of file musicapplication.cpp.
References MusicPlaylist::isEmpty(), m_player, m_playlist, PLAY_NEXT_LEVEL, MusicPlaylist::setCurrentIndex(), MusicPlayer::stop(), and switchToPlayState().
Referenced by MusicApplication(), MusicMPRISPlayerCore::Next(), and MusicPlayedListPopWidget::removeItemAt().
|
slot |
Set current play mdoe to just once.
Definition at line 475 of file musicapplication.cpp.
References m_playlist, m_ui, TTK::Once, and MusicPlaylist::setPlaybackMode().
Referenced by createRightMenu(), readSystemConfigFromFile(), and MusicLrcMakerWidget::resetToOriginPlayMode().
|
slot |
Set current play mdoe to single loop.
Definition at line 469 of file musicapplication.cpp.
References m_playlist, m_ui, TTK::OneLoop, and MusicPlaylist::setPlaybackMode().
Referenced by createRightMenu(), MusicLrcMakerWidget::MusicLrcMakerWidget(), readSystemConfigFromFile(), MusicLrcMakerWidget::resetToOriginPlayMode(), and MusicMPRISPlayerCore::setLoopStatus().
|
slot |
Set current play mdoe to order.
Definition at line 451 of file musicapplication.cpp.
References m_playlist, m_ui, TTK::Order, and MusicPlaylist::setPlaybackMode().
Referenced by createRightMenu(), readSystemConfigFromFile(), MusicLrcMakerWidget::resetToOriginPlayMode(), and MusicMPRISPlayerCore::setLoopStatus().
|
slot |
Set current player to play previous.
Definition at line 424 of file musicapplication.cpp.
References MusicPlaylist::isEmpty(), m_player, m_playlist, m_ui, PLAY_PREVIOUS_LEVEL, MusicPlaylist::setCurrentIndex(), MusicPlayer::stop(), and switchToPlayState().
Referenced by MusicApplication(), and MusicMPRISPlayerCore::Previous().
|
slot |
Set current play mdoe to random.
Definition at line 457 of file musicapplication.cpp.
References m_playlist, m_ui, TTK::Random, and MusicPlaylist::setPlaybackMode().
Referenced by createRightMenu(), readSystemConfigFromFile(), and MusicLrcMakerWidget::resetToOriginPlayMode().
|
slot |
Set current music play list sort.
Definition at line 598 of file musicapplication.cpp.
References m_currentSongTreeIndex, m_playlist, m_songTreeWidget, MusicSongsContainerWidget::mapFilePathBySongIndex(), and MusicPlaylist::setCurrentIndex().
Referenced by MusicSongsContainerWidget::songListSortBy().
|
slot |
Set current player position.
Definition at line 294 of file musicapplication.cpp.
References MusicPlayer::duration(), TTKTime::formatDuration(), MusicPlaylist::isEmpty(), isPlaying(), m_player, m_playlist, m_rightAreaWidget, m_songTreeWidget, m_ui, TTK_TIME_INIT, MusicRightAreaWidget::updateCurrentLrc(), and MusicSongsContainerWidget::updateDurationLabel().
Referenced by MusicApplication(), and showCurrentSong().
|
slot |
Application window close.
Definition at line 283 of file musicapplication.cpp.
References MusicApplicationModule::cleanup(), TTK::Core::enableBreakPoint(), m_applicationModule, m_quitWindowMode, MusicApplicationModule::windowCloseAnimation(), and writeSystemConfigToFile().
Referenced by closeEvent(), createRightMenu(), and MusicMPRISPlayerRoot::Quit().
|
private |
Read system config from file.
Definition at line 1098 of file musicapplication.cpp.
References MusicPlaylist::add(), MusicSongsContainerWidget::addSongItemList(), applyParameter(), COFIG_PATH_FULL, MusicSettingManager::DLrcGeometry, MusicSettingManager::DLrcLockedMode, MusicSettingManager::EnhancedFadeEnable, MusicSettingManager::EnhancedMusicIndex, MusicSettingManager::EqualizerEnable, TTKAbstractXml::fromFile(), G_HOTKEY_PTR, G_SETTING_PTR, MusicSettingManager::HotkeyEnable, MusicSettingManager::HotkeyValue, isPlaying(), MusicSettingManager::LastPlayIndex, TTK::ListLoop, MusicApplicationModule::loadNetWorkSetting(), MusicBottomAreaWidget::lockDesktopLrc(), m_applicationModule, m_bottomAreaWidget, m_currentSongTreeIndex, m_player, m_playlist, m_rightAreaWidget, m_songTreeWidget, m_topAreaWidget, m_ui, MusicSongsContainerWidget::mapFilePathBySongIndex(), TTK::Once, TTK::OneLoop, TTK::Order, MusicSettingManager::OtherCheckUpdateEnable, MusicSettingManager::OtherSideByInMode, PLAYLIST_PATH_FULL, playlistLoop(), MusicSettingManager::PlayMode, playOnce(), playOneLoop(), playOrder(), playRandom(), TTK::Random, MusicTKPLConfigManager::readBuffer(), MusicConfigManager::readBuffer(), MusicConfigManager::readShowDesktopLrcGeometry(), MusicConfigManager::readWindowGeometry(), MusicTopAreaWidget::remoteTypeChanged(), MusicSettingManager::RemoteWidgetMode, MusicTopAreaWidget::setBackgroundParameter(), MusicPlaylist::setCurrentIndex(), MusicBottomAreaWidget::setCurrentPlayState(), MusicTopAreaWidget::setCurrentPlayState(), MusicRightAreaWidget::setCurrentPlayState(), MusicBottomAreaWidget::setDestopLrcVisible(), MusicRightAreaWidget::setDestopLrcVisible(), MusicPlayer::setEqualizerConfig(), MusicRightAreaWidget::setInteriorLrcVisible(), MusicRightAreaWidget::setWindowLrcTypeChanged(), MusicSettingManager::ShowDesktopLrc, MusicSongsContainerWidget::songsFilePath(), MusicApplicationModule::soundEffectChanged(), MusicApplicationModule::soureUpdateCheck(), MusicSettingManager::StartUpPlayMode, switchToPlayState(), TTK_NORMAL_LEVEL, TTK_SIGNLE_SHOT, TTK_SLOT, TTK_SPLITER, TTKStaticCast, MusicSettingManager::Volume, volumeChanged(), windowConciseChanged(), MusicSettingManager::WindowConciseMode, and MusicSettingManager::WindowQuitMode.
Referenced by MusicApplication().
|
slot |
Delete items from indexs.
the play one is delete list
check if delete one that the play one
other ways
Play index error correction
Definition at line 857 of file musicapplication.cpp.
References MusicPlaylist::count(), MusicPlaylist::currentIndex(), MusicPlaylist::currentItem(), TTKDispatchManager::FileRemove, MusicPlaylist::find(), G_DISPATCH_PTR, TTK::generateNetworkSongPath(), MusicPlayItem::m_path, m_player, m_playlist, MusicPlayItem::m_playlistRow, m_ui, MUSIC_NETWORK_LIST, qAsConst, MusicPlaylist::setCurrentIndex(), MusicPlayer::stop(), and switchToPlayState().
Referenced by MusicSongsContainerWidget::removeItemAt(), and removeLoveItemAt().
|
slot |
Remove love item from indexs.
Definition at line 852 of file musicapplication.cpp.
References MUSIC_LOVEST_LIST, and removeItemAt().
Referenced by MusicSongsContainerWidget::addSongToLovestList(), and MusicSongsContainerWidget::songToLovestListAt().
|
slot |
Reset current song lrc index.
Definition at line 945 of file musicapplication.cpp.
References m_player, m_rightAreaWidget, MusicPlayer::position(), and MusicRightAreaWidget::setSongTimeSpeed().
Referenced by loadCurrentSongLrc().
|
finaloverrideprivatevirtual |
Override the widget event.
remove fixed size
Definition at line 978 of file musicapplication.cpp.
References MusicTopAreaWidget::backgroundThemeChangedByResize(), G_SETTING_PTR, m_bottomAreaWidget, m_quitWindowMode, m_rightAreaWidget, m_topAreaWidget, m_ui, MusicBottomAreaWidget::resizeWindow(), MusicRightAreaWidget::resizeWindow(), and MusicSettingManager::WidgetSize.
|
private |
Set music current play index.
Definition at line 1091 of file musicapplication.cpp.
References MusicPlaylist::add(), MusicFunctionToolBoxWidget::currentIndex(), m_currentSongTreeIndex, m_playlist, m_songTreeWidget, MusicSongsContainerWidget::setCurrentSongTreeIndex(), and MusicSongsContainerWidget::songsFilePath().
Referenced by playIndexBy(), and playIndexClicked().
|
slot |
Set current song to play in play list.
Definition at line 963 of file musicapplication.cpp.
References MusicPlaylist::count(), MusicPlaylist::isEmpty(), m_playlist, playIndexBy(), and TTK_NORMAL_LEVEL.
Referenced by MusicTimerAutoModule::timeout().
|
slot |
Show current song some information.
detecting whether the file has been downloaded
Definition at line 331 of file musicapplication.cpp.
References MusicSongsContainerWidget::appendRecentSongs(), MusicTopAreaWidget::backgroundThemeDownloadFinished(), TTK::UI::BtnDownload, TTK::UI::BtnLove, TTK::UI::BtnPlay, TTK::UI::BtnUnDownload, TTK::UI::BtnUnLove, MusicRightAreaWidget::checkMetaDataValid(), containsDownloadItem(), containsLovestItem(), currentFileName(), MusicPlaylist::currentItem(), durationChanged(), G_BACKGROUND_PTR, G_SETTING_PTR, isPlaying(), MusicRightAreaWidget::loadCurrentSongLrc(), m_bottomAreaWidget, m_currentSongTreeIndex, MusicPlayItem::m_path, m_player, m_playlist, MusicPlayItem::m_playlistRow, m_rightAreaWidget, m_songTreeWidget, m_topAreaWidget, m_ui, MusicSongsContainerWidget::mapSongIndexByFilePath(), name, positionChanged(), MusicSongsContainerWidget::selectRow(), MusicBottomAreaWidget::setCurrentPlayState(), MusicTopAreaWidget::setCurrentPlayState(), MusicRightAreaWidget::setCurrentPlayState(), MusicSongsContainerWidget::setCurrentSongTreeIndex(), MusicBottomAreaWidget::setLabelText(), MusicTopAreaWidget::setLabelText(), MusicSongsContainerWidget::setSongPlayCount(), MusicPlayer::stop(), MusicRightAreaWidget::stopDrawLrc(), TTK::UI::TinyBtnPlay, TTK_NORMAL_LEVEL, and MusicSettingManager::WindowConciseMode.
Referenced by MusicApplication(), and MusicSongsContainerWidget::updateCurrentIndex().
|
slot |
Show setting widget.
Definition at line 695 of file musicapplication.cpp.
References m_rightAreaWidget, and MusicRightAreaWidget::showSettingWidget().
Referenced by createRightMenu(), and MusicApplication().
|
slot |
Set current player to play or not.
Definition at line 385 of file musicapplication.cpp.
References MusicTopAreaWidget::backgroundThemeDownloadFinished(), TTK::UI::BtnPause, TTK::UI::BtnPlay, G_SETTING_PTR, MusicPlaylist::isEmpty(), isPlaying(), m_bottomAreaWidget, m_player, m_playlist, m_rightAreaWidget, m_topAreaWidget, m_ui, MusicPlayer::pause(), MusicPlayer::play(), MusicTopAreaWidget::setBackgroundAnimation(), MusicBottomAreaWidget::setCurrentPlayState(), MusicTopAreaWidget::setCurrentPlayState(), MusicRightAreaWidget::setCurrentPlayState(), MusicRightAreaWidget::startDrawLrc(), MusicRightAreaWidget::stopDrawLrc(), TTK::UI::TinyBtnPause, TTK::UI::TinyBtnPlay, and MusicSettingManager::WindowConciseMode.
Referenced by MusicLrcMakerWidget::firstWidgetStateButtonClicked(), MusicVideoPlayWidget::mediaUrlChanged(), MusicApplication(), MusicMPRISPlayerCore::Pause(), MusicMPRISPlayerCore::Play(), playedIndexBy(), playIndexBy(), playNext(), MusicMPRISPlayerCore::PlayPause(), playPrevious(), readSystemConfigFromFile(), removeItemAt(), MusicLrcFloatPlayWidget::switchToPlayState(), and MusicLrcMakerWidget::thirdWidgetStateButtonClicked().
|
slot |
Set current player to stop.
Definition at line 414 of file musicapplication.cpp.
References isPlaying(), m_playlist, MusicPlaylist::setCurrentIndex(), and TTK_NORMAL_LEVEL.
Referenced by MusicMPRISPlayerCore::Stop(), and MusicTimerAutoModule::timeout().
void MusicApplication::updateCurrentArtist | ( | ) |
Update current artist when it download finished.
Definition at line 263 of file musicapplication.cpp.
References m_songTreeWidget, and MusicSongsContainerWidget::updateCurrentArtist().
Referenced by MusicDownloadStatusModule::showDownLoadInfoFinished().
|
slot |
Update current play time when user adjust the progress.
Definition at line 955 of file musicapplication.cpp.
References isPlaying(), m_player, and MusicPlayer::setPosition().
|
slot |
Current play volume changed.
Definition at line 492 of file musicapplication.cpp.
References G_SETTING_PTR, m_bottomAreaWidget, m_player, m_topAreaWidget, m_ui, MusicPlayer::setVolume(), MusicBottomAreaWidget::setVolumeValue(), MusicTopAreaWidget::setVolumeValue(), and MusicSettingManager::Volume.
Referenced by readSystemConfigFromFile(), volumeDown(), and volumeUp().
|
slot |
Set current player volume down.
Definition at line 673 of file musicapplication.cpp.
References m_player, MusicPlayer::volume(), and volumeChanged().
Referenced by MusicApplication().
|
slot |
Set current play volume to 0.
Definition at line 481 of file musicapplication.cpp.
References G_SETTING_PTR, MusicPlayer::isMuted(), m_bottomAreaWidget, m_player, m_topAreaWidget, m_ui, MusicPlayer::setMuted(), MusicBottomAreaWidget::setVolumeValue(), MusicTopAreaWidget::setVolumeValue(), MusicSettingManager::Volume, and MusicPlayer::volume().
Referenced by MusicApplication().
|
slot |
Set current player volume up.
Definition at line 684 of file musicapplication.cpp.
References m_player, MusicPlayer::volume(), and volumeChanged().
Referenced by MusicApplication().
|
slot |
Set window concise.
Definition at line 745 of file musicapplication.cpp.
References G_SETTING_PTR, m_bottomAreaWidget, m_topAreaWidget, MusicTopAreaWidget::setBackgroundAnimation(), MusicBottomAreaWidget::setWindowConcise(), and MusicSettingManager::WindowConciseMode.
Referenced by MusicRightAreaWidget::functionInitialize(), readSystemConfigFromFile(), and MusicRightAreaWidget::showCommentsFound().
|
private |
Write system config to file.
Definition at line 1240 of file musicapplication.cpp.
References MusicSettingManager::BackgroundListTransparent, MusicTopAreaWidget::backgroundListTransparent(), MusicTopAreaWidget::backgroundPath(), MusicSettingManager::BackgroundThemeValue, MusicSettingManager::BackgroundTransparent, MusicTopAreaWidget::backgroundTransparent(), MusicSettingManager::BackgroundTransparentEnable, MusicTopAreaWidget::backgroundTransparentEnabled(), COFIG_PATH_FULL, MusicPlaylist::currentItem(), MusicRightAreaWidget::destopLrcVisible(), MusicPlayer::enhanced(), MusicSettingManager::EnhancedMusicIndex, G_SETTING_PTR, MusicSongsContainerWidget::items(), MusicSettingManager::LastPlayIndex, TTKAbstractXml::load(), MusicPlayItem::m_path, m_player, m_playlist, MusicPlayItem::m_playlistRow, m_rightAreaWidget, m_songTreeWidget, m_topAreaWidget, m_ui, MusicSongsContainerWidget::mapSongIndexByFilePath(), MusicPlaylist::playbackMode(), PLAYLIST_PATH_FULL, MusicSettingManager::PlayMode, MusicSettingManager::ShowDesktopLrc, TTKStaticCast, MusicSettingManager::Volume, MusicSettingManager::WidgetPosition, MusicTKPLConfigManager::writeBuffer(), and MusicConfigManager::writeBuffer().
Referenced by quitWindow().
|
friend |
Definition at line 338 of file musicapplication.h.
|
private |
Definition at line 336 of file musicapplication.h.
Referenced by applyParameter(), createRightMenu(), enterEvent(), leaveEvent(), mouseReleaseEvent(), MusicApplication(), quitWindow(), readSystemConfigFromFile(), and ~MusicApplication().
|
private |
Definition at line 332 of file musicapplication.h.
Referenced by applyParameter(), closeEvent(), MusicApplication(), readSystemConfigFromFile(), resizeEvent(), showCurrentSong(), switchToPlayState(), volumeChanged(), volumeMute(), windowConciseChanged(), and ~MusicApplication().
|
private |
Definition at line 328 of file musicapplication.h.
Referenced by currentFileName(), currentFilePath(), playIndexBy(), playIndexClicked(), playSortBy(), readSystemConfigFromFile(), setPlayIndex(), and showCurrentSong().
|
staticprivate |
Definition at line 339 of file musicapplication.h.
Referenced by instance(), and MusicApplication().
|
private |
Definition at line 335 of file musicapplication.h.
Referenced by addSongToLovestList(), MusicApplication(), and ~MusicApplication().
|
private |
Definition at line 329 of file musicapplication.h.
Referenced by duration(), enhancedSongChanged(), isPlaying(), MusicApplication(), playAnyTimeAt(), playedIndexBy(), playIndexBy(), playNext(), playPrevious(), positionChanged(), readSystemConfigFromFile(), removeItemAt(), resetCurrentSongLrcIndex(), MusicMPRISPlayerCore::setVolume(), showCurrentSong(), switchToPlayState(), updateCurrentTime(), MusicMPRISPlayerCore::volume(), volumeChanged(), volumeDown(), volumeMute(), volumeUp(), writeSystemConfigToFile(), and ~MusicApplication().
|
private |
Definition at line 330 of file musicapplication.h.
Referenced by addSongToLovestList(), applyParameter(), MusicMPRISPlayerCore::canGoNext(), MusicMPRISPlayerCore::canGoPrevious(), MusicMPRISPlayerCore::canPause(), MusicMPRISPlayerCore::canPlay(), checkMusicListCurrentIndex(), containsDownloadItem(), containsLovestItem(), currentFileName(), currentFilePath(), currentPlayLocation(), importSongsByOutside(), MusicApplication(), MusicMPRISPlayerCore::MusicMPRISPlayerCore(), playedIndexBy(), playIndexBy(), playlistLoop(), playMode(), playNext(), playOnce(), playOneLoop(), playOrder(), playPrevious(), playRandom(), playSortBy(), positionChanged(), readSystemConfigFromFile(), removeItemAt(), setPlayIndex(), setPlaySongChanged(), MusicMPRISPlayerCore::setShuffle(), showCurrentSong(), switchToPlayState(), switchToStopState(), MusicMPRISPlayerCore::updateTrackID(), writeSystemConfigToFile(), and ~MusicApplication().
|
private |
Definition at line 327 of file musicapplication.h.
Referenced by quitWindow(), and resizeEvent().
|
private |
Definition at line 334 of file musicapplication.h.
Referenced by applyParameter(), currentLrcUpdated(), loadCurrentSongLrc(), MusicApplication(), playAnyTimeAt(), positionChanged(), readSystemConfigFromFile(), resetCurrentSongLrcIndex(), resizeEvent(), showCurrentSong(), showSettingWidget(), switchToPlayState(), writeSystemConfigToFile(), and ~MusicApplication().
|
private |
Definition at line 331 of file musicapplication.h.
Referenced by addSongToLovestList(), containsDownloadItem(), containsLovestItem(), currentFileName(), currentFilePath(), currentPlaylist(), currentPlayLocation(), exportSongsItem(), exportSongsItemList(), importSongsByDir(), importSongsByFiles(), importSongsByOutside(), importSongsByUrl(), importSongsItemList(), MusicApplication(), playIndexBy(), playIndexClicked(), playSortBy(), positionChanged(), readSystemConfigFromFile(), setPlayIndex(), showCurrentSong(), updateCurrentArtist(), writeSystemConfigToFile(), and ~MusicApplication().
|
private |
Definition at line 333 of file musicapplication.h.
Referenced by createRightMenu(), MusicApplication(), readSystemConfigFromFile(), resizeEvent(), showCurrentSong(), switchToPlayState(), volumeChanged(), volumeMute(), windowConciseChanged(), writeSystemConfigToFile(), and ~MusicApplication().
|
private |
Definition at line 326 of file musicapplication.h.
Referenced by contextMenuEvent(), durationChanged(), eventFilter(), mouseDoubleClickEvent(), mouseMoveEvent(), MusicApplication(), playerStateChanged(), playIndexBy(), playIndexClicked(), playlistLoop(), playOnce(), playOneLoop(), playOrder(), playPrevious(), playRandom(), positionChanged(), readSystemConfigFromFile(), removeItemAt(), resizeEvent(), showCurrentSong(), switchToPlayState(), volumeChanged(), volumeMute(), writeSystemConfigToFile(), and ~MusicApplication().