本文整理汇总了C++中qrrepo::RepoApi::property方法的典型用法代码示例。如果您正苦于以下问题:C++ RepoApi::property方法的具体用法?C++ RepoApi::property怎么用?C++ RepoApi::property使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类qrrepo::RepoApi
的用法示例。
在下文中一共展示了RepoApi::property方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BindingGenerator
VariableInitGenerator::VariableInitGenerator(qrRepo::RepoApi const &repo
, GeneratorCustomizer &customizer
, Id const &id
, QObject *parent)
: BindingGenerator(repo, customizer, id, "function.t"
, { Binding::createStaticConverting("@@[email protected]@"
, repo.property(id, "variable").toString() + "=" + repo.property(id, "value").toString()
, customizer.factory()->functionBlockConverter(id, "value")) }
, parent)
{
}
示例2: BindingGenerator
SayGenerator::SayGenerator(const qrRepo::RepoApi &repo
, generatorBase::GeneratorCustomizer &customizer
, const qReal::Id &id
, QObject *parent)
: BindingGenerator(repo, customizer, id
, "say.t"
, { repo.property(id, "Evaluate").toBool()
? Binding::createConverting("@@[email protected]@", "Text"
, customizer.factory()->stringPropertyConverter(id, "Text"))
: Binding::createStatic("@@[email protected]@", utils::StringUtils::wrap(repo.property(id, "Text").toString()))
} , parent)
{
}
示例3: BindingGenerator
SystemGenerator::SystemGenerator(const qrRepo::RepoApi &repo
, generatorBase::GeneratorCustomizer &customizer
, const qReal::Id &id
, QObject *parent)
: BindingGenerator(repo, customizer, id
, repo.property(id, "Code").toBool() ? "nativeCode.t" : "system.t"
, { repo.property(id, "Code").toBool()
? Binding::createStatic("@@[email protected]@"
, utils::StringUtils::dequote(repo.property(id, "Command").toString()))
: repo.property(id, "Evaluate").toBool()
? Binding::createConverting("@@[email protected]@", "Command"
, customizer.factory()->stringPropertyConverter(id, "Command"))
: Binding::createStatic("@@[email protected]@"
, utils::StringUtils::wrap(repo.property(id, "Command").toString()))
}
, parent)
{
}
示例4: BindingGenerator
InitCameraGenerator::InitCameraGenerator(const qrRepo::RepoApi &repo
, generatorBase::GeneratorCustomizer &customizer
, const qReal::Id &id
, QObject *parent)
: BindingGenerator(repo, customizer, id
, "videosensors/init" + repo.property(id, "Mode").toString() + "Sensor.t"
, {}
, parent)
{
}
示例5: BindingGenerator
PrintTextBlockGenerator::PrintTextBlockGenerator(const qrRepo::RepoApi &repo
, GeneratorCustomizer &customizer
, const Id &id
, QObject *parent)
: BindingGenerator(repo, customizer, id, "drawing/printText.t", {
Binding::createConverting("@@[email protected]@", "XCoordinateText"
, customizer.factory()->intPropertyConverter(id, "XCoordinateText"))
, Binding::createConverting("@@[email protected]@", "YCoordinateText"
, customizer.factory()->intPropertyConverter(id, "YCoordinateText"))
, (repo.property(id, "Evaluate").toBool()
? Binding::createConverting("@@[email protected]@", "PrintText"
, customizer.factory()->stringPropertyConverter(id, "PrintText"))
: Binding::createStatic("@@[email protected]@"
, utils::StringUtils::wrap(repo.stringProperty(id, "PrintText"))))
}, parent)
{
// Calling virtual readTemplate() before base class constructor will cause segfault.
addBinding(Binding::createStatic("@@[email protected]@", repo.property(id, "Redraw").toBool()
? readTemplate("drawing/redraw.t") : QString()));
}
示例6: BindingGenerator
InitCameraGenerator::InitCameraGenerator(const qrRepo::RepoApi &repo
, generatorBase::GeneratorCustomizer &customizer
, const qReal::Id &id
, QObject *parent)
: BindingGenerator(repo, customizer, id
, "videosensors/init" + repo.property(id, "Mode").toString() + "Sensor.t"
, { Binding::createConverting("@@[email protected]@"
, "DrawStream", customizer.factory()->boolPropertyConverter(id, "DrawStream", false))
}
, parent)
{
}
示例7: BindingGenerator
SetBackgroundGenerator::SetBackgroundGenerator(const qrRepo::RepoApi &repo
, generatorBase::GeneratorCustomizer &customizer
, const qReal::Id &id
, QObject *parent)
: BindingGenerator(repo, customizer, id
, "drawing/setBackground.t"
, { Binding::createConverting("@@[email protected]@", "Color"
, new BackgroundColorConverter(customizer.factory()->pathsToTemplates()))
}, parent)
{
// Calling virtual readTemplate() before base class constructor will cause segfault.
addBinding(Binding::createStatic("@@[email protected]@", repo.property(id, "Redraw").toBool()
? readTemplate("drawing/redraw.t") : QString()));
}
示例8: apply
void Binding::apply(const qrRepo::RepoApi &repo
, const Id &id, QString &data)
{
const QString property = mProperty.isEmpty()
? mValue
: mProperty == "name"
? repo.name(id)
: repo.property(id, mProperty).toString();
if (mConverter) {
data.replace(mLabel, mConverter->convert(property));
} else {
applyMulti(property, data);
}
}
示例9: BindingGenerator
TrikEnginesGenerator::TrikEnginesGenerator(qrRepo::RepoApi const &repo
, generatorBase::GeneratorCustomizer &customizer
, qReal::Id const &id
, QString const &engineType
, QObject *parent)
: BindingGenerator(repo, customizer, id
, engineType.contains("EnginesBackward") ? "engines/backward.t" : "engines/forward.t"
, { Binding::createMultiTarget("@@[email protected]@", "Ports"
, dynamic_cast<trik::TrikGeneratorFactory *>(customizer.factory())->enginesConverter())
, Binding::createConverting("@@[email protected]@", "Power", customizer.factory()->intPropertyConverter()) }
, parent)
{
// AngularServo is just another block for EnginesForward, since it is controlled the same way as radial servo
// or power motor.
mCustomizer.factory()->engines()->registerUsageOnPorts(repo.property(id, "Ports").toString());
}
示例10: BindingGenerator
PrintTextBlockGenerator::PrintTextBlockGenerator(const qrRepo::RepoApi &repo
, GeneratorCustomizer &customizer
, const Id &id
, QObject *parent)
: BindingGenerator(repo, customizer, id, "drawing/printText.t", QList<Binding *>()
<< Binding::createConverting("@@[email protected]@", "XCoordinateText"
, customizer.factory()->intPropertyConverter(id, "XCoordinateText"))
<< Binding::createConverting("@@[email protected]@", "YCoordinateText"
, customizer.factory()->intPropertyConverter(id, "YCoordinateText"))
<< (repo.property(id, "Evaluate").toBool()
? Binding::createConverting("@@[email protected]@", "PrintText"
, customizer.factory()->stringPropertyConverter(id, "PrintText"))
: Binding::createStatic("@@[email protected]@"
, utils::StringUtils::wrap(repo.stringProperty(id, "PrintText"))))
, parent)
{
}
示例11: BindingGenerator
EnginesGenerator::EnginesGenerator(qrRepo::RepoApi const &repo
, GeneratorCustomizer &customizer
, Id const &id
, QString const &engineType
, QObject *parent)
: BindingGenerator(repo, customizer, id
, engineType.contains("EnginesBackward")
? "engines/enginesBackward.t"
: "engines/enginesForward.t"
, QList<Binding *>()
<< Binding::createMultiTarget("@@[email protected]@", "Ports", customizer.factory()->enginesConverter())
<< Binding::createConverting("@@[email protected]@", "Power", customizer.factory()->intPropertyConverter())
<< Binding::createConverting("@@[email protected]@", "Mode", customizer.factory()->breakModeConverter())
, parent)
{
mCustomizer.factory()->engines()->registerUsageOnPorts(repo.property(id, "Ports").toString());
}
示例12: validateRootNode
QString QrsMetamodelLoader::validateRootNode(const qrRepo::RepoApi &repo, const Id &diagram)
{
if (!repo.hasProperty(diagram, "nodeName")) {
return QString();
}
const QString rootNode = repo.property(diagram, "nodeName").toString();
for (const Id &child : repo.children(diagram)) {
if (repo.name(child) == rootNode && (child.type() == metamodelNodeType || child.type() == metamodelGroupType)) {
return rootNode;
}
}
emit errorOccured(QObject::tr("Root node for diagram %1 (which is %2) does not exist!")
.arg(repo.name(diagram)).arg(rootNode), diagram);
return rootNode;
}
示例13: BindingGenerator
DrawPixelGenerator::DrawPixelGenerator(const qrRepo::RepoApi &repo
, generatorBase::GeneratorCustomizer &customizer
, const qReal::Id &id
, QObject *parent)
: BindingGenerator(repo, customizer, id, "drawing/drawPixel.t"
, {
Binding::createConverting("@@[email protected]@", "XCoordinatePix"
, customizer.factory()->intPropertyConverter(id, "XCoordinatePix"))
, Binding::createConverting("@@[email protected]@", "YCoordinatePix"
, customizer.factory()->intPropertyConverter(id, "YCoordinatePix"))
}
, parent)
{
// Calling virtual readTemplate() before base class constructor will cause segfault.
addBinding(Binding::createStatic("@@[email protected]@", repo.property(id, "Redraw").toBool()
? readTemplate("drawing/redraw.t") : QString()));
}
示例14: BindingGenerator
DrawRectGenerator::DrawRectGenerator(const qrRepo::RepoApi &repo
, generatorBase::GeneratorCustomizer &customizer
, const qReal::Id &id
, QObject *parent)
: BindingGenerator(repo, customizer, id, (repo.stringProperty(id, "Filled") == "true")
? "drawing/drawFilledRect.t"
: "drawing/drawRect.t"
, {
Binding::createConverting("@@[email protected]@", "XCoordinateRect"
, customizer.factory()->intPropertyConverter(id, "XCoordinateRect"))
, Binding::createConverting("@@[email protected]@", "YCoordinateRect"
, customizer.factory()->intPropertyConverter(id, "YCoordinateRect"))
, Binding::createConverting("@@[email protected]@", "WidthRect"
, customizer.factory()->intPropertyConverter(id, "WidthRect"))
, Binding::createConverting("@@[email protected]@", "HeightRect"
, customizer.factory()->intPropertyConverter(id, "HeightRect"))
}
, parent)
{
addBinding(Binding::createStatic("@@[email protected]@", repo.property(id, "Redraw").toBool()
? readTemplate("drawing/redraw.t") : QString()));
}