void MusicMyDownloadRecordWidget::musicPlay() { if(rowCount() == 0 || currentRow() <0) { return; } emit addSongToPlay(QStringList(m_musicRecord.m_paths[currentRow()])); }
void MusicConnectionPool::poolConnect(const QString &from, const QString &to) { QObject *first = m_para.value(from); QObject *second = m_para.value(to); if(first == nullptr || second == nullptr) { return; } if(from == "MusicPlayer" && to == "MusicLrcMakerWidget" ) { QObject::connect(first, SIGNAL(positionChanged(qint64)), second, SLOT(setCurrentPosition(qint64))); } if( (from == "MusicLocalSongsManagerWidget" && to == "MusicApplication") || (from == "MusicMyDownloadRecordWidget" && to == "MusicApplication") ) { QObject::connect(first, SIGNAL(addSongToPlay(QStringList)), second, SLOT(addSongToPlayList(QStringList))); } if(from == "MusicTimerWidget" && to == "MusicApplicationObject" ) { QObject::connect(first, SIGNAL(timerParameterChanged()), second, SLOT(musicToolSetsParameter())); } if( (from == "MusicToolSetsWidget" && to == "MusicApplication") || (from == "MusicApplicationObject" && to == "MusicApplication") ) { QObject::connect(first, SIGNAL(getCurrentPlayList(QStringList&)), second, SLOT(getCurrentPlayList(QStringList&))); } if(from == "MusicEqualizerDialog" && to == "MusicPlayer" ) { QObject::connect(first, SIGNAL(setEqEffect(MIntList)), second, SLOT(setEqEffect(MIntList))); QObject::connect(first, SIGNAL(setEnaleEffect(bool)), second, SLOT(setEnaleEffect(bool))); } if(from == "MusicSongSearchOnlineTableWidget" && to == "MusicDownloadStatusLabel" ) { QObject::connect(first, SIGNAL(showDownLoadInfoFor(MusicObject::DownLoadType)), second, SLOT(showDownLoadInfoFor(MusicObject::DownLoadType))); } if(from == "MusicBgThemeDownload" && to == "MusicTopAreaWidget" ) { QObject::connect(first, SIGNAL(musicBgDownloadFinished()), second, SLOT(musicBgThemeDownloadFinished())); } if(from == "MusicSongSearchOnlineTableWidget" && to == "MusicSongsSummarizied" ) { QObject::connect(first, SIGNAL(muiscSongToPlayListChanged(QString,QString,QString)), second, SLOT(addNetMusicSongToList(QString,QString,QString))); } if(from == "MusicSongSearchOnlineTableWidget" && to == "MusicRightAreaWidget" ) { QObject::connect(first, SIGNAL(restartSearchQuery(QString)), second, SLOT(musicResearchButtonSearched(QString))); } if(from == "MusicNetworkThread" && to == "MusicDownloadStatusLabel" ) { QObject::connect(first, SIGNAL(networkConnectionStateChanged(bool)), second, SLOT(networkConnectionStateChanged(bool))); } if(from == "MusicSongSearchOnlineTableWidget" && to == "MusicQualityChoiceTableWidget" ) { QObject::connect(first, SIGNAL(getQualityString(QString&)), second, SLOT(getQualityString(QString&))); QObject::connect(second, SIGNAL(researchQueryByQuality()), first, SLOT(researchQueryByQuality())); } if(from == "MusicSongsListPlayWidget" && to == "MusicRightAreaWidget" ) { QObject::connect(first, SIGNAL(videoButtonClicked(QString)), second, SLOT(musicVideoButtonSearched(QString))); } if(from == "MusicVideoControl" && to == "MusicRightAreaWidget" ) { QObject::connect(first, SIGNAL(musicVideoSetPopup(bool)), second, SLOT(musicVideoSetPopup(bool))); QObject::connect(first, SIGNAL(musicVideoFullscreen(bool)), second, SLOT(musicVideoFullscreen(bool))); } if(from == "MusicApplicationObject" && to == "MusicEnhancedWidget" ) { QObject::connect(first, SIGNAL(enhancedMusicChanged(int)), second, SLOT(setEnhancedMusicConfig(int))); } if(from == "MusicVideoControl" && to == "MusicVideoTableWidget" ) { QObject::connect(first, SIGNAL(getMusicMvInfo(MusicSongAttributes&)), second, SLOT(getMusicMvInfo(MusicSongAttributes&))); QObject::connect(first, SIGNAL(downloadLocalByControl()), second, SLOT(downloadLocalFromControl())); } }
void MusicConnectionPool::poolConnect(const QString &from, const QString &to) { QObject *first = m_para.value(from); QObject *second = m_para.value(to); if(first == nullptr || second == nullptr) { return; } if(from == MusicNetworkThread::getClassName() && to == MusicDownloadStatusObject::getClassName()) { QObject::connect(first, SIGNAL(networkConnectionStateChanged(bool)), second, SLOT(networkConnectionStateChanged(bool))); } #ifndef MUSIC_MOBILE else if(from == MusicPlayer::getClassName() && to == MusicLrcMakerWidget::getClassName()) { QObject::connect(first, SIGNAL(positionChanged(qint64)), second, SLOT(positionChanged(qint64))); QObject::connect(first, SIGNAL(durationChanged(qint64)), second, SLOT(durationChanged(qint64))); } else if((from == MusicLocalSongsManagerWidget::getClassName() && to == MusicSongsSummariziedWidget::getClassName()) || (from == MusicSongCheckToolsDuplicateTableWidget::getClassName() && to == MusicSongsSummariziedWidget::getClassName()) || (from == MusicSongCheckToolsQualityTableWidget::getClassName() && to == MusicSongsSummariziedWidget::getClassName()) || (from == MusicDownloadAbstractTableWidget::getClassName() && to == MusicSongsSummariziedWidget::getClassName())) { QObject::connect(first, SIGNAL(addSongToPlay(QStringList)), second, SLOT(addSongToPlayList(QStringList))); } else if(from == MusicEqualizerDialog::getClassName() && to == MusicPlayer::getClassName()) { QObject::connect(first, SIGNAL(setEqEffect(MusicObject::MIntList)), second, SLOT(setEqEffect(MusicObject::MIntList))); QObject::connect(first, SIGNAL(setEnaleEffect(bool)), second, SLOT(setEnaleEffect(bool))); } else if(from == MusicEqualizerDialog::getClassName() && to == MusicSoundEffectsWidget::getClassName()) { QObject::connect(first, SIGNAL(setEnaleEffect(bool)), second, SLOT(equalizerButtonChanged(bool))); } else if(from == MusicSoundEffectsWidget::getClassName() && to == MusicPlayer::getClassName()) { QObject::connect(first, SIGNAL(volumeChanged(int)), second, SLOT(setSoundEffectVolume(int))); QObject::connect(first, SIGNAL(setEqInformation()), second, SLOT(setEqInformation())); } else if(from == MusicSongSearchOnlineTableWidget::getClassName() && to == MusicDownloadStatusObject::getClassName()) { QObject::connect(first, SIGNAL(showDownLoadInfoFor(MusicObject::DownLoadMode)), second, SLOT(showDownLoadInfoFor(MusicObject::DownLoadMode))); } else if((from == MusicSongSearchOnlineTableWidget::getClassName() && to == MusicSongsSummariziedWidget::getClassName()) || (from == MusicQueryFoundTableWidget::getClassName() && to == MusicSongsSummariziedWidget::getClassName())) { QObject::connect(first, SIGNAL(muiscSongToPlayListChanged(QString,QString,QString,bool)), second, SLOT(addNetMusicSongToList(QString,QString,QString,bool))); } else if(from == MusicLrcLocalLinkWidget::getClassName() && to == MusicDownloadStatusObject::getClassName()) { QObject::connect(first, SIGNAL(currentLrcChanged(QString)), second, SLOT(showDownLoadInfoFinished(QString))); } else if(from == MusicVideoQualityPopWidget::getClassName() && to == MusicVideoTableWidget::getClassName()) { QObject::connect(first, SIGNAL(getMusicMvInfo(MusicObject::MusicSongAttributes&)), second, SLOT(getMusicMvInfo(MusicObject::MusicSongAttributes&))); } else if((from == MusicConnectTransferWidget::getClassName() && to == MusicSongsSummariziedWidget::getClassName()) || (from == MusicSongCheckToolsWidget::getClassName() && to == MusicSongsSummariziedWidget::getClassName())) { QObject::connect(first, SIGNAL(getMusicLists(MusicSongItems&)), second, SLOT(getMusicLists(MusicSongItems&))); } #endif }