diff options
Diffstat (limited to 'kget')
47 files changed, 601 insertions, 601 deletions
diff --git a/kget/dlgAdvanced.cpp b/kget/dlgAdvanced.cpp index 43b0265c..e4dee980 100644 --- a/kget/dlgAdvanced.cpp +++ b/kget/dlgAdvanced.cpp @@ -24,8 +24,8 @@ * ***************************************************************************/ -#include <qcheckbox.h> -#include <qradiobutton.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> #include <kprotocolmanager.h> @@ -38,7 +38,7 @@ -DlgAdvanced::DlgAdvanced(QWidget * parent) +DlgAdvanced::DlgAdvanced(TQWidget * parent) : DlgAdvancedBase(parent) { cb_partial->hide(); @@ -84,7 +84,7 @@ void DlgAdvanced::applyData() ksettings.b_KonquerorIntegration=!ksettings.b_KonquerorIntegration; KConfig cfg("konquerorrc", false, false); cfg.setGroup("HTML Settings"); - cfg.writePathEntry("DownloadManager",QString((bIsKonquiEnable)?"kget":"")); + cfg.writePathEntry("DownloadManager",TQString((bIsKonquiEnable)?"kget":"")); cfg.sync(); } } diff --git a/kget/dlgAdvanced.h b/kget/dlgAdvanced.h index 5af58c2a..19c2e3f5 100644 --- a/kget/dlgAdvanced.h +++ b/kget/dlgAdvanced.h @@ -35,7 +35,7 @@ Q_OBJECT public: - DlgAdvanced(QWidget * parent); + DlgAdvanced(TQWidget * parent); ~DlgAdvanced() {} void applyData(); diff --git a/kget/dlgAutomation.cpp b/kget/dlgAutomation.cpp index 98ed4f3e..779cacf3 100644 --- a/kget/dlgAutomation.cpp +++ b/kget/dlgAutomation.cpp @@ -24,10 +24,10 @@ * ***************************************************************************/ -#include <qgroupbox.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqgroupbox.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <klocale.h> #include <kdatetimewidget.h> @@ -42,7 +42,7 @@ #include "dlgAutomation.h" -DlgAutomation::DlgAutomation(QWidget * parent) +DlgAutomation::DlgAutomation(TQWidget * parent) : DlgAutomationBase(parent) { } diff --git a/kget/dlgAutomation.h b/kget/dlgAutomation.h index e9f629bc..2a236094 100644 --- a/kget/dlgAutomation.h +++ b/kget/dlgAutomation.h @@ -28,8 +28,8 @@ #ifndef _DLGAUTOMATION_H #define _DLGAUTOMATION_H -#include <qstringlist.h> -#include <qdatetime.h> +#include <tqstringlist.h> +#include <tqdatetime.h> #include "dlgautomationbase.h" @@ -38,14 +38,14 @@ class DlgAutomation:public DlgAutomationBase Q_OBJECT public: - DlgAutomation(QWidget * parent); + DlgAutomation(TQWidget * parent); ~DlgAutomation() {} void applyData(); void setData(); private: - QDateTime disconnectDateTime; + TQDateTime disconnectDateTime; signals: void configChanged(); diff --git a/kget/dlgConnection.cpp b/kget/dlgConnection.cpp index c5ffae56..5530953b 100644 --- a/kget/dlgConnection.cpp +++ b/kget/dlgConnection.cpp @@ -25,10 +25,10 @@ ***************************************************************************/ -#include <qgroupbox.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qlayout.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqlayout.h> #include <klocale.h> #include <kprotocolmanager.h> @@ -42,7 +42,7 @@ #include "dlgConnection.h" -DlgConnection::DlgConnection(QWidget * parent) +DlgConnection::DlgConnection(TQWidget * parent) :DlgConnectionBase(parent, "", 0) { // TODO: these are not supported yet, so hide them diff --git a/kget/dlgConnection.h b/kget/dlgConnection.h index 0420b4f0..d4fa58a1 100644 --- a/kget/dlgConnection.h +++ b/kget/dlgConnection.h @@ -28,7 +28,7 @@ #ifndef _DLGCONNECTION_H #define _DLGCONNECTION_H -#include <qstringlist.h> +#include <tqstringlist.h> #include "dlgconnectionbase.h" @@ -37,7 +37,7 @@ class DlgConnection : public DlgConnectionBase Q_OBJECT public: - DlgConnection(QWidget * parent); + DlgConnection(TQWidget * parent); ~DlgConnection() {} void applyData(); void setData(); diff --git a/kget/dlgDirectories.cpp b/kget/dlgDirectories.cpp index 6c4c42e3..a373cc67 100644 --- a/kget/dlgDirectories.cpp +++ b/kget/dlgDirectories.cpp @@ -25,11 +25,11 @@ ***************************************************************************/ -#include <qpushbutton.h> -#include <qtoolbutton.h> -#include <qlistview.h> +#include <tqpushbutton.h> +#include <tqtoolbutton.h> +#include <tqlistview.h> -#include <qdir.h> +#include <tqdir.h> #include <kfiledialog.h> #include <klineedit.h> @@ -42,11 +42,11 @@ #include "dlgDirectories.h" #include <kapplication.h> -DlgDirectories::DlgDirectories(QWidget * parent) +DlgDirectories::DlgDirectories(TQWidget * parent) : DlgDirectoriesBase(parent) { - connect( le_ext, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotDirectoryChanged( ) ) ); - connect( le_dir, SIGNAL( textChanged ( const QString & ) ), this, SLOT( slotDirectoryChanged( ) ) ); + connect( le_ext, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotDirectoryChanged( ) ) ); + connect( le_dir, TQT_SIGNAL( textChanged ( const TQString & ) ), this, TQT_SLOT( slotDirectoryChanged( ) ) ); le_dir->setMode( KFile::Directory ); lv_entries->setSortColumn( -1 ); @@ -59,7 +59,7 @@ void DlgDirectories::slotDirectoryChanged( ) pb_add->setEnabled(!le_ext->text().isEmpty() &&!le_dir->url().isEmpty() ); } -void DlgDirectories::selectEntry(QListViewItem * item) +void DlgDirectories::selectEntry(TQListViewItem * item) { if (item) { le_ext->setText(item->text(0)); @@ -75,7 +75,7 @@ void DlgDirectories::selectEntry(QListViewItem * item) void DlgDirectories::updateUpDown() { - QListViewItem *item = lv_entries->selectedItem(); + TQListViewItem *item = lv_entries->selectedItem(); pb_up->setEnabled( item && item->itemAbove() ); pb_down->setEnabled( item && item->itemBelow() ); @@ -83,22 +83,22 @@ void DlgDirectories::updateUpDown() void DlgDirectories::addEntry() { - QString ext = le_ext->text(); - QString dir = le_dir->url(); + TQString ext = le_ext->text(); + TQString dir = le_dir->url(); if (ext.contains(",") || dir.contains(",") || ext.isEmpty() || dir.isEmpty()) { KMessageBox::error(this, i18n("Each row consists of exactly one\nextension type and one folder."), i18n("Error")); return; } - QDir f(dir); + TQDir f(dir); if (!f.exists()) { KMessageBox::error(this, i18n("Folder does not exist:\n%1").arg(dir), i18n("Error")); return; } - new QListViewItem(lv_entries, ext, dir); + new TQListViewItem(lv_entries, ext, dir); updateUpDown(); emit configChanged(); @@ -107,7 +107,7 @@ void DlgDirectories::addEntry() void DlgDirectories::deleteEntry() { - QListViewItem *item = lv_entries->selectedItem(); + TQListViewItem *item = lv_entries->selectedItem(); delete item; updateUpDown(); emit configChanged(); @@ -116,25 +116,25 @@ void DlgDirectories::deleteEntry() void DlgDirectories::changeEntry() { - QListViewItem *old_item = lv_entries->selectedItem(); + TQListViewItem *old_item = lv_entries->selectedItem(); if (old_item) { - QString ext = le_ext->text(); - QString dir = le_dir->url(); + TQString ext = le_ext->text(); + TQString dir = le_dir->url(); if (ext.contains(",") || dir.contains(",") || ext.isEmpty() || dir.isEmpty()) { KMessageBox::error(this, i18n("Each row consists of exactly one\nextension type and one folder."), i18n("Error")); return; } - QDir f(dir); + TQDir f(dir); if (!f.exists()) { KMessageBox::error(this, i18n("Folder does not exist:\n%1").arg(dir), i18n("Error")); return; } - new QListViewItem(lv_entries, old_item, ext, dir); + new TQListViewItem(lv_entries, old_item, ext, dir); delete old_item; emit configChanged(); } @@ -143,7 +143,7 @@ void DlgDirectories::changeEntry() void DlgDirectories::downEntry() { - QListViewItem *item = lv_entries->selectedItem(); + TQListViewItem *item = lv_entries->selectedItem(); if ( !item ) return; @@ -157,7 +157,7 @@ void DlgDirectories::downEntry() void DlgDirectories::upEntry() { - QListViewItem *item = lv_entries->selectedItem(); + TQListViewItem *item = lv_entries->selectedItem(); if ( !item || !item->itemAbove() ) return; @@ -175,11 +175,11 @@ void DlgDirectories::setData() if (ksettings.defaultDirList.count() > 0) { // we need to insert items in the reverse order - // because "new QListViewItem" puts itself at the beginning + // because "new TQListViewItem" puts itself at the beginning for (it = ksettings.defaultDirList.fromLast(); it != ksettings.defaultDirList.begin(); it--) { - new QListViewItem(lv_entries, (*it).extRegexp, (*it).defaultDir); + new TQListViewItem(lv_entries, (*it).extRegexp, (*it).defaultDir); } - new QListViewItem(lv_entries, (*it).extRegexp, (*it).defaultDir); + new TQListViewItem(lv_entries, (*it).extRegexp, (*it).defaultDir); } } @@ -187,10 +187,10 @@ void DlgDirectories::setData() void DlgDirectories::applyData() { ksettings.defaultDirList.clear(); - QListViewItemIterator it(lv_entries); + TQListViewItemIterator it(lv_entries); for (; it.current(); ++it) { - QListViewItem *item = it.current(); + TQListViewItem *item = it.current(); DirItem ditem; diff --git a/kget/dlgDirectories.h b/kget/dlgDirectories.h index deb403e3..8d3c1cf5 100644 --- a/kget/dlgDirectories.h +++ b/kget/dlgDirectories.h @@ -37,7 +37,7 @@ Q_OBJECT public: - DlgDirectories(QWidget * parent); + DlgDirectories(TQWidget * parent); ~DlgDirectories() {} void applyData(); void setData(); @@ -46,7 +46,7 @@ signals: void configChanged(); protected slots: - void selectEntry(QListViewItem * item); + void selectEntry(TQListViewItem * item); void addEntry(); void deleteEntry(); void changeEntry(); diff --git a/kget/dlgIndividual.cpp b/kget/dlgIndividual.cpp index 72fc6c7d..9cb9690c 100644 --- a/kget/dlgIndividual.cpp +++ b/kget/dlgIndividual.cpp @@ -25,15 +25,15 @@ ***************************************************************************/ -#include <qlayout.h> +#include <tqlayout.h> #include "dockindividual.h" -#include <qlabel.h> -#include <qtabwidget.h> +#include <tqlabel.h> +#include <tqtabwidget.h> #include <kprogress.h> -#include <qtextedit.h> -#include <qcheckbox.h> +#include <tqtextedit.h> +#include <tqcheckbox.h> #include <kpushbutton.h> #include <ksqueezedtextlabel.h> #include <kdatetimewidget.h> @@ -53,7 +53,7 @@ DlgIndividual::DlgIndividual(Transfer * _item) - : QWidget(0, "dialog", WDestructiveClose) + : TQWidget(0, "dialog", WDestructiveClose) { item = _item; @@ -63,22 +63,22 @@ DlgIndividual::DlgIndividual(Transfer * _item) // Actions - m_paDock = new KToggleAction(i18n("&Dock"),"tool_dock.png", 0, this, SLOT(slotToggleDock()), this, "dockIndividual"); + m_paDock = new KToggleAction(i18n("&Dock"),"tool_dock.png", 0, this, TQT_SLOT(slotToggleDock()), this, "dockIndividual"); - QVBoxLayout *topLayout = new QVBoxLayout( this, KDialog::marginHint(),KDialog::spacingHint() ); + TQVBoxLayout *topLayout = new TQVBoxLayout( this, KDialog::marginHint(),KDialog::spacingHint() ); topLayout->addStrut( 360 ); // makes dlg at least that wide - QGridLayout *grid = new QGridLayout( 2, 3 ); + TQGridLayout *grid = new TQGridLayout( 2, 3 ); topLayout->addLayout(grid); grid->addColSpacing(1, KDialog::spacingHint()); - grid->addWidget(new QLabel(i18n("Source:"), this), 0, 0); + grid->addWidget(new TQLabel(i18n("Source:"), this), 0, 0); sourceLabel = new KSqueezedTextLabel(this); grid->addWidget(sourceLabel, 0, 2); sourceLabel->setText(i18n("Source Label")); - grid->addWidget(new QLabel(i18n("Destination:"), this), 1, 0); + grid->addWidget(new TQLabel(i18n("Destination:"), this), 1, 0); destLabel = new KSqueezedTextLabel(this); grid->addWidget(destLabel, 1, 2); @@ -88,15 +88,15 @@ DlgIndividual::DlgIndividual(Transfer * _item) topLayout->addWidget( m_pProgressBar ); // processed info - QHBoxLayout *hBox = new QHBoxLayout(); + TQHBoxLayout *hBox = new TQHBoxLayout(); topLayout->addLayout(hBox); - sizeLabel = new QLabel(this); + sizeLabel = new TQLabel(this); hBox->addWidget(sizeLabel); - resumeLabel = new QLabel(this); + resumeLabel = new TQLabel(this); hBox->addWidget(resumeLabel); - speedLabel = new QLabel(this); + speedLabel = new TQLabel(this); speedLabel->setText(i18n("0 B/s")); topLayout->addWidget(speedLabel); @@ -125,46 +125,46 @@ DlgIndividual::DlgIndividual(Transfer * _item) - QCheckBox * keepOpen = new QCheckBox( i18n("&Keep this window open after the operation is complete."), this); - connect( keepOpen, SIGNAL( toggled(bool) ), SLOT( slotKeepOpenToggled(bool) ) ); + TQCheckBox * keepOpen = new TQCheckBox( i18n("&Keep this window open after the operation is complete."), this); + connect( keepOpen, TQT_SIGNAL( toggled(bool) ), TQT_SLOT( slotKeepOpenToggled(bool) ) ); topLayout->addWidget(keepOpen); - QFrame *line3 = new QFrame( this ); - line3->setFrameShape( QFrame::HLine ); - line3->setFrameShadow( QFrame::Sunken ); + TQFrame *line3 = new TQFrame( this ); + line3->setFrameShape( TQFrame::HLine ); + line3->setFrameShadow( TQFrame::Sunken ); topLayout->addWidget( line3 ); - hBox = new QHBoxLayout(); + hBox = new TQHBoxLayout(); topLayout->addLayout(hBox); openFile = new KPushButton( i18n("Open &File"), this ); - connect( openFile, SIGNAL( clicked() ), SLOT( slotOpenFile() ) ); + connect( openFile, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOpenFile() ) ); hBox->addWidget( openFile ); openFile->setEnabled(false); openLocation = new KPushButton( i18n("Open &Destination"), this ); - connect( openLocation, SIGNAL( clicked() ), SLOT( slotOpenLocation() ) ); + connect( openLocation, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOpenLocation() ) ); hBox->addWidget( openLocation ); hBox->addStretch(1); pbAdvanced = new KPushButton( i18n("Advanced"), this ); - connect(pbAdvanced, SIGNAL(clicked()), SLOT(slotToggleAdvanced())); + connect(pbAdvanced, TQT_SIGNAL(clicked()), TQT_SLOT(slotToggleAdvanced())); hBox->addWidget( pbAdvanced ); // setup tab dialog - panelAdvanced = new QTabWidget(this); + panelAdvanced = new TQTabWidget(this); // if the time was already set somewhere in the future, keep it // otherwise set it to the current time - QDateTime dt; + TQDateTime dt; - if (item->getStartTime() < QDateTime::currentDateTime() && item->getMode() != Transfer::MD_SCHEDULED) + if (item->getStartTime() < TQDateTime::currentDateTime() && item->getMode() != Transfer::MD_SCHEDULED) { - dt = QDateTime::currentDateTime(); + dt = TQDateTime::currentDateTime(); } else { @@ -176,15 +176,15 @@ DlgIndividual::DlgIndividual(Transfer * _item) panelAdvanced->addTab(spins, i18n("Timer")); panelAdvanced->hide(); - connect(spins, SIGNAL(valueChanged(const QDateTime &)), item, SLOT(slotStartTime(const QDateTime &))); + connect(spins, TQT_SIGNAL(valueChanged(const TQDateTime &)), item, TQT_SLOT(slotStartTime(const TQDateTime &))); // adding item log - ml_log = new QTextEdit(panelAdvanced); + ml_log = new TQTextEdit(panelAdvanced); ml_log->setTextFormat(LogText); ml_log->setReadOnly(true); // ml_log->setFixedSize(sizeHint()); - ml_log->setVScrollBarMode(QScrollView::Auto); - ml_log->setWordWrap(QTextEdit::NoWrap); + ml_log->setVScrollBarMode(TQScrollView::Auto); + ml_log->setWordWrap(TQTextEdit::NoWrap); // ml_log->setSizePolicy(policy); @@ -228,7 +228,7 @@ void DlgIndividual::setProcessedSize(KIO::filesize_t bytes) } -void DlgIndividual::setSpeed(QString speed) +void DlgIndividual::setSpeed(TQString speed) { speedLabel->setText(speed); m_pDockIndividual->setTip(speed); @@ -295,12 +295,12 @@ void DlgIndividual::slotToggleDock() /** Sets the whole log */ -void DlgIndividual::setLog(const QString & _msg) +void DlgIndividual::setLog(const TQString & _msg) { ml_log->setText(_msg); } -void DlgIndividual::appendLog(const QString & _msg) +void DlgIndividual::appendLog(const TQString & _msg) { ml_log->append(_msg); } diff --git a/kget/dlgIndividual.h b/kget/dlgIndividual.h index 73a233aa..e275608d 100644 --- a/kget/dlgIndividual.h +++ b/kget/dlgIndividual.h @@ -27,9 +27,9 @@ #ifndef __dlgprogress_h__ #define __dlgprogress_h__ -#include <qdatetime.h> +#include <tqdatetime.h> -#include <qwidget.h> +#include <tqwidget.h> #include <kio/global.h> @@ -54,8 +54,8 @@ public: DlgIndividual(Transfer * _item); ~DlgIndividual() {} - void setLog(const QString & _msg); - void appendLog(const QString & _msg); + void setLog(const TQString & _msg); + void appendLog(const TQString & _msg); void enableOpenFile(); public slots: @@ -63,7 +63,7 @@ public slots: void setProcessedSize(KIO::filesize_t bytes); - void setSpeed(QString speed); + void setSpeed(TQString speed); void setPercent(unsigned long percent); void setCopying(const KURL & src, const KURL & dest); @@ -79,12 +79,12 @@ protected slots: void slotToggleDock(); protected: - QLabel *sourceLabel; - QLabel *destLabel; - QLabel *speedLabel; - QLabel *sizeLabel; - QLabel *resumeLabel; - QTextEdit *ml_log; + TQLabel *sourceLabel; + TQLabel *destLabel; + TQLabel *speedLabel; + TQLabel *sizeLabel; + TQLabel *resumeLabel; + TQTextEdit *ml_log; KProgress *m_pProgressBar; DockIndividual * m_pDockIndividual; @@ -93,10 +93,10 @@ protected: KPushButton * openLocation; KPushButton * pbAdvanced ; - QTabWidget * panelAdvanced; + TQTabWidget * panelAdvanced; KToggleAction * m_paDock; - QDateTime qdt; + TQDateTime qdt; KDateTimeWidget *spins; Transfer *item; diff --git a/kget/dlgLimits.cpp b/kget/dlgLimits.cpp index e31326c7..8c6ded6d 100644 --- a/kget/dlgLimits.cpp +++ b/kget/dlgLimits.cpp @@ -25,8 +25,8 @@ ***************************************************************************/ -#include <qlabel.h> -#include <qlayout.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <knuminput.h> #include <klocale.h> @@ -37,7 +37,7 @@ #include "dlgLimits.h" -DlgLimits::DlgLimits(QWidget * parent) +DlgLimits::DlgLimits(TQWidget * parent) : DlgLimitsBase(parent) { // TODO: these are not supported yet, so hide them diff --git a/kget/dlgLimits.h b/kget/dlgLimits.h index a020f221..0c4aaa6f 100644 --- a/kget/dlgLimits.h +++ b/kget/dlgLimits.h @@ -35,7 +35,7 @@ class DlgLimits : public DlgLimitsBase Q_OBJECT public: - DlgLimits(QWidget * parent); + DlgLimits(TQWidget * parent); ~DlgLimits() {} void applyData(); void setData(); diff --git a/kget/dlgPreferences.cpp b/kget/dlgPreferences.cpp index f35b8add..cc5ebb43 100644 --- a/kget/dlgPreferences.cpp +++ b/kget/dlgPreferences.cpp @@ -25,7 +25,7 @@ ***************************************************************************/ -#include <qlayout.h> +#include <tqlayout.h> #include <kapplication.h> #include <klocale.h> @@ -49,62 +49,62 @@ #include "dlgPreferences.h" -DlgPreferences::DlgPreferences(QWidget * parent): +DlgPreferences::DlgPreferences(TQWidget * parent): KDialogBase(Tabbed, i18n("Configure"), Ok|Apply|Help|Cancel, Ok, parent, "DlgPreferences", true) { // add pages - QFrame *page = addPage(i18n("Connection")); - QVBoxLayout *topLayout = new QVBoxLayout(page, 0, spacingHint()); + TQFrame *page = addPage(i18n("Connection")); + TQVBoxLayout *topLayout = new TQVBoxLayout(page, 0, spacingHint()); conDlg = new DlgConnection(page); topLayout->addWidget(conDlg); page = addPage(i18n("Automation")); - topLayout = new QVBoxLayout(page, 0, spacingHint()); + topLayout = new TQVBoxLayout(page, 0, spacingHint()); autDlg = new DlgAutomation(page); topLayout->addWidget(autDlg); topLayout->addStretch(); page = addPage(i18n("Limits")); - topLayout = new QVBoxLayout(page, 0, spacingHint()); + topLayout = new TQVBoxLayout(page, 0, spacingHint()); limDlg = new DlgLimits(page); topLayout->addWidget(limDlg); topLayout->addStretch(); page = addPage(i18n("Advanced")); - topLayout = new QVBoxLayout(page, 0, spacingHint()); + topLayout = new TQVBoxLayout(page, 0, spacingHint()); advDlg = new DlgAdvanced(page); topLayout->addWidget(advDlg); topLayout->addStretch(); // page = addPage(i18n("Search")); - // topLayout = new QVBoxLayout(page, 0, spacingHint()); + // topLayout = new TQVBoxLayout(page, 0, spacingHint()); // seaDlg = new DlgSearch(page); // topLayout->addWidget(seaDlg); page = addPage(i18n("Folders")); - topLayout = new QVBoxLayout(page, 0, spacingHint()); + topLayout = new TQVBoxLayout(page, 0, spacingHint()); dirDlg = new DlgDirectories(page); topLayout->addWidget(dirDlg); topLayout->addStretch(); page = addPage(i18n("System")); - topLayout = new QVBoxLayout(page, 0, spacingHint()); + topLayout = new TQVBoxLayout(page, 0, spacingHint()); sysDlg = new DlgSystem(page); topLayout->addWidget(sysDlg); topLayout->addStretch(); // type of connection influences autoDisconnect & timedDisconnect features - connect(conDlg, SIGNAL(typeChanged(int)), autDlg, SLOT(slotTypeChanged(int))); + connect(conDlg, TQT_SIGNAL(typeChanged(int)), autDlg, TQT_SLOT(slotTypeChanged(int))); loadAllData(); - connect( conDlg, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) ); - connect( autDlg, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) ); - connect( limDlg, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) ); - connect( advDlg, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) ); - connect( dirDlg, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) ); - connect( sysDlg, SIGNAL( configChanged() ), this, SLOT( slotChanged() ) ); + connect( conDlg, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) ); + connect( autDlg, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) ); + connect( limDlg, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) ); + connect( advDlg, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) ); + connect( dirDlg, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) ); + connect( sysDlg, TQT_SIGNAL( configChanged() ), this, TQT_SLOT( slotChanged() ) ); } diff --git a/kget/dlgPreferences.h b/kget/dlgPreferences.h index 8e2e1307..b7881079 100644 --- a/kget/dlgPreferences.h +++ b/kget/dlgPreferences.h @@ -27,8 +27,8 @@ #ifndef _DLGPREFERENCES_H #define _DLGPREFERENCES_H -#include <qdialog.h> -#include <qstringlist.h> +#include <tqdialog.h> +#include <tqstringlist.h> #include <kdialogbase.h> @@ -46,7 +46,7 @@ class DlgPreferences:public KDialogBase Q_OBJECT public: - DlgPreferences(QWidget * parent); + DlgPreferences(TQWidget * parent); ~DlgPreferences() {} diff --git a/kget/dlgSystem.cpp b/kget/dlgSystem.cpp index d908724a..af33f966 100644 --- a/kget/dlgSystem.cpp +++ b/kget/dlgSystem.cpp @@ -25,8 +25,8 @@ ***************************************************************************/ -#include <qcheckbox.h> -#include <qradiobutton.h> +#include <tqcheckbox.h> +#include <tqradiobutton.h> #ifdef index #undef index @@ -38,11 +38,11 @@ #include "kmainwidget.h" #include "dlgSystem.h" -#include <qbuttongroup.h> -#include <qlabel.h> +#include <tqbuttongroup.h> +#include <tqlabel.h> -DlgSystem::DlgSystem(QWidget * parent) +DlgSystem::DlgSystem(TQWidget * parent) : DlgSystemBase(parent) { bg_window->hide(); diff --git a/kget/dlgSystem.h b/kget/dlgSystem.h index 677481b3..db740596 100644 --- a/kget/dlgSystem.h +++ b/kget/dlgSystem.h @@ -35,7 +35,7 @@ class DlgSystem : public DlgSystemBase { Q_OBJECT public: - DlgSystem(QWidget * parent); + DlgSystem(TQWidget * parent); ~DlgSystem() {} void applyData(); diff --git a/kget/dockindividual.cpp b/kget/dockindividual.cpp index 1ecf61fa..e8f02645 100644 --- a/kget/dockindividual.cpp +++ b/kget/dockindividual.cpp @@ -24,12 +24,12 @@ * ***************************************************************************/ -#include <qtooltip.h> +#include <tqtooltip.h> #include <kpopupmenu.h> #include "dockindividual.h" -DockIndividual::DockIndividual(QWidget *parent, const char *name ) : KSystemTray(parent,name) +DockIndividual::DockIndividual(TQWidget *parent, const char *name ) : KSystemTray(parent,name) { nPic=0; setPixmap( loadIcon("bar0") ); @@ -37,7 +37,7 @@ DockIndividual::DockIndividual(QWidget *parent, const char *name ) : KSystemTray DockIndividual::~DockIndividual() { - QToolTip::remove(this); + TQToolTip::remove(this); } @@ -66,7 +66,7 @@ void DockIndividual::setValue(int value){ if (tmpPic!=nPic) { nPic=tmpPic; - QString str = "bar" + QString::number( nPic ); + TQString str = "bar" + TQString::number( nPic ); setPixmap( loadIcon( str ) ); } @@ -77,14 +77,14 @@ void DockIndividual::setValue(int value){ -void DockIndividual::setTip(const QString & _tip) +void DockIndividual::setTip(const TQString & _tip) { #ifdef _DEBUG //sDebugIn<<"_tip="<<_tip<<endl; #endif - QToolTip::add( this, _tip ); + TQToolTip::add( this, _tip ); #ifdef _DEBUG //sDebugOut<<endl; diff --git a/kget/dockindividual.h b/kget/dockindividual.h index 39203272..32dd26cf 100644 --- a/kget/dockindividual.h +++ b/kget/dockindividual.h @@ -36,10 +36,10 @@ class KPopupMenu; class DockIndividual : public KSystemTray { Q_OBJECT public: - DockIndividual(QWidget *parent=0, const char *name=0); + DockIndividual(TQWidget *parent=0, const char *name=0); ~DockIndividual(); int nPic; - void setTip(const QString &); + void setTip(const TQString &); void setValue(int value); /** No descriptions */ virtual void contextMenuAboutToShow ( KPopupMenu* menu ); diff --git a/kget/docking.cpp b/kget/docking.cpp index cd3309c3..eba2e8ad 100644 --- a/kget/docking.cpp +++ b/kget/docking.cpp @@ -24,7 +24,7 @@ * ***************************************************************************/ -#include <qtooltip.h> +#include <tqtooltip.h> #include <kaboutdata.h> #include <kapplication.h> @@ -68,27 +68,27 @@ DockWidget::~DockWidget() } -void DockWidget::dragEnterEvent(QDragEnterEvent * event) +void DockWidget::dragEnterEvent(TQDragEnterEvent * event) { event->accept(KURLDrag::canDecode(event) - || QTextDrag::canDecode(event)); + || TQTextDrag::canDecode(event)); } -void DockWidget::dropEvent(QDropEvent * event) +void DockWidget::dropEvent(TQDropEvent * event) { KURL::List list; - QString str; + TQString str; if (KURLDrag::decode(event, list)) { parent->addTransfers(list); - } else if (QTextDrag::decode(event, str)) { + } else if (TQTextDrag::decode(event, str)) { parent->addTransfer(str); } } -void DockWidget::mousePressEvent(QMouseEvent * e) +void DockWidget::mousePressEvent(TQMouseEvent * e) { if (e->button() == MidButton) { parent->slotPasteTransfer(); @@ -98,33 +98,33 @@ void DockWidget::mousePressEvent(QMouseEvent * e) } -void DockWidget::updateToolTip( const QString& _status ) +void DockWidget::updateToolTip( const TQString& _status ) { dtip->setStatus( _status ); } -void DockWidget::changeIcon( const QString& icon ) +void DockWidget::changeIcon( const TQString& icon ) { setPixmap( loadIcon( icon )); } -DynamicTip::DynamicTip( QWidget * parent ) - : QToolTip( parent ) +DynamicTip::DynamicTip( TQWidget * parent ) + : TQToolTip( parent ) { // no explicit initialization needed } -void DynamicTip::setStatus( const QString & _status ) +void DynamicTip::setStatus( const TQString & _status ) { status = _status; } -void DynamicTip::maybeTip( const QPoint & _pos ) +void DynamicTip::maybeTip( const TQPoint & _pos ) { - QRect r( parentWidget()->rect() ); + TQRect r( parentWidget()->rect() ); tip( r, status ); } diff --git a/kget/docking.h b/kget/docking.h index df4c75ec..ba9a88c1 100644 --- a/kget/docking.h +++ b/kget/docking.h @@ -31,7 +31,7 @@ #include <stdio.h> -#include <qdragobject.h> +#include <tqdragobject.h> #include <ksystemtray.h> @@ -41,15 +41,15 @@ class KMainWidget; class DynamicTip : public QToolTip { public: - DynamicTip( QWidget * parent ); + DynamicTip( TQWidget * parent ); virtual ~DynamicTip() {}//TODO workaround for qt-bug, can be removed after 4.0 - void setStatus( const QString & _status ); + void setStatus( const TQString & _status ); protected: - void maybeTip( const QPoint & ); + void maybeTip( const TQPoint & ); private: - QString status; + TQString status; }; class DockWidget:public KSystemTray @@ -59,18 +59,18 @@ Q_OBJECT public: DockWidget(KMainWidget * parent); ~DockWidget(); /** No descriptions */ - void updateToolTip( const QString& ); - void changeIcon( const QString& ); + void updateToolTip( const TQString& ); + void changeIcon( const TQString& ); private slots: - void mousePressEvent(QMouseEvent * e); + void mousePressEvent(TQMouseEvent * e); protected: // drag and drop - void dragEnterEvent(QDragEnterEvent *); - void dropEvent(QDropEvent *); + void dragEnterEvent(TQDragEnterEvent *); + void dropEvent(TQDropEvent *); private: KMainWidget *parent; diff --git a/kget/droptarget.cpp b/kget/droptarget.cpp index 97bb01e2..eeea1486 100644 --- a/kget/droptarget.cpp +++ b/kget/droptarget.cpp @@ -24,7 +24,7 @@ * ***************************************************************************/ -#include <qpainter.h> +#include <tqpainter.h> #include <kaction.h> #include <kapplication.h> @@ -38,7 +38,7 @@ #include <kurldrag.h> #include "kmainwidget.h" -#include <qcursor.h> +#include <tqcursor.h> #ifdef Q_WS_X11 #include <X11/Xlib.h> #include <X11/Xutil.h> @@ -50,13 +50,13 @@ #include "settings.h" #include "droptarget.h" -DropTarget::DropTarget(KMainWindow * mainWin):QWidget() +DropTarget::DropTarget(KMainWindow * mainWin):TQWidget() { int x = ksettings.dropPosition.x(); int y = ksettings.dropPosition.y(); - QRect desk = KGlobalSettings::desktopGeometry(this); - QPixmap bgnd = UserIcon( "target" ); + TQRect desk = KGlobalSettings::desktopGeometry(this); + TQPixmap bgnd = UserIcon( "target" ); if (x != -1 && x >= desk.left() && y >= desk.top() && @@ -89,10 +89,10 @@ DropTarget::DropTarget(KMainWindow * mainWin):QWidget() popupMenu->insertTitle(kapp->caption()); popupMenu->setCheckable(true); - pop_Max = popupMenu->insertItem(i18n("Maximize"), this, SLOT(toggleMinimizeRestore())); - pop_Min = popupMenu->insertItem(i18n("Minimize"), this, SLOT(toggleMinimizeRestore())); + pop_Max = popupMenu->insertItem(i18n("Maximize"), this, TQT_SLOT(toggleMinimizeRestore())); + pop_Min = popupMenu->insertItem(i18n("Minimize"), this, TQT_SLOT(toggleMinimizeRestore())); - pop_sticky = popupMenu->insertItem(i18n("Sticky"), this, SLOT(toggleSticky())); + pop_sticky = popupMenu->insertItem(i18n("Sticky"), this, TQT_SLOT(toggleSticky())); popupMenu->insertSeparator(); mainWin->action("drop_target")->plug(popupMenu); popupMenu->insertSeparator(); @@ -116,7 +116,7 @@ DropTarget::~DropTarget() void -DropTarget::mousePressEvent(QMouseEvent * e) +DropTarget::mousePressEvent(TQMouseEvent * e) { if (e->button() == LeftButton) { @@ -124,15 +124,15 @@ DropTarget::mousePressEvent(QMouseEvent * e) // oldX = 0; // oldY = 0; isdragging = true; - dx = QCursor::pos().x() - pos().x(); - dy = QCursor::pos().y() - pos().y(); + dx = TQCursor::pos().x() - pos().x(); + dy = TQCursor::pos().y() - pos().y(); } else if (e->button() == RightButton) { popupMenu->setItemEnabled(pop_Min, kmain->isVisible()); popupMenu->setItemEnabled(pop_Max, kmain->isHidden()); - popupMenu->popup(QCursor::pos()); + popupMenu->popup(TQCursor::pos()); } else if (e->button() == MidButton) { @@ -141,7 +141,7 @@ DropTarget::mousePressEvent(QMouseEvent * e) } -void DropTarget::resizeEvent(QResizeEvent *) +void DropTarget::resizeEvent(TQResizeEvent *) { #ifdef Q_WS_X11 XShapeCombineMask(x11Display(), winId(), ShapeBounding, 0, 0, mask.handle(), ShapeSet); @@ -149,23 +149,23 @@ void DropTarget::resizeEvent(QResizeEvent *) } -void DropTarget::dragEnterEvent(QDragEnterEvent * event) +void DropTarget::dragEnterEvent(TQDragEnterEvent * event) { event->accept(KURLDrag::canDecode(event) - || QTextDrag::canDecode(event)); + || TQTextDrag::canDecode(event)); } -void DropTarget::dropEvent(QDropEvent * event) +void DropTarget::dropEvent(TQDropEvent * event) { KURL::List list; - QString str; + TQString str; if (KURLDrag::decode(event, list)) { kmain->addTransfers(list); } - else if (QTextDrag::decode(event, str)) + else if (TQTextDrag::decode(event, str)) { kmain->addTransfer(str); } @@ -200,7 +200,7 @@ void DropTarget::toggleMinimizeRestore() } /** No descriptions */ -void DropTarget::mouseMoveEvent(QMouseEvent * e) +void DropTarget::mouseMoveEvent(TQMouseEvent * e) { /* if (oldX == 0) @@ -211,18 +211,18 @@ void DropTarget::mouseMoveEvent(QMouseEvent * e) } +*/ if (isdragging) - move( QCursor::pos().x() - dx, QCursor::pos().y() - dy ); + move( TQCursor::pos().x() - dx, TQCursor::pos().y() - dy ); // move(x() + (e->x() - oldX), y() + (e->y() - oldY)); // <<-- } -void DropTarget::mouseReleaseEvent(QMouseEvent *) +void DropTarget::mouseReleaseEvent(TQMouseEvent *) { isdragging = false; } /** No descriptions */ -void DropTarget::mouseDoubleClickEvent(QMouseEvent * e) +void DropTarget::mouseDoubleClickEvent(TQMouseEvent * e) { if (e->button() == LeftButton) toggleMinimizeRestore(); diff --git a/kget/droptarget.h b/kget/droptarget.h index debce208..a6276278 100644 --- a/kget/droptarget.h +++ b/kget/droptarget.h @@ -27,9 +27,9 @@ #ifndef _DROPTARGET_H #define _DROPTARGET_H -#include <qwidget.h> -#include <qbitmap.h> -#include <qdragobject.h> +#include <tqwidget.h> +#include <tqbitmap.h> +#include <tqdragobject.h> class KPopupMenu; class KMainWidget; @@ -46,17 +46,17 @@ public: void updateStickyState(); protected: - virtual void resizeEvent(QResizeEvent *); + virtual void resizeEvent(TQResizeEvent *); // drag and drop - virtual void dragEnterEvent(QDragEnterEvent *); + virtual void dragEnterEvent(TQDragEnterEvent *); /** No descriptions */ - virtual void mouseDoubleClickEvent(QMouseEvent * e); - virtual void dropEvent(QDropEvent *); + virtual void mouseDoubleClickEvent(TQMouseEvent * e); + virtual void dropEvent(TQDropEvent *); /** No descriptions */ - virtual void mouseMoveEvent(QMouseEvent *); - virtual void mousePressEvent(QMouseEvent * e); - virtual void mouseReleaseEvent(QMouseEvent *); + virtual void mouseMoveEvent(TQMouseEvent *); + virtual void mousePressEvent(TQMouseEvent * e); + virtual void mouseReleaseEvent(TQMouseEvent *); private slots: void toggleSticky(); @@ -74,7 +74,7 @@ private: int size[4]; - QBitmap mask; + TQBitmap mask; public: // Public attributes /** */ // int oldX; diff --git a/kget/kfileio.cpp b/kget/kfileio.cpp index bfd03864..63f230bc 100644 --- a/kget/kfileio.cpp +++ b/kget/kfileio.cpp @@ -12,13 +12,13 @@ // Author: Stefan Taferner <[email protected]> -#include <qapplication.h> -#include <qstring.h> +#include <tqapplication.h> +#include <tqstring.h> #include <unistd.h> #include <string.h> #include <assert.h> -#include <qfile.h> -#include <qfileinfo.h> +#include <tqfile.h> +#include <tqfileinfo.h> #include <kdebug.h> #include <klocale.h> @@ -27,14 +27,14 @@ #include "kfileio.h" //----------------------------------------------------------------------------- -QString kFileToString(const QString & aFileName, bool aEnsureNL, bool aVerbose) +TQString kFileToString(const TQString & aFileName, bool aEnsureNL, bool aVerbose) { - QCString result; + TQCString result; - QFileInfo info(aFileName); + TQFileInfo info(aFileName); unsigned int readLen; unsigned int len = info.size(); - QFile file(aFileName); + TQFile file(aFileName); // assert(aFileName!=NULL); if (aFileName == NULL) @@ -43,20 +43,20 @@ QString kFileToString(const QString & aFileName, bool aEnsureNL, bool aVerbose) if (!info.exists()) { if (aVerbose) KMessageBox::error(qApp->mainWidget(), i18n("The specified file does not exist:\n%1").arg(aFileName)); - return QString::null; + return TQString::null; } if (info.isDir()) { if (aVerbose) KMessageBox::error(qApp->mainWidget(), i18n("This is a folder and not a file:\n%1").arg(aFileName)); - return QString::null; + return TQString::null; } if (!info.isReadable()) { if (aVerbose) KMessageBox::error(qApp->mainWidget(), i18n("You do not have read permission for the file:\n%1").arg(aFileName)); - return QString::null; + return TQString::null; } if (len <= 0) - return QString::null; + return TQString::null; if (!file.open(IO_Raw | IO_ReadOnly)) { if (aVerbose) @@ -70,7 +70,7 @@ QString kFileToString(const QString & aFileName, bool aEnsureNL, bool aVerbose) default: KMessageBox::error(qApp->mainWidget(), i18n("Error while reading file:\n%1").arg(aFileName)); } - return QString::null; + return TQString::null; } result.resize(len + (int) aEnsureNL + 1); @@ -82,11 +82,11 @@ QString kFileToString(const QString & aFileName, bool aEnsureNL, bool aVerbose) result[len] = '\0'; if (readLen < len) { - QString msg = i18n("Could only read %1 bytes of %2.").arg(KGlobal::locale()->formatNumber(readLen, + TQString msg = i18n("Could only read %1 bytes of %2.").arg(KGlobal::locale()->formatNumber(readLen, 0)).arg(KGlobal::locale()->formatNumber(len, 0)); KMessageBox::error(qApp->mainWidget(), msg); - return QString::null; + return TQString::null; } kdDebug() << "kFileToString: " << readLen << " bytes read" << endl; @@ -95,10 +95,10 @@ QString kFileToString(const QString & aFileName, bool aEnsureNL, bool aVerbose) //----------------------------------------------------------------------------- -static bool kBytesToFile(const char *aBuffer, int len, const QString & aFileName, bool aAskIfExists, bool aBackup, bool aVerbose) +static bool kBytesToFile(const char *aBuffer, int len, const TQString & aFileName, bool aAskIfExists, bool aBackup, bool aVerbose) { - QFile file(aFileName); - QFileInfo info(aFileName); + TQFile file(aFileName); + TQFileInfo info(aFileName); int writeLen, rc; // assert(aFileName!=NULL); @@ -107,19 +107,19 @@ static bool kBytesToFile(const char *aBuffer, int len, const QString & aFileName if (info.exists()) { if (aAskIfExists) { - QString str = i18n("File %1 exists.\nDo you want to replace it?").arg(aFileName); + TQString str = i18n("File %1 exists.\nDo you want to replace it?").arg(aFileName); - rc = KMessageBox::questionYesNo(qApp->mainWidget(), str, QString::null, i18n("Replace"),KStdGuiItem::cancel()); + rc = KMessageBox::questionYesNo(qApp->mainWidget(), str, TQString::null, i18n("Replace"),KStdGuiItem::cancel()); if (rc != KMessageBox::Yes) return FALSE; } if (aBackup) { // make a backup copy - QString bakName = aFileName; + TQString bakName = aFileName; bakName += '~'; - QFile::remove(bakName); - rc = rename(QFile::encodeName(aFileName), QFile::encodeName(bakName)); + TQFile::remove(bakName); + rc = rename(TQFile::encodeName(aFileName), TQFile::encodeName(bakName)); if (rc) { // failed to rename file if (!aVerbose) @@ -152,7 +152,7 @@ static bool kBytesToFile(const char *aBuffer, int len, const QString & aFileName KMessageBox::error(qApp->mainWidget(), i18n("Could not write to file:\n%1").arg(aFileName)); return FALSE; } else if (writeLen < len) { - QString msg = i18n("Could only write %1 bytes of %2.").arg(KGlobal::locale()->formatNumber(writeLen, + TQString msg = i18n("Could only write %1 bytes of %2.").arg(KGlobal::locale()->formatNumber(writeLen, 0)).arg(KGlobal::locale()->formatNumber(len, 0)); @@ -163,12 +163,12 @@ static bool kBytesToFile(const char *aBuffer, int len, const QString & aFileName return TRUE; } -bool kCStringToFile(const QCString & aBuffer, const QString & aFileName, bool aAskIfExists, bool aBackup, bool aVerbose) +bool kCStringToFile(const TQCString & aBuffer, const TQString & aFileName, bool aAskIfExists, bool aBackup, bool aVerbose) { return kBytesToFile(aBuffer, aBuffer.length(), aFileName, aAskIfExists, aBackup, aVerbose); } -bool kByteArrayToFile(const QByteArray & aBuffer, const QString & aFileName, bool aAskIfExists, bool aBackup, bool aVerbose) +bool kByteArrayToFile(const TQByteArray & aBuffer, const TQString & aFileName, bool aAskIfExists, bool aBackup, bool aVerbose) { return kBytesToFile(aBuffer, aBuffer.size(), aFileName, aAskIfExists, aBackup, aVerbose); } diff --git a/kget/kfileio.h b/kget/kfileio.h index 9b2780ad..84a50cd2 100644 --- a/kget/kfileio.h +++ b/kget/kfileio.h @@ -28,17 +28,17 @@ * byte longer than the file itself. * If ensureNewline is TRUE the string will always have a trailing newline. */ -QString kFileToString(const QString & fileName, bool ensureNewline = TRUE, bool withDialogs = TRUE); +TQString kFileToString(const TQString & fileName, bool ensureNewline = TRUE, bool withDialogs = TRUE); /** Save a file. If withDialogs is FALSE no warning dialogs are opened if * there are problems. Returns TRUE on success and FALSE on failure. * Replaces existing files without warning if askIfExists==FALSE. * Makes a copy if the file exists to filename~ if createBackup==TRUE. */ -bool kCStringToFile(const QCString & buffer, const QString & fileName, bool askIfExists = FALSE, bool createBackup = TRUE, bool withDialogs = TRUE); +bool kCStringToFile(const TQCString & buffer, const TQString & fileName, bool askIfExists = FALSE, bool createBackup = TRUE, bool withDialogs = TRUE); // Does not stop at NUL -bool kByteArrayToFile(const QByteArray & buffer, const QString & fileName, bool askIfExists = FALSE, bool createBackup = TRUE, bool withDialogs = TRUE); +bool kByteArrayToFile(const TQByteArray & buffer, const TQString & fileName, bool askIfExists = FALSE, bool createBackup = TRUE, bool withDialogs = TRUE); #endif /* kfileio_h */ diff --git a/kget/kget_iface.h b/kget/kget_iface.h index 015bef2f..df01375c 100644 --- a/kget/kget_iface.h +++ b/kget/kget_iface.h @@ -16,14 +16,14 @@ class KGetIface : public DCOPObject K_DCOP protected: - KGetIface( QCString objId ) : DCOPObject( objId ) {} + KGetIface( TQCString objId ) : DCOPObject( objId ) {} k_dcop: /** * @param src The urls to download - * @param destDir The destination direction or QString::null if unspecified + * @param destDir The destination direction or TQString::null if unspecified */ - virtual ASYNC addTransfers( const KURL::List& src, const QString& destDir = QString::null ) = 0; + virtual ASYNC addTransfers( const KURL::List& src, const TQString& destDir = TQString::null ) = 0; virtual bool isDropTargetVisible() const = 0; diff --git a/kget/kget_plug_in/kget_linkview.cpp b/kget/kget_plug_in/kget_linkview.cpp index 179cc81b..a9bab704 100644 --- a/kget/kget_plug_in/kget_linkview.cpp +++ b/kget/kget_plug_in/kget_linkview.cpp @@ -1,6 +1,6 @@ #include "kget_linkview.h" -#include <qlayout.h> +#include <tqlayout.h> #include <dcopclient.h> #include <kaction.h> @@ -18,11 +18,11 @@ #define COL_MIME 2 #define COL_URL 3 -LinkViewItem::LinkViewItem( QListView *parent, const LinkItem *lnk ) - : QListViewItem( parent ), +LinkViewItem::LinkViewItem( TQListView *parent, const LinkItem *lnk ) + : TQListViewItem( parent ), link( lnk ) { - QString file = link->url.fileName(); + TQString file = link->url.fileName(); if ( file.isEmpty() ) file = link->url.host(); @@ -37,17 +37,17 @@ LinkViewItem::LinkViewItem( QListView *parent, const LinkItem *lnk ) /////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////// -KGetLinkView::KGetLinkView( QWidget *parent, const char *name ) +KGetLinkView::KGetLinkView( TQWidget *parent, const char *name ) : KMainWindow( parent, name ) { setPlainCaption( i18n( "KGet" ) ); KAction* actionDownload = new KAction( i18n("Download Selected Files"), "kget", CTRL+Key_D, - this, SLOT( slotStartLeech() ), + this, TQT_SLOT( slotStartLeech() ), actionCollection(), "startDownload" ); - KAction* actionSelectAll = KStdAction::selectAll( this, SLOT( slotSelectAll() ), + KAction* actionSelectAll = KStdAction::selectAll( this, TQT_SLOT( slotSelectAll() ), actionCollection() ); m_links.setAutoDelete( true ); @@ -55,12 +55,12 @@ KGetLinkView::KGetLinkView( QWidget *parent, const char *name ) toolBar()->insertLineSeparator(); actionSelectAll->plug( toolBar() ); - QWidget *mainWidget = new QWidget( this ); - QVBoxLayout *layout = new QVBoxLayout( mainWidget ); + TQWidget *mainWidget = new TQWidget( this ); + TQVBoxLayout *layout = new TQVBoxLayout( mainWidget ); setCentralWidget( mainWidget ); m_view = new KListView( mainWidget, "listview" ); - m_view->setSelectionMode( QListView::Extended ); + m_view->setSelectionMode( TQListView::Extended ); m_view->addColumn( i18n("File Name") ); m_view->addColumn( i18n("Description") ); m_view->addColumn( i18n("File Type") ); @@ -81,17 +81,17 @@ KGetLinkView::~KGetLinkView() { } -void KGetLinkView::setLinks( QPtrList<LinkItem>& links ) +void KGetLinkView::setLinks( TQPtrList<LinkItem>& links ) { m_links = links; // now we 0wn them showLinks( m_links ); } -void KGetLinkView::showLinks( const QPtrList<LinkItem>& links ) +void KGetLinkView::showLinks( const TQPtrList<LinkItem>& links ) { m_view->clear(); - QPtrListIterator<LinkItem> it( links ); + TQPtrListIterator<LinkItem> it( links ); for ( ; it.current(); ++it ) (void) new LinkViewItem( m_view, *it ); @@ -101,7 +101,7 @@ void KGetLinkView::showLinks( const QPtrList<LinkItem>& links ) void KGetLinkView::slotStartLeech() { KURL::List urls; - QListViewItemIterator it( m_view->firstChild() ); + TQListViewItemIterator it( m_view->firstChild() ); for ( ; it.current(); ++it ) { if ( it.current()->isSelected() ) @@ -123,11 +123,11 @@ void KGetLinkView::slotStartLeech() } kapp->updateRemoteUserTimestamp( "kget" ); - QByteArray data; - QDataStream stream( data, IO_WriteOnly ); - stream << urls << QString::null; + TQByteArray data; + TQDataStream stream( data, IO_WriteOnly ); + stream << urls << TQString::null; bool ok = DCOPClient::mainClient()->send( "kget", "KGet-Interface", - "addTransfers(KURL::List, QString)", + "addTransfers(KURL::List, TQString)", data ); kdDebug() << "*** startDownload: " << ok << endl; @@ -137,7 +137,7 @@ void KGetLinkView::slotStartLeech() } } -void KGetLinkView::setPageURL( const QString& url ) +void KGetLinkView::setPageURL( const TQString& url ) { setPlainCaption( i18n( "Links in: %1 - KGet" ).arg( url ) ); } diff --git a/kget/kget_plug_in/kget_linkview.h b/kget/kget_plug_in/kget_linkview.h index a6d7961c..26ce28fc 100644 --- a/kget/kget_plug_in/kget_linkview.h +++ b/kget/kget_plug_in/kget_linkview.h @@ -8,7 +8,7 @@ #ifndef KGET_LINKVIEW_H #define KGET_LINKVIEW_H -#include <qptrlist.h> +#include <tqptrlist.h> #include <klistview.h> #include <kmainwindow.h> @@ -19,7 +19,7 @@ class LinkViewItem : public QListViewItem { public: - LinkViewItem( QListView *parent, const LinkItem * lnk ); + LinkViewItem( TQListView *parent, const LinkItem * lnk ); const LinkItem *link; }; @@ -29,11 +29,11 @@ class KGetLinkView : public KMainWindow Q_OBJECT public: - KGetLinkView( QWidget *parent = 0L, const char *name = 0L ); + KGetLinkView( TQWidget *parent = 0L, const char *name = 0L ); ~KGetLinkView(); - void setLinks( QPtrList<LinkItem>& links ); - void setPageURL( const QString& url ); + void setLinks( TQPtrList<LinkItem>& links ); + void setPageURL( const TQString& url ); signals: void leechURLs( const KURL::List& urls ); @@ -43,9 +43,9 @@ private slots: void slotSelectAll(); private: - void showLinks( const QPtrList<LinkItem>& links ); + void showLinks( const TQPtrList<LinkItem>& links ); - QPtrList<LinkItem> m_links; + TQPtrList<LinkItem> m_links; KListView *m_view; diff --git a/kget/kget_plug_in/kget_plug_in.cpp b/kget/kget_plug_in/kget_plug_in.cpp index dc5f5b9f..c73406a2 100644 --- a/kget/kget_plug_in/kget_plug_in.cpp +++ b/kget/kget_plug_in/kget_plug_in.cpp @@ -44,25 +44,25 @@ #include "links.h" #include "kget_linkview.h" -KGet_plug_in::KGet_plug_in( QObject* parent, const char* name ) +KGet_plug_in::KGet_plug_in( TQObject* parent, const char* name ) : Plugin( parent, name ) { - QPixmap pix = KGlobal::iconLoader()->loadIcon("kget", + TQPixmap pix = KGlobal::iconLoader()->loadIcon("kget", KIcon::MainToolbar); KActionMenu *menu = new KActionMenu( i18n("Download Manager"), pix, actionCollection(), "kget_menu" ); menu->setDelayed( false ); - connect( menu->popupMenu(), SIGNAL( aboutToShow() ), SLOT( showPopup() )); + connect( menu->popupMenu(), TQT_SIGNAL( aboutToShow() ), TQT_SLOT( showPopup() )); m_paToggleDropTarget=new KToggleAction(i18n("Show Drop Target"), KShortcut(), - this, SLOT(slotShowDrop()), + this, TQT_SLOT(slotShowDrop()), actionCollection(), "show_drop" ); menu->insert( m_paToggleDropTarget ); KAction *action = new KAction(i18n("List All Links"), KShortcut(), - this, SLOT( slotShowLinks() ), + this, TQT_SLOT( slotShowLinks() ), actionCollection(), "show_links"); menu->insert( action ); @@ -122,8 +122,8 @@ void KGet_plug_in::slotShowLinks() DOM::HTMLCollection links = doc.links(); - QPtrList<LinkItem> linkList; - std::set<QString> dupeCheck; + TQPtrList<LinkItem> linkList; + std::set<TQString> dupeCheck; for ( uint i = 0; i < links.length(); i++ ) { DOM::Node link = links.item( i ); @@ -150,22 +150,22 @@ void KGet_plug_in::slotShowLinks() } KGetLinkView *view = new KGetLinkView(); - QString url = doc.URL().string(); + TQString url = doc.URL().string(); view->setPageURL( url ); view->setLinks( linkList ); view->show(); } -KPluginFactory::KPluginFactory( QObject* parent, const char* name ) +KPluginFactory::KPluginFactory( TQObject* parent, const char* name ) : KLibFactory( parent, name ) { s_instance = new KInstance("KPluginFactory"); } -QObject* KPluginFactory::createObject( QObject* parent, const char* name, const char*, const QStringList & ) +TQObject* KPluginFactory::createObject( TQObject* parent, const char* name, const char*, const TQStringList & ) { - QObject *obj = new KGet_plug_in( parent, name ); + TQObject *obj = new KGet_plug_in( parent, name ); return obj; } diff --git a/kget/kget_plug_in/kget_plug_in.h b/kget/kget_plug_in/kget_plug_in.h index 75888b10..b5cfea29 100644 --- a/kget/kget_plug_in/kget_plug_in.h +++ b/kget/kget_plug_in/kget_plug_in.h @@ -28,7 +28,7 @@ class KGet_plug_in : public KParts::Plugin { Q_OBJECT public: - KGet_plug_in( QObject* parent = 0, const char* name = 0 ); + KGet_plug_in( TQObject* parent = 0, const char* name = 0 ); KToggleAction *m_paToggleDropTarget ; DCOPClient* p_dcopServer; virtual ~KGet_plug_in(); @@ -44,12 +44,12 @@ class KPluginFactory : public KLibFactory { Q_OBJECT public: - KPluginFactory( QObject *parent = 0, const char *name = 0 ); + KPluginFactory( TQObject *parent = 0, const char *name = 0 ); ~KPluginFactory() ; - virtual QObject* createObject( QObject* parent = 0, const char* pname = 0, - const char* name = "QObject", - const QStringList &args = QStringList() ); + virtual TQObject* createObject( TQObject* parent = 0, const char* pname = 0, + const char* name = "TQObject", + const TQStringList &args = TQStringList() ); private: static KInstance* s_instance; diff --git a/kget/kget_plug_in/links.cpp b/kget/kget_plug_in/links.cpp index a597257d..12600353 100644 --- a/kget/kget_plug_in/links.cpp +++ b/kget/kget_plug_in/links.cpp @@ -14,7 +14,7 @@ LinkItem::LinkItem( DOM::Element link ) // qDebug("*** href: %s", href.nodeValue().string().latin1() ); - QString urlString = link.ownerDocument().completeURL( href.nodeValue() ).string(); + TQString urlString = link.ownerDocument().completeURL( href.nodeValue() ).string(); if ( urlString.isEmpty() ) return; @@ -34,7 +34,7 @@ LinkItem::LinkItem( DOM::Element link ) // force "local file" mimetype determination KMimeType::Ptr mt = KMimeType::findByURL( url, 0, true, true); - icon = mt->icon( QString::null, false ); // dummy parameters + icon = mt->icon( TQString::null, false ); // dummy parameters mimeType = mt->comment(); m_valid = true; diff --git a/kget/kget_plug_in/links.h b/kget/kget_plug_in/links.h index 89ba9ab5..9430dcc0 100644 --- a/kget/kget_plug_in/links.h +++ b/kget/kget_plug_in/links.h @@ -18,9 +18,9 @@ public: LinkItem( DOM::Element link ); KURL url; - QString icon; - QString text; - QString mimeType; + TQString icon; + TQString text; + TQString mimeType; bool isValid() const { return m_valid; } diff --git a/kget/kmainwidget.cpp b/kget/kmainwidget.cpp index 420d44a1..01fc48c4 100644 --- a/kget/kmainwidget.cpp +++ b/kget/kmainwidget.cpp @@ -38,15 +38,15 @@ #include <net/if.h> #endif -#include <qclipboard.h> -#include <qregexp.h> -#include <qdragobject.h> -#include <qwhatsthis.h> -#include <qtooltip.h> -#include <qtimer.h> -#include <qdropsite.h> -#include <qpopupmenu.h> -#include <qfileinfo.h> +#include <tqclipboard.h> +#include <tqregexp.h> +#include <tqdragobject.h> +#include <tqwhatsthis.h> +#include <tqtooltip.h> +#include <tqtimer.h> +#include <tqdropsite.h> +#include <tqpopupmenu.h> +#include <tqfileinfo.h> #include <kinputdialog.h> #include <kprotocolinfo.h> @@ -87,7 +87,7 @@ #include <kio/authinfo.h> #include <kio/global.h> -#include <qiconset.h> +#include <tqiconset.h> #include "version.h" #include "slave.h" @@ -129,7 +129,7 @@ KMainWidget::KMainWidget(bool bStartDocked) { KConfig cfg( "kioslaverc", false, false); - cfg.setGroup(QString::null); + cfg.setGroup(TQString::null); cfg.writeEntry("AutoResume", true); cfg.sync(); } @@ -142,16 +142,16 @@ KMainWidget::KMainWidget(bool bStartDocked) kmain = this; // Set log time, needed for the name of log file - QDate date = QDateTime::currentDateTime().date(); - QTime time = QDateTime::currentDateTime().time(); - QString tmp; + TQDate date = TQDateTime::currentDateTime().date(); + TQTime time = TQDateTime::currentDateTime().time(); + TQString tmp; tmp.sprintf("log%d:%d:%d-%d:%d:%d", date.day(), date.month(), date.year(), time.hour(), time.minute(), time.second()); logFileName = locateLocal("appdata", "logs/"); logFileName += tmp; - lastClipboard = QApplication::clipboard()->text( QClipboard::Clipboard ).stripWhiteSpace(); + lastClipboard = TQApplication::clipboard()->text( QClipboard::Clipboard ).stripWhiteSpace(); // Load all settings from KConfig ksettings.load(); @@ -169,14 +169,14 @@ KMainWidget::KMainWidget(bool bStartDocked) setCentralWidget(myTransferList); - connect(kapp, SIGNAL(saveYourself()), SLOT(slotSaveYourself())); + connect(kapp, TQT_SIGNAL(saveYourself()), TQT_SLOT(slotSaveYourself())); // Enable dropping setAcceptDrops(true); // Setup connection timer - connectionTimer = new QTimer(this); - connect(connectionTimer, SIGNAL(timeout()), SLOT(slotCheckConnection())); + connectionTimer = new TQTimer(this); + connect(connectionTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotCheckConnection())); // setup socket for checking connection if ((_sock = sockets_open()) < 0) { @@ -189,9 +189,9 @@ KMainWidget::KMainWidget(bool bStartDocked) ksettings.b_offline=( !b_connected || ksettings.b_offlineMode ); // Setup animation timer - animTimer = new QTimer(this); + animTimer = new TQTimer(this); animCounter = 0; - connect(animTimer, SIGNAL(timeout()), SLOT(slotAnimTimeout())); + connect(animTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotAnimTimeout())); if (ksettings.b_useAnimation) { animTimer->start(400); @@ -200,18 +200,18 @@ KMainWidget::KMainWidget(bool bStartDocked) } // Setup transfer timer for scheduled downloads and checkQueue() - transferTimer = new QTimer(this); - connect(transferTimer, SIGNAL(timeout()), SLOT(slotTransferTimeout())); + transferTimer = new TQTimer(this); + connect(transferTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTransferTimeout())); transferTimer->start(10000); // 10 secs time interval // Setup autosave timer - autosaveTimer = new QTimer(this); - connect(autosaveTimer, SIGNAL(timeout()), SLOT(slotAutosaveTimeout())); + autosaveTimer = new TQTimer(this); + connect(autosaveTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotAutosaveTimeout())); setAutoSave(); // Setup clipboard timer - clipboardTimer = new QTimer(this); - connect(clipboardTimer, SIGNAL(timeout()), SLOT(slotCheckClipboard())); + clipboardTimer = new TQTimer(this); + connect(clipboardTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotCheckClipboard())); if (ksettings.b_autoPaste) { clipboardTimer->start(1000); } @@ -221,7 +221,7 @@ KMainWidget::KMainWidget(bool bStartDocked) // Setup special windows kdrop = new DropTarget(this); kdock = new DockWidget(this); - connect(kdock, SIGNAL(quitSelected()), SLOT(slotQuit())); + connect(kdock, TQT_SIGNAL(quitSelected()), TQT_SLOT(slotQuit())); // Set geometry if (ksettings.mainPosition.x() != -1) { @@ -253,7 +253,7 @@ KMainWidget::KMainWidget(bool bStartDocked) setCaption(i18n("Offline"), false); log(i18n("Starting offline")); } else - setCaption(QString::null, false); + setCaption(TQString::null, false); m_paAutoPaste->setChecked(ksettings.b_autoPaste); m_paShowLog->setChecked(b_viewLogWindow); @@ -291,7 +291,7 @@ KMainWidget::~KMainWidget() } -void KMainWidget::log(const QString & message, bool statusbar) +void KMainWidget::log(const TQString & message, bool statusbar) { #ifdef _DEBUG sDebugIn <<" message= "<< message << endl; @@ -337,76 +337,76 @@ void KMainWidget::setupGUI() KActionCollection *coll = actionCollection(); - connect(myTransferList, SIGNAL(selectionChanged()), this, SLOT(slotUpdateActions())); - connect(myTransferList, SIGNAL(transferSelected(Transfer *)), this, SLOT(slotOpenIndividual())); - connect(myTransferList, SIGNAL(popupMenu(Transfer *)), this, SLOT(slotPopupMenu(Transfer *))); + connect(myTransferList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotUpdateActions())); + connect(myTransferList, TQT_SIGNAL(transferSelected(Transfer *)), this, TQT_SLOT(slotOpenIndividual())); + connect(myTransferList, TQT_SIGNAL(popupMenu(Transfer *)), this, TQT_SLOT(slotPopupMenu(Transfer *))); // file actions - m_paOpenTransfer = KStdAction::open(this, SLOT(slotOpenTransfer()), coll, "open_transfer"); - m_paPasteTransfer = KStdAction::paste(this, SLOT(slotPasteTransfer()), coll, "paste_transfer"); + m_paOpenTransfer = KStdAction::open(this, TQT_SLOT(slotOpenTransfer()), coll, "open_transfer"); + m_paPasteTransfer = KStdAction::paste(this, TQT_SLOT(slotPasteTransfer()), coll, "paste_transfer"); - m_paExportTransfers = new KAction(i18n("&Export Transfer List..."), 0, this, SLOT(slotExportTransfers()), coll, "export_transfers"); - m_paImportTransfers = new KAction(i18n("&Import Transfer List..."), 0, this, SLOT(slotImportTransfers()), coll, "import_transfers"); + m_paExportTransfers = new KAction(i18n("&Export Transfer List..."), 0, this, TQT_SLOT(slotExportTransfers()), coll, "export_transfers"); + m_paImportTransfers = new KAction(i18n("&Import Transfer List..."), 0, this, TQT_SLOT(slotImportTransfers()), coll, "import_transfers"); - m_paImportText = new KAction(i18n("Import Text &File..."), 0, this, SLOT(slotImportTextFile()), coll, "import_text"); + m_paImportText = new KAction(i18n("Import Text &File..."), 0, this, TQT_SLOT(slotImportTextFile()), coll, "import_text"); - m_paQuit = KStdAction::quit(this, SLOT(slotQuit()), coll, "quit"); + m_paQuit = KStdAction::quit(this, TQT_SLOT(slotQuit()), coll, "quit"); // transfer actions - m_paCopy = new KAction(i18n("&Copy URL to Clipboard"), 0, this, SLOT(slotCopyToClipboard()), coll, "copy_url"); - m_paIndividual = new KAction(i18n("&Open Individual Window"), 0, this, SLOT(slotOpenIndividual()), coll, "open_individual"); + m_paCopy = new KAction(i18n("&Copy URL to Clipboard"), 0, this, TQT_SLOT(slotCopyToClipboard()), coll, "copy_url"); + m_paIndividual = new KAction(i18n("&Open Individual Window"), 0, this, TQT_SLOT(slotOpenIndividual()), coll, "open_individual"); - m_paMoveToBegin = new KAction(i18n("Move to &Beginning"), 0, this, SLOT(slotMoveToBegin()), coll, "move_begin"); + m_paMoveToBegin = new KAction(i18n("Move to &Beginning"), 0, this, TQT_SLOT(slotMoveToBegin()), coll, "move_begin"); - m_paMoveToEnd = new KAction(i18n("Move to &End"), 0, this, SLOT(slotMoveToEnd()), coll, "move_end"); + m_paMoveToEnd = new KAction(i18n("Move to &End"), 0, this, TQT_SLOT(slotMoveToEnd()), coll, "move_end"); #ifdef _DEBUG sDebug << "Loading pics" << endl; #endif - m_paResume = new KAction(i18n("&Resume"),"tool_resume", 0, this, SLOT(slotResumeCurrent()), coll, "resume"); - m_paPause = new KAction(i18n("&Pause"),"tool_pause", 0, this, SLOT(slotPauseCurrent()), coll, "pause"); - m_paDelete = new KAction(i18n("&Delete"),"editdelete", Qt::Key_Delete, this, SLOT(slotDeleteCurrent()), coll, "delete"); - m_paRestart = new KAction(i18n("Re&start"),"tool_restart", 0, this, SLOT(slotRestartCurrent()), coll, "restart"); + m_paResume = new KAction(i18n("&Resume"),"tool_resume", 0, this, TQT_SLOT(slotResumeCurrent()), coll, "resume"); + m_paPause = new KAction(i18n("&Pause"),"tool_pause", 0, this, TQT_SLOT(slotPauseCurrent()), coll, "pause"); + m_paDelete = new KAction(i18n("&Delete"),"editdelete", Qt::Key_Delete, this, TQT_SLOT(slotDeleteCurrent()), coll, "delete"); + m_paRestart = new KAction(i18n("Re&start"),"tool_restart", 0, this, TQT_SLOT(slotRestartCurrent()), coll, "restart"); - m_paQueue = new KRadioAction(i18n("&Queue"),"tool_queue", 0, this, SLOT(slotQueueCurrent()), coll, "queue"); - m_paTimer = new KRadioAction(i18n("&Timer"),"tool_timer", 0, this, SLOT(slotTimerCurrent()), coll, "timer"); - m_paDelay = new KRadioAction(i18n("De&lay"),"tool_delay", 0, this, SLOT(slotDelayCurrent()), coll, "delay"); + m_paQueue = new KRadioAction(i18n("&Queue"),"tool_queue", 0, this, TQT_SLOT(slotQueueCurrent()), coll, "queue"); + m_paTimer = new KRadioAction(i18n("&Timer"),"tool_timer", 0, this, TQT_SLOT(slotTimerCurrent()), coll, "timer"); + m_paDelay = new KRadioAction(i18n("De&lay"),"tool_delay", 0, this, TQT_SLOT(slotDelayCurrent()), coll, "delay"); m_paQueue->setExclusiveGroup("TransferMode"); m_paTimer->setExclusiveGroup("TransferMode"); m_paDelay->setExclusiveGroup("TransferMode"); // options actions - m_paUseAnimation = new KToggleAction(i18n("Use &Animation"), 0, this, SLOT(slotToggleAnimation()), coll, "toggle_animation"); - m_paExpertMode = new KToggleAction(i18n("&Expert Mode"),"tool_expert", 0, this, SLOT(slotToggleExpertMode()), coll, "expert_mode"); - m_paUseLastDir = new KToggleAction(i18n("&Use-Last-Folder Mode"),"tool_uselastdir", 0, this, SLOT(slotToggleUseLastDir()), coll, "use_last_dir"); - m_paAutoDisconnect = new KToggleAction(i18n("Auto-&Disconnect Mode"),"tool_disconnect", 0, this, SLOT(slotToggleAutoDisconnect()), coll, "auto_disconnect"); - m_paAutoShutdown = new KToggleAction(i18n("Auto-S&hutdown Mode"), "tool_shutdown", 0, this, SLOT(slotToggleAutoShutdown()), coll, "auto_shutdown"); - m_paOfflineMode = new KToggleAction(i18n("&Offline Mode"),"tool_offline_mode_off", 0, this, SLOT(slotToggleOfflineMode()), coll, "offline_mode"); - m_paAutoPaste = new KToggleAction(i18n("Auto-Pas&te Mode"),"tool_clipboard", 0, this, SLOT(slotToggleAutoPaste()), coll, "auto_paste"); + m_paUseAnimation = new KToggleAction(i18n("Use &Animation"), 0, this, TQT_SLOT(slotToggleAnimation()), coll, "toggle_animation"); + m_paExpertMode = new KToggleAction(i18n("&Expert Mode"),"tool_expert", 0, this, TQT_SLOT(slotToggleExpertMode()), coll, "expert_mode"); + m_paUseLastDir = new KToggleAction(i18n("&Use-Last-Folder Mode"),"tool_uselastdir", 0, this, TQT_SLOT(slotToggleUseLastDir()), coll, "use_last_dir"); + m_paAutoDisconnect = new KToggleAction(i18n("Auto-&Disconnect Mode"),"tool_disconnect", 0, this, TQT_SLOT(slotToggleAutoDisconnect()), coll, "auto_disconnect"); + m_paAutoShutdown = new KToggleAction(i18n("Auto-S&hutdown Mode"), "tool_shutdown", 0, this, TQT_SLOT(slotToggleAutoShutdown()), coll, "auto_shutdown"); + m_paOfflineMode = new KToggleAction(i18n("&Offline Mode"),"tool_offline_mode_off", 0, this, TQT_SLOT(slotToggleOfflineMode()), coll, "offline_mode"); + m_paAutoPaste = new KToggleAction(i18n("Auto-Pas&te Mode"),"tool_clipboard", 0, this, TQT_SLOT(slotToggleAutoPaste()), coll, "auto_paste"); - m_paPreferences = KStdAction::preferences(this, SLOT(slotPreferences()), coll); + m_paPreferences = KStdAction::preferences(this, TQT_SLOT(slotPreferences()), coll); - KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()), coll); - KStdAction::configureToolbars(this, SLOT(slotConfigureToolbars()), coll); - KStdAction::configureNotifications(this, SLOT(slotConfigureNotifications()), coll); + KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), coll); + KStdAction::configureToolbars(this, TQT_SLOT(slotConfigureToolbars()), coll); + KStdAction::configureNotifications(this, TQT_SLOT(slotConfigureNotifications()), coll); - m_menubarAction = KStdAction::showMenubar(this, SLOT(slotShowMenubar()), coll, "settings_showmenubar" ); + m_menubarAction = KStdAction::showMenubar(this, TQT_SLOT(slotShowMenubar()), coll, "settings_showmenubar" ); m_menubarAction->setChecked( !menuBar()->isHidden() ); // view actions createStandardStatusBarAction(); - m_paShowLog = new KToggleAction(i18n("Show &Log Window"),"tool_logwindow", 0, this, SLOT(slotToggleLogWindow()), coll, "toggle_log"); + m_paShowLog = new KToggleAction(i18n("Show &Log Window"),"tool_logwindow", 0, this, TQT_SLOT(slotToggleLogWindow()), coll, "toggle_log"); m_paShowLog->setCheckedState(i18n("Hide &Log Window")); - m_paDropTarget = new KAction(i18n("Show Drop &Target"),"tool_drop_target", 0, this, SLOT(slotToggleDropTarget()), coll, "drop_target"); - m_paKonquerorIntegration = new KAction(i18n("Enable &KGet as Konqueror Download Manager"), "konqueror", 0, this, SLOT(slotKonquerorIntegration()), coll, "konqueror_integration"); + m_paDropTarget = new KAction(i18n("Show Drop &Target"),"tool_drop_target", 0, this, TQT_SLOT(slotToggleDropTarget()), coll, "drop_target"); + m_paKonquerorIntegration = new KAction(i18n("Enable &KGet as Konqueror Download Manager"), "konqueror", 0, this, TQT_SLOT(slotKonquerorIntegration()), coll, "konqueror_integration"); if (ksettings.b_KonquerorIntegration) { m_paKonquerorIntegration->setText(i18n("Disable &KGet as Konqueror Download Manager")); } menuHelp = new KHelpMenu(this, KGlobal::instance()->aboutData()); - KStdAction::whatsThis(menuHelp, SLOT(contextHelpActivated()), coll, "whats_this"); + KStdAction::whatsThis(menuHelp, TQT_SLOT(contextHelpActivated()), coll, "whats_this"); createGUI("kgetui.rc"); @@ -435,7 +435,7 @@ void KMainWidget::setupWhatsThis() sDebugIn << endl; #endif - QString tmp; + TQString tmp; tmp = i18n("<b>Resume</b> button starts selected transfers\n" "and sets their mode to <i>queued</i>."); m_paResume->setWhatsThis(tmp); @@ -510,7 +510,7 @@ void KMainWidget::slotConfigureToolbars() saveMainWindowSettings( KGlobal::config(), "MainWindow" ); KEditToolbar edit(factory()); - connect(&edit, SIGNAL( newToolbarConfig() ), this, SLOT( slotNewToolbarConfig() )); + connect(&edit, TQT_SIGNAL( newToolbarConfig() ), this, TQT_SLOT( slotNewToolbarConfig() )); edit.exec(); #ifdef _DEBUG @@ -540,8 +540,8 @@ void KMainWidget::slotImportTextFile() sDebugIn << endl; #endif - QString tmpFile; - QString list; + TQString tmpFile; + TQString list; int i, j; KURL filename = KFileDialog::getOpenURL(ksettings.lastDirectory); @@ -556,7 +556,7 @@ void KMainWidget::slotImportTextFile() i = 0; while ((j = list.find('\n', i)) != -1) { - QString newtransfer = list.mid(i, j - i); + TQString newtransfer = list.mid(i, j - i); addTransfer(newtransfer); i = j + 1; } @@ -648,8 +648,8 @@ void KMainWidget::writeTransfers(bool ask_for_name) sDebugIn << endl; #endif - QString str; - QString txt; + TQString str; + TQString txt; if (ask_for_name) txt = KFileDialog::getSaveFileName(ksettings.lastDirectory, i18n("*.kgt|*.kgt\n*|All Files")); @@ -805,12 +805,12 @@ void KMainWidget::slotDeleteCurrent() m_paPause->setEnabled(false); update(); TransferIterator it(myTransferList); - QValueList<QGuardedPtr<Transfer> > selectedItems; - QStringList itemNames; + TQValueList<TQGuardedPtr<Transfer> > selectedItems; + TQStringList itemNames; while (it.current()) { if (it.current()->isSelected()) { - selectedItems.append( QGuardedPtr<Transfer>( it.current() )); + selectedItems.append( TQGuardedPtr<Transfer>( it.current() )); itemNames.append( it.current()->getSrc().prettyURL() ); } ++it; @@ -823,7 +823,7 @@ void KMainWidget::slotDeleteCurrent() if (KMessageBox::warningContinueCancelList(this, i18n("Are you sure you want to delete these transfers?"), itemNames, i18n("Question"), KStdGuiItem::del(), - QString("multiple_delete_transfer")) + TQString("multiple_delete_transfer")) != KMessageBox::Continue) return; // keep 'em } @@ -831,7 +831,7 @@ void KMainWidget::slotDeleteCurrent() { if (KMessageBox::warningContinueCancel(this, i18n("Are you sure you want to delete this transfer?"), i18n("Question"), KStdGuiItem::del(), - QString("delete_transfer")) + TQString("delete_transfer")) != KMessageBox::Continue) return; } @@ -839,10 +839,10 @@ void KMainWidget::slotDeleteCurrent() // If we reach this, we want to delete all selected transfers // Some of them might have finished in the meantime tho. Good that - // we used a QGuardedPtr :) + // we used a TQGuardedPtr :) int transferFinishedMeanwhile = 0; - QValueListConstIterator<QGuardedPtr<Transfer> > lit = selectedItems.begin();; + TQValueListConstIterator<TQGuardedPtr<Transfer> > lit = selectedItems.begin();; while ( lit != selectedItems.end() ) { if ( *lit ) @@ -859,7 +859,7 @@ void KMainWidget::slotDeleteCurrent() KMessageBox::information(this, i18n("The transfer you wanted to delete completed before it could be deleted.", "%n transfers you wanted to delete completed before they could be deleted.", transferFinishedMeanwhile ), - QString::null, "completedBeforeDeletion" ); + TQString::null, "completedBeforeDeletion" ); #ifdef _DEBUG sDebugOut << endl; @@ -957,7 +957,7 @@ void KMainWidget::slotOpenTransfer() sDebugIn << endl; #endif - QString newtransfer; + TQString newtransfer; bool ok = false; #ifdef _DEBUG @@ -997,7 +997,7 @@ void KMainWidget::slotCheckClipboard() //sDebugIn << endl; #endif - QString clipData = QApplication::clipboard()->text( QClipboard::Clipboard ).stripWhiteSpace(); + TQString clipData = TQApplication::clipboard()->text( QClipboard::Clipboard ).stripWhiteSpace(); if (clipData != lastClipboard) { sDebug << "New clipboard event" << endl; @@ -1024,9 +1024,9 @@ void KMainWidget::slotPasteTransfer() sDebugIn << endl; #endif - QString newtransfer; + TQString newtransfer; - newtransfer = QApplication::clipboard()->text(); + newtransfer = TQApplication::clipboard()->text(); newtransfer = newtransfer.stripWhiteSpace(); if (!ksettings.b_expertMode) { @@ -1071,7 +1071,7 @@ void KMainWidget::addTransferEx(const KURL& url, const KURL& destFile) if ( !destURL.isValid() ) { // Setup destination - QString destDir = getSaveDirectoryFor( url.fileName() ); + TQString destDir = getSaveDirectoryFor( url.fileName() ); bool b_expertMode = ksettings.b_expertMode; bool bDestisMalformed = true; @@ -1079,7 +1079,7 @@ void KMainWidget::addTransferEx(const KURL& url, const KURL& destFile) { if (!b_expertMode) { // open the filedialog for confirmation - KFileDialog dlg( destDir, QString::null, + KFileDialog dlg( destDir, TQString::null, 0L, "save_as", true); dlg.setCaption(i18n("Save As")); dlg.setOperationMode(KFileDialog::Saving); @@ -1090,7 +1090,7 @@ void KMainWidget::addTransferEx(const KURL& url, const KURL& destFile) else dlg.setSelection(destURL.url()); - if ( dlg.exec() == QDialog::Rejected ) + if ( dlg.exec() == TQDialog::Rejected ) { #ifdef _DEBUG sDebugOut << endl; @@ -1114,7 +1114,7 @@ void KMainWidget::addTransferEx(const KURL& url, const KURL& destFile) //check if destination already exists if(KIO::NetAccess::exists(destURL, false, this)) { - if (KMessageBox::warningYesNo(this,i18n("Destination file \n%1\nalready exists.\nDo you want to overwrite it?").arg( destURL.prettyURL()), QString::null, i18n("Overwrite"), i18n("Do Not Overwrite") ) + if (KMessageBox::warningYesNo(this,i18n("Destination file \n%1\nalready exists.\nDo you want to overwrite it?").arg( destURL.prettyURL()), TQString::null, i18n("Overwrite"), i18n("Do Not Overwrite") ) == KMessageBox::Yes) { bDestisMalformed=false; @@ -1156,9 +1156,9 @@ void KMainWidget::addTransferEx(const KURL& url, const KURL& destFile) } -void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir ) +void KMainWidget::addTransfers( const KURL::List& src, const TQString& destDir ) { - QValueList<KURLPair> urls_orig; + TQValueList<KURLPair> urls_orig; for ( KURL::List::ConstIterator it = src.begin(); it != src.end(); ++it ) { @@ -1181,7 +1181,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir ) { // create a proper destination file from destDir KURL destURL = KURL::fromPathOrURL( destDir ); - QString fileName = urls_orig.first().src.fileName(); + TQString fileName = urls_orig.first().src.fileName(); // in case the fileName is empty, we simply ask for a filename in // addTransferEx. Do NOT attempt to use an empty filename, that @@ -1192,7 +1192,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir ) destURL.setFileName( fileName ); if(KIO::NetAccess::exists(destURL, false, this)) { - if (KMessageBox::warningYesNo(this,i18n("Destination file \n%1\nalready exists.\nDo you want to overwrite it?").arg( destURL.prettyURL()), QString::null, i18n("Overwrite"), i18n("Do Not Overwrite") ) + if (KMessageBox::warningYesNo(this,i18n("Destination file \n%1\nalready exists.\nDo you want to overwrite it?").arg( destURL.prettyURL()), TQString::null, i18n("Overwrite"), i18n("Do Not Overwrite") ) == KMessageBox::Yes) { SafeDelete::deleteFile( destURL ); @@ -1213,8 +1213,8 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir ) // multiple files -> ask for directory, not for every single filename bool dir_accepted = false; - QValueList<KURLPair>::Iterator it; - QValueList<KURLPair> urls; + TQValueList<KURLPair>::Iterator it; + TQValueList<KURLPair> urls; KURL::List urlsToDelete; while ( !dir_accepted ) { @@ -1223,7 +1223,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir ) // we want to start again with the original list dir_accepted = true; //Set to false later when Cancel is pressed KURL dest; - if ( destDir.isEmpty() || !QFileInfo( destDir ).isDir() ) + if ( destDir.isEmpty() || !TQFileInfo( destDir ).isDir() ) { if ( !destDir.isEmpty() ) dest.setPath( destDir ); @@ -1231,9 +1231,9 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir ) dest.setPath( getSaveDirectoryFor( src.first().fileName() ) ); // ask in any case, when destDir is empty - if ( destDir.isEmpty() || !QFileInfo( dest.path() ).isDir() ) + if ( destDir.isEmpty() || !TQFileInfo( dest.path() ).isDir() ) { - QString dir = KFileDialog::getExistingDirectory( dest.path() ); + TQString dir = KFileDialog::getExistingDirectory( dest.path() ); if ( dir.isEmpty() ) // aborted return; @@ -1260,7 +1260,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir ) } (*it).dest = dest; - QString fileName = (*it).src.fileName(); + TQString fileName = (*it).src.fileName(); if ( fileName.isEmpty() ) // simply use the full url as filename fileName = KURL::encode_string_no_slash( (*it).src.prettyURL() ); @@ -1268,15 +1268,15 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir ) if( KIO::NetAccess::exists((*it).dest, false, this)) { - QString newdest; + TQString newdest; if (skip_all) result = KIO::R_SKIP; else if( overwrite_all ) result = KIO::R_OVERWRITE; else { - QFileInfo finfo( (*it).dest.path() ); - QString caption = i18n( "File Already exists" ) + " - KGet"; + TQFileInfo finfo( (*it).dest.path() ); + TQString caption = i18n( "File Already exists" ) + " - KGet"; result = KIO::open_RenameDlg( caption, (*it).src.url(), (*it).dest.url(), KIO::RenameDlg_Mode(KIO::M_OVERWRITE|KIO::M_SKIP|KIO::M_MULTI), newdest, (KIO::filesize_t) -1, (KIO::filesize_t)finfo.size(), (time_t) -1, (time_t) -1, (time_t) -1, finfo.lastModified().toTime_t()); } switch (result) @@ -1327,7 +1327,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const QString& destDir ) checkQueue(); } -void KMainWidget::addTransfer(const QString& src) +void KMainWidget::addTransfer(const TQString& src) { #ifdef _DEBUG sDebugIn << endl; @@ -1445,7 +1445,7 @@ void KMainWidget::slotTransferTimeout() for (; it.current(); ++it) { item = it.current(); - if (item->getMode() == Transfer::MD_SCHEDULED && item->getStartTime() <= QDateTime::currentDateTime()) { + if (item->getMode() == Transfer::MD_SCHEDULED && item->getStartTime() <= TQDateTime::currentDateTime()) { item->setMode(Transfer::MD_QUEUED); flag = true; } @@ -1455,7 +1455,7 @@ void KMainWidget::slotTransferTimeout() checkQueue(); } - if (ksettings.b_autoDisconnect && ksettings.b_timedDisconnect && ksettings.disconnectTime <= QTime::currentTime() && ksettings.disconnectDate == QDate::currentDate()) { + if (ksettings.b_autoDisconnect && ksettings.b_timedDisconnect && ksettings.disconnectTime <= TQTime::currentTime() && ksettings.disconnectDate == TQDate::currentDate()) { onlineDisconnect(); } @@ -1489,7 +1489,7 @@ void KMainWidget::slotStatusChanged(Transfer * item, int _operation) case Transfer::OP_FINISHED: { - QString srcurl = item->getSrc().prettyURL(); + TQString srcurl = item->getSrc().prettyURL(); if (ksettings.b_removeOnSuccess && !item->keepDialogOpen() ) { delete item; @@ -1551,13 +1551,13 @@ void KMainWidget::slotStatusChanged(Transfer * item, int _operation) } -void KMainWidget::dragEnterEvent(QDragEnterEvent * event) +void KMainWidget::dragEnterEvent(TQDragEnterEvent * event) { #ifdef _DEBUG //sDebugIn << endl; #endif - event->accept(KURLDrag::canDecode(event) || QTextDrag::canDecode(event)); + event->accept(KURLDrag::canDecode(event) || TQTextDrag::canDecode(event)); #ifdef _DEBUG sDebugOut << endl; @@ -1565,18 +1565,18 @@ void KMainWidget::dragEnterEvent(QDragEnterEvent * event) } -void KMainWidget::dropEvent(QDropEvent * event) +void KMainWidget::dropEvent(TQDropEvent * event) { #ifdef _DEBUG //sDebugIn << endl; #endif KURL::List list; - QString str; + TQString str; if (KURLDrag::decode(event, list)) { addTransfers(list); - } else if (QTextDrag::decode(event, str)) { + } else if (TQTextDrag::decode(event, str)) { addTransfer(str); } sDebugOut << endl; @@ -1592,8 +1592,8 @@ void KMainWidget::slotCopyToClipboard() Transfer *item = (Transfer *) myTransferList->currentItem(); if (item) { - QString url = item->getSrc().url(); - QClipboard *cb = QApplication::clipboard(); + TQString url = item->getSrc().url(); + QClipboard *cb = TQApplication::clipboard(); cb->setText( url, QClipboard::Selection ); cb->setText( url, QClipboard::Clipboard); myTransferList->clearSelection(); @@ -1766,7 +1766,7 @@ void KMainWidget::slotToggleOfflineMode() m_paOfflineMode->setIconSet(LOAD_ICON("tool_offline_mode_off")); } else { log(i18n("Offline mode off.")); - setCaption(QString::null, false); + setCaption(TQString::null, false); m_paOfflineMode->setIconSet(LOAD_ICON("tool_offline_mode_on")); } @@ -1923,7 +1923,7 @@ void KMainWidget::slotKonquerorIntegration() ksettings.b_KonquerorIntegration=!ksettings.b_KonquerorIntegration; KConfig cfg("konquerorrc", false, false); cfg.setGroup("HTML Settings"); - cfg.writePathEntry("DownloadManager",QString((bIsKonquiEnable)?"kget":"")); + cfg.writePathEntry("DownloadManager",TQString((bIsKonquiEnable)?"kget":"")); cfg.sync(); if (bIsKonquiEnable) { @@ -1953,8 +1953,8 @@ void KMainWidget::slotPopupMenu(Transfer * item) slotUpdateActions(); // popup transfer menu at the position - QWidget *menu = guiFactory()->container("transfer",this); - ((QPopupMenu *) menu)->popup(QCursor::pos()); + TQWidget *menu = guiFactory()->container("transfer",this); + ((TQPopupMenu *) menu)->popup(TQCursor::pos()); #ifdef _DEBUG @@ -2144,7 +2144,7 @@ void KMainWidget::updateStatusBar() #endif Transfer *item; - QString tmpstr; + TQString tmpstr; int totalFiles = 0; KIO::filesize_t totalSize = 0; @@ -2221,7 +2221,7 @@ void KMainWidget::onlineDisconnect() } } log(i18n("Disconnecting...")); - system(QFile::encodeName(ksettings.disconnectCommand)); + system(TQFile::encodeName(ksettings.disconnectCommand)); #ifdef _DEBUG sDebugOut << endl; @@ -2239,7 +2239,7 @@ void KMainWidget::slotCheckConnection() if (b_connected != old) { if (b_connected) { log(i18n("We are online.")); - setCaption(QString::null, false); + setCaption(TQString::null, false); ksettings.b_offline=ksettings.b_offlineMode; checkQueue(); } else { @@ -2351,7 +2351,7 @@ static int sockets_open() /** No descriptions */ -void KMainWidget::customEvent(QCustomEvent * _e) +void KMainWidget::customEvent(TQCustomEvent * _e) { #ifdef _DEBUG //sDebugIn << endl; @@ -2433,16 +2433,16 @@ void KMainWidget::customEvent(QCustomEvent * _e) #endif } -QString KMainWidget::getSaveDirectoryFor( const QString& filename ) const +TQString KMainWidget::getSaveDirectoryFor( const TQString& filename ) const { // first set destination directory to current directory ( which is also last used ) - QString destDir = ksettings.lastDirectory; + TQString destDir = ksettings.lastDirectory; if (!ksettings.b_useLastDir) { // check wildcards for default directory DirList::Iterator it; for (it = ksettings.defaultDirList.begin(); it != ksettings.defaultDirList.end(); ++it) { - QRegExp rexp((*it).extRegexp); + TQRegExp rexp((*it).extRegexp); rexp.setWildcard(true); diff --git a/kget/kmainwidget.h b/kget/kmainwidget.h index ce7c9ea8..363ca2f0 100644 --- a/kget/kmainwidget.h +++ b/kget/kmainwidget.h @@ -61,12 +61,12 @@ public: KMainWidget(bool bShowMain = false); ~KMainWidget(); - void addTransfer( const QString& src ); + void addTransfer( const TQString& src ); void addTransferEx( const KURL& url, const KURL& destFile = KURL()); // dcop interface - virtual void addTransfers( const KURL::List& src, const QString& destDir = QString::null ); + virtual void addTransfers( const KURL::List& src, const TQString& destDir = TQString::null ); virtual bool isDropTargetVisible() const; virtual void setDropTargetVisible( bool setVisible ); @@ -155,8 +155,8 @@ protected: void writeLog(); // drag and drop - virtual void dragEnterEvent(QDragEnterEvent *); - virtual void dropEvent(QDropEvent *); + virtual void dragEnterEvent(TQDragEnterEvent *); + virtual void dropEvent(TQDropEvent *); void readTransfers(bool ask_for_name = false); void writeTransfers(bool ask_for_name = false); @@ -175,24 +175,24 @@ protected: void onlineDisconnect(); void checkOnline(); void stopAll(); - void log(const QString & message, bool statusbar = true); + void log(const TQString & message, bool statusbar = true); /** No descriptions */ - virtual void customEvent(QCustomEvent * e); + virtual void customEvent(TQCustomEvent * e); // various timers - QTimer *animTimer; // animation timer - QTimer *connectionTimer; // timer that checks whether we are online - QTimer *transferTimer; // timer for scheduled transfers - QTimer *autosaveTimer; // timer for autosaving transfer list - QTimer *clipboardTimer; // timer for checking clipboard - autopaste function + TQTimer *animTimer; // animation timer + TQTimer *connectionTimer; // timer that checks whether we are online + TQTimer *transferTimer; // timer for scheduled transfers + TQTimer *autosaveTimer; // timer for autosaving transfer list + TQTimer *clipboardTimer; // timer for checking clipboard - autopaste function - QString logFileName; + TQString logFileName; private: - QString getSaveDirectoryFor( const QString& filename ) const; + TQString getSaveDirectoryFor( const TQString& filename ) const; bool sanityChecksSuccessful( const KURL& url ); TransferList * myTransferList; @@ -202,7 +202,7 @@ private: DlgPreferences *prefDlg; DockWidget *kdock; - QString lastClipboard; + TQString lastClipboard; uint animCounter; diff --git a/kget/logwindow.cpp b/kget/logwindow.cpp index 5d6f77ad..09490134 100644 --- a/kget/logwindow.cpp +++ b/kget/logwindow.cpp @@ -25,8 +25,8 @@ ***************************************************************************/ -#include <qlayout.h> -#include <qlistview.h> +#include <tqlayout.h> +#include <tqlistview.h> #include <klocale.h> #include <kdialog.h> @@ -37,25 +37,25 @@ #include "logwindow.h" #include <kapplication.h> -#include <qtextedit.h> +#include <tqtextedit.h> // // Replace regular space with nbsp -// QString replaceSpaces(const QString &str) { -// QString res = str; +// TQString replaceSpaces(const TQString &str) { +// TQString res = str; // res.simplifyWhiteSpace(); // int pos; // while ( (pos = res.find(' ')) != -1) { -// res.replace(pos, 1, new QChar( 0x00a0 ), 1); +// res.replace(pos, 1, new TQChar( 0x00a0 ), 1); // } // return res; // } -static QString removeHTML(const QString & str) +static TQString removeHTML(const TQString & str) { - QString res = str; + TQString res = str; int pos; // replace <br/> with a newline @@ -77,18 +77,18 @@ static QString removeHTML(const QString & str) } -SeparatedLog::SeparatedLog(QWidget * parent):QWidget(parent) +SeparatedLog::SeparatedLog(TQWidget * parent):TQWidget(parent) { idSelected = 0; - QGridLayout *topGridLayout = new QGridLayout(this, 1, 2, 0, KDialog::spacingHint()); + TQGridLayout *topGridLayout = new TQGridLayout(this, 1, 2, 0, KDialog::spacingHint()); topGridLayout->setRowStretch(0, 5); topGridLayout->setColStretch(0, 3); topGridLayout->setColStretch(1, 10); - lv_log = new QListView(this); + lv_log = new TQListView(this); lv_log->setMultiSelection(false); lv_log->setAllColumnsShowFocus(true); lv_log->setSorting(-1); @@ -98,26 +98,26 @@ SeparatedLog::SeparatedLog(QWidget * parent):QWidget(parent) topGridLayout->addWidget(lv_log, 0, 0); - connect(lv_log, SIGNAL(selectionChanged(QListViewItem *)), SLOT(transferSelected(QListViewItem *))); + connect(lv_log, TQT_SIGNAL(selectionChanged(TQListViewItem *)), TQT_SLOT(transferSelected(TQListViewItem *))); - ml_log = new QTextEdit(this); + ml_log = new TQTextEdit(this); ml_log->setTextFormat(LogText); ml_log->setMinimumSize(300, 200); - ml_log->setVScrollBarMode(QScrollView::Auto); - ml_log->setWordWrap(QTextEdit::NoWrap); + ml_log->setVScrollBarMode(TQScrollView::Auto); + ml_log->setWordWrap(TQTextEdit::NoWrap); topGridLayout->addWidget(ml_log, 0, 1); } -void SeparatedLog::addLog(uint id, const QString & filename, const QString & message) +void SeparatedLog::addLog(uint id, const TQString & filename, const TQString & message) { if (!trMap.contains(id)) { trMap.insert(id, message); - QListViewItem *last=lv_log->lastItem(); - new QListViewItem(lv_log, last); + TQListViewItem *last=lv_log->lastItem(); + new TQListViewItem(lv_log, last); last=lv_log->lastItem(); - last->setText(0, QString::number(id)); + last->setText(0, TQString::number(id)); last->setText(1, filename); // if I don't do this, ID#10 gets sorted between ID#1 and ID#2, ugly. } else { @@ -130,7 +130,7 @@ void SeparatedLog::addLog(uint id, const QString & filename, const QString & mes } -void SeparatedLog::transferSelected(QListViewItem * item) +void SeparatedLog::transferSelected(TQListViewItem * item) { if (item) { idSelected = item->text(0).toUInt(); @@ -160,27 +160,27 @@ LogWindow::LogWindow():KDialogBase(Tabbed, i18n("Log Window"), Close, Close, 0, { // add pages - QFrame *page = addPage(i18n("Mixed")); - QVBoxLayout *topLayout = new QVBoxLayout(page, 0, spacingHint()); + TQFrame *page = addPage(i18n("Mixed")); + TQVBoxLayout *topLayout = new TQVBoxLayout(page, 0, spacingHint()); - mixed_log = new QTextEdit(page); + mixed_log = new TQTextEdit(page); mixed_log->setTextFormat(LogText); - mixed_log->setVScrollBarMode(QScrollView::Auto); - mixed_log->setWordWrap(QTextEdit::NoWrap); + mixed_log->setVScrollBarMode(TQScrollView::Auto); + mixed_log->setWordWrap(TQTextEdit::NoWrap); topLayout->addWidget(mixed_log); page = addPage(i18n("Separated")); - topLayout = new QVBoxLayout(page, 0, spacingHint()); + topLayout = new TQVBoxLayout(page, 0, spacingHint()); sep_log = new SeparatedLog(page); topLayout->addWidget(sep_log); - connect(this, SIGNAL(closeClicked()), this, SLOT(close())); + connect(this, TQT_SIGNAL(closeClicked()), this, TQT_SLOT(close())); // resize( 500, 300 ); } -void LogWindow::closeEvent(QCloseEvent *e) +void LogWindow::closeEvent(TQCloseEvent *e) { kmain->m_paShowLog->setChecked(false); kmain->b_viewLogWindow = false; @@ -188,29 +188,29 @@ void LogWindow::closeEvent(QCloseEvent *e) } -void LogWindow::logGeneral(const QString & message) +void LogWindow::logGeneral(const TQString & message) { - QString tmps = "<font color=\"blue\">" + QTime::currentTime().toString() + "</font> : <b>" + message + "</b>"; + TQString tmps = "<font color=\"blue\">" + TQTime::currentTime().toString() + "</font> : <b>" + message + "</b>"; mixed_log->append(tmps); } -void LogWindow::logTransfer(uint id, const QString & filename, const QString & message) +void LogWindow::logTransfer(uint id, const TQString & filename, const TQString & message) { - QString mixed_msg, single_msg, job_id; + TQString mixed_msg, single_msg, job_id; - job_id = QString("Job[<font color=\"red\">%1</font>] : ").arg(id); - mixed_msg = "<font color=\"blue\">" + QTime::currentTime().toString() + "</font> : " + job_id + message; + job_id = TQString("Job[<font color=\"red\">%1</font>] : ").arg(id); + mixed_msg = "<font color=\"blue\">" + TQTime::currentTime().toString() + "</font> : " + job_id + message; - single_msg = "<font color=\"blue\">" + QTime::currentTime().toString() + "</font> : " + message; + single_msg = "<font color=\"blue\">" + TQTime::currentTime().toString() + "</font> : " + message; mixed_log->append(mixed_msg); sep_log->addLog(id, filename, single_msg); } -QString LogWindow::getText() const +TQString LogWindow::getText() const { return removeHTML(mixed_log->text()); } diff --git a/kget/logwindow.h b/kget/logwindow.h index a2aa13d5..2ac17941 100644 --- a/kget/logwindow.h +++ b/kget/logwindow.h @@ -28,7 +28,7 @@ #ifndef _LOGWINDOW_H #define _LOGWINDOW_H -#include <qmap.h> +#include <tqmap.h> #include <kdialogbase.h> @@ -40,20 +40,20 @@ class SeparatedLog:public QWidget { Q_OBJECT public: - SeparatedLog(QWidget * parent); + SeparatedLog(TQWidget * parent); ~SeparatedLog() {} - void addLog(uint id, const QString & filename, const QString & message); + void addLog(uint id, const TQString & filename, const TQString & message); void refresh(); protected slots: - void transferSelected(QListViewItem * item); + void transferSelected(TQListViewItem * item); private: - QListView * lv_log; - QTextEdit *ml_log; + TQListView * lv_log; + TQTextEdit *ml_log; - typedef QMap < uint, QString > TransferMap; + typedef TQMap < uint, TQString > TransferMap; TransferMap trMap; uint idSelected; @@ -67,17 +67,17 @@ Q_OBJECT public: LogWindow(); ~LogWindow() {} - void logGeneral(const QString & message); - QString getText() const; + void logGeneral(const TQString & message); + TQString getText() const; public slots: - void logTransfer(uint id, const QString & filename, const QString & message); + void logTransfer(uint id, const TQString & filename, const TQString & message); protected: - void closeEvent(QCloseEvent *); + void closeEvent(TQCloseEvent *); private: - QTextEdit * mixed_log; + TQTextEdit * mixed_log; SeparatedLog *sep_log; }; diff --git a/kget/main.cpp b/kget/main.cpp index cd3341b5..f6ca1cb0 100644 --- a/kget/main.cpp +++ b/kget/main.cpp @@ -94,7 +94,7 @@ static void setSignalHandler(void (*handler) (int)) static void cleanup(void) { qInstallMsgHandler(0L /*oldMsgHandler*/); -// QString cmd; +// TQString cmd; } @@ -158,7 +158,7 @@ public: #ifdef _DEBUG sDebug <<"args(0)= "<<args->arg(0) << endl; #endif - QString txt(args->arg(0)); + TQString txt(args->arg(0)); if ( txt.endsWith( ".kgt" ) ) kmain->readTransfersEx(KURL::fromPathOrURL( txt )); else @@ -179,7 +179,7 @@ public: } else { - kmain->addTransfers( urls, QString() ); + kmain->addTransfers( urls, TQString() ); } } args->clear(); diff --git a/kget/safedelete.cpp b/kget/safedelete.cpp index c4cb6915..16deb1dd 100644 --- a/kget/safedelete.cpp +++ b/kget/safedelete.cpp @@ -3,7 +3,7 @@ #include <kurl.h> #include <kio/netaccess.h> -#include <qfileinfo.h> +#include <tqfileinfo.h> #include "safedelete.h" @@ -11,7 +11,7 @@ bool SafeDelete::deleteFile( const KURL& url ) { if ( url.isLocalFile() ) { - QFileInfo info( url.path() ); + TQFileInfo info( url.path() ); if ( info.isDir() ) { KMessageBox::information(0L, diff --git a/kget/settings.cpp b/kget/settings.cpp index da066a6a..942acb09 100644 --- a/kget/settings.cpp +++ b/kget/settings.cpp @@ -33,7 +33,7 @@ #include <kglobalsettings.h> #include <netwm_def.h> -#include <qdir.h> +#include <tqdir.h> #include "kmainwidget.h" #include "transferlist.h" @@ -44,7 +44,7 @@ static const unsigned long DEFAULT_DOCK_STATE = (NET::SkipTaskbar | NET::StaysOnTop); -QString ConnectionDevices[6] = { +TQString ConnectionDevices[6] = { "", "eth", "plip", @@ -91,7 +91,7 @@ Settings::load() b_timedDisconnect = config->readBoolEntry("TimedDisconnect", DEF_TimedDisconnect); disconnectTime.setHMS(config->readNumEntry("DisconnectTimeHour"), config->readNumEntry("DisconnectTimeMinute"), 0); - disconnectDate = QDate::currentDate(); // doesn't make sense to save it + disconnectDate = TQDate::currentDate(); // doesn't make sense to save it b_autoShutdown = config->readBoolEntry("AutoShutdown", DEF_AutoShutdown); b_autoPaste = config->readBoolEntry("AutoPaste", DEF_AutoPaste); @@ -120,7 +120,7 @@ Settings::load() KConfig *cfg = new KConfig("konquerorrc", false, false); cfg->setGroup("HTML Settings"); - QString downloadManager=cfg->readPathEntry("DownloadManager"); + TQString downloadManager=cfg->readPathEntry("DownloadManager"); b_KonquerorIntegration=(downloadManager==KGET_APP_NAME)?true:false; @@ -131,7 +131,7 @@ Settings::load() bool bAnswerYes = KMessageBox::questionYesNo(0L,i18n("This is the first time that you have run KGet.\nDo you want to use KGet as Download Manager for Konqueror?"), i18n("Konqueror Integration"), i18n("Enable"), i18n("Do Not Enable")) == KMessageBox::Yes; if (bAnswerYes) { - cfg->writePathEntry("DownloadManager", QString(KGET_APP_NAME)); + cfg->writePathEntry("DownloadManager", TQString(KGET_APP_NAME)); cfg->sync(); b_KonquerorIntegration=true; } @@ -151,14 +151,14 @@ Settings::load() b_useLastDir = config->readBoolEntry("UseLastDirectory", DEF_UseLastDir); lastDirectory = config->readPathEntry("LastDirectory", - QString("file:") + QDir::currentDirPath() ); + TQString("file:") + TQDir::currentDirPath() ); - QStringList strList; + TQStringList strList; strList = config->readPathListEntry("Items"); defaultDirList.clear(); - QStringList::Iterator it = strList.begin(); + TQStringList::Iterator it = strList.begin(); for (; it != strList.end(); ++it) { DirItem item; @@ -171,13 +171,13 @@ Settings::load() // read misc settings config->setGroup("Misc"); - QFont font = KGlobalSettings::generalFont(); + TQFont font = KGlobalSettings::generalFont(); listViewFont = config->readFontEntry("Font", &font); // read main window geometry settings config->setGroup("MainGeometry"); - const QPoint point(-1,-1); + const TQPoint point(-1,-1); mainPosition = config->readPointEntry("Position", &point); mainSize = config->readSizeEntry("Size"); mainState = config->readUnsignedLongNumEntry("State", 0); @@ -253,7 +253,7 @@ void Settings::save() config->writeEntry("UseLastDirectory", b_useLastDir); config->writePathEntry("LastDirectory", lastDirectory ); DirList::Iterator it; - QStringList lst; + TQStringList lst; for (it = defaultDirList.begin(); it != defaultDirList.end(); ++it) { lst.append((*it).extRegexp); diff --git a/kget/settings.h b/kget/settings.h index c66b00e6..7c02b166 100644 --- a/kget/settings.h +++ b/kget/settings.h @@ -31,7 +31,7 @@ // common connection types enum ConnectionType { PERMANENT = 0, ETHERNET, PLIP, SLIP, PPP, ISDN }; -extern QString ConnectionDevices[]; +extern TQString ConnectionDevices[]; // Connection settings @@ -86,17 +86,17 @@ extern QString ConnectionDevices[]; #define DEF_WindowStyle NORMAL -#include <qdatetime.h> +#include <tqdatetime.h> #include <kwin.h> -#include <qvaluelist.h> +#include <tqvaluelist.h> struct DirItem { - QString extRegexp; - QString defaultDir; + TQString extRegexp; + TQString defaultDir; }; -typedef QValueList < DirItem > DirList; +typedef TQValueList < DirItem > DirList; class Settings { @@ -133,10 +133,10 @@ public: bool b_autoSave; uint autoSaveInterval; bool b_autoDisconnect; - QString disconnectCommand; + TQString disconnectCommand; bool b_timedDisconnect; - QDate disconnectDate; - QTime disconnectTime; + TQDate disconnectDate; + TQTime disconnectTime; bool b_autoShutdown; bool b_autoPaste; @@ -163,21 +163,21 @@ public: // directories options bool b_useLastDir; - QString lastDirectory; + TQString lastDirectory; DirList defaultDirList; // system options bool b_useAnimation; - QFont listViewFont; + TQFont listViewFont; // geometry settings - QPoint mainPosition; - QSize mainSize; + TQPoint mainPosition; + TQSize mainSize; unsigned long int mainState; - QPoint dropPosition; + TQPoint dropPosition; unsigned long int dropState; }; diff --git a/kget/slave.cpp b/kget/slave.cpp index 944a7f37..f8569e79 100644 --- a/kget/slave.cpp +++ b/kget/slave.cpp @@ -36,8 +36,8 @@ #include <assert.h> Slave::Slave(Transfer * _parent, const KURL & _src, const KURL & _dest) - : QObject(), - QThread() + : TQObject(), + TQThread() { mDebug << ">>>>Entering" << endl; copyjob = NULL; @@ -74,22 +74,22 @@ void Slave::PostMessage(SlaveResult _event, Q_ULLONG _data) { SlaveEvent *e1 = new SlaveEvent(m_parent, _event, _data); - QApplication::postEvent(kapp->mainWidget(), (QEvent *) e1); + TQApplication::postEvent(kapp->mainWidget(), (TQEvent *) e1); } -void Slave::PostMessage(SlaveResult _event, const QString & _msg) +void Slave::PostMessage(SlaveResult _event, const TQString & _msg) { SlaveEvent *e1 = new SlaveEvent(m_parent, _event, _msg); - QApplication::postEvent(kapp->mainWidget(), (QEvent *) e1); + TQApplication::postEvent(kapp->mainWidget(), (TQEvent *) e1); mDebug << "Msg:" << "_msg = " << _msg << endl; } -void Slave::InfoMessage(const QString & _msg) +void Slave::InfoMessage(const TQString & _msg) { SlaveEvent *e1 = new SlaveEvent(m_parent, SLV_INFO, _msg); - QApplication::postEvent(kapp->mainWidget(), (QEvent *) e1); + TQApplication::postEvent(kapp->mainWidget(), (TQEvent *) e1); mDebug << "Infor Msg:" << "_msg = " << _msg << endl; } @@ -218,17 +218,17 @@ void Slave::Connect() mDebugIn << endl; - connect(copyjob, SIGNAL(canceled(KIO::Job *)), SLOT(slotCanceled(KIO::Job *))); - connect(copyjob, SIGNAL(connected(KIO::Job *)), SLOT(slotConnected(KIO::Job *))); - connect(copyjob, SIGNAL(result(KIO::Job *)), SLOT(slotResult(KIO::Job *))); + connect(copyjob, TQT_SIGNAL(canceled(KIO::Job *)), TQT_SLOT(slotCanceled(KIO::Job *))); + connect(copyjob, TQT_SIGNAL(connected(KIO::Job *)), TQT_SLOT(slotConnected(KIO::Job *))); + connect(copyjob, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *))); - connect(copyjob, SIGNAL(totalSize(KIO::Job *, KIO::filesize_t)), SLOT(slotTotalSize(KIO::Job *, KIO::filesize_t))); + connect(copyjob, TQT_SIGNAL(totalSize(KIO::Job *, KIO::filesize_t)), TQT_SLOT(slotTotalSize(KIO::Job *, KIO::filesize_t))); - connect(copyjob, SIGNAL(processedSize(KIO::Job *, KIO::filesize_t)), SLOT(slotProcessedSize(KIO::Job *, KIO::filesize_t))); + connect(copyjob, TQT_SIGNAL(processedSize(KIO::Job *, KIO::filesize_t)), TQT_SLOT(slotProcessedSize(KIO::Job *, KIO::filesize_t))); - connect(copyjob, SIGNAL(speed(KIO::Job *, unsigned long)), SLOT(slotSpeed(KIO::Job *, unsigned long))); + connect(copyjob, TQT_SIGNAL(speed(KIO::Job *, unsigned long)), TQT_SLOT(slotSpeed(KIO::Job *, unsigned long))); - connect(copyjob, SIGNAL(infoMessage(KIO::Job *, const QString &)), SLOT(slotInfoMessage(KIO::Job *, const QString &))); + connect(copyjob, TQT_SIGNAL(infoMessage(KIO::Job *, const TQString &)), TQT_SLOT(slotInfoMessage(KIO::Job *, const TQString &))); mDebugOut << endl; } @@ -266,7 +266,7 @@ void Slave::slotResult(KIO::Job * job) PostMessage(SLV_NOTINCACHE); return; } - QString tmsg="<font color=\"red\"> <b>" + job->errorString() + \ + TQString tmsg="<font color=\"red\"> <b>" + job->errorString() + \ "</b></font>"; InfoMessage(tmsg); if (m_parent->retryOnError() && \ @@ -321,7 +321,7 @@ void Slave::slotProcessedSize(KIO::Job *, KIO::filesize_t _processed_size) // mDebugOut<<endl; } -void Slave::slotInfoMessage(KIO::Job *, const QString & _msg) +void Slave::slotInfoMessage(KIO::Job *, const TQString & _msg) { mDebugIn << "MSG=" << _msg << endl; InfoMessage(_msg); diff --git a/kget/slave.h b/kget/slave.h index 670b418b..1bb2635c 100644 --- a/kget/slave.h +++ b/kget/slave.h @@ -27,12 +27,12 @@ #ifndef SLAVE_H #define SLAVE_H -#include <qthread.h> +#include <tqthread.h> #include <kurl.h> -#include <qvaluestack.h> -#include <qwaitcondition.h> -#include <qmutex.h> -#include <qobject.h> +#include <tqvaluestack.h> +#include <tqwaitcondition.h> +#include <tqmutex.h> +#include <tqobject.h> #include "common.h" @@ -43,7 +43,7 @@ namespace KIO class Transfer; -class Slave:public QObject, public QThread +class Slave:public TQObject, public QThread { Q_OBJECT @@ -77,14 +77,14 @@ private slots: void slotTotalSize(KIO::Job *, KIO::filesize_t); void slotProcessedSize(KIO::Job *, KIO::filesize_t); void slotSpeed(KIO::Job *, unsigned long); - void slotInfoMessage(KIO::Job *, const QString &); + void slotInfoMessage(KIO::Job *, const TQString &); private: void Connect(); void PostMessage(SlaveResult _event, Q_ULLONG _data = 0L); - void PostMessage(SlaveResult _event, const QString & _msg); - void InfoMessage(const QString & _msg); + void PostMessage(SlaveResult _event, const TQString & _msg); + void InfoMessage(const TQString & _msg); Transfer * m_parent; @@ -94,9 +94,9 @@ private: Slave::SlaveCommand fetch_cmd(); int nPendingCommand; - QValueStack < SlaveCommand > stack; - QWaitCondition worker; - QMutex mutex; + TQValueStack < SlaveCommand > stack; + TQWaitCondition worker; + TQMutex mutex; KIO::GetFileJob * copyjob; }; diff --git a/kget/slaveevent.cpp b/kget/slaveevent.cpp index e0d41661..87d4c07a 100644 --- a/kget/slaveevent.cpp +++ b/kget/slaveevent.cpp @@ -26,18 +26,18 @@ #include "slaveevent.h" -#define EVENT_TYPE (QEvent::User + 252) +#define EVENT_TYPE (TQEvent::User + 252) -SlaveEvent::SlaveEvent(Transfer * _item, unsigned int _event, Q_ULLONG _ldata):QCustomEvent(EVENT_TYPE) +SlaveEvent::SlaveEvent(Transfer * _item, unsigned int _event, Q_ULLONG _ldata):TQCustomEvent(EVENT_TYPE) { m_event = _event; m_item = _item; m_ldata = _ldata; - m_msg = QString(""); + m_msg = TQString(""); } -SlaveEvent::SlaveEvent(Transfer * _item, unsigned int _event, const QString & _msg):QCustomEvent(EVENT_TYPE) +SlaveEvent::SlaveEvent(Transfer * _item, unsigned int _event, const TQString & _msg):TQCustomEvent(EVENT_TYPE) { m_event = _event; m_item = _item; @@ -66,7 +66,7 @@ Q_ULLONG SlaveEvent::getData() const return m_ldata; } -const QString & SlaveEvent::getMsg() const +const TQString & SlaveEvent::getMsg() const { return m_msg; } diff --git a/kget/slaveevent.h b/kget/slaveevent.h index 6fb5f96b..6f87bbbe 100644 --- a/kget/slaveevent.h +++ b/kget/slaveevent.h @@ -27,7 +27,7 @@ #ifndef SLAVEEVENT_H #define SLAVEEVENT_H -#include <qevent.h> +#include <tqevent.h> class Transfer; @@ -39,20 +39,20 @@ class SlaveEvent:public QCustomEvent { public: SlaveEvent(Transfer * _item, unsigned int _event, Q_ULLONG _ldata = 0L); - SlaveEvent(Transfer * _item, unsigned int _event, const QString & _msg); + SlaveEvent(Transfer * _item, unsigned int _event, const TQString & _msg); ~SlaveEvent(); unsigned int getEvent() const; Transfer *getItem() const; Q_ULLONG getData() const; - const QString & getMsg() const; + const TQString & getMsg() const; private: unsigned int m_event; Transfer *m_item; Q_ULLONG m_ldata; - QString m_msg; + TQString m_msg; }; diff --git a/kget/transfer.cpp b/kget/transfer.cpp index 44e76fae..7569e52b 100644 --- a/kget/transfer.cpp +++ b/kget/transfer.cpp @@ -23,7 +23,7 @@ * ***************************************************************************/ -#include <qheader.h> +#include <tqheader.h> #include <kurl.h> #include <kmessagebox.h> @@ -54,7 +54,7 @@ extern Settings ksettings; Transfer::Transfer(TransferList * _view, const KURL & _src, const KURL & _dest, const uint _id) - : QObject( _view ), + : TQObject( _view ), KListViewItem(_view), dlgIndividual( 0 ) { @@ -71,8 +71,8 @@ Transfer::Transfer(TransferList * _view, const KURL & _src, const KURL & _dest, Transfer::Transfer(TransferList * _view, Transfer * after, const KURL & _src, const KURL & _dest, const uint _id) - : QObject( _view ), - KListViewItem(_view, (QListViewItem *) after), + : TQObject( _view ), + KListViewItem(_view, (TQListViewItem *) after), src(_src), dest(_dest), view(_view), dlgIndividual( 0 ) { @@ -109,7 +109,7 @@ Transfer::init(const uint _id) id = _id; m_pSlave = new Slave(this, src, dest); canResume = false; - startTime = QDateTime::currentDateTime(); + startTime = TQDateTime::currentDateTime(); speed = 0; // retryCount = ksettings.reconnectRetries-1; retryCount = 0; @@ -118,25 +118,25 @@ Transfer::init(const uint _id) status = ST_STOPPED; - connect(this, SIGNAL(statusChanged(Transfer *, int)), kmain, SLOT(slotStatusChanged(Transfer *, int))); - connect(this, SIGNAL(statusChanged(Transfer *, int)), this, SLOT(slotUpdateActions())); + connect(this, TQT_SIGNAL(statusChanged(Transfer *, int)), kmain, TQT_SLOT(slotStatusChanged(Transfer *, int))); + connect(this, TQT_SIGNAL(statusChanged(Transfer *, int)), this, TQT_SLOT(slotUpdateActions())); - connect(this, SIGNAL(log(uint, const QString &, const QString &)), kmain->logwin(), SLOT(logTransfer(uint, const QString &, const QString &))); + connect(this, TQT_SIGNAL(log(uint, const TQString &, const TQString &)), kmain->logwin(), TQT_SLOT(logTransfer(uint, const TQString &, const TQString &))); // setup actions - m_paResume = new KAction(i18n("&Resume"), "tool_resume", 0, this, SLOT(slotResume()), this, "resume"); + m_paResume = new KAction(i18n("&Resume"), "tool_resume", 0, this, TQT_SLOT(slotResume()), this, "resume"); - m_paPause = new KAction(i18n("&Pause"), "tool_pause", 0, this, SLOT(slotRequestPause()), this, "pause"); + m_paPause = new KAction(i18n("&Pause"), "tool_pause", 0, this, TQT_SLOT(slotRequestPause()), this, "pause"); - m_paDelete = new KAction(i18n("&Delete"), "editdelete", 0, this, SLOT(slotRequestRemove()), this, "delete"); + m_paDelete = new KAction(i18n("&Delete"), "editdelete", 0, this, TQT_SLOT(slotRequestRemove()), this, "delete"); - m_paRestart = new KAction(i18n("Re&start"), "tool_restart", 0, this, SLOT(slotRequestRestart()), this, "restart"); + m_paRestart = new KAction(i18n("Re&start"), "tool_restart", 0, this, TQT_SLOT(slotRequestRestart()), this, "restart"); - m_paQueue = new KRadioAction(i18n("&Queue"), "tool_queue", 0, this, SLOT(slotQueue()), this, "queue"); + m_paQueue = new KRadioAction(i18n("&Queue"), "tool_queue", 0, this, TQT_SLOT(slotQueue()), this, "queue"); - m_paTimer = new KRadioAction(i18n("&Timer"), "tool_timer", 0, this, SLOT(slotRequestSchedule()), this, "timer"); + m_paTimer = new KRadioAction(i18n("&Timer"), "tool_timer", 0, this, TQT_SLOT(slotRequestSchedule()), this, "timer"); - m_paDelay = new KRadioAction(i18n("De&lay"), "tool_delay", 0, this, SLOT(slotRequestDelay()), this, "delay"); + m_paDelay = new KRadioAction(i18n("De&lay"), "tool_delay", 0, this, TQT_SLOT(slotRequestDelay()), this, "delay"); m_paQueue->setExclusiveGroup("TransferMode"); m_paTimer->setExclusiveGroup("TransferMode"); @@ -144,7 +144,7 @@ Transfer::init(const uint _id) // Actions - // m_paDock = new KAction(i18n("&Dock"),"tool_dock", 0, this,SLOT(slotRequestDelay()), this, "dockIndividual"); + // m_paDock = new KAction(i18n("&Dock"),"tool_dock", 0, this,TQT_SLOT(slotRequestDelay()), this, "dockIndividual"); // setup individual transfer dialog @@ -307,7 +307,7 @@ bool Transfer::updateStatus(int counter) { //sDebug<< ">>>>Entering"<<endl; - QPixmap *pix = 0L; + TQPixmap *pix = 0L; bool isTransfer = false; view->setUpdatesEnabled(false); @@ -339,14 +339,14 @@ bool Transfer::updateStatus(int counter) if(prevStatus!=status || prevMode != mode || status==ST_RUNNING || status==ST_TRYING) { - QRect rect = view->header()->sectionRect(view->lv_pixmap); + TQRect rect = view->header()->sectionRect(view->lv_pixmap); int x = rect.x(); int y = view->itemRect(this).y(); int w = rect.width(); int h = rect.height(); - view->QScrollView::updateContents(x,y,w,h); + view->TQScrollView::updateContents(x,y,w,h); prevStatus = status; prevMode = mode; @@ -358,8 +358,8 @@ bool Transfer::updateStatus(int counter) void Transfer::UpdateRetry() { - QString retry; - QString MaxRetry; + TQString retry; + TQString MaxRetry; retry.setNum(retryCount); MaxRetry.setNum(ksettings.reconnectRetries); @@ -455,8 +455,8 @@ void Transfer::slotRequestRemove() if (dlgIndividual && !ksettings.b_expertMode) { if (KMessageBox::warningContinueCancel(0, i18n("Are you sure you want to delete this transfer?"), - QString::null, KStdGuiItem::del(), - QString("delete_transfer")) + TQString::null, KStdGuiItem::del(), + TQString("delete_transfer")) != KMessageBox::Continue) return; } @@ -510,8 +510,8 @@ void Transfer::slotRequestSchedule() // if the time was already set somewhere in the future, keep it // otherwise set it to the current time + 60 seconds - if (startTime < QDateTime::currentDateTime()) { - QDateTime dt = QDateTime::currentDateTime(); + if (startTime < TQDateTime::currentDateTime()) { + TQDateTime dt = TQDateTime::currentDateTime(); startTime = dt.addSecs(60); } if (status == ST_RUNNING) { @@ -623,7 +623,7 @@ void Transfer::slotSpeed(unsigned long bytes_per_second) dlgIndividual->setSpeed(i18n("Stopped")); } else { - QString tmps = i18n("%1/s").arg(KIO::convertSize(speed)); + TQString tmps = i18n("%1/s").arg(KIO::convertSize(speed)); setText(view->lv_speed, tmps); setText(view->lv_remaining, remainingTime); if(dlgIndividual) @@ -699,7 +699,7 @@ void Transfer::slotProcessedSize(KIO::filesize_t bytes) dlgIndividual->setProcessedSize(processedSize); if (percent != old) { - QString tmps; + TQString tmps; if (percent == 100) { tmps = i18n("OK as in 'finished'","OK"); } else { @@ -750,13 +750,13 @@ void Transfer::showIndividual() } -void Transfer::logMessage(const QString & message) +void Transfer::logMessage(const TQString & message) { sDebugIn << message << endl; emit log(id, src.fileName(), message); - QString tmps = "<font color=\"blue\">" + QTime::currentTime().toString() + "</font> : " + message; + TQString tmps = "<font color=\"blue\">" + TQTime::currentTime().toString() + "</font> : " + message; transferLog.append(tmps + '\n'); @@ -773,7 +773,7 @@ bool Transfer::read(KSimpleConfig * config, int id) sDebugIn << endl; - QString str; + TQString str; str.sprintf("Item%d", id); config->setGroup(str); @@ -808,7 +808,7 @@ void Transfer::write(KSimpleConfig * config, int id) { sDebugIn << endl; - QString str; + TQString str; str.sprintf("Item%d", id); config->setGroup(str); @@ -851,7 +851,7 @@ void Transfer::slotExecError() status = ST_STOPPED; mode = MD_SCHEDULED; - startTime=QDateTime::currentDateTime().addSecs(ksettings.reconnectTime * 60); + startTime=TQDateTime::currentDateTime().addSecs(ksettings.reconnectTime * 60); emit statusChanged(this, OP_SCHEDULED); sDebugOut << endl; @@ -961,7 +961,7 @@ void Transfer::slotExecSchedule() } /** No descriptions */ -void Transfer::slotStartTime(const QDateTime & _startTime) +void Transfer::slotStartTime(const TQDateTime & _startTime) { sDebugIn << endl; diff --git a/kget/transfer.h b/kget/transfer.h index 845995d8..0dacd315 100644 --- a/kget/transfer.h +++ b/kget/transfer.h @@ -29,9 +29,9 @@ #define _Transfer_h #include <klistview.h> -#include <qdatetime.h> -#include <qguardedptr.h> -#include <qmap.h> +#include <tqdatetime.h> +#include <tqguardedptr.h> +#include <tqmap.h> #include <kurl.h> #include <kio/jobclasses.h> @@ -50,7 +50,7 @@ class DlgIndividual; class TransferList; -class Transfer:public QObject, public KListViewItem +class Transfer:public TQObject, public KListViewItem { Q_OBJECT public: @@ -73,12 +73,12 @@ public: bool read(KSimpleConfig * config, int id); void write(KSimpleConfig * config, int id); - void logMessage(const QString & message); + void logMessage(const TQString & message); bool keepDialogOpen() const; - QDateTime getStartTime()const + TQDateTime getStartTime()const { return startTime; } @@ -130,7 +130,7 @@ public: { status = _status; }; - void setStartTime(QDateTime _startTime) + void setStartTime(TQDateTime _startTime) { startTime = _startTime; }; @@ -185,12 +185,12 @@ public slots: void slotTotalSize(KIO::filesize_t bytes); void slotProcessedSize(KIO::filesize_t); - void slotStartTime(const QDateTime &); + void slotStartTime(const TQDateTime &); void slotStop(); // stop all transfers when going offline signals: void statusChanged(Transfer *, int _operation); - void log(uint, const QString &, const QString &); + void log(uint, const TQString &, const TQString &); private: void init(const uint _id); @@ -206,10 +206,10 @@ private: static uint idcount; // log - QString transferLog; + TQString transferLog; // schedule time - QDateTime startTime; + TQDateTime startTime; KIO::filesize_t totalSize; KIO::filesize_t processedSize; @@ -217,7 +217,7 @@ private: int speed; unsigned int remainingTimeSec; - QString remainingTime; + TQString remainingTime; TransferStatus status; TransferMode mode; @@ -233,7 +233,7 @@ private: TransferList *view; // individual download window - QGuardedPtr<DlgIndividual> dlgIndividual; + TQGuardedPtr<DlgIndividual> dlgIndividual; }; diff --git a/kget/transferlist.cpp b/kget/transferlist.cpp index 1d9ed902..bf54cb87 100644 --- a/kget/transferlist.cpp +++ b/kget/transferlist.cpp @@ -52,11 +52,11 @@ static int defaultColumnWidth[] = { }; -TransferList::TransferList(QWidget * parent, const char *name) +TransferList::TransferList(TQWidget * parent, const char *name) : KListView(parent, name) { // enable selection of more than one item - setSelectionMode( QListView::Extended ); + setSelectionMode( TQListView::Extended ); // // disable sorting and clicking on headers // setSorting( -1 ); @@ -86,20 +86,20 @@ TransferList::TransferList(QWidget * parent, const char *name) else restoreLayout( KGlobal::config(), "ListView" ); - QString connectPath = "pics/connect%2.png"; - QString tryPath = "pics/try%2.png"; + TQString connectPath = "pics/connect%2.png"; + TQString tryPath = "pics/try%2.png"; // Load animations - QPixmap* curPix; + TQPixmap* curPix; if (animConn.count() == 0) { animConn.setAutoDelete(true); animTry.setAutoDelete(true); for (int i = 0; i < 8; i++) { - curPix = new QPixmap(); + curPix = new TQPixmap(); curPix->load(locate("appdata", connectPath.arg(i))); animConn.append(curPix); - curPix = new QPixmap(); + curPix = new TQPixmap(); curPix->load(locate("appdata", tryPath.arg(i))); animTry.append(curPix); } @@ -113,8 +113,8 @@ TransferList::TransferList(QWidget * parent, const char *name) phasesNum = animConn.count(); - connect(this, SIGNAL(doubleClicked(QListViewItem *)), SLOT(slotTransferSelected(QListViewItem *))); - connect(this, SIGNAL(rightButtonPressed(QListViewItem *, const QPoint &, int)), SLOT(slotPopupMenu(QListViewItem *))); + connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem *)), TQT_SLOT(slotTransferSelected(TQListViewItem *))); + connect(this, TQT_SIGNAL(rightButtonPressed(TQListViewItem *, const TQPoint &, int)), TQT_SLOT(slotPopupMenu(TQListViewItem *))); } @@ -137,13 +137,13 @@ Transfer *TransferList::addTransfer(const KURL & _source, const KURL & _dest, } -void TransferList::slotTransferSelected(QListViewItem * item) +void TransferList::slotTransferSelected(TQListViewItem * item) { emit transferSelected((Transfer *) item); } -void TransferList::slotPopupMenu(QListViewItem * item) +void TransferList::slotPopupMenu(TQListViewItem * item) { if (!item) return; @@ -151,7 +151,7 @@ void TransferList::slotPopupMenu(QListViewItem * item) } -void TransferList::setSelected(QListViewItem * item, bool selected) +void TransferList::setSelected(TQListViewItem * item, bool selected) { bool tmpb = selected; @@ -159,7 +159,7 @@ void TransferList::setSelected(QListViewItem * item, bool selected) tmpb = false; } - QListView::setSelected(item, tmpb); + TQListView::setSelected(item, tmpb); } @@ -227,9 +227,9 @@ Transfer * TransferList::find(const KURL& _src) void TransferList::readTransfers(const KURL& file) { - QString tmpFile; + TQString tmpFile; - if (KIO::NetAccess::download(file, tmpFile, (QWidget*)parent())) { + if (KIO::NetAccess::download(file, tmpFile, (TQWidget*)parent())) { KSimpleConfig config(tmpFile); config.setGroup("Common"); @@ -240,7 +240,7 @@ void TransferList::readTransfers(const KURL& file) for ( int i = 0; i < num; i++ ) { - QString str; + TQString str; str.sprintf("Item%d", i); config.setGroup(str); @@ -261,7 +261,7 @@ void TransferList::readTransfers(const KURL& file) } } -void TransferList::writeTransfers(const QString& file) +void TransferList::writeTransfers(const TQString& file) { sDebug << ">>>>Entering with file =" << file << endl; diff --git a/kget/transferlist.h b/kget/transferlist.h index 0d5929d0..89f50e6a 100644 --- a/kget/transferlist.h +++ b/kget/transferlist.h @@ -28,7 +28,7 @@ #define _TransferList_h #include <klistview.h> -#include <qptrlist.h> +#include <tqptrlist.h> #include <kurl.h> @@ -39,12 +39,12 @@ class TransferIterator:public QListViewItemIterator public: - TransferIterator(QListView * view):QListViewItemIterator(view) + TransferIterator(TQListView * view):TQListViewItemIterator(view) { } Transfer *current() const { - return (Transfer *) QListViewItemIterator::current(); + return (Transfer *) TQListViewItemIterator::current(); } void reset() { @@ -59,13 +59,13 @@ class TransferList:public KListView Q_OBJECT public: - TransferList(QWidget * parent = 0, const char *name = 0); + TransferList(TQWidget * parent = 0, const char *name = 0); virtual ~ TransferList(); Transfer *addTransfer(const KURL & _source, const KURL & _dest, bool canShow = true ); - virtual void setSelected(QListViewItem * item, bool selected); + virtual void setSelected(TQListViewItem * item, bool selected); void moveToBegin(Transfer * item); void moveToEnd(Transfer * item); @@ -79,7 +79,7 @@ Q_OBJECT public: bool areTransfersQueuedOrScheduled(); void readTransfers(const KURL& file); - void writeTransfers(const QString& file); + void writeTransfers(const TQString& file); friend class Transfer; @@ -88,8 +88,8 @@ signals: void popupMenu(Transfer * item); protected slots: - void slotTransferSelected(QListViewItem * item); - void slotPopupMenu(QListViewItem * item); + void slotTransferSelected(TQListViewItem * item); + void slotPopupMenu(TQListViewItem * item); protected: @@ -100,13 +100,13 @@ protected: int lv_pixmap, lv_filename, lv_resume, lv_count, lv_progress; int lv_total, lv_speed, lv_remaining, lv_url; - QPtrList < QPixmap > animConn; - QPtrList < QPixmap > animTry; - QPixmap pixQueued; - QPixmap pixScheduled; - QPixmap pixDelayed; - QPixmap pixFinished; - QPixmap pixRetrying; + TQPtrList < TQPixmap > animConn; + TQPtrList < TQPixmap > animTry; + TQPixmap pixQueued; + TQPixmap pixScheduled; + TQPixmap pixDelayed; + TQPixmap pixFinished; + TQPixmap pixRetrying; uint phasesNum; uint jobid; |