diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
commit | 7346aee26bf190a7e70333c40fab4caca847cd27 (patch) | |
tree | 4b019b434f88dcc3eeaafe1d3f26240b4c4718e8 /noatun-plugins/wavecapture/wavecapture.cpp | |
parent | 23a3d3aa5b44cbdf305495919866d9dbf4f6da54 (diff) | |
download | tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.tar.gz tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'noatun-plugins/wavecapture/wavecapture.cpp')
-rw-r--r-- | noatun-plugins/wavecapture/wavecapture.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/noatun-plugins/wavecapture/wavecapture.cpp b/noatun-plugins/wavecapture/wavecapture.cpp index b95d3ce..0667951 100644 --- a/noatun-plugins/wavecapture/wavecapture.cpp +++ b/noatun-plugins/wavecapture/wavecapture.cpp @@ -34,9 +34,9 @@ #include <kio/job.h> #include <kio/jobclasses.h> -#include <qfile.h> -#include <qstring.h> -#include <qtimer.h> +#include <tqfile.h> +#include <tqstring.h> +#include <tqtimer.h> #include <string> @@ -49,14 +49,14 @@ extern "C" } } -WaveCapture::WaveCapture() : QObject(0,0), Plugin(), +WaveCapture::WaveCapture() : TQObject(0,0), Plugin(), _enabled( false ), _status( STOPPED ), _capture( Arts::DynamicCast( napp->player()->engine()->server()->createObject( "Arts::Effect_WAVECAPTURE" ) ) ), _count( 0 ), _id( 0 ), _filename( "" ), - _timer( new QTimer( this ) ), + _timer( new TQTimer( this ) ), m_job( 0 ) { NOATUNPLUGINC(WaveCapture); @@ -68,12 +68,12 @@ WaveCapture::WaveCapture() : QObject(0,0), Plugin(), newSong(); - connect( _timer, SIGNAL( timeout() ), SLOT( saveAs() ) ); + connect( _timer, TQT_SIGNAL( timeout() ), TQT_SLOT( saveAs() ) ); - connect(napp->player(), SIGNAL(changed()), SLOT(newSong())); - connect(napp->player(), SIGNAL(stopped()), SLOT(stopped())); - connect(napp->player(), SIGNAL(playing()), SLOT(playing())); - connect(napp->player(), SIGNAL( paused()), SLOT( paused())); + connect(napp->player(), TQT_SIGNAL(changed()), TQT_SLOT(newSong())); + connect(napp->player(), TQT_SIGNAL(stopped()), TQT_SLOT(stopped())); + connect(napp->player(), TQT_SIGNAL(playing()), TQT_SLOT(playing())); + connect(napp->player(), TQT_SIGNAL( paused()), TQT_SLOT( paused())); } WaveCapture::~WaveCapture() @@ -83,15 +83,15 @@ WaveCapture::~WaveCapture() { if( PLAYING == _status ) stop(); - QString filename = QFile::decodeName( (Arts::MCOPUtils::createFilePath( _filename ) + ".wav").c_str() ); - QFile::remove( filename ); + TQString filename = TQFile::decodeName( (Arts::MCOPUtils::createFilePath( _filename ) + ".wav").c_str() ); + TQFile::remove( filename ); } delete m_job; } void WaveCapture::init() { - pluginMenuItem = napp->pluginMenuAdd( i18n( "Wave Capture" ), this, SLOT( toggle() ) ); + pluginMenuItem = napp->pluginMenuAdd( i18n( "Wave Capture" ), this, TQT_SLOT( toggle() ) ); napp->pluginMenu()->setCheckable( true ); } @@ -105,8 +105,8 @@ void WaveCapture::toggle() else { stop(); - QString filename = QFile::decodeName( (Arts::MCOPUtils::createFilePath( _filename ) + ".wav").c_str() ); - QFile::remove( filename ); + TQString filename = TQFile::decodeName( (Arts::MCOPUtils::createFilePath( _filename ) + ".wav").c_str() ); + TQFile::remove( filename ); } } napp->pluginMenu()->setItemChecked( pluginMenuItem, _enabled ); @@ -116,8 +116,8 @@ void WaveCapture::newSong() { if( napp->player()->current() ) { - QString title = napp->player()->current().title(); - _capture.filename( std::string( QFile::encodeName( title ) ) ); + TQString title = napp->player()->current().title(); + _capture.filename( std::string( TQFile::encodeName( title ) ) ); } _timer->start( 0, true ); } @@ -132,9 +132,9 @@ void WaveCapture::saveAs() KFileDialog dlg( ":savedir", "*.wav", 0, "filedialog", true ); dlg.setCaption( i18n( "Save Last Wave File As" ) ); dlg.setOperationMode( KFileDialog::Saving ); - dlg.setSelection( QFile::decodeName( filename.c_str() ) + ".wav" ); + dlg.setSelection( TQFile::decodeName( filename.c_str() ) + ".wav" ); - QString filename2 = QFile::decodeName( (Arts::MCOPUtils::createFilePath( filename ) + ".wav").c_str() ); + TQString filename2 = TQFile::decodeName( (Arts::MCOPUtils::createFilePath( filename ) + ".wav").c_str() ); if( dlg.exec() ) { KURL url = dlg.selectedURL(); @@ -142,11 +142,11 @@ void WaveCapture::saveAs() KRecentDocument::add( url ); m_job = KIO::file_move( KURL( filename2 ), url, -1, true ); - connect( m_job, SIGNAL( result( KIO::Job* ) ), SLOT( copyFinished( KIO::Job* ) ) ); + connect( m_job, TQT_SIGNAL( result( KIO::Job* ) ), TQT_SLOT( copyFinished( KIO::Job* ) ) ); } else { - QFile::remove( filename2 ); + TQFile::remove( filename2 ); } } } |