416
416
m_genreBox->addItem(QString());
417
417
m_genreBox->addItems(m_genreList);
418
418
m_genreBox->completionObject()->setItems(m_genreList);
420
// We've cleared out the original entries of these list boxes, re-read
421
// the current item if one is selected.
421
425
////////////////////////////////////////////////////////////////////////////////
474
478
void TagEditor::setupActions()
476
KToggleAction *show = new KToggleAction(KIcon("document-properties"), i18n("Show &Tag Editor"), this);
480
KToggleAction *show = new KToggleAction(KIcon( QLatin1String( "document-properties") ), i18n("Show &Tag Editor" ), this);
477
481
ActionCollection::actions()->addAction("showEditor", show);
478
482
connect(show, SIGNAL(toggled(bool)), this, SLOT(setShown(bool)));
480
KAction *act = new KAction(KIcon("document-save"), i18n("&Save"), this);
484
KAction *act = new KAction(KIcon( QLatin1String( "document-save") ), i18n("&Save" ), this);
481
485
ActionCollection::actions()->addAction("saveItem", act);
482
486
act->setShortcut(Qt::CTRL + Qt::Key_T);
483
487
connect(act, SIGNAL(triggered(bool)), SLOT(slotSave()));
513
517
{ // just for organization
515
519
m_artistNameBox = new KComboBox( true, this );
516
m_artistNameBox->setObjectName( "artistNameBox" );
520
m_artistNameBox->setObjectName( QLatin1String( "artistNameBox" ) );
517
521
m_artistNameBox->setCompletionMode(KGlobalSettings::CompletionAuto);
518
522
addItem(i18n("&Artist name:"), m_artistNameBox, leftColumnLayout, "view-media-artist");
520
524
m_trackNameBox = new KLineEdit(this);
521
m_trackNameBox->setObjectName( "trackNameBox" );
525
m_trackNameBox->setObjectName( QLatin1String( "trackNameBox" ) );
522
526
addItem(i18n("&Track name:"), m_trackNameBox, leftColumnLayout, "media-playback-start");
524
528
m_albumNameBox = new KComboBox( true, this );
525
m_albumNameBox->setObjectName( "albumNameBox" );
529
m_albumNameBox->setObjectName( QLatin1String( "albumNameBox" ) );
526
530
m_albumNameBox->setCompletionMode(KGlobalSettings::CompletionAuto);
527
531
addItem(i18n("Album &name:"), m_albumNameBox, leftColumnLayout, "media-optical-audio");
529
533
m_genreBox = new KComboBox( true, this );
530
m_genreBox->setObjectName( "genreBox" );
534
m_genreBox->setObjectName( QLatin1String( "genreBox" ) );
531
535
addItem(i18n("&Genre:"), m_genreBox, leftColumnLayout, "help-about");
533
537
// this fills the space at the bottem of the left column
544
548
fileNameLayout->setSpacing(horizontalSpacing);
546
550
m_fileNameBox = new KLineEdit(this);
547
m_fileNameBox->setObjectName( "fileNameBox" );
551
m_fileNameBox->setObjectName( QLatin1String( "fileNameBox" ) );
548
552
m_fileNameBox->setValidator(new FileNameValidator(m_fileNameBox));
550
554
QLabel *fileNameIcon = new QLabel(this);
565
569
horizontalSpacing);
567
571
m_trackSpin = new KIntSpinBox(0, 9999, 1, 0, this);
568
m_trackSpin->setObjectName( "trackSpin" );
572
m_trackSpin->setObjectName( QLatin1String( "trackSpin" ) );
569
573
addItem(i18nc("cd track number", "T&rack:"), m_trackSpin, trackRowLayout);
570
574
m_trackSpin->installEventFilter(this);
572
576
m_yearSpin = new KIntSpinBox(0, 9999, 1, 0, this );
573
m_yearSpin->setObjectName( "yearSpin" );
577
m_yearSpin->setObjectName( QLatin1String( "yearSpin" ) );
574
578
addItem(i18n("&Year:"), m_yearSpin, trackRowLayout);
575
579
m_yearSpin->installEventFilter(this);
584
588
horizontalSpacing);
586
590
m_lengthBox = new KLineEdit(this);
587
m_lengthBox->setObjectName( "lengthBox" );
591
m_lengthBox->setObjectName( QLatin1String( "lengthBox" ) );
588
592
// addItem(i18n("Length:"), m_lengthBox, trackRowLayout);
589
593
m_lengthBox->setMinimumWidth(fontMetrics().width("00:00") + trackRowLayout->spacing());
590
594
m_lengthBox->setMaximumWidth(60);
593
597
addItem(i18n("Length:"), m_lengthBox, trackRowLayout);
595
599
m_bitrateBox = new KLineEdit(this);
596
m_bitrateBox->setObjectName( "bitrateBox" );
600
m_bitrateBox->setObjectName( QLatin1String( "bitrateBox" ) );
597
601
// addItem(i18n("Bitrate:"), m_bitrateBox, trackRowLayout);
598
602
m_bitrateBox->setMinimumWidth(fontMetrics().width("000") + trackRowLayout->spacing());
599
603
m_bitrateBox->setMaximumWidth(60);
610
614
m_commentBox = new KTextEdit(this);
611
m_commentBox->setObjectName( "commentBox" );
615
m_commentBox->setObjectName( QLatin1String( "commentBox" ) );
612
616
addItem(i18n("&Comment:"), m_commentBox, rightColumnLayout, "document-properties");
613
617
fileNameLabel->setMinimumHeight(m_trackSpin->height());