diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
commit | 395a904bff7b4d6ead445c342f7ac0c5fbf29121 (patch) | |
tree | 9829cadb79d2cc7c29a940627fadb28b11e54150 /renamedlgplugins/audio | |
parent | 399f47c376fdf4d19192732a701ea9578d11619d (diff) | |
download | tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.tar.gz tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.zip |
TQt4 port kdeaddons
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1237404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'renamedlgplugins/audio')
-rw-r--r-- | renamedlgplugins/audio/audio_plugin.cpp | 14 | ||||
-rw-r--r-- | renamedlgplugins/audio/audiopreview.cpp | 24 | ||||
-rw-r--r-- | renamedlgplugins/audio/audiopreview.h | 5 |
3 files changed, 22 insertions, 21 deletions
diff --git a/renamedlgplugins/audio/audio_plugin.cpp b/renamedlgplugins/audio/audio_plugin.cpp index 44ae9d0..5aeeb49 100644 --- a/renamedlgplugins/audio/audio_plugin.cpp +++ b/renamedlgplugins/audio/audio_plugin.cpp @@ -73,11 +73,11 @@ bool AudioPlugin::initialize( KIO::RenameDlg_Mode mode, const TQString &_src, co TQString sentence1; TQString dest = KURL::fromPathOrURL(_dest).pathOrURL(); if (mtimeDest < mtimeSrc) - sentence1 = i18n("An older file named '%1' already exists.\n").arg(dest); + sentence1 = i18n("An older file named '%1' already exists.\n").tqarg(dest); else if (mtimeDest == mtimeSrc) - sentence1 = i18n("A similar file named '%1' already exists.\n").arg(dest); + sentence1 = i18n("A similar file named '%1' already exists.\n").tqarg(dest); else - sentence1 = i18n("A newer file named '%1' already exists.\n").arg(dest); + sentence1 = i18n("A newer file named '%1' already exists.\n").tqarg(dest); label_head->setText(sentence1); label_src->setText(i18n("Source File")); label_dst->setText(i18n("Existing File")); @@ -86,10 +86,10 @@ bool AudioPlugin::initialize( KIO::RenameDlg_Mode mode, const TQString &_src, co label_src->adjustSize(); label_dst->adjustSize(); label_ask->adjustSize(); - lay->addMultiCellWidget(label_head, 0, 0, 0, 2, Qt::AlignLeft); - lay->addWidget(label_dst, 1, 0, Qt::AlignLeft); - lay->addWidget(label_src, 1, 2, Qt::AlignLeft); - lay->addMultiCellWidget(label_ask, 3, 3, 0, 2, Qt::AlignLeft); + lay->addMultiCellWidget(label_head, 0, 0, 0, 2, TQt::AlignLeft); + lay->addWidget(label_dst, 1, 0, TQt::AlignLeft); + lay->addWidget(label_src, 1, 2, TQt::AlignLeft); + lay->addMultiCellWidget(label_ask, 3, 3, 0, 2, TQt::AlignLeft); adjustSize(); } AudioPreview *left= new AudioPreview(this, "Preview Left", _dest, mimeDest ); diff --git a/renamedlgplugins/audio/audiopreview.cpp b/renamedlgplugins/audio/audiopreview.cpp index b618adb..18e25d1 100644 --- a/renamedlgplugins/audio/audiopreview.cpp +++ b/renamedlgplugins/audio/audiopreview.cpp @@ -33,8 +33,8 @@ #include "audiopreview.h" -AudioPreview::AudioPreview( TQWidget *parent, const char *name, const TQString &fileName, const TQString &mimeType) - : TQVBox( parent, name ) +AudioPreview::AudioPreview( TQWidget *tqparent, const char *name, const TQString &fileName, const TQString &mimeType) + : TQVBox( tqparent, name ) { m_isTempFile = false; pic = 0; @@ -72,7 +72,7 @@ AudioPreview::~AudioPreview() void AudioPreview::initView( const TQString& mimeType ) { KURL url = KURL::fromPathOrURL( m_localFile ); - pic->setText( TQString::null ); + pic->setText( TQString() ); pic->setPixmap(KMimeType::pixmapForURL( url )); pic->adjustSize(); @@ -89,33 +89,33 @@ void AudioPreview::initView( const TQString& mimeType ) KSqueezedTextLabel *sl; sl = new KSqueezedTextLabel(this); - sl->setText(i18n("Artist: %1\n").arg(info.item("Artist").value().toString())); + sl->setText(i18n("Artist: %1\n").tqarg(info.item("Artist").value().toString())); sl = new KSqueezedTextLabel(this); - sl->setText(i18n("Title: %1\n").arg(info.item("Title").value().toString())); + sl->setText(i18n("Title: %1\n").tqarg(info.item("Title").value().toString())); sl = new KSqueezedTextLabel(this); - sl->setText(i18n("Comment: %1\n").arg(info.item("Comment").value().toString())); + sl->setText(i18n("Comment: %1\n").tqarg(info.item("Comment").value().toString())); - desc.append(i18n("Biterate: 160 kbits/s", "Bitrate: %1 %2\n").arg( info.item("Bitrate").value().toString() ).arg( info.item("Bitrate").suffix() )); + desc.append(i18n("Biterate: 160 kbits/s", "Bitrate: %1 %2\n").tqarg( info.item("Bitrate").value().toString() ).tqarg( info.item("Bitrate").suffix() )); } - desc.append(i18n("Sample rate: %1 %2\n").arg( info.item("Sample Rate").value().toString() ).arg( info.item("Sample Rate").suffix() )); + desc.append(i18n("Sample rate: %1 %2\n").tqarg( info.item("Sample Rate").value().toString() ).tqarg( info.item("Sample Rate").suffix() )); desc.append(i18n("Length: ")); /* Calculate length in mm:ss format */ int length = info.item("Length").value().toInt(); if (length/60 < 10) desc.append("0"); - desc.append(TQString("%1:").arg(length/60, 0, 10)); + desc.append(TQString("%1:").tqarg(length/60, 0, 10)); if (length%60 < 10) desc.append("0"); - desc.append(TQString("%1\n").arg(length%60, 0, 10)); + desc.append(TQString("%1\n").tqarg(length%60, 0, 10)); } description = new TQLabel(this); description->setText( desc ); description->adjustSize(); - m_player = KParts::ComponentFactory::createInstanceFromQuery<KMediaPlayer::Player>( "KMediaPlayer/Player", TQString::null, this ); + m_player = KParts::ComponentFactory::createInstanceFromQuery<KMediaPlayer::Player>( "KMediaPlayer/Player", TQString(), TQT_TQOBJECT(this) ); if ( m_player ) { static_cast<KParts::ReadOnlyPart*>(m_player)->openURL( url ); @@ -125,7 +125,7 @@ void AudioPreview::initView( const TQString& mimeType ) void AudioPreview::downloadFile( const TQString& url ) { - if( KIO::NetAccess::download( KURL::fromPathOrURL( url ), m_localFile , topLevelWidget()) ) + if( KIO::NetAccess::download( KURL::fromPathOrURL( url ), m_localFile , tqtopLevelWidget()) ) { m_isTempFile = true; initView( KMimeType::findByPath( m_localFile )->name() ); diff --git a/renamedlgplugins/audio/audiopreview.h b/renamedlgplugins/audio/audiopreview.h index d50c3d2..751233c 100644 --- a/renamedlgplugins/audio/audiopreview.h +++ b/renamedlgplugins/audio/audiopreview.h @@ -29,11 +29,12 @@ namespace KMediaPlayer class TQPixmap; class TQLabel; -class AudioPreview : public QVBox +class AudioPreview : public TQVBox { Q_OBJECT + TQ_OBJECT public: - AudioPreview(TQWidget *parent, const char *name, const TQString &fileName, const TQString &mimeType); + AudioPreview(TQWidget *tqparent, const char *name, const TQString &fileName, const TQString &mimeType); ~AudioPreview(); private slots: |