本文整理汇总了C++中MusicMessageBox::setText方法的典型用法代码示例。如果您正苦于以下问题:C++ MusicMessageBox::setText方法的具体用法?C++ MusicMessageBox::setText怎么用?C++ MusicMessageBox::setText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MusicMessageBox
的用法示例。
在下文中一共展示了MusicMessageBox::setText方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: checkUserLogin
void MusicUserDialog::checkUserLogin()
{
QString user = ui->userComboBox->currentText();
QString pwd = ui->passwLineEdit->text();
if(!ui->rememberPwd->isChecked() ||
pwd != m_userModel->getUserPWDMD5(m_userName) )
{
if( !m_userModel->passwordCheck(user, pwd) )
{
MusicMessageBox message;
message.setText(tr("You passwd is incorrect or user is not exist"));
message.exec();
return;
}
}
if( user.trimmed().isEmpty() || pwd.trimmed().isEmpty() )
{
MusicMessageBox message;
message.setText(tr("You entered is incorrect"));
message.exec();
return;
}
writeToUserConfig();
emit userLoginSuccess(user, m_userModel->getUserIcon(user));
close();
}
示例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: 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;
}
}
示例5: 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();
}
}
示例6: checkRegisterUser
void MusicUserDialog::checkRegisterUser()
{
if( ui->registerUserLine->getStrStatus() &&
ui->registerMailLine->getMailStatus() &&
ui->registerPwdLine->getStrStatus() &&
ui->registerPwdCLine->getStrStatus() )
{
if( ui->registerPwdLine->text() != ui->registerPwdCLine->text() )
{
MusicMessageBox message;
message.setText(tr("The two passwords do not match"));
message.exec();
return;
}
if( !ui->agreementCheckBox->isChecked() )
{
MusicMessageBox message;
message.setText(tr("The agreement does not tick"));
message.exec();
return;
}
if( !m_userModel->addUser(ui->registerUserLine->text(),
ui->registerPwdLine->text(),
ui->registerMailLine->text()) )
{
MusicMessageBox message;
message.setText(tr("The username is existed"));
message.exec();
return;
}
MusicMessageBox message;
message.setText(tr("The register successfully"));
message.exec();
userLogin();
}
else
{
MusicMessageBox message;
message.setText(tr("You entered is incorrect"));
message.exec();
}
}
示例7: musicDownloadLocal
void MusicVideoTableWidget::musicDownloadLocal(int row)
{
if(row < 0)
{
MusicMessageBox message;
message.setText(tr("Please Select One Item First!"));
message.exec();
return;
}
downloadLocalMovie(row);
}
示例8: deleteItem
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);
}
示例9: checkUserForgotPasswd
void MusicUserDialog::checkUserForgotPasswd()
{
QString user = ui->userLineEdit->text();
QString mail = ui->mailLineEdit->text();
if( user.trimmed().isEmpty() || mail.trimmed().isEmpty() )
{
MusicMessageBox message;
message.setText(tr("You entered is incorrect"));
message.exec();
return;
}
if( !m_userModel->mailCheck(user,mail) )
{
MusicMessageBox message;
message.setText(tr("You mail is incorrect or user is not exist"));
message.exec();
return;
}
if( !ui->pwdLineEdit->getStrStatus() )
{
MusicMessageBox message;
message.setText(tr("You passwd is incorrect"));
message.exec();
return;
}
if( ui->verificationCode->text() != ui->verificationCodeEdit->text().trimmed() )
{
MusicMessageBox message;
message.setText(tr("You verificationCode is incorrect"));
message.exec();
return;
}
if( m_userModel->updateUser(user, ui->pwdLineEdit->text(), mail, QString(), QString()))
{
MusicMessageBox message;
message.setText(tr("Change password successfully"));
message.exec();
}
userLogin();
}
示例10: processTransform
bool MusicTransformWidget::processTransform(const QString ¶) const
{
if(m_path.isEmpty())
{
MusicMessageBox message;
message.setText(tr("the input is empty!"));
message.exec();
return false;
}
QString in = m_path[0].trimmed();
QString out = ui->outputLineEdit->text().trimmed();
if(in.isEmpty() || out.isEmpty() )
{
MusicMessageBox message;
message.setText(tr("the out is empty!"));
message.exec();
return false;
}
if(ui->formatCombo->currentText() == "OGG")
{
ui->msCombo->setCurrentIndex(1);
}
M_LOGGER << ui->formatCombo->currentText()
<< ui->kbpsCombo->currentText()
<< ui->hzCombo->currentText()
<< QString::number(ui->msCombo->currentIndex() + 1);
m_process->start(para, QStringList() << "-i" << in << "-y"
<< "-ab" << ui->kbpsCombo->currentText() + "k"
<< "-ar" << ui->hzCombo->currentText()
<< "-ac" << QString::number(ui->msCombo->currentIndex() + 1)
<< QString("%1/%2-Transed.%3").arg(out).arg(getTransformSongName())
.arg(ui->formatCombo->currentText().toLower()) );
return true;
}
示例11: addMusicSongToLovestListAt
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();
}
示例12: deleteFileFinished
void MusicCloudSharedSongTableWidget::deleteFileFinished(bool state)
{
if(state)
{
updateListToServer();
}
else
{
MusicMessageBox message;
message.setText(tr("Delete The Current File Error!"));
message.exec();
}
}
示例13: 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());
}
示例14: musicOpenFileDir
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();
}
}
示例15: 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();
}
}