summaryrefslogtreecommitdiffstats
path: root/kget/kmainwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kget/kmainwidget.cpp')
-rw-r--r--kget/kmainwidget.cpp186
1 files changed, 93 insertions, 93 deletions
diff --git a/kget/kmainwidget.cpp b/kget/kmainwidget.cpp
index 01fc48c4..6e830d67 100644
--- a/kget/kmainwidget.cpp
+++ b/kget/kmainwidget.cpp
@@ -129,7 +129,7 @@ KMainWidget::KMainWidget(bool bStartDocked)
{
KConfig cfg( "kioslaverc", false, false);
- cfg.setGroup(TQString::null);
+ cfg.setGroup(TQString());
cfg.writeEntry("AutoResume", true);
cfg.sync();
}
@@ -142,8 +142,8 @@ KMainWidget::KMainWidget(bool bStartDocked)
kmain = this;
// Set log time, needed for the name of log file
- TQDate date = TQDateTime::currentDateTime().date();
- TQTime time = TQDateTime::currentDateTime().time();
+ TQDate date = TQDateTime::tqcurrentDateTime().date();
+ TQTime time = TQDateTime::tqcurrentDateTime().time();
TQString tmp;
tmp.sprintf("log%d:%d:%d-%d:%d:%d", date.day(), date.month(), date.year(), time.hour(), time.minute(), time.second());
@@ -151,7 +151,7 @@ KMainWidget::KMainWidget(bool bStartDocked)
logFileName = locateLocal("appdata", "logs/");
logFileName += tmp;
- lastClipboard = TQApplication::clipboard()->text( QClipboard::Clipboard ).stripWhiteSpace();
+ lastClipboard = TQApplication::tqclipboard()->text( TQClipboard::Clipboard ).stripWhiteSpace();
// Load all settings from KConfig
ksettings.load();
@@ -223,7 +223,7 @@ KMainWidget::KMainWidget(bool bStartDocked)
kdock = new DockWidget(this);
connect(kdock, TQT_SIGNAL(quitSelected()), TQT_SLOT(slotQuit()));
- // Set geometry
+ // Set tqgeometry
if (ksettings.mainPosition.x() != -1) {
resize(ksettings.mainSize);
move(ksettings.mainPosition);
@@ -253,7 +253,7 @@ KMainWidget::KMainWidget(bool bStartDocked)
setCaption(i18n("Offline"), false);
log(i18n("Starting offline"));
} else
- setCaption(TQString::null, false);
+ setCaption(TQString(), false);
m_paAutoPaste->setChecked(ksettings.b_autoPaste);
m_paShowLog->setChecked(b_viewLogWindow);
@@ -342,65 +342,65 @@ void KMainWidget::setupGUI()
connect(myTransferList, TQT_SIGNAL(popupMenu(Transfer *)), this, TQT_SLOT(slotPopupMenu(Transfer *)));
// file actions
- m_paOpenTransfer = KStdAction::open(this, TQT_SLOT(slotOpenTransfer()), coll, "open_transfer");
- m_paPasteTransfer = KStdAction::paste(this, TQT_SLOT(slotPasteTransfer()), coll, "paste_transfer");
+ m_paOpenTransfer = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(slotOpenTransfer()), coll, "open_transfer");
+ m_paPasteTransfer = KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(slotPasteTransfer()), coll, "paste_transfer");
- 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_paExportTransfers = new KAction(i18n("&Export Transfer List..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotExportTransfers()), coll, "export_transfers");
+ m_paImportTransfers = new KAction(i18n("&Import Transfer List..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportTransfers()), coll, "import_transfers");
- m_paImportText = new KAction(i18n("Import Text &File..."), 0, this, TQT_SLOT(slotImportTextFile()), coll, "import_text");
+ m_paImportText = new KAction(i18n("Import Text &File..."), 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportTextFile()), coll, "import_text");
- m_paQuit = KStdAction::quit(this, TQT_SLOT(slotQuit()), coll, "quit");
+ m_paQuit = KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotQuit()), coll, "quit");
// transfer actions
- 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_paCopy = new KAction(i18n("&Copy URL to Clipboard"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotCopyToClipboard()), coll, "copy_url");
+ m_paIndividual = new KAction(i18n("&Open Individual Window"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotOpenIndividual()), coll, "open_individual");
- m_paMoveToBegin = new KAction(i18n("Move to &Beginning"), 0, this, TQT_SLOT(slotMoveToBegin()), coll, "move_begin");
+ m_paMoveToBegin = new KAction(i18n("Move to &Beginning"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotMoveToBegin()), coll, "move_begin");
- m_paMoveToEnd = new KAction(i18n("Move to &End"), 0, this, TQT_SLOT(slotMoveToEnd()), coll, "move_end");
+ m_paMoveToEnd = new KAction(i18n("Move to &End"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotMoveToEnd()), coll, "move_end");
#ifdef _DEBUG
sDebug << "Loading pics" << endl;
#endif
- 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_paResume = new KAction(i18n("&Resume"),"tool_resume", 0, TQT_TQOBJECT(this), TQT_SLOT(slotResumeCurrent()), coll, "resume");
+ m_paPause = new KAction(i18n("&Pause"),"tool_pause", 0, TQT_TQOBJECT(this), TQT_SLOT(slotPauseCurrent()), coll, "pause");
+ m_paDelete = new KAction(i18n("&Delete"),"editdelete", TQt::Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(slotDeleteCurrent()), coll, "delete");
+ m_paRestart = new KAction(i18n("Re&start"),"tool_restart", 0, TQT_TQOBJECT(this), TQT_SLOT(slotRestartCurrent()), coll, "restart");
- 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 = new KRadioAction(i18n("&Queue"),"tool_queue", 0, TQT_TQOBJECT(this), TQT_SLOT(slotQueueCurrent()), coll, "queue");
+ m_paTimer = new KRadioAction(i18n("&Timer"),"tool_timer", 0, TQT_TQOBJECT(this), TQT_SLOT(slotTimerCurrent()), coll, "timer");
+ m_paDelay = new KRadioAction(i18n("De&lay"),"tool_delay", 0, TQT_TQOBJECT(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, 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_paUseAnimation = new KToggleAction(i18n("Use &Animation"), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleAnimation()), coll, "toggle_animation");
+ m_paExpertMode = new KToggleAction(i18n("&Expert Mode"),"tool_expert", 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleExpertMode()), coll, "expert_mode");
+ m_paUseLastDir = new KToggleAction(i18n("&Use-Last-Folder Mode"),"tool_uselastdir", 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleUseLastDir()), coll, "use_last_dir");
+ m_paAutoDisconnect = new KToggleAction(i18n("Auto-&Disconnect Mode"),"tool_disconnect", 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleAutoDisconnect()), coll, "auto_disconnect");
+ m_paAutoShutdown = new KToggleAction(i18n("Auto-S&hutdown Mode"), "tool_shutdown", 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleAutoShutdown()), coll, "auto_shutdown");
+ m_paOfflineMode = new KToggleAction(i18n("&Offline Mode"),"tool_offline_mode_off", 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleOfflineMode()), coll, "offline_mode");
+ m_paAutoPaste = new KToggleAction(i18n("Auto-Pas&te Mode"),"tool_clipboard", 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleAutoPaste()), coll, "auto_paste");
- m_paPreferences = KStdAction::preferences(this, TQT_SLOT(slotPreferences()), coll);
+ m_paPreferences = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotPreferences()), coll);
KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), coll);
- KStdAction::configureToolbars(this, TQT_SLOT(slotConfigureToolbars()), coll);
- KStdAction::configureNotifications(this, TQT_SLOT(slotConfigureNotifications()), coll);
+ KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureToolbars()), coll);
+ KStdAction::configureNotifications(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureNotifications()), coll);
- m_menubarAction = KStdAction::showMenubar(this, TQT_SLOT(slotShowMenubar()), coll, "settings_showmenubar" );
+ m_menubarAction = KStdAction::showMenubar(TQT_TQOBJECT(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, TQT_SLOT(slotToggleLogWindow()), coll, "toggle_log");
+ m_paShowLog = new KToggleAction(i18n("Show &Log Window"),"tool_logwindow", 0, TQT_TQOBJECT(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, 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");
+ m_paDropTarget = new KAction(i18n("Show Drop &Target"),"tool_drop_target", 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleDropTarget()), coll, "drop_target");
+ m_paKonquerorIntegration = new KAction(i18n("Enable &KGet as Konqueror Download Manager"), "konqueror", 0, TQT_TQOBJECT(this), TQT_SLOT(slotKonquerorIntegration()), coll, "konqueror_integration");
if (ksettings.b_KonquerorIntegration) {
m_paKonquerorIntegration->setText(i18n("Disable &KGet as Konqueror Download Manager"));
}
@@ -411,11 +411,11 @@ void KMainWidget::setupGUI()
createGUI("kgetui.rc");
// setup statusbar
- statusBar()->insertFixedItem(i18n(" Transfers: %1 ").arg(99), ID_TOTAL_TRANSFERS);
- statusBar()->insertFixedItem(i18n(" Files: %1 ").arg(555), ID_TOTAL_FILES);
- statusBar()->insertFixedItem(i18n(" Size: %1 KB ").arg("134.56"), ID_TOTAL_SIZE);
- statusBar()->insertFixedItem(i18n(" Time: %1 ").arg(KIO::convertSeconds(0)), ID_TOTAL_TIME);
- statusBar()->insertFixedItem(i18n(" %1 KB/s ").arg("123.34"), ID_TOTAL_SPEED);
+ statusBar()->insertFixedItem(i18n(" Transfers: %1 ").tqarg(99), ID_TOTAL_TRANSFERS);
+ statusBar()->insertFixedItem(i18n(" Files: %1 ").tqarg(555), ID_TOTAL_FILES);
+ statusBar()->insertFixedItem(i18n(" Size: %1 KB ").tqarg("134.56"), ID_TOTAL_SIZE);
+ statusBar()->insertFixedItem(i18n(" Time: %1 ").tqarg(KIO::convertSeconds(0)), ID_TOTAL_TIME);
+ statusBar()->insertFixedItem(i18n(" %1 KB/s ").tqarg("123.34"), ID_TOTAL_SPEED);
setAutoSaveSettings( "MainWindow", false /*Settings takes care of size & pos & state */ );
@@ -485,7 +485,7 @@ void KMainWidget::setupWhatsThis()
tmp = i18n("<b>Auto paste</b> button toggles the auto-paste mode\n" "on and off.\n" "\n" "When set, KGet will periodically scan the clipboard\n" "for URLs and paste them automatically.");
m_paAutoPaste->setWhatsThis(tmp);
- tmp = i18n("<b>Drop target</b> button toggles the window style\n" "between a normal window and a drop target.\n" "\n" "When set, the main window will be hidden and\n" "instead a small shaped window will appear.\n" "\n" "You can show/hide a normal window with a simple click\n" "on a shaped window.");
+ tmp = i18n("<b>Drop target</b> button toggles the window style\n" "between a normal window and a drop target.\n" "\n" "When set, the main window will be hidden and\n" "instead a small tqshaped window will appear.\n" "\n" "You can show/hide a normal window with a simple click\n" "on a tqshaped window.");
m_paDropTarget->setWhatsThis(tmp);
/*
tmp = i18n("<b>Dock widget</b> button toggles the window style\n" "between a normal window and a docked widget.\n" "\n" "When set, the main window will be hidden and\n" "instead a docked widget will appear on the panel.\n" "\n" "You can show/hide a normal window by simply clicking\n" "on a docked widget.");
@@ -555,7 +555,7 @@ void KMainWidget::slotImportTextFile()
list = kFileToString(filename.path()); // file not accessible -> give error message
i = 0;
- while ((j = list.find('\n', i)) != -1) {
+ while ((j = list.tqfind('\n', i)) != -1) {
TQString newtransfer = list.mid(i, j - i);
addTransfer(newtransfer);
i = j + 1;
@@ -708,7 +708,7 @@ void KMainWidget::slotQuit()
for (; it.current(); ++it) {
item = it.current();
- if (item->getStatus() == Transfer::ST_RUNNING && !ksettings.b_expertMode) {
+ if (item->gettqStatus() == Transfer::ST_RUNNING && !ksettings.b_expertMode) {
if (KMessageBox::warningContinueCancel(this, i18n("Some transfers are still running.\nAre you sure you want to quit KGet?"), i18n("Warning"), KStdGuiItem::quit()) != KMessageBox::Continue) {
#ifdef _DEBUG
sDebugOut << endl;
@@ -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 ),
- TQString::null, "completedBeforeDeletion" );
+ TQString(), "completedBeforeDeletion" );
#ifdef _DEBUG
sDebugOut << endl;
@@ -876,10 +876,10 @@ void KMainWidget::stopAll()
log(i18n("Stopping all jobs"), false);
TransferIterator it(myTransferList);
- Transfer::TransferStatus Status;
+ Transfer::TransfertqStatus tqStatus;
for (; it.current(); ++it) {
- Status = it.current()->getStatus();
- if (Status == Transfer::ST_TRYING || Status == Transfer::ST_RUNNING)
+ tqStatus = it.current()->gettqStatus();
+ if (tqStatus == Transfer::ST_TRYING || tqStatus == Transfer::ST_RUNNING)
it.current()->slotStop();
}
slotUpdateActions();
@@ -977,7 +977,7 @@ void KMainWidget::slotOpenTransfer()
KURL url = KURL::fromPathOrURL(newtransfer);
if (!url.isValid()) {
- KMessageBox::error(this, i18n("Malformed URL:\n%1").arg(newtransfer), i18n("Error"));
+ KMessageBox::error(this, i18n("Malformed URL:\n%1").tqarg(newtransfer), i18n("Error"));
ok = false;
}
}
@@ -997,7 +997,7 @@ void KMainWidget::slotCheckClipboard()
//sDebugIn << endl;
#endif
- TQString clipData = TQApplication::clipboard()->text( QClipboard::Clipboard ).stripWhiteSpace();
+ TQString clipData = TQApplication::tqclipboard()->text( TQClipboard::Clipboard ).stripWhiteSpace();
if (clipData != lastClipboard) {
sDebug << "New clipboard event" << endl;
@@ -1026,7 +1026,7 @@ void KMainWidget::slotPasteTransfer()
TQString newtransfer;
- newtransfer = TQApplication::clipboard()->text();
+ newtransfer = TQApplication::tqclipboard()->text();
newtransfer = newtransfer.stripWhiteSpace();
if (!ksettings.b_expertMode) {
@@ -1079,7 +1079,7 @@ void KMainWidget::addTransferEx(const KURL& url, const KURL& destFile)
{
if (!b_expertMode) {
// open the filedialog for confirmation
- KFileDialog dlg( destDir, TQString::null,
+ KFileDialog dlg( destDir, TQString(),
0L, "save_as", true);
dlg.setCaption(i18n("Save As"));
dlg.setOperationMode(KFileDialog::Saving);
@@ -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()), TQString::null, i18n("Overwrite"), i18n("Do Not Overwrite") )
+ if (KMessageBox::warningYesNo(this,i18n("Destination file \n%1\nalready exists.\nDo you want to overwrite it?").tqarg( destURL.prettyURL()), TQString(), i18n("Overwrite"), i18n("Do Not Overwrite") )
== KMessageBox::Yes)
{
bDestisMalformed=false;
@@ -1141,7 +1141,7 @@ void KMainWidget::addTransferEx(const KURL& url, const KURL& destFile)
// create a new transfer item
Transfer *item = myTransferList->addTransfer(url, destURL);
- KNotifyClient::event(kdock->winId(), "added", i18n("<i>%1</i> has been added.").arg(url.prettyURL()));
+ KNotifyClient::event(kdock->winId(), "added", i18n("<i>%1</i> has been added.").tqarg(url.prettyURL()));
item->updateAll(); // update the remaining fields
if (ksettings.b_showIndividual)
@@ -1192,7 +1192,7 @@ void KMainWidget::addTransfers( const KURL::List& src, const TQString& 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()), TQString::null, i18n("Overwrite"), i18n("Do Not Overwrite") )
+ if (KMessageBox::warningYesNo(this,i18n("Destination file \n%1\nalready exists.\nDo you want to overwrite it?").tqarg( destURL.prettyURL()), TQString(), i18n("Overwrite"), i18n("Do Not Overwrite") )
== KMessageBox::Yes)
{
SafeDelete::deleteFile( destURL );
@@ -1360,7 +1360,7 @@ void KMainWidget::checkQueue()
// count running transfers
for (; it.current(); ++it) {
- status = it.current()->getStatus();
+ status = it.current()->gettqStatus();
if (status == Transfer::ST_RUNNING || status == Transfer::ST_TRYING)
numRun++;
}
@@ -1370,9 +1370,9 @@ void KMainWidget::checkQueue()
bool isQuequed;
for (; it.current() && numRun < ksettings.maxSimultaneousConnections; ++it) {
item = it.current();
- isRunning = (item->getStatus() == Transfer::ST_RUNNING) || ((item->getStatus() == Transfer::ST_TRYING));
+ isRunning = (item->gettqStatus() == Transfer::ST_RUNNING) || ((item->gettqStatus() == Transfer::ST_TRYING));
- isQuequed = (item->getMode() == Transfer::MD_QUEUED || item->getMode() == Transfer::MD_NEW);
+ isQuequed = (item->getMode() == Transfer::MD_TQUEUED || item->getMode() == Transfer::MD_NEW);
if (!isRunning && isQuequed && !ksettings.b_offline)
{
@@ -1394,7 +1394,7 @@ void KMainWidget::checkQueue()
for (; it.current(); ++it)
{
item = it.current();
- if (item->getMode() == Transfer::MD_NEW && item->getStatus() == Transfer::ST_STOPPED)
+ if (item->getMode() == Transfer::MD_NEW && item->gettqStatus() == Transfer::ST_STOPPED)
{
item->checkCache();
}
@@ -1420,7 +1420,7 @@ void KMainWidget::slotAnimTimeout()
animCounter = 0;
}
// update status of all items of transferList
- isTransfer = myTransferList->updateStatus(animCounter);
+ isTransfer = myTransferList->updatetqStatus(animCounter);
//if (this->isVisible()) {
updateStatusBar();
@@ -1445,8 +1445,8 @@ void KMainWidget::slotTransferTimeout()
for (; it.current(); ++it) {
item = it.current();
- if (item->getMode() == Transfer::MD_SCHEDULED && item->getStartTime() <= TQDateTime::currentDateTime()) {
- item->setMode(Transfer::MD_QUEUED);
+ if (item->getMode() == Transfer::MD_SCHEDULED && item->getStartTime() <= TQDateTime::tqcurrentDateTime()) {
+ item->setMode(Transfer::MD_TQUEUED);
flag = true;
}
}
@@ -1455,7 +1455,7 @@ void KMainWidget::slotTransferTimeout()
checkQueue();
}
- if (ksettings.b_autoDisconnect && ksettings.b_timedDisconnect && ksettings.disconnectTime <= TQTime::currentTime() && ksettings.disconnectDate == TQDate::currentDate()) {
+ if (ksettings.b_autoDisconnect && ksettings.b_timedDisconnect && ksettings.disconnectTime <= TQTime::currentTime() && ksettings.disconnectDate == TQDate::tqcurrentDate()) {
onlineDisconnect();
}
@@ -1511,7 +1511,7 @@ void KMainWidget::slotStatusChanged(Transfer * item, int _operation)
}
else
{
- KNotifyClient::event(kdock->winId(), "finished", i18n("<i>%1</i> successfully downloaded.").arg(srcurl));
+ KNotifyClient::event(kdock->winId(), "finished", i18n("<i>%1</i> successfully downloaded.").tqarg(srcurl));
}
if ( item )
@@ -1533,7 +1533,7 @@ void KMainWidget::slotStatusChanged(Transfer * item, int _operation)
case Transfer::OP_ABORTED:
break;
case Transfer::OP_DELAYED:
- case Transfer::OP_QUEUED:
+ case Transfer::OP_TQUEUED:
slotUpdateActions();
item->slotUpdateActions();
break;
@@ -1593,9 +1593,9 @@ void KMainWidget::slotCopyToClipboard()
if (item) {
TQString url = item->getSrc().url();
- QClipboard *cb = TQApplication::clipboard();
- cb->setText( url, QClipboard::Selection );
- cb->setText( url, QClipboard::Clipboard);
+ TQClipboard *cb = TQApplication::tqclipboard();
+ cb->setText( url, TQClipboard::Selection );
+ cb->setText( url, TQClipboard::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(TQString::null, false);
+ setCaption(TQString(), false);
m_paOfflineMode->setIconSet(LOAD_ICON("tool_offline_mode_on"));
}
@@ -2040,7 +2040,7 @@ void KMainWidget::slotUpdateActions()
sDebug << "-->ONLINE= " << ksettings.b_offline << endl;
#endif
if (item == first_item && !ksettings.b_offline) {
- switch (item->getStatus()) {
+ switch (item->gettqStatus()) {
case Transfer::ST_TRYING:
case Transfer::ST_RUNNING:
m_paResume->setEnabled(false);
@@ -2052,7 +2052,7 @@ void KMainWidget::slotUpdateActions()
m_paPause->setEnabled(false);
m_paRestart->setEnabled(false);
#ifdef _DEBUG
- sDebug << "STATUS IS stopped" << item->getStatus() << endl;
+ sDebug << "STATUS IS stopped" << item->gettqStatus() << endl;
#endif
break;
case Transfer::ST_FINISHED:
@@ -2064,7 +2064,7 @@ void KMainWidget::slotUpdateActions()
} //end switch
- } else if (item->getStatus() != first_item->getStatus()) {
+ } else if (item->gettqStatus() != first_item->gettqStatus()) {
// disable all when all selected items don't have the same status
m_paResume->setEnabled(false);
m_paPause->setEnabled(false);
@@ -2076,15 +2076,15 @@ void KMainWidget::slotUpdateActions()
m_paDelete->setEnabled(true);
m_paCopy->setEnabled(true);
m_paIndividual->setEnabled(true);
- if (item->getStatus() != Transfer::ST_FINISHED) {
+ if (item->gettqStatus() != Transfer::ST_FINISHED) {
m_paQueue->setEnabled(true);
m_paTimer->setEnabled(true);
m_paDelay->setEnabled(true);
switch (item->getMode()) {
- case Transfer::MD_QUEUED:
+ case Transfer::MD_TQUEUED:
#ifdef _DEBUG
- sDebug << "....................THE MODE IS MD_QUEUED " << item->getMode() << endl;
+ sDebug << "....................THE MODE IS MD_TQUEUED " << item->getMode() << endl;
#endif
m_paQueue->setChecked(true);
break;
@@ -2166,11 +2166,11 @@ void KMainWidget::updateStatusBar()
}
}
- statusBar()->changeItem(i18n(" Transfers: %1 ").arg(myTransferList->childCount()), ID_TOTAL_TRANSFERS);
- statusBar()->changeItem(i18n(" Files: %1 ").arg(totalFiles), ID_TOTAL_FILES);
- statusBar()->changeItem(i18n(" Size: %1 ").arg(KIO::convertSize(totalSize)), ID_TOTAL_SIZE);
- statusBar()->changeItem(i18n(" Time: %1 ").arg(KIO::convertSeconds(remTime)), ID_TOTAL_TIME);
- statusBar()->changeItem(i18n(" %1/s ").arg(KIO::convertSize(totalSpeed)), ID_TOTAL_SPEED);
+ statusBar()->changeItem(i18n(" Transfers: %1 ").tqarg(myTransferList->childCount()), ID_TOTAL_TRANSFERS);
+ statusBar()->changeItem(i18n(" Files: %1 ").tqarg(totalFiles), ID_TOTAL_FILES);
+ statusBar()->changeItem(i18n(" Size: %1 ").tqarg(KIO::convertSize(totalSize)), ID_TOTAL_SIZE);
+ statusBar()->changeItem(i18n(" Time: %1 ").tqarg(KIO::convertSeconds(remTime)), ID_TOTAL_TIME);
+ statusBar()->changeItem(i18n(" %1/s ").tqarg(KIO::convertSize(totalSpeed)), ID_TOTAL_SPEED);
//update size for each statusbar field
statusBar()->setItemFixed(ID_TOTAL_TRANSFERS, -1);
statusBar()->setItemFixed(ID_TOTAL_FILES, -1);
@@ -2179,11 +2179,11 @@ void KMainWidget::updateStatusBar()
statusBar()->setItemFixed(ID_TOTAL_SPEED, -1);
if (kdock) {
- tmpstr = i18n("<b>Transfers:</b> %1 ").arg(myTransferList->childCount()) +
- i18n("<br /><b>Files:</b> %1 ").arg(totalFiles) +
- i18n("<br /><b>Size:</b> %1 ").arg(KIO::convertSize(totalSize)) +
- i18n("<br /><b>Time:</b> %1 ").arg(KIO::convertSeconds(remTime)) +
- i18n("<br /><b>Speed:</b> %1/s").arg(KIO::convertSize(totalSpeed));
+ tmpstr = i18n("<b>Transfers:</b> %1 ").tqarg(myTransferList->childCount()) +
+ i18n("<br /><b>Files:</b> %1 ").tqarg(totalFiles) +
+ i18n("<br /><b>Size:</b> %1 ").tqarg(KIO::convertSize(totalSize)) +
+ i18n("<br /><b>Time:</b> %1 ").tqarg(KIO::convertSeconds(remTime)) +
+ i18n("<br /><b>Speed:</b> %1/s").tqarg(KIO::convertSize(totalSpeed));
kdock->updateToolTip( tmpstr );
//trayicon changes if download is in progress
if (totalSpeed == 0)
@@ -2239,7 +2239,7 @@ void KMainWidget::slotCheckConnection()
if (b_connected != old) {
if (b_connected) {
log(i18n("We are online."));
- setCaption(TQString::null, false);
+ setCaption(TQString(), false);
ksettings.b_offline=ksettings.b_offlineMode;
checkQueue();
} else {
@@ -2461,19 +2461,19 @@ bool KMainWidget::sanityChecksSuccessful( const KURL& url )
if (!url.isValid() || !KProtocolInfo::supportsReading( url ) )
{
if (!ksettings.b_expertMode)
- KMessageBox::error(this, i18n("Malformed URL:\n%1").arg(url.prettyURL()), i18n("Error"));
+ KMessageBox::error(this, i18n("Malformed URL:\n%1").tqarg(url.prettyURL()), i18n("Error"));
return false;
}
// if we find this URL in the list
- Transfer *transfer = myTransferList->find( url );
+ Transfer *transfer = myTransferList->tqfind( url );
if ( transfer )
{
- if ( transfer->getStatus() != Transfer::ST_FINISHED )
+ if ( transfer->gettqStatus() != Transfer::ST_FINISHED )
{
if ( !ksettings.b_expertMode )
{
- KMessageBox::error(this, i18n("Already saving URL\n%1").arg(url.prettyURL()), i18n("Error"));
+ KMessageBox::error(this, i18n("Already saving URL\n%1").tqarg(url.prettyURL()), i18n("Error"));
}
transfer->showIndividual();
@@ -2483,7 +2483,7 @@ bool KMainWidget::sanityChecksSuccessful( const KURL& url )
else // transfer is finished, ask if we want to download again
{
if ( ksettings.b_expertMode ||
- (KMessageBox::questionYesNo(this, i18n("Already saved URL\n%1\nDownload again?").arg(url.prettyURL()),i18n("Question"),i18n("Download Again"),KStdGuiItem::cancel() )
+ (KMessageBox::questionYesNo(this, i18n("Already saved URL\n%1\nDownload again?").tqarg(url.prettyURL()),i18n("Question"),i18n("Download Again"),KStdGuiItem::cancel() )
== KMessageBox::Yes) )
{
transfer->slotRequestRemove();
@@ -2498,7 +2498,7 @@ bool KMainWidget::sanityChecksSuccessful( const KURL& url )
// why restrict this to ftp and http? (pfeiffer)
// // don't download file URL's TODO : uncomment?
// if (url.protocol() == "http" && url.protocol() != "ftp") {
-// KMessageBox::error(this, i18n("File protocol not accepted!\n%1").arg(url.prettyURL()), i18n("Error"));
+// KMessageBox::error(this, i18n("File protocol not accepted!\n%1").tqarg(url.prettyURL()), i18n("Error"));
// #ifdef _DEBUG
// sDebugOut << endl;
// #endif