class Syskit::GUI::ExpandedJobStatus
Detailed view on a job
This is the widget displayed in Syskit IDE when a job is selected. It displays the task chronicle narrowed-down to the tasks involved in the job, as well as exceptions related to this task
Attributes
@return [JobStatusDisplay] the summary widget for the currently
selected job, or nil if no job is selected
@return [Roby::GUI::ChronicleWidget] the chronicle displaying
the task states for the currently selected job, or for all tasks if there is no currently selected job
@return [Roby::GUI::ExceptionView] display of the exceptions that
are related to this task
Public Class Methods
# File lib/syskit/gui/expanded_job_status.rb, line 23 def initialize(parent = nil) super(parent, auto_resize: false) @ui_exception_view = Roby::GUI::ExceptionView.new connect(ui_exception_view, SIGNAL('fileOpenClicked(const QUrl&)'), self, SIGNAL('fileOpenClicked(const QUrl&)')) @ui_chronicle = Roby::GUI::ChronicleWidget.new ui_chronicle.show_mode = :in_range ui_chronicle.reverse_sort = true add_widget ui_exception_view ui_exception_view.hide add_widget ui_chronicle @job_status = nil end
Public Instance Methods
Add task and job info
# File lib/syskit/gui/expanded_job_status.rb, line 66 def add_tasks_info(tasks_info, job_info) ui_chronicle.add_tasks_info(tasks_info, job_info) end
Deselect the current job
This updates the chronicle to show all tasks
# File lib/syskit/gui/expanded_job_status.rb, line 43 def deselect disconnect(self, SLOT('exceptionEvent()')) @job_status = nil ui_chronicle.clear_tasks_info update_exceptions([]) end
Slot used to announce that the exceptions registerd on {#job_status} have changed
# File lib/syskit/gui/expanded_job_status.rb, line 92 def exceptionEvent update_exceptions(job_status.exceptions) end
Set the current scheduler state
# File lib/syskit/gui/expanded_job_status.rb, line 71 def scheduler_state=(state) ui_chronicle.scheduler_state = state end
Select a given job
It reduces the displayed information to only the information that involved the selected job
@param [JobStatusDisplay] #job_status the job status widget that
represents the job to be selected
# File lib/syskit/gui/expanded_job_status.rb, line 57 def select(job_status) disconnect(self, SLOT('exceptionEvent()')) @job_status = job_status ui_chronicle.clear_tasks_info update_exceptions(job_status.exceptions) connect(job_status, SIGNAL('exceptionEvent()'), self, SLOT('exceptionEvent()')) end
Update the chronicle display
# File lib/syskit/gui/expanded_job_status.rb, line 76 def update_chronicle ui_chronicle.update_current_tasks ui_chronicle.update children_size_updated end
Update the exception display to display the given exceptions
# File lib/syskit/gui/expanded_job_status.rb, line 98 def update_exceptions(exceptions) ui_exception_view.exceptions = exceptions.dup if exceptions.empty? ui_exception_view.hide else ui_exception_view.show end children_size_updated end