Пример #1
0
void Downloader::requestEnded(bool isFounded)
{
    ++finishedCount;
    if(isFounded)
    {
        ++foundedCount;
        ui->leFound->setText(QString("%1 (%2%)").arg(foundedCount).arg(((double)foundedCount/finishedCount)*100));
    }
    else
    {
        ++notFoundedCount;
        ui->leNotFound->setText(QString("%1 (%2%)").arg(notFoundedCount).arg(((double)notFoundedCount/finishedCount)*100));
    }
    ui->leProcessed->setText(QString("%1 (%2%)").arg(finishedCount).arg(((double)finishedCount/totalCount)*100));
    if(totalCount==finishedCount) on_pbStop_clicked();
}
Пример #2
0
int nTrain::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QDialog::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: on_pbTest_clicked(); break;
        case 1: on_pbStop_clicked(); break;
        case 2: on_pbConvert_clicked(); break;
        case 3: on_pbSave_clicked(); break;
        case 4: on_pbBrowseFile_clicked(); break;
        case 5: on_pbBrowseDir_clicked(); break;
        case 6: on_pbTrain_clicked(); break;
        default: ;
        }
        _id -= 7;
    }
    return _id;
}