Class: MainView
- Inherits:
-
Shirka::View
- Object
- Shirka::View
- MainView
- Defined in:
- lib/troshka/main/view.rb
Instance Attribute Summary
Attributes inherited from Shirka::View
Instance Method Summary collapse
Methods inherited from Shirka::View
#build, #init, #initialize, #on_component_added, #on_view_added, #style, #widget_class
Methods included from Shirka::Eventalk
#add_watcher, #fire, #forward, #watch, #watchers
Constructor Details
This class inherits a constructor from Shirka::View
Instance Method Details
#on_view_adding(view, slot = nil) ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/troshka/main/view.rb', line 31 def on_view_adding(view, slot=nil) case slot when :editor @splitter2. view. view..setFocus when :info #@info.addTab view.widget, view.label @splitter3. view. when :main @splitter2. view. when :info2 @splitter3. view. end end |
#show ⇒ Object
47 48 49 |
# File 'lib/troshka/main/view.rb', line 47 def show .show end |
#widget ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/troshka/main/view.rb', line 2 def return @widget unless @widget.nil? @widget = Qt::MainWindow.new @splitter1 = Qt::Splitter.new @splitter1.set_orientation Qt::Horizontal @splitter2 = Qt::Splitter.new @splitter2.set_orientation Qt::Vertical @splitter3 = Qt::Splitter.new @splitter3.set_orientation Qt::Vertical #@main = Qt::TabWidget.new #@info = Qt::TabWidget.new @splitter1. @splitter2 #@splitter2.add_widget @main @splitter1. @splitter3 #@splitter3.add_widget @info @widget.setCentralWidget @splitter1 @widget end |