summaryrefslogtreecommitdiffstats
path: root/kftpgrabber/src/widgets/browser
diff options
context:
space:
mode:
Diffstat (limited to 'kftpgrabber/src/widgets/browser')
-rw-r--r--kftpgrabber/src/widgets/browser/actions.cpp136
-rw-r--r--kftpgrabber/src/widgets/browser/actions.h84
-rw-r--r--kftpgrabber/src/widgets/browser/detailsview.cpp116
-rw-r--r--kftpgrabber/src/widgets/browser/detailsview.h40
-rw-r--r--kftpgrabber/src/widgets/browser/dirlister.cpp22
-rw-r--r--kftpgrabber/src/widgets/browser/dirlister.h6
-rw-r--r--kftpgrabber/src/widgets/browser/filterwidget.cpp22
-rw-r--r--kftpgrabber/src/widgets/browser/filterwidget.h14
-rw-r--r--kftpgrabber/src/widgets/browser/locationnavigator.cpp4
-rw-r--r--kftpgrabber/src/widgets/browser/locationnavigator.h16
-rw-r--r--kftpgrabber/src/widgets/browser/propsplugin.cpp102
-rw-r--r--kftpgrabber/src/widgets/browser/propsplugin.h8
-rw-r--r--kftpgrabber/src/widgets/browser/treeview.cpp90
-rw-r--r--kftpgrabber/src/widgets/browser/treeview.h48
-rw-r--r--kftpgrabber/src/widgets/browser/view.cpp72
-rw-r--r--kftpgrabber/src/widgets/browser/view.h48
16 files changed, 414 insertions, 414 deletions
diff --git a/kftpgrabber/src/widgets/browser/actions.cpp b/kftpgrabber/src/widgets/browser/actions.cpp
index cc9fc8c..bb7c260 100644
--- a/kftpgrabber/src/widgets/browser/actions.cpp
+++ b/kftpgrabber/src/widgets/browser/actions.cpp
@@ -54,23 +54,23 @@
#include "misc/filter.h"
#include "misc/customcommands/manager.h"
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <kcharsets.h>
-#include <kapplication.h>
-#include <kmainwindow.h>
-#include <klocale.h>
-#include <kmessagebox.h>
-#include <kpopupmenu.h>
+#include <tdeapplication.h>
+#include <tdemainwindow.h>
+#include <tdelocale.h>
+#include <tdemessagebox.h>
+#include <tdepopupmenu.h>
#include <kinputdialog.h>
#include <kpropertiesdialog.h>
-#include <kio/job.h>
+#include <tdeio/job.h>
#include <kshred.h>
#include <klineedit.h>
-#include <kfiledialog.h>
+#include <tdefiledialog.h>
#include <kstandarddirs.h>
-#include <qdir.h>
-#include <qclipboard.h>
+#include <ntqdir.h>
+#include <ntqclipboard.h>
using namespace KFTPGrabberBase;
using namespace KFTPEngine;
@@ -82,14 +82,14 @@ namespace KFTPWidgets {
namespace Browser {
Actions::Actions(View *parent)
- : QObject(parent),
+ : TQObject(parent),
m_view(parent)
{
}
void Actions::initActions()
{
- m_actionCollection = new KActionCollection(m_view, this);
+ m_actionCollection = new TDEActionCollection(m_view, this);
// Create all the actions
m_goUpAction = KStdAction::up(this, SLOT(slotGoUp()), m_actionCollection, "go_up");
@@ -99,45 +99,45 @@ void Actions::initActions()
m_reloadAction = KStdAction::redisplay(this, SLOT(slotReload()), m_actionCollection, "reload");
m_reloadAction->setText(i18n("&Reload"));
- m_reloadAction->setShortcut(KShortcut(Qt::Key_F5));
+ m_reloadAction->setShortcut(TDEShortcut(TQt::Key_F5));
- m_abortAction = new KAction(i18n("&Abort"), "stop", KShortcut(), this, SLOT(slotAbort()), m_actionCollection, "abort");
- m_toggleTreeViewAction = new KToggleAction(i18n("&Show Tree View"), "view_tree", KShortcut(), this, SLOT(slotShowHideTree()), m_actionCollection, "toggle_tree_view");
- m_toggleFilterAction = new KToggleAction(i18n("Show &Filter"), "filter", KShortcut(), this, SLOT(slotShowHideFilter()), m_actionCollection, "toggle_filter");
+ m_abortAction = new TDEAction(i18n("&Abort"), "stop", TDEShortcut(), this, SLOT(slotAbort()), m_actionCollection, "abort");
+ m_toggleTreeViewAction = new TDEToggleAction(i18n("&Show Tree View"), "view_tree", TDEShortcut(), this, SLOT(slotShowHideTree()), m_actionCollection, "toggle_tree_view");
+ m_toggleFilterAction = new TDEToggleAction(i18n("Show &Filter"), "filter", TDEShortcut(), this, SLOT(slotShowHideFilter()), m_actionCollection, "toggle_filter");
- m_renameAction = new KAction(i18n("&Rename"), KShortcut(Qt::Key_F2), this, SLOT(slotRename()), m_actionCollection, "edit_rename");
- m_deleteAction = new KAction(i18n("&Delete"), "editdelete", KShortcut(Qt::Key_Delete), this, SLOT(slotDelete()), m_actionCollection, "edit_delete");
- m_propsAction = new KAction(i18n("&Properties"), KShortcut(), this, SLOT(slotProps()), m_actionCollection, "edit_properties");
- m_shredAction = new KAction(i18n("&Shred"), "editshred", KShortcut(), this, SLOT(slotShred()), m_actionCollection, "edit_shred");
+ m_renameAction = new TDEAction(i18n("&Rename"), TDEShortcut(TQt::Key_F2), this, SLOT(slotRename()), m_actionCollection, "edit_rename");
+ m_deleteAction = new TDEAction(i18n("&Delete"), "editdelete", TDEShortcut(TQt::Key_Delete), this, SLOT(slotDelete()), m_actionCollection, "edit_delete");
+ m_propsAction = new TDEAction(i18n("&Properties"), TDEShortcut(), this, SLOT(slotProps()), m_actionCollection, "edit_properties");
+ m_shredAction = new TDEAction(i18n("&Shred"), "editshred", TDEShortcut(), this, SLOT(slotShred()), m_actionCollection, "edit_shred");
m_copyAction = KStdAction::copy(this, SLOT(slotCopy()), m_actionCollection, "edit_copy");
m_pasteAction = KStdAction::paste(this, SLOT(slotPaste()), m_actionCollection, "edit_paste");
- m_filterActions = new KActionMenu(i18n("&Filter Options"), "", m_actionCollection, "edit_filter_options");
- m_alwaysSkipAction = new KAction(i18n("Always &skip this file when queuing"), KShortcut(), this, SLOT(slotAlwaysSkip()), m_actionCollection);
- m_topPriorityAction = new KAction(i18n("Make this file &top priority"), KShortcut(), this, SLOT(slotTopPriority()), m_actionCollection);
- m_lowPriorityAction = new KAction(i18n("Make this file &lowest priority"), KShortcut(), this, SLOT(slotLowPriority()), m_actionCollection);
+ m_filterActions = new TDEActionMenu(i18n("&Filter Options"), "", m_actionCollection, "edit_filter_options");
+ m_alwaysSkipAction = new TDEAction(i18n("Always &skip this file when queuing"), TDEShortcut(), this, SLOT(slotAlwaysSkip()), m_actionCollection);
+ m_topPriorityAction = new TDEAction(i18n("Make this file &top priority"), TDEShortcut(), this, SLOT(slotTopPriority()), m_actionCollection);
+ m_lowPriorityAction = new TDEAction(i18n("Make this file &lowest priority"), TDEShortcut(), this, SLOT(slotLowPriority()), m_actionCollection);
m_filterActions->insert(m_alwaysSkipAction);
m_filterActions->insert(m_topPriorityAction);
m_filterActions->insert(m_lowPriorityAction);
- m_transferAction = new KAction(i18n("&Transfer"), KShortcut(), this, SLOT(slotTransfer()), m_actionCollection, "transfer");
- m_queueTransferAction = new KAction(i18n("&Queue Transfer"), "queue", KShortcut(), this, SLOT(slotQueueTransfer()), m_actionCollection, "queue_transfer");
- m_createDirAction = new KAction(i18n("&Create Directory..."), "folder_new", KShortcut(), this, SLOT(slotCreateDir()), m_actionCollection, "create_dir");
- m_fileEditAction = new KAction(i18n("&Open file"), "fileopen", KShortcut(), this, SLOT(slotFileEdit()), m_actionCollection, "open_file");
- m_verifyAction = new KAction(i18n("&Verify..."), "ok", KShortcut(), this, SLOT(slotVerify()), m_actionCollection, "verify");
+ m_transferAction = new TDEAction(i18n("&Transfer"), TDEShortcut(), this, SLOT(slotTransfer()), m_actionCollection, "transfer");
+ m_queueTransferAction = new TDEAction(i18n("&Queue Transfer"), "queue", TDEShortcut(), this, SLOT(slotQueueTransfer()), m_actionCollection, "queue_transfer");
+ m_createDirAction = new TDEAction(i18n("&Create Directory..."), "folder_new", TDEShortcut(), this, SLOT(slotCreateDir()), m_actionCollection, "create_dir");
+ m_fileEditAction = new TDEAction(i18n("&Open file"), "fileopen", TDEShortcut(), this, SLOT(slotFileEdit()), m_actionCollection, "open_file");
+ m_verifyAction = new TDEAction(i18n("&Verify..."), "ok", TDEShortcut(), this, SLOT(slotVerify()), m_actionCollection, "verify");
populateEncodings();
- m_moreActions = new KActionMenu(i18n("&More Actions"), "configure", this);
- m_rawCmdAction = new KAction(i18n("&Manual Command Entry..."), "openterm", KShortcut(), this, SLOT(slotRawCmd()), m_actionCollection, "send_raw_cmd");
- m_exportListingAction = new KAction(i18n("&Export Directory Listing..."), "", KShortcut(), this, SLOT(slotExportListing()), m_actionCollection, "export_listing");
- m_showHiddenFilesAction = new KToggleAction(i18n("Show &Hidden Files && Directories"), KShortcut(), this, SLOT(slotShowHiddenFiles()), m_actionCollection, "show_hidden");
- m_openExternalAction = new KAction(i18n("Open current directory in &Konqueror..."), "konqueror", KShortcut(), this, SLOT(slotOpenExternal()), m_actionCollection, "open_konqi");
+ m_moreActions = new TDEActionMenu(i18n("&More Actions"), "configure", this);
+ m_rawCmdAction = new TDEAction(i18n("&Manual Command Entry..."), "openterm", TDEShortcut(), this, SLOT(slotRawCmd()), m_actionCollection, "send_raw_cmd");
+ m_exportListingAction = new TDEAction(i18n("&Export Directory Listing..."), "", TDEShortcut(), this, SLOT(slotExportListing()), m_actionCollection, "export_listing");
+ m_showHiddenFilesAction = new TDEToggleAction(i18n("Show &Hidden Files && Directories"), TDEShortcut(), this, SLOT(slotShowHiddenFiles()), m_actionCollection, "show_hidden");
+ m_openExternalAction = new TDEAction(i18n("Open current directory in &Konqueror..."), "konqueror", TDEShortcut(), this, SLOT(slotOpenExternal()), m_actionCollection, "open_konqi");
- m_markItemsAction = new KAction(i18n("Compare &selected items"), "", KShortcut(Qt::Key_Space), this, SLOT(slotMarkItems()), m_actionCollection, "compare_selected");
- m_compareAction = new KAction(i18n("Compare &directories"), "", KShortcut(), this, SLOT(slotCompare()), m_actionCollection, "compare_dirs");
+ m_markItemsAction = new TDEAction(i18n("Compare &selected items"), "", TDEShortcut(TQt::Key_Space), this, SLOT(slotMarkItems()), m_actionCollection, "compare_selected");
+ m_compareAction = new TDEAction(i18n("Compare &directories"), "", TDEShortcut(), this, SLOT(slotCompare()), m_actionCollection, "compare_dirs");
m_showHiddenFilesAction->setChecked(KFTPCore::Config::showHiddenFiles());
@@ -158,10 +158,10 @@ void Actions::initActions()
m_moreActions->setStickyMenu(true);
m_moreActions->setDelayed(false);
- m_siteChangeAction = new KActionMenu(i18n("&Change Site"), "goto", this);
- m_quickConnectAction = new KAction(i18n("&Quick Connect..."), "connect_creating", KShortcut(), this, SLOT(slotQuickConnect()), m_actionCollection, "quick_connect");
- m_connectAction = new KActionMenu(i18n("&Connect To"), this);
- m_disconnectAction = new KAction(i18n("&Disconnect"), "connect_no", KShortcut(), this, SLOT(slotDisconnect()), m_actionCollection, "disconnect");
+ m_siteChangeAction = new TDEActionMenu(i18n("&Change Site"), "goto", this);
+ m_quickConnectAction = new TDEAction(i18n("&Quick Connect..."), "connect_creating", TDEShortcut(), this, SLOT(slotQuickConnect()), m_actionCollection, "quick_connect");
+ m_connectAction = new TDEActionMenu(i18n("&Connect To"), this);
+ m_disconnectAction = new TDEAction(i18n("&Disconnect"), "connect_no", TDEShortcut(), this, SLOT(slotDisconnect()), m_actionCollection, "disconnect");
m_siteChangeAction->insert(m_quickConnectAction);
m_siteChangeAction->insert(m_connectAction);
@@ -170,21 +170,21 @@ void Actions::initActions()
m_siteChangeAction->setDelayed(false);
// Populate bookmarks
- KFTPBookmarks::Manager::self()->guiPopulateBookmarksMenu(m_connectAction, QDomNode(), false, m_view->m_session);
+ KFTPBookmarks::Manager::self()->guiPopulateBookmarksMenu(m_connectAction, TQDomNode(), false, m_view->m_session);
}
void Actions::populateEncodings()
{
// Charsets
- m_changeEncodingAction = new KActionMenu(i18n("Change Remote &Encoding"), "charset", m_actionCollection, "changeremoteencoding");
+ m_changeEncodingAction = new TDEActionMenu(i18n("Change Remote &Encoding"), "charset", m_actionCollection, "changeremoteencoding");
m_changeEncodingAction->setDelayed(false);
- KPopupMenu *menu = m_changeEncodingAction->popupMenu();
+ TDEPopupMenu *menu = m_changeEncodingAction->popupMenu();
menu->clear();
- QStringList charsets = KGlobal::charsets()->descriptiveEncodingNames();
+ TQStringList charsets = TDEGlobal::charsets()->descriptiveEncodingNames();
int count = 0;
- for (QStringList::iterator i = charsets.begin(); i != charsets.end(); ++i)
+ for (TQStringList::iterator i = charsets.begin(); i != charsets.end(); ++i)
menu->insertItem(*i, this, SLOT(slotCharsetChanged(int)), 0, ++count);
menu->insertSeparator();
@@ -201,7 +201,7 @@ void Actions::updateActions()
// History
int index = 0;
- const QValueList<LocationNavigator::Element> list = m_view->history(index);
+ const TQValueList<LocationNavigator::Element> list = m_view->history(index);
m_goBackAction->setEnabled(index < static_cast<int>(list.count()) - 1);
m_goForwardAction->setEnabled(index > 0);
@@ -334,14 +334,14 @@ void Actions::slotRename()
KFTPWidgets::Browser::DetailsView *view = m_view->getDetailsView();
// Rename the first file in the current selection
- view->rename(view->KListView::selectedItems().at(0), 0);
+ view->rename(view->TDEListView::selectedItems().at(0), 0);
// Enhanced rename: Don't highlight the file extension. (from Konqueror)
KLineEdit *le = view->renameLineEdit();
if (le) {
- const QString txt = le->text();
- QString pattern;
+ const TQString txt = le->text();
+ TQString pattern;
KMimeType::diagnoseFileName(txt, pattern);
if (!pattern.isEmpty() && pattern.at(0) == '*' && pattern.find('*',1) == -1)
@@ -362,7 +362,7 @@ void Actions::slotDelete()
// Delete a file or directory
KURL::List selection = m_view->selectedURLs();
KURL::List::ConstIterator i = selection.begin();
- QStringList prettyList;
+ TQStringList prettyList;
for (; i != selection.end(); ++i) {
prettyList.append((*i).pathOrURL());
}
@@ -372,13 +372,13 @@ void Actions::slotDelete()
prettyList,
i18n("Delete Files"),
KStdGuiItem::del(),
- QString::null,
+ TQString::null,
KMessageBox::Dangerous) == KMessageBox::Cancel)
return;
// Go trough all files and delete them
if (!session->isRemote()) {
- KIO::del(selection);
+ TDEIO::del(selection);
} else {
KURL::List::Iterator end(selection.end());
@@ -391,17 +391,17 @@ void Actions::slotDelete()
void Actions::slotCopy()
{
- QClipboard *cb = QApplication::clipboard();
- cb->setData(m_view->getDetailsView()->dragObject(), QClipboard::Clipboard);
+ TQClipboard *cb = TQApplication::clipboard();
+ cb->setData(m_view->getDetailsView()->dragObject(), TQClipboard::Clipboard);
}
void Actions::slotPaste()
{
// Decode the data and try to init transfer
- KIO::MetaData p_meta;
+ TDEIO::MetaData p_meta;
KURL::List p_urls;
- if (KURLDrag::decode(QApplication::clipboard()->data(), p_urls, p_meta)) {
+ if (KURLDrag::decode(TQApplication::clipboard()->data(), p_urls, p_meta)) {
// Add destination url and call the QueueManager
p_meta.insert("DestURL", m_view->url().url());
KURLDrag *drag = new KURLDrag(p_urls, p_meta, m_view, name());
@@ -451,7 +451,7 @@ void Actions::addPriorityItems(int priority)
if (priority == 0) {
rule->setName(i18n("Skip '%1'").arg((*i).filename()));
const_cast<ConditionChain*>(rule->conditions())->append(new Condition(Filename, Condition::Is, (*i).filename()));
- const_cast<ActionChain*>(rule->actions())->append(new Action(Action::Skip, QVariant()));
+ const_cast<ActionChain*>(rule->actions())->append(new Action(Action::Skip, TQVariant()));
} else {
rule->setName(i18n("Priority '%1'").arg((*i).filename()));
const_cast<ConditionChain*>(rule->conditions())->append(new Condition(Filename, Condition::Is, (*i).filename()));
@@ -540,14 +540,14 @@ void Actions::slotCreateDir()
{
// Create new directory
bool ok;
- QString newDirName = KInputDialog::getText(i18n("Create Directory"), i18n("Directory name:"), "", &ok);
+ TQString newDirName = KInputDialog::getText(i18n("Create Directory"), i18n("Directory name:"), "", &ok);
if (ok) {
KURL url = m_view->url();
url.addPath(newDirName);
if (url.isLocalFile())
- KIO::mkdir(url);
+ TDEIO::mkdir(url);
else
m_view->m_ftpClient->mkdir(url);
}
@@ -564,7 +564,7 @@ void Actions::slotFileEdit()
// Create a new transfer to download the file and open it
KFTPQueue::TransferFile *transfer = new KFTPQueue::TransferFile(KFTPQueue::Manager::self());
transfer->setSourceUrl(item->url());
- transfer->setDestUrl(KURL(KGlobal::dirs()->saveLocation("tmp") + QString("%1-%2").arg(KApplication::randomString(7)).arg(item->name())));
+ transfer->setDestUrl(KURL(TDEGlobal::dirs()->saveLocation("tmp") + TQString("%1-%2").arg(TDEApplication::randomString(7)).arg(item->name())));
transfer->addSize(item->size());
transfer->setTransferType(KFTPQueue::Download);
transfer->setOpenAfterTransfer(true);
@@ -588,7 +588,7 @@ void Actions::slotAbort()
void Actions::slotRawCmd()
{
bool ok;
- QString rawCmd = KInputDialog::getText(i18n("Send Raw Command"), i18n("Command:"), "", &ok);
+ TQString rawCmd = KInputDialog::getText(i18n("Send Raw Command"), i18n("Command:"), "", &ok);
if (ok)
m_view->m_ftpClient->raw(rawCmd);
@@ -614,8 +614,8 @@ void Actions::slotShowHideFilter()
void Actions::slotCharsetChanged(int id)
{
if (!m_changeEncodingAction->popupMenu()->isItemChecked(id)) {
- QStringList charsets = KGlobal::charsets()->descriptiveEncodingNames();
- QString charset = KGlobal::charsets()->encodingForName(charsets[id - 1]);
+ TQStringList charsets = TDEGlobal::charsets()->descriptiveEncodingNames();
+ TQString charset = TDEGlobal::charsets()->encodingForName(charsets[id - 1]);
// Set the current socket's charset
m_view->m_ftpClient->socket()->changeEncoding(charset);
@@ -645,15 +645,15 @@ void Actions::slotCharsetReset(int id)
void Actions::slotExportListing()
{
- QString savePath = KFileDialog::getSaveFileName(QString::null, "*.txt|Directory Dump", 0, i18n("Export Directory Listing"));
+ TQString savePath = KFileDialog::getSaveFileName(TQString::null, "*.txt|Directory Dump", 0, i18n("Export Directory Listing"));
if (!savePath.isEmpty()) {
- QFile file(savePath);
+ TQFile file(savePath);
if (!file.open(IO_WriteOnly))
return;
- QTextStream stream(&file);
+ TQTextStream stream(&file);
KFileItemList list(*m_view->items());
KFileItemListIterator i(list);
@@ -720,7 +720,7 @@ void Actions::slotCompare()
DetailsView *oView = opposite->getFileView()->getDetailsView();
// All items in the other list view should be visible by default
- QListViewItemIterator j(oView);
+ TQListViewItemIterator j(oView);
while (j.current()) {
KFileItem *oItem = static_cast<KFileListViewItem*>(*j)->fileInfo();
oView->setItemVisibility(oItem, true);
@@ -729,7 +729,7 @@ void Actions::slotCompare()
}
// Compare the two listviews
- QListViewItemIterator i(tView);
+ TQListViewItemIterator i(tView);
while (i.current()) {
KFileItem *tItem = static_cast<KFileListViewItem*>(*i)->fileInfo();
diff --git a/kftpgrabber/src/widgets/browser/actions.h b/kftpgrabber/src/widgets/browser/actions.h
index 69434e4..6267fbe 100644
--- a/kftpgrabber/src/widgets/browser/actions.h
+++ b/kftpgrabber/src/widgets/browser/actions.h
@@ -36,8 +36,8 @@
#ifndef KFTPFILEDIRVIEWACTIONS_H
#define KFTPFILEDIRVIEWACTIONS_H
-#include <qobject.h>
-#include <kaction.h>
+#include <ntqobject.h>
+#include <tdeaction.h>
#include <krun.h>
#include <kservice.h>
#include <kuserprofile.h>
@@ -53,7 +53,7 @@ class View;
*
* @author Jernej Kos
*/
-class Actions : public QObject
+class Actions : public TQObject
{
Q_OBJECT
friend class View;
@@ -76,56 +76,56 @@ public:
*/
void updateActions();
private:
- KActionCollection *m_actionCollection;
+ TDEActionCollection *m_actionCollection;
View *m_view;
int m_curCharsetOption;
int m_defaultCharsetOption;
- KAction *m_goUpAction;
- KAction *m_goBackAction;
- KAction *m_goForwardAction;
- KAction *m_goHomeAction;
- KAction *m_reloadAction;
+ TDEAction *m_goUpAction;
+ TDEAction *m_goBackAction;
+ TDEAction *m_goForwardAction;
+ TDEAction *m_goHomeAction;
+ TDEAction *m_reloadAction;
- KAction *m_abortAction;
- KToggleAction *m_toggleTreeViewAction;
- KToggleAction *m_toggleFilterAction;
+ TDEAction *m_abortAction;
+ TDEToggleAction *m_toggleTreeViewAction;
+ TDEToggleAction *m_toggleFilterAction;
- KAction *m_renameAction;
- KAction *m_deleteAction;
- KAction *m_propsAction;
- KAction *m_shredAction;
+ TDEAction *m_renameAction;
+ TDEAction *m_deleteAction;
+ TDEAction *m_propsAction;
+ TDEAction *m_shredAction;
- KAction *m_copyAction;
- KAction *m_pasteAction;
+ TDEAction *m_copyAction;
+ TDEAction *m_pasteAction;
- KActionMenu *m_filterActions;
- KAction *m_alwaysSkipAction;
- KAction *m_topPriorityAction;
- KAction *m_lowPriorityAction;
+ TDEActionMenu *m_filterActions;
+ TDEAction *m_alwaysSkipAction;
+ TDEAction *m_topPriorityAction;
+ TDEAction *m_lowPriorityAction;
- KAction *m_transferAction;
- KAction *m_queueTransferAction;
- KAction *m_createDirAction;
- KAction *m_fileEditAction;
- KAction *m_verifyAction;
+ TDEAction *m_transferAction;
+ TDEAction *m_queueTransferAction;
+ TDEAction *m_createDirAction;
+ TDEAction *m_fileEditAction;
+ TDEAction *m_verifyAction;
- KActionMenu *m_moreActions;
- KActionMenu *m_rawCommandsMenu;
- KAction *m_rawCmdAction;
- KActionMenu *m_changeEncodingAction;
- KAction *m_exportListingAction;
- KToggleAction *m_showHiddenFilesAction;
- KAction *m_openExternalAction;
-
- KAction *m_markItemsAction;
- KAction *m_compareAction;
-
- KActionMenu *m_siteChangeAction;
- KAction *m_quickConnectAction;
- KActionMenu *m_connectAction;
- KAction *m_disconnectAction;
+ TDEActionMenu *m_moreActions;
+ TDEActionMenu *m_rawCommandsMenu;
+ TDEAction *m_rawCmdAction;
+ TDEActionMenu *m_changeEncodingAction;
+ TDEAction *m_exportListingAction;
+ TDEToggleAction *m_showHiddenFilesAction;
+ TDEAction *m_openExternalAction;
+
+ TDEAction *m_markItemsAction;
+ TDEAction *m_compareAction;
+
+ TDEActionMenu *m_siteChangeAction;
+ TDEAction *m_quickConnectAction;
+ TDEActionMenu *m_connectAction;
+ TDEAction *m_disconnectAction;
private:
/**
* Populates the encodings list.
diff --git a/kftpgrabber/src/widgets/browser/detailsview.cpp b/kftpgrabber/src/widgets/browser/detailsview.cpp
index 5206d3d..80f8588 100644
--- a/kftpgrabber/src/widgets/browser/detailsview.cpp
+++ b/kftpgrabber/src/widgets/browser/detailsview.cpp
@@ -46,10 +46,10 @@
#include "kftpqueue.h"
-#include <qheader.h>
-#include <qpainter.h>
+#include <ntqheader.h>
+#include <ntqpainter.h>
-#include <kpopupmenu.h>
+#include <tdepopupmenu.h>
#include <kurldrag.h>
using namespace KFTPCore::Filter;
@@ -58,7 +58,7 @@ namespace KFTPWidgets {
namespace Browser {
-DetailsView::DetailsView(QWidget *parent, View *view, KFTPSession::Session *session)
+DetailsView::DetailsView(TQWidget *parent, View *view, KFTPSession::Session *session)
: KFileDetailView(parent, 0),
m_view(view),
m_treeView(0),
@@ -66,7 +66,7 @@ DetailsView::DetailsView(QWidget *parent, View *view, KFTPSession::Session *sess
m_shouldDisableResize(true),
m_autoResizeEnabled(true)
{
- m_resizeTimer = new QTimer(this);
+ m_resizeTimer = new TQTimer(this);
connect(m_resizeTimer, SIGNAL(timeout()), this, SLOT(updateColumnWidths()));
m_dirLister = new DirLister(this);
@@ -82,32 +82,32 @@ DetailsView::DetailsView(QWidget *parent, View *view, KFTPSession::Session *sess
connect(m_navigator, SIGNAL(urlChanged(const KURL&)), this, SLOT(slotUrlChanged(const KURL&)));
- connect(this, SIGNAL(executed(QListViewItem*)), this, SLOT(slotItemExecuted()));
- connect(this, SIGNAL(returnPressed(QListViewItem*)), this, SLOT(slotItemExecuted()));
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)), this, SLOT(slotContextMenu(KListView*, QListViewItem*, const QPoint&)));
- connect(this, SIGNAL(itemRenamed(QListViewItem*, const QString&, int)), this, SLOT(slotItemRenamed(QListViewItem*, const QString&)));
+ connect(this, SIGNAL(executed(TQListViewItem*)), this, SLOT(slotItemExecuted()));
+ connect(this, SIGNAL(returnPressed(TQListViewItem*)), this, SLOT(slotItemExecuted()));
+ connect(this, SIGNAL(contextMenu(TDEListView*, TQListViewItem*, const TQPoint&)), this, SLOT(slotContextMenu(TDEListView*, TQListViewItem*, const TQPoint&)));
+ connect(this, SIGNAL(itemRenamed(TQListViewItem*, const TQString&, int)), this, SLOT(slotItemRenamed(TQListViewItem*, const TQString&)));
// Setup the header
- QHeader *viewHeader = header();
+ TQHeader *viewHeader = header();
viewHeader->setResizeEnabled(true);
viewHeader->setMovingEnabled(false);
connect(viewHeader, SIGNAL(sizeChange(int, int, int)), this, SLOT(slotHeaderResized(int)));
// Set column width
- setColumnWidthMode(NameColumn, QListView::Manual);
- setColumnWidthMode(SizeColumn, QListView::Manual);
- setColumnWidthMode(DateColumn, QListView::Manual);
- setColumnWidthMode(PermissionsColumn, QListView::Manual);
+ setColumnWidthMode(NameColumn, TQListView::Manual);
+ setColumnWidthMode(SizeColumn, TQListView::Manual);
+ setColumnWidthMode(DateColumn, TQListView::Manual);
+ setColumnWidthMode(PermissionsColumn, TQListView::Manual);
// Set column alignments
- setColumnAlignment(SizeColumn, Qt::AlignRight);
- setColumnAlignment(DateColumn, Qt::AlignHCenter);
- setColumnAlignment(PermissionsColumn, Qt::AlignHCenter);
+ setColumnAlignment(SizeColumn, TQt::AlignRight);
+ setColumnAlignment(DateColumn, TQt::AlignHCenter);
+ setColumnAlignment(PermissionsColumn, TQt::AlignHCenter);
if (KFTPCore::Config::showOwnerGroup()) {
- setColumnAlignment(OwnerColumn, Qt::AlignHCenter);
- setColumnAlignment(GroupColumn, Qt::AlignHCenter);
+ setColumnAlignment(OwnerColumn, TQt::AlignHCenter);
+ setColumnAlignment(GroupColumn, TQt::AlignHCenter);
} else {
// Only show owner/group if set in the config
removeColumn(4);
@@ -119,7 +119,7 @@ DetailsView::DetailsView(QWidget *parent, View *view, KFTPSession::Session *sess
setAcceptDrops(true);
setSelectionMode(KFile::Extended);
- setHScrollBarMode(QScrollView::AlwaysOff);
+ setHScrollBarMode(TQScrollView::AlwaysOff);
// Set the defaults
setHomeUrl(KURL(KFTPCore::Config::defLocalDir()));
@@ -135,7 +135,7 @@ const KURL &DetailsView::url() const
return m_navigator->url();
}
-const QValueList<LocationNavigator::Element> DetailsView::history(int &index) const
+const TQValueList<LocationNavigator::Element> DetailsView::history(int &index) const
{
return m_navigator->history(index);
}
@@ -188,7 +188,7 @@ void DetailsView::endItemUpdates()
setCurrentItem(item->fileInfo());
int index = 0;
- const QValueList<LocationNavigator::Element> history = m_navigator->history(index);
+ const TQValueList<LocationNavigator::Element> history = m_navigator->history(index);
if (!history.isEmpty()) {
KFileView::setCurrentItem(history[index].currentFilename());
KFileDetailView::setSelected(currentFileItem(), true);
@@ -247,7 +247,7 @@ void DetailsView::slotCompleted()
void DetailsView::slotRefreshItems()
{
- QTimer::singleShot(0, this, SLOT(reload()));
+ TQTimer::singleShot(0, this, SLOT(reload()));
}
void DetailsView::reload()
@@ -291,7 +291,7 @@ void DetailsView::slotItemExecuted()
void DetailsView::slotHeaderResized(int section)
{
if (m_autoResizeEnabled && m_shouldDisableResize && section == 0) {
- setHScrollBarMode(QScrollView::Auto);
+ setHScrollBarMode(TQScrollView::Auto);
m_autoResizeEnabled = false;
}
}
@@ -309,7 +309,7 @@ void DetailsView::resizeContents(int width, int height)
}
}
-void DetailsView::resizeEvent(QResizeEvent *event)
+void DetailsView::resizeEvent(TQResizeEvent *event)
{
m_shouldDisableResize = false;
@@ -332,9 +332,9 @@ void DetailsView::updateColumnWidths()
// When a directory contains no items, a minimum width for
// the column must be available, so that the header is readable.
int columnWidth = 64;
- QFontMetrics fontMetrics(font());
+ TQFontMetrics fontMetrics(font());
- for (QListViewItem* item = firstChild(); item != 0; item = item->nextSibling()) {
+ for (TQListViewItem* item = firstChild(); item != 0; item = item->nextSibling()) {
const int width = item->width(fontMetrics, this, i);
if (width > columnWidth) {
@@ -373,10 +373,10 @@ void DetailsView::insertItem(KFileItem *fileItem)
if (actionChain && (action = actionChain->getAction(Action::Colorize)))
item->setColor(action->value().toColor());
- QDir::SortSpec spec = KFileView::sorting();
- if (spec & QDir::Time) {
- item->setKey(sortingKey(fileItem->time(KIO::UDS_MODIFICATION_TIME), fileItem->isDir(), spec));
- } else if (spec & QDir::Size) {
+ TQDir::SortSpec spec = KFileView::sorting();
+ if (spec & TQDir::Time) {
+ item->setKey(sortingKey(fileItem->time(TDEIO::UDS_MODIFICATION_TIME), fileItem->isDir(), spec));
+ } else if (spec & TQDir::Size) {
item->setKey(sortingKey(fileItem->size(), fileItem->isDir(), spec));
} else {
item->setKey(sortingKey(fileItem->text(), fileItem->isDir(), spec));
@@ -385,12 +385,12 @@ void DetailsView::insertItem(KFileItem *fileItem)
fileItem->setExtraData(this, item);
}
-void DetailsView::slotContextMenu(KListView*, QListViewItem *i, const QPoint &p)
+void DetailsView::slotContextMenu(TDEListView*, TQListViewItem *i, const TQPoint &p)
{
m_view->updateActions();
// Create the popup menu
- KPopupMenu *menu = new KPopupMenu(this);
+ TDEPopupMenu *menu = new TDEPopupMenu(this);
Actions *actions = m_view->m_actions;
@@ -426,13 +426,13 @@ void DetailsView::slotContextMenu(KListView*, QListViewItem *i, const QPoint &p)
menu->exec(p);
}
-void DetailsView::slotItemRenamed(QListViewItem *item, const QString &name)
+void DetailsView::slotItemRenamed(TQListViewItem *item, const TQString &name)
{
KFileItem *fileItem = static_cast<KFileListViewItem*>(item)->fileInfo();
m_view->rename(fileItem->url(), name);
}
-QDragObject *DetailsView::dragObject()
+TQDragObject *DetailsView::dragObject()
{
KURLDrag *object = static_cast<KURLDrag*>(KFileDetailView::dragObject());
@@ -444,8 +444,8 @@ QDragObject *DetailsView::dragObject()
KFileItem *item;
while ((item = i.current()) != 0) {
- QString type = item->isDir() ? "D" : "F";
- object->metaData().insert(item->url().htmlURL().local8Bit(), type + ":" + KIO::number(item->size()));
+ TQString type = item->isDir() ? "D" : "F";
+ object->metaData().insert(item->url().htmlURL().local8Bit(), type + ":" + TDEIO::number(item->size()));
++i;
}
}
@@ -453,21 +453,21 @@ QDragObject *DetailsView::dragObject()
return object;
}
-bool DetailsView::acceptDrag(QDropEvent *event) const
+bool DetailsView::acceptDrag(TQDropEvent *event) const
{
return KURLDrag::canDecode(event) &&
- (event->action() == QDropEvent::Copy ||
- event->action() == QDropEvent::Move ||
- event->action() == QDropEvent::Link) &&
+ (event->action() == TQDropEvent::Copy ||
+ event->action() == TQDropEvent::Move ||
+ event->action() == TQDropEvent::Link) &&
event->source() != this;
}
-void DetailsView::contentsDropEvent(QDropEvent *event)
+void DetailsView::contentsDropEvent(TQDropEvent *event)
{
if (!acceptDrag(event))
return;
- KIO::MetaData meta;
+ TDEIO::MetaData meta;
KURL::List urls;
KURLDrag::decode(event, urls, meta);
@@ -475,7 +475,7 @@ void DetailsView::contentsDropEvent(QDropEvent *event)
KFTPQueue::Manager::self()->insertTransfer(new KURLDrag(urls, meta, this, name()));
}
-KFileItem *DetailsView::fileItem(const QString &filename)
+KFileItem *DetailsView::fileItem(const TQString &filename)
{
if (!filename.isNull()) {
KFileItem *item;
@@ -501,7 +501,7 @@ void DetailsView::setItemVisibility(KFileItem *item, int visibility)
}
}
-void DetailsView::setItemColor(KFileItem *item, const QColor &text, const QColor &background)
+void DetailsView::setItemColor(KFileItem *item, const TQColor &text, const TQColor &background)
{
ListViewItem *i = static_cast<ListViewItem*>(item->extraData(this));
@@ -521,7 +521,7 @@ void DetailsView::markItem(KFileItem *item)
}
}
-void DetailsView::markItem(const QString &filename)
+void DetailsView::markItem(const TQString &filename)
{
if (KFileItem *item = fileItem(filename))
markItem(item);
@@ -536,47 +536,47 @@ void DetailsView::unmarkItems()
}
}
-DetailsView::ListViewItem::ListViewItem(QListView *parent, KFileItem *fileItem)
+DetailsView::ListViewItem::ListViewItem(TQListView *parent, KFileItem *fileItem)
: KFileListViewItem(parent, fileItem),
m_marked(false)
{
if (fileItem->isDir() && !KFTPCore::Config::showDirectorySize()) {
setText(SizeColumn, " - ");
} else {
- QString sizeText;
- sizeText = KFTPCore::Config::showSizeInBytes() ? KIO::number(fileItem->size()) : KIO::convertSize(fileItem->size());
+ TQString sizeText;
+ sizeText = KFTPCore::Config::showSizeInBytes() ? TDEIO::number(fileItem->size()) : TDEIO::convertSize(fileItem->size());
sizeText.append(" ");
setText(SizeColumn, sizeText);
}
}
-void DetailsView::ListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
+void DetailsView::ListViewItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment)
{
- QColorGroup colorGroup(cg);
- QColor textColor = colorGroup.text();
+ TQColorGroup colorGroup(cg);
+ TQColor textColor = colorGroup.text();
// Set custom file item color if set
if (m_textColor.isValid())
- colorGroup.setColor(QColorGroup::Text, m_textColor);
+ colorGroup.setColor(TQColorGroup::Text, m_textColor);
// Set custom file item font
- QFont font = p->font();
+ TQFont font = p->font();
font.setBold(m_marked);
p->setFont(font);
if (m_backgroundColor.isValid()) {
- colorGroup.setColor(QColorGroup::Base, m_backgroundColor);
+ colorGroup.setColor(TQColorGroup::Base, m_backgroundColor);
- // Override the KListViewItem since it resets the background color
- QListViewItem::paintCell(p, colorGroup, column, width, alignment);
+ // Override the TDEListViewItem since it resets the background color
+ TQListViewItem::paintCell(p, colorGroup, column, width, alignment);
} else {
KFileListViewItem::paintCell(p, colorGroup, column, width, alignment);
}
if (column < listView()->columns() - 1) {
// Draw a separator between columns
- p->setPen(KGlobalSettings::buttonBackground());
+ p->setPen(TDEGlobalSettings::buttonBackground());
p->drawLine(width - 1, 0, width - 1, height() - 1);
}
}
diff --git a/kftpgrabber/src/widgets/browser/detailsview.h b/kftpgrabber/src/widgets/browser/detailsview.h
index eb60b70..a06f16b 100644
--- a/kftpgrabber/src/widgets/browser/detailsview.h
+++ b/kftpgrabber/src/widgets/browser/detailsview.h
@@ -38,7 +38,7 @@
#include "browser/locationnavigator.h"
-#include <kfiledetailview.h>
+#include <tdefiledetailview.h>
#include <kdirlister.h>
namespace KFTPSession {
@@ -83,7 +83,7 @@ public:
* @param view Main view container
* @param session Current session
*/
- DetailsView(QWidget *parent, View *view, KFTPSession::Session *session);
+ DetailsView(TQWidget *parent, View *view, KFTPSession::Session *session);
/**
* Class destructor.
@@ -106,7 +106,7 @@ public:
* @param index Variable to save the current history position to
* @return Current history element list
*/
- const QValueList<LocationNavigator::Element> history(int &index) const;
+ const TQValueList<LocationNavigator::Element> history(int &index) const;
/**
* @overload
@@ -171,7 +171,7 @@ public:
*
* @param file Item's filename
*/
- KFileItem *fileItem(const QString &filename);
+ KFileItem *fileItem(const TQString &filename);
/**
* Changes item's colors in the list view. Note that this overrides any
@@ -181,7 +181,7 @@ public:
* @param text Text color
* @param background Background color
*/
- void setItemColor(KFileItem *item, const QColor &text, const QColor &background);
+ void setItemColor(KFileItem *item, const TQColor &text, const TQColor &background);
/**
* Changes item's visibility in the list view.
@@ -205,7 +205,7 @@ public:
*
* @param filename Item's filename
*/
- void markItem(const QString &filename);
+ void markItem(const TQString &filename);
/**
* Unmark all items.
@@ -242,7 +242,7 @@ public slots:
/**
* Returns the drag object to use for copy/paste and "drag and drop".
*/
- QDragObject *dragObject();
+ TQDragObject *dragObject();
protected:
/**
* Instruct the directory lister object to fetch the specified URL.
@@ -256,41 +256,41 @@ protected:
* This method gets called when the widget is resized. It is used for automatic
* resize handling.
*/
- void resizeEvent(QResizeEvent *event);
+ void resizeEvent(TQResizeEvent *event);
/**
* Returns true if the drop event should be accepted.
*/
- bool acceptDrag(QDropEvent *event) const;
+ bool acceptDrag(TQDropEvent *event) const;
/**
* Called when something acceptable gets dropped on us.
*/
- void contentsDropEvent(QDropEvent *event);
+ void contentsDropEvent(TQDropEvent *event);
private:
class ListViewItem : public KFileListViewItem {
public:
- ListViewItem(QListView *parent, KFileItem *fileItem);
+ ListViewItem(TQListView *parent, KFileItem *fileItem);
/**
* @overload
- * Reimplemented from KListView to implement nicer items.
+ * Reimplemented from TDEListView to implement nicer items.
*/
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment);
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment);
/**
* Set a text color for this item.
*
* @param color Text color
*/
- void setColor(QColor color) { m_textColor = color; }
+ void setColor(TQColor color) { m_textColor = color; }
/**
* Set a background color for this item.
*
* @param color Background color
*/
- void setBackground(QColor color) { m_backgroundColor = color; }
+ void setBackground(TQColor color) { m_backgroundColor = color; }
/**
* Set marked state for this item.
@@ -304,8 +304,8 @@ private:
*/
bool marked() const { return m_marked; }
private:
- QColor m_textColor;
- QColor m_backgroundColor;
+ TQColor m_textColor;
+ TQColor m_backgroundColor;
bool m_marked;
};
@@ -313,7 +313,7 @@ private:
DirLister *m_dirLister;
LocationNavigator *m_navigator;
TreeView *m_treeView;
- QTimer *m_resizeTimer;
+ TQTimer *m_resizeTimer;
bool m_refreshing;
bool m_showHidden;
@@ -331,14 +331,14 @@ protected slots:
/**
* This slot gets called when an item has been renamed.
*/
- void slotItemRenamed(QListViewItem *item, const QString &name);
+ void slotItemRenamed(TQListViewItem *item, const TQString &name);
void slotContentsMoving(int x, int y);
/**
* This slot gets called when a context menu should be displayed.
*/
- void slotContextMenu(KListView*, QListViewItem *i, const QPoint &p);
+ void slotContextMenu(TDEListView*, TQListViewItem *i, const TQPoint &p);
/**
* This slot gets called when an item has been clicked.
diff --git a/kftpgrabber/src/widgets/browser/dirlister.cpp b/kftpgrabber/src/widgets/browser/dirlister.cpp
index 4d539e4..9336a59 100644
--- a/kftpgrabber/src/widgets/browser/dirlister.cpp
+++ b/kftpgrabber/src/widgets/browser/dirlister.cpp
@@ -40,8 +40,8 @@
#include "kftpsession.h"
-#include <kmessagebox.h>
-#include <klocale.h>
+#include <tdemessagebox.h>
+#include <tdelocale.h>
using namespace KFTPEngine;
@@ -49,8 +49,8 @@ namespace KFTPWidgets {
namespace Browser {
-DirLister::DirLister(QObject *parent)
- : QObject(parent)
+DirLister::DirLister(TQObject *parent)
+ : TQObject(parent)
{
m_localLister = new KDirLister();
m_localLister->setAutoUpdate(true);
@@ -97,7 +97,7 @@ void DirLister::fetchLocation(const KURL &url, bool reload)
void DirLister::enableLocal()
{
m_localLister->stop();
- m_localLister->QObject::disconnect(this);
+ m_localLister->TQObject::disconnect(this);
connect(m_localLister, SIGNAL(clear()), this, SIGNAL(clear()));
connect(m_localLister, SIGNAL(completed()), this, SIGNAL(completed()));
@@ -108,15 +108,15 @@ void DirLister::enableLocal()
void DirLister::enableRemote()
{
m_localLister->stop();
- m_localLister->QObject::disconnect(this);
- m_remoteSession->getClient()->eventHandler()->QObject::disconnect(this);
+ m_localLister->TQObject::disconnect(this);
+ m_remoteSession->getClient()->eventHandler()->TQObject::disconnect(this);
connect(m_remoteSession->getClient()->eventHandler(), SIGNAL(engineEvent(KFTPEngine::Event*)), this, SLOT(slotRemoteEngineEvent(KFTPEngine::Event*)));
}
void DirLister::disableRemote()
{
- m_remoteSession->getClient()->eventHandler()->QObject::disconnect(this);
+ m_remoteSession->getClient()->eventHandler()->TQObject::disconnect(this);
}
void DirLister::stop()
@@ -145,9 +145,9 @@ void DirLister::slotRemoteEngineEvent(KFTPEngine::Event *event)
m_items.clear();
// Populate the item list
- QValueList<DirectoryEntry> list = event->getParameter(0).asDirectoryListing().list();
- QValueList<DirectoryEntry>::ConstIterator end(list.end());
- for (QValueList<DirectoryEntry>::ConstIterator i(list.begin()); i != end; ++i) {
+ TQValueList<DirectoryEntry> list = event->getParameter(0).asDirectoryListing().list();
+ TQValueList<DirectoryEntry>::ConstIterator end(list.end());
+ for (TQValueList<DirectoryEntry>::ConstIterator i(list.begin()); i != end; ++i) {
if (!m_showHidden && (*i).filename().at(0) == '.')
continue;
diff --git a/kftpgrabber/src/widgets/browser/dirlister.h b/kftpgrabber/src/widgets/browser/dirlister.h
index 730704f..fae0872 100644
--- a/kftpgrabber/src/widgets/browser/dirlister.h
+++ b/kftpgrabber/src/widgets/browser/dirlister.h
@@ -36,7 +36,7 @@
#ifndef KFTPWIDGETS_BROWSERDIRLISTER_H
#define KFTPWIDGETS_BROWSERDIRLISTER_H
-#include <qobject.h>
+#include <ntqobject.h>
#include <kurl.h>
#include <kdirlister.h>
@@ -59,7 +59,7 @@ namespace Browser {
*
* @author Jernej Kos
*/
-class DirLister : public QObject {
+class DirLister : public TQObject {
Q_OBJECT
public:
/**
@@ -67,7 +67,7 @@ public:
*
* @param parent Parent object
*/
- DirLister(QObject *parent);
+ DirLister(TQObject *parent);
/**
* Class destructor.
diff --git a/kftpgrabber/src/widgets/browser/filterwidget.cpp b/kftpgrabber/src/widgets/browser/filterwidget.cpp
index 47f88d9..0dda482 100644
--- a/kftpgrabber/src/widgets/browser/filterwidget.cpp
+++ b/kftpgrabber/src/widgets/browser/filterwidget.cpp
@@ -36,18 +36,18 @@
#include "browser/filterwidget.h"
#include "browser/detailsview.h"
-#include <qlistview.h>
-#include <qregexp.h>
-#include <qpopupmenu.h>
+#include <ntqlistview.h>
+#include <ntqregexp.h>
+#include <ntqpopupmenu.h>
-#include <klocale.h>
+#include <tdelocale.h>
namespace KFTPWidgets {
namespace Browser {
-FilterWidget::FilterWidget(QWidget *parent, DetailsView *view)
- : KListViewSearchLine(parent, view),
+FilterWidget::FilterWidget(TQWidget *parent, DetailsView *view)
+ : TDEListViewSearchLine(parent, view),
m_filterDirectories(true),
m_filterSymlinks(true),
m_caseSensitive(false)
@@ -55,7 +55,7 @@ FilterWidget::FilterWidget(QWidget *parent, DetailsView *view)
connect(view, SIGNAL(itemsChanged()), this, SLOT(updateSearch()));
}
-bool FilterWidget::itemMatches(const QListViewItem *item, const QString &pattern) const
+bool FilterWidget::itemMatches(const TQListViewItem *item, const TQString &pattern) const
{
if (!pattern.isEmpty()) {
const KFileListViewItem *i = dynamic_cast<const KFileListViewItem*>(item);
@@ -67,7 +67,7 @@ bool FilterWidget::itemMatches(const QListViewItem *item, const QString &pattern
return true;
}
- QRegExp filter(pattern);
+ TQRegExp filter(pattern);
filter.setCaseSensitive(m_caseSensitive);
filter.setWildcard(true);
@@ -77,11 +77,11 @@ bool FilterWidget::itemMatches(const QListViewItem *item, const QString &pattern
return true;
}
-QPopupMenu *FilterWidget::createPopupMenu()
+TQPopupMenu *FilterWidget::createPopupMenu()
{
- QPopupMenu *popup = KLineEdit::createPopupMenu();
+ TQPopupMenu *popup = KLineEdit::createPopupMenu();
- QPopupMenu *subMenu = new QPopupMenu(popup);
+ TQPopupMenu *subMenu = new TQPopupMenu(popup);
connect(subMenu, SIGNAL(activated(int)), this, SLOT(slotOptionsMenuActivated(int)));
popup->insertSeparator();
diff --git a/kftpgrabber/src/widgets/browser/filterwidget.h b/kftpgrabber/src/widgets/browser/filterwidget.h
index f5429cf..8d7a208 100644
--- a/kftpgrabber/src/widgets/browser/filterwidget.h
+++ b/kftpgrabber/src/widgets/browser/filterwidget.h
@@ -36,7 +36,7 @@
#ifndef KFTPWIDGETS_BROWSERFILTERWIDGET_H
#define KFTPWIDGETS_BROWSERFILTERWIDGET_H
-#include <klistviewsearchline.h>
+#include <tdelistviewsearchline.h>
namespace KFTPWidgets {
@@ -51,7 +51,7 @@ class DetailsView;
*
* @author Jernej Kos <kostko@jweb-network.net>
*/
-class FilterWidget : public KListViewSearchLine {
+class FilterWidget : public TDEListViewSearchLine {
Q_OBJECT
public:
/**
@@ -60,7 +60,7 @@ public:
* @param parent The parent widget
* @param view The view you want to filter
*/
- FilterWidget(QWidget *parent, DetailsView *view);
+ FilterWidget(TQWidget *parent, DetailsView *view);
protected:
enum {
FilterDirectories = 1,
@@ -70,18 +70,18 @@ protected:
/**
* @overload
- * Reimplemented from KListViewSearchLine to support wildcard
+ * Reimplemented from TDEListViewSearchLine to support wildcard
* matching schemes.
*/
- bool itemMatches(const QListViewItem *item, const QString &pattern) const;
+ bool itemMatches(const TQListViewItem *item, const TQString &pattern) const;
/**
* @overload
- * Reimplemented from KListViewSearchLine to remove multiple
+ * Reimplemented from TDEListViewSearchLine to remove multiple
* columns selection, since this widget only operates on the
* first column.
*/
- QPopupMenu *createPopupMenu();
+ TQPopupMenu *createPopupMenu();
private:
bool m_filterDirectories;
bool m_filterSymlinks;
diff --git a/kftpgrabber/src/widgets/browser/locationnavigator.cpp b/kftpgrabber/src/widgets/browser/locationnavigator.cpp
index 5be8004..35d3e87 100644
--- a/kftpgrabber/src/widgets/browser/locationnavigator.cpp
+++ b/kftpgrabber/src/widgets/browser/locationnavigator.cpp
@@ -81,7 +81,7 @@ void LocationNavigator::setUrl(const KURL &url)
updateCurrentElement();
- const QValueListIterator<LocationNavigator::Element> i = m_history.at(m_historyIndex);
+ const TQValueListIterator<LocationNavigator::Element> i = m_history.at(m_historyIndex);
m_history.insert(i, Element(url));
emit urlChanged(url);
@@ -99,7 +99,7 @@ const KURL& LocationNavigator::url() const
return m_history[m_historyIndex].url();
}
-const QValueList<LocationNavigator::Element> LocationNavigator::history(int &index) const
+const TQValueList<LocationNavigator::Element> LocationNavigator::history(int &index) const
{
index = m_historyIndex;
return m_history;
diff --git a/kftpgrabber/src/widgets/browser/locationnavigator.h b/kftpgrabber/src/widgets/browser/locationnavigator.h
index 475a3af..d709938 100644
--- a/kftpgrabber/src/widgets/browser/locationnavigator.h
+++ b/kftpgrabber/src/widgets/browser/locationnavigator.h
@@ -36,8 +36,8 @@
#ifndef KFTPWIDGETS_BROWSERLOCATIONNAVIGATOR_H
#define KFTPWIDGETS_BROWSERLOCATIONNAVIGATOR_H
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <ntqobject.h>
+#include <ntqvaluelist.h>
#include <kurl.h>
@@ -53,7 +53,7 @@ class DetailsView;
*
* @author Jernej Kos
*/
-class LocationNavigator : public QObject {
+class LocationNavigator : public TQObject {
Q_OBJECT
public:
/**
@@ -84,12 +84,12 @@ public:
*
* @param filename The filename of the currently selected item
*/
- void setCurrentFilename(const QString &filename) { m_currentFilename = filename; }
+ void setCurrentFilename(const TQString &filename) { m_currentFilename = filename; }
/**
* Returns the selected filename.
*/
- const QString &currentFilename() const { return m_currentFilename; }
+ const TQString &currentFilename() const { return m_currentFilename; }
/**
* Set current contents X position.
@@ -116,7 +116,7 @@ public:
int contentsY() const { return m_contentsY; }
private:
KURL m_url;
- QString m_currentFilename;
+ TQString m_currentFilename;
int m_contentsX;
int m_contentsY;
@@ -147,7 +147,7 @@ public:
* @param index Variable to save the current history position to
* @return Current history element list
*/
- const QValueList<Element> history(int &index) const;
+ const TQValueList<Element> history(int &index) const;
/**
* Go one history hop back.
@@ -197,7 +197,7 @@ private slots:
private:
DetailsView *m_view;
int m_historyIndex;
- QValueList<Element> m_history;
+ TQValueList<Element> m_history;
KURL m_homeUrl;
void updateCurrentElement();
diff --git a/kftpgrabber/src/widgets/browser/propsplugin.cpp b/kftpgrabber/src/widgets/browser/propsplugin.cpp
index b6e688d..6a6ed1f 100644
--- a/kftpgrabber/src/widgets/browser/propsplugin.cpp
+++ b/kftpgrabber/src/widgets/browser/propsplugin.cpp
@@ -36,12 +36,12 @@
#include "browser/propsplugin.h"
#include "kftpsession.h"
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qstyle.h>
-#include <qgroupbox.h>
+#include <ntqlayout.h>
+#include <ntqlabel.h>
+#include <ntqstyle.h>
+#include <ntqgroupbox.h>
-#include <klocale.h>
+#include <tdelocale.h>
#include <kiconloader.h>
#include <kseparator.h>
#include <ksqueezedtextlabel.h>
@@ -55,7 +55,7 @@ namespace Browser {
PropsPlugin::PropsPlugin(KPropertiesDialog *props, KFileItemList items)
: KPropsDlgPlugin(props)
{
- QFrame *frame = properties->addPage(i18n("&General"));
+ TQFrame *frame = properties->addPage(i18n("&General"));
frame->setMinimumWidth(320);
frame->setMinimumHeight(300);
@@ -63,9 +63,9 @@ PropsPlugin::PropsPlugin(KPropertiesDialog *props, KFileItemList items)
KFileItem *item = items.at(0);
KURL fileUrl = item->url();
filesize_t fileSize = item->size();
- QString nameText;
- QString iconText;
- QString mimeComment;
+ TQString nameText;
+ TQString iconText;
+ TQString mimeComment;
if (items.count() == 1) {
bool isDir = false;
@@ -85,12 +85,12 @@ PropsPlugin::PropsPlugin(KPropertiesDialog *props, KFileItemList items)
isDir = true;
mimeComment = i18n("Remote folder");
} else {
- iconText = mimeType->icon(QString::null, false);
+ iconText = mimeType->icon(TQString::null, false);
mimeComment = mimeType->comment();
}
} else {
KMimeType::Ptr mimeType = KMimeType::findByURL(fileUrl, 0, false, true);
- iconText = mimeType->icon(QString::null, false);
+ iconText = mimeType->icon(TQString::null, false);
mimeComment = mimeType->comment();
}
@@ -115,12 +115,12 @@ PropsPlugin::PropsPlugin(KPropertiesDialog *props, KFileItemList items)
fileSize += (*i)->size();
}
- iconText = "kmultiple";
- nameText = KIO::itemsSummaryString(countFiles + countFolders, countFiles, countFolders, 0, false);
+ iconText = "tdemultiple";
+ nameText = TDEIO::itemsSummaryString(countFiles + countFolders, countFiles, countFolders, 0, false);
}
- QVBoxLayout *vbl = new QVBoxLayout(frame, 0, KDialog::spacingHint(), "vbl");
- QGridLayout *grid = new QGridLayout(0, 3);
+ TQVBoxLayout *vbl = new TQVBoxLayout(frame, 0, KDialog::spacingHint(), "vbl");
+ TQGridLayout *grid = new TQGridLayout(0, 3);
grid->setColStretch(0, 0);
grid->setColStretch(1, 0);
grid->setColStretch(2, 1);
@@ -128,13 +128,13 @@ PropsPlugin::PropsPlugin(KPropertiesDialog *props, KFileItemList items)
vbl->addLayout(grid);
// Display file name and icon
- QLabel *iconLabel = new QLabel(frame);
- int bsize = 66 + 2 * iconLabel->style().pixelMetric(QStyle::PM_ButtonMargin);
+ TQLabel *iconLabel = new TQLabel(frame);
+ int bsize = 66 + 2 * iconLabel->style().pixelMetric(TQStyle::PM_ButtonMargin);
iconLabel->setFixedSize(bsize, bsize);
iconLabel->setPixmap(DesktopIcon(iconText));
grid->addWidget(iconLabel, 0, 0, AlignLeft);
- QLabel *nameLabel = new QLabel(frame);
+ TQLabel *nameLabel = new TQLabel(frame);
nameLabel->setText(nameText);
grid->addWidget(nameLabel, 0, 2);
@@ -142,32 +142,32 @@ PropsPlugin::PropsPlugin(KPropertiesDialog *props, KFileItemList items)
grid->addMultiCellWidget(sep, 2, 2, 0, 2);
// Display file information
- QLabel *l;
+ TQLabel *l;
int currentRow = 3;
if (items.count() == 1) {
- l = new QLabel(i18n("Type:"), frame);
+ l = new TQLabel(i18n("Type:"), frame);
grid->addWidget(l, currentRow, 0);
- l = new QLabel(mimeComment, frame);
+ l = new TQLabel(mimeComment, frame);
grid->addWidget(l, currentRow++, 2);
}
- l = new QLabel(i18n("Location:"), frame);
+ l = new TQLabel(i18n("Location:"), frame);
grid->addWidget(l, currentRow, 0);
l = new KSqueezedTextLabel(frame);
l->setText(fileUrl.directory());
grid->addWidget(l, currentRow++, 2);
- l = new QLabel(i18n("Size:"), frame);
+ l = new TQLabel(i18n("Size:"), frame);
grid->addWidget(l, currentRow, 0);
- l = new QLabel(frame);
+ l = new TQLabel(frame);
grid->addWidget(l, currentRow++, 2);
- l->setText(QString::fromLatin1("%1 (%2)").arg(KIO::convertSize(fileSize))
- .arg(KGlobal::locale()->formatNumber(fileSize, 0)));
+ l->setText(TQString::fromLatin1("%1 (%2)").arg(TDEIO::convertSize(fileSize))
+ .arg(TDEGlobal::locale()->formatNumber(fileSize, 0)));
sep = new KSeparator(KSeparator::HLine, frame);
grid->addMultiCellWidget(sep, currentRow, currentRow, 0, 2);
@@ -175,12 +175,12 @@ PropsPlugin::PropsPlugin(KPropertiesDialog *props, KFileItemList items)
// Display modification time
if (items.count() == 1) {
- l = new QLabel(i18n("Created:"), frame);
+ l = new TQLabel(i18n("Created:"), frame);
grid->addWidget(l, currentRow, 0);
- QDateTime dt;
- dt.setTime_t(item->time(KIO::UDS_MODIFICATION_TIME));
- l = new QLabel(KGlobal::locale()->formatDateTime(dt), frame);
+ TQDateTime dt;
+ dt.setTime_t(item->time(TDEIO::UDS_MODIFICATION_TIME));
+ l = new TQLabel(TDEGlobal::locale()->formatDateTime(dt), frame);
grid->addWidget(l, currentRow++, 2);
}
@@ -203,7 +203,7 @@ PermissionsPropsPlugin::PermissionsPropsPlugin(KPropertiesDialog *_props, KFileI
m_session(session),
m_cbRecursive(0)
{
- QFrame *frame = properties->addPage(i18n("&Permissions"));
+ TQFrame *frame = properties->addPage(i18n("&Permissions"));
frame->setMinimumWidth(320);
frame->setMinimumHeight(300);
@@ -235,59 +235,59 @@ PermissionsPropsPlugin::PermissionsPropsPlugin(KPropertiesDialog *_props, KFileI
}
}
- QBoxLayout *box = new QVBoxLayout(frame, 0, KDialog::spacingHint());
+ TQBoxLayout *box = new TQVBoxLayout(frame, 0, KDialog::spacingHint());
- QGroupBox *gb = new QGroupBox(0, Qt::Vertical, i18n("Access Permissions"), frame);
+ TQGroupBox *gb = new TQGroupBox(0, TQt::Vertical, i18n("Access Permissions"), frame);
gb->layout()->setSpacing(KDialog::spacingHint());
gb->layout()->setMargin(KDialog::marginHint());
box->addWidget(gb);
- QGridLayout *gl = new QGridLayout(gb->layout(), 6, 6, 15);
+ TQGridLayout *gl = new TQGridLayout(gb->layout(), 6, 6, 15);
- QLabel *l = new QLabel(i18n("Class"), gb);
+ TQLabel *l = new TQLabel(i18n("Class"), gb);
gl->addWidget(l, 1, 0);
if (isDir)
- l = new QLabel(i18n("Show\nEntries"), gb);
+ l = new TQLabel(i18n("Show\nEntries"), gb);
else
- l = new QLabel(i18n("Read"), gb);
+ l = new TQLabel(i18n("Read"), gb);
gl->addWidget(l, 1, 1);
if (isDir)
- l = new QLabel(i18n("Write\nEntries"), gb);
+ l = new TQLabel(i18n("Write\nEntries"), gb);
else
- l = new QLabel(i18n("Write"), gb);
+ l = new TQLabel(i18n("Write"), gb);
gl->addWidget(l, 1, 2);
if (isDir)
- l = new QLabel(i18n("Enter folder", "Enter"), gb);
+ l = new TQLabel(i18n("Enter folder", "Enter"), gb);
else
- l = new QLabel(i18n("Exec"), gb);
+ l = new TQLabel(i18n("Exec"), gb);
- QSize size = l->sizeHint();
+ TQSize size = l->sizeHint();
size.setWidth(size.width() + 15);
l->setFixedSize(size);
gl->addWidget(l, 1, 3);
- l = new QLabel(i18n("Special"), gb);
+ l = new TQLabel(i18n("Special"), gb);
gl->addMultiCellWidget(l, 1, 1, 4, 5);
- l = new QLabel(i18n("User"), gb);
+ l = new TQLabel(i18n("User"), gb);
gl->addWidget(l, 2, 0);
- l = new QLabel(i18n("Group"), gb);
+ l = new TQLabel(i18n("Group"), gb);
gl->addWidget(l, 3, 0);
- l = new QLabel(i18n("Others"), gb);
+ l = new TQLabel(i18n("Others"), gb);
gl->addWidget(l, 4, 0);
- l = new QLabel(i18n("Set UID"), gb);
+ l = new TQLabel(i18n("Set UID"), gb);
gl->addWidget(l, 2, 5);
- l = new QLabel(i18n("Set GID"), gb);
+ l = new TQLabel(i18n("Set GID"), gb);
gl->addWidget(l, 3, 5);
- l = new QLabel(i18n("Sticky"), gb);
+ l = new TQLabel(i18n("Sticky"), gb);
gl->addWidget(l, 4, 5);
mode_t permissions = item->permissions();
@@ -295,7 +295,7 @@ PermissionsPropsPlugin::PermissionsPropsPlugin(KPropertiesDialog *_props, KFileI
// Display checkboxes
for (int row = 0; row < 3; ++row) {
for (int col = 0; col < 4; ++col) {
- QCheckBox *cb = new QCheckBox(gb);
+ TQCheckBox *cb = new TQCheckBox(gb);
connect(cb, SIGNAL(clicked()), this, SLOT(setDirty()));
m_permsCheck[row][col] = cb;
cb->setChecked(permissions & fperm[row][col]);
@@ -308,7 +308,7 @@ PermissionsPropsPlugin::PermissionsPropsPlugin(KPropertiesDialog *_props, KFileI
box->addStretch(10);
if (isDir) {
- m_cbRecursive = new QCheckBox(i18n("Apply changes to all subfolders and their contents"), frame);
+ m_cbRecursive = new TQCheckBox(i18n("Apply changes to all subfolders and their contents"), frame);
connect(m_cbRecursive, SIGNAL(clicked()), this, SLOT(changed()));
box->addWidget(m_cbRecursive);
}
diff --git a/kftpgrabber/src/widgets/browser/propsplugin.h b/kftpgrabber/src/widgets/browser/propsplugin.h
index 9283f85..736ec48 100644
--- a/kftpgrabber/src/widgets/browser/propsplugin.h
+++ b/kftpgrabber/src/widgets/browser/propsplugin.h
@@ -38,7 +38,7 @@
#include "engine/directorylisting.h"
-#include <qcheckbox.h>
+#include <ntqcheckbox.h>
#include <kpropertiesdialog.h>
namespace KFTPSession {
@@ -86,9 +86,9 @@ private:
KFTPSession::Session *m_session;
static mode_t fperm[3][4];
- QString m_perms[3];
- QCheckBox *m_permsCheck[3][4];
- QCheckBox *m_cbRecursive;
+ TQString m_perms[3];
+ TQCheckBox *m_permsCheck[3][4];
+ TQCheckBox *m_cbRecursive;
};
}
diff --git a/kftpgrabber/src/widgets/browser/treeview.cpp b/kftpgrabber/src/widgets/browser/treeview.cpp
index 0f2a824..f101dc7 100644
--- a/kftpgrabber/src/widgets/browser/treeview.cpp
+++ b/kftpgrabber/src/widgets/browser/treeview.cpp
@@ -40,10 +40,10 @@
#include "misc.h"
-#include <qheader.h>
-#include <qtimer.h>
+#include <ntqheader.h>
+#include <ntqtimer.h>
-#include <kio/job.h>
+#include <tdeio/job.h>
#include <kurl.h>
#include <kurldrag.h>
@@ -58,7 +58,7 @@ namespace Browser {
*/
TreeViewItem::TreeViewItem(TreeView *parent, const KURL &url)
- : QListViewItem(parent),
+ : TQListViewItem(parent),
m_tree(parent),
m_url(url),
m_dirty(false)
@@ -67,8 +67,8 @@ TreeViewItem::TreeViewItem(TreeView *parent, const KURL &url)
setText(0, path2Name(url.path(-1)));
}
-TreeViewItem::TreeViewItem(TreeView *tree, QListViewItem *parent, const KURL &url)
- : QListViewItem(parent),
+TreeViewItem::TreeViewItem(TreeView *tree, TQListViewItem *parent, const KURL &url)
+ : TQListViewItem(parent),
m_tree(tree),
m_url(url),
m_dirty(false)
@@ -83,21 +83,21 @@ TreeViewItem::~TreeViewItem()
m_tree->m_treeItems.remove(m_url.path());
}
-int TreeViewItem::compare(QListViewItem *i, int col, bool) const
+int TreeViewItem::compare(TQListViewItem *i, int col, bool) const
{
// Hidden files must be on top
if (m_url.fileName().at(0) == '.')
return -1;
- return QListViewItem::compare(i, col, false);
+ return TQListViewItem::compare(i, col, false);
}
/*
* TreeView class
*/
-TreeView::TreeView(QWidget *parent)
- : KListView(parent)
+TreeView::TreeView(TQWidget *parent)
+ : TDEListView(parent)
{
// Create the columns
addColumn(i18n("Directory"));
@@ -114,8 +114,8 @@ TreeView::TreeView(QWidget *parent)
m_noItemOpen = false;
// Connect signals
- connect(this, SIGNAL(clicked(QListViewItem*)), this, SLOT(slotClicked(QListViewItem*)));
- connect(this, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(slotDoubleClicked(QListViewItem*)));
+ connect(this, SIGNAL(clicked(TQListViewItem*)), this, SLOT(slotClicked(TQListViewItem*)));
+ connect(this, SIGNAL(doubleClicked(TQListViewItem*)), this, SLOT(slotDoubleClicked(TQListViewItem*)));
// Drag and drop
m_dropItem = 0L;
@@ -144,13 +144,13 @@ void TreeView::resetView(const KURL &url)
setOpen(rootItem, true);
}
-int TreeView::openUrl(const KURL &url, QListViewItem *parent)
+int TreeView::openUrl(const KURL &url, TQListViewItem *parent)
{
// Root item should always be open
setOpen(firstChild(), true);
// Go trough all items in the list and try to find the url
- QListViewItem *item;
+ TQListViewItem *item;
if (!parent)
item = firstChild();
else
@@ -165,7 +165,7 @@ int TreeView::openUrl(const KURL &url, QListViewItem *parent)
setSelected(item, true);
// Change viewport
- QRect r = itemRect(item);
+ TQRect r = itemRect(item);
if (r.isValid()) {
int x, y;
viewportToContents(contentsX(), r.y(), x, y);
@@ -187,9 +187,9 @@ int TreeView::openUrl(const KURL &url, QListViewItem *parent)
return 0;
}
-QListViewItem *TreeView::findItem(QListViewItem *parent, const QString &name)
+TQListViewItem *TreeView::findItem(TQListViewItem *parent, const TQString &name)
{
- QListViewItem *item = parent->firstChild();
+ TQListViewItem *item = parent->firstChild();
while (item) {
if (item->text(0) == name)
@@ -202,13 +202,13 @@ QListViewItem *TreeView::findItem(QListViewItem *parent, const QString &name)
return parent;
}
-void TreeView::createFolder(const KURL &url, QPixmap icon)
+void TreeView::createFolder(const KURL &url, TQPixmap icon)
{
int numDirs = url.path(1).contains('/', false);
- QListViewItem *item = firstChild();
+ TQListViewItem *item = firstChild();
for (int i = 1; i < numDirs; i++) {
- QString itemUrl = url.path().section('/', 0, i);
+ TQString itemUrl = url.path().section('/', 0, i);
if (m_treeItems[itemUrl]) {
// Item exists for this URL
@@ -270,7 +270,7 @@ void TreeView::endUpdate(const KURL &url)
itemURL.setPath("/");
for (int i = 1; i < numDirs; i++) {
- QString sect = url.path().section('/', i, i);
+ TQString sect = url.path().section('/', i, i);
itemURL.setPath(url.path().section('/', 0, i));
if (!m_treeItems[itemURL.path()]) {
@@ -306,11 +306,11 @@ void TreeView::endUpdate(const KURL &url)
void TreeView::clearFolder(const KURL &url)
{
// Remove url's children
- QListViewItem *top = firstChild();
+ TQListViewItem *top = firstChild();
int numDirs = url.path(1).contains('/', false);
if (url.path() == "/") {
- QListViewItem *i = top->firstChild();
+ TQListViewItem *i = top->firstChild();
while (i) {
// Remove item from the index
@@ -327,7 +327,7 @@ void TreeView::clearFolder(const KURL &url)
itemURL.setPath("/");
for (int i = 1; i < numDirs; i++) {
- QString sect = url.path().section('/', i, i);
+ TQString sect = url.path().section('/', i, i);
itemURL.setPath(url.path().section('/', 0, i));
if (!m_treeItems[itemURL.path()]) {
@@ -340,7 +340,7 @@ void TreeView::clearFolder(const KURL &url)
// Check for URL match
if (itemURL.path(-1) == url.path(-1)) {
// URL match, delete the item's children
- QListViewItem *i = top->firstChild();
+ TQListViewItem *i = top->firstChild();
while (i) {
// Remove item from the index
@@ -357,7 +357,7 @@ void TreeView::clearFolder(const KURL &url)
void TreeView::removeFolder(const KURL &url)
{
// Removes a folder at url
- QListViewItem *top = firstChild();
+ TQListViewItem *top = firstChild();
int numDirs = url.path(1).contains('/', false);
// URL for items
@@ -365,7 +365,7 @@ void TreeView::removeFolder(const KURL &url)
itemURL.setPath("/");
for (int i = 1; i < numDirs; i++) {
- QString sect = url.path().section('/', i, i);
+ TQString sect = url.path().section('/', i, i);
itemURL.setPath(url.path().section('/', 0, i));
if (!m_treeItems[itemURL.path()]) {
@@ -386,7 +386,7 @@ void TreeView::removeFolder(const KURL &url)
}
}
-void TreeView::slotClicked(QListViewItem *item)
+void TreeView::slotClicked(TQListViewItem *item)
{
if (!item)
return;
@@ -396,7 +396,7 @@ void TreeView::slotClicked(QListViewItem *item)
m_noItemOpen = false;
}
-void TreeView::slotDoubleClicked(QListViewItem *item)
+void TreeView::slotDoubleClicked(TQListViewItem *item)
{
if (!item)
return;
@@ -409,36 +409,36 @@ void TreeView::startDrag()
dragObject()->drag();
}
-bool TreeView::acceptDrag(QDropEvent *e)
+bool TreeView::acceptDrag(TQDropEvent *e)
{
return KURLDrag::canDecode(e) &&
- ( e->action() == QDropEvent::Copy
- || e->action() == QDropEvent::Move
- || e->action() == QDropEvent::Link )
+ ( e->action() == TQDropEvent::Copy
+ || e->action() == TQDropEvent::Move
+ || e->action() == TQDropEvent::Link )
&& acceptDrops()
&& dragEnabled();
}
-QDragObject *TreeView::dragObject()
+TQDragObject *TreeView::dragObject()
{
TreeViewItem *item = static_cast<TreeViewItem*>(selectedItem());
// Set the correct pixmap
- QPixmap pix = *item->pixmap(0);
+ TQPixmap pix = *item->pixmap(0);
KURL::List urls;
urls.append(item->m_url);
- KIO::MetaData meta;
+ TDEIO::MetaData meta;
meta.insert(item->m_url.htmlURL().local8Bit(), "D:0");
m_dragObject = new KURLDrag(urls, meta, this, name());
- m_dragObject->setPixmap(pix, QPoint(pix.width() / 2, pix.height() / 2));
+ m_dragObject->setPixmap(pix, TQPoint(pix.width() / 2, pix.height() / 2));
return m_dragObject;
}
-void TreeView::contentsDragEnterEvent(QDragEnterEvent *e)
+void TreeView::contentsDragEnterEvent(TQDragEnterEvent *e)
{
if (!acceptDrag(e)) {
e->accept(false);
@@ -446,12 +446,12 @@ void TreeView::contentsDragEnterEvent(QDragEnterEvent *e)
}
e->acceptAction();
- QListViewItem *i = itemAt(contentsToViewport(e->pos()));
+ TQListViewItem *i = itemAt(contentsToViewport(e->pos()));
if (i)
m_dropItem = i;
}
-void TreeView::contentsDragMoveEvent(QDragMoveEvent *e)
+void TreeView::contentsDragMoveEvent(TQDragMoveEvent *e)
{
if (!acceptDrag(e)) {
e->accept(false);
@@ -459,18 +459,18 @@ void TreeView::contentsDragMoveEvent(QDragMoveEvent *e)
}
e->acceptAction();
- QListViewItem *i = itemAt(contentsToViewport(e->pos()));
+ TQListViewItem *i = itemAt(contentsToViewport(e->pos()));
if (i && i != m_dropItem)
m_dropItem = i;
}
-void TreeView::contentsDragLeaveEvent(QDragLeaveEvent*)
+void TreeView::contentsDragLeaveEvent(TQDragLeaveEvent*)
{
m_dropItem = 0L;
}
-void TreeView::contentsDropEvent(QDropEvent *e)
+void TreeView::contentsDropEvent(TQDropEvent *e)
{
if (!m_dropItem)
return;
@@ -482,7 +482,7 @@ void TreeView::contentsDropEvent(QDropEvent *e)
e->acceptAction();
// Decode the data and try to init transfer
- KIO::MetaData meta;
+ TDEIO::MetaData meta;
KURL::List urls;
KURLDrag::decode(e, urls, meta);
@@ -498,7 +498,7 @@ void TreeView::contentsDropEvent(QDropEvent *e)
destUrl.addPath((*i).fileName());
if ((*i).isLocalFile()) {
- KIO::move((*i), destUrl, false);
+ TDEIO::move((*i), destUrl, false);
// Reload the listing
static_cast<View*>(parent()->parent())->reload();
diff --git a/kftpgrabber/src/widgets/browser/treeview.h b/kftpgrabber/src/widgets/browser/treeview.h
index 220ac88..d325fe6 100644
--- a/kftpgrabber/src/widgets/browser/treeview.h
+++ b/kftpgrabber/src/widgets/browser/treeview.h
@@ -36,12 +36,12 @@
#ifndef KFTPFILEDIRTREEVIEW_H
#define KFTPFILEDIRTREEVIEW_H
-#include <klistview.h>
-#include <klocale.h>
+#include <tdelistview.h>
+#include <tdelocale.h>
#include <kurl.h>
-#include <qpixmap.h>
-#include <qdict.h>
+#include <ntqpixmap.h>
+#include <ntqdict.h>
namespace KFTPWidgets {
@@ -55,7 +55,7 @@ class TreeViewItem;
*
* @author Jernej Kos
*/
-class TreeView : public KListView
+class TreeView : public TDEListView
{
Q_OBJECT
friend class ListView;
@@ -66,7 +66,7 @@ public:
*
* @param parent The parent widget
*/
- TreeView(QWidget *parent);
+ TreeView(TQWidget *parent);
/**
* Class destructor.
@@ -78,7 +78,7 @@ public:
*
* @param url The url to open
*/
- int openUrl(const KURL &url, QListViewItem *parent = 0);
+ int openUrl(const KURL &url, TQListViewItem *parent = 0);
/**
* Remove the folder's child items.
@@ -101,7 +101,7 @@ public:
* @param url The folder's URL
* @param icon The icon to use
*/
- void createFolder(const KURL &url, QPixmap icon);
+ void createFolder(const KURL &url, TQPixmap icon);
/**
* Clear all items in the view and create a new root item.
@@ -117,25 +117,25 @@ public:
*/
void endUpdate(const KURL &url);
private:
- QDict<TreeViewItem> m_treeItems;
+ TQDict<TreeViewItem> m_treeItems;
bool m_noItemOpen;
/* Drag & drop support */
- QListViewItem *m_dropItem;
- QDragObject *m_dragObject;
+ TQListViewItem *m_dropItem;
+ TQDragObject *m_dragObject;
- QDragObject *dragObject();
+ TQDragObject *dragObject();
void startDrag();
- bool acceptDrag(QDropEvent *e);
- void contentsDragEnterEvent(QDragEnterEvent *e);
- void contentsDragMoveEvent(QDragMoveEvent *e);
- void contentsDragLeaveEvent(QDragLeaveEvent*);
- void contentsDropEvent(QDropEvent *e);
+ bool acceptDrag(TQDropEvent *e);
+ void contentsDragEnterEvent(TQDragEnterEvent *e);
+ void contentsDragMoveEvent(TQDragMoveEvent *e);
+ void contentsDragLeaveEvent(TQDragLeaveEvent*);
+ void contentsDropEvent(TQDropEvent *e);
protected:
- QListViewItem *findItem(QListViewItem *parent, const QString &name);
+ TQListViewItem *findItem(TQListViewItem *parent, const TQString &name);
private slots:
- void slotClicked(QListViewItem *item);
- void slotDoubleClicked(QListViewItem *item);
+ void slotClicked(TQListViewItem *item);
+ void slotDoubleClicked(TQListViewItem *item);
signals:
void pathChanged(const KURL &url);
};
@@ -145,7 +145,7 @@ signals:
*
* @author Jernej Kos
*/
-class TreeViewItem : public QListViewItem
+class TreeViewItem : public TQListViewItem
{
friend class TreeView;
public:
@@ -164,7 +164,7 @@ public:
* @param parent The parent list view item
* @param url This item's URL
*/
- TreeViewItem(TreeView *tree, QListViewItem *parent, const KURL &url);
+ TreeViewItem(TreeView *tree, TQListViewItem *parent, const KURL &url);
/**
* Class destructor.
@@ -173,9 +173,9 @@ public:
protected:
/**
* @overload
- * Reimplemented from QListViewItem to provide proper comparation.
+ * Reimplemented from TQListViewItem to provide proper comparation.
*/
- int compare(QListViewItem *i, int col, bool) const;
+ int compare(TQListViewItem *i, int col, bool) const;
private:
TreeView *m_tree;
KURL m_url;
diff --git a/kftpgrabber/src/widgets/browser/view.cpp b/kftpgrabber/src/widgets/browser/view.cpp
index 4b3b0e5..43fb3e2 100644
--- a/kftpgrabber/src/widgets/browser/view.cpp
+++ b/kftpgrabber/src/widgets/browser/view.cpp
@@ -46,21 +46,21 @@
#include "misc.h"
-#include <klocale.h>
-#include <ktoolbar.h>
+#include <tdelocale.h>
+#include <tdetoolbar.h>
#include <kstatusbar.h>
#include <kcombobox.h>
-#include <kaction.h>
-#include <kmessagebox.h>
+#include <tdeaction.h>
+#include <tdemessagebox.h>
#include <ksslinfodlg.h>
#include <klineedit.h>
#include <kpixmapprovider.h>
-#include <kio/job.h>
+#include <tdeio/job.h>
-#include <qdir.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <ntqdir.h>
+#include <ntqlabel.h>
+#include <ntqlayout.h>
using namespace KFTPGrabberBase;
using namespace KFTPEngine;
@@ -72,18 +72,18 @@ namespace Browser {
class HistoryPixmapProvider : public KPixmapProvider
{
public:
- QPixmap pixmapFor(const QString&, int)
+ TQPixmap pixmapFor(const TQString&, int)
{
return loadSmallPixmap("folder");
}
};
-View::View(QWidget *parent, const char *name, KFTPEngine::Thread *client, KFTPSession::Session *session)
- : QWidget(parent, name),
+View::View(TQWidget *parent, const char *name, KFTPEngine::Thread *client, KFTPSession::Session *session)
+ : TQWidget(parent, name),
m_session(session),
m_ftpClient(client)
{
- m_connTimer = new QTimer(this);
+ m_connTimer = new TQTimer(this);
// Create the GUI
init();
@@ -114,12 +114,12 @@ void View::init()
m_actions->initActions();
// Layout
- QVBoxLayout *layout = new QVBoxLayout(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
// Create the toolbars
- m_toolBarFirst = new KToolBar(this, "first toolbar", false, false);
- m_toolBarSecond = new KToolBar(this, "second toolbar", false, false);
- m_searchToolBar = new KToolBar(this, "search toolbar", false, false);
+ m_toolBarFirst = new TDEToolBar(this, "first toolbar", false, false);
+ m_toolBarSecond = new TDEToolBar(this, "second toolbar", false, false);
+ m_searchToolBar = new TDEToolBar(this, "search toolbar", false, false);
m_toolBarFirst->setEnableContextMenu(false);
m_toolBarFirst->setMovingEnabled(false);
@@ -133,14 +133,14 @@ void View::init()
m_searchToolBar->setMovingEnabled(false);
m_searchToolBar->setFullSize(true);
- QLabel *filterLabel = new QLabel(i18n("Filter: "), m_searchToolBar);
+ TQLabel *filterLabel = new TQLabel(i18n("Filter: "), m_searchToolBar);
m_searchToolBar->insertWidget(1, 35, filterLabel);
// Create the erase button
- m_toolBarSecond->insertButton(QApplication::reverseLayout() ? "clear_left" :"locationbar_erase", 0, SIGNAL(clicked()), this, SLOT(slotHistoryEraseClicked()), true);
+ m_toolBarSecond->insertButton(TQApplication::reverseLayout() ? "clear_left" :"locationbar_erase", 0, SIGNAL(clicked()), this, SLOT(slotHistoryEraseClicked()), true);
// Create the labels
- QLabel *pathLabel = new QLabel(i18n("Path: "), m_toolBarSecond);
+ TQLabel *pathLabel = new TQLabel(i18n("Path: "), m_toolBarSecond);
m_toolBarSecond->insertWidget(1, 35, pathLabel);
// Create the history combo
@@ -150,9 +150,9 @@ void View::init()
m_historyCombo->setMaxCount(25);
m_historyCombo->setSizeLimit(25);
m_historyCombo->setDuplicatesEnabled(false);
- m_historyCombo->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
+ m_historyCombo->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed));
- connect(m_historyCombo, SIGNAL(activated(const QString&)), this, SLOT(slotHistoryActivated(const QString&)));
+ connect(m_historyCombo, SIGNAL(activated(const TQString&)), this, SLOT(slotHistoryActivated(const TQString&)));
// Do some more stuff
m_toolBarSecond->setItemAutoSized(1, true);
@@ -161,27 +161,27 @@ void View::init()
m_toolBarFirst->updateRects(true);
// Create a splitter
- m_splitter = new QSplitter(this);
+ m_splitter = new TQSplitter(this);
m_splitter->setOpaqueResize(true);
- m_splitter->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
+ m_splitter->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding));
// Create a status bar
- QHBoxLayout *statusLayout = new QHBoxLayout(this);
+ TQHBoxLayout *statusLayout = new TQHBoxLayout(this);
- m_connDurationMsg = new QLabel(this);
+ m_connDurationMsg = new TQLabel(this);
m_connDurationMsg->setAlignment(AlignAuto | AlignVCenter | AlignHCenter | ExpandTabs);
- m_connDurationMsg->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
+ m_connDurationMsg->setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken);
m_connDurationMsg->setMinimumWidth(100);
- m_sslIcon = new QPushButton(this);
+ m_sslIcon = new TQPushButton(this);
m_sslIcon->setFlat(true);
m_sslIcon->setIconSet(SmallIconSet("decrypted"));
m_sslIcon->setEnabled(false);
connect(m_sslIcon, SIGNAL(clicked()), this, SLOT(slotDisplayCertInfo()));
- m_statusMsg = new QLabel(this);
- m_statusMsg->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken);
+ m_statusMsg = new TQLabel(this);
+ m_statusMsg->setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken);
m_statusMsg->setText(i18n("Idle."));
statusLayout->addWidget(m_statusMsg, 1);
@@ -222,7 +222,7 @@ const KURL &View::url() const
return m_detailsView->url();
}
-const QValueList<LocationNavigator::Element> View::history(int &index) const
+const TQValueList<LocationNavigator::Element> View::history(int &index) const
{
return m_detailsView->history(index);
}
@@ -295,13 +295,13 @@ void View::reload()
m_detailsView->reload();
}
-void View::rename(const KURL &source, const QString &name)
+void View::rename(const KURL &source, const TQString &name)
{
KURL dest(source.upURL());
dest.addPath(name);
if (source.isLocalFile())
- KIO::rename(source, dest, false);
+ TDEIO::rename(source, dest, false);
else
m_session->getClient()->rename(source, dest);
}
@@ -359,10 +359,10 @@ void View::updateBookmarks()
{
// Repopulate bookmarks menu on updates
m_actions->m_connectAction->popupMenu()->clear();
- KFTPBookmarks::Manager::self()->guiPopulateBookmarksMenu(m_actions->m_connectAction, QDomNode(), false, m_session);
+ KFTPBookmarks::Manager::self()->guiPopulateBookmarksMenu(m_actions->m_connectAction, TQDomNode(), false, m_session);
}
-void View::slotHistoryActivated(const QString &text)
+void View::slotHistoryActivated(const TQString &text)
{
KURL dest = url();
dest.setPath(text);
@@ -372,7 +372,7 @@ void View::slotHistoryActivated(const QString &text)
void View::slotHistoryEraseClicked()
{
- m_historyCombo->setCurrentText(QString::null);
+ m_historyCombo->setCurrentText(TQString::null);
m_historyCombo->setFocus();
}
@@ -426,7 +426,7 @@ void View::slotEngineEvent(KFTPEngine::Event *event)
}
// Reset selected charset to default
- KPopupMenu *menu = m_actions->m_changeEncodingAction->popupMenu();
+ TDEPopupMenu *menu = m_actions->m_changeEncodingAction->popupMenu();
menu->setItemChecked(m_actions->m_defaultCharsetOption, true);
menu->setItemChecked(m_actions->m_curCharsetOption, false);
m_actions->m_curCharsetOption = m_actions->m_defaultCharsetOption;
diff --git a/kftpgrabber/src/widgets/browser/view.h b/kftpgrabber/src/widgets/browser/view.h
index 67dffa6..198a383 100644
--- a/kftpgrabber/src/widgets/browser/view.h
+++ b/kftpgrabber/src/widgets/browser/view.h
@@ -38,24 +38,24 @@
#include "browser/locationnavigator.h"
-#include <qwidget.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qtimer.h>
-#include <qdatetime.h>
-#include <qsplitter.h>
+#include <ntqwidget.h>
+#include <ntqlabel.h>
+#include <ntqpushbutton.h>
+#include <ntqtimer.h>
+#include <ntqdatetime.h>
+#include <ntqsplitter.h>
#include <kurl.h>
-#include <kfileitem.h>
+#include <tdefileitem.h>
namespace KFTPSession {
class Session;
class Manager;
}
-class KToolBar;
+class TDEToolBar;
class KHistoryCombo;
-class KAction;
+class TDEAction;
class KLineEdit;
namespace KFTPEngine {
@@ -76,7 +76,7 @@ class FilterWidget;
/**
* @author Jernej Kos
*/
-class View : public QWidget
+class View : public TQWidget
{
Q_OBJECT
friend class Actions;
@@ -89,7 +89,7 @@ public:
/**
* Class constructor.
*/
- View(QWidget *parent, const char *name, KFTPEngine::Thread *client, KFTPSession::Session *session);
+ View(TQWidget *parent, const char *name, KFTPEngine::Thread *client, KFTPSession::Session *session);
/**
* Class destructor.
@@ -107,7 +107,7 @@ public:
* @param index Variable to save the current history position to
* @return Current history element list
*/
- const QValueList<LocationNavigator::Element> history(int &index) const;
+ const TQValueList<LocationNavigator::Element> history(int &index) const;
/**
* Returns all currenty selected items.
@@ -181,7 +181,7 @@ public:
/**
* Renames the provided source file to a new name.
*/
- void rename(const KURL &source, const QString &name);
+ void rename(const KURL &source, const TQString &name);
/**
* Returns the details view widget.
@@ -196,7 +196,7 @@ public:
/**
* Returns the status label widget.
*/
- QLabel *getStatusLabel() const { return m_statusMsg; }
+ TQLabel *getStatusLabel() const { return m_statusMsg; }
/**
* Returns the associated session.
@@ -221,17 +221,17 @@ private:
Actions *m_actions;
- KToolBar *m_toolBarFirst; /* Upper toolbar */
- KToolBar *m_toolBarSecond; /* Lower toolbar */
- KToolBar *m_searchToolBar;
+ TDEToolBar *m_toolBarFirst; /* Upper toolbar */
+ TDEToolBar *m_toolBarSecond; /* Lower toolbar */
+ TDEToolBar *m_searchToolBar;
- QLabel *m_statusMsg;
- QLabel *m_connDurationMsg;
- QPushButton *m_sslIcon;
- QSplitter *m_splitter;
+ TQLabel *m_statusMsg;
+ TQLabel *m_connDurationMsg;
+ TQPushButton *m_sslIcon;
+ TQSplitter *m_splitter;
- QTimer *m_connTimer;
- QTime m_connDuration;
+ TQTimer *m_connTimer;
+ TQTime m_connDuration;
KHistoryCombo *m_historyCombo;
FilterWidget *m_searchFilter;
@@ -240,7 +240,7 @@ public slots:
void updateBookmarks();
private slots:
void slotHistoryEraseClicked();
- void slotHistoryActivated(const QString &text);
+ void slotHistoryActivated(const TQString &text);
void slotHistoryChanged();
void slotDisplayCertInfo();