Class: Roby::GUI::RelationsView
- Defined in:
- lib/roby/gui/relations_view.rb
Overview
Plan display that shows a snapshot of the event/task structure, as well as the events emitted within the last cycle
Instance Attribute Summary collapse
-
#history_widget ⇒ Object
readonly
Returns the value of attribute history_widget.
-
#scheduler_view ⇒ Object
readonly
Returns the value of attribute scheduler_view.
-
#ui ⇒ Object
readonly
Returns the value of attribute ui.
-
#view ⇒ Object
readonly
Returns the value of attribute view.
Instance Method Summary collapse
- #apply_options(options) ⇒ Object
-
#initialize(history_widget, parent = nil) ⇒ RelationsView
constructor
In remote connections, this is he period between checking if there is data on the socket, in seconds.
- #save_options ⇒ Object
- #setDisplayTime(time) ⇒ Object
- #update_display_time(time) ⇒ Object
- #update_time_range(start_time, current_time) ⇒ Object
-
#updateWindowTitle ⇒ Object
Slot used to make the widget update its title when e.g.
Constructor Details
#initialize(history_widget, parent = nil) ⇒ RelationsView
In remote connections, this is he period between checking if there is data on the socket, in seconds
See #connect
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/roby/gui/relations_view.rb', line 22 def initialize(, parent = nil) super(parent) @ui = Ui::RelationsView.new ui.setupUi(self) @scheduler_view = SchedulerView.new(ui.scheduler_view_holder) @scheduler_view_layout = Qt::VBoxLayout.new(ui.scheduler_view_holder) @scheduler_view_layout. scheduler_view scheduler_view.show @history_widget = @view = RelationsCanvas.new([.current_plan]) ui.setupActions(self) ui.graphics.scene = view.scene resize 500, 500 end |
Instance Attribute Details
#history_widget ⇒ Object (readonly)
Returns the value of attribute history_widget.
16 17 18 |
# File 'lib/roby/gui/relations_view.rb', line 16 def @history_widget end |
#scheduler_view ⇒ Object (readonly)
Returns the value of attribute scheduler_view.
16 17 18 |
# File 'lib/roby/gui/relations_view.rb', line 16 def scheduler_view @scheduler_view end |
#ui ⇒ Object (readonly)
Returns the value of attribute ui.
16 17 18 |
# File 'lib/roby/gui/relations_view.rb', line 16 def ui @ui end |
#view ⇒ Object (readonly)
Returns the value of attribute view.
16 17 18 |
# File 'lib/roby/gui/relations_view.rb', line 16 def view @view end |
Instance Method Details
#apply_options(options) ⇒ Object
67 68 69 |
# File 'lib/roby/gui/relations_view.rb', line 67 def () view.() end |
#save_options ⇒ Object
63 64 65 |
# File 'lib/roby/gui/relations_view.rb', line 63 def view. end |
#setDisplayTime(time) ⇒ Object
50 51 52 53 |
# File 'lib/roby/gui/relations_view.rb', line 50 def setDisplayTime(time) scheduler_view.display(.current_plan.consolidated_scheduler_state) view.update(time) end |
#update_display_time(time) ⇒ Object
58 59 60 61 |
# File 'lib/roby/gui/relations_view.rb', line 58 def update_display_time(time) scheduler_view.display(.current_plan.consolidated_scheduler_state) view.update(time) end |
#update_time_range(start_time, current_time) ⇒ Object
56 |
# File 'lib/roby/gui/relations_view.rb', line 56 def update_time_range(start_time, current_time); end |
#updateWindowTitle ⇒ Object
Slot used to make the widget update its title when e.g. the underlying history widget changed its source
41 42 43 44 45 46 47 |
# File 'lib/roby/gui/relations_view.rb', line 41 def updateWindowTitle if (parent_title = .window_title) self.window_title = "#{.window_title}: Relations" else self.window_title = "roby-display: Relations" end end |