Exemplo n.º 1
0
void VideoCapture::setCaptureDir(const QString &value)
{
    if (dir == value)
        return;
    dir = value;
    emit captureDirChanged();
}
Exemplo n.º 2
0
Config& Config::setCaptureDir(const QString& dir)
{
    if (mpData->capture_dir == dir)
        return *this;
    mpData->capture_dir = dir;
    emit captureDirChanged(dir);
    return *this;
}
Exemplo n.º 3
0
void Config::reload()
{
    mpData->load();
    qDebug() << decoderPriorityNames();
    emit decoderPriorityNamesChanged();
    emit captureDirChanged(mpData->capture_dir);
    emit captureFormatChanged(mpData->capture_fmt);
    emit captureQualityChanged(mpData->capture_quality);
}
Exemplo n.º 4
0
    formats << "YUV" << QImageWriter::supportedImageFormats();
    foreach (QByteArray fmt, formats) {
        mpFormat->addItem(fmt);
    }
    int idx = mpFormat->findText(Config::instance().captureFormat());
    mpFormat->setCurrentIndex(idx);
    mpQuality = new Slider();
    formLayout->addRow(tr("Quality"), mpQuality);
    mpQuality->setRange(0, 100);
    mpQuality->setOrientation(Qt::Horizontal);
    mpQuality->setValue(Config::instance().captureQuality());
    mpQuality->setSingleStep(1);
    mpQuality->setTickInterval(10);
    mpQuality->setTickPosition(QSlider::TicksBelow);

    connect(&Config::instance(), SIGNAL(captureDirChanged(QString)), mpDir, SLOT(setText(QString)));
    connect(&Config::instance(), SIGNAL(captureQualityChanged(int)), mpQuality, SLOT(setValue(int)));
    connect(&Config::instance(), SIGNAL(captureFormatChanged(QByteArray)), SLOT(formatChanged(QByteArray)));
    connect(mpDir, SIGNAL(textChanged(QString)), SLOT(changeDirByUi(QString)));
    connect(mpFormat, SIGNAL(currentIndexChanged(QString)), SLOT(changeFormatByUi(QString)));
    connect(mpQuality, SIGNAL(valueChanged(int)), SLOT(changeQualityByUi(int)));
}

void CaptureConfigPage::apply()
{
    Config::instance().captureDir(mpDir->text())
            .captureFormat(mpFormat->currentText().toUtf8())
            .captureQuality(mpQuality->value());
}

QString CaptureConfigPage::name() const