MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / getUserPreferred

Method getUserPreferred

src/Base/QuantityPyImp.cpp:159–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159PyObject* QuantityPy::getUserPreferred(PyObject* /*args*/) const
160{
161 std::string uus;
162 double factor {};
163 Py::Tuple res(3);
164
165 auto uss = getQuantityPtr()->getUserString(factor, uus);
166
167 res[0] = Py::String(uss, "utf-8");
168 res[1] = Py::Float(factor);
169 res[2] = Py::String(uus, "utf-8");
170
171 return Py::new_reference_to(res);
172}
173
174PyObject* QuantityPy::getValueAs(PyObject* args) const
175{

Callers 15

unitFunction · 0.80
format_DMethod · 0.80
circularHoleExecuteMethod · 0.80
initPageMethod · 0.80
setFieldsMethod · 0.80
setLengthFieldMethod · 0.80
__init__Method · 0.80
updateToolControllerMethod · 0.80
toolControllerChangedMethod · 0.80
displayStringMethod · 0.80
displayStringMethod · 0.80
setupUiMethod · 0.80

Calls 3

new_reference_toFunction · 0.85
StringClass · 0.70
getUserStringMethod · 0.45

Tested by 2

unitFunction · 0.64
format_DMethod · 0.64