Class: EvaluatePage

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

Instance Method Summary collapse

Methods inherited from WizardPage

#isLastPage

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) ⇒ EvaluatePage

Returns a new instance of EvaluatePage.



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'ext/ruby/qtruby/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

Instance Method Details

#isCompleteObject



134
135
136
# File 'ext/ruby/qtruby/examples/dialogs/complexwizard/licensewizard.rb', line 134

def isComplete()
    return !@nameLineEdit.text.empty? && !@emailLineEdit.text.empty?
end

#nextPageObject



130
131
132
# File 'ext/ruby/qtruby/examples/dialogs/complexwizard/licensewizard.rb', line 130

def nextPage()
    return @wizard.finishPage
end

#resetPageObject



125
126
127
128
# File 'ext/ruby/qtruby/examples/dialogs/complexwizard/licensewizard.rb', line 125

def resetPage()
    @nameLineEdit.clear()
    @emailLineEdit.clear()
end