class EvaluatePage

Public Class Methods

new(wizard) click to toggle source
Calls superclass method LicenseWizardPage.new
# File examples/dialogs/complexwizard/licensewizard.rb, line 90
def initialize(wizard)
    super(wizard)
    @topLabel = Qt::Label.new(tr("<center><b>Evaluate Super Product One" +
                             "</b></center>"))

    @nameLabel = Qt::Label.new(tr("&Name:"))
    @nameLineEdit = Qt::LineEdit.new
    @nameLabel.buddy = @nameLineEdit
    setFocusProxy(@nameLineEdit)

    @emailLabel = Qt::Label.new(tr("&Email address:"))
    @emailLineEdit = Qt::LineEdit.new
    @emailLabel.buddy = @emailLineEdit

    @bottomLabel = Qt::Label.new(tr("Please fill in both fields.\nThis will " +
                                "entitle you to a 30-day evaluation."))

    connect(@nameLineEdit, SIGNAL('textChanged(QString)'),
            self, SIGNAL('completeStateChanged()'))
    connect(@emailLineEdit, SIGNAL('textChanged(QString)'),
            self, SIGNAL('completeStateChanged()'))

    layout = Qt::GridLayout.new
    layout.addWidget(@topLabel, 0, 0, 1, 2)
    layout.setRowMinimumHeight(1, 10)
    layout.addWidget(@nameLabel, 2, 0)
    layout.addWidget(@nameLineEdit, 2, 1)
    layout.addWidget(@emailLabel, 3, 0)
    layout.addWidget(@emailLineEdit, 3, 1)
    layout.setRowMinimumHeight(4, 10)
    layout.addWidget(@bottomLabel, 5, 0, 1, 2)
    layout.setRowStretch(6, 1)
    setLayout(layout)
end

Public Instance Methods

isComplete() click to toggle source
# File examples/dialogs/complexwizard/licensewizard.rb, line 134
def isComplete()
    return !@nameLineEdit.text.empty? && !@emailLineEdit.text.empty?
end
nextPage() click to toggle source
# File examples/dialogs/complexwizard/licensewizard.rb, line 130
def nextPage()
    return @wizard.finishPage
end
resetPage() click to toggle source
# File examples/dialogs/complexwizard/licensewizard.rb, line 125
def resetPage()
    @nameLineEdit.clear()
    @emailLineEdit.clear()
end