Commit 411eb6a8 authored by Flavio TARSETTI's avatar Flavio TARSETTI

[widgets][toolchaineditor] toolchain visualization

parent e882c331
......@@ -50,7 +50,6 @@ from ..utils import check_prefix_dataformats
from ..widgets.mainwindow import MainWindow
from ..widgets.assetwidget import AssetWidget
from ..widgets.toolchaineditor import SimpleToolchainPreview
from ..backend.asset import AssetType
from ..backend.asset import Asset
......@@ -203,36 +202,3 @@ def refresh_env(ctx, type_):
if os.path.exists(environments_file_path):
os.remove(environments_file_path)
ctx.invoke(environments.list, type_=type_, output=environments_file_path)
@editor.group(cls=AliasedGroup)
@click.pass_context
def toolchain(ctx):
"""Toolchain specific commands"""
pass
SHOW_TOOLCHAIN_EPILOG = """\b
Example:
$ beat editor toolchain show user/my_toolchain/1
"""
@toolchain.command(epilog=EDIT_EPILOG)
@click.argument("asset_name")
@click.pass_context
@refresh_environment_cache_flag
@raise_on_error
def show(ctx, asset_name):
"""Edit one specific asset"""
app = QApplication(sys.argv)
asset = Asset(ctx.meta["config"].path, AssetType.TOOLCHAIN, asset_name)
preview = SimpleToolchainPreview()
preview.load(asset.declaration)
preview.show()
return app.exec_()
......@@ -33,10 +33,8 @@ class DrawingSpace(QGraphicsScene):
"""Playground scene for block objects"""
# def __init__(self, parent=None):
def __init__(self, configuration):
# super(DrawingSpace, self).__init__(parent)
super().__init__()
self.grid_size = configuration["grid_size"]
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment