void AbstractScopeWidget::readConfig() { KSharedConfigPtr config = KSharedConfig::openConfig(); KConfigGroup scopeConfig(config, configName()); m_aAutoRefresh->setChecked(scopeConfig.readEntry("autoRefresh", true)); m_aRealtime->setChecked(scopeConfig.readEntry("realtime", false)); scopeConfig.sync(); }
void Waveform::writeConfig() { KSharedConfigPtr config = KSharedConfig::openConfig(); KConfigGroup scopeConfig(config, configName()); scopeConfig.writeEntry("paintmode", ui->paintMode->currentIndex()); scopeConfig.writeEntry("rec601", m_aRec601->isChecked()); scopeConfig.sync(); }
void AbstractScopeWidget::writeConfig() { KSharedConfigPtr config = KGlobal::config(); KConfigGroup scopeConfig(config, configName()); scopeConfig.writeEntry("autoRefresh", m_aAutoRefresh->isChecked()); scopeConfig.writeEntry("realtime", m_aRealtime->isChecked()); scopeConfig.sync(); }
void Waveform::readConfig() { AbstractGfxScopeWidget::readConfig(); KSharedConfigPtr config = KSharedConfig::openConfig(); KConfigGroup scopeConfig(config, configName()); ui->paintMode->setCurrentIndex(scopeConfig.readEntry("paintmode", 0)); m_aRec601->setChecked(scopeConfig.readEntry("rec601", false)); m_aRec709->setChecked(!m_aRec601->isChecked()); }
void Histogram::writeConfig() { KSharedConfigPtr config = KGlobal::config(); KConfigGroup scopeConfig(config, configName()); scopeConfig.writeEntry("yEnabled", ui->cbY->isChecked()); scopeConfig.writeEntry("sEnabled", ui->cbS->isChecked()); scopeConfig.writeEntry("rEnabled", ui->cbR->isChecked()); scopeConfig.writeEntry("gEnabled", ui->cbG->isChecked()); scopeConfig.writeEntry("bEnabled", ui->cbB->isChecked()); scopeConfig.writeEntry("rec601", m_aRec601->isChecked()); scopeConfig.sync(); }
void Histogram::readConfig() { AbstractGfxScopeWidget::readConfig(); KSharedConfigPtr config = KGlobal::config(); KConfigGroup scopeConfig(config, configName()); ui->cbY->setChecked(scopeConfig.readEntry("yEnabled", true)); ui->cbS->setChecked(scopeConfig.readEntry("sEnabled", false)); ui->cbR->setChecked(scopeConfig.readEntry("rEnabled", true)); ui->cbG->setChecked(scopeConfig.readEntry("gEnabled", true)); ui->cbB->setChecked(scopeConfig.readEntry("bEnabled", true)); m_aRec601->setChecked(scopeConfig.readEntry("rec601", false)); m_aRec709->setChecked(!m_aRec601->isChecked()); }
/** * Reload configuration by re-reading the config file. Note the configuration * is limited to only change a few variables during runtime. * * In some cases new variables are initilized and in others only reread */ void Container::reloadConfiguration() { if (this->lockConfig == NULL) throw dashee::Exception("lockConfig should be not NULL"); dashee::Threads::Scope scopeConfig(this->lockConfig); dashee::Threads::Scope scopeServer(this->lockServer); dashee::Threads::Scope scopeServoController(this->lockServoController); dashee::Threads::Scope scopeVehicle(this->lockVehicle); this->reloadConfig(); this->reloadServer(); this->reloadServoController(); this->reloadVehicle(); }
void AudioSpectrum::writeConfig() { KSharedConfigPtr config = KGlobal::config(); KConfigGroup scopeConfig(config, AbstractScopeWidget::configName()); scopeConfig.writeEntry("windowSize", ui->windowSize->currentIndex()); scopeConfig.writeEntry("windowFunction", ui->windowFunction->currentIndex()); scopeConfig.writeEntry("trackMouse", m_aTrackMouse->isChecked()); scopeConfig.writeEntry("showMax", m_aShowMax->isChecked()); scopeConfig.writeEntry("dBmax", m_dBmax); scopeConfig.writeEntry("dBmin", m_dBmin); if (m_customFreq) { scopeConfig.writeEntry("freqMax", m_freqMax); } else { scopeConfig.writeEntry("freqMax", 0); } scopeConfig.sync(); }
void AudioSpectrum::readConfig() { AbstractScopeWidget::readConfig(); KSharedConfigPtr config = KGlobal::config(); KConfigGroup scopeConfig(config, AbstractScopeWidget::configName()); ui->windowSize->setCurrentIndex(scopeConfig.readEntry("windowSize", 0)); ui->windowFunction->setCurrentIndex(scopeConfig.readEntry("windowFunction", 0)); m_aTrackMouse->setChecked(scopeConfig.readEntry("trackMouse", true)); m_aShowMax->setChecked(scopeConfig.readEntry("showMax", true)); m_dBmax = scopeConfig.readEntry("dBmax", 0); m_dBmin = scopeConfig.readEntry("dBmin", -70); m_freqMax = scopeConfig.readEntry("freqMax", 0); if (m_freqMax == 0) { m_customFreq = false; m_freqMax = 10000; } else { m_customFreq = true; } }