void RemoveRedEyesWindow::startPreview()
{
    KPImagesListViewItem* const item = dynamic_cast<KIPIPlugins::KPImagesListViewItem*>(d->imageList->listView()->currentItem());

    if (!item)
    {
        d->previewWidget->reset();
        return;
    }

    if (!d->originalImageTempFile.open()  ||
        !d->correctedImageTempFile.open() ||
        !d->maskImageTempFile.open())
    {
        qCDebug(KIPIPLUGINS_LOG) << "unable to create temp file for image preview!";
    }

    updateSettings();

    if (item->url().path() == d->previewWidget->currentImage())
    {
        return;
    }

    d->previewWidget->setCurrentImage(item->url().path());
    d->runtype = WorkerThread::Preview;

    QList<QUrl> oneFile;
    oneFile.append(item->url());
    startWorkerThread(oneFile);
}
Пример #2
0
void Task::slotRun()
{
  L_FUNC("");
  static unsigned int id = 0;

  startWorkerThread(QString("%1").arg(++id, 2, 10, QLatin1Char('0')));
}
Пример #3
0
void ManagerImpl::refreshSoftwareSlot()
{
    softwareList->clear();
    uninstallButton->setDisabled(true);
    RakiWorkerThread::rakiWorkerThread->stop();
    startWorkerThread(this, &ManagerImpl::fetchSoftwareList, NULL);
}
Пример #4
0
void DataImporterImportPage::initializePage()
{
    Q_ASSERT(queryScheduler);

    if(!workerThread){
        startWorkerThread();
    }
}
void RemoveRedEyesWindow::startTestrun()
{
    updateSettings();
    d->runtype = WorkerThread::Testrun;

    d->imageList->resetEyeCounterColumn();
    d->tabWidget->setCurrentIndex(FileList);

    QList<QUrl> urls = d->imageList->imageUrls();
    startWorkerThread(urls);
}
status_t EmulatedCameraDevice::startDeliveringFrames(bool one_burst)
{
    ALOGV("%s", __FUNCTION__);

    if (!isStarted()) {
        ALOGE("%s: Device is not started", __FUNCTION__);
        return EINVAL;
    }

    /* Frames will be delivered from the thread routine. */
    const status_t res = startWorkerThread(one_burst);
    ALOGE_IF(res != NO_ERROR, "%s: startWorkerThread failed", __FUNCTION__);
    return res;
}
Пример #7
0
void startWorkers(int numWorkers) {
  int i;
  int efd;
  for (i=0; i < numWorkers; i++) {
    if (-1==(efd = epoll_create1(0))) {
      perror("worker epoll_create1");
      exit(-1);
    }
    workers[i].efd = efd;
  }

  for (i=0; i < numWorkers; i++) {
    startWorkerThread(i);
  }
}
void RemoveRedEyesWindow::startCorrection()
{
    updateSettings();

    if (!acceptStorageSettings())
    {
        return;
    }

    d->runtype = WorkerThread::Correction;

    d->imageList->resetEyeCounterColumn();
    d->tabWidget->setCurrentIndex(FileList);

    QList<QUrl> urls = d->imageList->imageUrls();
    startWorkerThread(urls);
}
Пример #9
0
void ManagerImpl::refreshBatteryStatusSlot()
{
    bat1Flag->clear();
    bat1LifePer->clear();
    bat1LifeTime->clear();
    bat1FullLife->clear();
    bat2Flag->clear();
    bat2LifePer->clear();
    bat2LifeTime->clear();
    bat2FullLife->clear();
    online->off();
    offline->off();
    backup->off();
    invalid->off();
    RakiWorkerThread::rakiWorkerThread->stop();
    startWorkerThread(this, &ManagerImpl::fetchBatteryStatus, NULL);
}
Пример #10
0
void ManagerImpl::refreshSystemInfoSlot()
{
    major->clear();
    minor->clear();
    build->clear();
    sysName->clear();
    id->clear();
    platform->clear();
    details->clear();
    architecture->clear();
    procType->clear();
    pageSize->clear();
    storageSize->clear();
    freeSpace->clear();
    RakiWorkerThread::rakiWorkerThread->stop();
    startWorkerThread(this, &ManagerImpl::fetchSystemInfo, NULL);
}
Пример #11
0
void ManagerImpl::uninstallSoftwareSlot()
{
    uninstallButton->setEnabled(false);
    RakiWorkerThread::rakiWorkerThread->stop();
    startWorkerThread(this, &ManagerImpl::uninstallSoftware, NULL);
}
Пример #12
0
void startWorkers(void) {
  int i;
  for (i=0; i < NUM_WORKERS; i++) {
    startWorkerThread(i);
  }
}