Class: Syskit::GUI::Browse

Inherits:
Qt::Widget
  • Object
show all
Defined in:
lib/syskit/gui/browse.rb

Overview

Main widget for model browsing

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(parent = nil) ⇒ Browse

Returns a new instance of Browse



21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/syskit/gui/browse.rb', line 21

def initialize(parent = nil)
    super
    @main_layout = Qt::VBoxLayout.new(self)

    @model_browser = ModelBrowser.new(self)
    @btn_reload_models = Qt::PushButton.new("Reload Models", self)

    main_layout.add_widget btn_reload_models
    main_layout.add_widget model_browser

    btn_reload_models.connect(SIGNAL('clicked()')) do
        model_browser.registered_exceptions.clear
        Roby.app.clear_exceptions
        Roby.app.reload_models
        model_browser.update_exceptions
        model_browser.reload
    end
end

Instance Attribute Details

#btn_reload_modelsQt::PushButton (readonly)

The button that triggers model reloading

Returns:

  • (Qt::PushButton)


14
15
16
# File 'lib/syskit/gui/browse.rb', line 14

def btn_reload_models
  @btn_reload_models
end

#main_layoutQt::Layout (readonly)

The widget's main layout

Returns:

  • (Qt::Layout)


9
10
11
# File 'lib/syskit/gui/browse.rb', line 9

def main_layout
  @main_layout
end

#model_browserModelBrowser (readonly)

The model browser object

Returns:



19
20
21
# File 'lib/syskit/gui/browse.rb', line 19

def model_browser
  @model_browser
end

Instance Method Details

#select_by_model(mod) ⇒ Object

Select the current model using its module



41
42
43
# File 'lib/syskit/gui/browse.rb', line 41

def select_by_model(mod)
    model_browser.select_by_model(mod)
end