本文整理汇总了C++中base::Reference::GetFloat方法的典型用法代码示例。如果您正苦于以下问题:C++ Reference::GetFloat方法的具体用法?C++ Reference::GetFloat怎么用?C++ Reference::GetFloat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类base::Reference
的用法示例。
在下文中一共展示了Reference::GetFloat方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getPrefFontSize
double QGIView::getPrefFontSize()
{
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter().
GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Labels");
double fontSize = hGrp->GetFloat("LabelSize", 3.5);
return Rez::guiX(fontSize);
}
示例2:
ViewProviderDimension::ViewProviderDimension()
{
sPixmap = "TechDraw_Dimension";
static const char *group = "Dim Format";
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Labels");
std::string fontName = hGrp->GetASCII("LabelFont", "osifont");
hGrp = App::GetApplication().GetUserParameter()
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Dimensions");
double fontSize = hGrp->GetFloat("FontSize", 3.5);
ADD_PROPERTY_TYPE(Font ,(fontName.c_str()),group,App::Prop_None, "The name of the font to use");
ADD_PROPERTY_TYPE(Fontsize,(fontSize) ,group,(App::PropertyType)(App::Prop_None),"Dimension text size in units");
hGrp = App::GetApplication().GetUserParameter().GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Decorations");
std::string lgName = hGrp->GetASCII("LineGroup","FC 0.70mm");
auto lg = TechDraw::LineGroup::lineGroupFactory(lgName);
double weight = lg->getWeight("Thin");
delete lg; //Coverity CID 174670
ADD_PROPERTY_TYPE(LineWidth,(weight) ,group,(App::PropertyType)(App::Prop_None),"Dimension line weight");
hGrp = App::GetApplication().GetUserParameter()
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Dimensions");
App::Color fcColor;
fcColor.setPackedValue(hGrp->GetUnsigned("Color", 0x00000000));
ADD_PROPERTY_TYPE(Color,(fcColor),group,App::Prop_None,"The color of the Dimension");
}
示例3: getFloat
Py::Object ParameterGrpPy::getFloat(const Py::Tuple& args)
{
char *pstr;
double Float=0.0;
if (!PyArg_ParseTuple(args.ptr(), "s|d", &pstr,&Float))
throw Py::Exception();
return Py::Float(_cParamGrp->GetFloat(pstr,Float));
}
示例4: Py_BuildValue
PyObject *ParameterGrpPy::PyGetFloat(PyObject *args)
{
char *pstr;
double Float=0.0;
if (!PyArg_ParseTuple(args, "s|d", &pstr,&Float)) // convert args: Python->C
return NULL; // NULL triggers exception
PY_TRY {
return Py_BuildValue("d",_cParamGrp->GetFloat(pstr,Float));
}PY_CATCH;
}