Class: Progress_bar
- Inherits:
-
Qt::Widget
- Object
- Qt::Widget
- Progress_bar
- Defined in:
- lib/class/Progress_bar.rb
Instance Method Summary collapse
- #display_time(time) ⇒ Object
-
#initialize(status) ⇒ Progress_bar
constructor
A new instance of Progress_bar.
- #update_status(status) ⇒ Object
- #update_value(value) ⇒ Object
Constructor Details
#initialize(status) ⇒ Progress_bar
Returns a new instance of Progress_bar.
11 12 13 14 15 16 17 18 |
# File 'lib/class/Progress_bar.rb', line 11 def initialize(status) super() @pgb_ui = .new centerWindow(self) @pgb_ui.setupUi(self) self.update_status(status) self.display_time("Total duration:") end |
Instance Method Details
#display_time(time) ⇒ Object
28 29 30 |
# File 'lib/class/Progress_bar.rb', line 28 def display_time(time) @pgb_ui.lbl_time.setText(time) end |
#update_status(status) ⇒ Object
20 21 22 |
# File 'lib/class/Progress_bar.rb', line 20 def update_status(status) @pgb_ui.lbl_status.setText(status) end |
#update_value(value) ⇒ Object
24 25 26 |
# File 'lib/class/Progress_bar.rb', line 24 def update_value(value) @pgb_ui.pgb.setValue(value) if value <= 100 && value >= 0 end |