当前位置: 首页>>代码示例>>C++>>正文


C++ MusicMessageBox类代码示例

本文整理汇总了C++中MusicMessageBox的典型用法代码示例。如果您正苦于以下问题:C++ MusicMessageBox类的具体用法?C++ MusicMessageBox怎么用?C++ MusicMessageBox使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了MusicMessageBox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: setDeleteItemAt

void MusicMyDownloadRecordWidget::setDeleteItemAt()
{
    MusicMessageBox message;
    message.setText(tr("Are you sure to delete?"));
    if( message.exec() || rowCount() == 0 )
    {
       return;
    }
    MIntSet deletedRow; //if selected multi rows
    for(int i=0; i<selectedItems().count(); ++i)
    {
        deletedRow.insert(selectedItems()[i]->row());
    }
    MIntList deleteList = deletedRow.toList();
    qSort(deleteList);
    for(int i=deleteList.count() - 1; i>=0; --i)
    {
        int ind = deleteList[i];
        removeRow(ind); //Delete the current row
        m_musicRecord.m_names.removeAt(ind);
        m_musicRecord.m_paths.removeAt(ind);
        m_musicRecord.m_sizes.removeAt(ind);
        --m_loadRecordCount;
    }
}
开发者ID:chenpusn,项目名称:Musicplayer,代码行数:25,代码来源:musicmydownloadrecordwidget.cpp

示例2: confirmButtonPressed

void MusicDesktopWallpaperWidget::confirmButtonPressed()
{
    if(ui->urlLineEdit->text().trimmed().isEmpty())
    {
        MusicMessageBox message;
        message.setText(tr("url is now empty!"));
        message.exec();
        return;
    }
    switch(m_currentMode)
    {
        case 0:
        {
            m_path << QString("%1%2").arg(TMP_DOWNLOAD).arg(JPG_FILE);
            MusicDataDownloadThread *background = new MusicDataDownloadThread(ui->urlLineEdit->text().trimmed(),
                                                      m_path[0], MusicDownLoadThreadAbstract::Download_BigBG, this);
            connect(background, SIGNAL(musicDownLoadFinished(QString)),SLOT(parameterFinished()));
            background->startToDownload();
            break;
        }
        case 1:
            parameterFinished(); break;
        case 2:
            m_path << "Play";
            parameterFinished(); break;
        default: break;
    }
}
开发者ID:githubofhuo,项目名称:TTKMusicplayer,代码行数:28,代码来源:musicdesktopwallpaperwidget.cpp

示例3: buttonClicked

void MusicSongSearchOnlineWidget::buttonClicked(int index)
{
    MIntList list = m_searchTableWidget->getSelectedItems();
    if(list.isEmpty())
    {
        MusicMessageBox message;
        message.setText(tr("Please Select One Item First!"));
        message.exec();
        return;
    }
    foreach(int row, list)
    {
        switch(index)
        {
            case 0:
                m_playButton->text() == tr("Play") ? m_searchTableWidget->auditionToMusic(row)
                                                   : m_searchTableWidget->auditionToMusicStop(row);
                break;
            case 1:
                m_searchTableWidget->listCellClicked(row, 4);
                break;
            case 2:
                m_searchTableWidget->listCellClicked(row, 5);
                break;
            default:
                break;
        }
    }
}
开发者ID:karllen,项目名称:TTKMusicplayer,代码行数:29,代码来源:musicsongsearchonlinewidget.cpp

示例4: musicOpenFileDir

void MusicFileInformationWidget::musicOpenFileDir()
{
    if(!MusicUtils::UCore::openUrl(QFileInfo(m_path).absoluteFilePath()))
    {
        MusicMessageBox message;
        message.setText(tr("The origin one does not exist!"));
        message.exec();
    }
}
开发者ID:azureidea,项目名称:TTKMusicplayer,代码行数:9,代码来源:musicfileinformationwidget.cpp

示例5: musicDownloadLocal

void MusicVideoTableWidget::musicDownloadLocal(int row)
{
    if(row < 0)
    {
        MusicMessageBox message;
        message.setText(tr("Please Select One Item First!"));
        message.exec();
        return;
    }
    downloadLocalMovie(row);
}
开发者ID:DchunWang,项目名称:TTKMusicplayer,代码行数:11,代码来源:musicvideotablewidget.cpp

示例6: currentIndex

void MusicSongsSummarizied::deleteItem()
{
    int index = currentIndex();
    if(index == 0 || index == 1 || index == 2)
    {
        MusicMessageBox message;
        message.setText(tr("The origin one can't delete!"));
        message.exec();
        return;//Not allow to delete the origin three item
    }
    removeItem(index);
}
开发者ID:chenpusn,项目名称:Musicplayer,代码行数:12,代码来源:musicsongssummarizied.cpp

示例7: updatePlayLists

void MusicSongsSummarizied::addMusicSongToLovestListAt(int row)
{
    MusicSong song = m_musicFileNames[currentIndex()][row];
    m_musicFileNames[1] << song;
    m_mainSongLists[1]->updateSongsFileName(m_musicFileNames[1]);
    if(m_currentIndexs == 1)
    {
        emit updatePlayLists(song.getMusicPath());
    }
    MusicMessageBox message;
    message.setText(tr("add music to lovest list done!"));
    message.exec();
}
开发者ID:chenpusn,项目名称:Musicplayer,代码行数:13,代码来源:musicsongssummarizied.cpp

示例8: updateListToServer

void MusicCloudSharedSongTableWidget::deleteFileFinished(bool state)
{
    if(state)
    {
        updateListToServer();
    }
    else
    {
        MusicMessageBox message;
        message.setText(tr("Delete The Current File Error!"));
        message.exec();
    }
}
开发者ID:jinting6949,项目名称:TTKMusicplayer,代码行数:13,代码来源:musiccloudsharedsongwidget.cpp

示例9: setDeleteItemAt

void MusicMyDownloadRecordWidget::setDeleteItemAt()
{
    MusicMessageBox message;
    message.setText(tr("Are you sure to delete?"));
    if( message.exec() || rowCount() == 0 )
    {
       return;
    }

    MusicObject::MIntSet deletedRow; //if selected multi rows
    foreach(QTableWidgetItem *item, selectedItems())
    {
        deletedRow.insert(item->row());
    }
开发者ID:azureidea,项目名称:TTKMusicplayer,代码行数:14,代码来源:musicmydownloadrecordwidget.cpp

示例10: QString

void MusicSongsListWidget::musicOpenFileDir()
{
    if(rowCount() == 0 || currentRow() < 0)
    {
        return;
    }

    QString path = !m_musicSongs->isEmpty() ?m_musicSongs->at(currentRow()).getMusicPath() : QString();
    if(!QDesktopServices::openUrl(QUrl(QFileInfo(path).absolutePath(), QUrl::TolerantMode)))
    {
        MusicMessageBox message;
        message.setText(tr("The origin one does not exsit!"));
        message.exec();
    }
}
开发者ID:karllen,项目名称:TTKMusicplayer,代码行数:15,代码来源:musicsongslistwidget.cpp

示例11: musicOpenFileDir

void MusicMyDownloadRecordWidget::musicOpenFileDir()
{
    if(rowCount() == 0 || currentRow() < 0)
    {
        return;
    }

    if(!QDesktopServices::openUrl(QUrl(QFileInfo(m_musicRecord.m_paths[currentRow()]).absolutePath(),
                                  QUrl::TolerantMode)))
    {
        MusicMessageBox message;
        message.setText(tr("The origin one does not exsit!"));
        message.exec();
    }
}
开发者ID:chenpusn,项目名称:Musicplayer,代码行数:15,代码来源:musicmydownloadrecordwidget.cpp

示例12: lrcSearchDownloadClicked

void MusicLrcSearchWidget::lrcSearchDownloadClicked()
{
    ui->stateLabel->setText(tr("lrc is downloading now!"));
    MusicObject::MIntList list = ui->tableWidget->getSelectedItems();
    if(list.isEmpty())
    {
        MusicMessageBox message;
        message.setText(tr("Please Select One Item First!"));
        message.exec();
        return;
    }
    foreach(int row, list)
    {
        ui->tableWidget->musicDownloadLocal(row);
    }
开发者ID:azureidea,项目名称:TTKMusicplayer,代码行数:15,代码来源:musiclrcsearchwidget.cpp

示例13: auditionToMusicStop

void MusicSongSearchOnlineTableWidget::auditionToMusicStop(int row)
{
    if(m_audition)
    {
        m_audition->stop();
    }
    if(row < 0)
    {
        MusicMessageBox message;
        message.setText(tr("Please Select One Item First!"));
        message.exec();
        return;
    }
    item(row, 0)->setData(MUSIC_AUDIT_ROLE, AUDITION_STOP);
    emit auditionIsPlaying(true);
}
开发者ID:karllen,项目名称:TTKMusicplayer,代码行数:16,代码来源:musicsongsearchonlinewidget.cpp

示例14: musicDownloadLocal

void MusicLrcSearchTableWidget::musicDownloadLocal(int row)
{
    if(row < 0)
    {
        MusicMessageBox message;
        message.setText(tr("Please Select One Item First!"));
        message.exec();
        return;
    }
    MusicSongInfomations musicSongInfos(m_downLoadManager->getMusicSongInfo());

    MusicTextDownLoadThread* lrcDownload = new MusicTextDownLoadThread(musicSongInfos[row].m_lrcUrl,
                             LRC_DOWNLOAD_AL + m_currentSongName + LRC_FILE, Download_Lrc, this);
    connect(lrcDownload, SIGNAL(musicDownLoadFinished(QString)),
                         SIGNAL(lrcDownloadStateChanged(QString)));
    lrcDownload->startToDownload();
}
开发者ID:chenpusn,项目名称:Musicplayer,代码行数:17,代码来源:musiclrcsearchtablewidget.cpp

示例15: musicDownloadLocal

void MusicLrcSearchTableWidget::musicDownloadLocal(int row)
{
    if(row < 0 || (row >= rowCount() - 1))
    {
        MusicMessageBox message;
        message.setText(tr("Please Select One Item First!"));
        message.exec();
        return;
    }

    MusicObject::MusicSongInformations musicSongInfos(m_downLoadManager->getMusicSongInfos());
    ///download lrc
    MusicDownLoadThreadAbstract *d = M_DOWNLOAD_QUERY_PTR->getDownloadLrcThread(musicSongInfos[row].m_lrcUrl,
                             MusicUtils::Core::lrcPrefix() + m_downLoadManager->getSearchedText() + LRC_FILE,
                             MusicDownLoadThreadAbstract::DownloadLrc, this);
    connect(d, SIGNAL(downLoadDataChanged(QString)), SIGNAL(lrcDownloadStateChanged(QString)));
    d->startToDownload();
}
开发者ID:jinting6949,项目名称:TTKMusicplayer,代码行数:18,代码来源:musiclrcsearchtablewidget.cpp


注:本文中的MusicMessageBox类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。