您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ ConfigValue函数代码示例

51自学网 2021-06-01 20:13:15
  C++
这篇教程C++ ConfigValue函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中ConfigValue函数的典型用法代码示例。如果您正苦于以下问题:C++ ConfigValue函数的具体用法?C++ ConfigValue怎么用?C++ ConfigValue使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了ConfigValue函数的21个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ConfigValue

bool WaveformWidgetFactory::setWidgetType(WaveformWidgetType::Type type) {    if (type == m_type)        return true;    // check if type is acceptable    for (int i = 0; i < m_waveformWidgetHandles.size(); i++) {        WaveformWidgetAbstractHandle& handle = m_waveformWidgetHandles[i];        if (handle.m_type == type) {            // type is acceptable            m_type = type;            if (m_config) {                m_config->set(ConfigKey("[Waveform]","WaveformType"), ConfigValue((int)m_type));            }            return true;        }    }    // fallback    m_type = WaveformWidgetType::EmptyWaveform;    if (m_config) {        m_config->set(ConfigKey("[Waveform]","WaveformType"), ConfigValue((int)m_type));    }    return false;}
开发者ID:MK-42,项目名称:mixxx,代码行数:24,


示例2: ConfigValue

void WaveformWidgetFactory::setDisplayBeatGrid(bool sync) {    m_beatGridEnabled = sync;    if (m_config) {        m_config->set(ConfigKey("[Waveform]", "beatGridLinesCheckBox"), ConfigValue(m_beatGridEnabled));    }    if (m_waveformWidgetHolders.size() == 0) {        return;    }    for (int i = 0; i < m_waveformWidgetHolders.size(); i++) {        m_waveformWidgetHolders[i].m_waveformWidget->setDisplayBeatGrid(m_beatGridEnabled);    }}
开发者ID:DJMaxergy,项目名称:mixxx,代码行数:15,


示例3: qDebug

void BasePlaylistFeature::slotImportPlaylist() {    qDebug() << "slotImportPlaylist() row:" ; //<< m_lastRightClickedIndex.data();    if (!m_pPlaylistTableModel) {        return;    }    QString lastPlaylistDirectory = m_pConfig->getValueString(            ConfigKey("[Library]", "LastImportExportPlaylistDirectory"),            QDesktopServices::storageLocation(QDesktopServices::MusicLocation));    QString playlist_file = QFileDialog::getOpenFileName(            NULL,            tr("Import Playlist"),            lastPlaylistDirectory,            tr("Playlist Files (*.m3u *.m3u8 *.pls *.csv)"));    // Exit method if user cancelled the open dialog.    if (playlist_file.isNull() || playlist_file.isEmpty()) {        return;    }    // Update the import/export playlist directory    QFileInfo fileName(playlist_file);    m_pConfig->set(ConfigKey("[Library]","LastImportExportPlaylistDirectory"),                ConfigValue(fileName.dir().absolutePath()));    Parser* playlist_parser = NULL;    if (playlist_file.endsWith(".m3u", Qt::CaseInsensitive) ||            playlist_file.endsWith(".m3u8", Qt::CaseInsensitive)) {        playlist_parser = new ParserM3u();    } else if (playlist_file.endsWith(".pls", Qt::CaseInsensitive)) {        playlist_parser = new ParserPls();    } else if (playlist_file.endsWith(".csv", Qt::CaseInsensitive)) {        playlist_parser = new ParserCsv();    } else {        return;    }    QList<QString> entries = playlist_parser->parse(playlist_file);    // Iterate over the List that holds URLs of playlist entires    m_pPlaylistTableModel->addTracks(QModelIndex(), entries);    // delete the parser object    if (playlist_parser) {        delete playlist_parser;    }}
开发者ID:educorzo,项目名称:mixxx,代码行数:48,


示例4: ConfigKey

bool TrackExportWizard::selectDestinationDirectory() {    QString lastExportDirectory = m_pConfig->getValue(            ConfigKey("[Library]", "LastTrackCopyDirectory"),            QStandardPaths::writableLocation(QStandardPaths::MusicLocation));    QString destDir = QFileDialog::getExistingDirectory(            NULL, tr("Export Track Files To"), lastExportDirectory);    if (destDir.isEmpty()) {        return false;    }    m_pConfig->set(ConfigKey("[Library]", "LastTrackCopyDirectory"),                   ConfigValue(destDir));    m_worker.reset(new TrackExportWorker(destDir, m_tracks));    m_dialog.reset(new TrackExportDlg(m_parent, m_pConfig, m_worker.data()));    return true;}
开发者ID:WaylonR,项目名称:mixxx,代码行数:17,


示例5: ConfigValue

void DlgPrefAutoDJ::slotEnableAutoDJRandomQueueComboBox(int a_iValue) {#ifdef __AUTODJCRATES__    if (a_iValue == 1) {        // Requeue is enabled        m_pConfig->set(ConfigKey("[Auto DJ]", "EnableRandomQueueBuff"),                ConfigValue(0));        ComboBoxAutoDjRandomQueue->setCurrentIndex(0);        ComboBoxAutoDjRandomQueue->setEnabled(false);        autoDJRandomQueueMinimumSpinBox->setEnabled(false);    } else {        ComboBoxAutoDjRandomQueue->setEnabled(true);        autoDJRandomQueueMinimumSpinBox->setEnabled(                m_pConfig->getValueString(                        ConfigKey("[Auto DJ]", "EnableRandomQueueBuff"),"0").toInt());    }#endif // __AUTODJCRATES__}
开发者ID:AndreiRO,项目名称:mixxx,代码行数:17,


示例6: slotResetToDefaults

void DlgPrefAutoDJ::slotResetToDefaults() {    // Re-queue tracks in AutoDJ    ComboBoxAutoDjRequeue->setCurrentIndex(0);    m_pConfig->set(ConfigKey("[Auto DJ]", "RequeueBuff"),ConfigValue(0));    autoDjMinimumAvailableSpinBox->setValue(20);    autoDjIgnoreTimeEdit->setTime(QTime::fromString(            "23:59", autoDjIgnoreTimeEdit->displayFormat()));    autoDjIgnoreTimeCheckBox->setChecked(false);    m_pConfig->set(ConfigKey("[Auto DJ]", "UseIgnoreTimeBuff"),QString("0"));    autoDjIgnoreTimeEdit->setEnabled(false);    autoDJRandomQueueMinimumSpinBox->setValue(5);    ComboBoxAutoDjRandomQueue->setCurrentIndex(0);    m_pConfig->set(ConfigKey("[Auto DJ]", "EnableRandomQueueBuff"),QString("0"));    autoDJRandomQueueMinimumSpinBox->setEnabled(false);    ComboBoxAutoDjRandomQueue->setEnabled(true);}
开发者ID:Alppasa,项目名称:mixxx,代码行数:18,


示例7: ConfigValue

// Selects the option by its index. If it is a single-element option, // index 0 means disabled and 1 enabled.void EncoderMp3Settings::setGroupOption(QString groupCode, int optionIndex){    bool found=false;    for (const auto& group : m_radioList) {        if (groupCode == group.groupCode) {            found=true;            if (optionIndex < group.controlNames.size() || optionIndex == 1) {                m_pConfig->set(ConfigKey(RECORDING_PREF_KEY, ENCODING_MODE_GROUP),                    ConfigValue(optionIndex));            } else {                qWarning() << "Received an index out of range for: "                     << groupCode << ", index: " << optionIndex;            }        }    }    if (!found) {        qWarning() << "Received an unknown groupCode on setGroupOption: " << groupCode;    }}
开发者ID:DJMaxergy,项目名称:mixxx,代码行数:21,


示例8: ConfigValue

void AnalysisFeature::analyzeTracks(QList<int> trackIds) {    if (m_pAnalyserQueue == NULL) {        // Save the old BPM detection prefs setting (on or off)        m_iOldBpmEnabled = m_pConfig->getValueString(ConfigKey("[BPM]","BPMDetectionEnabled")).toInt();        // Force BPM detection to be on.        m_pConfig->set(ConfigKey("[BPM]","BPMDetectionEnabled"), ConfigValue(1));        // Note: this sucks... we should refactor the prefs/analyser to fix this hacky bit ^^^^.        m_pAnalyserQueue = AnalyserQueue::createAnalysisFeatureAnalyserQueue(m_pConfig, m_pTrackCollection);        connect(m_pAnalyserQueue, SIGNAL(trackProgress(int)),                m_pAnalysisView, SLOT(trackAnalysisProgress(int)));        connect(m_pAnalyserQueue, SIGNAL(trackFinished(int)),                this, SLOT(slotProgressUpdate(int)));        connect(m_pAnalyserQueue, SIGNAL(trackFinished(int)),                m_pAnalysisView, SLOT(trackAnalysisFinished(int)));        connect(m_pAnalyserQueue, SIGNAL(queueEmpty()),                this, SLOT(cleanupAnalyser()));        emit(analysisActive(true));    }
开发者ID:AndreiRO,项目名称:mixxx,代码行数:21,


示例9: md5

const ConfigValueFRTConfigResponseV3::readConfigValue() const{    vespalib::string md5(_data->get()[RESPONSE_CONFIG_MD5].asString().make_string());    CompressionInfo info;    info.deserialize(_data->get()[RESPONSE_COMPRESSION_INFO]);    Slime * rawData = new Slime();    SlimePtr payloadData(rawData);    DecompressedData data(decompress(((*_returnValues)[1]._data._buf), ((*_returnValues)[1]._data._len), info.compressionType, info.uncompressedSize));    if (data.memRef.size > 0) {        size_t consumedSize = JsonFormat::decode(data.memRef, *rawData);        if (consumedSize == 0) {            std::string json(make_json(*payloadData, true));            LOG(error, "Error decoding JSON. Consumed size: %lu, uncompressed size: %u, compression type: %s, assumed uncompressed size(%u), compressed size: %u, slime(%s)", consumedSize, data.size, compressionTypeToString(info.compressionType).c_str(), info.uncompressedSize, ((*_returnValues)[1]._data._len), json.c_str());            LOG_ABORT("Error decoding JSON");        }    }    if (LOG_WOULD_LOG(spam)) {        LOG(spam, "read config value md5(%s), payload size: %lu", md5.c_str(), data.memRef.size);    }    return ConfigValue(PayloadPtr(new V3Payload(payloadData)), md5);}
开发者ID:songhtdo,项目名称:vespa,代码行数:22,


示例10: ConfigValue

void DlgPrefPlaylist::slotApply() {    m_pconfig->set(ConfigKey("[Promo]","StatTracking"),                ConfigValue((int)checkBoxPromoStats->isChecked()));    m_pconfig->set(ConfigKey("[Library]","RescanOnStartup"),                ConfigValue((int)checkBox_library_scan->isChecked()));    m_pconfig->set(ConfigKey("[Library]","WriteAudioTags"),                ConfigValue((int)checkbox_ID3_sync->isChecked()));    m_pconfig->set(ConfigKey("[Library]","UseRelativePathOnExport"),                ConfigValue((int)checkBox_use_relative_path->isChecked()));    m_pconfig->set(ConfigKey("[Library]","ShowRhythmboxLibrary"),                ConfigValue((int)checkBox_show_rhythmbox->isChecked()));    m_pconfig->set(ConfigKey("[Library]","ShowITunesLibrary"),                ConfigValue((int)checkBox_show_itunes->isChecked()));    m_pconfig->set(ConfigKey("[Library]","ShowTraktorLibrary"),                ConfigValue((int)checkBox_show_traktor->isChecked()));    if (LineEditSongfiles->text() !=            m_pconfig->getValueString(ConfigKey("[Playlist]","Directory"))) {        m_pconfig->set(ConfigKey("[Playlist]","Directory"), LineEditSongfiles->text());        emit(apply());    }    m_pconfig->Save();}
开发者ID:AlbanBedel,项目名称:mixxx,代码行数:23,


示例11: QDir

//.........这里部分代码省略.........        QFile::remove(oldLocation.filePath(".MixxxMIDIDevice.xml")); // Obsolete file, so just delete it#endif#ifdef __WINDOWS__        oldFilePath = oldLocation.filePath("mixxx.cfg");#else        oldFilePath = oldLocation.filePath(".mixxx.cfg");#endif        newFilePath = newLocation.filePath(SETTINGS_FILE);        oldFile = new QFile(oldFilePath);        if (oldFile->copy(newFilePath))            oldFile->remove();        else {                if (oldFile->error()==14) qDebug() << errorText.arg("configuration", oldFilePath, newFilePath) << "The destination file already exists.";                else qDebug() << errorText.arg("configuration", oldFilePath, newFilePath) << "Error #" << oldFile->error();            }        delete oldFile;    }    // Tidy up    delete pre170Config;    // End pre-1.7.0 code/****************************************************************************                           Post-1.7.0 upgrade code**   Add entries to the IF ladder below if anything needs to change from the*   previous to the current version. This allows for incremental upgrades*   in case a user upgrades from a few versions prior.****************************************************************************/    // Read the config file from home directory    UserSettingsPointer config(new ConfigObject<ConfigValue>(        QDir(settingsPath).filePath(SETTINGS_FILE)));    QString configVersion = config->getValueString(ConfigKey("[Config]","Version"));    if (configVersion.isEmpty()) {#ifdef __APPLE__        qDebug() << "Config version is empty, trying to read pre-1.9.0 config";        // Try to read the config from the pre-1.9.0 final directory on OS X (we moved it in 1.9.0 final)        QScopedPointer<QFile> oldConfigFile(new QFile(QDir::homePath().append("/").append(".mixxx/mixxx.cfg")));        if (oldConfigFile->exists() && ! CmdlineArgs::Instance().getSettingsPathSet()) {            qDebug() << "Found pre-1.9.0 config for OS X";            // Note: We changed SETTINGS_PATH in 1.9.0 final on OS X so it must be hardcoded to ".mixxx" here for legacy.            config = UserSettingsPointer(new ConfigObject<ConfigValue>(                QDir::homePath().append("/.mixxx/mixxx.cfg")));            // Just to be sure all files like logs and soundconfig go with mixxx.cfg            // TODO(XXX) Trailing slash not needed anymore as we switches from String::append            // to QDir::filePath elsewhere in the code. This is candidate for removal.            CmdlineArgs::Instance().setSettingsPath(QDir::homePath().append("/.mixxx/"));            configVersion = config->getValueString(ConfigKey("[Config]","Version"));        }        else {#elif __WINDOWS__        qDebug() << "Config version is empty, trying to read pre-1.12.0 config";        // Try to read the config from the pre-1.12.0 final directory on Windows (we moved it in 1.12.0 final)        QScopedPointer<QFile> oldConfigFile(new QFile(QDir::homePath().append("/Local Settings/Application Data/Mixxx/mixxx.cfg")));        if (oldConfigFile->exists() && ! CmdlineArgs::Instance().getSettingsPathSet()) {            qDebug() << "Found pre-1.12.0 config for Windows";            // Note: We changed SETTINGS_PATH in 1.12.0 final on Windows so it must be hardcoded to "Local Settings/Application Data/Mixxx/" here for legacy.            config = UserSettingsPointer(new ConfigObject<ConfigValue>(                QDir::homePath().append("/Local Settings/Application Data/Mixxx/mixxx.cfg")));            // Just to be sure all files like logs and soundconfig go with mixxx.cfg
开发者ID:badescunicu,项目名称:mixxx,代码行数:67,


示例12: ConfigValue

void ReplayGainSettings::setReplayGainReanalyze(bool value) {    m_pConfig->set(ConfigKey(kConfigKey, kReplayGainReanalyze),                ConfigValue(value));}
开发者ID:DJMaxergy,项目名称:mixxx,代码行数:4,


示例13: ConfigValue

void DlgPrefRecord::slotChangeSplitSize() {        m_pConfig->set(ConfigKey(RECORDING_PREF_KEY, "FileSize"),                    ConfigValue(comboBoxSplitting->currentText()));}
开发者ID:MLudgate,项目名称:mixxx,代码行数:5,


示例14: ConfigValue

void DlgPrefReplayGain::slotSetRGAnalyserEnabled() {    int enabled = EnableAnalyser->isChecked() ? 1 : 0;    config->set(ConfigKey(kConfigKey,"ReplayGainAnalyserEnabled"),                ConfigValue(enabled));    slotApply();}
开发者ID:calabrhoouse,项目名称:mixxx,代码行数:6,


示例15: while

bool EngineShoutcast::serverConnect() {    // set to busy in case another thread calls one of the other    // EngineShoutcast calls    m_iShoutStatus = SHOUTERR_BUSY;    m_pShoutcastStatus->set(SHOUTCAST_CONNECTING);    // reset the number of failures to zero    m_iShoutFailures = 0;    // set to a high number to automatically update the metadata    // on the first change    m_iMetaDataLife = 31337;    // clear metadata, to make sure the first track is not skipped    // because it was sent via an previous connection (see metaDataHasChanged)    if(m_pMetaData) {        m_pMetaData.clear();    }    //If static metadata is available, we only need to send metadata one time    m_firstCall = false;    /*Check if m_encoder is initalized     * Encoder is initalized in updateFromPreferences which is called always before serverConnect()     * If m_encoder is NULL, then we propably want to use MP3 streaming, however, lame could not be found     * It does not make sense to connect     */    if(m_encoder == NULL){        m_pConfig->set(ConfigKey(SHOUTCAST_PREF_KEY,"enabled"),ConfigValue("0"));        m_pShoutcastStatus->set(SHOUTCAST_DISCONNECTED);        return false;    }    const int iMaxTries = 3;    while (!m_bQuit && m_iShoutFailures < iMaxTries) {        if (m_pShout)            shout_close(m_pShout);        m_iShoutStatus = shout_open(m_pShout);        if (m_iShoutStatus == SHOUTERR_SUCCESS)            m_iShoutStatus = SHOUTERR_CONNECTED;        if ((m_iShoutStatus == SHOUTERR_BUSY) ||            (m_iShoutStatus == SHOUTERR_CONNECTED) ||            (m_iShoutStatus == SHOUTERR_SUCCESS))            break;        m_iShoutFailures++;        qDebug() << "Shoutcast failed connect. Failures:" << m_iShoutFailures;        sleep(1);    }    if (m_iShoutFailures == iMaxTries) {        if (m_pShout)            shout_close(m_pShout);        m_pConfig->set(ConfigKey(SHOUTCAST_PREF_KEY,"enabled"),ConfigValue("0"));        m_pShoutcastStatus->set(SHOUTCAST_DISCONNECTED);        return false;    }    if (m_bQuit) {        if (m_pShout)            shout_close(m_pShout);        m_pShoutcastStatus->set(SHOUTCAST_DISCONNECTED);        return false;    }    m_iShoutFailures = 0;    int timeout = 0;    while (m_iShoutStatus == SHOUTERR_BUSY && timeout < TIMEOUT) {        qDebug() << "Connection pending. Sleeping...";        sleep(1);        m_iShoutStatus = shout_get_connected(m_pShout);        ++ timeout;    }    if (m_iShoutStatus == SHOUTERR_CONNECTED) {        qDebug() << "***********Connected to Shoutcast server...";        m_pShoutcastStatus->set(SHOUTCAST_CONNECTED);        return true;    }    //otherwise disable shoutcast in preferences    m_pConfig->set(ConfigKey(SHOUTCAST_PREF_KEY,"enabled"),ConfigValue("0"));    if(m_pShout){        shout_close(m_pShout);        //errorDialog(tr("Mixxx could not connect to the server"), tr("Please check your connection to the Internet and verify that your username and password are correct."));    }    m_pShoutcastStatus->set(SHOUTCAST_DISCONNECTED);    return false;}
开发者ID:troyane,项目名称:mixxx,代码行数:82,


示例16: qDebug

void CrateFeature::slotExportPlaylist() {    qDebug() << "Export crate" << m_lastRightClickedIndex.data();    QString lastCrateDirectory = m_pConfig->getValueString(            ConfigKey("[Library]", "LastImportExportCrateDirectory"),            QDesktopServices::storageLocation(QDesktopServices::MusicLocation));    QString file_location = QFileDialog::getSaveFileName(        NULL,        tr("Export Crate"),        lastCrateDirectory,        tr("M3U Playlist (*.m3u);;M3U8 Playlist (*.m3u8);;PLS Playlist (*.pls);;Text CSV (*.csv);;Readable Text (*.txt)"));    // Exit method if user cancelled the open dialog.    if (file_location.isNull() || file_location.isEmpty()) {        return;    }    // Update the import/export crate directory    QFileInfo fileName(file_location);    m_pConfig->set(ConfigKey("[Library]","LastImportExportCrateDirectory"),                ConfigValue(fileName.dir().absolutePath()));    // The user has picked a new directory via a file dialog. This means the    // system sandboxer (if we are sandboxed) has granted us permission to this    // folder. We don't need access to this file on a regular basis so we do not    // register a security bookmark.    // check config if relative paths are desired    bool useRelativePath = static_cast<bool>(        m_pConfig->getValueString(            ConfigKey("[Library]", "UseRelativePathOnExport")).toInt());    // Create list of files of the crate    QList<QString> playlist_items;    // Create a new table model since the main one might have an active search.    QScopedPointer<CrateTableModel> pCrateTableModel(        new CrateTableModel(this, m_pTrackCollection));    pCrateTableModel->setTableModel(m_crateTableModel.getCrate());    pCrateTableModel->select();    if (file_location.endsWith(".csv", Qt::CaseInsensitive)) {        ParserCsv::writeCSVFile(file_location, pCrateTableModel.data(), useRelativePath);    } else if (file_location.endsWith(".txt", Qt::CaseInsensitive)) {        ParserCsv::writeReadableTextFile(file_location, pCrateTableModel.data(), false);    } else{        // populate a list of files of the crate        QList<QString> playlist_items;        int rows = pCrateTableModel->rowCount();        for (int i = 0; i < rows; ++i) {            QModelIndex index = m_crateTableModel.index(i, 0);            playlist_items << m_crateTableModel.getTrackLocation(index);        }        if (file_location.endsWith(".pls", Qt::CaseInsensitive)) {            ParserPls::writePLSFile(file_location, playlist_items, useRelativePath);        } else if (file_location.endsWith(".m3u8", Qt::CaseInsensitive)) {            ParserM3u::writeM3U8File(file_location, playlist_items, useRelativePath);        } else {            //default export to M3U if file extension is missing            if(!file_location.endsWith(".m3u", Qt::CaseInsensitive))            {                qDebug() << "Crate export: No valid file extension specified. Appending .m3u "                         << "and exporting to M3U.";                file_location.append(".m3u");            }            ParserM3u::writeM3UFile(file_location, playlist_items, useRelativePath);        }    }}
开发者ID:jox58,项目名称:mixxx,代码行数:69,


示例17: DlgPreferencePage

DlgPrefRecord::DlgPrefRecord(QWidget* parent, UserSettingsPointer pConfig)        : DlgPreferencePage(parent),          m_pConfig(pConfig),          m_bConfirmOverwrite(false),          m_pRadioOgg(NULL),          m_pRadioMp3(NULL),          m_pRadioAiff(NULL),          m_pRadioFlac(NULL),          m_pRadioWav(NULL) {    setupUi(this);    // See RECORD_* #defines in defs_recording.h    m_pRecordControl = new ControlObjectSlave(            RECORDING_PREF_KEY, "status", this);    m_pRadioOgg = new QRadioButton("Ogg Vorbis");    m_pRadioMp3 = new QRadioButton(ENCODING_MP3);    // Setting recordings path.    QString recordingsPath = m_pConfig->getValueString(ConfigKey(RECORDING_PREF_KEY, "Directory"));    if (recordingsPath == "") {        // Initialize recordings path in config to old default path.        // Do it here so we show current value in UI correctly.        QString musicDir = QDesktopServices::storageLocation(QDesktopServices::MusicLocation);        QDir recordDir(musicDir + "/Mixxx/Recordings");        recordingsPath = recordDir.absolutePath();    }    LineEditRecordings->setText(recordingsPath);    connect(PushButtonBrowseRecordings, SIGNAL(clicked()),            this, SLOT(slotBrowseRecordingsDir()));    connect(LineEditRecordings, SIGNAL(returnPressed()),            this, SLOT(slotApply()));    connect(m_pRadioOgg, SIGNAL(clicked()),            this, SLOT(slotApply()));    connect(m_pRadioMp3, SIGNAL(clicked()),            this, SLOT(slotApply()));    horizontalLayout->addWidget(m_pRadioOgg);    horizontalLayout->addWidget(m_pRadioMp3);    // AIFF and WAVE are supported by default.    m_pRadioWav = new QRadioButton(ENCODING_WAVE);    connect(m_pRadioWav, SIGNAL(clicked()), this, SLOT(slotApply()));    horizontalLayout->addWidget(m_pRadioWav);    m_pRadioAiff = new QRadioButton(ENCODING_AIFF);    connect(m_pRadioAiff, SIGNAL(clicked()), this, SLOT(slotApply()));    horizontalLayout->addWidget(m_pRadioAiff);#ifdef SF_FORMAT_FLAC    m_pRadioFlac = new QRadioButton(ENCODING_FLAC);    connect(m_pRadioFlac, SIGNAL(clicked()), this, SLOT(slotApply()));    horizontalLayout->addWidget(m_pRadioFlac);#endif    // Read config and check radio button.    QString format = m_pConfig->getValueString(ConfigKey(RECORDING_PREF_KEY, "Encoding"));    if (format == ENCODING_WAVE) {        m_pRadioWav->setChecked(true);    } else if (format == ENCODING_OGG) {        m_pRadioOgg->setChecked(true);    } else if (format == ENCODING_MP3) {        m_pRadioMp3->setChecked(true);    } else if (format == ENCODING_AIFF) {        m_pRadioAiff->setChecked(true);#ifdef SF_FORMAT_FLAC    } else if (format == ENCODING_FLAC) {        m_pRadioFlac->setChecked(true);#endif    } else {        // Invalid, so set default and save.        // If no config was available, set to WAVE as default.        m_pRadioWav->setChecked(true);        m_pConfig->set(ConfigKey(RECORDING_PREF_KEY, "Encoding"), ConfigValue(ENCODING_WAVE));    }    loadMetaData();    connect(SliderQuality, SIGNAL(valueChanged(int)),            this, SLOT(slotSliderQuality()));    connect(SliderQuality, SIGNAL(sliderMoved(int)),            this, SLOT(slotSliderQuality()));    connect(SliderQuality, SIGNAL(sliderReleased()),            this, SLOT(slotSliderQuality()));    connect(CheckBoxRecordCueFile, SIGNAL(stateChanged(int)),            this, SLOT(slotEnableCueFile(int)));    connect(comboBoxSplitting, SIGNAL(activated(int)),            this, SLOT(slotChangeSplitSize()));    slotApply();    // Make sure a corrupt config file won't cause us to record constantly.    m_pRecordControl->set(RECORD_OFF);    comboBoxSplitting->addItem(SPLIT_650MB);    comboBoxSplitting->addItem(SPLIT_700MB);    comboBoxSplitting->addItem(SPLIT_1024MB);    comboBoxSplitting->addItem(SPLIT_2048MB);    comboBoxSplitting->addItem(SPLIT_4096MB);//.........这里部分代码省略.........
开发者ID:MLudgate,项目名称:mixxx,代码行数:101,


示例18: ConfigValue

void DlgPrefModplug::saveSettings() {    m_pConfig->set(ConfigKey(CONFIG_KEY,"PerTrackMemoryLimitMB"),                   ConfigValue(m_pUi->memoryLimit->value()));    m_pConfig->set(ConfigKey(CONFIG_KEY,"OversamplingEnabled"),                   ConfigValue(m_pUi->oversampling->isChecked()));    m_pConfig->set(ConfigKey(CONFIG_KEY,"NoiseReductionEnabled"),                   ConfigValue(m_pUi->noiseReduction->isChecked()));    m_pConfig->set(ConfigKey(CONFIG_KEY,"StereoSeparation"),                   ConfigValue(m_pUi->stereoSeparation->value()));    m_pConfig->set(ConfigKey(CONFIG_KEY,"MaxMixChannels"),                   ConfigValue(m_pUi->maxMixChannels->value()));    m_pConfig->set(ConfigKey(CONFIG_KEY,"ResamplingMode"),                   ConfigValue(m_pUi->resampleMode->currentIndex()));    m_pConfig->set(ConfigKey(CONFIG_KEY,"ReverbEnabled"),                   ConfigValue(m_pUi->reverb->isChecked()));    m_pConfig->set(ConfigKey(CONFIG_KEY,"ReverbLevel"),                   ConfigValue(m_pUi->reverbDepth->value()));    m_pConfig->set(ConfigKey(CONFIG_KEY,"ReverbDelay"),                   ConfigValue(m_pUi->reverbDelay->value()));    m_pConfig->set(ConfigKey(CONFIG_KEY,"MegabassEnabled"),                   ConfigValue(m_pUi->megabass->isChecked()));    m_pConfig->set(ConfigKey(CONFIG_KEY,"MegabassLevel"),                   ConfigValue(m_pUi->bassDepth->value()));    m_pConfig->set(ConfigKey(CONFIG_KEY,"MegabassCutoff"),                   ConfigValue(m_pUi->bassCutoff->value()));    m_pConfig->set(ConfigKey(CONFIG_KEY,"SurroundEnabled"),                   ConfigValue(m_pUi->surround->isChecked()));    m_pConfig->set(ConfigKey(CONFIG_KEY,"SurroundLevel"),                   ConfigValue(m_pUi->surroundDepth->value()));    m_pConfig->set(ConfigKey(CONFIG_KEY,"SurroundDelay"),                   ConfigValue(m_pUi->surroundDelay->value()));}
开发者ID:Adna1206,项目名称:mixxx,代码行数:32,


示例19: ConfigValue

void WaveformWidgetFactory::setOverviewNormalized(bool normalize) {    m_overviewNormalized = normalize;    if (m_config) {        m_config->set(ConfigKey("[Waveform]","OverviewNormalized"), ConfigValue(m_overviewNormalized));    }}
开发者ID:danlin,项目名称:mixxx,代码行数:6,


示例20: ConfigValue

BaseSyncableListener::~BaseSyncableListener() {    // We use the slider value because that is never set to 0.0.    m_pConfig->set(ConfigKey("[InternalClock]", "bpm"), ConfigValue(        m_pInternalClock->getBpm()));    delete m_pInternalClock;}
开发者ID:Adna1206,项目名称:mixxx,代码行数:6,


示例21: verticalScrollBar

void WLibraryTableView::saveVScrollBarPosState() {    //Save the vertical scrollbar position.    int scrollbarPosition = verticalScrollBar()->value();    m_pConfig->set(m_vScrollBarPosKey, ConfigValue(scrollbarPosition));}
开发者ID:Tomasito665,项目名称:mixxx,代码行数:5,



注:本文中的ConfigValue函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ Config_getBool函数代码示例
C++ ConfigSection函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。