本文整理汇总了C++中base::Reference::GetUnsigned方法的典型用法代码示例。如果您正苦于以下问题:C++ Reference::GetUnsigned方法的具体用法?C++ Reference::GetUnsigned怎么用?C++ Reference::GetUnsigned使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类base::Reference
的用法示例。
在下文中一共展示了Reference::GetUnsigned方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getUnsigned
Py::Object ParameterGrpPy::getUnsigned(const Py::Tuple& args)
{
char *pstr;
unsigned int UInt=0;
if (!PyArg_ParseTuple(args.ptr(), "s|I", &pstr,&UInt))
throw Py::Exception();
#if PY_MAJOR_VERSION < 3
PyObject* val = Py_BuildValue("I",_cParamGrp->GetUnsigned(pstr,UInt));
return Py::Int(val);
#else
return Py::Long(_cParamGrp->GetUnsigned(pstr,UInt));
#endif
}
示例2: getSelectColor
QColor QGCustomText::getSelectColor()
{
Base::Reference<ParameterGrp> hGrp = getParmGroup();
App::Color fcColor;
fcColor.setPackedValue(hGrp->GetUnsigned("SelectColor", 0x00FF0000));
return fcColor.asValue<QColor>();
}
示例3: getCenterColor
QColor QGICenterLine::getCenterColor()
{
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Decorations");
App::Color fcColor = App::Color((uint32_t) hGrp->GetUnsigned("CenterColor", 0x00000000));
return fcColor.asValue<QColor>();
}
示例4: pcOpenEdge
ViewProviderMeshNode::ViewProviderMeshNode() : pcOpenEdge(0), m_bEdit(false)
{
ADD_PROPERTY(LineWidth,(2.0f));
LineWidth.setConstraints(&floatRange);
ADD_PROPERTY(PointSize,(2.0f));
PointSize.setConstraints(&floatRange);
ADD_PROPERTY(OpenEdges,(false));
pOpenColor = new SoBaseColor();
setOpenEdgeColorFrom(ShapeColor.getValue());
pOpenColor->ref();
pcLineStyle = new SoDrawStyle();
pcLineStyle->ref();
pcLineStyle->style = SoDrawStyle::LINES;
pcLineStyle->lineWidth = LineWidth.getValue();
pcPointStyle = new SoDrawStyle();
pcPointStyle->ref();
pcPointStyle->style = SoDrawStyle::POINTS;
pcPointStyle->pointSize = PointSize.getValue();
// read the correct shape color from the preferences
Base::Reference<ParameterGrp> hGrp = Gui::WindowParameter::getDefaultParameter()->GetGroup("Mod/Mesh");
App::Color color = ShapeColor.getValue();
unsigned long current = color.getPackedValue();
unsigned long setting = hGrp->GetUnsigned("MeshColor", current);
if ( current != setting )
{
color.setPackedValue((uint32_t)setting);
ShapeColor.setValue(color);
}
}
示例5:
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");
}
示例6: getBackgroundColor
QColor QGVPage::getBackgroundColor()
{
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Colors");
App::Color fcColor;
fcColor.setPackedValue(hGrp->GetUnsigned("Background", 0x70707000));
return fcColor.asValue<QColor>();
}
示例7: getSelectColor
QColor QGIView::getSelectColor()
{
Base::Reference<ParameterGrp> hGrp = getParmGroupCol();
App::Color fcColor;
fcColor.setPackedValue(hGrp->GetUnsigned("SelectColor", 0x00FF0000));
m_colSel = fcColor.asValue<QColor>();
return m_colSel;
}
示例8: Py_BuildValue
PyObject *ParameterGrpPy::PyGetUnsigned(PyObject *args)
{
char *pstr;
unsigned long UInt=0;
if (!PyArg_ParseTuple(args, "s|I", &pstr,&UInt)) // convert args: Python->C
return NULL; // NULL triggers exception
PY_TRY {
return Py_BuildValue("I",_cParamGrp->GetUnsigned(pstr,UInt));
}PY_CATCH;
}
示例9: getParameters
void DrawViewSection::getParameters()
{
Base::Reference<ParameterGrp> hGrp = App::GetApplication().GetUserParameter()
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw/Colors");
App::Color cutColor = App::Color((uint32_t) hGrp->GetUnsigned("CutSurfaceColor", 0xC8C8C800));
CutSurfaceColor.setValue(cutColor);
App::Color hatchColor = App::Color((uint32_t) hGrp->GetUnsigned("SectionHatchColor", 0x00000000));
HatchColor.setValue(hatchColor);
hGrp = App::GetApplication().GetUserParameter()
.GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("Mod/TechDraw");
std::string defaultDir = App::Application::getResourceDir() + "Mod/Drawing/patterns/";
std::string defaultFileName = defaultDir + "simple.svg";
QString patternFileName = QString::fromStdString(hGrp->GetASCII("PatternFile",defaultFileName.c_str()));
if (patternFileName.isEmpty()) {
patternFileName = QString::fromStdString(defaultFileName);
}
QFileInfo tfi(patternFileName);
if (tfi.isReadable()) {
HatchPattern.setValue(patternFileName.toUtf8().constData());
}
}
示例10: getNormalColor
QColor QGCustomText::getNormalColor()
{
QColor result;
QGIView *parent;
QGraphicsItem* qparent = parentItem();
if (qparent == nullptr) {
parent = nullptr;
} else {
parent = dynamic_cast<QGIView *> (qparent);
}
if (parent != nullptr) {
result = parent->getNormalColor();
} else {
Base::Reference<ParameterGrp> hGrp = getParmGroup();
App::Color fcColor;
fcColor.setPackedValue(hGrp->GetUnsigned("NormalColor", 0x00000000));
result = fcColor.asValue<QColor>();
}
return result;
}