Class: Qt::VBoxLayout
Instance Method Summary collapse
- #addGroup(name) ⇒ Object
- #addWidgetAtCenter(*w) ⇒ Object
- #addWidgetAtLeft(*w) ⇒ Object
- #addWidgetAtRight(*w) ⇒ Object
- #addWidgetWithNilStretch(*w) ⇒ Object (also: #addWidgets)
Instance Method Details
#addGroup(name) ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'lib/mylibs.rb', line 48 def addGroup(name) g = Qt::GroupBox.new(name) vbx = Qt::VBoxLayout.new do |vb| yield(vb) end g.setLayout(vbx) addWidget(g) end |
#addWidgetAtCenter(*w) ⇒ Object
33 34 35 36 |
# File 'lib/mylibs.rb', line 33 def addWidgetAtCenter(*w) w.unshift(nil) addWidgetWithNilStretch(*w) end |
#addWidgetAtLeft(*w) ⇒ Object
43 44 45 46 |
# File 'lib/mylibs.rb', line 43 def addWidgetAtLeft(*w) w.push(nil) addWidgetWithNilStretch(*w) end |
#addWidgetAtRight(*w) ⇒ Object
38 39 40 41 |
# File 'lib/mylibs.rb', line 38 def addWidgetAtRight(*w) w.unshift(nil) addWidgetWithNilStretch(*w) end |
#addWidgetWithNilStretch(*w) ⇒ Object Also known as: addWidgets
24 25 26 27 28 29 30 |
# File 'lib/mylibs.rb', line 24 def addWidgetWithNilStretch(*w) addLayout( Qt::HBoxLayout.new do |l| l.addWidgets(*w) end ) end |