Class: QueryPage
- Inherits:
-
Qt::Widget
- Object
- Qt::Base
- Qt::Widget
- QueryPage
- Defined in:
- ext/ruby/qtruby/examples/dialogs/configdialog/pages.rb
Instance Method Summary collapse
-
#initialize(parent = nil) ⇒ QueryPage
constructor
A new instance of QueryPage.
Methods inherited from Qt::Widget
Methods inherited from Qt::Base
#%, #&, #*, #**, #+, #-, #-@, #/, #<, #<<, #<=, #==, #>, #>=, #>>, #QCOMPARE, #QEXPECT_FAIL, #QFAIL, #QSKIP, #QTEST, #QVERIFY, #QVERIFY2, #QWARN, #^, ancestors, #is_a?, #methods, private_slots, #protected_methods, #public_methods, q_classinfo, q_signal, q_slot, signals, #singleton_methods, slots, #|, #~
Constructor Details
#initialize(parent = nil) ⇒ QueryPage
Returns a new instance of QueryPage.
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'ext/ruby/qtruby/examples/dialogs/configdialog/pages.rb', line 58 def initialize(parent = nil) super(parent) updateGroup = Qt::GroupBox.new(tr("Package selection")) systemCheckBox = Qt::CheckBox.new(tr("Update system")) appsCheckBox = Qt::CheckBox.new(tr("Update applications")) docsCheckBox = Qt::CheckBox.new(tr("Update documentation")) packageGroup = Qt::GroupBox.new(tr("Existing packages")) packageList = Qt::ListWidget.new qtItem = Qt::ListWidgetItem.new(packageList) qtItem.text = tr("Qt") qsaItem = Qt::ListWidgetItem.new(packageList) qsaItem.text = tr("QSA") teamBuilderItem = Qt::ListWidgetItem.new(packageList) teamBuilderItem.text = tr("Teambuilder") startUpdateButton = Qt::PushButton.new(tr("Start update")) updateGroup.layout = Qt::VBoxLayout.new do |u| u.addWidget(systemCheckBox) u.addWidget(appsCheckBox) u.addWidget(docsCheckBox) end packageGroup.layout = Qt::VBoxLayout.new do |p| p.addWidget(packageList) end self.layout = Qt::VBoxLayout.new do |m| m.addWidget(updateGroup) m.addWidget(packageGroup) m.addSpacing(12) m.addWidget(startUpdateButton) m.addStretch(1) end end |