Class: Syskit::GUI::ModelViews::Component
- Inherits:
-
ComponentNetworkBaseView
- Object
- Qt::Object
- ComponentNetworkBaseView
- Syskit::GUI::ModelViews::Component
- Defined in:
- lib/syskit/gui/model_views/component.rb
Overview
Visualization of a single component model. It is used to visualize the taks contexts and data services
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
-
#interface_options ⇒ Object
readonly
Options for the display of the interface.
Attributes inherited from ComponentNetworkBaseView
Instance Method Summary collapse
-
#initialize(page) ⇒ Component
constructor
A new instance of Component.
- #render(model, doc: true, **push_options) ⇒ 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) ⇒ Component
Returns a new instance of Component
10 11 12 13 14 15 16 17 |
# File 'lib/syskit/gui/model_views/component.rb', line 10 def initialize(page) super @interface_options = Hash[ mode: 'dataflow', title: 'Interface', annotations: ['task_info', 'port_details'].to_set, zoom: 1] end |
Instance Attribute Details
#interface_options ⇒ Object (readonly)
Options for the display of the interface
8 9 10 |
# File 'lib/syskit/gui/model_views/component.rb', line 8 def @interface_options end |
Instance Method Details
#render(model, doc: true, **push_options) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/syskit/gui/model_views/component.rb', line 25 def render(model, doc: true, **) if doc render_doc(model) end super task = instanciate_model(model) @plan = task.plan push_plan('interface', task.plan, ) render_data_services(task) end |
#render_doc(model) ⇒ Object
19 20 21 22 23 |
# File 'lib/syskit/gui/model_views/component.rb', line 19 def render_doc(model) if model.doc page.push nil, page.main_doc(model.doc) end end |