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


C++ MusicMessageBox::setText方法代码示例

本文整理汇总了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();
}
开发者ID:AndyQsmart,项目名称:TTKMusicplayer,代码行数:28,代码来源:musicuserdialog.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: 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

示例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();
    }
}
开发者ID:azureidea,项目名称:TTKMusicplayer,代码行数:9,代码来源:musicfileinformationwidget.cpp

示例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();
    }
}
开发者ID:AndyQsmart,项目名称:TTKMusicplayer,代码行数:43,代码来源:musicuserdialog.cpp

示例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);
}
开发者ID:DchunWang,项目名称:TTKMusicplayer,代码行数:11,代码来源:musicvideotablewidget.cpp

示例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);
}
开发者ID:chenpusn,项目名称:Musicplayer,代码行数:12,代码来源:musicsongssummarizied.cpp

示例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();
}
开发者ID:AndyQsmart,项目名称:TTKMusicplayer,代码行数:40,代码来源:musicuserdialog.cpp

示例10: processTransform

bool MusicTransformWidget::processTransform(const QString &para) 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;
}
开发者ID:chenpusn,项目名称:Musicplayer,代码行数:39,代码来源:musictransformwidget.cpp

示例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();
}
开发者ID:chenpusn,项目名称:Musicplayer,代码行数:13,代码来源:musicsongssummarizied.cpp

示例12: deleteFileFinished

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

示例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());
    }
开发者ID:azureidea,项目名称:TTKMusicplayer,代码行数:14,代码来源:musicmydownloadrecordwidget.cpp

示例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();
    }
}
开发者ID:karllen,项目名称:TTKMusicplayer,代码行数:15,代码来源:musicsongslistwidget.cpp

示例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();
    }
}
开发者ID:chenpusn,项目名称:Musicplayer,代码行数:15,代码来源:musicmydownloadrecordwidget.cpp


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