From ffe8a83e053396df448e9413828527613ca3bd46 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:46:43 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- arts/kde/kartsdispatcher.cc | 4 +- arts/kde/kartsdispatcher.h | 4 +- arts/kde/kartsfloatwatch.cpp | 2 +- arts/kde/kartsfloatwatch.h | 8 +- arts/kde/kartsserver.cpp | 18 ++-- arts/kde/kartsserver.h | 4 +- arts/kde/kaudioconverter.cc | 18 ++-- arts/kde/kaudioconverter.h | 6 +- arts/kde/kaudiomanagerplay.cpp | 14 ++-- arts/kde/kaudiomanagerplay.h | 12 +-- arts/kde/kaudioplaystream.cpp | 18 ++-- arts/kde/kaudioplaystream.h | 12 +-- arts/kde/kaudioplaystream_p.h | 6 +- arts/kde/kaudiorecordstream.cpp | 24 +++--- arts/kde/kaudiorecordstream.h | 8 +- arts/kde/kaudiorecordstream_p.h | 4 +- arts/kde/kconverttest.cc | 14 ++-- arts/kde/kconverttest.h | 2 +- arts/kde/kdatarequest_impl.h | 4 +- arts/kde/kioinputstream_impl.cpp | 44 +++++----- arts/kde/kioinputstream_impl.h | 14 ++-- arts/kde/kplayobject.cc | 32 ++++---- arts/kde/kplayobject.h | 14 ++-- arts/kde/kplayobjectcreator.cc | 18 ++-- arts/kde/kplayobjectcreator.h | 6 +- arts/kde/kplayobjectfactory.cc | 22 ++--- arts/kde/kplayobjectfactory.h | 8 +- arts/kde/kplayobjectfactory_p.h | 2 +- arts/kde/kvideowidget.cpp | 66 +++++++-------- arts/kde/kvideowidget.h | 32 ++++---- arts/kde/mcop-dcop/kmcop.cpp | 36 ++++---- arts/kde/mcop-dcop/kmcop.h | 6 +- arts/kde/mcop-dcop/mcopdcopobject.cpp | 30 +++---- arts/kde/mcop-dcop/mcopdcopobject.h | 28 +++---- arts/kde/mcop-dcop/mcopdcoptools.h | 8 +- arts/knotify/knotify.cpp | 150 +++++++++++++++++----------------- arts/knotify/knotify.h | 40 ++++----- arts/message/artsmessage.cc | 10 +-- 38 files changed, 374 insertions(+), 374 deletions(-) (limited to 'arts') diff --git a/arts/kde/kartsdispatcher.cc b/arts/kde/kartsdispatcher.cc index e6136ce12..fa41502f8 100644 --- a/arts/kde/kartsdispatcher.cc +++ b/arts/kde/kartsdispatcher.cc @@ -30,8 +30,8 @@ int KArtsDispatcher::m_refCount = 0; Arts::Dispatcher *KArtsDispatcher::artsDispatcher = 0; Arts::QIOManager *KArtsDispatcher::artsQIOManager = 0; -KArtsDispatcher::KArtsDispatcher(QObject *parent, const char *name) - : QObject(parent, name) +KArtsDispatcher::KArtsDispatcher(TQObject *parent, const char *name) + : TQObject(parent, name) { m_refCount++; if(artsDispatcher == 0) diff --git a/arts/kde/kartsdispatcher.h b/arts/kde/kartsdispatcher.h index db2792a97..dcd094844 100644 --- a/arts/kde/kartsdispatcher.h +++ b/arts/kde/kartsdispatcher.h @@ -22,7 +22,7 @@ #ifndef KARTSDISPATCHER_H #define KARTSDISPATCHER_H -#include +#include #include @@ -71,7 +71,7 @@ public: * @param parent the parent Qt object * @param name the Qt object name of this object */ - KArtsDispatcher(QObject *parent = 0, const char *name = 0); + KArtsDispatcher(TQObject *parent = 0, const char *name = 0); /** * Destructor diff --git a/arts/kde/kartsfloatwatch.cpp b/arts/kde/kartsfloatwatch.cpp index d26d76718..5421f9ecf 100644 --- a/arts/kde/kartsfloatwatch.cpp +++ b/arts/kde/kartsfloatwatch.cpp @@ -46,7 +46,7 @@ public: } KArtsFloatWatch::KArtsFloatWatch(Arts::Object object, const char *stream, - QObject *parent, const char *name) : QObject(parent, name) + TQObject *parent, const char *name) : TQObject(parent, name) { d = new KArtsFloatWatchPrivate(); d->proxy = KFloatWatchProxy::_from_base(new KFloatWatchProxy_impl(this)); diff --git a/arts/kde/kartsfloatwatch.h b/arts/kde/kartsfloatwatch.h index 6c23327ea..cc6671556 100644 --- a/arts/kde/kartsfloatwatch.h +++ b/arts/kde/kartsfloatwatch.h @@ -21,7 +21,7 @@ */ #include "common.h" -#include +#include class KArtsFloatWatchPrivate; namespace Arts { class KFloatWatchProxy_impl; } @@ -44,10 +44,10 @@ namespace Arts { class KFloatWatchProxy_impl; } * \code * StereoVolumeControl stereoVolumeControl = ...; * KArtsFloatWatch *w = new KArtsFloatWatch(stereoVolumeControl, "scaleFactor_changed", this); - * connect(w, SIGNAL(valueChanged(float)), this, SLOT(setValue(float))); + * connect(w, TQT_SIGNAL(valueChanged(float)), this, TQT_SLOT(setValue(float))); * \endcode */ -class KArtsFloatWatch : public QObject { +class KArtsFloatWatch : public TQObject { Q_OBJECT private: KArtsFloatWatchPrivate *d; @@ -67,7 +67,7 @@ public: * @param parent the parent Qt object * @param name the Qt object name of this object */ - KArtsFloatWatch(Arts::Object object, const char *stream, QObject *parent = 0, const char *name = 0); + KArtsFloatWatch(Arts::Object object, const char *stream, TQObject *parent = 0, const char *name = 0); /** * Destructor diff --git a/arts/kde/kartsserver.cpp b/arts/kde/kartsserver.cpp index 9b4739928..ee220be17 100644 --- a/arts/kde/kartsserver.cpp +++ b/arts/kde/kartsserver.cpp @@ -22,8 +22,8 @@ #include #include #include -#include -#include +#include +#include #include "kartsserver.h" struct KArtsServer::Data @@ -31,8 +31,8 @@ struct KArtsServer::Data Arts::SoundServerV2 server; }; -KArtsServer::KArtsServer(QObject *parent, const char *name) - : QObject(parent, name) +KArtsServer::KArtsServer(TQObject *parent, const char *name) + : TQObject(parent, name) , d(new Data) { d->server = Arts::SoundServerV2::null(); @@ -68,7 +68,7 @@ Arts::SoundServerV2 KArtsServer::server(void) bool x11Comm = config.readBoolEntry("X11GlobalComm", false); // put the value of x11Comm into .mcoprc - KSimpleConfig X11CommConfig(QDir::homeDirPath()+"/.mcoprc"); + KSimpleConfig X11CommConfig(TQDir::homeDirPath()+"/.mcoprc"); if(x11Comm) X11CommConfig.writeEntry("GlobalComm", "Arts::X11GlobalComm"); @@ -77,14 +77,14 @@ Arts::SoundServerV2 KArtsServer::server(void) X11CommConfig.sync(); - proc << QFile::encodeName(KStandardDirs::findExe(QString::fromLatin1("kdeinit_wrapper"))); + proc << TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("kdeinit_wrapper"))); if(rt) - proc << QFile::encodeName(KStandardDirs::findExe(QString::fromLatin1("artswrapper"))); + proc << TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("artswrapper"))); else - proc << QFile::encodeName(KStandardDirs::findExe(QString::fromLatin1("artsd"))); + proc << TQFile::encodeName(KStandardDirs::findExe(TQString::fromLatin1("artsd"))); - proc << QStringList::split( " ", config.readEntry( "Arguments", "-F 10 -S 4096 -s 60 -m artsmessage -l 3 -f" ) ); + proc << TQStringList::split( " ", config.readEntry( "Arguments", "-F 10 -S 4096 -s 60 -m artsmessage -l 3 -f" ) ); if(proc.start(KProcess::Block) && proc.normalExit()) { diff --git a/arts/kde/kartsserver.h b/arts/kde/kartsserver.h index 8456e25ea..c01829cf1 100644 --- a/arts/kde/kartsserver.h +++ b/arts/kde/kartsserver.h @@ -22,7 +22,7 @@ #define KARTSSERVER_H #include "kmedia2.h" -#include +#include #include "soundserver.h" #include @@ -43,7 +43,7 @@ public: * Create a new KArtsServer. Don't forget to create a KArtsDispatcher * before using KArtsServer. */ - KArtsServer(QObject *parent = 0, const char *name = 0); + KArtsServer(TQObject *parent = 0, const char *name = 0); virtual ~KArtsServer(void); /** diff --git a/arts/kde/kaudioconverter.cc b/arts/kde/kaudioconverter.cc index a5f1e8e43..adda3033a 100644 --- a/arts/kde/kaudioconverter.cc +++ b/arts/kde/kaudioconverter.cc @@ -31,8 +31,8 @@ #include -#include -#include +#include +#include #include #include @@ -71,7 +71,7 @@ bool KAudioConverter::setup(int samplingRate) return true; } -void KAudioConverter::slotMimeType(const QString &mimeType) +void KAudioConverter::slotMimeType(const TQString &mimeType) { m_mimeType = mimeType; kapp->exit_loop(); @@ -88,7 +88,7 @@ void KAudioConverter::requestPlayObject(const KURL &url) Arts::KIOInputStream_impl *inputStreamImpl = new Arts::KIOInputStream_impl(); inputStream = Arts::KIOInputStream::_from_base(inputStreamImpl); - QObject::connect(inputStreamImpl, SIGNAL(mimeTypeFound(const QString &)), SLOT(slotMimeType(const QString &))); + TQObject::connect(inputStreamImpl, TQT_SIGNAL(mimeTypeFound(const TQString &)), TQT_SLOT(slotMimeType(const TQString &))); inputStream.openURL(url.url().latin1()); inputStream.streamStart(); @@ -134,7 +134,7 @@ void KAudioConverter::requestPlayObject(const KURL &url) { Arts::PlayObject result = Arts::SubClass(objectType); - if(result.loadMedia(string(QFile::encodeName(url.path())))) + if(result.loadMedia(string(TQFile::encodeName(url.path())))) { result._node()->start(); m_incoming = new KPlayObject(result, false); @@ -161,9 +161,9 @@ void KAudioConverter::start() Arts::connect(m_incoming->object(), "left", m_request, "left"); Arts::connect(m_incoming->object(), "right", m_request, "right"); - QObject::connect(requestImpl, SIGNAL(newBlockSize(long)), SIGNAL(newBlockSize(long))); - QObject::connect(requestImpl, SIGNAL(newBlockPointer(long)), SIGNAL(newBlockPointer(long))); - QObject::connect(requestImpl, SIGNAL(newData()), SIGNAL(newData())); + TQObject::connect(requestImpl, TQT_SIGNAL(newBlockSize(long)), TQT_SIGNAL(newBlockSize(long))); + TQObject::connect(requestImpl, TQT_SIGNAL(newBlockPointer(long)), TQT_SIGNAL(newBlockPointer(long))); + TQObject::connect(requestImpl, TQT_SIGNAL(newData()), TQT_SIGNAL(newData())); // Special mpeglib case // TODO: needed at all?? @@ -174,7 +174,7 @@ void KAudioConverter::start() m_request.start(); - // TODO: Maybe do this async, using QTimer::singleShot + // TODO: Maybe do this async, using TQTimer::singleShot // But jowenn i think jowenn is right -> this would // lead to problems in slotNewData() when accessing the data // (could already be overwritten...) diff --git a/arts/kde/kaudioconverter.h b/arts/kde/kaudioconverter.h index 6235739d8..72f56a0f7 100644 --- a/arts/kde/kaudioconverter.h +++ b/arts/kde/kaudioconverter.h @@ -22,7 +22,7 @@ #ifndef KAUDIOCONVERTER_H #define KAUDIOCONVERTER_H -#include +#include #include "artskde.h" #include "kplayobject.h" @@ -52,12 +52,12 @@ signals: void rawStreamFinished(); private slots: - void slotMimeType(const QString &mimeType); + void slotMimeType(const TQString &mimeType); private: Arts::KDataRequest m_request; KPlayObject *m_incoming; - QString m_mimeType; + TQString m_mimeType; bool m_started; }; diff --git a/arts/kde/kaudiomanagerplay.cpp b/arts/kde/kaudiomanagerplay.cpp index 12b817a87..0496536d2 100644 --- a/arts/kde/kaudiomanagerplay.cpp +++ b/arts/kde/kaudiomanagerplay.cpp @@ -23,7 +23,7 @@ #include #include -KAudioManagerPlay::KAudioManagerPlay( KArtsServer * server, const QString & title ) +KAudioManagerPlay::KAudioManagerPlay( KArtsServer * server, const TQString & title ) { d = new PrivateData; d->amanPlay = Arts::DynamicCast( server->server().createObject( "Arts::Synth_AMAN_PLAY" ) ); @@ -49,24 +49,24 @@ bool KAudioManagerPlay::isNull() const return d->amanPlay.isNull(); } -void KAudioManagerPlay::setTitle( const QString & title ) +void KAudioManagerPlay::setTitle( const TQString & title ) { d->amanPlay.title( std::string( title.local8Bit() ) ); } -QString KAudioManagerPlay::title() +TQString KAudioManagerPlay::title() { - return QString::fromLocal8Bit( d->amanPlay.title().c_str() ); + return TQString::fromLocal8Bit( d->amanPlay.title().c_str() ); } -void KAudioManagerPlay::setAutoRestoreID( const QString & autoRestoreID ) +void KAudioManagerPlay::setAutoRestoreID( const TQString & autoRestoreID ) { d->amanPlay.autoRestoreID( std::string( autoRestoreID.local8Bit() ) ); } -QString KAudioManagerPlay::autoRestoreID() +TQString KAudioManagerPlay::autoRestoreID() { - return QString::fromLocal8Bit( d->amanPlay.autoRestoreID().c_str() ); + return TQString::fromLocal8Bit( d->amanPlay.autoRestoreID().c_str() ); } void KAudioManagerPlay::start() diff --git a/arts/kde/kaudiomanagerplay.h b/arts/kde/kaudiomanagerplay.h index 6bf332130..f9022b936 100644 --- a/arts/kde/kaudiomanagerplay.h +++ b/arts/kde/kaudiomanagerplay.h @@ -21,7 +21,7 @@ #define KAUDIOMANAGERPLAY_H #include -#include +#include #include class KArtsServer; @@ -38,7 +38,7 @@ class QString; class KDE_ARTS_EXPORT KAudioManagerPlay { public: - KAudioManagerPlay( KArtsServer * server, const QString & title = QString::null ); + KAudioManagerPlay( KArtsServer * server, const TQString & title = TQString::null ); ~KAudioManagerPlay(); /** @@ -57,15 +57,15 @@ class KDE_ARTS_EXPORT KAudioManagerPlay /** * Set the name of the output in the AudioManager */ - void setTitle( const QString & title ); + void setTitle( const TQString & title ); /** * returns the name of the output as it appears in the AudioManager */ - QString title(); + TQString title(); - void setAutoRestoreID( const QString & autoRestoreID ); - QString autoRestoreID(); + void setAutoRestoreID( const TQString & autoRestoreID ); + TQString autoRestoreID(); void start(); void stop(); diff --git a/arts/kde/kaudioplaystream.cpp b/arts/kde/kaudioplaystream.cpp index 200128ffc..52743a67e 100644 --- a/arts/kde/kaudioplaystream.cpp +++ b/arts/kde/kaudioplaystream.cpp @@ -29,16 +29,16 @@ #include #include -#include -//#include -//#include //QByteArray +#include +//#include +//#include //QByteArray #include // for strncpy //#include -KAudioPlayStreamPrivate::KAudioPlayStreamPrivate( KArtsServer* server, const QString title, QObject* p, const char* n ) - : QObject( p,n ) +KAudioPlayStreamPrivate::KAudioPlayStreamPrivate( KArtsServer* server, const TQString title, TQObject* p, const char* n ) + : TQObject( p,n ) , _server( server ) , _play( new KAudioManagerPlay( _server, title ) ) , _effectrack( Arts::StereoEffectStack::null() ) @@ -82,8 +82,8 @@ void KAudioPlayStreamPrivate::initaRts() { if ( _effects ) _effectrack.start(); } -KAudioPlayStream::KAudioPlayStream( KArtsServer* server, const QString title, QObject* p, const char* n ) - : QObject( p,n ) +KAudioPlayStream::KAudioPlayStream( KArtsServer* server, const TQString title, TQObject* p, const char* n ) + : TQObject( p,n ) , d( new KAudioPlayStreamPrivate( server, title, this ) ) { kdDebug( 400 ) << k_funcinfo << endl; @@ -147,7 +147,7 @@ void KAudioPlayStream::stop() } } -void KAudioPlayStream::write( QByteArray& ) +void KAudioPlayStream::write( TQByteArray& ) { } @@ -156,7 +156,7 @@ void KAudioPlayStream::fillData( Arts::DataPacket *packet ) //kdDebug( 400 ) << k_funcinfo << "packet->size=" << packet->size << endl; if ( d->_polling ) { - QByteArray bytearray( packet->size ); + TQByteArray bytearray( packet->size ); bytearray.setRawData( ( char* )packet->contents, packet->size ); bytearray.fill( 0 ); emit requestData( bytearray ); diff --git a/arts/kde/kaudioplaystream.h b/arts/kde/kaudioplaystream.h index 8f34cc8c9..0d8e6b41c 100644 --- a/arts/kde/kaudioplaystream.h +++ b/arts/kde/kaudioplaystream.h @@ -20,9 +20,9 @@ #ifndef KAUDIOPLAYSTREAM_H #define KAUDIOPLAYSTREAM_H -#include +#include -#include +#include #include #include @@ -39,7 +39,7 @@ class KAudioPlayStreamPrivate; * @since 3.2 */ -class KDE_ARTS_EXPORT KAudioPlayStream : public QObject { +class KDE_ARTS_EXPORT KAudioPlayStream : public TQObject { Q_OBJECT public: /** @@ -51,7 +51,7 @@ public: * @param parent You will propably want to pass the server as parent to so this stream gets deleted before the server disappears. * @param name The name of the stream. */ - KAudioPlayStream( KArtsServer* server, const QString title, QObject* parent=0, const char* name=0 ); + KAudioPlayStream( KArtsServer* server, const TQString title, TQObject* parent=0, const char* name=0 ); /** * Destructs the KAudioPlayStream. */ @@ -96,13 +96,13 @@ public slots: * Write data into the inputbuffer. * If you ignore the signal noData() it will play 0 ( silence ). */ - void write( QByteArray& data ); + void write( TQByteArray& data ); signals: /** * This signal is emitted when audio should be played. * You have to fill the array with data. */ - void requestData( QByteArray& ); + void requestData( TQByteArray& ); /** * Is emitted when the state changes. diff --git a/arts/kde/kaudioplaystream_p.h b/arts/kde/kaudioplaystream_p.h index a7e5cc4e7..4e4f25ed1 100644 --- a/arts/kde/kaudioplaystream_p.h +++ b/arts/kde/kaudioplaystream_p.h @@ -23,7 +23,7 @@ #include #include -#include +#include class KArtsServer; class KAudioManagerPlay; @@ -36,10 +36,10 @@ namespace Arts { class KAudioPlayStream; class KByteSoundProducer; -class KAudioPlayStreamPrivate : public QObject { +class KAudioPlayStreamPrivate : public TQObject { Q_OBJECT public: - KAudioPlayStreamPrivate( KArtsServer*, const QString title, QObject*, const char* =0 ); + KAudioPlayStreamPrivate( KArtsServer*, const TQString title, TQObject*, const char* =0 ); ~KAudioPlayStreamPrivate(); KArtsServer* _server; diff --git a/arts/kde/kaudiorecordstream.cpp b/arts/kde/kaudiorecordstream.cpp index 53788e296..0d180d1f1 100644 --- a/arts/kde/kaudiorecordstream.cpp +++ b/arts/kde/kaudiorecordstream.cpp @@ -32,9 +32,9 @@ #include #include -#include -#include -#include //QByteArray +#include +#include +#include //QByteArray #include @@ -50,12 +50,12 @@ struct KAudioRecordStream::Data bool blocking; bool polling; unsigned int pos; - QPtrQueue inqueue; - QString title; + TQPtrQueue inqueue; + TQString title; }; -KAudioRecordStream::KAudioRecordStream( KArtsServer * kserver, const QString & title, QObject * parent, const char * name ) - : QObject( parent, name ) +KAudioRecordStream::KAudioRecordStream( KArtsServer * kserver, const TQString & title, TQObject * parent, const char * name ) + : TQObject( parent, name ) , d( new Data ) { d->kserver = kserver; @@ -66,7 +66,7 @@ KAudioRecordStream::KAudioRecordStream( KArtsServer * kserver, const QString & t d->inqueue.setAutoDelete( true ); d->title = title; - connect( d->kserver, SIGNAL( restartedServer() ), SLOT( slotRestartedServer() ) ); + connect( d->kserver, TQT_SIGNAL( restartedServer() ), TQT_SLOT( slotRestartedServer() ) ); d->in = Arts::DynamicCast( d->kserver->server().createObject( "Arts::Synth_AMAN_RECORD" ) ); d->effectStack = Arts::DynamicCast( d->kserver->server().createObject( "Arts::StereoEffectStack" ) ); @@ -109,7 +109,7 @@ int KAudioRecordStream::read( char * buffer, int size ) if( d->inqueue.isEmpty() ) return size - remaining; } - QByteArray * data = d->inqueue.head(); + TQByteArray * data = d->inqueue.head(); unsigned int tocopy = kMin( remaining, data->size() - d->pos ); memcpy( buffer, data->data() + d->pos, tocopy ); d->pos += tocopy; @@ -196,8 +196,8 @@ void KAudioRecordStream::start( int samplingRate, int bits, int channels ) d->receiver_base = new KByteSoundReceiver( samplingRate, bits, channels, d->title.local8Bit() ); d->receiver = Arts::ByteSoundReceiver::_from_base( d->receiver_base ); - connect( d->receiver_base, SIGNAL( data( const char *, unsigned int ) ), - SLOT( slotData( const char *, unsigned int ) ) ); + connect( d->receiver_base, TQT_SIGNAL( data( const char *, unsigned int ) ), + TQT_SLOT( slotData( const char *, unsigned int ) ) ); Arts::connect( d->convert, "outdata", d->receiver, "indata" ); d->convert.start(); @@ -222,7 +222,7 @@ void KAudioRecordStream::slotRestartedServer() { } void KAudioRecordStream::slotData( const char * contents, unsigned int size ) { //kdDebug( 400 ) << k_funcinfo << endl; - QByteArray * bytearray = new QByteArray( size ); + TQByteArray * bytearray = new TQByteArray( size ); // copy the contents to the bytearray // this has to be deleted later bytearray->duplicate( contents, size ); diff --git a/arts/kde/kaudiorecordstream.h b/arts/kde/kaudiorecordstream.h index 9f8097676..fdd4353fe 100644 --- a/arts/kde/kaudiorecordstream.h +++ b/arts/kde/kaudiorecordstream.h @@ -25,7 +25,7 @@ #ifndef _KAUDIORECORDSTREAM__H #define _KAUDIORECORDSTREAM__H -#include +#include #include @@ -51,7 +51,7 @@ class KDE_ARTS_EXPORT KAudioRecordStream : public QObject * @param parent You will propably want to pass the server as parent to so this stream gets deleted before the server disappears. * @param name The name of the stream. */ - KAudioRecordStream( KArtsServer * server, const QString & title, QObject * parent = 0, const char * name = 0 ); + KAudioRecordStream( KArtsServer * server, const TQString & title, TQObject * parent = 0, const char * name = 0 ); ~KAudioRecordStream(); @@ -137,12 +137,12 @@ class KDE_ARTS_EXPORT KAudioRecordStream : public QObject signals: /** * Data from the aRts server has arrived. You should copy the data - * because the passed QByteArray will be deleted right after + * because the passed TQByteArray will be deleted right after * returning from your slot(s). * * @param data the data from the server */ - void data( QByteArray & data ); + void data( TQByteArray & data ); /** * Wether this RecordStream is recording or not. diff --git a/arts/kde/kaudiorecordstream_p.h b/arts/kde/kaudiorecordstream_p.h index f2899519a..1d38b2278 100644 --- a/arts/kde/kaudiorecordstream_p.h +++ b/arts/kde/kaudiorecordstream_p.h @@ -26,9 +26,9 @@ #include #include -#include +#include -class KByteSoundReceiver : public QObject, +class KByteSoundReceiver : public TQObject, public Arts::ByteSoundReceiver_skel, public Arts::StdSynthModule { diff --git a/arts/kde/kconverttest.cc b/arts/kde/kconverttest.cc index 25cb02e4c..5382e2095 100644 --- a/arts/kde/kconverttest.cc +++ b/arts/kde/kconverttest.cc @@ -1,7 +1,7 @@ #include -#include -#include +#include +#include #include #include @@ -81,13 +81,13 @@ int main(int argc, char **argv) // converter.setup(44100); converter.requestPlayObject(url); - QObject::connect(&converter, SIGNAL(rawStreamStart()), get, SLOT(slotRawStreamStart())); + TQObject::connect(&converter, TQT_SIGNAL(rawStreamStart()), get, TQT_SLOT(slotRawStreamStart())); - QObject::connect(&converter, SIGNAL(newBlockSize(long)), get, SLOT(slotNewBlockSize(long))); - QObject::connect(&converter, SIGNAL(newBlockPointer(long)), get, SLOT(slotNewBlockPointer(long))); - QObject::connect(&converter, SIGNAL(newData()), get, SLOT(slotNewData())); + TQObject::connect(&converter, TQT_SIGNAL(newBlockSize(long)), get, TQT_SLOT(slotNewBlockSize(long))); + TQObject::connect(&converter, TQT_SIGNAL(newBlockPointer(long)), get, TQT_SLOT(slotNewBlockPointer(long))); + TQObject::connect(&converter, TQT_SIGNAL(newData()), get, TQT_SLOT(slotNewData())); - QObject::connect(&converter, SIGNAL(rawStreamFinished()), get, SLOT(slotRawStreamFinished())); + TQObject::connect(&converter, TQT_SIGNAL(rawStreamFinished()), get, TQT_SLOT(slotRawStreamFinished())); converter.start(); diff --git a/arts/kde/kconverttest.h b/arts/kde/kconverttest.h index 60847b0aa..1d0b10f87 100644 --- a/arts/kde/kconverttest.h +++ b/arts/kde/kconverttest.h @@ -22,7 +22,7 @@ #ifndef KCONVERTTEST_H #define KCONVERTTEST_H -#include +#include class KConvertTest : public QObject { diff --git a/arts/kde/kdatarequest_impl.h b/arts/kde/kdatarequest_impl.h index 07522f0f1..7d90c8b73 100644 --- a/arts/kde/kdatarequest_impl.h +++ b/arts/kde/kdatarequest_impl.h @@ -22,14 +22,14 @@ #ifndef KDATAREQUEST_IMPL #define KDATAREQUEST_IMPL -#include +#include #include "artskde.h" #include "stdsynthmodule.h" namespace Arts { -class KDataRequest_impl : public QObject, virtual public KDataRequest_skel, +class KDataRequest_impl : public TQObject, virtual public KDataRequest_skel, virtual public StdSynthModule { Q_OBJECT diff --git a/arts/kde/kioinputstream_impl.cpp b/arts/kde/kioinputstream_impl.cpp index b82764931..f7df6347c 100644 --- a/arts/kde/kioinputstream_impl.cpp +++ b/arts/kde/kioinputstream_impl.cpp @@ -34,8 +34,8 @@ #include #include #include -#include -#include +#include +#include #include "artsversion.h" #include "kioinputstream_impl.moc" @@ -78,16 +78,16 @@ void KIOInputStream_impl::streamStart() m_job = KIO::get(m_url, false, false); m_job->addMetaData("accept", "audio/x-mp3, video/mpeg, application/ogg"); - m_job->addMetaData("UserAgent", QString::fromLatin1("aRts/") + QString::fromLatin1(ARTS_VERSION)); + m_job->addMetaData("UserAgent", TQString::fromLatin1("aRts/") + TQString::fromLatin1(ARTS_VERSION)); - QObject::connect(m_job, SIGNAL(data(KIO::Job *, const QByteArray &)), - this, SLOT(slotData(KIO::Job *, const QByteArray &))); - QObject::connect(m_job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotResult(KIO::Job *))); - QObject::connect(m_job, SIGNAL(mimetype(KIO::Job *, const QString &)), - this, SLOT(slotScanMimeType(KIO::Job *, const QString &))); - QObject::connect(m_job, SIGNAL(totalSize( KIO::Job *, KIO::filesize_t)), - this, SLOT(slotTotalSize(KIO::Job *, KIO::filesize_t))); + TQObject::connect(m_job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &))); + TQObject::connect(m_job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotResult(KIO::Job *))); + TQObject::connect(m_job, TQT_SIGNAL(mimetype(KIO::Job *, const TQString &)), + this, TQT_SLOT(slotScanMimeType(KIO::Job *, const TQString &))); + TQObject::connect(m_job, TQT_SIGNAL(totalSize( KIO::Job *, KIO::filesize_t)), + this, TQT_SLOT(slotTotalSize(KIO::Job *, KIO::filesize_t))); m_streamStarted = true; } @@ -98,14 +98,14 @@ void KIOInputStream_impl::streamEnd() if(m_job != 0) { - QObject::disconnect(m_job, SIGNAL(data(KIO::Job *, const QByteArray &)), - this, SLOT(slotData(KIO::Job *, const QByteArray &))); - QObject::disconnect(m_job, SIGNAL(result(KIO::Job *)), - this, SLOT(slotResult(KIO::Job *))); - QObject::disconnect(m_job, SIGNAL(mimetype(KIO::Job *, const QString &)), - this, SLOT(slotScanMimeType(KIO::Job *, const QString &))); - QObject::disconnect(m_job, SIGNAL(totalSize( KIO::Job *, KIO::filesize_t)), - this, SLOT(slotTotalSize(KIO::Job *, KIO::filesize_t))); + TQObject::disconnect(m_job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)), + this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &))); + TQObject::disconnect(m_job, TQT_SIGNAL(result(KIO::Job *)), + this, TQT_SLOT(slotResult(KIO::Job *))); + TQObject::disconnect(m_job, TQT_SIGNAL(mimetype(KIO::Job *, const TQString &)), + this, TQT_SLOT(slotScanMimeType(KIO::Job *, const TQString &))); + TQObject::disconnect(m_job, TQT_SIGNAL(totalSize( KIO::Job *, KIO::filesize_t)), + this, TQT_SLOT(slotTotalSize(KIO::Job *, KIO::filesize_t))); if ( m_streamPulled ) outdata.endPull(); @@ -124,12 +124,12 @@ bool KIOInputStream_impl::openURL(const std::string& url) return true; } -void KIOInputStream_impl::slotData(KIO::Job *, const QByteArray &data) +void KIOInputStream_impl::slotData(KIO::Job *, const TQByteArray &data) { if(m_finished) m_finished = false; - QDataStream dataStream(m_data, IO_WriteOnly | IO_Append); + TQDataStream dataStream(m_data, IO_WriteOnly | IO_Append); dataStream.writeRawBytes(data.data(), data.size()); //kdDebug( 400 ) << "STREAMING: buffersize = " << m_data.size() << " bytes" << endl; @@ -151,7 +151,7 @@ void KIOInputStream_impl::slotResult(KIO::Job *job) } } -void KIOInputStream_impl::slotScanMimeType(KIO::Job *, const QString &mimetype) +void KIOInputStream_impl::slotScanMimeType(KIO::Job *, const TQString &mimetype) { kdDebug( 400 ) << "got mimetype: " << mimetype << endl; emit mimeTypeFound(mimetype); diff --git a/arts/kde/kioinputstream_impl.h b/arts/kde/kioinputstream_impl.h index 95daac169..5377fc808 100644 --- a/arts/kde/kioinputstream_impl.h +++ b/arts/kde/kioinputstream_impl.h @@ -22,8 +22,8 @@ #ifndef KIOINPUTSTREAM_IMPL #define KIOINPUTSTREAM_IMPL -#include -#include +#include +#include #include #include #include "artskde.h" @@ -31,7 +31,7 @@ namespace Arts { -class KIOInputStream_impl : public QObject, virtual public KIOInputStream_skel, +class KIOInputStream_impl : public TQObject, virtual public KIOInputStream_skel, virtual public InputStream_skel, virtual public StdSynthModule { @@ -59,18 +59,18 @@ public: long packetSize() { return m_packetSize; } signals: - void mimeTypeFound(const QString & mimetype); + void mimeTypeFound(const TQString & mimetype); private slots: - void slotData(KIO::Job *, const QByteArray &); + void slotData(KIO::Job *, const TQByteArray &); void slotResult(KIO::Job *); - void slotScanMimeType(KIO::Job *, const QString &mimetype); + void slotScanMimeType(KIO::Job *, const TQString &mimetype); void slotTotalSize(KIO::Job *, KIO::filesize_t size); private: KURL m_url; KIO::TransferJob *m_job; - QByteArray m_data; + TQByteArray m_data; bool m_finished; bool m_firstBuffer; bool m_streamStarted; diff --git a/arts/kde/kplayobject.cc b/arts/kde/kplayobject.cc index af37735cb..becb20a58 100644 --- a/arts/kde/kplayobject.cc +++ b/arts/kde/kplayobject.cc @@ -24,13 +24,13 @@ #include "kplayobjectcreator.h" #include -KPlayObject::KPlayObject() : QObject() +KPlayObject::KPlayObject() : TQObject() { m_playObject = Arts::PlayObject::null(); m_isStream = false; } -KPlayObject::KPlayObject(Arts::PlayObject playobject, bool isStream) : QObject() +KPlayObject::KPlayObject(Arts::PlayObject playobject, bool isStream) : TQObject() { m_playObject = playobject; m_isStream = isStream; @@ -63,9 +63,9 @@ void KPlayObject::halt() object().halt(); } -QString KPlayObject::description() +TQString KPlayObject::description() { - return QString::fromLatin1(object().description().c_str()); + return TQString::fromLatin1(object().description().c_str()); } Arts::poTime KPlayObject::currentTime() @@ -83,9 +83,9 @@ Arts::poCapabilities KPlayObject::capabilities() return object().capabilities(); } -QString KPlayObject::mediaName() +TQString KPlayObject::mediaName() { - return QString::fromLatin1(object().mediaName().c_str()); + return TQString::fromLatin1(object().mediaName().c_str()); } Arts::poState KPlayObject::state() @@ -131,14 +131,14 @@ struct KDE::PlayObject::PrivateData KURL url; }; -KDE::PlayObject::PlayObject() : QObject() +KDE::PlayObject::PlayObject() : TQObject() { m_playObject = Arts::PlayObject::null(); m_isStream = false; d = new PrivateData; } -KDE::PlayObject::PlayObject(Arts::PlayObject playobject, bool isStream) : QObject() +KDE::PlayObject::PlayObject(Arts::PlayObject playobject, bool isStream) : TQObject() { m_playObject = playobject; m_isStream = isStream; @@ -150,7 +150,7 @@ KDE::PlayObject::PlayObject(Arts::PlayObject playobject, bool isStream) : QObjec //emit playObjectCreated(); } -KDE::PlayObject::PlayObject( Arts::SoundServerV2 server, const KURL& url, bool isStream, bool createBUS ) : QObject() +KDE::PlayObject::PlayObject( Arts::SoundServerV2 server, const KURL& url, bool isStream, bool createBUS ) : TQObject() { kdDebug( 400 ) << "KDE::PlayObject: created as proxy for URL " << url.url()<< endl; @@ -179,7 +179,7 @@ void KDE::PlayObject::play() if ( d->creator ) delete d->creator; d->creator = new KDE::PlayObjectCreator( d->server ); - d->creator->create( d->url, d->createBUS, this, SLOT( attachPlayObject( Arts::PlayObject ) ) ); + d->creator->create( d->url, d->createBUS, this, TQT_SLOT( attachPlayObject( Arts::PlayObject ) ) ); kdDebug( 400 ) << "KDE::PlayObject::play(): creator called" << endl; d->internalState = Arts::posPlaying; } @@ -239,11 +239,11 @@ void KDE::PlayObject::halt() d->internalState = Arts::posIdle; } -QString KDE::PlayObject::description() +TQString KDE::PlayObject::description() { if ( object().isNull() ) - return QString(); - return QString::fromLatin1(object().description().c_str()); + return TQString(); + return TQString::fromLatin1(object().description().c_str()); } Arts::poTime KDE::PlayObject::currentTime() @@ -267,11 +267,11 @@ Arts::poCapabilities KDE::PlayObject::capabilities() return object().capabilities(); } -QString KDE::PlayObject::mediaName() +TQString KDE::PlayObject::mediaName() { if ( object().isNull() ) - return QString(); - return QString::fromLatin1(object().mediaName().c_str()); + return TQString(); + return TQString::fromLatin1(object().mediaName().c_str()); } Arts::poState KDE::PlayObject::state() diff --git a/arts/kde/kplayobject.h b/arts/kde/kplayobject.h index 959e46810..907723cf3 100644 --- a/arts/kde/kplayobject.h +++ b/arts/kde/kplayobject.h @@ -25,7 +25,7 @@ #include "kmedia2.h" #include "soundserver.h" #include -#include +#include class KDE_EXPORT KPlayObject : public QObject { @@ -84,7 +84,7 @@ public: /** * Reimplemented (Arts::PlayObject Wrapper) */ - QString description(); + TQString description(); /** * Reimplemented (Arts::PlayObject Wrapper) @@ -104,7 +104,7 @@ public: /** * Reimplemented (Arts::PlayObject Wrapper) */ - QString mediaName(); + TQString mediaName(); /** * Reimplemented (Arts::PlayObject Wrapper) @@ -163,7 +163,7 @@ class PlayObjectFactory; * This has some side effects that developers need to be aware of: * Until the real Arts::PlayObject got created, * - the capabilities() method returns "zero" capabilities, - * - description() and mediaName() will return a null QString, + * - description() and mediaName() will return a null TQString, * - currentTime() and overallTime() will return "zero", * - despite the fact that isNull() returns "false", object().isNull() * will return "true". If you need to directly access methods of the @@ -239,7 +239,7 @@ public: /** * Reimplemented (Arts::PlayObject Wrapper) */ - QString description(); + TQString description(); /** * Reimplemented (Arts::PlayObject Wrapper) @@ -260,7 +260,7 @@ public: /** * Reimplemented (Arts::PlayObject Wrapper) */ - QString mediaName(); + TQString mediaName(); /** * returns the internal state of the PlayObject. The state can be @@ -293,7 +293,7 @@ private: /* private constructors, to prevent instantiation and copying */ PlayObject(); - PlayObject( const PlayObject& ) : QObject() {}; + PlayObject( const PlayObject& ) : TQObject() {}; PlayObject(Arts::PlayObject playobject, bool isStream); PlayObject( Arts::SoundServerV2 server, const KURL& url, bool isStream, bool createBUS ); diff --git a/arts/kde/kplayobjectcreator.cc b/arts/kde/kplayobjectcreator.cc index 26b4308ab..b1969718e 100644 --- a/arts/kde/kplayobjectcreator.cc +++ b/arts/kde/kplayobjectcreator.cc @@ -25,7 +25,7 @@ #include "kplayobjectcreator.moc" #include "kioinputstream_impl.h" -#include +#include #include @@ -38,13 +38,13 @@ KDE::PlayObjectCreator::~PlayObjectCreator() { } -bool KDE::PlayObjectCreator::create(const KURL& url, bool createBUS, const QObject* receiver, const char* slot) +bool KDE::PlayObjectCreator::create(const KURL& url, bool createBUS, const TQObject* receiver, const char* slot) { // no need to go any further, and I hate deep indentation if (m_server.isNull() || url.isEmpty() ) return false; - connect( this, SIGNAL( playObjectCreated( Arts::PlayObject ) ), + connect( this, TQT_SIGNAL( playObjectCreated( Arts::PlayObject ) ), receiver, slot ); // check if the URL is a local file @@ -57,8 +57,8 @@ bool KDE::PlayObjectCreator::create(const KURL& url, bool createBUS, const QObje m_instream = Arts::KIOInputStream::_from_base(instream_impl); // signal will be called once the ioslave knows the mime-type of the stream - connect(instream_impl, SIGNAL(mimeTypeFound(const QString &)), - this, SLOT(slotMimeType(const QString &))); + connect(instream_impl, TQT_SIGNAL(mimeTypeFound(const TQString &)), + this, TQT_SLOT(slotMimeType(const TQString &))); // GO! m_instream.openURL(url.url().latin1()); @@ -71,22 +71,22 @@ bool KDE::PlayObjectCreator::create(const KURL& url, bool createBUS, const QObje // usual stuff if we have a local file KMimeType::Ptr mimetype = KMimeType::findByURL(url); emit playObjectCreated ( - m_server.createPlayObjectForURL(std::string(QFile::encodeName(url.path())), + m_server.createPlayObjectForURL(std::string(TQFile::encodeName(url.path())), std::string(mimetype->name().latin1()), createBUS) ); return true; } -void KDE::PlayObjectCreator::slotMimeType(const QString& mimetype) +void KDE::PlayObjectCreator::slotMimeType(const TQString& mimetype) { kdDebug( 400 ) << "slotMimeType called: " << mimetype << endl; - QString mimetype_copy = mimetype; + TQString mimetype_copy = mimetype; if ( mimetype_copy == "application/octet-stream" ) - mimetype_copy = QString("audio/x-mp3"); + mimetype_copy = TQString("audio/x-mp3"); if (mimetype_copy == "application/x-zerosize") emit playObjectCreated(Arts::PlayObject::null()); diff --git a/arts/kde/kplayobjectcreator.h b/arts/kde/kplayobjectcreator.h index 31b0a0b48..f012de2cd 100644 --- a/arts/kde/kplayobjectcreator.h +++ b/arts/kde/kplayobjectcreator.h @@ -23,7 +23,7 @@ #define KPLAYOBJECTCREATOR_H #include -#include +#include #include "soundserver.h" #include "kioinputstream_impl.h" @@ -36,13 +36,13 @@ public: PlayObjectCreator(Arts::SoundServerV2 server); ~PlayObjectCreator(); - bool create(const KURL& url, bool createBUS, const QObject* receiver, const char* slot); + bool create(const KURL& url, bool createBUS, const TQObject* receiver, const char* slot); signals: void playObjectCreated(Arts::PlayObject playObject); private slots: - void slotMimeType(const QString &mimetype); + void slotMimeType(const TQString &mimetype); private: Arts::SoundServerV2 m_server; diff --git a/arts/kde/kplayobjectfactory.cc b/arts/kde/kplayobjectfactory.cc index ea0218746..99a2e2edb 100644 --- a/arts/kde/kplayobjectfactory.cc +++ b/arts/kde/kplayobjectfactory.cc @@ -29,7 +29,7 @@ #include "kartsdispatcher.h" #include "kartsserver.h" -#include +#include #include #include "kaudiomanagerplay.h" #include @@ -62,7 +62,7 @@ KPlayObject *KPlayObjectFactory::createPlayObject(const KURL& url, bool createBU } -KPlayObject *KPlayObjectFactory::createPlayObject(const KURL& _url, const QString &mimetype, bool createBUS) +KPlayObject *KPlayObjectFactory::createPlayObject(const KURL& _url, const TQString &mimetype, bool createBUS) { // WHY DOES BROKEN KIO_MEDIA GIVE WRONG URLS? // I hate it @@ -84,7 +84,7 @@ KPlayObject *KPlayObjectFactory::createPlayObject(const KURL& _url, const QStrin return new KPlayObject(m_server.createPlayObjectForStream(instream, string("audio/x-mp3"), createBUS), true); } else - return new KPlayObject(m_server.createPlayObjectForURL(string(QFile::encodeName(url.path())), string(mimetype.latin1()), createBUS), false); + return new KPlayObject(m_server.createPlayObjectForURL(string(TQFile::encodeName(url.path())), string(mimetype.latin1()), createBUS), false); } else return new KPlayObject(); @@ -133,7 +133,7 @@ KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& url, bool return createPlayObject(url, mimetype->name(), createBUS); } -KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& _url, const QString &mimetype, bool createBUS) +KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& _url, const TQString &mimetype, bool createBUS) { // WHY DOES BROKEN KIO_MEDIA GIVE WRONG URLS? // I hate it @@ -158,7 +158,7 @@ KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& _url, cons if ( url.isLocalFile() || !d->allowStreaming || (url.protocol() == "audiocd" && mimetype == "application/x-cda" && mimeTypes().contains( "application/x-cda" ) ) ) { // we rely on the delivered mimetype if it's a local file - d->playObj = new KDE::PlayObject( d->server.createPlayObjectForURL( string( QFile::encodeName( url.path() ) ), string( mimetype.latin1() ), createBUS ), false ); + d->playObj = new KDE::PlayObject( d->server.createPlayObjectForURL( string( TQFile::encodeName( url.path() ) ), string( mimetype.latin1() ), createBUS ), false ); } else { @@ -179,7 +179,7 @@ KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& _url, cons d->helper->po = d->playObj; d->helper->ap = d->amanPlay; if( d->playObj->object().isNull() && d->amanPlay ) - QObject::connect( d->playObj, SIGNAL( playObjectCreated() ), d->helper, SLOT( connectAmanPlay() ) ); + TQObject::connect( d->playObj, TQT_SIGNAL( playObjectCreated() ), d->helper, TQT_SLOT( connectAmanPlay() ) ); else d->helper->connectAmanPlay(); } @@ -187,13 +187,13 @@ KDE::PlayObject *KDE::PlayObjectFactory::createPlayObject(const KURL& _url, cons return d->playObj; } -QStringList KDE::PlayObjectFactory::mimeTypes(void) +TQStringList KDE::PlayObjectFactory::mimeTypes(void) { KArtsDispatcher dispatcher; // we need such a thing, otherwise we crash Arts::TraderQuery query; vector *offers = query.query(); - QStringList results; + TQStringList results; for(vector::iterator offer = offers->begin(); offer != offers->end(); ++offer) { @@ -202,7 +202,7 @@ QStringList KDE::PlayObjectFactory::mimeTypes(void) for(vector::iterator mimetype = mimetypes->begin(); mimetype != mimetypes->end(); ++mimetype) { - QString name = QString::fromLocal8Bit((*mimetype).c_str()).stripWhiteSpace(); + TQString name = TQString::fromLocal8Bit((*mimetype).c_str()).stripWhiteSpace(); if(KMimeType::mimeType(name)) results.append(name); } @@ -213,9 +213,9 @@ QStringList KDE::PlayObjectFactory::mimeTypes(void) // clean out duplicates results.sort(); - for(QStringList::iterator result = results.begin(); result != results.end(); ) + for(TQStringList::iterator result = results.begin(); result != results.end(); ) { - QStringList::iterator previous = result; + TQStringList::iterator previous = result; ++result; if(result != results.end() && *result == *previous) { diff --git a/arts/kde/kplayobjectfactory.h b/arts/kde/kplayobjectfactory.h index 2f9c096fc..690a9e1b8 100644 --- a/arts/kde/kplayobjectfactory.h +++ b/arts/kde/kplayobjectfactory.h @@ -51,7 +51,7 @@ public: ~KPlayObjectFactory(); KPlayObject *createPlayObject(const KURL& url, bool createBUS); - KPlayObject *createPlayObject(const KURL& url, const QString &mimetype, bool createBUS); + KPlayObject *createPlayObject(const KURL& url, const TQString &mimetype, bool createBUS); void setAllowStreaming(bool s) { m_allowStreaming = s; } bool allowStreaming() { return m_allowStreaming; } @@ -76,7 +76,7 @@ class POFHelper; * use the KDE multimedia framework can be found in the documentation * for KDE::PlayObject. */ -class KDE_EXPORT PlayObjectFactory// : public QObject ### for KDE4 make it a QObject to be able to receive signals +class KDE_EXPORT PlayObjectFactory// : public TQObject ### for KDE4 make it a TQObject to be able to receive signals { public: /** @@ -116,7 +116,7 @@ public: * This method also creates a KDE::PlayObject, but does no automatic * mimetype detection. Use this method with care. */ - KDE::PlayObject *createPlayObject(const KURL& url, const QString &mimetype, bool createBUS); + KDE::PlayObject *createPlayObject(const KURL& url, const TQString &mimetype, bool createBUS); /** * setAllowStreaming( true ) allows the factory to create a @@ -134,7 +134,7 @@ public: /** * Return the mimetypes that are playable */ - static QStringList mimeTypes(void); + static TQStringList mimeTypes(void); /*private slots: ### KDE4 and remove Helper class void connectAmanPlay();*/ diff --git a/arts/kde/kplayobjectfactory_p.h b/arts/kde/kplayobjectfactory_p.h index 21ea4c4e9..f81349251 100644 --- a/arts/kde/kplayobjectfactory_p.h +++ b/arts/kde/kplayobjectfactory_p.h @@ -20,7 +20,7 @@ #ifndef KPLAYOBJECTFACTORY_P_H #define KPLAYOBJECTFACTORY_P_H -#include +#include #include "kplayobjectfactory.h" namespace KDE diff --git a/arts/kde/kvideowidget.cpp b/arts/kde/kvideowidget.cpp index 2b0fbd66b..6aeeb8e8f 100644 --- a/arts/kde/kvideowidget.cpp +++ b/arts/kde/kvideowidget.cpp @@ -16,8 +16,8 @@ #ifdef HAVE_USLEEP #include #endif -#include -#include +#include +#include #if defined Q_WS_X11 && ! defined K_WS_QTONLY #include @@ -49,7 +49,7 @@ KFullscreenVideoWidget::KFullscreenVideoWidget( KVideoWidget *parent, const char { this->videoWidget = parent; setEraseColor( black ); - setCursor(QCursor(Qt::BlankCursor)); + setCursor(TQCursor(Qt::BlankCursor)); } void KFullscreenVideoWidget::windowActivationChange( bool ) @@ -73,18 +73,18 @@ bool KFullscreenVideoWidget::x11Event( XEvent *event ) return false; } -KVideoWidget::KVideoWidget( KXMLGUIClient *clientParent, QWidget *parent, const char *name, WFlags f ) +KVideoWidget::KVideoWidget( KXMLGUIClient *clientParent, TQWidget *parent, const char *name, WFlags f ) : KXMLGUIClient( clientParent ), - QWidget( parent, name, f ) + TQWidget( parent, name, f ) { init(); // ??? - QString toolbarName = i18n("Video Toolbar"); - setXML(QString("\nVideo Toolbar"), true); + TQString toolbarName = i18n("Video Toolbar"); + setXML(TQString("\nVideo Toolbar"), true); } -KVideoWidget::KVideoWidget( QWidget *parent, const char *name, WFlags f ) - : QWidget( parent, name, f ) +KVideoWidget::KVideoWidget( TQWidget *parent, const char *name, WFlags f ) + : TQWidget( parent, name, f ) { init(); } @@ -92,7 +92,7 @@ KVideoWidget::KVideoWidget( QWidget *parent, const char *name, WFlags f ) void KVideoWidget::init(void) { setMinimumSize(0, 0); - setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ) ); + setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); setFocusPolicy( ClickFocus ); fullscreenWidget = 0; @@ -102,16 +102,16 @@ void KVideoWidget::init(void) // Setup actions new KToggleAction( i18n("Fullscreen &Mode"), "window_fullscreen", - CTRL+SHIFT+Key_F, this, SLOT(fullscreenActivated()), + CTRL+SHIFT+Key_F, this, TQT_SLOT(fullscreenActivated()), actionCollection(), "fullscreen_mode" ); new KRadioAction( i18n("&Half Size"), ALT+Key_0, - this, SLOT(halfSizeActivated()), + this, TQT_SLOT(halfSizeActivated()), actionCollection(), "half_size" ); new KRadioAction( i18n("&Normal Size"), ALT+Key_1, - this, SLOT(normalSizeActivated()), + this, TQT_SLOT(normalSizeActivated()), actionCollection(), "normal_size" ); new KRadioAction( i18n("&Double Size"), ALT+Key_2, - this, SLOT(doubleSizeActivated()), + this, TQT_SLOT(doubleSizeActivated()), actionCollection(), "double_size" ); ((KToggleAction *)action( "half_size" ))->setExclusiveGroup( "KVideoWidget::zoom" ); @@ -189,7 +189,7 @@ void KVideoWidget::embed( Arts::VideoPlayObject vpo ) action("fullscreen_mode")->setEnabled(enable); } -QImage KVideoWidget::snapshot( Arts::VideoPlayObject vpo ) +TQImage KVideoWidget::snapshot( Arts::VideoPlayObject vpo ) { #if defined Q_WS_X11 && ! defined K_WS_QTONLY Window root; @@ -199,7 +199,7 @@ QImage KVideoWidget::snapshot( Arts::VideoPlayObject vpo ) int x, y; if (vpo.isNull() || (long)(pixmap = vpo.x11Snapshot()) == -1) - return QImage(); + return TQImage(); // Get 32bit RGBA image data (stored in 1bpp pixmap) XGetGeometry( qt_xdisplay(), pixmap, &root, &x, &y, &width, &height, &border, &depth ); @@ -209,11 +209,11 @@ QImage KVideoWidget::snapshot( Arts::VideoPlayObject vpo ) if (xImage == 0) { XFreePixmap( qt_xdisplay(), pixmap ); - return QImage(); + return TQImage(); } // Convert 32bit RGBA image data into Qt image - QImage qImage = QImage( (uchar *)xImage->data, width/32, height, 32, (QRgb *)0, 0, QImage::IgnoreEndian ).copy(); + TQImage qImage = TQImage( (uchar *)xImage->data, width/32, height, 32, (QRgb *)0, 0, TQImage::IgnoreEndian ).copy(); // Free X11 resources and return Qt image XDestroyImage( xImage ); @@ -286,9 +286,9 @@ void KVideoWidget::setDoubleSize() doubleSizeActivated(); } -QSize KVideoWidget::sizeHint() const +TQSize KVideoWidget::sizeHint() const { - return QSize( videoWidth, videoHeight ); + return TQSize( videoWidth, videoHeight ); } int KVideoWidget::heightForWidth( int w ) const @@ -299,9 +299,9 @@ int KVideoWidget::heightForWidth( int w ) const return int( double(w)*double(videoHeight)/double(videoWidth) ); } -void KVideoWidget::mousePressEvent( QMouseEvent *event ) +void KVideoWidget::mousePressEvent( TQMouseEvent *event ) { - QPoint pos = mapToGlobal( event->pos() ); + TQPoint pos = mapToGlobal( event->pos() ); emit mouseButtonPressed( event->button(), pos, event->state() ); @@ -310,14 +310,14 @@ void KVideoWidget::mousePressEvent( QMouseEvent *event ) emit rightButtonPressed( pos ); } -void KVideoWidget::mouseDoubleClickEvent( QMouseEvent *event ) +void KVideoWidget::mouseDoubleClickEvent( TQMouseEvent *event ) { emit mouseButtonDoubleClick( mapToGlobal( event->pos() ), event->state() ); } -void KVideoWidget::resizeEvent( QResizeEvent *event ) +void KVideoWidget::resizeEvent( TQResizeEvent *event ) { - QWidget::resizeEvent( event ); + TQWidget::resizeEvent( event ); if (width() > minimumWidth() || height() > minimumHeight()) { @@ -379,20 +379,20 @@ void KVideoWidget::fullscreenActivated() fullscreenWidget = new KFullscreenVideoWidget( this ); // Interconnect mouse button signals - connect( fullscreenWidget, SIGNAL(mouseButtonPressed( int, const QPoint &, int )), - this, SIGNAL(mouseButtonPressed( int, const QPoint &, int)) ); + connect( fullscreenWidget, TQT_SIGNAL(mouseButtonPressed( int, const TQPoint &, int )), + this, TQT_SIGNAL(mouseButtonPressed( int, const TQPoint &, int)) ); - connect( fullscreenWidget, SIGNAL(mouseButtonDoubleClick( const QPoint &, int )), - this, SIGNAL(mouseButtonDoubleClick( const QPoint &, int )) ); + connect( fullscreenWidget, TQT_SIGNAL(mouseButtonDoubleClick( const TQPoint &, int )), + this, TQT_SIGNAL(mouseButtonDoubleClick( const TQPoint &, int )) ); // ### Remove in KDE4 - connect( fullscreenWidget, SIGNAL(rightButtonPressed(const QPoint &)), - this, SIGNAL(rightButtonPressed(const QPoint &)) ); + connect( fullscreenWidget, TQT_SIGNAL(rightButtonPressed(const TQPoint &)), + this, TQT_SIGNAL(rightButtonPressed(const TQPoint &)) ); // Leave fullscreen mode with key - QAccel *a = new QAccel( fullscreenWidget ); + TQAccel *a = new TQAccel( fullscreenWidget ); a->connectItem( a->insertItem( Key_Escape ), - this, SLOT(setWindowed()) ); + this, TQT_SLOT(setWindowed()) ); fullscreenWidget->setFocus(); fullscreenWidget->showFullScreen(); diff --git a/arts/kde/kvideowidget.h b/arts/kde/kvideowidget.h index f314267ca..0e3881a93 100644 --- a/arts/kde/kvideowidget.h +++ b/arts/kde/kvideowidget.h @@ -11,24 +11,24 @@ #ifndef ARTSKDE_KVIDEOWIDGET_H #define ARTSKDE_KVIDEOWIDGET_H -#include -#include -#include +#include +#include +#include #include #include -class KDE_ARTS_EXPORT KVideoWidget : public QWidget, virtual public KXMLGUIClient +class KDE_ARTS_EXPORT KVideoWidget : public TQWidget, virtual public KXMLGUIClient { Q_OBJECT public: - KVideoWidget( KXMLGUIClient *clientParent, QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); - KVideoWidget( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); + KVideoWidget( KXMLGUIClient *clientParent, TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); + KVideoWidget( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); virtual ~KVideoWidget(); void embed( Arts::VideoPlayObject vpo ); - static QImage snapshot( Arts::VideoPlayObject vpo ); + static TQImage snapshot( Arts::VideoPlayObject vpo ); bool isEmbedded(); bool isFullscreen(); @@ -36,14 +36,14 @@ public: bool isNormalSize(); bool isDoubleSize(); - QSize sizeHint() const; + TQSize sizeHint() const; virtual int heightForWidth ( int w ) const; protected: - virtual void mousePressEvent( QMouseEvent *event ); - virtual void mouseDoubleClickEvent( QMouseEvent *event); - virtual void resizeEvent( QResizeEvent *event ); + virtual void mousePressEvent( TQMouseEvent *event ); + virtual void mouseDoubleClickEvent( TQMouseEvent *event); + virtual void resizeEvent( TQResizeEvent *event ); virtual bool x11Event( XEvent *event ); public slots: @@ -63,17 +63,17 @@ protected slots: signals: void adaptSize( int width, int height ); - void mouseButtonPressed( int type, const QPoint &, int state ); - void mouseButtonDoubleClick( const QPoint &, int state ); + void mouseButtonPressed( int type, const TQPoint &, int state ); + void mouseButtonDoubleClick( const TQPoint &, int state ); /** * @deprecated - * use mouseButtonPressed( int type, const QPoint & ) instead. + * use mouseButtonPressed( int type, const TQPoint & ) instead. */ - void rightButtonPressed( const QPoint & ); + void rightButtonPressed( const TQPoint & ); private: void init(void); - QWidget *fullscreenWidget; + TQWidget *fullscreenWidget; int videoWidth; int videoHeight; Arts::VideoPlayObject poVideo; diff --git a/arts/kde/mcop-dcop/kmcop.cpp b/arts/kde/mcop-dcop/kmcop.cpp index 22e19dc9d..1eb14f0f3 100644 --- a/arts/kde/mcop-dcop/kmcop.cpp +++ b/arts/kde/mcop-dcop/kmcop.cpp @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -43,7 +43,7 @@ class KMCOPPrivate { public: MCOPInfo mcopInfo; - QPtrList list; + TQPtrList list; }; int main(int argc, char **argv) @@ -74,7 +74,7 @@ int main(int argc, char **argv) return app.exec(); } -KMCOP::KMCOP() : QObject(), DCOPObject("arts") +KMCOP::KMCOP() : TQObject(), DCOPObject("arts") { d = new KMCOPPrivate(); d->mcopInfo = Reference("global:Arts_MCOPInfo"); @@ -91,10 +91,10 @@ int KMCOP::objectCount() return d->mcopInfo.objectCount(); } -QCString KMCOP::correctType(const QCString &str) +TQCString KMCOP::correctType(const TQCString &str) { if(str == "string") - return "QCString"; + return "TQCString"; return str; } @@ -106,7 +106,7 @@ void KMCOP::addInterfacesHackHackHack() if(!obj.isNull()) { - QCString interfaceName = obj._interfaceName().c_str(); + TQCString interfaceName = obj._interfaceName().c_str(); if(interfaceName != "Arts::TraderOffer") { @@ -121,21 +121,21 @@ void KMCOP::addInterfacesHackHackHack() vector::iterator ifaceMethodsIterator; for(ifaceMethodsIterator = ifaceMethods.begin(); ifaceMethodsIterator != ifaceMethods.end(); ifaceMethodsIterator++) { - QCString function, signature; + TQCString function, signature; MCOPEntryInfo *entry = new MCOPEntryInfo(); MethodDef currentMethod = *ifaceMethodsIterator; vector currentParameters = currentMethod.signature; - QCString newType = correctType(QCString(currentMethod.type.c_str())); + TQCString newType = correctType(TQCString(currentMethod.type.c_str())); entry->setFunctionType(newType); - entry->setFunctionName(QCString(currentMethod.name.c_str())); + entry->setFunctionName(TQCString(currentMethod.name.c_str())); - function = entry->functionType() + QCString(" ") + entry->functionName() + QCString("("); + function = entry->functionType() + TQCString(" ") + entry->functionName() + TQCString("("); - signature = QCString("("); + signature = TQCString("("); QCStringList signatureList; @@ -145,20 +145,20 @@ void KMCOP::addInterfacesHackHackHack() ParamDef parameter = *methodParametersIterator; if(methodParametersIterator != currentParameters.begin()) { - function += QCString(", "); - signature += QCString(","); + function += TQCString(", "); + signature += TQCString(","); } - QCString correctParameter = correctType(QCString(parameter.type.c_str())); + TQCString correctParameter = correctType(TQCString(parameter.type.c_str())); function += correctParameter; signature += correctParameter; - signatureList.append(QCString(parameter.type.c_str())); + signatureList.append(TQCString(parameter.type.c_str())); } - function += QCString(")"); - signature += QCString(")"); + function += TQCString(")"); + signature += TQCString(")"); entry->setSignature(signature); entry->setSignatureList(signatureList); diff --git a/arts/kde/mcop-dcop/kmcop.h b/arts/kde/mcop-dcop/kmcop.h index c81e385ff..5ffa57bcd 100644 --- a/arts/kde/mcop-dcop/kmcop.h +++ b/arts/kde/mcop-dcop/kmcop.h @@ -20,13 +20,13 @@ #ifndef KMCOP_H #define KMCOP_H -#include +#include #include class KMCOPPrivate; -class KMCOP : public QObject, +class KMCOP : public TQObject, public DCOPObject { Q_OBJECT @@ -41,7 +41,7 @@ k_dcop: void addInterfacesHackHackHack(); private: - QCString correctType(const QCString &str); + TQCString correctType(const TQCString &str); KMCOPPrivate *d; }; diff --git a/arts/kde/mcop-dcop/mcopdcopobject.cpp b/arts/kde/mcop-dcop/mcopdcopobject.cpp index f1d1acad5..fcd5be95f 100644 --- a/arts/kde/mcop-dcop/mcopdcopobject.cpp +++ b/arts/kde/mcop-dcop/mcopdcopobject.cpp @@ -23,8 +23,8 @@ //#include #include -#include -#include +#include +#include using namespace std; @@ -34,10 +34,10 @@ using namespace std; class MCOPDCOPObjectPrivate { public: - QMap dynamicFunctions; + TQMap dynamicFunctions; }; -MCOPDCOPObject::MCOPDCOPObject(QCString name) : DCOPObject(name) +MCOPDCOPObject::MCOPDCOPObject(TQCString name) : DCOPObject(name) { d = new MCOPDCOPObjectPrivate(); } @@ -51,14 +51,14 @@ QCStringList MCOPDCOPObject::functionsDynamic() { QCStringList returnList; - QMap::iterator it; + TQMap::iterator it; for(it = d->dynamicFunctions.begin(); it != d->dynamicFunctions.end(); ++it) returnList.append(it.key()); return returnList; } -Arts::Buffer *MCOPDCOPObject::callFunction(MCOPEntryInfo *entry, QCString ifaceName, const QByteArray &data) +Arts::Buffer *MCOPDCOPObject::callFunction(MCOPEntryInfo *entry, TQCString ifaceName, const TQByteArray &data) { Arts::Object workingObject = Arts::SubClass(string(ifaceName)); Arts::DynamicRequest request(workingObject); @@ -71,11 +71,11 @@ Arts::Buffer *MCOPDCOPObject::callFunction(MCOPEntryInfo *entry, QCString ifaceN QCStringList::iterator it; for(it = list.begin(); it != list.end(); ++it) { - QCString param = *it; + TQCString param = *it; kdDebug() << "PARAM: " << param << endl; - QDataStream argStream(data, IO_ReadOnly); + TQDataStream argStream(data, IO_ReadOnly); if(param == "long") request.param(MCOPDCOPTools::getLong(argStream)); @@ -94,16 +94,16 @@ Arts::Buffer *MCOPDCOPObject::callFunction(MCOPEntryInfo *entry, QCString ifaceN return newBuffer; } -bool MCOPDCOPObject::processDynamic(const QCString &fun, const QByteArray &data, QCString &replyType, QByteArray &replyData) +bool MCOPDCOPObject::processDynamic(const TQCString &fun, const TQByteArray &data, TQCString &replyType, TQByteArray &replyData) { - QMap::iterator it; + TQMap::iterator it; for(it = d->dynamicFunctions.begin(); it != d->dynamicFunctions.end(); ++it) { MCOPEntryInfo *entry = it.data(); if((entry->functionName() + entry->signature()) == fun) { - QCString type = entry->functionType(); + TQCString type = entry->functionType(); if(type == "void") { @@ -116,9 +116,9 @@ bool MCOPDCOPObject::processDynamic(const QCString &fun, const QByteArray &data, } else if(type == "string") { - replyType = "QCString"; + replyType = "TQCString"; - QDataStream reply(replyData, IO_WriteOnly); + TQDataStream reply(replyData, IO_WriteOnly); reply << "fooo!"; } else if(type == "long") @@ -135,7 +135,7 @@ bool MCOPDCOPObject::processDynamic(const QCString &fun, const QByteArray &data, delete result; } - QDataStream reply(replyData, IO_WriteOnly); + TQDataStream reply(replyData, IO_WriteOnly); reply << returnCode; } @@ -146,7 +146,7 @@ bool MCOPDCOPObject::processDynamic(const QCString &fun, const QByteArray &data, return false; } -void MCOPDCOPObject::addDynamicFunction(QCString value, MCOPEntryInfo *entry) +void MCOPDCOPObject::addDynamicFunction(TQCString value, MCOPEntryInfo *entry) { d->dynamicFunctions.insert(value, entry); } diff --git a/arts/kde/mcop-dcop/mcopdcopobject.h b/arts/kde/mcop-dcop/mcopdcopobject.h index 4c7e70cf5..0b73451e1 100644 --- a/arts/kde/mcop-dcop/mcopdcopobject.h +++ b/arts/kde/mcop-dcop/mcopdcopobject.h @@ -22,10 +22,10 @@ #include -#include -#include +#include +#include -typedef QValueList QCStringList; +typedef TQValueList QCStringList; class MCOPDCOPObjectPrivate; @@ -38,47 +38,47 @@ public: ~MCOPEntryInfo() { } - QCString functionType() + TQCString functionType() { return m_functionType; } - QCString functionName() + TQCString functionName() { return m_functionName; } - QCString signature() + TQCString signature() { return m_signature; } QCStringList signatureList() { return m_signatureList; } - void setFunctionType(QCString s) + void setFunctionType(TQCString s) { m_functionType = s; } - void setFunctionName(QCString s) + void setFunctionName(TQCString s) { m_functionName = s; } - void setSignature(QCString s) + void setSignature(TQCString s) { m_signature = s; } void setSignatureList(QCStringList s) { m_signatureList = s; } private: - QCString m_functionType, m_functionName, m_signature; + TQCString m_functionType, m_functionName, m_signature; QCStringList m_signatureList; }; class MCOPDCOPObject : public DCOPObject { public: - MCOPDCOPObject(QCString name); + MCOPDCOPObject(TQCString name); ~MCOPDCOPObject(); - virtual bool processDynamic(const QCString &fun, const QByteArray &data, QCString &replyType, QByteArray &replyData); + virtual bool processDynamic(const TQCString &fun, const TQByteArray &data, TQCString &replyType, TQByteArray &replyData); virtual QCStringList functionsDynamic(); - void addDynamicFunction(QCString value, MCOPEntryInfo *entry); + void addDynamicFunction(TQCString value, MCOPEntryInfo *entry); - Arts::Buffer *callFunction(MCOPEntryInfo *entry, QCString ifaceName, const QByteArray &data); + Arts::Buffer *callFunction(MCOPEntryInfo *entry, TQCString ifaceName, const TQByteArray &data); private: MCOPDCOPObjectPrivate *d; diff --git a/arts/kde/mcop-dcop/mcopdcoptools.h b/arts/kde/mcop-dcop/mcopdcoptools.h index f1279111c..287a89456 100644 --- a/arts/kde/mcop-dcop/mcopdcoptools.h +++ b/arts/kde/mcop-dcop/mcopdcoptools.h @@ -22,12 +22,12 @@ #include -#include +#include class MCOPDCOPTools { public: - static long getLong(QDataStream &stream) + static long getLong(TQDataStream &stream) { long l; stream << l; @@ -35,9 +35,9 @@ public: return l; } - static std::string getString(QDataStream &stream) + static std::string getString(TQDataStream &stream) { - QCString s; + TQCString s; stream << s; return std::string(s); diff --git a/arts/knotify/knotify.cpp b/arts/knotify/knotify.cpp index 794ef3dcd..ea20608ba 100644 --- a/arts/knotify/knotify.cpp +++ b/arts/knotify/knotify.cpp @@ -37,10 +37,10 @@ #endif // QT headers -#include -#include -#include -#include +#include +#include +#include +#include // KDE headers #include @@ -75,14 +75,14 @@ class KNotifyPrivate public: KConfig* globalEvents; KConfig* globalConfig; - QMap events; - QMap configs; - QString externalPlayer; + TQMap events; + TQMap configs; + TQString externalPlayer; KProcess *externalPlayerProc; #ifndef WITHOUT_ARTS - QPtrList playObjects; - QMap playObjectEventMap; + TQPtrList playObjects; + TQMap playObjectEventMap; KAudioManagerPlay *audioManager; #endif int externalPlayerEventId; @@ -90,9 +90,9 @@ public: bool useExternal; bool useArts; int volume; - QTimer *playTimer; + TQTimer *playTimer; bool inStartup; - QString startupEvents; + TQString startupEvents; }; // Yes, it's ugly to put this here, but this facilitates the cautious startup @@ -242,7 +242,7 @@ KDE_EXPORT int kdemain(int argc, char **argv) }// end extern "C" KNotify::KNotify( bool useArts ) - : QObject(), DCOPObject("Notify") + : TQObject(), DCOPObject("Notify") { d = new KNotifyPrivate; d->globalEvents = new KConfig("knotify/eventsrc", true, false, "data"); @@ -255,7 +255,7 @@ KNotify::KNotify( bool useArts ) d->audioManager = 0; if( useArts ) { - connect( soundServer, SIGNAL( restartedServer() ), this, SLOT( restartedArtsd() ) ); + connect( soundServer, TQT_SIGNAL( restartedServer() ), this, TQT_SLOT( restartedArtsd() ) ); restartedArtsd(); //started allready need to initialize d->audioManager } #endif @@ -292,9 +292,9 @@ void KNotify::loadConfig() { // try to locate a suitable player if none is configured if ( d->externalPlayer.isEmpty() ) { - QStringList players; + TQStringList players; players << "wavplay" << "aplay" << "auplay"; - QStringList::Iterator it = players.begin(); + TQStringList::Iterator it = players.begin(); while ( d->externalPlayer.isEmpty() && it != players.end() ) { d->externalPlayer = KStandardDirs::findExe( *it ); ++it; @@ -313,28 +313,28 @@ void KNotify::reconfigure() // clear loaded config files d->globalConfig->reparseConfiguration(); - for ( QMapIterator it = d->configs.begin(); it != d->configs.end(); ++it ) + for ( TQMapIterator it = d->configs.begin(); it != d->configs.end(); ++it ) delete it.data(); d->configs.clear(); } -void KNotify::notify(const QString &event, const QString &fromApp, - const QString &text, QString sound, QString file, +void KNotify::notify(const TQString &event, const TQString &fromApp, + const TQString &text, TQString sound, TQString file, int present, int level) { notify( event, fromApp, text, sound, file, present, level, 0, 1 ); } -void KNotify::notify(const QString &event, const QString &fromApp, - const QString &text, QString sound, QString file, +void KNotify::notify(const TQString &event, const TQString &fromApp, + const TQString &text, TQString sound, TQString file, int present, int level, int winId) { notify( event, fromApp, text, sound, file, present, level, winId, 1 ); } -void KNotify::notify(const QString &event, const QString &fromApp, - const QString &text, QString sound, QString file, +void KNotify::notify(const TQString &event, const TQString &fromApp, + const TQString &text, TQString sound, TQString file, int present, int level, int winId, int eventId ) { // kdDebug() << "event=" << event << " fromApp=" << fromApp << " text=" << text << " sound=" << sound << @@ -343,7 +343,7 @@ void KNotify::notify(const QString &event, const QString &fromApp, d->startupEvents += "(" + event + ":" + fromApp + ")"; } - QString commandline; + TQString commandline; KConfig *eventsFile = NULL; KConfig *configFile = NULL; @@ -381,7 +381,7 @@ void KNotify::notify(const QString &event, const QString &fromApp, // get sound file name if( present & KNotifyClient::Sound ) { - QString theSound = configFile->readPathEntry( "soundfile" ); + TQString theSound = configFile->readPathEntry( "soundfile" ); if ( theSound.isEmpty() ) theSound = eventsFile->readPathEntry( "default_sound" ); if ( !theSound.isEmpty() ) @@ -390,7 +390,7 @@ void KNotify::notify(const QString &event, const QString &fromApp, // get log file name if( present & KNotifyClient::Logfile ) { - QString theFile = configFile->readPathEntry( "logfile" ); + TQString theFile = configFile->readPathEntry( "logfile" ); if ( theFile.isEmpty() ) theFile = eventsFile->readPathEntry( "default_logfile" ); if ( !theFile.isEmpty() ) @@ -410,13 +410,13 @@ void KNotify::notify(const QString &event, const QString &fromApp, } // emit event - if ( present & KNotifyClient::Sound ) // && QFile(sound).isReadable() + if ( present & KNotifyClient::Sound ) // && TQFile(sound).isReadable() notifyBySound( sound, fromApp, eventId ); if ( present & KNotifyClient::Execute ) notifyByExecute( commandline, event, fromApp, text, winId, eventId ); - if ( present & KNotifyClient::Logfile ) // && QFile(file).isWritable() + if ( present & KNotifyClient::Logfile ) // && TQFile(file).isWritable() notifyByLogfile( text, file ); if ( present & KNotifyClient::Stderr ) @@ -430,16 +430,16 @@ void KNotify::notify(const QString &event, const QString &fromApp, else if ( present & KNotifyClient::Messagebox ) notifyByMessagebox( text, level, checkWinId( fromApp, winId )); - QByteArray qbd; - QDataStream ds(qbd, IO_WriteOnly); + TQByteArray qbd; + TQDataStream ds(qbd, IO_WriteOnly); ds << event << fromApp << text << sound << file << present << level << winId << eventId; - emitDCOPSignal("notifySignal(QString,QString,QString,QString,QString,int,int,int,int)", qbd); + emitDCOPSignal("notifySignal(TQString,TQString,TQString,TQString,TQString,int,int,int,int)", qbd); } -bool KNotify::notifyBySound( const QString &sound, const QString &appname, int eventId ) +bool KNotify::notifyBySound( const TQString &sound, const TQString &appname, int eventId ) { if (sound.isEmpty()) { soundFinished( eventId, NoSoundFile ); @@ -448,10 +448,10 @@ bool KNotify::notifyBySound( const QString &sound, const QString &appname, int e bool external = d->useExternal && !d->externalPlayer.isEmpty(); // get file name - QString soundFile(sound); - if ( QFileInfo(sound).isRelative() ) + TQString soundFile(sound); + if ( TQFileInfo(sound).isRelative() ) { - QString search = QString("%1/sounds/%2").arg(appname).arg(sound); + TQString search = TQString("%1/sounds/%2").arg(appname).arg(sound); soundFile = KGlobal::instance()->dirs()->findResource("data", search); if ( soundFile.isEmpty() ) soundFile = locate( "sound", sound ); @@ -527,8 +527,8 @@ bool KNotify::notifyBySound( const QString &sound, const QString &appname, int e if ( !d->playTimer ) { - d->playTimer = new QTimer( this ); - connect( d->playTimer, SIGNAL( timeout() ), SLOT( playTimeout() ) ); + d->playTimer = new TQTimer( this ); + connect( d->playTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( playTimeout() ) ); } if ( !d->playTimer->isActive() ) d->playTimer->start( 1000 ); @@ -541,8 +541,8 @@ bool KNotify::notifyBySound( const QString &sound, const QString &appname, int e if (!proc) { proc = d->externalPlayerProc = new KProcess; - connect( proc, SIGNAL( processExited( KProcess * )), - SLOT( slotPlayerProcessExited( KProcess * ))); + connect( proc, TQT_SIGNAL( processExited( KProcess * )), + TQT_SLOT( slotPlayerProcessExited( KProcess * ))); } if (proc->isRunning()) { @@ -550,7 +550,7 @@ bool KNotify::notifyBySound( const QString &sound, const QString &appname, int e return false; // Skip } proc->clearArguments(); - (*proc) << d->externalPlayer << QFile::encodeName( soundFile ); + (*proc) << d->externalPlayer << TQFile::encodeName( soundFile ); d->externalPlayerEventId = eventId; proc->start(KProcess::NotifyOnExit); return true; @@ -560,7 +560,7 @@ bool KNotify::notifyBySound( const QString &sound, const QString &appname, int e return false; } -bool KNotify::notifyByMessagebox(const QString &text, int level, WId winId) +bool KNotify::notifyByMessagebox(const TQString &text, int level, WId winId) { // ignore empty messages if ( text.isEmpty() ) @@ -586,17 +586,17 @@ bool KNotify::notifyByMessagebox(const QString &text, int level, WId winId) return true; } -bool KNotify::notifyByPassivePopup( const QString &text, - const QString &appName, +bool KNotify::notifyByPassivePopup( const TQString &text, + const TQString &appName, KConfig* eventsFile, WId senderWinId ) { KIconLoader iconLoader( appName ); if ( eventsFile != NULL ) { KConfigGroup config( eventsFile, "!Global!" ); - QString iconName = config.readEntry( "IconName", appName ); - QPixmap icon = iconLoader.loadIcon( iconName, KIcon::Small ); - QString title = config.readEntry( "Comment", appName ); + TQString iconName = config.readEntry( "IconName", appName ); + TQPixmap icon = iconLoader.loadIcon( iconName, KIcon::Small ); + TQString title = config.readEntry( "Comment", appName ); KPassivePopup::message(title, text, icon, senderWinId); } else kdError() << "No events for app " << appName << "defined!" < subst; + TQMap subst; subst.insert( 'e', event ); subst.insert( 'a', fromApp ); subst.insert( 's', text ); - subst.insert( 'w', QString::number( winId )); - subst.insert( 'i', QString::number( eventId )); - QString execLine = KMacroExpander::expandMacrosShellQuote( command, subst ); + subst.insert( 'w', TQString::number( winId )); + subst.insert( 'i', TQString::number( eventId )); + TQString execLine = KMacroExpander::expandMacrosShellQuote( command, subst ); if ( execLine.isEmpty() ) execLine = command; // fallback @@ -629,20 +629,20 @@ bool KNotify::notifyByExecute(const QString &command, const QString& event, } -bool KNotify::notifyByLogfile(const QString &text, const QString &file) +bool KNotify::notifyByLogfile(const TQString &text, const TQString &file) { // ignore empty messages if ( text.isEmpty() ) return true; // open file in append mode - QFile logFile(file); + TQFile logFile(file); if ( !logFile.open(IO_WriteOnly | IO_Append) ) return false; // append msg - QTextStream strm( &logFile ); - strm << "- KNotify " << QDateTime::currentDateTime().toString() << ": "; + TQTextStream strm( &logFile ); + strm << "- KNotify " << TQDateTime::currentDateTime().toString() << ": "; strm << text << endl; // close file @@ -650,17 +650,17 @@ bool KNotify::notifyByLogfile(const QString &text, const QString &file) return true; } -bool KNotify::notifyByStderr(const QString &text) +bool KNotify::notifyByStderr(const TQString &text) { // ignore empty messages if ( text.isEmpty() ) return true; // open stderr for output - QTextStream strm( stderr, IO_WriteOnly ); + TQTextStream strm( stderr, IO_WriteOnly ); // output msg - strm << "KNotify " << QDateTime::currentDateTime().toString() << ": "; + strm << "KNotify " << TQDateTime::currentDateTime().toString() << ": "; strm << text << endl; return true; @@ -674,7 +674,7 @@ bool KNotify::notifyByTaskbar( WId win ) return true; } -bool KNotify::isGlobal(const QString &eventname) +bool KNotify::isGlobal(const TQString &eventname) { return d->globalEvents->hasGroup( eventname ); } @@ -689,13 +689,13 @@ void KNotify::setVolume( int volume ) void KNotify::playTimeout() { #ifndef WITHOUT_ARTS - for ( QPtrListIterator< KDE::PlayObject > it(d->playObjects); *it;) + for ( TQPtrListIterator< KDE::PlayObject > it(d->playObjects); *it;) { - QPtrListIterator< KDE::PlayObject > current = it; + TQPtrListIterator< KDE::PlayObject > current = it; ++it; if ( (*current)->state() != Arts::posPlaying ) { - QMap::Iterator eit = d->playObjectEventMap.find( *current ); + TQMap::Iterator eit = d->playObjectEventMap.find( *current ); if ( eit != d->playObjectEventMap.end() ) { soundFinished( *eit, PlayedOK ); @@ -709,10 +709,10 @@ void KNotify::playTimeout() #endif } -bool KNotify::isPlaying( const QString& soundFile ) const +bool KNotify::isPlaying( const TQString& soundFile ) const { #ifndef WITHOUT_ARTS - for ( QPtrListIterator< KDE::PlayObject > it(d->playObjects); *it; ++it) + for ( TQPtrListIterator< KDE::PlayObject > it(d->playObjects); *it; ++it) { if ( (*it)->mediaName() == soundFile ) return true; @@ -730,7 +730,7 @@ void KNotify::slotPlayerProcessExited( KProcess *proc ) void KNotify::abortFirstPlayObject() { #ifndef WITHOUT_ARTS - QMap::Iterator it = d->playObjectEventMap.find( d->playObjects.getFirst() ); + TQMap::Iterator it = d->playObjectEventMap.find( d->playObjects.getFirst() ); if ( it != d->playObjectEventMap.end() ) { soundFinished( it.data(), Aborted ); @@ -742,35 +742,35 @@ void KNotify::abortFirstPlayObject() void KNotify::soundFinished( int eventId, PlayingFinishedStatus reason ) { - QByteArray data; - QDataStream stream( data, IO_WriteOnly ); + TQByteArray data; + TQDataStream stream( data, IO_WriteOnly ); stream << eventId << (int) reason; DCOPClient::mainClient()->emitDCOPSignal( "KNotify", "playingFinished(int,int)", data ); } -WId KNotify::checkWinId( const QString &appName, WId senderWinId ) +WId KNotify::checkWinId( const TQString &appName, WId senderWinId ) { if ( senderWinId == 0 ) { - QCString senderId = kapp->dcopClient()->senderId(); - QCString compare = (appName + "-mainwindow").latin1(); + TQCString senderId = kapp->dcopClient()->senderId(); + TQCString compare = (appName + "-mainwindow").latin1(); int len = compare.length(); // kdDebug() << "notifyByPassivePopup: appName=" << appName << " sender=" << senderId << endl; QCStringList objs = kapp->dcopClient()->remoteObjects( senderId ); for (QCStringList::ConstIterator it = objs.begin(); it != objs.end(); ++it ) { - QCString obj( *it ); + TQCString obj( *it ); if ( obj.left(len) == compare) { // kdDebug( ) << "found " << obj << endl; - QCString replyType; - QByteArray data, replyData; + TQCString replyType; + TQByteArray data, replyData; if ( kapp->dcopClient()->call(senderId, obj, "getWinID()", data, replyType, replyData) ) { - QDataStream answer(replyData, IO_ReadOnly); + TQDataStream answer(replyData, IO_ReadOnly); if (replyType == "int") { answer >> senderWinId; - // kdDebug() << "SUCCESS, found getWinID(): type='" << QString(replyType) + // kdDebug() << "SUCCESS, found getWinID(): type='" << TQString(replyType) // << "' senderWinId=" << senderWinId << endl; } } diff --git a/arts/knotify/knotify.h b/arts/knotify/knotify.h index c98be2e97..12e699299 100644 --- a/arts/knotify/knotify.h +++ b/arts/knotify/knotify.h @@ -20,7 +20,7 @@ #ifndef KNOTIFY_H #define KNOTIFY_H -#include +#include #include #include @@ -28,7 +28,7 @@ class KNotifyPrivate; class KProcess; class KConfig; -class KNotify : public QObject, public DCOPObject +class KNotify : public TQObject, public DCOPObject { Q_OBJECT K_DCOP @@ -51,17 +51,17 @@ public: protected: k_dcop: // deprecated - void notify(const QString &event, const QString &fromApp, - const QString &text, QString sound, QString file, + void notify(const TQString &event, const TQString &fromApp, + const TQString &text, TQString sound, TQString file, int present, int level); // deprecated - void notify(const QString &event, const QString &fromApp, - const QString &text, QString sound, QString file, + void notify(const TQString &event, const TQString &fromApp, + const TQString &text, TQString sound, TQString file, int present, int level, int winId); - void notify(const QString &event, const QString &fromApp, - const QString &text, QString sound, QString file, + void notify(const TQString &event, const TQString &fromApp, + const TQString &text, TQString sound, TQString file, int present, int level, int winId, int eventId); @@ -70,31 +70,31 @@ k_dcop: void sessionReady(); // from ksmserver private: - bool notifyBySound(const QString &sound, const QString &appname, int eventId); - bool notifyByMessagebox(const QString &text, int level, WId winId); - bool notifyByLogfile(const QString &text, const QString &file); - bool notifyByStderr(const QString &text); - bool notifyByPassivePopup(const QString &text, const QString &appName, + bool notifyBySound(const TQString &sound, const TQString &appname, int eventId); + bool notifyByMessagebox(const TQString &text, int level, WId winId); + bool notifyByLogfile(const TQString &text, const TQString &file); + bool notifyByStderr(const TQString &text); + bool notifyByPassivePopup(const TQString &text, const TQString &appName, KConfig* eventsFile, WId winId ); - bool notifyByExecute(const QString &command, - const QString& event, - const QString& fromApp, - const QString& text, + bool notifyByExecute(const TQString &command, + const TQString& event, + const TQString& fromApp, + const TQString& text, int winId, int eventId ); bool notifyByTaskbar( WId winId ); - bool isPlaying( const QString& soundFile ) const; + bool isPlaying( const TQString& soundFile ) const; void soundFinished( int eventId, PlayingFinishedStatus reason ); void abortFirstPlayObject(); - WId checkWinId( const QString& appName, WId senderWinId ); + WId checkWinId( const TQString& appName, WId senderWinId ); /** * checks if eventname is a global event (exists in config/eventsrc) **/ - bool isGlobal(const QString &eventname); + bool isGlobal(const TQString &eventname); private slots: void playTimeout(); diff --git a/arts/message/artsmessage.cc b/arts/message/artsmessage.cc index 7a127d4a4..f77ecd581 100644 --- a/arts/message/artsmessage.cc +++ b/arts/message/artsmessage.cc @@ -29,7 +29,7 @@ Gnome, etc. and used instead. */ -#include +#include #include #include @@ -63,7 +63,7 @@ int main(int argc, char **argv) { KApplication app; KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - QString msg; + TQString msg; // must be at least one argument if (args->count() == 0) { @@ -75,15 +75,15 @@ int main(int argc, char **argv) { if (i == 0) msg = args->arg(i); else - msg += QString(" ") + args->arg(i); + msg += TQString(" ") + args->arg(i); } const int notifyOptions = 0; // never activate KNotify if (args->isSet("w")) { KMessageBox::sorry(0, msg, i18n("Warning"), notifyOptions); } else if (args->isSet("i")) { - QString id = msg; - id.replace(QRegExp("[\\[\\]\\s=]"), "_"); + TQString id = msg; + id.replace(TQRegExp("[\\[\\]\\s=]"), "_"); KMessageBox::information(0, msg, i18n("Informational"), id, notifyOptions); } else { KMessageBox::error(0, msg, i18n("Error"), notifyOptions); -- cgit v1.2.1