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
v3.5.13-sru
tpearson 13 years ago
parent 2e77c0b4ce
commit d2627113ba

@ -80,21 +80,21 @@ def detect_kde(env):
env.Exit(1)
env['QTDIR'] = qtdir.strip()
## Find the necessary programs uic and moc
print "Checking for uic : ",
uic = qtdir + "/bin/uic"
## Find the necessary programs uic-tqt and moc
print "Checking for uic-tqt : ",
uic = qtdir + "/bin/uic-tqt"
if os.path.isfile(uic):
print GREEN+"uic was found as "+uic+NORMAL
print GREEN+"uic-tqt was found as "+uic+NORMAL
else:
uic = os.popen("which uic 2>/dev/null").read().strip()
uic = os.popen("which uic-tqt 2>/dev/null").read().strip()
if len(uic):
print YELLOW+"uic was found as "+uic+NORMAL
print YELLOW+"uic-tqt was found as "+uic+NORMAL
else:
uic = os.popen("which uic 2>/dev/null").read().strip()
uic = os.popen("which uic-tqt 2>/dev/null").read().strip()
if len(uic):
print YELLOW+"uic was found as "+uic+NORMAL
print YELLOW+"uic-tqt was found as "+uic+NORMAL
else:
print RED+"uic was not found - set QTDIR put it in your PATH ?"+NORMAL
print RED+"uic-tqt was not found - set QTDIR put it in your PATH ?"+NORMAL
env.Exit(1)
env['QT_UIC'] = uic
@ -128,6 +128,10 @@ def detect_kde(env):
# Debian probably
print YELLOW+"the qt headers were found in /usr/include/qt3/ "+NORMAL
qtincludes = "/usr/include/qt3"
elif os.path.isfile("/usr/include/qt4/Qt/qglobal.h"):
# Debian probably
print YELLOW+"the qt headers were found in /usr/include/qt4/ "+NORMAL
qtincludes = "/usr/include/qt4"
else:
print RED+"the qt headers were not found"+NORMAL
env.Exit(1)
@ -309,7 +313,7 @@ ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
env['QT_UIC_HFLAGS'] = '-L $QTPLUGINS -nounload'
env['QT_UIC_CFLAGS'] = '$QT_UIC_HFLAGS -tr tr2i18n'
env['QT_LIBS'] = 'qt-mt'
env['QT_LIBS'] = 'tqt'
env['LIBTOOL_FLAGS'] = '--silent --mode=compile --tag=CXX'

@ -93,21 +93,21 @@ def detect_kde(env):
env.Exit(1)
env['QTDIR'] = qtdir.strip()
## Find the necessary programs uic and moc
print "Checking for uic : ",
uic = qtdir + "/bin/uic"
## Find the necessary programs uic-tqt and moc
print "Checking for uic-tqt : ",
uic = qtdir + "/bin/uic-tqt"
if os.path.isfile(uic):
print GREEN+"uic was found as "+uic+NORMAL
print GREEN+"uic-tqt was found as "+uic+NORMAL
else:
uic = os.popen("which uic 2>/dev/null").read().strip()
uic = os.popen("which uic-tqt 2>/dev/null").read().strip()
if len(uic):
print YELLOW+"uic was found as "+uic+NORMAL
print YELLOW+"uic-tqt was found as "+uic+NORMAL
else:
uic = os.popen("which uic 2>/dev/null").read().strip()
uic = os.popen("which uic-tqt 2>/dev/null").read().strip()
if len(uic):
print YELLOW+"uic was found as "+uic+NORMAL
print YELLOW+"uic-tqt was found as "+uic+NORMAL
else:
print RED+"uic was not found - set QTDIR put it in your PATH ?"+NORMAL
print RED+"uic-tqt was not found - set QTDIR put it in your PATH ?"+NORMAL
env.Exit(1)
env['QT_UIC'] = uic
@ -141,6 +141,10 @@ def detect_kde(env):
# Debian probably
print YELLOW + "the qt headers were found in /usr/include/qt3/ " + NORMAL
qtincludes = "/usr/include/qt3"
elif os.path.isfile("/usr/include/qt4/Qt/qglobal.h"):
# Debian probably
print YELLOW + "the qt headers were found in /usr/include/qt4/ " + NORMAL
qtincludes = "/usr/include/qt4"
else:
print RED + "the qt headers were not found" + NORMAL
env.Exit(1)
@ -424,7 +428,7 @@ ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt
env['QT_DEBUG'] = 0
env['QT_UIC_HFLAGS'] = '-L $QTPLUGINS -nounload'
env['QT_UIC_CFLAGS'] = '$QT_UIC_HFLAGS -tr tr2i18n'
env['QT_LIBS'] = 'qt-mt'
env['QT_LIBS'] = 'tqt'
env['QT_UICIMPLPREFIX'] = ''
env['QT_UICIMPLSUFFIX'] = '.cpp'

@ -43,7 +43,7 @@ myenv.KDEprogram( "kstreamripper", kstreamripper_sources )
myenv.KDEaddpaths_includes( ['./', '../'] )
## Necessary libraries to link against
myenv.KDEaddlibs( ['qt-mt', 'kio', 'kdeui'] )
myenv.KDEaddlibs( ['tqt', 'kio', 'kdeui'] )
if env['KDEm2']>3: myenv.KDEaddlibs( ['kdnssd'])
#############################
## Data to install

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>AddNewStream</class>
<widget class="QDialog">
<widget class="TQDialog">
<property name="name">
<cstring>AddNewStream</cstring>
</property>
@ -22,7 +22,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QFrame" row="0" column="0" rowspan="1" colspan="2">
<widget class="TQFrame" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>frame3</cstring>
</property>
@ -36,7 +36,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="0" column="0">
<widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>d_nameLabel</cstring>
</property>
@ -44,7 +44,7 @@
<string>Name:</string>
</property>
</widget>
<widget class="QLabel" row="2" column="0">
<widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>d_descriptionLabel</cstring>
</property>
@ -52,22 +52,22 @@
<string>Description:</string>
</property>
</widget>
<widget class="QLineEdit" row="0" column="1">
<widget class="TQLineEdit" row="0" column="1">
<property name="name">
<cstring>d_nameEdit</cstring>
</property>
</widget>
<widget class="QLineEdit" row="1" column="1">
<widget class="TQLineEdit" row="1" column="1">
<property name="name">
<cstring>d_urlEdit</cstring>
</property>
</widget>
<widget class="QLineEdit" row="2" column="1">
<widget class="TQLineEdit" row="2" column="1">
<property name="name">
<cstring>d_descEdit</cstring>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>d_urlLabel</cstring>
</property>
@ -77,7 +77,7 @@
</widget>
</grid>
</widget>
<widget class="QPushButton" row="1" column="0">
<widget class="TQPushButton" row="1" column="0">
<property name="name">
<cstring>d_okButton</cstring>
</property>
@ -91,7 +91,7 @@
<string>Alt+O</string>
</property>
</widget>
<widget class="QPushButton" row="1" column="1">
<widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>d_cancelButton</cstring>
</property>
@ -104,5 +104,5 @@
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
<tqlayoutdefaults spacing="6" margin="11"/>
</UI>

@ -20,17 +20,17 @@
#include <kmessagebox.h>
#include <qpushbutton.h>
#include <qlineedit.h>
#include <tqpushbutton.h>
#include <tqlineedit.h>
#include "addnewstreamimpl.h"
AddNewStreamImpl::AddNewStreamImpl( QWidget* parent, const char* name )
: AddNewStream( parent,name, true )
AddNewStreamImpl::AddNewStreamImpl( TQWidget* tqparent, const char* name )
: AddNewStream( tqparent,name, true )
{
connect( d_okButton, SIGNAL( clicked()), this, SLOT( okButtonClicked()) );
connect( d_cancelButton, SIGNAL( clicked()), this, SLOT( cancelButtonClicked()) );
connect( d_okButton, TQT_SIGNAL( clicked()), this, TQT_SLOT( okButtonClicked()) );
connect( d_cancelButton, TQT_SIGNAL( clicked()), this, TQT_SLOT( cancelButtonClicked()) );
}

@ -26,10 +26,11 @@
class AddNewStreamImpl : public AddNewStream
{
Q_OBJECT
TQ_OBJECT
public:
AddNewStreamImpl( QWidget* parent = 0, const char* name = 0 );
AddNewStreamImpl( TQWidget* tqparent = 0, const char* name = 0 );
~AddNewStreamImpl();
protected:

@ -25,18 +25,18 @@
#include <kfiledialog.h>
#include <kaboutapplication.h>
#include <qpushbutton.h>
#include <qlistview.h>
#include <qlineedit.h>
#include <qdir.h>
#include <qstring.h>
#include <qstringlist.h>
#include <qbuttongroup.h>
#include <qcheckbox.h>
#include <qprocess.h>
#include <qtextedit.h>
#include <qframe.h>
#include <qtimer.h>
#include <tqpushbutton.h>
#include <tqlistview.h>
#include <tqlineedit.h>
#include <tqdir.h>
#include <tqstring.h>
#include <tqstringlist.h>
#include <tqbuttongroup.h>
#include <tqcheckbox.h>
#include <tqprocess.h>
#include <tqtextedit.h>
#include <tqframe.h>
#include <tqtimer.h>
#include <kmessagebox.h>
#include <kstandarddirs.h>
#include <kdeversion.h>
@ -48,16 +48,16 @@
KStreamRipper::KStreamRipper( QWidget* parent, const char* name )
: KStreamRipperBase( parent,name )
KStreamRipper::KStreamRipper( TQWidget* tqparent, const char* name )
: KStreamRipperBase( tqparent,name )
#if KDE_IS_VERSION(3,3,90)
, m_browser("_shoutcast._tcp",0,true)
#endif
{
m_destEdit->setText( QDir::homeDirPath() );
m_destEdit->setText( TQDir::homeDirPath() );
m_streamsListView->addColumn( "Name" );
m_streamsListView->addColumn( "Status" );
m_streamsListView->addColumn( "tqStatus" );
m_streamsListView->addColumn( "Size" );
//app config
@ -69,12 +69,12 @@ KStreamRipper::KStreamRipper( QWidget* parent, const char* name )
m_id3Checkbox->setChecked( appConfig->readBoolEntry( "Id3Tag", 1 ));
//listview entrys
QStringList nameList,urlList,descList;
TQStringList nameList,urlList,descList;
nameList = appConfig->readListEntry( "names" );
urlList = appConfig->readListEntry( "urls" );
descList = appConfig->readListEntry( "descs" );
QStringList::iterator iter1, iter2, iter3;
TQStringList::iterator iter1, iter2, iter3;
iter1 = nameList.begin();
iter2 = urlList.begin();
iter3 = descList.begin();
@ -90,26 +90,26 @@ KStreamRipper::KStreamRipper( QWidget* parent, const char* name )
//CONNECTS
//clicks
connect(m_addStreamButton, SIGNAL(clicked()), this, SLOT(addStreamButtonClicked()));
connect(m_deleteStreamButton, SIGNAL(clicked()), this, SLOT(deleteStreamButtonClicked()));
connect(m_tuneInButton, SIGNAL(clicked()), this, SLOT(tuneInButtonClicked()));
connect(m_ripButton, SIGNAL(clicked()), this, SLOT(ripButtonClicked()));
connect(m_stopRipButton, SIGNAL(clicked()), this, SLOT(stopRipButtonClicked()));
connect(m_browseButton, SIGNAL(clicked()), this, SLOT(browseButtonClicked()));
connect(m_aboutButton, SIGNAL(clicked()), this, SLOT(aboutButtonClicked()));
connect(m_quitButton, SIGNAL(clicked()), this, SLOT(quitButtonClicked()));
connect(m_addStreamButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(addStreamButtonClicked()));
connect(m_deleteStreamButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteStreamButtonClicked()));
connect(m_tuneInButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(tuneInButtonClicked()));
connect(m_ripButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(ripButtonClicked()));
connect(m_stopRipButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(stopRipButtonClicked()));
connect(m_browseButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(browseButtonClicked()));
connect(m_aboutButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(aboutButtonClicked()));
connect(m_quitButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(quitButtonClicked()));
//other
connect( m_streamsListView, SIGNAL(selectionChanged()), this, SLOT( selectedNewListItem()) );
connect( m_DescriptionEdit, SIGNAL(textChanged(const QString&)), this, SLOT( descriptionChanged()) );
connect( m_UrlEdit, SIGNAL(textChanged(const QString&)), this, SLOT( urlChanged()) );
connect( m_streamsListView, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT( selectedNewListItem()) );
connect( m_DescriptionEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT( descriptionChanged()) );
connect( m_UrlEdit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT( urlChanged()) );
// zeroconf
#if KDE_IS_VERSION(3,3,90)
connect(&m_browser, SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)), this,
SLOT(serviceAdded(DNSSD::RemoteService::Ptr)));
connect(&m_browser, SIGNAL(serviceRemoved(DNSSD::RemoteService::Ptr)), this,
SLOT(serviceRemoved(DNSSD::RemoteService::Ptr)));
connect(&m_browser, TQT_SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)), this,
TQT_SLOT(serviceAdded(DNSSD::RemoteService::Ptr)));
connect(&m_browser, TQT_SIGNAL(serviceRemoved(DNSSD::RemoteService::Ptr)), this,
TQT_SLOT(serviceRemoved(DNSSD::RemoteService::Ptr)));
m_browser.startBrowse();
#endif
}
@ -120,7 +120,7 @@ KStreamRipper::~KStreamRipper()
}
void KStreamRipper::closeEvent( QCloseEvent *e )
void KStreamRipper::closeEvent( TQCloseEvent *e )
{
KConfig *appConfig = KGlobal::config();
@ -131,8 +131,8 @@ void KStreamRipper::closeEvent( QCloseEvent *e )
//save the listview entrys
QStringList nameList,urlList,descList;
QListViewItemIterator iter( m_streamsListView );
TQStringList nameList,urlList,descList;
TQListViewItemIterator iter( m_streamsListView );
while( iter.current() )
{
@ -159,7 +159,7 @@ void KStreamRipper::closeEvent( QCloseEvent *e )
void KStreamRipper::addStreamButtonClicked()
{
AddNewStreamImpl *test = new AddNewStreamImpl( this );
connect( test, SIGNAL( finished( AddNewStreamImpl* )), this, SLOT( addStreamFinished( AddNewStreamImpl* )) );
connect( test, TQT_SIGNAL( finished( AddNewStreamImpl* )), this, TQT_SLOT( addStreamFinished( AddNewStreamImpl* )) );
test->show();
}
@ -175,11 +175,11 @@ void KStreamRipper::tuneInButtonClicked()
{
if( m_streamsListView->currentItem() )
{
QString command = m_tuneInEdit->text().replace( "<url>", m_UrlEdit->text() );
TQString command = m_tuneInEdit->text().tqreplace( "<url>", m_UrlEdit->text() );
QStringList commands = QStringList::split( " ", command );
TQStringList commands = TQStringList::split( " ", command );
QProcess *process = new QProcess( this );
TQProcess *process = new TQProcess( TQT_TQOBJECT(this) );
process->setArguments( commands );
process->start();
@ -191,7 +191,7 @@ void KStreamRipper::tuneInButtonClicked()
void KStreamRipper::serviceAdded(DNSSD::RemoteService::Ptr srv)
{
ProcessListViewItem * proc = new ProcessListViewItem( m_streamsListView, srv->serviceName(), "", "");
proc->getProcessController()->setUrl( QString("http://%1:%2%3").arg(srv->hostName()).arg(srv->port()).arg(srv->textData()["path"]) );
proc->getProcessController()->setUrl( TQString("http://%1:%2%3").tqarg(srv->hostName()).tqarg(srv->port()).tqarg(srv->textData()["path"]) );
proc->getProcessController()->setDescription( i18n("found by Zeroconf") );
proc->getProcessController()->setAutomatic(true);
proc->getProcessController()->setService(srv);
@ -199,7 +199,7 @@ void KStreamRipper::serviceAdded(DNSSD::RemoteService::Ptr srv)
}
void KStreamRipper::serviceRemoved(DNSSD::RemoteService::Ptr srv)
{
QListViewItemIterator iter( m_streamsListView );
TQListViewItemIterator iter( m_streamsListView );
while( iter.current() ) {
ProcessListViewItem * ProcItem = (ProcessListViewItem*)iter.current();
@ -237,7 +237,7 @@ void KStreamRipper::stopRipButtonClicked()
void KStreamRipper::browseButtonClicked()
{
QString openDest = KFileDialog::getExistingDirectory( QDir::homeDirPath(),
TQString openDest = KFileDialog::getExistingDirectory( TQDir::homeDirPath(),
this,
"Select Destination..." );
m_destEdit->setText( openDest );
@ -260,17 +260,17 @@ void KStreamRipper::selectedNewListItem()
m_deleteStreamButton->setEnabled( false );
m_tuneInButton->setEnabled( false );
m_ripButton->setEnabled( false );
m_DescriptionEdit->setText( QString::null );
m_DescriptionEdit->setText( TQString() );
m_DescriptionEdit->setEnabled(false);
m_UrlEdit->setEnabled(false);
m_UrlEdit->setText( QString::null );
m_UrlEdit->setText( TQString() );
return;
}
ProcessController * ProcCtl = ((ProcessListViewItem*)m_streamsListView->currentItem())->getProcessController();
// reconfigure what the user is allowed to do based on if this process is ripping
m_ripButton->setEnabled( !ProcCtl->getStatus() );
m_stopRipButton->setEnabled( ProcCtl->getStatus() );
m_ripButton->setEnabled( !ProcCtl->gettqStatus() );
m_stopRipButton->setEnabled( ProcCtl->gettqStatus() );
m_tuneInButton->setEnabled( true );
m_deleteStreamButton->setEnabled( !ProcCtl->getAutomatic() );
@ -281,8 +281,8 @@ void KStreamRipper::selectedNewListItem()
// maybe these are more elegant than the next two functions, assuming the slots are implemented in ProcessController
//connect(m_DescriptionEdit, SIGNAL(textChanged(const QString&)), (ProcessListViewItem*)m_streamsListView->currentItem()->getProcessController(), SIGNAL(descriptionChanged(const QString&))
//connect(m_UrlEdit, SIGNAL(textChanged(const QString&)), (ProcessListViewItem*)m_streamsListView->currentItem()->getProcessController(), SIGNAL(urlChanged(const QString&))
//connect(m_DescriptionEdit, TQT_SIGNAL(textChanged(const TQString&)), (ProcessListViewItem*)m_streamsListView->currentItem()->getProcessController(), TQT_SIGNAL(descriptionChanged(const TQString&))
//connect(m_UrlEdit, TQT_SIGNAL(textChanged(const TQString&)), (ProcessListViewItem*)m_streamsListView->currentItem()->getProcessController(), TQT_SIGNAL(urlChanged(const TQString&))
}
void KStreamRipper::descriptionChanged()

@ -27,25 +27,26 @@
#include <dnssd/servicebrowser.h>
#include <dnssd/remoteservice.h>
#else
// damned moc will create slots regardless of #if macro
// damned tqmoc will create slots regardless of #if macro
// this is hack to avoid undefined type
namespace DNSSD { namespace RemoteService { typedef int Ptr; } }
#endif
class AddNewStreamImpl;
class QString;
class TQString;
class KStreamRipper : public KStreamRipperBase
{
Q_OBJECT
TQ_OBJECT
public:
KStreamRipper( QWidget* parent = 0, const char* name = 0 );
KStreamRipper( TQWidget* tqparent = 0, const char* name = 0 );
~KStreamRipper();
virtual void closeEvent( QCloseEvent* );
virtual void closeEvent( TQCloseEvent* );
#if KDE_IS_VERSION(3,3,90)
DNSSD::ServiceBrowser m_browser;
#endif

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>KStreamRipperBase</class>
<widget class="QWidget">
<widget class="TQWidget">
<property name="name">
<cstring>KStreamRipperBase</cstring>
</property>
@ -29,14 +29,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>31</width>
<height>20</height>
</size>
</property>
</spacer>
<widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
<widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>m_favoriteLabel</cstring>
</property>
@ -44,15 +44,15 @@
<string>Your Radio Streams:</string>
</property>
</widget>
<widget class="QLayoutWidget" row="6" column="1">
<widget class="TQLayoutWidget" row="6" column="1">
<property name="name">
<cstring>layout10</cstring>
<cstring>tqlayout10</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QPushButton">
<widget class="TQPushButton">
<property name="name">
<cstring>m_aboutButton</cstring>
</property>
@ -60,7 +60,7 @@
<string>About</string>
</property>
</widget>
<widget class="QPushButton">
<widget class="TQPushButton">
<property name="name">
<cstring>m_quitButton</cstring>
</property>
@ -80,14 +80,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<property name="tqsizeHint">
<size>
<width>421</width>
<height>21</height>
</size>
</property>
</spacer>
<widget class="QButtonGroup" row="3" column="0" rowspan="1" colspan="2">
<widget class="TQButtonGroup" row="3" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>m_streamsGroup</cstring>
</property>
@ -98,7 +98,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QPushButton" row="0" column="0">
<widget class="TQPushButton" row="0" column="0">
<property name="name">
<cstring>m_addStreamButton</cstring>
</property>
@ -109,7 +109,7 @@
<string>Alt+A</string>
</property>
</widget>
<widget class="QPushButton" row="0" column="1">
<widget class="TQPushButton" row="0" column="1">
<property name="name">
<cstring>m_deleteStreamButton</cstring>
</property>
@ -123,7 +123,7 @@
<string>Alt+D</string>
</property>
</widget>
<widget class="QPushButton" row="0" column="4">
<widget class="TQPushButton" row="0" column="4">
<property name="name">
<cstring>m_stopRipButton</cstring>
</property>
@ -140,7 +140,7 @@
<bool>false</bool>
</property>
</widget>
<widget class="QPushButton" row="0" column="2">
<widget class="TQPushButton" row="0" column="2">
<property name="name">
<cstring>m_tuneInButton</cstring>
</property>
@ -154,7 +154,7 @@
<string>Alt+T</string>
</property>
</widget>
<widget class="QPushButton" row="0" column="3">
<widget class="TQPushButton" row="0" column="3">
<property name="name">
<cstring>m_ripButton</cstring>
</property>
@ -170,7 +170,7 @@
</widget>
</grid>
</widget>
<widget class="QListView" row="1" column="0" rowspan="1" colspan="2">
<widget class="TQListView" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>m_streamsListView</cstring>
</property>
@ -184,7 +184,7 @@
<enum>Reject</enum>
</property>
</widget>
<widget class="QGroupBox" row="4" column="0" rowspan="1" colspan="2">
<widget class="TQGroupBox" row="4" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>m_settingsGroup</cstring>
</property>
@ -198,7 +198,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="0" column="0">
<widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>m_pathLabel</cstring>
</property>
@ -206,7 +206,7 @@
<string>Destination:</string>
</property>
</widget>
<widget class="QLabel" row="1" column="0">
<widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>m_timeToRip</cstring>
</property>
@ -214,7 +214,7 @@
<string>Time to Rip:</string>
</property>
</widget>
<widget class="QLabel" row="0" column="3">
<widget class="TQLabel" row="0" column="3">
<property name="name">
<cstring>m_id3Label</cstring>
</property>
@ -222,7 +222,7 @@
<string>Add ID3 Tag:</string>
</property>
</widget>
<widget class="QCheckBox" row="0" column="4">
<widget class="TQCheckBox" row="0" column="4">
<property name="name">
<cstring>m_id3Checkbox</cstring>
</property>
@ -233,7 +233,7 @@
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" row="2" column="0">
<widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>m_tuneInLabel</cstring>
</property>
@ -241,7 +241,7 @@
<string>Tune in Command:</string>
</property>
</widget>
<widget class="QLabel" row="1" column="2">
<widget class="TQLabel" row="1" column="2">
<property name="name">
<cstring>m_secondsLabel</cstring>
</property>
@ -249,7 +249,7 @@
<string>seconds</string>
</property>
</widget>
<widget class="QPushButton" row="0" column="2">
<widget class="TQPushButton" row="0" column="2">
<property name="name">
<cstring>m_browseButton</cstring>
</property>
@ -257,7 +257,7 @@
<string>....</string>
</property>
</widget>
<widget class="QLineEdit" row="2" column="1">
<widget class="TQLineEdit" row="2" column="1">
<property name="name">
<cstring>m_tuneInEdit</cstring>
</property>
@ -265,7 +265,7 @@
<string>xmms &lt;url&gt;</string>
</property>
</widget>
<widget class="QLineEdit" row="1" column="1">
<widget class="TQLineEdit" row="1" column="1">
<property name="name">
<cstring>m_timeEdit</cstring>
</property>
@ -273,7 +273,7 @@
<string>0</string>
</property>
</widget>
<widget class="QLineEdit" row="0" column="1">
<widget class="TQLineEdit" row="0" column="1">
<property name="name">
<cstring>m_destEdit</cstring>
</property>
@ -283,7 +283,7 @@
</widget>
</grid>
</widget>
<widget class="QGroupBox" row="2" column="0" rowspan="1" colspan="2">
<widget class="TQGroupBox" row="2" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>m_Details</cstring>
</property>
@ -294,7 +294,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="QLabel" row="0" column="0">
<widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>m_StreamDesc</cstring>
</property>
@ -302,7 +302,7 @@
<string>Description:</string>
</property>
</widget>
<widget class="QLabel" row="1" column="0" rowspan="2" colspan="2">
<widget class="TQLabel" row="1" column="0" rowspan="2" colspan="2">
<property name="name">
<cstring>m_StreamURL</cstring>
</property>
@ -310,7 +310,7 @@
<string>URL:</string>
</property>
</widget>
<widget class="QLineEdit" row="2" column="1">
<widget class="TQLineEdit" row="2" column="1">
<property name="name">
<cstring>m_UrlEdit</cstring>
</property>
@ -321,7 +321,7 @@
<bool>true</bool>
</property>
</widget>
<widget class="QLineEdit" row="0" column="1">
<widget class="TQLineEdit" row="0" column="1">
<property name="name">
<cstring>m_DescriptionEdit</cstring>
</property>
@ -333,5 +333,5 @@
</widget>
</grid>
</widget>
<layoutdefaults spacing="6" margin="11"/>
<tqlayoutdefaults spacing="6" margin="11"/>
</UI>

@ -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;
}

@ -21,10 +21,10 @@
#ifndef PROCESSCONTROLLER_H
#define PROCESSCONTROLLER_H
#include <qprocess.h>
#include <qstring.h>
#include <qtimer.h>
#include <qobject.h>
#include <tqprocess.h>
#include <tqstring.h>
#include <tqtimer.h>
#include <tqobject.h>
#include <kdeversion.h>
#if KDE_IS_VERSION(3,3,90)
#include <dnssd/remoteservice.h>
@ -32,25 +32,26 @@
class ProcessListViewItem;
class ProcessController : public QObject
class ProcessController : public TQObject
{
Q_OBJECT
TQ_OBJECT
public:
ProcessController(ProcessListViewItem * parent);
ProcessController(ProcessListViewItem * tqparent);
~ProcessController();
bool getStatus();
bool gettqStatus();
bool getAutomatic();
void setAutomatic(bool a);
#if KDE_IS_VERSION(3,3,90)
DNSSD::RemoteService::Ptr getService();
void setService(DNSSD::RemoteService::Ptr service);
#endif
void setUrl(QString Url);
void setDescription(QString Description);
QString getUrl();
QString getDescription();
void startRip(QString destination, QString time);
void setUrl(TQString Url);
void setDescription(TQString Description);
TQString getUrl();
TQString getDescription();
void startRip(TQString destination, TQString time);
void stopRip();
protected slots:
@ -58,14 +59,14 @@ protected slots:
private:
ProcessListViewItem * myParent;
bool myStatus;
bool mytqStatus;
bool myAutomatic;
#if KDE_IS_VERSION(3,3,90)
DNSSD::RemoteService::Ptr myService;
#endif
QProcess * myProcess;
QString myUrl;
QString myDescription;
TQProcess * myProcess;
TQString myUrl;
TQString myDescription;
};
#endif

@ -24,76 +24,76 @@
#include "processlistviewitem.h"
#include "processcontroller.h"
ProcessListViewItem::ProcessListViewItem( QListView * parent )
: QListViewItem(parent), myProcessController(new ProcessController(this))
ProcessListViewItem::ProcessListViewItem( TQListView * tqparent )
: TQListViewItem(tqparent), myProcessController(new ProcessController(this))
{
}
ProcessListViewItem::ProcessListViewItem( QListViewItem * parent )
: QListViewItem(parent), myProcessController(new ProcessController(this))
ProcessListViewItem::ProcessListViewItem( TQListViewItem * tqparent )
: TQListViewItem(tqparent), myProcessController(new ProcessController(this))
{
}
ProcessListViewItem::ProcessListViewItem( QListView * parent, QListViewItem * after )
: QListViewItem(parent, after), myProcessController(new ProcessController(this))
ProcessListViewItem::ProcessListViewItem( TQListView * tqparent, TQListViewItem * after )
: TQListViewItem(tqparent, after), myProcessController(new ProcessController(this))
{
}
ProcessListViewItem::ProcessListViewItem( QListViewItem * parent, QListViewItem * after )
: QListViewItem(parent, after), myProcessController(new ProcessController(this))
ProcessListViewItem::ProcessListViewItem( TQListViewItem * tqparent, TQListViewItem * after )
: TQListViewItem(tqparent, after), myProcessController(new ProcessController(this))
{
}
ProcessListViewItem::ProcessListViewItem( QListView * parent,
QString label1,
QString label2,
QString label3,
QString label4,
QString label5,
QString label6,
QString label7,
QString label8 )
: QListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8), myProcessController(new ProcessController(this))
ProcessListViewItem::ProcessListViewItem( TQListView * tqparent,
TQString label1,
TQString label2,
TQString label3,
TQString label4,
TQString label5,
TQString label6,
TQString label7,
TQString label8 )
: TQListViewItem(tqparent, label1, label2, label3, label4, label5, label6, label7, label8), myProcessController(new ProcessController(this))
{
}
ProcessListViewItem::ProcessListViewItem( QListViewItem * parent,
QString label1,
QString label2,
QString label3,
QString label4,
QString label5,
QString label6,
QString label7,
QString label8 )
: QListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8), myProcessController(new ProcessController(this))
ProcessListViewItem::ProcessListViewItem( TQListViewItem * tqparent,
TQString label1,
TQString label2,
TQString label3,
TQString label4,
TQString label5,
TQString label6,
TQString label7,
TQString label8 )
: TQListViewItem(tqparent, label1, label2, label3, label4, label5, label6, label7, label8), myProcessController(new ProcessController(this))
{
}
ProcessListViewItem::ProcessListViewItem( QListView * parent, QListViewItem * after,
QString label1,
QString label2,
QString label3,
QString label4,
QString label5,
QString label6,
QString label7,
QString label8 )
: QListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8),
ProcessListViewItem::ProcessListViewItem( TQListView * tqparent, TQListViewItem * after,
TQString label1,
TQString label2,
TQString label3,
TQString label4,
TQString label5,
TQString label6,
TQString label7,
TQString label8 )
: TQListViewItem(tqparent, after, label1, label2, label3, label4, label5, label6, label7, label8),
myProcessController(new ProcessController(this))
{
}
ProcessListViewItem::ProcessListViewItem( QListViewItem * parent, QListViewItem * after,
QString label1,
QString label2,
QString label3,
QString label4,
QString label5,
QString label6,
QString label7,
QString label8 )
: QListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8),
ProcessListViewItem::ProcessListViewItem( TQListViewItem * tqparent, TQListViewItem * after,
TQString label1,
TQString label2,
TQString label3,
TQString label4,
TQString label5,
TQString label6,
TQString label7,
TQString label8 )
: TQListViewItem(tqparent, after, label1, label2, label3, label4, label5, label6, label7, label8),
myProcessController(new ProcessController(this))
{
}

@ -22,43 +22,44 @@
#ifndef PROCESSLISTVIEWITEM_H
#define PROCESSLISTVIEWITEM_H
#include <qlistview.h>
#include <qstring.h>
#include <qobject.h>
#include <tqlistview.h>
#include <tqstring.h>
#include <tqobject.h>
class ProcessController;
class ProcessListViewItem : public QObject, public QListViewItem
class ProcessListViewItem : public TQObject, public TQListViewItem
{
Q_OBJECT
TQ_OBJECT
public:
ProcessListViewItem( QListView * parent );
ProcessListViewItem( QListViewItem * parent );
ProcessListViewItem( QListView * parent, QListViewItem * after );
ProcessListViewItem( QListViewItem * parent, QListViewItem * after );
ProcessListViewItem( TQListView * tqparent );
ProcessListViewItem( TQListViewItem * tqparent );
ProcessListViewItem( TQListView * tqparent, TQListViewItem * after );
ProcessListViewItem( TQListViewItem * tqparent, TQListViewItem * after );
ProcessListViewItem( QListView * parent,
QString, QString = QString::null,
QString = QString::null, QString = QString::null,
QString = QString::null, QString = QString::null,
QString = QString::null, QString = QString::null );
ProcessListViewItem( QListViewItem * parent,
QString, QString = QString::null,
QString = QString::null, QString = QString::null,
QString = QString::null, QString = QString::null,
QString = QString::null, QString = QString::null );
ProcessListViewItem( TQListView * tqparent,
TQString, TQString = TQString(),
TQString = TQString(), TQString = TQString(),
TQString = TQString(), TQString = TQString(),
TQString = TQString(), TQString = TQString() );
ProcessListViewItem( TQListViewItem * tqparent,
TQString, TQString = TQString(),
TQString = TQString(), TQString = TQString(),
TQString = TQString(), TQString = TQString(),
TQString = TQString(), TQString = TQString() );
ProcessListViewItem( QListView * parent, QListViewItem * after,
QString, QString = QString::null,
QString = QString::null, QString = QString::null,
QString = QString::null, QString = QString::null,
QString = QString::null, QString = QString::null );
ProcessListViewItem( QListViewItem * parent, QListViewItem * after,
QString, QString = QString::null,
QString = QString::null, QString = QString::null,
QString = QString::null, QString = QString::null,
QString = QString::null, QString = QString::null );
ProcessListViewItem( TQListView * tqparent, TQListViewItem * after,
TQString, TQString = TQString(),
TQString = TQString(), TQString = TQString(),
TQString = TQString(), TQString = TQString(),
TQString = TQString(), TQString = TQString() );
ProcessListViewItem( TQListViewItem * tqparent, TQListViewItem * after,
TQString, TQString = TQString(),
TQString = TQString(), TQString = TQString(),
TQString = TQString(), TQString = TQString(),
TQString = TQString(), TQString = TQString() );
~ProcessListViewItem();

Loading…
Cancel
Save