Skip to content

Commit 400a390

Browse files
authored
Merge pull request #423 from anastasiia-kornilova/400_function_remane
Function block was changed to expression (+icon)
2 parents 1154c90 + 0e7f069 commit 400a390

File tree

5 files changed

+1108
-371
lines changed

5 files changed

+1108
-371
lines changed

plugins/robots/editor/common/generated/elements.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@
376376
: NodeElementType(metamodel)
377377
{
378378
setName("Function");
379-
setFriendlyName(QObject::tr("Function"));
379+
setFriendlyName(QObject::tr("Expression"));
380380
setDiagram("RobotsDiagram");
381381
setDescription(QObject::tr("Evaluates a value of the given expression. Also new variables can be defined in this block. See the 'Expressions Syntax' chapter in help for more information about 'Function' block syntax."));
382382
qReal::LabelProperties label_1(1, 0.6, 1.2, "Body", false, 0);
@@ -385,7 +385,7 @@
385385
label_1.setScalingY(false);
386386
label_1.setHard(false);
387387
label_1.setPlainTextMode(false);
388-
label_1.setPrefix(QObject::tr("Body:"));
388+
label_1.setPrefix(QObject::tr("Expression:"));
389389
addLabel(label_1);
390390
loadSdf(utils::xmlUtils::loadDocument(":/generated/shapes/FunctionClass.sdf").documentElement());
391391
setSize(QSizeF(50, 50));
@@ -410,7 +410,7 @@
410410

411411
void initProperties()
412412
{
413-
addProperty("Body", "string", QObject::tr(""), QObject::tr("Body"), QObject::tr(""), false);
413+
addProperty("Body", "string", QObject::tr(""), QObject::tr("Expression"), QObject::tr(""), false);
414414
}
415415
};
416416

plugins/robots/editor/common/robotsMetamodel.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<role arrowType="no_arrow" name="NoArrowRole">
4949
<properties/>
5050
</role>
51-
<role arrowType="open_arrow" name="OpenArrowRole">
51+
<role arrowType="open_arrow" name="OpenArrowRole">
5252
<properties/>
5353
</role>
5454
</nonGraphicTypes>
@@ -457,20 +457,20 @@
457457
</generalizations>
458458
</logic>
459459
</node>
460-
<node displayedName="Function" name="Function" path="58, 12 : 58, 172 : | 58, 12 : 148, 12 : | 12, 96 : 108, 96 : " description="Evaluates a value of the given expression. Also new variables can be defined in this block. See the 'Expressions Syntax' chapter in help for more information about 'Function' block syntax.">
460+
<node displayedName="Expression" name="Function" path="58, 12 : 58, 172 : | 58, 12 : 148, 12 : | 12, 96 : 108, 96 : " description="Evaluates a value of the given expression. Also new variables can be defined in this block. See the 'Expressions Syntax' chapter in help for more information about 'Function' block syntax.">
461461
<graphics>
462462
<picture sizex="50" sizey="50">
463463
<image y1="0" name="images/functionBlock.png" x1="0" y2="50" x2="50"/>
464464
</picture>
465465
<labels>
466-
<label x="30" y="60" textBinded="Body" background="white" prefix="Body:"/>
466+
<label x="30" y="60" textBinded="Body" background="white" prefix="Expression:"/>
467467
</labels>
468468
<nonResizeable/>
469469
</graphics>
470470
<logic>
471471
<container/>
472472
<properties>
473-
<property displayedName="Body" type="string" name="Body"/>
473+
<property displayedName="Expression" type="string" name="Body"/>
474474
</properties>
475475
<generalizations>
476476
<parent parentName="AbstractNode"/>

0 commit comments

Comments
 (0)