コード例 #1
0
void MusicDownloadResetWidget::restartToDownload()
{
    MusicDownloadWidget *download = new MusicDownloadWidget(m_parentClass);
    download->setSongName(m_currentName, MusicDownLoadQueryThreadAbstract::MusicQuery);
    download->show();

    close();
}
コード例 #2
0
void MusicDownloadMgmtWidget::setSongName(const QString &name, MusicDownLoadQueryThreadAbstract::QueryType type)
{
    if(type == MusicDownLoadQueryThreadAbstract::MusicQuery)
    {
        bool exist = M_SETTING_PTR->value(MusicSettingManager::DownloadMusicExistChoiced).toBool();
        if(exist)
        {
            MusicDownloadResetWidget *resetWidget = new MusicDownloadResetWidget(m_parentClass);
            resetWidget->setSongName(name);
            resetWidget->show();
            return;
        }
    }
    MusicDownloadWidget *download = new MusicDownloadWidget(m_parentClass);
    if(parent()->metaObject()->indexOfMethod("musicDownloadSongFinished()") != -1)
    {
        connect(download, SIGNAL(dataDownloadChanged()), parent(),
                          SLOT(musicDownloadSongFinished()));
    }
    download->setSongName(name, type);
    download->show();
}