Class: QT3::ShowLyricsDialog
- Inherits:
-
BaseDialog
- Object
- Qt::Dialog
- BaseDialog
- QT3::ShowLyricsDialog
- Defined in:
- lib/wiki_lyrics/gui/gui-qt3.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.
765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 |
# File 'lib/wiki_lyrics/gui/gui-qt3.rb', line 765 def initialize( values ) super( values ) title = I18n.get( "gui.lyrics.title", @values["title"], @values["artist"] ) title += " [#{@values["site_name"]}]" if @values["site_name"] setCaption( title ) @lyrics_text = Qt::TextEdit.new( self ) @lyrics_text.setTextFormat( Qt::RichText ) @lyrics_text.setText( "<qt>" + values["lyrics"].gsub( "\n", "<br/>" ) + "</qt>" ) layout = Qt::GridLayout.new( self, 1, 1, 5 ) layout.addWidget( @lyrics_text, 0, 0 ) resize( 350, 400 ) end |