Class: QT4::StringListModel

Inherits:
Qt::StringListModel
  • Object
show all
Defined in:
lib/wiki_lyrics/gui/gui-qt4.rb

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ StringListModel

Returns a new instance of StringListModel.



81
82
83
84
# File 'lib/wiki_lyrics/gui/gui-qt4.rb', line 81

def initialize( name )
	super()
	@name = name
end

Instance Method Details

#flags(index) ⇒ Object



86
87
88
# File 'lib/wiki_lyrics/gui/gui-qt4.rb', line 86

def flags( index )
	return Qt::ItemIsSelectable | Qt::ItemIsEnabled
end

#headerData(section, orientation, role = Qt::DisplayRole) ⇒ Object



90
91
92
93
94
# File 'lib/wiki_lyrics/gui/gui-qt4.rb', line 90

def headerData( section, orientation, role = Qt::DisplayRole )
	return Qt::Variant.new() if role != Qt::DisplayRole
	return Qt::Variant.new() if orientation != Qt::Horizontal
	return Qt::Variant.new( @name )
end