You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
class ColorNameForm
|
|
|
|
@colors = {}
|
|
|
|
def setColors( colors )
|
|
@colors = colors
|
|
end
|
|
|
|
def validate()
|
|
name = @colorLineEdit.text()
|
|
if ! name.empty? &&
|
|
( @colors.empty? || ! @colors.has_key?( name ) )
|
|
accept()
|
|
else
|
|
@colorLineEdit.selectAll()
|
|
end
|
|
end
|
|
|
|
end
|