Class: QT4::ShowLyricsDialog
- Inherits:
-
BaseDialog
- Object
- Qt::Dialog
- BaseDialog
- QT4::ShowLyricsDialog
- Defined in:
- lib/wiki_lyrics/gui/gui-qt4.rb
Instance Attribute Summary
Attributes inherited from BaseDialog
Instance Method Summary collapse
-
#initialize(values) ⇒ ShowLyricsDialog
constructor
A new instance of ShowLyricsDialog.
Methods inherited from BaseDialog
Constructor Details
#initialize(values) ⇒ ShowLyricsDialog
Returns a new instance of ShowLyricsDialog.
823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 |
# File 'lib/wiki_lyrics/gui/gui-qt4.rb', line 823 def initialize( values ) super( values ) title = I18n.get( "gui.lyrics.title", @values["title"], @values["artist"] ) title += " [#{@values["site_name"]}]" if @values["site_name"] setWindowTitle( title ) @lyrics_text = Qt::TextEdit.new( self ) @lyrics_text.setPlainText( values["lyrics"] ) @lyrics_text.setLineWrapMode( Qt::TextEdit::NoWrap ) layout = Qt::GridLayout.new( self ) layout.margin = 4 layout.spacing = 4 layout.addWidget( @lyrics_text, 0, 0 ) resize( 350, 400 ) end |