590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
|
# File 'lib/wiki_lyrics/gui/gui-qt4.rb', line 590
def initialize( values )
super( values )
setWindowTitle( I18n.get( "gui.uploadcover.title", values["site_name"] ) )
album_group = Qt::GroupBox.new( I18n.get( "gui.common.album" ), self )
artist_label = Qt::Label.new( I18n.get( "gui.common.artist" ), album_group )
@artist_lineedit = Qt::LineEdit.new( values["artist"], album_group )
album_label = Qt::Label.new( I18n.get( "gui.common.album" ), album_group )
@album_lineedit = Qt::LineEdit.new( values["album"], album_group )
year_label = Qt::Label.new( I18n.get( "gui.common.year" ), album_group )
@year_spinbox = Qt::SpinBox.new( album_group )
@year_spinbox.setRange( 1900, Date.today().year() )
@year_spinbox.setValue( values["year"] )
image_group = Qt::GroupBox.new( I18n.get( "gui.common.image" ), self )
image_label = Qt::Label.new( I18n.get( "gui.uploadcover.imagepath" ), image_group )
@image_path_lineedit = Qt::LineEdit.new( values["image_path"], image_group )
@image_path_lineedit.setText( values["image_path"] )
@image_button = Qt::PushButton.new( "...", image_group )
@image_button.setMaximumWidth( 40 )
connect( @image_button, SIGNAL( "clicked()" ), self, SLOT( "browse_image()" ) )
buttons = create_action_buttons()
album_group_layout = Qt::GridLayout.new()
album_group_layout.margin = 5
album_group_layout.spacing = 4
album_group_layout.setRowStretch( 3, 1 )
album_group_layout.addWidget( artist_label, 0, 0 )
album_group_layout.addWidget( @artist_lineedit, 0, 1 )
album_group_layout.addWidget( album_label, 1, 0 )
album_group_layout.addWidget( @album_lineedit, 1, 1 )
album_group_layout.addWidget( year_label, 2, 0 )
album_group_layout.addWidget( @year_spinbox, 2, 1 )
album_group.setLayout( album_group_layout )
image_group_layout = Qt::GridLayout.new()
image_group_layout.margin = 5
image_group_layout.spacing = 4
image_group_layout.setRowStretch( 1, 1 )
image_group_layout.addWidget( image_label, 0, 0 )
image_group_layout.addWidget( @image_path_lineedit, 0, 1 )
image_group_layout.addWidget( @image_button, 0, 2 )
image_group.setLayout( image_group_layout )
layout = Qt::VBoxLayout.new( self )
layout.margin = 4
layout.spacing = 4
layout.addWidget( album_group )
layout.addWidget( image_group )
layout.addLayout( buttons )
resize( 350, 100 )
end
|