diff options
author | Håkon Vågsether <haakonsv@gmail.com> | 2017-10-27 22:28:29 +0200 |
---|---|---|
committer | Marcus Müller <marcus@hostalia.de> | 2018-08-07 15:52:24 +0200 |
commit | 7898d61d01f35b369d8487a5d7540fe437ce6033 (patch) | |
tree | c46bba28133b428b92610a0d0ef2dda24316ce94 /grc/core/generator/flow_graph.py.mako | |
parent | f6a3249993652633648ce4a4b1b85324587390fe (diff) |
Completed switch from XML to YAML for hier blocks
Diffstat (limited to 'grc/core/generator/flow_graph.py.mako')
-rw-r--r-- | grc/core/generator/flow_graph.py.mako | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/grc/core/generator/flow_graph.py.mako b/grc/core/generator/flow_graph.py.mako index fe11bfcfaa..b68981867d 100644 --- a/grc/core/generator/flow_graph.py.mako +++ b/grc/core/generator/flow_graph.py.mako @@ -120,17 +120,16 @@ class ${class_name}(gr.hier_block2, Qt.QWidget): % else: class ${class_name}(gr.hier_block2): % endif -<%def name="make_io_sig(io_sigs)"> - <% size_strs = ['%s*%s'%(io_sig['size'], io_sig['vlen']) for io_sig in io_sigs] %> +<%def name="make_io_sig(io_sigs)">\ + <% size_strs = ['%s*%s'%(io_sig['size'], io_sig['vlen']) for io_sig in io_sigs] %>\ % if len(io_sigs) == 0: -gr.io_signature(0, 0, 0) +gr.io_signature(0, 0, 0)\ % elif len(io_sigs) == 1: -gr.io_signature(1, 1, ${size_strs[0]}) +gr.io_signature(1, 1, ${size_strs[0]})\ % else: -gr.io_signaturev(${len(io_sigs)}, ${len(io_sigs)}, [${', '.join(ize_strs)}]) +gr.io_signaturev(${len(io_sigs)}, ${len(io_sigs)}, [${', '.join(size_strs)}])\ % endif -</%def> - +</%def>\ def __init__(${param_str}): gr.hier_block2.__init__( self, "${ title }", @@ -188,7 +187,9 @@ gr.io_signaturev(${len(io_sigs)}, ${len(io_sigs)}, [${', '.join(ize_strs)}]) ${'##################################################'} % endif % for blk, blk_make in blocks: + % if blk_make: ${ indent(blk_make.strip('\n')) } + % endif ## % if 'alias' in blk.params and blk.params['alias'].get_evaluated(): ## (self.${blk.name}).set_block_alias("${blk.params['alias'].get_evaluated()}") ## % endif |