本文整理汇总了C++中ConfigManager::AppSetting方法的典型用法代码示例。如果您正苦于以下问题:C++ ConfigManager::AppSetting方法的具体用法?C++ ConfigManager::AppSetting怎么用?C++ ConfigManager::AppSetting使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConfigManager
的用法示例。
在下文中一共展示了ConfigManager::AppSetting方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetAreaParaSetupUiData
bool VelParaSetupHandler::SetAreaParaSetupUiData(AreaPara ¶)
{
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;
}
示例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();
}
示例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);
}
示例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;
}
示例5: SetPSVelSetupUiData
bool VelParaSetupHandler::SetPSVelSetupUiData(PSVelSetupPara ¶)
{
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;
}