Class: Syskit::GUI::JobStateLabel
- Inherits:
-
StateLabel
- Object
- Qt::Label
- StateLabel
- Syskit::GUI::JobStateLabel
- Defined in:
- lib/syskit/gui/job_state_label.rb
Overview
A label that can be used to represent job states
It [declares](StateLabel#declare_state) the known job states and assigns proper colors to it.
Constant Summary
Constants inherited from StateLabel
StateLabel::COLORS, StateLabel::STYLE, StateLabel::TEXT_WITHOUT_NAME, StateLabel::TEXT_WITH_NAME
Instance Attribute Summary
Attributes inherited from StateLabel
#current_color, #current_state, #current_text, #default_color, #extra_style, #name, #states
Instance Method Summary collapse
-
#initialize(**options) ⇒ JobStateLabel
constructor
A new instance of JobStateLabel.
Methods inherited from StateLabel
#color_from_state, #declare_default_color, #declare_state, #handle_color_argument, #ignore_state, #rate_limited?, #update_state, #update_style, #update_text
Constructor Details
#initialize(**options) ⇒ JobStateLabel
Returns a new instance of JobStateLabel
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/syskit/gui/job_state_label.rb', line 10 def initialize(**) super declare_default_color :red declare_state Roby::Interface::JOB_PLANNING_READY.upcase, :blue declare_state Roby::Interface::JOB_PLANNING.upcase, :blue declare_state Roby::Interface::JOB_PLANNING_FAILED.upcase, :red declare_state Roby::Interface::JOB_READY.upcase, :blue declare_state Roby::Interface::JOB_STARTED.upcase, :green declare_state Roby::Interface::JOB_SUCCESS.upcase, :grey declare_state Roby::Interface::JOB_FAILED.upcase, :red declare_state Roby::Interface::JOB_FINISHED.upcase, :grey declare_state Roby::Interface::JOB_FINALIZED.upcase, :grey declare_state Roby::Interface::JOB_DROPPED.upcase, :grey end |