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

job_status[R]

@return [JobStatusDisplay] the summary widget for the currently

selected job, or nil if no job is selected
ui_chronicle[R]

@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
ui_exception_view[R]

@return [Roby::GUI::ExceptionView] display of the exceptions that

are related to this task

Public Class Methods

new(parent = nil) click to toggle source
Calls superclass method
# 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_tasks_info(tasks_info, job_info) click to toggle source

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() click to toggle source

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
exceptionEvent() click to toggle source

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
scheduler_state=(state) click to toggle source

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(job_status) click to toggle source

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_chronicle() click to toggle source

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_exceptions(exceptions) click to toggle source

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
update_time(cycle_index, cycle_time) click to toggle source

Update the current time

@param [Integer] cycle_index the index of the current Roby cycle @param [Time] cycle_time the time of the current Roby cycle

# File lib/syskit/gui/expanded_job_status.rb, line 86
def update_time(cycle_index, cycle_time)
    ui_chronicle.update_current_time(cycle_time)
end