Class: FinishPage

Inherits:
LicenseWizardPage show all
Defined in:
ext/ruby/qtruby/examples/dialogs/complexwizard/licensewizard.rb

Instance Method Summary collapse

Methods inherited from WizardPage

#nextPage

Methods inherited from Qt::Widget

#raise

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(wizard) ⇒ FinishPage

Returns a new instance of FinishPage.



247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
# File 'ext/ruby/qtruby/examples/dialogs/complexwizard/licensewizard.rb', line 247

def initialize(wizard)
    super(wizard)
    @topLabel = Qt::Label.new(tr("<center><b>Complete your registration" +
                             "</b></center>"))

    @bottomLabel = Qt::Label.new
    @bottomLabel.wordWrap = true

    @agreeCheckBox = Qt::CheckBox.new(tr("I agree to the terms and conditions of " +
                                     "the license"))
    setFocusProxy(@agreeCheckBox)

    connect(@agreeCheckBox, SIGNAL('toggled(bool)'),
            self, SIGNAL('completeStateChanged()'))

    layout = Qt::VBoxLayout.new
    layout.addWidget(@topLabel)
    layout.addSpacing(10)
    layout.addWidget(@bottomLabel)
    layout.addWidget(@agreeCheckBox)
    layout.addStretch(1)
    setLayout(layout)
end

Instance Method Details

#isCompleteObject



291
292
293
# File 'ext/ruby/qtruby/examples/dialogs/complexwizard/licensewizard.rb', line 291

def isComplete()
    return @agreeCheckBox.checked?
end

#isLastPageObject



289
# File 'ext/ruby/qtruby/examples/dialogs/complexwizard/licensewizard.rb', line 289

def isLastPage() return true end

#resetPageObject



271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
# File 'ext/ruby/qtruby/examples/dialogs/complexwizard/licensewizard.rb', line 271

def resetPage()
    if @wizard.historyPages.include? @wizard.evaluatePage
        licenseText = tr("Evaluation License Agreement: " +
                         "You can use self software for 30 days and make one " +
                         "back up, but you are not allowed to distribute it.")
    elsif @wizard.historyPages.include? @wizard.detailsPage
        licenseText = tr("First-Time License Agreement: " +
                         "You can use self software subject to the license " +
                         "you will receive by email.")
    else
        licenseText = tr("Upgrade License Agreement: " +
                         "This software is licensed under the terms of your " +
                         "current license.")
    end
    @bottomLabel.text = licenseText
    @agreeCheckBox.checked = false
end