Proper conversion to TQt interface

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/dependencies/arts@1155713 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 15 years ago
parent 006c6dcef6
commit 3f4a52a7c4

@ -22,8 +22,8 @@
#include "qiomanager.h" #include "qiomanager.h"
#include "qiomanager_p.h" #include "qiomanager_p.h"
#include <qsocketnotifier.h> #include <tqsocketnotifier.h>
#include <qapplication.h> #include <tqapplication.h>
#include "debug.h" #include "debug.h"
#include "dispatcher.h" #include "dispatcher.h"
#include "thread.h" #include "thread.h"
@ -66,11 +66,11 @@ static bool qioBlocking;
* QIOWatch: * QIOWatch:
*/ */
QIOWatch::QIOWatch(int fd, int type, IONotify *notify, QIOWatch::QIOWatch(int fd, int type, IONotify *notify,
QSocketNotifier::Type qtype, bool reentrant) TQSocketNotifier::Type qtype, bool reentrant)
: _fd(fd), _type(type), _client(notify), _reentrant(reentrant) : _fd(fd), _type(type), _client(notify), _reentrant(reentrant)
{ {
qsocketnotify = new QSocketNotifier(fd,qtype,this); qsocketnotify = new TQSocketNotifier(fd,qtype,this);
connect(qsocketnotify,SIGNAL(activated(int)),this,SLOT(notify(int))); connect(qsocketnotify,TQT_SIGNAL(activated(int)),this,TQT_SLOT(notify(int)));
} }
void QIOWatch::notify(int socket) void QIOWatch::notify(int socket)
@ -84,8 +84,8 @@ void QIOWatch::notify(int socket)
*/ */
QTimeWatch::QTimeWatch(int milliseconds, TimeNotify *notify) QTimeWatch::QTimeWatch(int milliseconds, TimeNotify *notify)
{ {
timer = new QTimer(this); timer = new TQTimer(this);
connect( timer, SIGNAL(timeout()), this, SLOT(notify()) ); connect( timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(notify()) );
timer->start(milliseconds); timer->start(milliseconds);
_client = notify; _client = notify;
} }
@ -179,19 +179,19 @@ void QIOManager::watchFD(int fd, int types, IONotify *notify)
if(types & IOType::read) if(types & IOType::read)
{ {
fdList.push_back( fdList.push_back(
new QIOWatch(fd, IOType::read, notify, QSocketNotifier::Read, r) new QIOWatch(fd, IOType::read, notify, TQSocketNotifier::Read, r)
); );
} }
if(types & IOType::write) if(types & IOType::write)
{ {
fdList.push_back( fdList.push_back(
new QIOWatch(fd, IOType::write, notify, QSocketNotifier::Write, r) new QIOWatch(fd, IOType::write, notify, TQSocketNotifier::Write, r)
); );
} }
if(types & IOType::except) if(types & IOType::except)
{ {
fdList.push_back( fdList.push_back(
new QIOWatch(fd, IOType::except, notify, QSocketNotifier::Exception, new QIOWatch(fd, IOType::except, notify, TQSocketNotifier::Exception,
r) r)
); );
} }

@ -30,9 +30,9 @@
#define QIOMANAGER_H #define QIOMANAGER_H
#include "iomanager.h" #include "iomanager.h"
#include <qobject.h> #include <tqobject.h>
#include <qtimer.h> #include <tqtimer.h>
#include <qsocketnotifier.h> #include <tqsocketnotifier.h>
#include <list> #include <list>
#include "arts_export.h" #include "arts_export.h"

@ -31,24 +31,24 @@
#define QIOMANAGER_P_H #define QIOMANAGER_P_H
#include "iomanager.h" #include "iomanager.h"
#include <qobject.h> #include <tqobject.h>
#include <qtimer.h> #include <tqtimer.h>
#include <qsocketnotifier.h> #include <tqsocketnotifier.h>
#include <list> #include <list>
namespace Arts { namespace Arts {
class QIOWatch : public QObject { class QIOWatch : public TQObject {
Q_OBJECT Q_OBJECT
protected: protected:
QSocketNotifier *qsocketnotify; TQSocketNotifier *qsocketnotify;
int _fd; int _fd;
int _type; int _type;
IONotify *_client; IONotify *_client;
bool _reentrant; bool _reentrant;
public: public:
QIOWatch(int fd, int type, IONotify *notify, QSocketNotifier::Type qtype, QIOWatch(int fd, int type, IONotify *notify, TQSocketNotifier::Type qtype,
bool reentrant); bool reentrant);
inline IONotify *client() { return _client; } inline IONotify *client() { return _client; }
@ -59,10 +59,10 @@ public slots:
void notify(int socket); void notify(int socket);
}; };
class QTimeWatch : public QObject { class QTimeWatch : public TQObject {
Q_OBJECT Q_OBJECT
protected: protected:
QTimer *timer; TQTimer *timer;
TimeNotify *_client; TimeNotify *_client;
public: public:
QTimeWatch(int milliseconds, TimeNotify *notify); QTimeWatch(int milliseconds, TimeNotify *notify);

Loading…
Cancel
Save