Class: Cosmos::StatusTab

Inherits:
Object show all
Defined in:
lib/cosmos/tools/cmd_tlm_server/gui/status_tab.rb

Overview

Implements the status tab in the Command and Telemetry Server GUI

Instance Method Summary collapse

Instance Method Details

#populate(tab_widget) ⇒ Object

Create the status tab and add it to the tab_widget

Parameters:

  • tab_widget (Qt::TabWidget)

    The tab widget to add the tab to



22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/cosmos/tools/cmd_tlm_server/gui/status_tab.rb', line 22

def populate(tab_widget)
  scroll = Qt::ScrollArea.new
  widget = Qt::Widget.new
  layout = Qt::VBoxLayout.new(widget)

  populate_limits_status(layout)
  populate_api_status(layout)
  populate_system_status(layout)
  populate_background_status(layout)

  # Set the scroll area widget last now that all the items have been layed out
  scroll.setWidget(widget)
  tab_widget.addTab(scroll, "Status")
end

#updateObject

Update the status tab in the GUI



38
39
40
41
42
43
# File 'lib/cosmos/tools/cmd_tlm_server/gui/status_tab.rb', line 38

def update
  update_limits_set()
  update_api_status()
  update_system_status()
  update_background_task_status()
end