本文整理汇总了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;
}
}
示例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;
}
}
示例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;
}
}
}
示例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();
}
}
示例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);
}
示例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);
}
示例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();
}
示例8: updateListToServer
void MusicCloudSharedSongTableWidget::deleteFileFinished(bool state)
{
if(state)
{
updateListToServer();
}
else
{
MusicMessageBox message;
message.setText(tr("Delete The Current File Error!"));
message.exec();
}
}
示例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());
}
示例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();
}
}
示例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();
}
}
示例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);
}
示例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);
}
示例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();
}
示例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();
}