summaryrefslogtreecommitdiffstats
path: root/src/kasablanca.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kasablanca.cpp')
-rw-r--r--src/kasablanca.cpp128
1 files changed, 64 insertions, 64 deletions
diff --git a/src/kasablanca.cpp b/src/kasablanca.cpp
index ecaf77c..8895be4 100644
--- a/src/kasablanca.cpp
+++ b/src/kasablanca.cpp
@@ -20,12 +20,12 @@
#include <kapplication.h>
#include <kdeversion.h>
#include <kedittoolbar.h>
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <kiconloader.h>
#include <kicontheme.h>
#include <kkeydialog.h>
-#include <klocale.h>
-#include <kmainwindow.h>
+#include <tdelocale.h>
+#include <tdemainwindow.h>
#include <kmenubar.h>
#include <kmessagebox.h>
#include <kstandarddirs.h>
@@ -36,13 +36,13 @@
#include <kpassivepopup.h>
#include <klineedit.h>
-#include <qtextedit.h>
-#include <qcolor.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qheader.h>
-#include <qtoolbutton.h>
-#include <qaction.h>
+#include <ntqtextedit.h>
+#include <ntqcolor.h>
+#include <ntqlistview.h>
+#include <ntqpushbutton.h>
+#include <ntqheader.h>
+#include <ntqtoolbutton.h>
+#include <ntqaction.h>
#include "Q_colorspreferencesdialog.h"
#include "Q_generalpreferencesdialog.h"
@@ -62,7 +62,7 @@
using namespace std;
-Kasablanca::Kasablanca() : KMainWindow( 0, "Kasablanca" ), mp_view(new KasablancaMainWindow(this))
+Kasablanca::Kasablanca() : TDEMainWindow( 0, "Kasablanca" ), mp_view(new KasablancaMainWindow(this))
{
//first, load the system tray icon
mp_systemtray = new KSystemTray(this);
@@ -145,12 +145,12 @@ Kasablanca::Kasablanca() : KMainWindow( 0, "Kasablanca" ), mp_view(new Kasablanc
SLOT(SLOT_QueueItems(KbDirInfo*, FtpSession*, FtpSession*, bool)));
connect(mp_session_b, SIGNAL(gui_queueitems(KbDirInfo*, FtpSession*, FtpSession*, bool)),
SLOT(SLOT_QueueItems(KbDirInfo*, FtpSession*, FtpSession*, bool)));
- connect(mp_session_a, SIGNAL(gui_succeedtransfer(QListViewItem*)), SLOT(SLOT_NextTransfer(QListViewItem*)));
- connect(mp_session_b, SIGNAL(gui_succeedtransfer(QListViewItem*)), SLOT(SLOT_NextTransfer(QListViewItem*)));
+ connect(mp_session_a, SIGNAL(gui_succeedtransfer(TQListViewItem*)), SLOT(SLOT_NextTransfer(TQListViewItem*)));
+ connect(mp_session_b, SIGNAL(gui_succeedtransfer(TQListViewItem*)), SLOT(SLOT_NextTransfer(TQListViewItem*)));
connect(mp_session_a, SIGNAL(gui_clearqueue(FtpSession*)), SLOT(SLOT_ClearQueue(FtpSession*)));
connect(mp_session_b, SIGNAL(gui_clearqueue(FtpSession*)), SLOT(SLOT_ClearQueue(FtpSession*)));
- QAction *deleteShortcut = new QAction( QPixmap(), "&Delete",
+ TQAction *deleteShortcut = new TQAction( TQPixmap(), "&Delete",
Key_Delete, this, "delete" );
connect(deleteShortcut, SIGNAL(activated()), this, SLOT(SLOT_SkipTasks()));
@@ -167,12 +167,12 @@ void Kasablanca::setupGUI()
mp_view->BrowserA->setSorting(-1);
mp_view->BrowserB->setSorting(-1);
- mp_view->TransferButtonA->setIconSet(KGlobal::iconLoader()->loadIconSet("forward",KIcon::Toolbar));
- mp_view->TransferButtonB->setIconSet(KGlobal::iconLoader()->loadIconSet("back",KIcon::Toolbar));
- mp_view->RefreshButtonA->setIconSet(KGlobal::iconLoader()->loadIconSet("reload",KIcon::Toolbar));
- mp_view->RefreshButtonB->setIconSet(KGlobal::iconLoader()->loadIconSet("reload",KIcon::Toolbar));
- mp_view->ConnectButtonA->setIconSet(KGlobal::iconLoader()->loadIconSet("connect_no",KIcon::Toolbar));
- mp_view->ConnectButtonB->setIconSet(KGlobal::iconLoader()->loadIconSet("connect_no",KIcon::Toolbar));
+ mp_view->TransferButtonA->setIconSet(TDEGlobal::iconLoader()->loadIconSet("forward",TDEIcon::Toolbar));
+ mp_view->TransferButtonB->setIconSet(TDEGlobal::iconLoader()->loadIconSet("back",TDEIcon::Toolbar));
+ mp_view->RefreshButtonA->setIconSet(TDEGlobal::iconLoader()->loadIconSet("reload",TDEIcon::Toolbar));
+ mp_view->RefreshButtonB->setIconSet(TDEGlobal::iconLoader()->loadIconSet("reload",TDEIcon::Toolbar));
+ mp_view->ConnectButtonA->setIconSet(TDEGlobal::iconLoader()->loadIconSet("connect_no",TDEIcon::Toolbar));
+ mp_view->ConnectButtonB->setIconSet(TDEGlobal::iconLoader()->loadIconSet("connect_no",TDEIcon::Toolbar));
}
void Kasablanca::applyConfig()
@@ -260,20 +260,20 @@ void Kasablanca::optionsConfigureToolbars()
// use the standard toolbar editor
#if defined(KDE_MAKE_VERSION)
# if KDE_VERSION >= KDE_MAKE_VERSION(3,1,0)
- saveMainWindowSettings(KGlobal::config(), autoSaveGroup());
+ saveMainWindowSettings(TDEGlobal::config(), autoSaveGroup());
# else
- saveMainWindowSettings(KGlobal::config());
+ saveMainWindowSettings(TDEGlobal::config());
# endif
#else
- saveMainWindowSettings(KGlobal::config());
+ saveMainWindowSettings(TDEGlobal::config());
#endif
}
void Kasablanca::optionsPreferences()
{
- if (KConfigDialog::showDialog("settings")) return;
+ if (TDEConfigDialog::showDialog("settings")) return;
- KConfigDialog* dialog = new KConfigDialog(0, "settings", KbConfig::self(), KDialogBase::IconList,
+ TDEConfigDialog* dialog = new TDEConfigDialog(0, "settings", KbConfig::self(), KDialogBase::IconList,
KDialogBase::Ok | KDialogBase::Apply | KDialogBase::Cancel | KDialogBase::Help);
dialog->setHelp("globalhelp");
@@ -296,31 +296,31 @@ void Kasablanca::newToolbarConfig()
#if defined(KDE_MAKE_VERSION)
# if KDE_VERSION >= KDE_MAKE_VERSION(3,1,0)
- applyMainWindowSettings(KGlobal::config(), autoSaveGroup());
+ applyMainWindowSettings(TDEGlobal::config(), autoSaveGroup());
# else
- applyMainWindowSettings(KGlobal::config());
+ applyMainWindowSettings(TDEGlobal::config());
# endif
#else
- applyMainWindowSettings(KGlobal::config());
+ applyMainWindowSettings(TDEGlobal::config());
#endif
}
void Kasablanca::setupMenu()
{
- QWidget *w;
+ TQWidget *w;
w = factory()->container("connect menu", this);
- if (w == NULL) qWarning("ERROR: 'connect menu' not found in .ui file");
+ if (w == NULL) tqWarning("ERROR: 'connect menu' not found in .ui file");
else
{
- QPopupMenu *menu = static_cast<QPopupMenu *>(w);
+ TQPopupMenu *menu = static_cast<TQPopupMenu *>(w);
menu->insertItem(i18n("Session A"), &m_bookmarksmenu_a);
menu->insertItem(i18n("Session B"), &m_bookmarksmenu_b);
}
w = factory()->container("action menu", this);
- if (w == NULL) qWarning("ERROR: 'action menu' not found in .ui file");
+ if (w == NULL) tqWarning("ERROR: 'action menu' not found in .ui file");
else
{
- QPopupMenu *menu = static_cast<QPopupMenu *>(w);
+ TQPopupMenu *menu = static_cast<TQPopupMenu *>(w);
menu->insertItem(i18n("Session A"), &m_rclickmenu_a);
menu->insertItem(i18n("Session B"), &m_rclickmenu_b);
menu->insertItem(i18n("Queue"), &m_rclickmenu_t);
@@ -350,20 +350,20 @@ void Kasablanca::setupMenu()
connect(&m_rclickmenu_a, SIGNAL(activated(int)), mp_session_a, SLOT(SLOT_ActionMenu(int)));
connect(&m_bookmarksmenu_a, SIGNAL(activated(int)), mp_session_a, SLOT(SLOT_ConnectMenu(int)));
- connect(mp_view->BrowserA, SIGNAL(doubleClicked(QListViewItem*)), mp_session_a, SLOT(SLOT_ItemClicked(QListViewItem*)));
- connect(mp_view->BrowserA, SIGNAL(rightButtonPressed(QListViewItem *, const QPoint &, int)),
- mp_session_a, SLOT(SLOT_ItemRClicked(QListViewItem *, const QPoint &, int)));
+ connect(mp_view->BrowserA, SIGNAL(doubleClicked(TQListViewItem*)), mp_session_a, SLOT(SLOT_ItemClicked(TQListViewItem*)));
+ connect(mp_view->BrowserA, SIGNAL(rightButtonPressed(TQListViewItem *, const TQPoint &, int)),
+ mp_session_a, SLOT(SLOT_ItemRClicked(TQListViewItem *, const TQPoint &, int)));
connect(mp_view->BrowserA->header(), SIGNAL (clicked(int)), mp_session_a, SLOT (SLOT_HeaderClicked(int)));
connect(&m_rclickmenu_b, SIGNAL(activated(int)), mp_session_b, SLOT(SLOT_ActionMenu(int)));
connect(&m_bookmarksmenu_b, SIGNAL(activated(int)), mp_session_b, SLOT(SLOT_ConnectMenu(int)));
- connect(mp_view->BrowserB, SIGNAL(doubleClicked(QListViewItem*)), mp_session_b, SLOT(SLOT_ItemClicked(QListViewItem*)));
- connect(mp_view->BrowserB, SIGNAL(rightButtonPressed(QListViewItem *, const QPoint &, int)),
- mp_session_b, SLOT(SLOT_ItemRClicked(QListViewItem *, const QPoint &, int)));
+ connect(mp_view->BrowserB, SIGNAL(doubleClicked(TQListViewItem*)), mp_session_b, SLOT(SLOT_ItemClicked(TQListViewItem*)));
+ connect(mp_view->BrowserB, SIGNAL(rightButtonPressed(TQListViewItem *, const TQPoint &, int)),
+ mp_session_b, SLOT(SLOT_ItemRClicked(TQListViewItem *, const TQPoint &, int)));
connect(mp_view->BrowserB->header(), SIGNAL(clicked(int)), mp_session_b, SLOT(SLOT_HeaderClicked(int)));
- connect( mp_view->TaskView, SIGNAL (rightButtonPressed( QListViewItem *, const QPoint &, int )), this,
- SLOT (SLOT_ItemRightClickedT(QListViewItem *, const QPoint &, int )));
+ connect( mp_view->TaskView, SIGNAL (rightButtonPressed( TQListViewItem *, const TQPoint &, int )), this,
+ SLOT (SLOT_ItemRightClickedT(TQListViewItem *, const TQPoint &, int )));
m_rclickmenu_t.connectItem(Start, this, SLOT(SLOT_ProcessQueue()));
m_rclickmenu_t.connectItem(Skip, this, SLOT(SLOT_SkipTasks()));
@@ -371,15 +371,15 @@ void Kasablanca::setupMenu()
void Kasablanca::setupStatusBar()
{
- m_iconencrypted = KGlobal::iconLoader()->loadIconSet("encrypted",KIcon::Small).pixmap(QIconSet::Small,QIconSet::Normal);
- m_iconunencrypted = KGlobal::iconLoader()->loadIconSet("encrypted",KIcon::Small).pixmap(QIconSet::Small,QIconSet::Disabled);
+ m_iconencrypted = TDEGlobal::iconLoader()->loadIconSet("encrypted",TDEIcon::Small).pixmap(TQIconSet::Small,TQIconSet::Normal);
+ m_iconunencrypted = TDEGlobal::iconLoader()->loadIconSet("encrypted",TDEIcon::Small).pixmap(TQIconSet::Small,TQIconSet::Disabled);
- mp_statusline_a = new QLabel("", statusBar());
- mp_encryptionicon_a = new QLabel(statusBar());
+ mp_statusline_a = new TQLabel("", statusBar());
+ mp_encryptionicon_a = new TQLabel(statusBar());
mp_encryptionicon_a->setPixmap(m_iconunencrypted);
- mp_statusline_b = new QLabel("", statusBar());
- mp_encryptionicon_b = new QLabel(statusBar());
+ mp_statusline_b = new TQLabel("", statusBar());
+ mp_encryptionicon_b = new TQLabel(statusBar());
mp_encryptionicon_b->setPixmap(m_iconunencrypted);
statusBar()->addWidget(mp_statusline_a, 1);
@@ -427,11 +427,11 @@ void Kasablanca::SLOT_QueueItems(KbDirInfo *dir, FtpSession* src, FtpSession* ds
}
}
-void Kasablanca::QueueItemsRecurse(KbDirInfo *dir, FtpSession* src, FtpSession* dst, QListViewItem* parent)
+void Kasablanca::QueueItemsRecurse(KbDirInfo *dir, FtpSession* src, FtpSession* dst, TQListViewItem* parent)
{
list<KbFileInfo*>* filelist;
list<KbDirInfo*>* dirlist;
- QListViewItem *after, *lastchild;
+ TQListViewItem *after, *lastchild;
filelist = dir->Filelist();
dirlist = dir->Dirlist();
@@ -457,7 +457,7 @@ void Kasablanca::QueueItemsRecurse(KbDirInfo *dir, FtpSession* src, FtpSession*
if (parent) after = new KbTransferFile(parent, after, src, dst, srcfi, dstfi);
else new KbTransferFile(mp_view->TaskView, lastchild /*mp_view->TaskView->lastItem()*/, src, dst, srcfi, dstfi);
}
- else qWarning("INFO: entry ignored due to matched skiplist regexp");
+ else tqWarning("INFO: entry ignored due to matched skiplist regexp");
}
after = NULL;
@@ -474,7 +474,7 @@ void Kasablanca::QueueItemsRecurse(KbDirInfo *dir, FtpSession* src, FtpSession*
else after = new KbTransferDir(mp_view->TaskView, lastchild /*mp_view->TaskView->lastItem()*/, src, dst, srcfi, dstfi);
QueueItemsRecurse(*dirIterator, src, dst, after);
}
- else qWarning("INFO: entry ignored due to matched skiplist regexp");
+ else tqWarning("INFO: entry ignored due to matched skiplist regexp");
}
delete dir;
}
@@ -483,7 +483,7 @@ void Kasablanca::SLOT_EditBookmarks()
{
BookmarkDialog dlg;
- if (dlg.exec() == QDialog::Accepted)
+ if (dlg.exec() == TQDialog::Accepted)
{
InitBookmarks();
}
@@ -511,14 +511,14 @@ void Kasablanca::SLOT_ClearQueue(FtpSession*)
mp_view->TaskView->clear();
}
-void Kasablanca::SLOT_ItemRightClickedT(QListViewItem *, const QPoint & point, int)
+void Kasablanca::SLOT_ItemRightClickedT(TQListViewItem *, const TQPoint & point, int)
{
m_rclickmenu_t.exec(point);
}
void Kasablanca::SLOT_SkipTasks()
{
- QListViewItemIterator it(mp_view->TaskView);
+ TQListViewItemIterator it(mp_view->TaskView);
while ( it.current() )
{
if (it.current()->isSelected()) delete it.current();
@@ -532,7 +532,7 @@ void Kasablanca::SLOT_SelectionChanged()
int counter_b = 0;
bool flag;
- QListViewItemIterator ita(mp_view->BrowserA);
+ TQListViewItemIterator ita(mp_view->BrowserA);
while ( ita.current() )
{
if (ita.current()->isSelected()) counter_a++;
@@ -551,7 +551,7 @@ void Kasablanca::SLOT_SelectionChanged()
m_rclickmenu_a.setItemEnabled(Rename, (counter_a >= 1));
m_rclickmenu_a.setItemEnabled(Delete, (counter_a >= 1));
- QListViewItemIterator itb(mp_view->BrowserB);
+ TQListViewItemIterator itb(mp_view->BrowserB);
while ( itb.current() )
{
if (itb.current()->isSelected()) counter_b++;
@@ -571,9 +571,9 @@ void Kasablanca::SLOT_SelectionChanged()
m_rclickmenu_b.setItemEnabled(Delete, (counter_b >= 1));
}
-void Kasablanca::SLOT_NextTransfer(QListViewItem* item)
+void Kasablanca::SLOT_NextTransfer(TQListViewItem* item)
{
- QListViewItem *next;
+ TQListViewItem *next;
next = NextTransfer(item);
if (next) ProcessQueue(static_cast<KbTransferItem*>(next));
else QueueFinished();
@@ -583,19 +583,19 @@ void Kasablanca::QueueFinished()
{
if (m_onqueuefinishedenabled)
{
- KProcess* p = new KProcess();
- *p << QStringList::split(" ", m_onqueuefinished);
- connect(p, SIGNAL(processExited(KProcess*)), SLOT(SLOT_LocalProcessExited(KProcess*)));
+ TDEProcess* p = new TDEProcess();
+ *p << TQStringList::split(" ", m_onqueuefinished);
+ connect(p, SIGNAL(processExited(TDEProcess*)), SLOT(SLOT_LocalProcessExited(TDEProcess*)));
p->start();
}
if (KbConfig::systrayIsEnabled()) KPassivePopup::message("Transfer is finished.", mp_systemtray);
- //QToolTip::remove(mp_systemtray);
+ //TQToolTip::remove(mp_systemtray);
}
-QListViewItem* Kasablanca::NextTransfer(QListViewItem* item)
+TQListViewItem* Kasablanca::NextTransfer(TQListViewItem* item)
{
FtpSession *src, *dst;
- QListViewItem *parent, *next, *retval;
+ TQListViewItem *parent, *next, *retval;
src = static_cast<KbTransferItem*>(item)->SrcSession();
dst = static_cast<KbTransferItem*>(item)->DstSession();
next = item->nextSibling();