-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add markerUp and markerDown generation on TRIK model (#861)
* Add markerUp and markerDown generation on TRIK model * Updare copyrights Co-Authored-By: iakov <iakov@users.noreply.github.com> Co-authored-by: iakov <iakov@users.noreply.github.com>
- Loading branch information
1 parent
d9f6fd7
commit e6adfc5
Showing
13 changed files
with
153 additions
and
4 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
...ins/robots/generators/trik/trikGeneratorBase/src/simpleGenerators/markerDownGenerator.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* Copyright 2020, CyberTech Labs Ltd. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. */ | ||
|
||
#include "markerDownGenerator.h" | ||
|
||
#include <generatorBase/generatorCustomizer.h> | ||
#include "src/converters/backgroundColorConverter.h" | ||
|
||
using namespace trik::simple; | ||
using namespace trik::converters; | ||
using namespace generatorBase::simple; | ||
|
||
MarkerDownGenerator::MarkerDownGenerator(const qrRepo::RepoApi &repo | ||
, generatorBase::GeneratorCustomizer &customizer | ||
, const qReal::Id &id | ||
, QObject *parent) | ||
: BindingGenerator(repo, customizer, id | ||
, "markerDown.t" | ||
, { Binding::createConverting("@@COLOR@@", "Color" | ||
, new BackgroundColorConverter(customizer.factory()->pathsToTemplates())) | ||
// , customizer.factory()->stringPropertyConverter(id, "Color")) | ||
}, parent) | ||
{ | ||
} |
33 changes: 33 additions & 0 deletions
33
plugins/robots/generators/trik/trikGeneratorBase/src/simpleGenerators/markerDownGenerator.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* Copyright 2020, CyberTech Labs Ltd. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. */ | ||
|
||
#pragma once | ||
|
||
#include <generatorBase/simpleGenerators/bindingGenerator.h> | ||
|
||
namespace trik { | ||
namespace simple { | ||
|
||
/// Generator for 'SetBackground' block. | ||
class MarkerDownGenerator : public generatorBase::simple::BindingGenerator | ||
{ | ||
public: | ||
MarkerDownGenerator(const qrRepo::RepoApi &repo | ||
, generatorBase::GeneratorCustomizer &customizer | ||
, const qReal::Id &id | ||
, QObject *parent); | ||
}; | ||
|
||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
plugins/robots/generators/trik/trikGeneratorBase/src/simpleGenerators/markerUpGenerator.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* Copyright 2020, CyberTech Labs Ltd. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. */ | ||
|
||
#include "markerUpGenerator.h" | ||
|
||
#include <generatorBase/generatorCustomizer.h> | ||
#include "src/converters/backgroundColorConverter.h" | ||
|
||
using namespace trik::simple; | ||
using namespace trik::converters; | ||
using namespace generatorBase::simple; | ||
|
||
MarkerUpGenerator::MarkerUpGenerator(const qrRepo::RepoApi &repo | ||
, generatorBase::GeneratorCustomizer &customizer | ||
, const qReal::Id &id | ||
, QObject *parent) | ||
: BindingGenerator(repo, customizer, id, "markerUp.t", QList<Binding *>(), parent) | ||
{ | ||
} |
33 changes: 33 additions & 0 deletions
33
plugins/robots/generators/trik/trikGeneratorBase/src/simpleGenerators/markerUpGenerator.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* Copyright 2020, CyberTech Labs Ltd. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. */ | ||
|
||
#pragma once | ||
|
||
#include <generatorBase/simpleGenerators/bindingGenerator.h> | ||
|
||
namespace trik { | ||
namespace simple { | ||
|
||
/// Generator for 'SetBackground' block. | ||
class MarkerUpGenerator : public generatorBase::simple::BindingGenerator | ||
{ | ||
public: | ||
MarkerUpGenerator(const qrRepo::RepoApi &repo | ||
, generatorBase::GeneratorCustomizer &customizer | ||
, const qReal::Id &id | ||
, QObject *parent); | ||
}; | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
plugins/robots/generators/trik/trikPythonGeneratorLibrary/templates/markerDown.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
brick.marker().down("@@COLOR@@") |
1 change: 1 addition & 0 deletions
1
plugins/robots/generators/trik/trikPythonGeneratorLibrary/templates/markerUp.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
brick.marker().up() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
plugins/robots/generators/trik/trikQtsGeneratorLibrary/templates/markerDown.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
brick.marker().down("@@COLOR@@"); |
1 change: 1 addition & 0 deletions
1
plugins/robots/generators/trik/trikQtsGeneratorLibrary/templates/markerUp.t
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
brick.marker().up(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters