diff options
Diffstat (limited to 'src/modules/filetransferwindow/filetransferwindow.cpp')
-rw-r--r-- | src/modules/filetransferwindow/filetransferwindow.cpp | 216 |
1 files changed, 108 insertions, 108 deletions
diff --git a/src/modules/filetransferwindow/filetransferwindow.cpp b/src/modules/filetransferwindow/filetransferwindow.cpp index a3951a7c..e26cc600 100644 --- a/src/modules/filetransferwindow/filetransferwindow.cpp +++ b/src/modules/filetransferwindow/filetransferwindow.cpp @@ -36,22 +36,22 @@ #include "kvi_input.h" #include "kvi_qstring.h" -#include <qsplitter.h> -#include <qtooltip.h> +#include <tqsplitter.h> +#include <tqtooltip.h> #include "kvi_tal_hbox.h" #ifdef COMPILE_USE_QT4 - #include <q3header.h> + #include <tq3header.h> #else - #include <qheader.h> + #include <tqheader.h> #endif -#include <qpainter.h> -#include <qmessagebox.h> -#include <qclipboard.h> -#include <qfileinfo.h> -#include <qfile.h> -#include <qlabel.h> -#include <qfontmetrics.h> -#include <qevent.h> +#include <tqpainter.h> +#include <tqmessagebox.h> +#include <tqclipboard.h> +#include <tqfileinfo.h> +#include <tqfile.h> +#include <tqlabel.h> +#include <tqfontmetrics.h> +#include <tqevent.h> #ifdef COMPILE_KDE_SUPPORT #include <kurl.h> @@ -75,9 +75,9 @@ KviFileTransferItem::~KviFileTransferItem() m_pTransfer->setDisplayItem(0); } -QString KviFileTransferItem::key(int column,bool bAcending) const +TQString KviFileTransferItem::key(int column,bool bAcending) const { - QString ret; + TQString ret; ret.setNum(m_pTransfer->id()); if(ret.length() == 1)ret.prepend("0000000"); else if(ret.length() == 2)ret.prepend("000000"); @@ -89,10 +89,10 @@ QString KviFileTransferItem::key(int column,bool bAcending) const return ret; } -void KviFileTransferItem::paintCell(QPainter * p,const QColorGroup &cg,int column,int width,int align) +void KviFileTransferItem::paintCell(TQPainter * p,const TQColorGroup &cg,int column,int width,int align) { - QPainter * newP; - QPixmap * pix = 0; + TQPainter * newP; + TQPixmap * pix = 0; if(p->device() == listView()->viewport()) { // ops.. there is no double buffering active ? @@ -111,7 +111,7 @@ void KviFileTransferItem::paintCell(QPainter * p,const QColorGroup &cg,int colum } } } - newP = new QPainter(pix); + newP = new TQPainter(pix); } else { newP = p; } @@ -120,9 +120,9 @@ void KviFileTransferItem::paintCell(QPainter * p,const QColorGroup &cg,int colum newP->setPen(isSelected() ? cg.highlight() : cg.base()); newP->drawRect(0,0,width,height()); - newP->setPen(m_pTransfer->active() ? QColor(180,180,180) : QColor(200,200,200)); + newP->setPen(m_pTransfer->active() ? TQColor(180,180,180) : TQColor(200,200,200)); newP->drawRect(1,1,width - 2,height() - 2); - newP->fillRect(2,2,width - 4,height() - 4,m_pTransfer->active() ? QColor(240,240,240) : QColor(225,225,225)); + newP->fillRect(2,2,width - 4,height() - 4,m_pTransfer->active() ? TQColor(240,240,240) : TQColor(225,225,225)); m_pTransfer->displayPaint(newP,column,width,height()); @@ -148,15 +148,15 @@ KviFileTransferWindow::KviFileTransferWindow(KviModuleExtensionDescriptor * d,Kv m_pLocalFilePopup = 0; m_pOpenFilePopup = 0; - m_pMemPixmap = new QPixmap(1,1); + m_pMemPixmap = new TQPixmap(1,1); - m_pTimer = new QTimer(this); - connect(m_pTimer,SIGNAL(timeout()),this,SLOT(heartbeat())); + m_pTimer = new TQTimer(this); + connect(m_pTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(heartbeat())); m_pInput = new KviInput(this,0); - m_pSplitter = new QSplitter(Qt::Horizontal,this,"splitter"); - m_pVertSplitter = new QSplitter(Qt::Vertical,m_pSplitter,"vsplitter"); + m_pSplitter = new TQSplitter(Qt::Horizontal,this,"splitter"); + m_pVertSplitter = new TQSplitter(Qt::Vertical,m_pSplitter,"vsplitter"); m_pListView = new KviTalListView(m_pVertSplitter); //m_pListView->header()->hide(); @@ -166,26 +166,26 @@ KviFileTransferWindow::KviFileTransferWindow(KviModuleExtensionDescriptor * d,Kv m_pListView->addColumn(__tr2qs_ctx("Progress","filetransferwindow"),350); KviDynamicToolTip * tp = new KviDynamicToolTip(m_pListView->viewport()); - connect(tp,SIGNAL(tipRequest(KviDynamicToolTip *,const QPoint &)),this,SLOT(tipRequest(KviDynamicToolTip *,const QPoint &))); + connect(tp,TQT_SIGNAL(tipRequest(KviDynamicToolTip *,const TQPoint &)),this,TQT_SLOT(tipRequest(KviDynamicToolTip *,const TQPoint &))); //m_pListView->setFocusPolicy(NoFocus); //m_pListView->viewport()->setFocusPolicy(NoFocus); - //connect(m_pListView,SIGNAL(rightButtonPressed(KviTalListViewItem *,const QPoint &,int)), - // this,SLOT(showHostPopup(KviTalListViewItem *,const QPoint &,int))); + //connect(m_pListView,TQT_SIGNAL(rightButtonPressed(KviTalListViewItem *,const TQPoint &,int)), + // this,TQT_SLOT(showHostPopup(KviTalListViewItem *,const TQPoint &,int))); - QFontMetrics fm(font()); + TQFontMetrics fm(font()); m_iLineSpacing = fm.lineSpacing(); m_pIrcView = new KviIrcView(m_pVertSplitter,lpFrm,this); m_pListView->installEventFilter(this); - connect(m_pListView,SIGNAL(rightButtonPressed(KviTalListViewItem *,const QPoint &,int)),this,SLOT(rightButtonPressed(KviTalListViewItem *,const QPoint &,int))); - connect(m_pListView,SIGNAL(doubleClicked(KviTalListViewItem *,const QPoint &,int)),this,SLOT(doubleClicked(KviTalListViewItem *,const QPoint &,int))); + connect(m_pListView,TQT_SIGNAL(rightButtonPressed(KviTalListViewItem *,const TQPoint &,int)),this,TQT_SLOT(rightButtonPressed(KviTalListViewItem *,const TQPoint &,int))); + connect(m_pListView,TQT_SIGNAL(doubleClicked(KviTalListViewItem *,const TQPoint &,int)),this,TQT_SLOT(doubleClicked(KviTalListViewItem *,const TQPoint &,int))); fillTransferView(); - connect(KviFileTransferManager::instance(),SIGNAL(transferRegistered(KviFileTransfer *)),this,SLOT(transferRegistered(KviFileTransfer *))); - connect(KviFileTransferManager::instance(),SIGNAL(transferUnregistering(KviFileTransfer *)),this,SLOT(transferUnregistering(KviFileTransfer *))); + connect(KviFileTransferManager::instance(),TQT_SIGNAL(transferRegistered(KviFileTransfer *)),this,TQT_SLOT(transferRegistered(KviFileTransfer *))); + connect(KviFileTransferManager::instance(),TQT_SIGNAL(transferUnregistering(KviFileTransfer *)),this,TQT_SLOT(transferUnregistering(KviFileTransfer *))); KviFileTransferManager::instance()->setTransferWindow(this); @@ -201,14 +201,14 @@ KviFileTransferWindow::~KviFileTransferWindow() delete m_pMemPixmap; } -bool KviFileTransferWindow::eventFilter( QObject *obj, QEvent *ev ) +bool KviFileTransferWindow::eventFilter( TQObject *obj, TQEvent *ev ) { - if( (obj==m_pListView) && ( ev->type() == QEvent::KeyPress ) ) + if( (TQT_BASE_OBJECT(obj)==TQT_BASE_OBJECT(m_pListView)) && ( ev->type() == TQEvent::KeyPress ) ) { - QKeyEvent *keyEvent = (QKeyEvent*)ev; + TQKeyEvent *keyEvent = (TQKeyEvent*)ev; switch(keyEvent->key()) { - case Qt::Key_Delete: + case TQt::Key_Delete: if(m_pListView->currentItem()) { delete m_pListView->currentItem(); @@ -220,20 +220,20 @@ bool KviFileTransferWindow::eventFilter( QObject *obj, QEvent *ev ) return KviWindow::eventFilter( obj, ev ); } -void KviFileTransferWindow::fontChange(const QFont &oldFont) +void KviFileTransferWindow::fontChange(const TQFont &oldFont) { - QFontMetrics fm(font()); + TQFontMetrics fm(font()); m_iLineSpacing = fm.lineSpacing(); KviWindow::fontChange(oldFont); } -void KviFileTransferWindow::tipRequest(KviDynamicToolTip * tip,const QPoint &pnt) +void KviFileTransferWindow::tipRequest(KviDynamicToolTip * tip,const TQPoint &pnt) { KviFileTransferItem * it = (KviFileTransferItem *)m_pListView->itemAt(pnt); if(!it)return; - QString txt = it->transfer()->tipText(); - tip->tip(m_pListView->itemRect(it),txt); + TQString txt = it->transfer()->tipText(); + tip->tip(m_pListView->tqitemRect(it),txt); } void KviFileTransferWindow::fillTransferView() @@ -273,20 +273,20 @@ void KviFileTransferWindow::transferUnregistering(KviFileTransfer * t) it = 0; } -void KviFileTransferWindow::doubleClicked(KviTalListViewItem *it,const QPoint &pnt,int col) +void KviFileTransferWindow::doubleClicked(KviTalListViewItem *it,const TQPoint &pnt,int col) { if(it) openLocalFile(); } -void KviFileTransferWindow::rightButtonPressed(KviTalListViewItem *it,const QPoint &pnt,int col) +void KviFileTransferWindow::rightButtonPressed(KviTalListViewItem *it,const TQPoint &pnt,int col) { if(!m_pContextPopup)m_pContextPopup = new KviTalPopupMenu(this); if(!m_pLocalFilePopup)m_pLocalFilePopup = new KviTalPopupMenu(this); if(!m_pOpenFilePopup) { m_pOpenFilePopup= new KviTalPopupMenu(this); - connect(m_pOpenFilePopup,SIGNAL(activated(int)),this,SLOT(openFilePopupActivated(int))); + connect(m_pOpenFilePopup,TQT_SIGNAL(activated(int)),this,TQT_SLOT(openFilePopupActivated(int))); } m_pContextPopup->clear(); @@ -300,20 +300,20 @@ void KviFileTransferWindow::rightButtonPressed(KviTalListViewItem *it,const QPoi if(i->transfer()) { - QString szFile = i->transfer()->localFileName(); + TQString szFile = i->transfer()->localFileName(); if(!szFile.isEmpty()) { m_pLocalFilePopup->clear(); - QString tmp = "<b>file:/"; + TQString tmp = "<b>file:/"; tmp += szFile; tmp += "</b><br>"; - QFileInfo fi(szFile); + TQFileInfo fi(szFile); if(fi.exists()) { tmp += "<nobr>"; - tmp += __tr2qs_ctx("Size: %1","filetransferwindow").arg(KviQString::makeSizeReadable(fi.size())); + tmp += __tr2qs_ctx("Size: %1","filetransferwindow").tqarg(KviTQString::makeSizeReadable(fi.size())); tmp += "</nobr><br>"; } @@ -323,15 +323,15 @@ void KviFileTransferWindow::rightButtonPressed(KviTalListViewItem *it,const QPoi tmp += "</nobr>"; #endif //COMPILE_KDE_SUPPORT - QLabel * l = new QLabel(tmp,m_pLocalFilePopup); - l->setFrameStyle(QFrame::Raised | QFrame::Panel); + TQLabel * l = new TQLabel(tmp,m_pLocalFilePopup); + l->setFrameStyle(TQFrame::Raised | TQFrame::Panel); m_pLocalFilePopup->insertItem(l); #ifdef COMPILE_KDE_SUPPORT - QString mimetype = KMimeType::findByPath(szFile)->name(); + TQString mimetype = KMimeType::findByPath(szFile)->name(); KServiceTypeProfile::OfferList offers = KServiceTypeProfile::offers(mimetype,"Application"); - id = m_pLocalFilePopup->insertItem(__tr2qs_ctx("&Open","filetransferwindow"),this,SLOT(openLocalFile())); + id = m_pLocalFilePopup->insertItem(__tr2qs_ctx("&Open","filetransferwindow"),this,TQT_SLOT(openLocalFile())); m_pLocalFilePopup->setItemParameter(id,-1); m_pOpenFilePopup->clear(); @@ -349,32 +349,32 @@ void KviFileTransferWindow::rightButtonPressed(KviTalListViewItem *it,const QPoi m_pOpenFilePopup->insertSeparator(); - id = m_pOpenFilePopup->insertItem(__tr2qs_ctx("&Other...","filetransferwindow"),this,SLOT(openLocalFileWith())); + id = m_pOpenFilePopup->insertItem(__tr2qs_ctx("&Other...","filetransferwindow"),this,TQT_SLOT(openLocalFileWith())); m_pOpenFilePopup->setItemParameter(id,-1); m_pLocalFilePopup->insertItem(__tr2qs_ctx("Open &With","filetransferwindow"),m_pOpenFilePopup); m_pLocalFilePopup->insertSeparator(); - m_pLocalFilePopup->insertItem(__tr2qs_ctx("Open &Location","filetransferwindow"),this,SLOT(openLocalFileFolder())); - m_pLocalFilePopup->insertItem(__tr2qs_ctx("Terminal at Location","filetransferwindow"),this,SLOT(openLocalFileTerminal())); + m_pLocalFilePopup->insertItem(__tr2qs_ctx("Open &Location","filetransferwindow"),this,TQT_SLOT(openLocalFileFolder())); + m_pLocalFilePopup->insertItem(__tr2qs_ctx("Terminal at Location","filetransferwindow"),this,TQT_SLOT(openLocalFileTerminal())); m_pLocalFilePopup->insertSeparator(); #endif //COMPILE_KDE_SUPPORT //-| Grifisx & Noldor |- #ifdef COMPILE_ON_WINDOWS - id = m_pLocalFilePopup->insertItem(__tr2qs_ctx("&Open","filetransferwindow"),this,SLOT(openLocalFile())); + id = m_pLocalFilePopup->insertItem(__tr2qs_ctx("&Open","filetransferwindow"),this,TQT_SLOT(openLocalFile())); m_pLocalFilePopup->setItemParameter(id,-1); m_pOpenFilePopup->insertSeparator(); - m_pLocalFilePopup->insertItem(__tr2qs_ctx("Open &With","filetransferwindow"),this,SLOT(openLocalFileWith())); + m_pLocalFilePopup->insertItem(__tr2qs_ctx("Open &With","filetransferwindow"),this,TQT_SLOT(openLocalFileWith())); m_pLocalFilePopup->insertSeparator(); - m_pLocalFilePopup->insertItem(__tr2qs_ctx("Open &Location","filetransferwindow"),this,SLOT(openLocalFileFolder())); - m_pLocalFilePopup->insertItem(__tr2qs_ctx("MS-DOS Prompt at Location","filetransferwindow"),this,SLOT(openLocalFileTerminal())); + m_pLocalFilePopup->insertItem(__tr2qs_ctx("Open &Location","filetransferwindow"),this,TQT_SLOT(openLocalFileFolder())); + m_pLocalFilePopup->insertItem(__tr2qs_ctx("MS-DOS Prompt at Location","filetransferwindow"),this,TQT_SLOT(openLocalFileTerminal())); m_pLocalFilePopup->insertSeparator(); #endif //COMPILE_ON_WINDOWS // G&N end - m_pLocalFilePopup->insertItem(__tr2qs_ctx("&Copy Path to Clipboard","filetransferwindow"),this,SLOT(copyLocalFileToClipboard())); + m_pLocalFilePopup->insertItem(__tr2qs_ctx("&Copy Path to Clipboard","filetransferwindow"),this,TQT_SLOT(copyLocalFileToClipboard())); - id = m_pLocalFilePopup->insertItem(__tr2qs_ctx("&Delete file","filetransferwindow"),this,SLOT(deleteLocalFile())); + id = m_pLocalFilePopup->insertItem(__tr2qs_ctx("&Delete file","filetransferwindow"),this,TQT_SLOT(deleteLocalFile())); m_pLocalFilePopup->setItemEnabled(id,i->transfer()->terminated()); m_pContextPopup->insertItem(__tr2qs_ctx("Local &File","filetransferwindow"),m_pLocalFilePopup); @@ -399,14 +399,14 @@ void KviFileTransferWindow::rightButtonPressed(KviTalListViewItem *it,const QPoi item = (KviFileTransferItem *)item->nextSibling(); } - id = m_pContextPopup->insertItem(__tr2qs_ctx("&Clear Terminated","filetransferwindow"),this,SLOT(clearTerminated())); + id = m_pContextPopup->insertItem(__tr2qs_ctx("&Clear Terminated","filetransferwindow"),this,TQT_SLOT(clearTerminated())); m_pContextPopup->setItemEnabled(id,bHaveTerminated); bool bAreTransfersActive = false; if(m_pListView->childCount() >= 1) bAreTransfersActive = true; - id = m_pContextPopup->insertItem(__tr2qs_ctx("Clear &All","filetransferwindow"),this,SLOT(clearAll())); + id = m_pContextPopup->insertItem(__tr2qs_ctx("Clear &All","filetransferwindow"),this,TQT_SLOT(clearAll())); m_pContextPopup->setItemEnabled(id,bAreTransfersActive); m_pContextPopup->popup(pnt); @@ -426,14 +426,14 @@ void KviFileTransferWindow::openFilePopupActivated(int id) #ifdef COMPILE_KDE_SUPPORT int ip = m_pOpenFilePopup->itemParameter(id); if(ip < 0)return; - QString txt = m_pOpenFilePopup->text(id); + TQString txt = m_pOpenFilePopup->text(id); KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - QString mimetype = KMimeType::findByPath(tmp)->name(); + TQString mimetype = KMimeType::findByPath(tmp)->name(); KServiceTypeProfile::OfferList offers = KServiceTypeProfile::offers(mimetype,"Application"); for(KServiceTypeProfile::OfferList::Iterator itOffers = offers.begin(); @@ -458,9 +458,9 @@ void KviFileTransferWindow::openLocalFileTerminal() #ifdef COMPILE_ON_WINDOWS KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - int idx = tmp.findRev("/"); + int idx = tmp.tqfindRev("/"); if(idx == -1)return; tmp = tmp.left(idx); tmp.append("\""); @@ -473,10 +473,10 @@ void KviFileTransferWindow::openLocalFileTerminal() #ifdef COMPILE_KDE_SUPPORT KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - int idx = tmp.findRev("/"); + int idx = tmp.tqfindRev("/"); if(idx == -1)return; tmp = tmp.left(idx); @@ -493,17 +493,17 @@ void KviFileTransferWindow::deleteLocalFile() KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString fName = t->localFileName(); - QString tmp; + TQString fName = t->localFileName(); + TQString tmp; - KviQString::sprintf(tmp,__tr2qs_ctx("Do you really want to delete the file %Q?","filetransferwindow"),&fName); + KviTQString::sprintf(tmp,__tr2qs_ctx("Do you really want to delete the file %Q?","filetransferwindow"),&fName); - if(QMessageBox::warning(this,__tr2qs_ctx("Confirm delete","filetransferwindow"), + if(TQMessageBox::warning(this,__tr2qs_ctx("Confirm delete","filetransferwindow"), tmp,__tr2qs_ctx("Yes","filetransferwindow"),__tr2qs_ctx("No","filetransferwindow")) != 0) return; - if(!QFile::remove(fName)) - QMessageBox::warning(this,__tr2qs_ctx("Delete failed","filetransferwindow"), + if(!TQFile::remove(fName)) + TQMessageBox::warning(this,__tr2qs_ctx("Delete failed","filetransferwindow"), __tr2qs_ctx("Failed to remove the file","filetransferwindow"), __tr2qs_ctx("OK","filetransferwindow")); } @@ -516,19 +516,19 @@ void KviFileTransferWindow::openLocalFile() KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - tmp.replace("/","\\"); + tmp.tqreplace("/","\\"); ShellExecute(0,"open",tmp.local8Bit().data(),NULL,NULL,SW_SHOWNORMAL); //You have to link the shell32.lib #else //!COMPILE_ON_WINDOWS // G&N end #ifdef COMPILE_KDE_SUPPORT KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - QString mimetype = KMimeType::findByPath(tmp)->name(); //KMimeType + TQString mimetype = KMimeType::findByPath(tmp)->name(); //KMimeType KService::Ptr offer = KServiceTypeProfile::preferredService(mimetype,"Application"); if(!offer) { @@ -551,9 +551,9 @@ void KviFileTransferWindow::openLocalFileWith() #ifdef COMPILE_ON_WINDOWS KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - tmp.replace("/","\\"); + tmp.tqreplace("/","\\"); tmp.prepend("rundll32.exe shell32.dll,OpenAs_RunDLL "); // this if to show the 'open with...' window WinExec(tmp.local8Bit().data(),SW_SHOWNORMAL); #else //!COMPILE_ON_WINDOWS @@ -561,7 +561,7 @@ void KviFileTransferWindow::openLocalFileWith() #ifdef COMPILE_KDE_SUPPORT KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; KURL::List lst; @@ -577,15 +577,15 @@ void KviFileTransferWindow::copyLocalFileToClipboard() { KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; #ifdef COMPILE_USE_QT4 - QApplication::clipboard()->setText(tmp); + TQApplication::tqclipboard()->setText(tmp); #else - QApplication::clipboard()->setSelectionMode(false); - QApplication::clipboard()->setText(tmp); - QApplication::clipboard()->setSelectionMode(true); - QApplication::clipboard()->setText(tmp); + TQApplication::tqclipboard()->setSelectionMode(false); + TQApplication::tqclipboard()->setText(tmp); + TQApplication::tqclipboard()->setSelectionMode(true); + TQApplication::tqclipboard()->setText(tmp); #endif } @@ -595,10 +595,10 @@ void KviFileTransferWindow::openLocalFileFolder() #ifdef COMPILE_ON_WINDOWS KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - tmp=QFileInfo(tmp).dirPath(TRUE); - tmp.replace('/','\\'); + tmp=TQFileInfo(tmp).dirPath(TRUE); + tmp.tqreplace('/','\\'); tmp.prepend("explorer.exe "); WinExec(tmp.local8Bit().data(), SW_MAXIMIZE); #else //!COMPILE_ON_WINDOWS @@ -606,14 +606,14 @@ void KviFileTransferWindow::openLocalFileFolder() #ifdef COMPILE_KDE_SUPPORT KviFileTransfer * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - int idx = tmp.findRev("/"); + int idx = tmp.tqfindRev("/"); if(idx == -1)return; tmp = tmp.left(idx); - QString mimetype = KMimeType::findByPath(tmp)->name(); // inode/directory + TQString mimetype = KMimeType::findByPath(tmp)->name(); // inode/directory KService::Ptr offer = KServiceTypeProfile::preferredService(mimetype,"Application"); if(!offer)return; @@ -634,20 +634,20 @@ void KviFileTransferWindow::heartbeat() KviTalListViewItem * i1; KviTalListViewItem * i2; - i1 = m_pListView->itemAt(QPoint(1,1)); + i1 = m_pListView->itemAt(TQPoint(1,1)); if(!i1) { m_pListView->viewport()->update(); return; } - i2 = m_pListView->itemAt(QPoint(1,m_pListView->viewport()->height() - 2)); + i2 = m_pListView->itemAt(TQPoint(1,m_pListView->viewport()->height() - 2)); if(i2)i2 = i2->nextSibling(); while(i1 && (i1 != i2)) { if(((KviFileTransferItem *)i1)->transfer()->active()) { - m_pListView->repaintItem(i1); + m_pListView->tqrepaintItem(i1); } i1 = i1->nextSibling(); } @@ -655,7 +655,7 @@ void KviFileTransferWindow::heartbeat() void KviFileTransferWindow::clearAll() { - QString tmp; + TQString tmp; bool bHaveAllTerminated = true; KviFileTransferItem * item = (KviFileTransferItem *)m_pListView->firstChild(); @@ -669,11 +669,11 @@ void KviFileTransferWindow::clearAll() item = (KviFileTransferItem *)item->nextSibling(); } - KviQString::sprintf(tmp,__tr2qs_ctx("Clear all transfers, including any in progress?","filetransferwindow")); + KviTQString::sprintf(tmp,__tr2qs_ctx("Clear all transfers, including any in progress?","filetransferwindow")); // If any transfer is active asks for confirm if(!bHaveAllTerminated) - if(QMessageBox::warning(this,__tr2qs_ctx("Clear All Transfers? - KVIrc","filetransferwindow"), tmp,__tr2qs_ctx("Yes","filetransferwindow"),__tr2qs_ctx("No","filetransferwindow")) != 0) + if(TQMessageBox::warning(this,__tr2qs_ctx("Clear All Transfers? - KVIrc","filetransferwindow"), tmp,__tr2qs_ctx("Yes","filetransferwindow"),__tr2qs_ctx("No","filetransferwindow")) != 0) return; KviFileTransferManager::instance()->killAllTransfers(); @@ -689,21 +689,21 @@ void KviFileTransferWindow::getBaseLogFileName(KviStr &buffer) buffer.sprintf("FILETRANSFER"); } -QPixmap * KviFileTransferWindow::myIconPtr() +TQPixmap * KviFileTransferWindow::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_FILETRANSFER); } -void KviFileTransferWindow::resizeEvent(QResizeEvent *e) +void KviFileTransferWindow::resizeEvent(TQResizeEvent *e) { int h = m_pInput->heightHint(); m_pSplitter->setGeometry(0,0,width(),height() - h); m_pInput->setGeometry(0,height() - h,width(),h); } -QSize KviFileTransferWindow::sizeHint() const +TQSize KviFileTransferWindow::tqsizeHint() const { - return m_pSplitter->sizeHint(); + return m_pSplitter->tqsizeHint(); } void KviFileTransferWindow::fillCaptionBuffers() @@ -737,7 +737,7 @@ void KviFileTransferWindow::die() // KviWindowProperty p; // p.rect = externalGeometry(); // p.isDocked = isAttacched(); -// QValueList<int> l(m_pSplitter->sizes()); +// TQValueList<int> l(m_pSplitter->sizes()); // if(l.count() >= 1)p.splitWidth1 = *(l.at(0)); // if(l.count() >= 2)p.splitWidth2 = *(l.at(1)); // p.timestamp = m_pView->timestamp(); @@ -751,7 +751,7 @@ void KviFileTransferWindow::die() // //void KviFileTransferWindow::setProperties(KviWindowProperty *p) //{ -// QValueList<int> l; +// TQValueList<int> l; // l.append(p->splitWidth1); // l.append(p->splitWidth2); // m_pVertSplitter->setSizes(l); |