summaryrefslogtreecommitdiffstats
path: root/src/modules/dcc/send.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
commit0a80cfd57d271dd44221467efb426675fa470356 (patch)
tree6f503a31aa078eaf8fa015cf1749808529d49fc9 /src/modules/dcc/send.cpp
parent3329e5a804e28ef3f5eb51d1e7affdd5a508e8f2 (diff)
downloadkvirc-0a80cfd57d271dd44221467efb426675fa470356.tar.gz
kvirc-0a80cfd57d271dd44221467efb426675fa470356.zip
TQt4 port kvirc
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1238719 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/modules/dcc/send.cpp')
-rw-r--r--src/modules/dcc/send.cpp312
1 files changed, 156 insertions, 156 deletions
diff --git a/src/modules/dcc/send.cpp b/src/modules/dcc/send.cpp
index c6cc1182..c42793aa 100644
--- a/src/modules/dcc/send.cpp
+++ b/src/modules/dcc/send.cpp
@@ -60,15 +60,15 @@
#include "kvi_sparser.h"
#include "kvi_kvs_script.h"
-#include <qevent.h>
-#include <qfile.h>
-#include <qpainter.h>
-#include <qdatetime.h>
-#include <qglobal.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
+#include <tqevent.h>
+#include <tqfile.h>
+#include <tqpainter.h>
+#include <tqdatetime.h>
+#include <tqglobal.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
#define INSTANT_BANDWIDTH_CHECK_INTERVAL_IN_MSECS 3000
#define INSTANT_BANDWIDTH_CHECK_INTERVAL_IN_SECS 3
@@ -88,12 +88,12 @@ extern KVIRC_API KviMediaManager * g_pMediaManager; // kvi_app.cpp
static KviPointerList<KviDccFileTransfer> * g_pDccFileTransfers = 0;
-static QPixmap * g_pDccFileTransferIcon = 0;
+static TQPixmap * g_pDccFileTransferIcon = 0;
//#warning "The events that have a KviStr data pointer should become real classes, that take care of deleting the data pointer!"
//#warning "Otherwise, when left undispatched we will be leaking memory (event class destroyed but not the data ptr)"
-KviDccRecvThread::KviDccRecvThread(QObject * par,kvi_socket_t fd,KviDccRecvThreadOptions * opt)
+KviDccRecvThread::KviDccRecvThread(TQObject * par,kvi_socket_t fd,KviDccRecvThreadOptions * opt)
: KviDccThread(par,fd)
{
m_pOpt = opt;
@@ -158,7 +158,7 @@ void KviDccRecvThread::postMessageEvent(const char * m)
{
KviThreadDataEvent<KviStr> * e = new KviThreadDataEvent<KviStr>(KVI_DCC_THREAD_EVENT_MESSAGE);
e->setData(new KviStr(m));
- postEvent(parent(),e);
+ postEvent(tqparent(),e);
}
// FIXME: This stuff should be somewhat related to the 1448 bytes TCP basic packet size
@@ -191,7 +191,7 @@ void KviDccRecvThread::run()
int iProbableTerminationTime = 0;
- m_pFile = new QFile(QString::fromUtf8(m_pOpt->szFileName.ptr()));
+ m_pFile = new TQFile(TQString::fromUtf8(m_pOpt->szFileName.ptr()));
if(m_pOpt->bResume)
{
@@ -292,7 +292,7 @@ void KviDccRecvThread::run()
{
// Received the whole file...die
KviThreadEvent * e = new KviThreadEvent(KVI_DCC_THREAD_EVENT_SUCCESS);
- postEvent(parent(),e);
+ postEvent(tqparent(),e);
break;
}
}
@@ -327,7 +327,7 @@ void KviDccRecvThread::run()
{
// success if we got the whole file or if we don't know the file size (we trust the peer)
KviThreadEvent * e = new KviThreadEvent(KVI_DCC_THREAD_EVENT_SUCCESS);
- postEvent(parent(),e);
+ postEvent(tqparent(),e);
break;
}
}
@@ -368,7 +368,7 @@ void KviDccRecvThread::run()
// success if we got the whole file or if we don't know the file size (we trust the peer)
postMessageEvent(__tr2qs_ctx("Data transfer was terminated 30 seconds ago, closing the connection","dcc"));
KviThreadEvent * e = new KviThreadEvent(KVI_DCC_THREAD_EVENT_SUCCESS);
- postEvent(parent(),e);
+ postEvent(tqparent(),e);
break;
}
}
@@ -410,7 +410,7 @@ void KviDccRecvThread::doneGetInfo()
m_pMutex->unlock();
}
-KviDccSendThread::KviDccSendThread(QObject * par,kvi_socket_t fd,KviDccSendThreadOptions * opt)
+KviDccSendThread::KviDccSendThread(TQObject * par,kvi_socket_t fd,KviDccSendThreadOptions * opt)
: KviDccThread(par,fd)
{
m_pOpt = opt;
@@ -486,12 +486,12 @@ void KviDccSendThread::run()
int iFailedSelects = 0;
char ackbuffer[4];
int iBytesInAckBuffer = 0;
- Q_UINT32 iLastAck = 0;
+ TQ_UINT32 iLastAck = 0;
if(m_pOpt->iPacketSize < 32)m_pOpt->iPacketSize = 32;
char * buffer = (char *)kvi_malloc(m_pOpt->iPacketSize * sizeof(char));
- QFile * pFile = new QFile(QString::fromUtf8(m_pOpt->szFileName.ptr()));
+ TQFile * pFile = new TQFile(TQString::fromUtf8(m_pOpt->szFileName.ptr()));
if(!pFile->open(IO_ReadOnly))
{
@@ -550,7 +550,7 @@ void KviDccSendThread::run()
iBytesInAckBuffer += readLen;
if(iBytesInAckBuffer == 4)
{
- Q_UINT32 iNewAck = ntohl(*((Q_UINT32 *)ackbuffer));
+ TQ_UINT32 iNewAck = ntohl(*((TQ_UINT32 *)ackbuffer));
if((iNewAck > pFile->at()) || (iNewAck < iLastAck))
{
// the peer is drunk or is trying to fool us
@@ -572,7 +572,7 @@ void KviDccSendThread::run()
if(iLastAck >= pFile->size())
{
KviThreadEvent * e = new KviThreadEvent(KVI_DCC_THREAD_EVENT_SUCCESS);
- postEvent(parent(),e);
+ postEvent(tqparent(),e);
break;
}
} else {
@@ -589,7 +589,7 @@ void KviDccSendThread::run()
// done...success
updateStats();
KviThreadEvent * e = new KviThreadEvent(KVI_DCC_THREAD_EVENT_SUCCESS);
- postEvent(parent(),e);
+ postEvent(tqparent(),e);
break;
} else {
if(readLen < 0)
@@ -598,7 +598,7 @@ void KviDccSendThread::run()
} else {
KviThreadDataEvent<KviStr> * e = new KviThreadDataEvent<KviStr>(KVI_DCC_THREAD_EVENT_MESSAGE);
e->setData(new KviStr(__tr2qs_ctx("WARNING: Received data in a DCC TSEND, there should be no acknowledges","dcc")));
- postEvent(parent(),e);
+ postEvent(tqparent(),e);
}
}
}
@@ -672,7 +672,7 @@ void KviDccSendThread::run()
// not in a tdcc: we can close the file...
updateStats();
KviThreadEvent * e = new KviThreadEvent(KVI_DCC_THREAD_EVENT_SUCCESS);
- postEvent(parent(),e);
+ postEvent(tqparent(),e);
break;
} else {
// upload finished but we're waiting for the last ack
@@ -729,19 +729,19 @@ KviDccFileTransfer::KviDccFileTransfer(KviDccDescriptor * dcc)
m_pResumeTimer = 0;
m_pBandwidthDialog = 0;
- KviQString::sprintf(m_szTransferIdString,__tr2qs_ctx("TRANSFER %d","dcc"),id());
+ KviTQString::sprintf(m_szTransferIdString,__tr2qs_ctx("TRANSFER %d","dcc"),id());
m_pDescriptor = dcc;
m_pDescriptor->setTransfer(this);
m_pMarshal = new KviDccMarshal(this);
- connect(m_pMarshal,SIGNAL(error(int)),this,SLOT(handleMarshalError(int)));
- connect(m_pMarshal,SIGNAL(connected()),this,SLOT(connected()));
- connect(m_pMarshal,SIGNAL(inProgress()),this,SLOT(connectionInProgress()));
+ connect(m_pMarshal,TQT_SIGNAL(error(int)),this,TQT_SLOT(handleMarshalError(int)));
+ connect(m_pMarshal,TQT_SIGNAL(connected()),this,TQT_SLOT(connected()));
+ connect(m_pMarshal,TQT_SIGNAL(inProgress()),this,TQT_SLOT(connectionInProgress()));
#ifdef COMPILE_SSL_SUPPORT
- connect(m_pMarshal,SIGNAL(startingSSLHandshake()),this,SLOT(startingSSLHandshake()));
- connect(m_pMarshal,SIGNAL(sslError(const char *)),this,SLOT(sslError(const char *)));
+ connect(m_pMarshal,TQT_SIGNAL(startingSSLHandshake()),this,TQT_SLOT(startingSSLHandshake()));
+ connect(m_pMarshal,TQT_SIGNAL(sslError(const char *)),this,TQT_SLOT(sslError(const char *)));
#endif
m_szDccType = dcc->bIsTdcc ? (dcc->bRecvFile ? "TRECV" : "TSEND") : (dcc->bRecvFile ? "RECV" : "SEND");
@@ -753,7 +753,7 @@ KviDccFileTransfer::KviDccFileTransfer(KviDccDescriptor * dcc)
m_tTransferEndTime = 0;
m_szStatusString = __tr2qs_ctx("Setting up the connection","dcc");
- m_eGeneralStatus = Connecting;
+ m_eGeneraltqStatus = Connecting;
bool bOk;
m_uTotalFileSize = dcc->bRecvFile ? dcc->szFileSize.toUInt(&bOk) : dcc->szLocalFileSize.toUInt(&bOk);
@@ -811,18 +811,18 @@ void KviDccFileTransfer::startConnection()
if(!(m_pDescriptor->bActive))
{
// PASSIVE CONNECTION
- m_szStatusString = __tr2qs_ctx("Attempting a passive DCC %1 connection","dcc").arg(m_szDccType.ptr());
+ m_szStatusString = __tr2qs_ctx("Attempting a passive DCC %1 connection","dcc").tqarg(m_szDccType.ptr());
outputAndLog(m_szStatusString);
} else {
// ACTIVE CONNECTION
- m_szStatusString = __tr2qs_ctx("Attempting an active DCC %1 connection","dcc").arg(m_szDccType.ptr());
+ m_szStatusString = __tr2qs_ctx("Attempting an active DCC %1 connection","dcc").tqarg(m_szDccType.ptr());
outputAndLog(m_szStatusString);
}
if(m_pDescriptor->bResume && m_pDescriptor->bRecvFile)
{
- QString fName;
+ TQString fName;
KviServerParser::encodeCtcpParameter(m_pDescriptor->szFileName.utf8().data(),fName);
if(m_pDescriptor->isZeroPortRequest())
{
@@ -841,7 +841,7 @@ void KviDccFileTransfer::startConnection()
m_pDescriptor->szPort.utf8().data(),
m_pDescriptor->szLocalFileSize.utf8().data(),0x01);
}
- m_szStatusString = __tr2qs_ctx("Sent DCC RESUME request to %1, waiting for ACCEPT","dcc").arg(m_pDescriptor->szNick);
+ m_szStatusString = __tr2qs_ctx("Sent DCC RESUME request to %1, waiting for ACCEPT","dcc").tqarg(m_pDescriptor->szNick);
outputAndLog(m_szStatusString);
// setup the resume timer: we don't want to wait forever
@@ -850,8 +850,8 @@ void KviDccFileTransfer::startConnection()
KVI_OPTION_UINT(KviOption_uintDccSocketTimeout) = 5;
if(m_pResumeTimer)delete m_pResumeTimer;
- m_pResumeTimer = new QTimer(this);
- connect(m_pResumeTimer,SIGNAL(timeout()),this,SLOT(resumeTimedOut()));
+ m_pResumeTimer = new TQTimer(this);
+ connect(m_pResumeTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(resumeTimedOut()));
m_pResumeTimer->start(KVI_OPTION_UINT(KviOption_uintDccSocketTimeout) * 1000,true);
} else {
listenOrConnect();
@@ -899,7 +899,7 @@ void KviDccFileTransfer::die()
delete this;
}
-QString KviDccFileTransfer::localFileName()
+TQString KviDccFileTransfer::localFileName()
{
return m_pDescriptor->szLocalFileName;
}
@@ -919,12 +919,12 @@ void KviDccFileTransfer::abort()
else if(m_pSlaveSendThread)tmp.setNum(m_pSlaveSendThread->sentBytes());
else tmp = '0';
- m_eGeneralStatus = Failure;
+ m_eGeneraltqStatus = Failure;
m_tTransferEndTime = kvi_unixTime();
m_szStatusString = __tr2qs_ctx("Transfer failed: ","dcc");
m_szStatusString += __tr2qs_ctx("Aborted","dcc");
- KVS_TRIGGER_EVENT_3(KviEvent_OnDCCFileTransferFailed,eventWindow(),QString("Aborted by user"),QString(tmp.ptr()),m_pDescriptor->idString());
+ KVS_TRIGGER_EVENT_3(KviEvent_OnDCCFileTransferFailed,eventWindow(),TQString("Aborted by user"),TQString(tmp.ptr()),m_pDescriptor->idString());
outputAndLog(KVI_OUT_DCCERROR,m_szStatusString);
displayUpdate();
@@ -933,15 +933,15 @@ void KviDccFileTransfer::abort()
void KviDccFileTransfer::fillContextPopup(KviTalPopupMenu * m,int column)
{
- m->insertItem(__tr2qs_ctx("Configure Bandwidth...","dcc"),this,SLOT(configureBandwidth()));
+ m->insertItem(__tr2qs_ctx("Configure Bandwidth...","dcc"),this,TQT_SLOT(configureBandwidth()));
m->insertSeparator();
- m->insertItem(__tr2qs_ctx("Resend DCC","dcc"),this,SLOT(retryDCC()));
- m->insertItem(__tr2qs_ctx("Resend TDCC","dcc"),this,SLOT(retryTDCC()));
- m->insertItem(__tr2qs_ctx("Resend RevDCC","dcc"),this,SLOT(retryRevDCC()));
+ m->insertItem(__tr2qs_ctx("Resend DCC","dcc"),this,TQT_SLOT(retryDCC()));
+ m->insertItem(__tr2qs_ctx("Resend TDCC","dcc"),this,TQT_SLOT(retryTDCC()));
+ m->insertItem(__tr2qs_ctx("Resend RevDCC","dcc"),this,TQT_SLOT(retryRevDCC()));
/* FIX ME credo che il problema sia che se riavvio un trasferimento, a sua volta gia'
avviato, questo non ha irc contex, perche' la finestra "in cui e' nato"e' sta
quella della dcc. Conservarsi l'id della finestra? */
- int id = m->insertItem(__tr2qs_ctx("Abort","dcc"),this,SLOT(abort()));
+ int id = m->insertItem(__tr2qs_ctx("Abort","dcc"),this,TQT_SLOT(abort()));
if(!active())m->setItemEnabled(id,false);
}
@@ -949,7 +949,7 @@ void KviDccFileTransfer::configureBandwidth()
{
if(m_pBandwidthDialog)return;
m_pBandwidthDialog = new KviDccFileTransferBandwidthDialog(g_pFrame,this);
- connect(m_pBandwidthDialog,SIGNAL(destroyed()),this,SLOT(bandwidthDialogDestroyed()));
+ connect(m_pBandwidthDialog,TQT_SIGNAL(destroyed()),this,TQT_SLOT(bandwidthDialogDestroyed()));
m_pBandwidthDialog->setModal(true);
m_pBandwidthDialog->show();
}
@@ -957,38 +957,38 @@ void KviDccFileTransfer::configureBandwidth()
void KviDccFileTransfer::retryDCC()
{
abort();
- QString szRemoteNick = m_pDescriptor->remoteNick();
- QString szFileName = m_pDescriptor->localFileName();
- QString szId;
+ TQString szRemoteNick = m_pDescriptor->remoteNick();
+ TQString szFileName = m_pDescriptor->localFileName();
+ TQString szId;
szId.setNum(m_pDescriptor->id());
- QString szCommand = "dcc.send -r=$console($dcc.irccontext(" + szId + ")) " + szRemoteNick + " " + "\"" + szFileName + "\"";
+ TQString szCommand = "dcc.send -r=$console($dcc.irccontext(" + szId + ")) " + szRemoteNick + " " + "\"" + szFileName + "\"";
KviKvsScript::run(szCommand,g_pActiveWindow);
}
void KviDccFileTransfer::retryTDCC()
{
abort();
- QString szRemoteNick = m_pDescriptor->remoteNick();
- QString szFileName = m_pDescriptor->localFileName();
- QString szId;
+ TQString szRemoteNick = m_pDescriptor->remoteNick();
+ TQString szFileName = m_pDescriptor->localFileName();
+ TQString szId;
szId.setNum(m_pDescriptor->id());
- QString szCommand = "dcc.send -r=$console($dcc.irccontext(" + szId + ")) -t " + szRemoteNick + " " + "\"" + szFileName + "\"";
+ TQString szCommand = "dcc.send -r=$console($dcc.irccontext(" + szId + ")) -t " + szRemoteNick + " " + "\"" + szFileName + "\"";
KviKvsScript::run(szCommand,g_pActiveWindow);
}
void KviDccFileTransfer::retryRevDCC()
{
abort();
- QString szRemoteNick = m_pDescriptor->remoteNick();
- QString szFileName = m_pDescriptor->localFileName();
- QString szId;
+ TQString szRemoteNick = m_pDescriptor->remoteNick();
+ TQString szFileName = m_pDescriptor->localFileName();
+ TQString szId;
szId.setNum(m_pDescriptor->id());
- QString szCommand = "dcc.rsend -z -r=$console($dcc.irccontext(" + szId + ")) " + szRemoteNick + " " + "\"" + szFileName + "\"";
+ TQString szCommand = "dcc.rsend -z -r=$console($dcc.irccontext(" + szId + ")) " + szRemoteNick + " " + "\"" + szFileName + "\"";
KviKvsScript::run(szCommand,g_pActiveWindow);
}
-void KviDccFileTransfer::fillStatusString(QString &szBuffer)
+void KviDccFileTransfer::fillStatusString(TQString &szBuffer)
{
- switch(m_eGeneralStatus)
+ switch(m_eGeneraltqStatus)
{
case Connecting:
szBuffer = "connecting";
@@ -1010,7 +1010,7 @@ void KviDccFileTransfer::fillStatusString(QString &szBuffer)
bool KviDccFileTransfer::active()
{
- return ((m_eGeneralStatus == Connecting) || (m_eGeneralStatus == Transferring));
+ return ((m_eGeneraltqStatus == Connecting) || (m_eGeneraltqStatus == Transferring));
}
int KviDccFileTransfer::bandwidthLimit()
@@ -1104,11 +1104,11 @@ unsigned int KviDccFileTransfer::transferredBytes()
return uTransferred;
}
-void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int height)
+void KviDccFileTransfer::displayPaint(TQPainter * p,int column,int width,int height)
{
- QString txt;
- bool bIsTerminated = ((m_eGeneralStatus == Success) || (m_eGeneralStatus == Failure));
+ TQString txt;
+ bool bIsTerminated = ((m_eGeneraltqStatus == Success) || (m_eGeneraltqStatus == Failure));
switch(column)
{
@@ -1117,7 +1117,7 @@ void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int heig
int xoffset = 0;
int yoffset = 0;
if(m_pDescriptor->bRecvFile)yoffset = 64;
- switch(m_eGeneralStatus)
+ switch(m_eGeneraltqStatus)
{
case Connecting: xoffset = 0; break;
case Transferring: xoffset = 48; break;
@@ -1130,10 +1130,10 @@ void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int heig
case COLUMN_FILEINFO:
{
- QFontMetrics fm(p->font());
+ TQFontMetrics fm(p->font());
- QString szFrom = __tr2qs_ctx("From: ","dcc");
- QString szTo = __tr2qs_ctx("To: ","dcc");
+ TQString szFrom = __tr2qs_ctx("From: ","dcc");
+ TQString szTo = __tr2qs_ctx("To: ","dcc");
int daW1 = fm.width(szFrom);
int daW2 = fm.width(szTo);
@@ -1142,43 +1142,43 @@ void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int heig
int iY = 4;
- p->setPen(Qt::black);
+ p->setPen(TQt::black);
KviStr szRemote(KviStr::Format,"dcc://%s@%s:%s/%s",m_pDescriptor->szNick.utf8().data(),m_pDescriptor->szIp.utf8().data(),m_pDescriptor->szPort.utf8().data(),
m_pDescriptor->szFileName.utf8().data());
- p->drawText(4 + daW1,iY,width - (8 + daW1),height - 8,Qt::AlignTop | Qt::AlignLeft,
+ p->drawText(4 + daW1,iY,width - (8 + daW1),height - 8,TQt::AlignTop | TQt::AlignLeft,
m_pDescriptor->bRecvFile ? szRemote.ptr() : m_pDescriptor->szLocalFileName.utf8().data());
iY += iLineSpacing;
- p->drawText(4 + daW1,iY,width - (8 + daW1),height - 8,Qt::AlignTop | Qt::AlignLeft,
+ p->drawText(4 + daW1,iY,width - (8 + daW1),height - 8,TQt::AlignTop | TQt::AlignLeft,
m_pDescriptor->bRecvFile ? m_pDescriptor->szLocalFileName.utf8().data() : szRemote.ptr());
iY += iLineSpacing;
- p->setPen(Qt::darkGray);
+ p->setPen(TQt::darkGray);
- p->drawText(4,4,width - 8,height - 8,Qt::AlignTop | Qt::AlignLeft,szFrom);
- p->drawText(4,4 + iLineSpacing,width - 8,height - 8,Qt::AlignTop | Qt::AlignLeft,szTo);
+ p->drawText(4,4,width - 8,height - 8,TQt::AlignTop | TQt::AlignLeft,szFrom);
+ p->drawText(4,4 + iLineSpacing,width - 8,height - 8,TQt::AlignTop | TQt::AlignLeft,szTo);
- p->setPen(QColor(180,180,200));
+ p->setPen(TQColor(180,180,200));
iLineSpacing += 2;
p->drawRect(4,height - (iLineSpacing + 4),width - 8,iLineSpacing);
- p->fillRect(5,height - (iLineSpacing + 3),width - 10,iLineSpacing - 2,bIsTerminated ? QColor(210,210,210) : QColor(190,190,240));
+ p->fillRect(5,height - (iLineSpacing + 3),width - 10,iLineSpacing - 2,bIsTerminated ? TQColor(210,210,210) : TQColor(190,190,240));
- p->setPen(Qt::black);
+ p->setPen(TQt::black);
- p->drawText(7,height - (iLineSpacing + 4),width - 14,iLineSpacing,Qt::AlignVCenter | Qt::AlignLeft,m_szStatusString);
+ p->drawText(7,height - (iLineSpacing + 4),width - 14,iLineSpacing,TQt::AlignVCenter | TQt::AlignLeft,m_szStatusString);
}
break;
case COLUMN_PROGRESS:
{
- QFontMetrics fm(p->font());
+ TQFontMetrics fm(p->font());
int iW = width - 8;
int iAvgBandwidth = -1;
@@ -1211,7 +1211,7 @@ void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int heig
}
}
- p->setPen(bIsTerminated ? Qt::lightGray : QColor(210,210,240));
+ p->setPen(bIsTerminated ? TQt::lightGray : TQColor(210,210,240));
p->drawRect(4,4,iW,12);
iW -= 2;
@@ -1233,26 +1233,26 @@ void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int heig
double dPerc2 = (double)(((double)iAckedBytes) * 100.0) / (double)m_uTotalFileSize;
int iL2 = (int) ((((double)iW) * dPerc2) / 100.0);
int iW2 = iL1 - iL2;
- if(iW2 > 0)p->fillRect(5 + iL2,5,iW2,10,bIsTerminated ? QColor(150,130,110) : QColor(220,170,100));
- p->fillRect(5,5,iL2,10,bIsTerminated ? QColor(140,110,110) : QColor(200,100,100));
+ if(iW2 > 0)p->fillRect(5 + iL2,5,iW2,10,bIsTerminated ? TQColor(150,130,110) : TQColor(220,170,100));
+ p->fillRect(5,5,iL2,10,bIsTerminated ? TQColor(140,110,110) : TQColor(200,100,100));
- txt = QString(__tr2qs_ctx("%1 of %2 (%3%)","dcc")).arg(KviQString::makeSizeReadable(iAckedBytes)).arg(KviQString::makeSizeReadable(m_uTotalFileSize)).arg(dPerc2,0,'f',2);
+ txt = TQString(__tr2qs_ctx("%1 of %2 (%3%)","dcc")).tqarg(KviTQString::makeSizeReadable(iAckedBytes)).tqarg(KviTQString::makeSizeReadable(m_uTotalFileSize)).tqarg(dPerc2,0,'f',2);
} else {
// we are receiving a file or not sending acks
double dPerc = (double)(((double)uTransferred) * 100.0) / (double)m_uTotalFileSize;
int iL = (int) ((((double)iW) * dPerc) / 100.0);
- p->fillRect(5,5,iL,10,bIsTerminated ? QColor(140,110,110) : QColor(200,100,100));
+ p->fillRect(5,5,iL,10,bIsTerminated ? TQColor(140,110,110) : TQColor(200,100,100));
- txt = QString(__tr2qs_ctx("%1 of %2 (%3%)","dcc")).arg(KviQString::makeSizeReadable(uTransferred)).arg(KviQString::makeSizeReadable(m_uTotalFileSize)).arg(dPerc,0,'f',2);
+ txt = TQString(__tr2qs_ctx("%1 of %2 (%3%)","dcc")).tqarg(KviTQString::makeSizeReadable(uTransferred)).tqarg(KviTQString::makeSizeReadable(m_uTotalFileSize)).tqarg(dPerc,0,'f',2);
}
} else {
- txt = QString(__tr2qs_ctx("%1","dcc")).arg(KviQString::makeSizeReadable(uTransferred));
+ txt = TQString(__tr2qs_ctx("%1","dcc")).tqarg(KviTQString::makeSizeReadable(uTransferred));
}
- p->setPen(Qt::black);
+ p->setPen(TQt::black);
- p->drawText(4,19,width - 8,height - 8,Qt::AlignTop | Qt::AlignLeft,txt);
+ p->drawText(4,19,width - 8,height - 8,TQt::AlignTop | TQt::AlignLeft,txt);
int iLeftHalf = (iW - 2) / 2;
int iRightHalf = iW - (iLeftHalf + 1);
@@ -1264,7 +1264,7 @@ void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int heig
txt += " ";
if(iInstantSpeed >= 0)
{
- QString tmpisp;
+ TQString tmpisp;
KviNetUtils::formatNetworkBandwidthString(tmpisp,iInstantSpeed);
txt += tmpisp;
} else {
@@ -1279,7 +1279,7 @@ void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int heig
txt += " ";
if(iAvgBandwidth >= 0)
{
- QString tmpspd;
+ TQString tmpspd;
KviNetUtils::formatNetworkBandwidthString(tmpspd,iAvgBandwidth);
txt += tmpspd;
} else {
@@ -1293,17 +1293,17 @@ void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int heig
int iDaH = height - (iLineSpacing + 4);
- p->setPen(QColor(180,180,200));
+ p->setPen(TQColor(180,180,200));
p->drawRect(4,iDaH,iLeftHalf,iLineSpacing);
- p->fillRect(5,iDaH + 1,iLeftHalf - 2,iLineSpacing - 2,bIsTerminated ? QColor(210,210,210) : QColor(190,190,240));
- p->setPen(bIsTerminated ? Qt::darkGray : Qt::black);
- p->drawText(6,iDaH,iLeftHalf - 4,iLineSpacing,Qt::AlignLeft | Qt::AlignVCenter,txt);
+ p->fillRect(5,iDaH + 1,iLeftHalf - 2,iLineSpacing - 2,bIsTerminated ? TQColor(210,210,210) : TQColor(190,190,240));
+ p->setPen(bIsTerminated ? TQt::darkGray : TQt::black);
+ p->drawText(6,iDaH,iLeftHalf - 4,iLineSpacing,TQt::AlignLeft | TQt::AlignVCenter,txt);
if(bIsTerminated)
{
if((m_tTransferStartTime != 0) && (m_tTransferEndTime != 0))
{
- QString tot = KviTimeUtils::formatTimeInterval(kvi_timeSpan(m_tTransferEndTime,m_tTransferStartTime),KviTimeUtils::NoLeadingEmptyIntervals | KviTimeUtils::NoLeadingZeroes);
+ TQString tot = KviTimeUtils::formatTimeInterval(kvi_timeSpan(m_tTransferEndTime,m_tTransferStartTime),KviTimeUtils::NoLeadingEmptyIntervals | KviTimeUtils::NoLeadingZeroes);
txt = "TOT: ";
txt += tot;
} else {
@@ -1312,7 +1312,7 @@ void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int heig
} else {
if(iEta >= 0)
{
- QString eta = KviTimeUtils::formatTimeInterval(iEta,KviTimeUtils::NoLeadingEmptyIntervals | KviTimeUtils::NoLeadingZeroes);
+ TQString eta = KviTimeUtils::formatTimeInterval(iEta,KviTimeUtils::NoLeadingEmptyIntervals | KviTimeUtils::NoLeadingZeroes);
txt = "ETA: ";
txt += eta;
} else {
@@ -1320,11 +1320,11 @@ void KviDccFileTransfer::displayPaint(QPainter * p,int column,int width,int heig
}
}
- p->setPen(QColor(180,180,200));
+ p->setPen(TQColor(180,180,200));
p->drawRect(width - (4 + iRightHalf),iDaH,iRightHalf,iLineSpacing);
- p->fillRect(width - (3 + iRightHalf),iDaH + 1,iRightHalf - 2,iLineSpacing - 2,bIsTerminated ? QColor(210,210,210) : QColor(190,190,240));
- p->setPen(bIsTerminated ? Qt::darkGray : Qt::black);
- p->drawText(width - (2 + iRightHalf),iDaH,iRightHalf - 4,iLineSpacing,Qt::AlignLeft | Qt::AlignVCenter,txt);
+ p->fillRect(width - (3 + iRightHalf),iDaH + 1,iRightHalf - 2,iLineSpacing - 2,bIsTerminated ? TQColor(210,210,210) : TQColor(190,190,240));
+ p->setPen(bIsTerminated ? TQt::darkGray : TQt::black);
+ p->drawText(width - (2 + iRightHalf),iDaH,iRightHalf - 4,iLineSpacing,TQt::AlignLeft | TQt::AlignVCenter,txt);
}
break;
@@ -1338,12 +1338,12 @@ int KviDccFileTransfer::displayHeight(int iLineSpacing)
return iH >= 70 ? iH : 70;
}
-QString KviDccFileTransfer::tipText()
+TQString KviDccFileTransfer::tipText()
{
- QString s;
+ TQString s;
- s = QString("<table><tr><td bgcolor=\"#000000\"><font color=\"#FFFFFF\"><b>DCC %1 (ID %2)</b></font></td></tr>").arg(m_szDccType.ptr()).arg(id());
+ s = TQString("<table><tr><td bgcolor=\"#000000\"><font color=\"#FFFFFF\"><b>DCC %1 (ID %2)</b></font></td></tr>").tqarg(m_szDccType.ptr()).tqarg(id());
s += "<tr><td bgcolor=\"#404040\"><font color=\"#FFFFFF\">";
s += __tr2qs_ctx("Transfer Log","dcc");
@@ -1362,9 +1362,9 @@ void KviDccFileTransfer::init()
g_pDccFileTransfers = new KviPointerList<KviDccFileTransfer>;
g_pDccFileTransfers->setAutoDelete(false);
- QPixmap * pix = g_pIconManager->getImage("kvi_dccfiletransfericons.png");
- if(pix)g_pDccFileTransferIcon = new QPixmap(*pix);
- else g_pDccFileTransferIcon = new QPixmap(192,128);
+ TQPixmap * pix = g_pIconManager->getImage("kvi_dccfiletransfericons.png");
+ if(pix)g_pDccFileTransferIcon = new TQPixmap(*pix);
+ else g_pDccFileTransferIcon = new TQPixmap(192,128);
}
void KviDccFileTransfer::done()
@@ -1384,7 +1384,7 @@ unsigned int KviDccFileTransfer::transferCount()
return g_pDccFileTransfers->count();
}
-KviDccFileTransfer * KviDccFileTransfer::nonFailedTransferWithLocalFileName(const QString &szLocalFileName)
+KviDccFileTransfer * KviDccFileTransfer::nonFailedTransferWithLocalFileName(const TQString &szLocalFileName)
{
if(!g_pDccFileTransfers)return 0;
for(KviDccFileTransfer * t = g_pDccFileTransfers->first();t;t = g_pDccFileTransfers->next())
@@ -1396,7 +1396,7 @@ KviDccFileTransfer * KviDccFileTransfer::nonFailedTransferWithLocalFileName(cons
if(t->localFileName() == szLocalFileName)
#endif
{
- if(t->m_eGeneralStatus != Failure)
+ if(t->m_eGeneraltqStatus != Failure)
return t;
}
}
@@ -1439,14 +1439,14 @@ bool KviDccFileTransfer::handleResumeRequest(const char * filename,const char *
return false;
}
-void KviDccFileTransfer::outputAndLog(const QString &s)
+void KviDccFileTransfer::outputAndLog(const TQString &s)
{
KviWindow * out = transferWindow();
addToTransferLog(s);
if(out)out->output(KVI_OUT_DCCMSG,"[%Q]: %Q",&m_szTransferIdString,&s);
}
-void KviDccFileTransfer::outputAndLog(int msgtype,const QString &s)
+void KviDccFileTransfer::outputAndLog(int msgtype,const TQString &s)
{
KviWindow * out = transferWindow();
addToTransferLog(s);
@@ -1454,10 +1454,10 @@ void KviDccFileTransfer::outputAndLog(int msgtype,const QString &s)
}
-void KviDccFileTransfer::addToTransferLog(const QString &s)
+void KviDccFileTransfer::addToTransferLog(const TQString &s)
{
- QDateTime dt = QDateTime::currentDateTime();
- QString ts;
+ TQDateTime dt = TQDateTime::tqcurrentDateTime();
+ TQString ts;
ts.sprintf("[%4d.%2d.%2d %2d:%2d:%2d] ",dt.date().year(),dt.date().month(),dt.date().day(),dt.time().hour(),dt.time().minute(),dt.time().second());
m_szTransferLog += ts+s;
m_szTransferLog += "<br>";
@@ -1477,19 +1477,19 @@ void KviDccFileTransfer::connectionInProgress()
// if(TRIGGER_EVENT_5PARAM_RETVALUE(KviEvent_OnDCCSendConnected,this,m_pDescriptor->szPort.ptr(),m_pDescriptor->szFileName.ptr(),m_pDescriptor->szNick.ptr(),m_pDescriptor->szUser.ptr(),m_pDescriptor->szHost.ptr()));
// }
//
- m_szStatusString = __tr2qs_ctx("Contacting host %1 on port %2","dcc").arg(m_pDescriptor->szIp).arg(m_pDescriptor->szPort);
+ m_szStatusString = __tr2qs_ctx("Contacting host %1 on port %2","dcc").tqarg(m_pDescriptor->szIp).tqarg(m_pDescriptor->szPort);
outputAndLog(m_szStatusString);
displayUpdate();
return;
}
// PASSIVE CONNECTION
- m_szStatusString = __tr2qs_ctx("Listening on interface %1 port %2","dcc").arg(m_pMarshal->localIp()).arg(m_pMarshal->localPort());
+ m_szStatusString = __tr2qs_ctx("Listening on interface %1 port %2","dcc").tqarg(m_pMarshal->localIp()).tqarg(m_pMarshal->localPort());
outputAndLog(m_szStatusString);
if(m_pDescriptor->bSendRequest)
{
- QString ip;
+ TQString ip;
if(!m_pDescriptor->szFakeIp.isEmpty())
{
ip = m_pDescriptor->szFakeIp;
@@ -1503,11 +1503,11 @@ void KviDccFileTransfer::connectionInProgress()
// try to get the IP that the IRC server can see
if(m_pDescriptor->console())
{
- QString tmp = m_pDescriptor->console()->connection() ? m_pDescriptor->console()->connection()->userInfo()->hostIp() : "";
+ TQString tmp = m_pDescriptor->console()->connection() ? m_pDescriptor->console()->connection()->userInfo()->hostIp() : "";
if(!tmp.isEmpty())
{
ip = tmp;
- outputAndLog(__tr2qs_ctx("The local IP address is private, determining from IRC server: %1","dcc").arg(ip));
+ outputAndLog(__tr2qs_ctx("The local IP address is private, determining from IRC server: %1","dcc").tqarg(ip));
} else {
outputAndLog(__tr2qs_ctx("The local IP address is private, but unable to determine it from the IRC server","dcc"));
}
@@ -1523,16 +1523,16 @@ void KviDccFileTransfer::connectionInProgress()
struct in_addr a;
if(KviNetUtils::stringIpToBinaryIp(ip,&a))ip.setNum(htonl(a.s_addr));
- QString tmp = m_pDescriptor->szFileName;
+ TQString tmp = m_pDescriptor->szFileName;
// just to be sure
- KviQString::cutToLast(tmp,'/');
- KviQString::cutToLast(tmp,'\\');
+ KviTQString::cutToLast(tmp,'/');
+ KviTQString::cutToLast(tmp,'\\');
- QString fName;
+ TQString fName;
// BUG-TO-BUG mIrc compatibility
if(KVI_OPTION_BOOL(KviOption_boolDCCFileTransferReplaceOutgoingSpacesWithUnderscores))
- tmp.replace(" ","_");
+ tmp.tqreplace(" ","_");
KviServerParser::encodeCtcpParameter(tmp.utf8().data(),fName);
// Zero port requests want DCC SEND as back-request
@@ -1558,9 +1558,9 @@ void KviDccFileTransfer::connectionInProgress()
ip.utf8().data(),port.ptr(),
&(m_pDescriptor->szLocalFileSize),0x01);
}
- outputAndLog(__tr2qs_ctx("Sent DCC %1 request to %2, waiting for remote client to connect...","dcc").arg(szReq.ptr()).arg(m_pDescriptor->szNick));
+ outputAndLog(__tr2qs_ctx("Sent DCC %1 request to %2, waiting for remote client to connect...","dcc").tqarg(szReq.ptr()).tqarg(m_pDescriptor->szNick));
} else {
- outputAndLog(__tr2qs_ctx("DCC %1 request not sent, awaiting manual connection","dcc").arg(m_szDccType.ptr()));
+ outputAndLog(__tr2qs_ctx("DCC %1 request not sent, awaiting manual connection","dcc").tqarg(m_szDccType.ptr()));
}
KVS_TRIGGER_EVENT_1(KviEvent_OnDCCFileTransferConnectionInProgress,eventWindow(),m_pDescriptor->idString());
@@ -1579,14 +1579,14 @@ void KviDccFileTransfer::startingSSLHandshake()
void KviDccFileTransfer::sslError(const char * msg)
{
#ifdef COMPILE_SSL_SUPPORT
- outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("[SSL ERROR]: %1","dcc").arg(msg));
+ outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("[SSL ERROR]: %1","dcc").tqarg(msg));
#endif
}
-bool KviDccFileTransfer::event(QEvent *e)
+bool KviDccFileTransfer::event(TQEvent *e)
{
if(e->type() == KVI_THREAD_EVENT)
{
@@ -1595,14 +1595,14 @@ bool KviDccFileTransfer::event(QEvent *e)
case KVI_DCC_THREAD_EVENT_ERROR:
{
int * err = ((KviThreadDataEvent<int> *)e)->getData();
- QString szErrorString = KviError::getDescription(*err);
+ TQString szErrorString = KviError::getDescription(*err);
delete err;
if(m_pDescriptor->bRecvFile)
g_pApp->fileDownloadTerminated(false,m_pDescriptor->szFileName.utf8().data(),m_pDescriptor->szLocalFileName.utf8().data(),m_pDescriptor->szNick.utf8().data(),szErrorString.utf8().data());
m_szStatusString = __tr2qs_ctx("Transfer failed: ","dcc");
m_szStatusString += szErrorString;
- m_eGeneralStatus = Failure;
+ m_eGeneraltqStatus = Failure;
m_tTransferEndTime = kvi_unixTime();
KVS_TRIGGER_EVENT_3(KviEvent_OnDCCFileTransferFailed,
@@ -1634,15 +1634,15 @@ bool KviDccFileTransfer::event(QEvent *e)
// Also add an optional message to the notifier, unless it is an AVATAR download!
if(KVI_OPTION_BOOL(KviOption_boolNotifiDccDownloadSuccessInNotifier))
{
- QString szMsg;
- KviQString::sprintf(szMsg,__tr2qs_ctx(""));
+ TQString szMsg;
+ KviTQString::sprintf(szMsg,__tr2qs_ctx(""));
g_pApp->notifierMessage(0,KVI_SMALLICON_DCCMSG,szMsg,30);
}
*/
if(m_pDescriptor->bRecvFile)g_pApp->fileDownloadTerminated(true,m_pDescriptor->szFileName.utf8().data(),m_pDescriptor->szLocalFileName.utf8().data(),m_pDescriptor->szNick.utf8().data());
m_szStatusString = __tr2qs_ctx("Transfer completed","dcc");
outputAndLog(m_szStatusString);
- m_eGeneralStatus = Success;
+ m_eGeneraltqStatus = Success;
m_tTransferEndTime = kvi_unixTime();
KVS_TRIGGER_EVENT_2(KviEvent_OnDCCFileTransferSuccess,
@@ -1659,7 +1659,7 @@ bool KviDccFileTransfer::event(QEvent *e)
case KVI_DCC_THREAD_EVENT_MESSAGE:
{
KviStr * str = ((KviThreadDataEvent<KviStr> *)e)->getData();
- outputAndLog(QString(__tr_no_xgettext_ctx(str->ptr(),"dcc")));
+ outputAndLog(TQString(__tr_no_xgettext_ctx(str->ptr(),"dcc")));
delete str;
return true;
}
@@ -1670,14 +1670,14 @@ bool KviDccFileTransfer::event(QEvent *e)
}
}
//#warning "Remove this!"
-// if(e->type() == QEvent::Close)debug("Close event received");
+// if(e->type() == TQEvent::Close)debug("Close event received");
return KviFileTransfer::event(e);
}
void KviDccFileTransfer::handleMarshalError(int err)
{
- QString szErr = KviError::getDescription(err);
- m_eGeneralStatus = Failure;
+ TQString szErr = KviError::getDescription(err);
+ m_eGeneraltqStatus = Failure;
m_szStatusString = __tr2qs_ctx("Transfer failed: ","dcc");
m_szStatusString += szErr;
outputAndLog(m_szStatusString);
@@ -1687,8 +1687,8 @@ void KviDccFileTransfer::handleMarshalError(int err)
void KviDccFileTransfer::connected()
{
- outputAndLog(__tr2qs_ctx("Connected to %1:%2","dcc").arg(m_pMarshal->remoteIp()).arg(m_pMarshal->remotePort()));
- outputAndLog(__tr2qs_ctx("Local end is %1:%2","dcc").arg(m_pMarshal->localIp()).arg(m_pMarshal->localPort()));
+ outputAndLog(__tr2qs_ctx("Connected to %1:%2","dcc").tqarg(m_pMarshal->remoteIp()).tqarg(m_pMarshal->remotePort()));
+ outputAndLog(__tr2qs_ctx("Local end is %1:%2","dcc").tqarg(m_pMarshal->localIp()).tqarg(m_pMarshal->localPort()));
m_tTransferStartTime = kvi_unixTime();
@@ -1731,7 +1731,7 @@ void KviDccFileTransfer::connected()
m_pSlaveSendThread->start();
}
- m_eGeneralStatus = Transferring;
+ m_eGeneraltqStatus = Transferring;
m_szStatusString = __tr2qs_ctx("Transferring data","dcc");
KVS_TRIGGER_EVENT_1(KviEvent_OnDCCFileTransferBegin,eventWindow(),m_pDescriptor->idString());
@@ -1758,7 +1758,7 @@ bool KviDccFileTransfer::resumeAccepted(const char *filename,const char *port,co
delete m_pResumeTimer;
m_pResumeTimer = 0;
- outputAndLog(__tr2qs_ctx("RESUME accepted, transfer will begin at position %1","dcc").arg(m_pDescriptor->szLocalFileSize));
+ outputAndLog(__tr2qs_ctx("RESUME accepted, transfer will begin at position %1","dcc").tqarg(m_pDescriptor->szLocalFileSize));
listenOrConnect();
@@ -1768,7 +1768,7 @@ bool KviDccFileTransfer::resumeAccepted(const char *filename,const char *port,co
if(ret != KviError_success)handleMarshalError(ret);
else {
- m_szStatusString = __tr2qs_ctx("Contacting host %1 on port %2","dcc").arg(m_pDescriptor->szIp).arg(m_pDescriptor->szPort);
+ m_szStatusString = __tr2qs_ctx("Contacting host %1 on port %2","dcc").tqarg(m_pDescriptor->szIp).tqarg(m_pDescriptor->szPort);
outputAndLog(m_szStatusString);
displayUpdate();
}
@@ -1779,10 +1779,10 @@ bool KviDccFileTransfer::resumeAccepted(const char *filename,const char *port,co
bool KviDccFileTransfer::doResume(const char * filename,const char * port,unsigned int filePos)
{
- if(KviQString::equalCI(port,m_pMarshal->dccPort()) &&
+ if(KviTQString::equalCI(port,m_pMarshal->dccPort()) &&
(!m_pSlaveRecvThread) && (!m_pDescriptor->bRecvFile))
{
- if(KviQString::equalCI(filename,m_pDescriptor->szFileName) || KVI_OPTION_BOOL(KviOption_boolAcceptBrokenFileNameDccResumeRequests))
+ if(KviTQString::equalCI(filename,m_pDescriptor->szFileName) || KVI_OPTION_BOOL(KviOption_boolAcceptBrokenFileNameDccResumeRequests))
{
bool bOk;
unsigned int iLocalFileSize = m_pDescriptor->szLocalFileSize.toUInt(&bOk);
@@ -1794,11 +1794,11 @@ bool KviDccFileTransfer::doResume(const char * filename,const char * port,unsign
}
if(iLocalFileSize <= filePos)
{
- outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("Invalid RESUME request: Position %1 is larger than file size","dcc").arg(filePos));
+ outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("Invalid RESUME request: Position %1 is larger than file size","dcc").tqarg(filePos));
return false;
}
- outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("Accepting RESUME request, transfer will begin at position %1","dcc").arg(filePos));
+ outputAndLog(KVI_OUT_DCCERROR,__tr2qs_ctx("Accepting RESUME request, transfer will begin at position %1","dcc").tqarg(filePos));
m_pDescriptor->szFileSize.setNum(filePos);
@@ -1822,15 +1822,15 @@ bool KviDccFileTransfer::doResume(const char * filename,const char * port,unsign
-KviDccFileTransferBandwidthDialog::KviDccFileTransferBandwidthDialog(QWidget * pParent,KviDccFileTransfer * t)
-: QDialog(pParent)
+KviDccFileTransferBandwidthDialog::KviDccFileTransferBandwidthDialog(TQWidget * pParent,KviDccFileTransfer * t)
+: TQDialog(pParent)
{
- QGridLayout * g = new QGridLayout(this,3,3,4,4);
+ TQGridLayout * g = new TQGridLayout(this,3,3,4,4);
m_pTransfer = t;
int iVal = m_pTransfer->bandwidthLimit();
- QString szText = __tr2qs_ctx("Configure bandwidth for DCC transfer %1","dcc").arg(t->id());
+ TQString szText = __tr2qs_ctx("Configure bandwidth for DCC transfer %1","dcc").tqarg(t->id());
setCaption(szText);
szText = t->isFileUpload() ? __tr2qs_ctx("Limit upload bandwidth to","dcc") : __tr2qs_ctx("Limit download bandwidth to","dcc");
@@ -1840,9 +1840,9 @@ KviDccFileTransferBandwidthDialog::KviDccFileTransferBandwidthDialog(QWidget * p
m_pEnableLimitCheck->setChecked((iVal >= 0) && (iVal < MAX_DCC_BANDWIDTH_LIMIT));
- m_pLimitBox = new QSpinBox(0,MAX_DCC_BANDWIDTH_LIMIT-1,1,this);
+ m_pLimitBox = new TQSpinBox(0,MAX_DCC_BANDWIDTH_LIMIT-1,1,this);
m_pLimitBox->setEnabled((iVal >= 0) && (iVal < MAX_DCC_BANDWIDTH_LIMIT));
- connect(m_pEnableLimitCheck,SIGNAL(toggled(bool)),m_pLimitBox,SLOT(setEnabled(bool)));
+ connect(m_pEnableLimitCheck,TQT_SIGNAL(toggled(bool)),m_pLimitBox,TQT_SLOT(setEnabled(bool)));
g->addMultiCellWidget(m_pLimitBox,0,0,1,2);
szText = " ";
@@ -1850,13 +1850,13 @@ KviDccFileTransferBandwidthDialog::KviDccFileTransferBandwidthDialog(QWidget * p
m_pLimitBox->setSuffix(szText);
m_pLimitBox->setValue(iVal < MAX_DCC_BANDWIDTH_LIMIT ? iVal : 0);
- QPushButton * pb = new QPushButton(__tr2qs_ctx("OK","dcc"),this);
- connect(pb,SIGNAL(clicked()),this,SLOT(okClicked()));
+ TQPushButton * pb = new TQPushButton(__tr2qs_ctx("OK","dcc"),this);
+ connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked()));
pb->setMinimumWidth(80);
g->addWidget(pb,2,2);
- pb = new QPushButton(__tr2qs_ctx("Cancel","dcc"),this);
- connect(pb,SIGNAL(clicked()),this,SLOT(cancelClicked()));
+ pb = new TQPushButton(__tr2qs_ctx("Cancel","dcc"),this);
+ connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(cancelClicked()));
pb->setMinimumWidth(80);
g->addWidget(pb,2,1);
@@ -1886,7 +1886,7 @@ void KviDccFileTransferBandwidthDialog::cancelClicked()
delete this;
}
-void KviDccFileTransferBandwidthDialog::closeEvent(QCloseEvent * e)
+void KviDccFileTransferBandwidthDialog::closeEvent(TQCloseEvent * e)
{
e->ignore();
delete this;