Class: Shirka::Qt::MultipanelView
- Defined in:
- lib/shirka/qt/multipanel/view.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from View
Instance Method Summary collapse
Methods inherited from View
#init, #initialize, #on_component_added, #on_view_added, #style, #widget
Methods included from Eventalk
#add_watcher, #fire, #forward, #watch, #watchers
Constructor Details
This class inherits a constructor from Shirka::View
Instance Method Details
#build(widget) ⇒ Object
9 10 11 |
# File 'lib/shirka/qt/multipanel/view.rb', line 9 def build() .setLayout ::Qt::StackedLayout.new end |
#on_view_adding(view, slot = nil) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/shirka/qt/multipanel/view.rb', line 13 def on_view_adding(view, slot=nil) layout = .layout current_panel = layout.currentWidget unless current_panel.nil? layout.removeWidget current_panel current_panel.close end layout.addWidget view. layout.update .show rescue puts $! end |
#widget_class ⇒ Object
5 6 7 |
# File 'lib/shirka/qt/multipanel/view.rb', line 5 def ::Qt::Widget end |