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.
tdebindings/tqtruby/rubylib/designer/examples/colortool/colornameform.ui.rb

20 lines
286 B

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