Class: Syskit::GUI::ModelViews::TaskContextBase
- Inherits:
-
Component
- Object
- Qt::Object
- ComponentNetworkBaseView
- Component
- Syskit::GUI::ModelViews::TaskContextBase
- Defined in:
- lib/syskit/gui/model_views/task_context_base.rb
Direct Known Subclasses
Constant Summary
Constants inherited from ComponentNetworkBaseView
ComponentNetworkBaseView::Button, ComponentNetworkBaseView::DATA_SERVICE_WITHOUT_NAMES_TEMPLATE, ComponentNetworkBaseView::DATA_SERVICE_WITH_NAMES_TEMPLATE
Instance Attribute Summary collapse
-
#orogen_rendering ⇒ Object
readonly
Returns the value of attribute orogen_rendering.
-
#task_model_view ⇒ Object
readonly
Returns the value of attribute task_model_view.
Attributes inherited from Component
Attributes inherited from ComponentNetworkBaseView
Instance Method Summary collapse
-
#initialize(page) ⇒ TaskContextBase
constructor
A new instance of TaskContextBase.
- #render(model, external_objects: false) ⇒ Object
- #render_doc(model) ⇒ Object
Methods inherited from ComponentNetworkBaseView
#buttonClicked, #clear, common_graph_buttons, #compute_system_network, #disable, #enable, find_definition_place, graph_annotation_buttons, html_defined_in, #instanciate_model, #list_services, make_annotation_buttons, #push_plan, #render_data_services, #render_require_section, #save_svg, task_annotation_buttons
Constructor Details
#initialize(page) ⇒ TaskContextBase
Returns a new instance of TaskContextBase
7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/syskit/gui/model_views/task_context_base.rb', line 7 def initialize(page) super(page) @task_model_view = Roby::GUI::ModelViews::Task.new(page) @orogen_rendering = OroGen::HTML::TaskContext.new(page) = Array.new .concat(self.class.('interface')) all_annotations = Syskit::Graphviz.available_task_annotations.sort .concat(self.class.('interface', all_annotations, all_annotations)) Syskit::Graphviz.available_task_annotations.sort.each do |ann_name| [:annotations] << ann_name end [:buttons] = end |
Instance Attribute Details
#orogen_rendering ⇒ Object (readonly)
Returns the value of attribute orogen_rendering
4 5 6 |
# File 'lib/syskit/gui/model_views/task_context_base.rb', line 4 def orogen_rendering @orogen_rendering end |
#task_model_view ⇒ Object (readonly)
Returns the value of attribute task_model_view
5 6 7 |
# File 'lib/syskit/gui/model_views/task_context_base.rb', line 5 def task_model_view @task_model_view end |
Instance Method Details
#render(model, external_objects: false) ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/syskit/gui/model_views/task_context_base.rb', line 29 def render(model, external_objects: false) super page.push("oroGen Model", "<p><b>oroGen name:</b> #{model.orogen_model.name}</p>") orogen_rendering.render(model.orogen_model, external_objects: external_objects, doc: false) task_model_view.render(model, external_objects: external_objects) end |
#render_doc(model) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/syskit/gui/model_views/task_context_base.rb', line 22 def render_doc(model) doc = [model.doc, model.orogen_model.doc].compact.join("\n\n").strip if !doc.empty? page.push nil, page.main_doc(doc) end end |