summaryrefslogtreecommitdiffstats
path: root/src/processcontroller.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-05 19:56:36 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-05 19:56:36 +0000
commitd2627113ba347e79699e280edcd0813265ae780f (patch)
tree47b1d592ac3d522fdc5c755f576970137cbb1169 /src/processcontroller.cpp
parent2e77c0b4ce1781d87a532022d8ebaccff0fb2b17 (diff)
downloadkstreamripper-d2627113ba347e79699e280edcd0813265ae780f.tar.gz
kstreamripper-d2627113ba347e79699e280edcd0813265ae780f.zip
TQt4 port kstreamripper
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kstreamripper@1239914 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/processcontroller.cpp')
-rw-r--r--src/processcontroller.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/processcontroller.cpp b/src/processcontroller.cpp
index f0dfb6c..5713874 100644
--- a/src/processcontroller.cpp
+++ b/src/processcontroller.cpp
@@ -22,12 +22,12 @@
#include "processcontroller.h"
#include "processlistviewitem.h"
-ProcessController::ProcessController(ProcessListViewItem * parent)
- : QObject((QObject *)parent), myParent(parent), myStatus(false), myAutomatic(false), myProcess(new QProcess(this))
+ProcessController::ProcessController(ProcessListViewItem * tqparent)
+ : TQObject((TQObject *)tqparent), myParent(tqparent), mytqStatus(false), myAutomatic(false), myProcess(new TQProcess(this))
{
- connect (myProcess, SIGNAL( readyReadStdout() ), (ProcessController *) this, SLOT( readStdout()) );
- // connect (myProcess, SIGNAL( destroyed() ), myProcess, SLOT( kill()) );
- // this should work, according to http://doc.trolltech.com/3.2/qobject.html#~QObject but it doesn't
+ connect (myProcess, TQT_SIGNAL( readyReadStdout() ), (ProcessController *) this, TQT_SLOT( readStdout()) );
+ // connect (myProcess, TQT_SIGNAL( destroyed() ), myProcess, TQT_SLOT( kill()) );
+ // this should work, according to http://doc.trolltech.com/3.2/qobject.html#~TQObject but it doesn't
}
ProcessController::~ProcessController()
@@ -37,41 +37,41 @@ ProcessController::~ProcessController()
void ProcessController::readStdout()
{
- QString tempOutput = myProcess->readStdout();
+ TQString tempOutput = myProcess->readStdout();
- if( tempOutput.contains( "ripping..." ))
+ if( tempOutput.tqcontains( "ripping..." ))
{
- QString songname = tempOutput.mid( tempOutput.find( "]" )+1, tempOutput.findRev( "[" ) - tempOutput.find( "]" ) - 1);
+ TQString songname = tempOutput.mid( tempOutput.tqfind( "]" )+1, tempOutput.tqfindRev( "[" ) - tempOutput.tqfind( "]" ) - 1);
myParent->setText( 1, songname.stripWhiteSpace() );
- QString bytesR = tempOutput.mid( tempOutput.findRev( "[" )+1, tempOutput.findRev( "]" ) - tempOutput.findRev( "[" ) - 1);
+ TQString bytesR = tempOutput.mid( tempOutput.tqfindRev( "[" )+1, tempOutput.tqfindRev( "]" ) - tempOutput.tqfindRev( "[" ) - 1);
myParent->setText( 2, bytesR.stripWhiteSpace() );
}
- if( tempOutput.contains( "Connecting..." ))
+ if( tempOutput.tqcontains( "Connecting..." ))
{
myParent->setText( 1, "Connecting..." );
myParent->setText( 2, "" );
}
- if( tempOutput.contains( "buffering" ))
+ if( tempOutput.tqcontains( "buffering" ))
{
myParent->setText( 1, "Buffering..." );
myParent->setText( 2, "" );
}
- if( tempOutput.contains( "Time to stop is here" ))
+ if( tempOutput.tqcontains( "Time to stop is here" ))
{
myParent->setText( 1, "Complete" );
myParent->setText( 2, "" );
- //QTimer::singleShot( 1500, myParent, SLOT( setEmptyText(3) ));
+ //TQTimer::singleShot( 1500, myParent, TQT_SLOT( setEmptyText(3) ));
}
}
-void ProcessController::startRip(QString destination, QString time)
+void ProcessController::startRip(TQString destination, TQString time)
{
- myStatus = true;
+ mytqStatus = true;
myParent->setText( 1, "Ripping" );
myProcess->clearArguments();
@@ -85,28 +85,28 @@ void ProcessController::startRip(QString destination, QString time)
myProcess->addArgument( time );
}
- myProcess->setCommunication( QProcess::Stdout | QProcess::Stderr | QProcess::DupStderr );
+ myProcess->setCommunication( TQProcess::Stdout | TQProcess::Stderr | TQProcess::DupStderr );
myProcess->start();
}
void ProcessController::stopRip()
{
- myStatus = false;
+ mytqStatus = false;
myParent->setText( 1, "" );
myParent->setText( 2, "" );
myProcess->tryTerminate();
- QTimer::singleShot( 2000, myProcess, SLOT( kill() ) );
+ TQTimer::singleShot( 2000, myProcess, TQT_SLOT( kill() ) );
}
-bool ProcessController::getStatus()
+bool ProcessController::gettqStatus()
{
- return myStatus;
+ return mytqStatus;
}
-QString ProcessController::getUrl()
+TQString ProcessController::getUrl()
{
return myUrl;
}
@@ -132,17 +132,17 @@ DNSSD::RemoteService::Ptr ProcessController::getService()
}
#endif
-QString ProcessController::getDescription()
+TQString ProcessController::getDescription()
{
return myDescription;
}
-void ProcessController::setUrl(QString Url)
+void ProcessController::setUrl(TQString Url)
{
myUrl = Url;
}
-void ProcessController::setDescription(QString Description)
+void ProcessController::setDescription(TQString Description)
{
myDescription = Description;
}