void ZDvidBufferReader::handleError(QNetworkReply::NetworkError /*error*/) { if (m_networkReply != NULL) { qDebug() << m_networkReply->errorString(); } endReading(READ_FAILED); }
void Connection::readData() { QByteArray data; lastRead.start(); if(newRequest) { buffer += port->readAll(); // czeka na wczytanie calego naglowka if(buffer.size() < 18) return; // zapisuje naglowek i przechodzi dalej header = buffer.mid(0, 18); checkHeader(); samplesRead = buffer.size(); buffer = buffer.mid(18); newRequest = false; } else { data = port->readAll(); samplesRead += data.size(); buffer += data; if(buffer.size() >= INTERVAL && samplesRead < (chunkSize+18)) { rawSamples = Container::data8ToInt8Vec(buffer.mid(0, INTERVAL)); buffer = buffer.mid(INTERVAL); handleWithSamples(); } } if(samplesRead >= (chunkSize+22)) { endReading(); } }
void Connection::stopAndSave() { endReading(false); stop(); Container::getCurrent()->saveToFile(); }
void MainWindow::createProject() { project = new Project(groups, this); { connect(ui->actionReloadProject, SIGNAL(triggered()), SLOT(tryReloadProject())); connect(ui->actionClose, SIGNAL(triggered()), SLOT(tryCloseProject())); } { connect(ui->actionLoadProject, SIGNAL(triggered()), project, SLOT(load())); connect(ui->actionSaveProject, SIGNAL(triggered()), project, SLOT(save())); connect(ui->actionSaveAs, SIGNAL(triggered()), project, SLOT(saveAs())); connect(ui->actionCopyProFileTo, SIGNAL(triggered()), project, SLOT(forKojnevAlexandrNikolayevich())); connect(ui->actionLoadVersionThree, SIGNAL(triggered()), project, SLOT(forDeminValeriyNikolayevich())); } { connect(project, SIGNAL(wasReplaced(QString)), SLOT(setWindowTitle(QString))); connect(project, SIGNAL(wasClosed()), SLOT(restoreWindowTitle())); connect(project, SIGNAL(beginReading()), SLOT(beginWaiting())); connect(project, SIGNAL(endReading()), SLOT(endWaiting())); } { connect(project, SIGNAL(wasReplaced(QString)), groups, SLOT(setInitialLoadingPath(QString))); } }
void ZDvidBufferReader::cancelReading() { endReading(READ_CANCELED); }
void ZDvidBufferReader::handleTimeout() { endReading(READ_TIMEOUT); }
void ZDvidBufferReader::finishReading() { endReading(m_status); }