summaryrefslogtreecommitdiffstats
path: root/renamedlgplugins/audio/audiopreview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'renamedlgplugins/audio/audiopreview.cpp')
-rw-r--r--renamedlgplugins/audio/audiopreview.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/renamedlgplugins/audio/audiopreview.cpp b/renamedlgplugins/audio/audiopreview.cpp
index e9c6f26..b618adb 100644
--- a/renamedlgplugins/audio/audiopreview.cpp
+++ b/renamedlgplugins/audio/audiopreview.cpp
@@ -21,9 +21,9 @@
#include <klocale.h>
#include <kmimetype.h>
#include <kurl.h>
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qpixmap.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqpixmap.h>
#include <kio/netaccess.h>
#include <kurllabel.h>
#include <kmimetype.h>
@@ -33,8 +33,8 @@
#include "audiopreview.h"
-AudioPreview::AudioPreview( QWidget *parent, const char *name, const QString &fileName, const QString &mimeType)
- : QVBox( parent, name )
+AudioPreview::AudioPreview( TQWidget *parent, const char *name, const TQString &fileName, const TQString &mimeType)
+ : TQVBox( parent, name )
{
m_isTempFile = false;
pic = 0;
@@ -45,7 +45,7 @@ AudioPreview::AudioPreview( QWidget *parent, const char *name, const QString &fi
setSpacing( 0 );
if( url.isValid() && url.isLocalFile() ) {
m_localFile = url.path();
- pic = new QLabel(this);
+ pic = new TQLabel(this);
pic->setPixmap(KMimeType::pixmapForURL( url ));
pic->adjustSize();
initView( mimeType );
@@ -53,10 +53,10 @@ AudioPreview::AudioPreview( QWidget *parent, const char *name, const QString &fi
KURLLabel *label = new KURLLabel( this );
label->setText(i18n("This audio file isn't stored\non the local host.\nClick on this label to load it.\n" ) );
label->setURL( url.prettyURL() );
- connect(label, SIGNAL(leftClickedURL(const QString&)), SLOT(downloadFile(const QString&)));
+ connect(label, TQT_SIGNAL(leftClickedURL(const TQString&)), TQT_SLOT(downloadFile(const TQString&)));
pic = label;
} else {
- description = new QLabel(this );
+ description = new TQLabel(this );
description->setText(i18n("Unable to load audio file") );
}
}
@@ -69,17 +69,17 @@ AudioPreview::~AudioPreview()
delete m_player;
}
-void AudioPreview::initView( const QString& mimeType )
+void AudioPreview::initView( const TQString& mimeType )
{
KURL url = KURL::fromPathOrURL( m_localFile );
- pic->setText( QString::null );
+ pic->setText( TQString::null );
pic->setPixmap(KMimeType::pixmapForURL( url ));
pic->adjustSize();
KFileMetaInfo info(m_localFile);
KMimeType::Ptr mimeptr = KMimeType::mimeType(mimeType);
- QString desc;
+ TQString desc;
if (info.isValid())
{
if (mimeptr->is("audio/x-mp3") || mimeptr->is("application/ogg"))
@@ -106,16 +106,16 @@ void AudioPreview::initView( const QString& mimeType )
int length = info.item("Length").value().toInt();
if (length/60 < 10)
desc.append("0");
- desc.append(QString("%1:").arg(length/60, 0, 10));
+ desc.append(TQString("%1:").arg(length/60, 0, 10));
if (length%60 < 10)
desc.append("0");
- desc.append(QString("%1\n").arg(length%60, 0, 10));
+ desc.append(TQString("%1\n").arg(length%60, 0, 10));
}
- description = new QLabel(this);
+ description = new TQLabel(this);
description->setText( desc );
description->adjustSize();
- m_player = KParts::ComponentFactory::createInstanceFromQuery<KMediaPlayer::Player>( "KMediaPlayer/Player", QString::null, this );
+ m_player = KParts::ComponentFactory::createInstanceFromQuery<KMediaPlayer::Player>( "KMediaPlayer/Player", TQString::null, this );
if ( m_player )
{
static_cast<KParts::ReadOnlyPart*>(m_player)->openURL( url );
@@ -123,7 +123,7 @@ void AudioPreview::initView( const QString& mimeType )
}
}
-void AudioPreview::downloadFile( const QString& url )
+void AudioPreview::downloadFile( const TQString& url )
{
if( KIO::NetAccess::download( KURL::fromPathOrURL( url ), m_localFile , topLevelWidget()) )
{