diff options
Diffstat (limited to 'src/modules/sharedfileswindow')
-rw-r--r-- | src/modules/sharedfileswindow/libkvisharedfileswindow.cpp | 16 | ||||
-rw-r--r-- | src/modules/sharedfileswindow/sharedfileswindow.cpp | 210 | ||||
-rw-r--r-- | src/modules/sharedfileswindow/sharedfileswindow.h | 42 |
3 files changed, 135 insertions, 133 deletions
diff --git a/src/modules/sharedfileswindow/libkvisharedfileswindow.cpp b/src/modules/sharedfileswindow/libkvisharedfileswindow.cpp index a7cab111..48e81dc8 100644 --- a/src/modules/sharedfileswindow/libkvisharedfileswindow.cpp +++ b/src/modules/sharedfileswindow/libkvisharedfileswindow.cpp @@ -32,7 +32,7 @@ #include "kvi_locale.h" #include "kvi_iconmanager.h" -#include <qsplitter.h> +#include <tqsplitter.h> #define KVI_SHARED_FILES_WINDOW_EXTENSION_NAME "Shared files window extension" @@ -47,11 +47,11 @@ static KviModuleExtension * sharedfileswindow_extension_alloc(KviModuleExtension { if(s->pParams) { - if(QVariant * v = s->pParams->find("bCreateMinimized")) + if(TQVariant * v = s->pParams->tqfind("bCreateMinimized")) { if(v->isValid()) { - if(v->type() == QVariant::Bool) + if(v->type() == TQVariant::Bool) { bCreateMinimized = v->toBool(); } @@ -67,11 +67,11 @@ static KviModuleExtension * sharedfileswindow_extension_alloc(KviModuleExtension if(s->pParams) { - if(QVariant * v = s->pParams->find("bNoRaise")) + if(TQVariant * v = s->pParams->tqfind("bNoRaise")) { if(v) { - if(v->isValid() && v->type() == QVariant::Bool) + if(v->isValid() && v->type() == TQVariant::Bool) bNoRaise = v->toBool(); } } @@ -106,10 +106,10 @@ static bool sharedfileswindow_kvs_cmd_open(KviKvsModuleCommandCall * c) KviModuleExtensionDescriptor * d = c->module()->findExtensionDescriptor("tool",KVI_SHARED_FILES_WINDOW_EXTENSION_NAME); if(d) { - KviPointerHashTable<QString,QVariant> dict(17,true); + KviPointerHashTable<TQString,TQVariant> dict(17,true); dict.setAutoDelete(true); - dict.replace("bCreateMinimized",new QVariant(c->hasSwitch('m',"minimized"))); - dict.replace("bNoRaise",new QVariant(c->hasSwitch('n',"noraise"))); + dict.tqreplace("bCreateMinimized",new TQVariant(c->hasSwitch('m',"minimized"))); + dict.tqreplace("bNoRaise",new TQVariant(c->hasSwitch('n',"noraise"))); d->allocate(c->window(),&dict,0); } else { diff --git a/src/modules/sharedfileswindow/sharedfileswindow.cpp b/src/modules/sharedfileswindow/sharedfileswindow.cpp index aa851684..3f486ddc 100644 --- a/src/modules/sharedfileswindow/sharedfileswindow.cpp +++ b/src/modules/sharedfileswindow/sharedfileswindow.cpp @@ -37,66 +37,66 @@ #include "kvi_filedialog.h" #include "kvi_styled_controls.h" -#include <qdatetimeedit.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qsplitter.h> +#include <tqdatetimeedit.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqsplitter.h> #include "kvi_tal_hbox.h" #include "kvi_tal_vbox.h" -#include <qlayout.h> -#include <qcheckbox.h> -#include <qmessagebox.h> -#include <qfileinfo.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqmessagebox.h> +#include <tqfileinfo.h> extern KviSharedFilesWindow * g_pSharedFilesWindow; extern KVIRC_API KviSharedFilesManager * g_pSharedFilesManager; -KviSharedFileEditDialog::KviSharedFileEditDialog(QWidget * par,KviSharedFile * f) -: QDialog(par,"shared_file_editor",true) +KviSharedFileEditDialog::KviSharedFileEditDialog(TQWidget * par,KviSharedFile * f) +: TQDialog(par,"shared_file_editor",true) { - QGridLayout * g = new QGridLayout(this,1,1,11,6); + TQGridLayout * g = new TQGridLayout(this,1,1,11,6); setCaption(__tr2qs_ctx("Edit Shared File - KVIrc","sharedfileswindow")); - QLabel * l = new QLabel(__tr2qs_ctx("Share name:","sharedfileswindow"),this); + TQLabel * l = new TQLabel(__tr2qs_ctx("Share name:","sharedfileswindow"),this); g->addWidget(l, 0, 0 ); - m_pShareNameEdit = new QLineEdit(this); + m_pShareNameEdit = new TQLineEdit(this); g->addMultiCellWidget( m_pShareNameEdit, 0, 0, 1, 3 ); - l = new QLabel(__tr2qs_ctx("File path:","sharedfileswindow"),this); + l = new TQLabel(__tr2qs_ctx("File path:","sharedfileswindow"),this); g->addWidget(l, 1, 0 ); - m_pFilePathEdit = new QLineEdit(this); + m_pFilePathEdit = new TQLineEdit(this); g->addMultiCellWidget( m_pFilePathEdit, 1, 1, 1, 2 ); - m_pBrowseButton = new QPushButton(__tr2qs_ctx("&Browse...","sharedfileswindow"),this); + m_pBrowseButton = new TQPushButton(__tr2qs_ctx("&Browse...","sharedfileswindow"),this); g->addWidget( m_pBrowseButton, 1, 3 ); - connect(m_pBrowseButton,SIGNAL(clicked()),this,SLOT(browse())); + connect(m_pBrowseButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(browse())); - l = new QLabel(__tr2qs_ctx("User mask:","sharedfileswindow"),this); + l = new TQLabel(__tr2qs_ctx("User tqmask:","sharedfileswindow"),this); g->addWidget(l, 2, 0 ); - m_pUserMaskEdit = new QLineEdit(this); + m_pUserMaskEdit = new TQLineEdit(this); g->addMultiCellWidget( m_pUserMaskEdit, 2, 2, 1, 3 ); m_pExpireCheckBox = new KviStyledCheckBox(__tr2qs_ctx("Expire at:","sharedfileswindow"),this); g->addWidget(m_pExpireCheckBox,3,0); - m_pExpireDateTimeEdit = new QDateTimeEdit(this); + m_pExpireDateTimeEdit = new TQDateTimeEdit(this); g->addMultiCellWidget(m_pExpireDateTimeEdit, 3, 3, 1, 3 ); - connect(m_pExpireCheckBox,SIGNAL(toggled(bool)),m_pExpireDateTimeEdit,SLOT(setEnabled(bool))); + connect(m_pExpireCheckBox,TQT_SIGNAL(toggled(bool)),m_pExpireDateTimeEdit,TQT_SLOT(setEnabled(bool))); - QPushButton * pb; + TQPushButton * pb; - pb = new QPushButton(__tr2qs_ctx("&OK","sharedfileswindow"),this); - connect(pb,SIGNAL(clicked()),this,SLOT(okClicked())); + pb = new TQPushButton(__tr2qs_ctx("&OK","sharedfileswindow"),this); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(okClicked())); pb->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_ACCEPT))); g->addWidget(pb,5,2); - pb = new QPushButton(__tr2qs_ctx("Cancel","sharedfileswindow"),this); - connect(pb,SIGNAL(clicked()),this,SLOT(reject())); + pb = new TQPushButton(__tr2qs_ctx("Cancel","sharedfileswindow"),this); + connect(pb,TQT_SIGNAL(clicked()),this,TQT_SLOT(reject())); pb->setIconSet(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_DISCARD))); g->addWidget(pb,5,3); @@ -108,14 +108,14 @@ KviSharedFileEditDialog::KviSharedFileEditDialog(QWidget * par,KviSharedFile * f m_pShareNameEdit->setText(f->name()); m_pFilePathEdit->setText(f->absFilePath()); m_pUserMaskEdit->setText(f->userMask()); - QDateTime dt; + TQDateTime dt; dt.setTime_t(f->expireTime()); m_pExpireDateTimeEdit->setDateTime(dt); m_pExpireCheckBox->setChecked(f->expires()); m_pExpireDateTimeEdit->setEnabled(f->expires()); } else { m_pExpireCheckBox->setChecked(false); - m_pExpireDateTimeEdit->setDateTime(QDateTime::currentDateTime()); + m_pExpireDateTimeEdit->setDateTime(TQDateTime::tqcurrentDateTime()); m_pExpireDateTimeEdit->setEnabled(false); } @@ -128,32 +128,32 @@ KviSharedFileEditDialog::~KviSharedFileEditDialog() void KviSharedFileEditDialog::browse() { - QString szBuf; - QString szTxt = m_pFilePathEdit->text(); + TQString szBuf; + TQString szTxt = m_pFilePathEdit->text(); if(!KviFileDialog::askForOpenFileName(szBuf,__tr2qs("Choose the file to share"),szTxt))return; m_pFilePathEdit->setText(szBuf); } KviSharedFile * KviSharedFileEditDialog::getResult() { - QString szName = m_pShareNameEdit->text(); - QString szPath = m_pFilePathEdit->text(); - QString szMask = m_pUserMaskEdit->text(); - QDateTime dt = m_pExpireDateTimeEdit->dateTime(); + TQString szName = m_pShareNameEdit->text(); + TQString szPath = m_pFilePathEdit->text(); + TQString szMask = m_pUserMaskEdit->text(); + TQDateTime dt = m_pExpireDateTimeEdit->dateTime(); bool bExpires = m_pExpireCheckBox->isChecked(); - QFileInfo f(szPath); + TQFileInfo f(szPath); return new KviSharedFile(szName,szPath,szMask,bExpires ? dt.toTime_t() : (time_t)0,f.size()); } void KviSharedFileEditDialog::okClicked() { - QString szName = m_pShareNameEdit->text(); - QString szPath = m_pFilePathEdit->text(); - QDateTime dt = m_pExpireDateTimeEdit->dateTime(); + TQString szName = m_pShareNameEdit->text(); + TQString szPath = m_pFilePathEdit->text(); + TQDateTime dt = m_pExpireDateTimeEdit->dateTime(); bool bExpires = m_pExpireCheckBox->isChecked(); - if(bExpires && (dt <= QDateTime::currentDateTime())) + if(bExpires && (dt <= TQDateTime::tqcurrentDateTime())) { - QMessageBox::warning(this,__tr2qs_ctx("Invalid expire time","sharedfileswindow"), + TQMessageBox::warning(this,__tr2qs_ctx("Invalid expire time","sharedfileswindow"), __tr2qs_ctx("The expire date/time is in the past: please either remove the \"expires\"" \ "check mark or specify a expire date/time in the future","sharedfileswindow"), __tr2qs_ctx("OK","sharedfileswindow")); @@ -162,16 +162,16 @@ void KviSharedFileEditDialog::okClicked() if(szName.isEmpty()) { - QMessageBox::warning(this,__tr2qs_ctx("Invalid share name","sharedfileswindow"), + TQMessageBox::warning(this,__tr2qs_ctx("Invalid share name","sharedfileswindow"), __tr2qs_ctx("The share name can't be empty, please correct it","sharedfileswindow"), __tr2qs_ctx("OK","sharedfileswindow")); return; } - QFileInfo f(szPath); + TQFileInfo f(szPath); if(!(f.exists() && f.isFile() && f.isReadable())) { - QMessageBox::warning(this,__tr2qs_ctx("Can't open the file","sharedfileswindow"), + TQMessageBox::warning(this,__tr2qs_ctx("Can't open the file","sharedfileswindow"), __tr2qs_ctx("The file doesn't exist or it is not readable, please check the path","sharedfileswindow"), __tr2qs_ctx("OK","sharedfileswindow")); return; @@ -188,7 +188,7 @@ KviSharedFilesListViewItem::KviSharedFilesListViewItem(KviTalListView * lv,KviSh setText(2,f->userMask()); if(f->expires()) { - QDateTime dt; + TQDateTime dt; dt.setTime_t(f->expireTime()); setText(3,dt.toString()); } else { @@ -207,9 +207,9 @@ KviSharedFilesWindow::KviSharedFilesWindow(KviModuleExtensionDescriptor * d,KviF { g_pSharedFilesWindow = this; #ifdef COMPILE_USE_QT4 - m_pSplitter = new QSplitter(Qt::Horizontal,this,"splitter"); + m_pSplitter = new TQSplitter(Qt::Horizontal,this,"splitter"); #else - m_pSplitter = new QSplitter(QSplitter::Horizontal,this,"splitter"); + m_pSplitter = new TQSplitter(Qt::Horizontal,this,"splitter"); #endif KviTalVBox * vbox = new KviTalVBox(m_pSplitter); @@ -222,20 +222,20 @@ KviSharedFilesWindow::KviSharedFilesWindow(KviModuleExtensionDescriptor * d,KviF m_pListView->addColumn(__tr2qs_ctx("Mask","sharedfileswindow"),200); m_pListView->addColumn(__tr2qs_ctx("Expires","sharedfileswindow"),200); m_pListView->setSelectionMode(KviTalListView::Single); - connect(m_pListView,SIGNAL(selectionChanged()),this,SLOT(enableButtons())); + connect(m_pListView,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(enableButtons())); - connect(g_pSharedFilesManager,SIGNAL(sharedFilesChanged()),this,SLOT(fillFileView())); - connect(g_pSharedFilesManager,SIGNAL(sharedFileAdded(KviSharedFile *)),this,SLOT(sharedFileAdded(KviSharedFile *))); - connect(g_pSharedFilesManager,SIGNAL(sharedFileRemoved(KviSharedFile *)),this,SLOT(sharedFileRemoved(KviSharedFile *))); + connect(g_pSharedFilesManager,TQT_SIGNAL(sharedFilesChanged()),this,TQT_SLOT(fillFileView())); + connect(g_pSharedFilesManager,TQT_SIGNAL(sharedFileAdded(KviSharedFile *)),this,TQT_SLOT(sharedFileAdded(KviSharedFile *))); + connect(g_pSharedFilesManager,TQT_SIGNAL(sharedFileRemoved(KviSharedFile *)),this,TQT_SLOT(sharedFileRemoved(KviSharedFile *))); KviTalHBox * b = new KviTalHBox(vbox); - m_pAddButton = new QPushButton(__tr2qs_ctx("&Add...","sharedfileswindow"),b); - connect(m_pAddButton,SIGNAL(clicked()),this,SLOT(addClicked())); - m_pRemoveButton = new QPushButton(__tr2qs_ctx("Re&move","sharedfileswindow"),b); - connect(m_pRemoveButton,SIGNAL(clicked()),this,SLOT(removeClicked())); - m_pEditButton = new QPushButton(__tr2qs_ctx("&Edit","sharedfileswindow"),b); - connect(m_pEditButton,SIGNAL(clicked()),this,SLOT(editClicked())); + m_pAddButton = new TQPushButton(__tr2qs_ctx("&Add...","sharedfileswindow"),b); + connect(m_pAddButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(addClicked())); + m_pRemoveButton = new TQPushButton(__tr2qs_ctx("Re&move","sharedfileswindow"),b); + connect(m_pRemoveButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(removeClicked())); + m_pEditButton = new TQPushButton(__tr2qs_ctx("&Edit","sharedfileswindow"),b); + connect(m_pEditButton,TQT_SIGNAL(clicked()),this,TQT_SLOT(editClicked())); fillFileView(); } @@ -263,7 +263,7 @@ void KviSharedFilesWindow::removeClicked() void KviSharedFilesWindow::addClicked() { KviSharedFileEditDialog dlg(0); - if(dlg.exec() != QDialog::Accepted)return; + if(dlg.exec() != TQDialog::Accepted)return; KviSharedFile * f = dlg.getResult(); if(!f)return; @@ -276,7 +276,7 @@ void KviSharedFilesWindow::editClicked() if(!it)return; KviSharedFileEditDialog dlg(0,it->readOnlySharedFilePointer()); - if(dlg.exec() != QDialog::Accepted)return; + if(dlg.exec() != TQDialog::Accepted)return; KviSharedFilesListViewItem * it2 = (KviSharedFilesListViewItem *)m_pListView->currentItem(); if(it2 != it)return; // ooops ? @@ -290,7 +290,7 @@ void KviSharedFilesWindow::editClicked() void KviSharedFilesWindow::fillFileView() { m_pListView->clear(); - KviPointerHashTableIterator<QString,KviSharedFileList> it(*(g_pSharedFilesManager->sharedFileListDict())); + KviPointerHashTableIterator<TQString,KviSharedFileList> it(*(g_pSharedFilesManager->sharedFileListDict())); KviSharedFilesListViewItem * itm; @@ -330,13 +330,13 @@ void KviSharedFilesWindow::sharedFileRemoved(KviSharedFile * f) /* -void KviSharedFilesWindow::tipRequest(KviDynamicToolTip * tip,const QPoint &pnt) +void KviSharedFilesWindow::tipRequest(KviDynamicToolTip * tip,const TQPoint &pnt) { KviSharedFilesItem * it = (KviSharedFilesItem *)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); } */ @@ -377,14 +377,14 @@ void KviSharedFilesWindow::transferUnregistering(KviSharedFiles * t) if(it)delete it; } -void KviSharedFilesWindow::rightButtonPressed(KviTalListViewItem *it,const QPoint &pnt,int col) +void KviSharedFilesWindow::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(); @@ -398,20 +398,20 @@ void KviSharedFilesWindow::rightButtonPressed(KviTalListViewItem *it,const QPoin 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 bytes","filetransferwindow").arg(fi.size()); + tmp += __tr2qs_ctx("Size: %1 bytes","filetransferwindow").tqarg(fi.size()); tmp += "</nobr><br>"; } @@ -421,12 +421,12 @@ void KviSharedFilesWindow::rightButtonPressed(KviTalListViewItem *it,const QPoin 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"); m_pOpenFilePopup->clear(); @@ -444,18 +444,18 @@ void KviSharedFilesWindow::rightButtonPressed(KviTalListViewItem *it,const QPoin m_pOpenFilePopup->insertSeparator(); - id = m_pOpenFilePopup->insertItem(__tr2qs_ctx("Default application","filetransferwindow"),this,SLOT(openLocalFile())); + id = m_pOpenFilePopup->insertItem(__tr2qs_ctx("Default application","filetransferwindow"),this,TQT_SLOT(openLocalFile())); m_pOpenFilePopup->setItemParameter(id,-1); - 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 folder","filetransferwindow"),this,SLOT(openLocalFileFolder())); - m_pLocalFilePopup->insertItem(__tr2qs_ctx("Reach in terminal","filetransferwindow"),this,SLOT(openLocalFileTerminal())); + m_pLocalFilePopup->insertItem(__tr2qs_ctx("Open folder","filetransferwindow"),this,TQT_SLOT(openLocalFileFolder())); + m_pLocalFilePopup->insertItem(__tr2qs_ctx("Reach in terminal","filetransferwindow"),this,TQT_SLOT(openLocalFileTerminal())); m_pLocalFilePopup->insertSeparator(); #endif //COMPILE_KDE_SUPPORT - 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())); m_pContextPopup->insertItem(__tr2qs_ctx("Local file","filetransferwindow"),m_pLocalFilePopup); } @@ -478,10 +478,10 @@ void KviSharedFilesWindow::rightButtonPressed(KviTalListViewItem *it,const QPoin item = (KviSharedFilesItem *)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); - 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,it); m_pContextPopup->popup(pnt); @@ -501,14 +501,14 @@ void KviSharedFilesWindow::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); KviSharedFiles * 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(); @@ -532,10 +532,10 @@ void KviSharedFilesWindow::openLocalFileTerminal() #ifdef COMPILE_KDE_SUPPORT KviSharedFiles * 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); @@ -551,10 +551,10 @@ void KviSharedFilesWindow::openLocalFile() #ifdef COMPILE_KDE_SUPPORT KviSharedFiles * 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(); KService::Ptr offer = KServiceTypeProfile::preferredService(mimetype,"Application"); if(!offer) { @@ -575,7 +575,7 @@ void KviSharedFilesWindow::openLocalFileWith() #ifdef COMPILE_KDE_SUPPORT KviSharedFiles * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; KURL::List lst; @@ -590,12 +590,12 @@ void KviSharedFilesWindow::copyLocalFileToClipboard() { KviSharedFiles * t = selectedTransfer(); if(!t)return; - QString tmp = t->localFileName(); + TQString tmp = t->localFileName(); if(tmp.isEmpty())return; - 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); } void KviSharedFilesWindow::openLocalFileFolder() @@ -603,14 +603,14 @@ void KviSharedFilesWindow::openLocalFileFolder() #ifdef COMPILE_KDE_SUPPORT KviSharedFiles * 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; @@ -629,20 +629,20 @@ void KviSharedFilesWindow::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(((KviSharedFilesItem *)i1)->transfer()->active()) { - m_pListView->repaintItem(i1); + m_pListView->tqrepaintItem(i1); } i1 = i1->nextSibling(); } @@ -650,7 +650,7 @@ void KviSharedFilesWindow::heartbeat() void KviSharedFilesWindow::clearAll() { - if(QMessageBox::information(this,__tr2qs_ctx("Clear all transfers","filetransferwindow"), + if(TQMessageBox::information(this,__tr2qs_ctx("Clear all transfers","filetransferwindow"), __tr2qs_ctx("Remove all the transfers including the running ones ?","filetransferwindow"), __tr2qs_ctx("Yes","filetransferwindow"),__tr2qs_ctx("No","filetransferwindow")) != 0)return; @@ -667,21 +667,21 @@ void KviSharedFilesWindow::getBaseLogFileName(KviStr &buffer) buffer.sprintf("SHAREDFILES"); } -QPixmap * KviSharedFilesWindow::myIconPtr() +TQPixmap * KviSharedFilesWindow::myIconPtr() { return g_pIconManager->getSmallIcon(KVI_SMALLICON_SHAREDFILES); } -void KviSharedFilesWindow::resizeEvent(QResizeEvent *e) +void KviSharedFilesWindow::resizeEvent(TQResizeEvent *e) { //int h = m_pInput->heightHint(); m_pSplitter->setGeometry(0,0,width(),height()); //m_pInput->setGeometry(0,height() - h,width(),h); } -QSize KviSharedFilesWindow::sizeHint() const +TQSize KviSharedFilesWindow::tqsizeHint() const { - return m_pSplitter->sizeHint(); + return m_pSplitter->tqsizeHint(); } void KviSharedFilesWindow::fillCaptionBuffers() @@ -716,7 +716,7 @@ void KviSharedFilesWindow::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(); @@ -730,7 +730,7 @@ void KviSharedFilesWindow::die() // //void KviSharedFilesWindow::setProperties(KviWindowProperty *p) //{ -// QValueList<int> l; +// TQValueList<int> l; // l.append(p->splitWidth1); // l.append(p->splitWidth2); // m_pVertSplitter->setSizes(l); diff --git a/src/modules/sharedfileswindow/sharedfileswindow.h b/src/modules/sharedfileswindow/sharedfileswindow.h index f46bd6df..4832dc88 100644 --- a/src/modules/sharedfileswindow/sharedfileswindow.h +++ b/src/modules/sharedfileswindow/sharedfileswindow.h @@ -33,13 +33,13 @@ #include "kvi_styled_controls.h" #include "kvi_tal_listview.h" -#include <qdialog.h> +#include <tqdialog.h> -class QGridLayout; -class QDateTimeEdit; -class QLabel; -class QLineEdit; -class QPushButton; +class TQGridLayout; +class TQDateTimeEdit; +class TQLabel; +class TQLineEdit; +class TQPushButton; class KviSharedFilesListViewItem : public KviTalListViewItem { @@ -54,18 +54,19 @@ public: -class KviSharedFileEditDialog : public QDialog +class KviSharedFileEditDialog : public TQDialog { Q_OBJECT + TQ_OBJECT public: - KviSharedFileEditDialog(QWidget* par,KviSharedFile * f = 0); + KviSharedFileEditDialog(TQWidget* par,KviSharedFile * f = 0); ~KviSharedFileEditDialog(); - QDateTimeEdit * m_pExpireDateTimeEdit; - QLineEdit * m_pFilePathEdit; - QLineEdit * m_pUserMaskEdit; - QPushButton * m_pBrowseButton; - QLineEdit * m_pShareNameEdit; + TQDateTimeEdit * m_pExpireDateTimeEdit; + TQLineEdit * m_pFilePathEdit; + TQLineEdit * m_pUserMaskEdit; + TQPushButton * m_pBrowseButton; + TQLineEdit * m_pShareNameEdit; KviStyledCheckBox * m_pExpireCheckBox; public: KviSharedFile * getResult(); @@ -81,26 +82,27 @@ class KviSharedFilesWindow : public KviWindow , public KviModuleExtension { friend class KviSharedFilesItem; Q_OBJECT + TQ_OBJECT public: KviSharedFilesWindow(KviModuleExtensionDescriptor * d,KviFrame * lpFrm); ~KviSharedFilesWindow(); protected: - QSplitter * m_pVertSplitter; + TQSplitter * m_pVertSplitter; KviTalListView * m_pListView; - QPushButton * m_pRemoveButton; - QPushButton * m_pEditButton; - QPushButton * m_pAddButton; + TQPushButton * m_pRemoveButton; + TQPushButton * m_pEditButton; + TQPushButton * m_pAddButton; public: // Methods virtual void die(); protected: - virtual QPixmap * myIconPtr(); + virtual TQPixmap * myIconPtr(); virtual void fillCaptionBuffers(); - virtual void resizeEvent(QResizeEvent *e); + virtual void resizeEvent(TQResizeEvent *e); virtual void getBaseLogFileName(KviStr &buffer); public: - virtual QSize sizeHint() const; + virtual TQSize tqsizeHint() const; protected slots: void fillFileView(); void sharedFileAdded(KviSharedFile * f); |