当前位置: 首页>>代码示例>>C++>>正文


C++ ConfigManager::AppSetting方法代码示例

本文整理汇总了C++中ConfigManager::AppSetting方法的典型用法代码示例。如果您正苦于以下问题:C++ ConfigManager::AppSetting方法的具体用法?C++ ConfigManager::AppSetting怎么用?C++ ConfigManager::AppSetting使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ConfigManager的用法示例。


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

示例1: SetAreaParaSetupUiData

bool VelParaSetupHandler::SetAreaParaSetupUiData(AreaPara &para)
{
    ConfigManager* conf = ConfigManager::GetInstance();

    if (!conf->UpdateMineZoon(para.mine_area))
    {
        return false;
    }

    if (!conf->UpdateSearchZoon(para.search_area))
    {
        return false;
    }

    if (!conf->UpdateAppSettingFile("cellDelta", QString().sprintf("%0.1f", para.grid_step)))
    {
        return false;
    }

    if (!conf->Save())
    {
        return false;
    }

    AppSettings &setting = conf->AppSetting();

    setting.set_mine_area(para.mine_area);
    setting.set_search_area(para.search_area);
    setting.set_cell_delta(para.grid_step);

    return true;
}
开发者ID:liye0005,项目名称:QT_POJ,代码行数:32,代码来源:velparasetuphandler.cpp

示例2: getCurrentMagnitude

void MagnitudeDIstributionChart::getCurrentMagnitude(QString magnitude)
{
   magselect_ = magnitude;
   ConfigManager *cf = ConfigManager::GetInstance();
   AppSettings& setting = cf->AppSetting();
   setting.set_fit_magnitude(magnitude.toFloat());
   MDataConfig::GetInstance()->set_fit_magnitude(magnitude.toFloat());
   cf->UpdateAppSettingFile("fit_magnitude",magnitude);
   getMagnitudeData();
}
开发者ID:liye0005,项目名称:QT_POJ,代码行数:10,代码来源:magnitudedistributionchart.cpp

示例3: setMagnitudeData

void MagnitudeDIstributionChart::setMagnitudeData()
{
    ConfigManager *cf = ConfigManager::GetInstance();
    AppSettings& setting = cf->AppSetting();
    magselect_ .sprintf("%.2f",setting.start_selected_magnitude());
    float mag,minmag;
    mag = minmag = -4.00;
    QStringList magslist;
    QString magstr;
    while (mag < magselect_.toFloat())
    {
        magstr.sprintf("%.2f",mag);
        magslist.push_back(magstr);
        mag += 0.50;
    }
    selectMag_->addItems(magslist);
    selectMag_->setCurrentIndex((int)(magselect_.toFloat() - minmag)/0.50);
}
开发者ID:liye0005,项目名称:QT_POJ,代码行数:18,代码来源:magnitudedistributionchart.cpp

示例4: SetModeSetupUiData

bool VelParaSetupHandler::SetModeSetupUiData(ModeSetupPara &info)
{
    ConfigManager *conf = ConfigManager::GetInstance();

    if (!conf->UpdateAppSettingFile("calculation_method", QString().sprintf("%d", info.calculate_method)))
    {
        return false;
    }

    if (!conf->UpdateAppSettingFile("mode", QString().sprintf("%d", info.mode)))
    {
        return false;
    }

    if (!conf->UpdateAppSettingFile("channel_filter", QString().sprintf("%d", info.channel_filter)))
    {
        return false;
    }

    if (!conf->UpdateAppSettingFile("accuracy", QString().sprintf("%0.1f", info.accuracy)))
    {
        return false;
    }

    if (!conf->UpdateAppSettingFile("z_join_calculate", QString().sprintf("%d", info.z_join_calculate? 1:0)))
    {
        return false;
    }

    if (!conf->Save())
    {
        return false;
    }

    AppSettings &setting = conf->AppSetting();
    setting.set_calculation_method(info.calculate_method);
    setting.set_mode(info.mode);
    setting.set_channel_filter(info.channel_filter);
    setting.set_accuracy(info.accuracy);
    setting.set_z_join_calculate(info.z_join_calculate);

    return true;
}
开发者ID:liye0005,项目名称:QT_POJ,代码行数:43,代码来源:velparasetuphandler.cpp

示例5: SetPSVelSetupUiData

bool VelParaSetupHandler::SetPSVelSetupUiData(PSVelSetupPara &para)
{
    ConfigManager *conf = ConfigManager::GetInstance();

    if (!conf->UpdateAppSettingFile("p_start", QString().sprintf("%0.1f", para.p_start)))
    {
        return false;
    }
    if (!conf->UpdateAppSettingFile("p_end", QString().sprintf("%0.1f", para.p_end)))
    {
        return false;
    }
    if (!conf->UpdateAppSettingFile("s_start", QString().sprintf("%0.1f", para.s_start)))
    {
        return false;
    }
    if (!conf->UpdateAppSettingFile("s_end", QString().sprintf("%0.1f", para.s_end)))
    {
        return false;
    }
    if (!conf->UpdateAppSettingFile("p_step", QString().sprintf("%0.1f", para.p_step)))
    {
        return false;
    }
    if (!conf->UpdateAppSettingFile("s_step", QString().sprintf("%0.1f", para.s_step)))
    {
        return false;
    }
    if (!conf->UpdateAppSettingFile("p_divide_by_s", QString().sprintf("%0.2f", para.p_divide_by_s)))
    {
        return false;
    }
    if (!conf->UpdateAppSettingFile("plus_per", QString().sprintf("%0.1f", para.plus_per)))
    {
        return false;
    }
    if (!conf->UpdateAppSettingFile("minus_per", QString().sprintf("%0.1f", para.minus_per)))
    {
        return false;
    }
    if (!conf->UpdateLayerModelInfo(para.layer_info))
    {
        return false;
    }

    if (!conf->Save())
    {
        return false;
    }

    AppSettings &setting = conf->AppSetting();
    setting.set_p_start(para.p_start);
    setting.set_p_end(para.p_end);
    setting.set_s_start(para.s_start);
    setting.set_s_end(para.s_end);
    setting.set_p_setp(para.p_step);
    setting.set_s_step(para.s_step);
    setting.set_p_divide_by_s(para.p_divide_by_s);
    setting.set_plus_per(para.plus_per);
    setting.set_minus_per(para.minus_per);
    setting.set_layer_info(para.layer_info);

    return true;
}
开发者ID:liye0005,项目名称:QT_POJ,代码行数:64,代码来源:velparasetuphandler.cpp


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