~ubuntu-branches/ubuntu/natty/kdemultimedia/natty-proposed

« back to all changes in this revision

Viewing changes to juk/tageditor.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Debian Qt/KDE Maintainers
  • Date: 2011-05-26 02:41:36 UTC
  • mfrom: (0.2.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 108.
  • Revision ID: james.westby@ubuntu.com-20110526024136-jjwsigfy402jhupm
Tags: upstream-4.6.3
ImportĀ upstreamĀ versionĀ 4.6.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
    FileNameValidator(QObject *parent, const char *name = 0) :
58
58
        QValidator(parent)
59
59
    {
60
 
        setObjectName(name);
 
60
        setObjectName( QLatin1String( name ) );
61
61
    }
62
62
 
63
63
    virtual void fixup(QString &s) const
416
416
    m_genreBox->addItem(QString());
417
417
    m_genreBox->addItems(m_genreList);
418
418
    m_genreBox->completionObject()->setItems(m_genreList);
 
419
 
 
420
    // We've cleared out the original entries of these list boxes, re-read
 
421
    // the current item if one is selected.
 
422
    slotRefresh();
419
423
}
420
424
 
421
425
////////////////////////////////////////////////////////////////////////////////
473
477
 
474
478
void TagEditor::setupActions()
475
479
{
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)));
479
483
 
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
514
518
 
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");
519
523
 
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");
523
527
 
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");
528
532
 
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");
532
536
 
533
537
        // this fills the space at the bottem of the left column
544
548
        fileNameLayout->setSpacing(horizontalSpacing);
545
549
 
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));
549
553
 
550
554
        QLabel *fileNameIcon = new QLabel(this);
565
569
                                                            horizontalSpacing);
566
570
 
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);
571
575
 
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);
576
580
 
584
588
                                                            horizontalSpacing);
585
589
 
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);
594
598
 
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);
608
612
        }
609
613
 
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());
614
618
 
790
794
{
791
795
    if(m_collectionChanged) {
792
796
        updateCollection();
793
 
        slotRefresh();
794
797
    }
795
798
 
796
799
    QWidget::showEvent(e);