Rename a number of classes to enhance compatibility with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 2cf12b3b4b
commit 4ba6286d9e

@ -248,7 +248,7 @@ void FileSelectDlg::setupMultifileTorrent()
void FileSelectDlg::setupSinglefileTorrent() void FileSelectDlg::setupSinglefileTorrent()
{ {
m_file_view->clear(); m_file_view->clear();
KListViewItem* single_root = new KListViewItem(m_file_view); TDEListViewItem* single_root = new TDEListViewItem(m_file_view);
single_root->setText(0,tc->getStats().torrent_name); single_root->setText(0,tc->getStats().torrent_name);
single_root->setText(1,BytesToString(tc->getStats().total_bytes)); single_root->setText(1,BytesToString(tc->getStats().total_bytes));
single_root->setText(2,i18n("Yes")); single_root->setText(2,i18n("Yes"));

@ -132,7 +132,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="KListView" row="0" column="0" rowspan="4" colspan="1"> <widget class="TDEListView" row="0" column="0" rowspan="4" colspan="1">
<column> <column>
<property name="text"> <property name="text">
<string>File</string> <string>File</string>

@ -45,7 +45,7 @@ FilterBar::FilterBar(TQWidget *parent, const char *name) :
TQHBoxLayout* layout = new TQHBoxLayout(foo); TQHBoxLayout* layout = new TQHBoxLayout(foo);
layout->addSpacing(gap); layout->addSpacing(gap);
m_close = new KToolBarButton("fileclose",0,this); m_close = new TDEToolBarButton("fileclose",0,this);
connect(m_close,TQT_SIGNAL(clicked()),this,TQT_SLOT(hide())); connect(m_close,TQT_SIGNAL(clicked()),this,TQT_SLOT(hide()));
layout->addWidget(m_close); layout->addWidget(m_close);

@ -27,7 +27,7 @@ class TQCheckBox;
class TDEConfig; class TDEConfig;
class KLineEdit; class KLineEdit;
class KPushButton; class KPushButton;
class KToolBarButton; class TDEToolBarButton;
namespace kt namespace kt
{ {
@ -64,7 +64,7 @@ private:
KLineEdit* m_filterInput; KLineEdit* m_filterInput;
KPushButton* m_clear; KPushButton* m_clear;
TQCheckBox* m_case_sensitive; TQCheckBox* m_case_sensitive;
KToolBarButton* m_close; TDEToolBarButton* m_close;
TQString m_name_filter; TQString m_name_filter;
}; };

@ -41,13 +41,13 @@ using namespace bt;
namespace kt namespace kt
{ {
GroupViewItem::GroupViewItem(GroupView* parent,Group* g) : KListViewItem(parent),gview(parent) GroupViewItem::GroupViewItem(GroupView* parent,Group* g) : TDEListViewItem(parent),gview(parent)
{ {
setText(0,g->groupName()); setText(0,g->groupName());
setPixmap(0,g->groupIcon()); setPixmap(0,g->groupIcon());
} }
GroupViewItem::GroupViewItem(GroupView* gview,KListViewItem* parent,Group* g) : KListViewItem(parent),gview(gview) GroupViewItem::GroupViewItem(GroupView* gview,TDEListViewItem* parent,Group* g) : TDEListViewItem(parent),gview(gview)
{ {
setText(0,g->groupName()); setText(0,g->groupName());
setPixmap(0,g->groupIcon()); setPixmap(0,g->groupIcon());
@ -65,8 +65,8 @@ namespace kt
return TQString::compare(text(1),i->text(1)); return TQString::compare(text(1),i->text(1));
} }
GroupView::GroupView(ViewManager* view,KActionCollection* col,TQWidget *parent, const char *name) GroupView::GroupView(ViewManager* view,TDEActionCollection* col,TQWidget *parent, const char *name)
: KListView(parent, name),view(view),custom_root(0) : TDEListView(parent, name),view(view),custom_root(0)
{ {
setFullWidth(true); setFullWidth(true);
setRootIsDecorated(true); setRootIsDecorated(true);
@ -81,8 +81,8 @@ namespace kt
current = gman->allGroup(); current = gman->allGroup();
connect(this,TQT_SIGNAL(clicked(TQListViewItem*)),this,TQT_SLOT(onExecuted( TQListViewItem* ))); connect(this,TQT_SIGNAL(clicked(TQListViewItem*)),this,TQT_SLOT(onExecuted( TQListViewItem* )));
connect(this,TQT_SIGNAL(contextMenu(KListView*,TQListViewItem*,const TQPoint & )), connect(this,TQT_SIGNAL(contextMenu(TDEListView*,TQListViewItem*,const TQPoint & )),
this,TQT_SLOT(showContextMenu( KListView*, TQListViewItem*, const TQPoint& ))); this,TQT_SLOT(showContextMenu( TDEListView*, TQListViewItem*, const TQPoint& )));
connect(this,TQT_SIGNAL(dropped(TQDropEvent*,TQListViewItem*)), connect(this,TQT_SIGNAL(dropped(TQDropEvent*,TQListViewItem*)),
this,TQT_SLOT(onDropped( TQDropEvent*, TQListViewItem* ))); this,TQT_SLOT(onDropped( TQDropEvent*, TQListViewItem* )));
@ -104,7 +104,7 @@ namespace kt
addGroup(gman->activeDownloadsGroup(), active); addGroup(gman->activeDownloadsGroup(), active);
addGroup(gman->activeUploadsGroup(), active); addGroup(gman->activeUploadsGroup(), active);
custom_root = new KListViewItem(all,i18n("Custom Groups")); custom_root = new TDEListViewItem(all,i18n("Custom Groups"));
custom_root->setPixmap(0,TDEGlobal::iconLoader()->loadIcon("folder",KIcon::Small)); custom_root->setPixmap(0,TDEGlobal::iconLoader()->loadIcon("folder",KIcon::Small));
setOpen(custom_root,true); setOpen(custom_root,true);
} }
@ -131,20 +131,20 @@ namespace kt
sort(); sort();
} }
void GroupView::createMenu(KActionCollection* col) void GroupView::createMenu(TDEActionCollection* col)
{ {
menu = new KPopupMenu(this); menu = new TDEPopupMenu(this);
new_group = new KAction(i18n("New Group"),"filenew",0, new_group = new TDEAction(i18n("New Group"),"filenew",0,
TQT_TQOBJECT(this), TQT_SLOT(addGroup()),col, "New Group"); TQT_TQOBJECT(this), TQT_SLOT(addGroup()),col, "New Group");
edit_group = new KAction(i18n("Edit Name"),"edit",0, edit_group = new TDEAction(i18n("Edit Name"),"edit",0,
TQT_TQOBJECT(this), TQT_SLOT(editGroupName()),col,"Edit Group Name"); TQT_TQOBJECT(this), TQT_SLOT(editGroupName()),col,"Edit Group Name");
remove_group = new KAction(i18n("Remove Group"),"remove",0, remove_group = new TDEAction(i18n("Remove Group"),"remove",0,
TQT_TQOBJECT(this), TQT_SLOT(removeGroup()),col,"Remove Group"); TQT_TQOBJECT(this), TQT_SLOT(removeGroup()),col,"Remove Group");
open_in_new_tab = new KAction(i18n("Open Tab"),"fileopen",0, open_in_new_tab = new TDEAction(i18n("Open Tab"),"fileopen",0,
TQT_TQOBJECT(this) ,TQT_SLOT(openView()),col,"Open Tab"); TQT_TQOBJECT(this) ,TQT_SLOT(openView()),col,"Open Tab");
open_in_new_tab->plug(menu); open_in_new_tab->plug(menu);
@ -226,7 +226,7 @@ namespace kt
} }
} }
GroupViewItem* GroupView::addGroup(Group* g,KListViewItem* parent) GroupViewItem* GroupView::addGroup(Group* g,TDEListViewItem* parent)
{ {
GroupViewItem* li = 0; GroupViewItem* li = 0;
if (parent) if (parent)
@ -246,7 +246,7 @@ namespace kt
return li; return li;
} }
void GroupView::showContextMenu(KListView* ,TQListViewItem* item,const TQPoint & p) void GroupView::showContextMenu(TDEListView* ,TQListViewItem* item,const TQPoint & p)
{ {
current_item = dynamic_cast<GroupViewItem*>(item); current_item = dynamic_cast<GroupViewItem*>(item);
@ -318,7 +318,7 @@ namespace kt
saveGroups(); saveGroups();
} }
void GroupView::updateGroupsSubMenu(KPopupMenu* gsm) void GroupView::updateGroupsSubMenu(TDEPopupMenu* gsm)
{ {
gsm->clear(); gsm->clear();
for (GroupManager::iterator i = gman->begin();i != gman->end();i++) for (GroupManager::iterator i = gman->begin();i != gman->end();i++)

@ -23,8 +23,8 @@
#include <klistview.h> #include <klistview.h>
#include <util/ptrmap.h> #include <util/ptrmap.h>
class KPopupMenu; class TDEPopupMenu;
class KActionCollection; class TDEActionCollection;
class ViewManager; class ViewManager;
class KTorrentView; class KTorrentView;
@ -35,13 +35,13 @@ namespace kt
class GroupManager; class GroupManager;
class TorrentInterface; class TorrentInterface;
class GroupViewItem : public KListViewItem class GroupViewItem : public TDEListViewItem
{ {
Group* g; Group* g;
GroupView* gview; GroupView* gview;
public: public:
GroupViewItem(GroupView* parent,Group* g); GroupViewItem(GroupView* parent,Group* g);
GroupViewItem(GroupView* gview,KListViewItem* parent,Group* g); GroupViewItem(GroupView* gview,TDEListViewItem* parent,Group* g);
virtual ~GroupViewItem(); virtual ~GroupViewItem();
virtual int compare(TQListViewItem* i,int col,bool ascending) const; virtual int compare(TQListViewItem* i,int col,bool ascending) const;
@ -50,12 +50,12 @@ namespace kt
/** /**
@author Joris Guisson <joris.guisson@gmail.com> @author Joris Guisson <joris.guisson@gmail.com>
*/ */
class GroupView : public KListView class GroupView : public TDEListView
{ {
Q_OBJECT Q_OBJECT
public: public:
GroupView(ViewManager* view,KActionCollection* col,TQWidget *parent = 0, const char *name = 0); GroupView(ViewManager* view,TDEActionCollection* col,TQWidget *parent = 0, const char *name = 0);
virtual ~GroupView(); virtual ~GroupView();
/// Get the current group /// Get the current group
@ -76,14 +76,14 @@ namespace kt
void onTorrentRemoved(kt::TorrentInterface* tc); void onTorrentRemoved(kt::TorrentInterface* tc);
/// Update a groups sub menu /// Update a groups sub menu
void updateGroupsSubMenu(KPopupMenu* gsm); void updateGroupsSubMenu(TDEPopupMenu* gsm);
/// An item was activated in the groups sub menu of a KTorrentView /// An item was activated in the groups sub menu of a KTorrentView
void onGroupsSubMenuItemActivated(KTorrentView* v,const TQString & group); void onGroupsSubMenuItemActivated(KTorrentView* v,const TQString & group);
private slots: private slots:
void onExecuted(TQListViewItem* item); void onExecuted(TQListViewItem* item);
void showContextMenu(KListView* ,TQListViewItem* item,const TQPoint & p); void showContextMenu(TDEListView* ,TQListViewItem* item,const TQPoint & p);
void addGroup(); void addGroup();
void removeGroup(); void removeGroup();
void editGroupName(); void editGroupName();
@ -99,12 +99,12 @@ namespace kt
void groupRemoved(kt::Group* g); void groupRemoved(kt::Group* g);
private: private:
void createMenu(KActionCollection* col); void createMenu(TDEActionCollection* col);
GroupViewItem* addGroup(Group* g,KListViewItem* parent); GroupViewItem* addGroup(Group* g,TDEListViewItem* parent);
private: private:
ViewManager* view; ViewManager* view;
KListViewItem* custom_root; TDEListViewItem* custom_root;
bt::PtrMap<GroupViewItem*,Group> groups; bt::PtrMap<GroupViewItem*,Group> groups;
GroupManager* gman; GroupManager* gman;
TQString save_file; TQString save_file;
@ -112,11 +112,11 @@ namespace kt
Group* current; Group* current;
GroupViewItem* current_item; GroupViewItem* current_item;
KPopupMenu* menu; TDEPopupMenu* menu;
KAction* new_group; TDEAction* new_group;
KAction* edit_group; TDEAction* edit_group;
KAction* remove_group; TDEAction* remove_group;
KAction* open_in_new_tab; TDEAction* open_in_new_tab;
friend class GroupViewItem; friend class GroupViewItem;
}; };

@ -48,7 +48,7 @@ IPFilterWidget::IPFilterWidget(TQWidget *parent, const char *name)
for (TQStringList::Iterator it = blocklist->begin(); it != blocklist->end(); ++it) for (TQStringList::Iterator it = blocklist->begin(); it != blocklist->end(); ++it)
{ {
new KListViewItem(lstPeers, *it); new TDEListViewItem(lstPeers, *it);
} }
delete blocklist; delete blocklist;
@ -66,7 +66,7 @@ void IPFilterWidget::btnAdd_clicked()
if(v.validate( ip, var ) == TQValidator::Acceptable) if(v.validate( ip, var ) == TQValidator::Acceptable)
{ {
if(lstPeers->findItem(ip, 0) == 0) if(lstPeers->findItem(ip, 0) == 0)
new KListViewItem(lstPeers, ip); new TDEListViewItem(lstPeers, ip);
} }
else else
KMessageBox::sorry(0, i18n("You must enter IP in format 'XXX.XXX.XXX.XXX'. You can also use wildcards for ranges like '127.0.0.*'.")); KMessageBox::sorry(0, i18n("You must enter IP in format 'XXX.XXX.XXX.XXX'. You can also use wildcards for ranges like '127.0.0.*'."));
@ -181,7 +181,7 @@ void IPFilterWidget::loadFilter(TQString& fn)
continue; continue;
} }
new KListViewItem(lstPeers, line); new TDEListViewItem(lstPeers, line);
++i; ++i;
} }

@ -44,7 +44,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="KListView" row="2" column="0"> <widget class="TDEListView" row="2" column="0">
<column> <column>
<property name="text"> <property name="text">
<string>Peer IP address</string> <string>Peer IP address</string>

@ -295,8 +295,8 @@ void KTorrent::openView(kt::Group* g)
connect(v, TQT_SIGNAL(queue( kt::TorrentInterface* )), connect(v, TQT_SIGNAL(queue( kt::TorrentInterface* )),
m_core, TQT_SLOT(queue( kt::TorrentInterface* ))); m_core, TQT_SLOT(queue( kt::TorrentInterface* )));
connect(v,TQT_SIGNAL(updateGroupsSubMenu(KPopupMenu*)), connect(v,TQT_SIGNAL(updateGroupsSubMenu(TDEPopupMenu*)),
m_group_view,TQT_SLOT(updateGroupsSubMenu(KPopupMenu*))); m_group_view,TQT_SLOT(updateGroupsSubMenu(TDEPopupMenu*)));
connect(v,TQT_SIGNAL(groupsSubMenuItemActivated(KTorrentView*, const TQString&)), connect(v,TQT_SIGNAL(groupsSubMenuItemActivated(KTorrentView*, const TQString&)),
m_group_view,TQT_SLOT(onGroupsSubMenuItemActivated(KTorrentView*, const TQString&))); m_group_view,TQT_SLOT(onGroupsSubMenuItemActivated(KTorrentView*, const TQString&)));
@ -509,52 +509,52 @@ void KTorrent::setupActions()
KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection()); KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection());
KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection());
KAction* pref = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(optionsPreferences()), actionCollection()); TDEAction* pref = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(optionsPreferences()), actionCollection());
m_start = new KAction( m_start = new TDEAction(
i18n("to start", "Start"), "ktstart",0,TQT_TQOBJECT(this), TQT_SLOT(startDownload()), i18n("to start", "Start"), "ktstart",0,TQT_TQOBJECT(this), TQT_SLOT(startDownload()),
actionCollection(), "Start"); actionCollection(), "Start");
m_stop = new KAction( m_stop = new TDEAction(
i18n("to stop", "Stop"), "ktstop",0,TQT_TQOBJECT(this), TQT_SLOT(stopDownload()), i18n("to stop", "Stop"), "ktstop",0,TQT_TQOBJECT(this), TQT_SLOT(stopDownload()),
actionCollection(), "Stop"); actionCollection(), "Stop");
m_remove = new KAction( m_remove = new TDEAction(
i18n("Remove"), "ktremove",0,TQT_TQOBJECT(this), TQT_SLOT(removeDownload()), i18n("Remove"), "ktremove",0,TQT_TQOBJECT(this), TQT_SLOT(removeDownload()),
actionCollection(), "Remove"); actionCollection(), "Remove");
m_startall = new KAction( m_startall = new TDEAction(
i18n("to start all", "Start All"), "ktstart_all",0,TQT_TQOBJECT(this), TQT_SLOT(startAllDownloadsCurrentView()), i18n("to start all", "Start All"), "ktstart_all",0,TQT_TQOBJECT(this), TQT_SLOT(startAllDownloadsCurrentView()),
actionCollection(), "Start all"); actionCollection(), "Start all");
m_startall_systray = new KAction(i18n("to start all", "Start All"), "ktstart_all",0,TQT_TQOBJECT(this), TQT_SLOT(startAllDownloads()),actionCollection()); m_startall_systray = new TDEAction(i18n("to start all", "Start All"), "ktstart_all",0,TQT_TQOBJECT(this), TQT_SLOT(startAllDownloads()),actionCollection());
m_stopall = new KAction( m_stopall = new TDEAction(
i18n("to stop all", "Stop All"), "ktstop_all",0,TQT_TQOBJECT(this), TQT_SLOT(stopAllDownloadsCurrentView()), i18n("to stop all", "Stop All"), "ktstop_all",0,TQT_TQOBJECT(this), TQT_SLOT(stopAllDownloadsCurrentView()),
actionCollection(), "Stop all"); actionCollection(), "Stop all");
m_stopall_systray = new KAction(i18n("to stop all", "Stop All"), "ktstop_all",0,TQT_TQOBJECT(this), TQT_SLOT(stopAllDownloads()),actionCollection()); m_stopall_systray = new TDEAction(i18n("to stop all", "Stop All"), "ktstop_all",0,TQT_TQOBJECT(this), TQT_SLOT(stopAllDownloads()),actionCollection());
m_pasteurl = new KAction( m_pasteurl = new TDEAction(
i18n("to paste torrent URL", "Paste Torrent URL..."), "ktstart",0,TQT_TQOBJECT(this), TQT_SLOT(torrentPaste()), i18n("to paste torrent URL", "Paste Torrent URL..."), "ktstart",0,TQT_TQOBJECT(this), TQT_SLOT(torrentPaste()),
actionCollection(), "paste_url"); actionCollection(), "paste_url");
m_queuemgr = new KAction( m_queuemgr = new TDEAction(
i18n("to open Queue Manager", "Open Queue Manager..."), i18n("to open Queue Manager", "Open Queue Manager..."),
"ktqueuemanager", 0, TQT_TQOBJECT(this), TQT_SLOT(queueManagerShow()), "ktqueuemanager", 0, TQT_TQOBJECT(this), TQT_SLOT(queueManagerShow()),
actionCollection(), "Queue manager"); actionCollection(), "Queue manager");
m_queueaction = new KAction( m_queueaction = new TDEAction(
i18n("Enqueue/Dequeue"), i18n("Enqueue/Dequeue"),
"player_playlist", 0, m_view_man, TQT_SLOT(queueAction()), "player_playlist", 0, m_view_man, TQT_SLOT(queueAction()),
actionCollection(), "queue_action"); actionCollection(), "queue_action");
m_ipfilter = new KAction( m_ipfilter = new TDEAction(
i18n("IPFilter"), i18n("IPFilter"),
"filter", 0, TQT_TQOBJECT(this), TQT_SLOT(showIPFilter()), "filter", 0, TQT_TQOBJECT(this), TQT_SLOT(showIPFilter()),
actionCollection(), "ipfilter_action"); actionCollection(), "ipfilter_action");
m_datacheck = new KAction( m_datacheck = new TDEAction(
i18n("Check Data Integrity"), i18n("Check Data Integrity"),
TQString(),0,m_view_man,TQT_SLOT(checkDataIntegrity()),actionCollection(),"check_data"); TQString(),0,m_view_man,TQT_SLOT(checkDataIntegrity()),actionCollection(),"check_data");
@ -962,12 +962,12 @@ void KTorrent::openDefaultView()
openView(i18n("All Torrents")); openView(i18n("All Torrents"));
} }
KToolBar* KTorrent::addToolBar(const char* name) TDEToolBar* KTorrent::addToolBar(const char* name)
{ {
return toolBar(name); return toolBar(name);
} }
void KTorrent::removeToolBar(KToolBar* tb) void KTorrent::removeToolBar(TDEToolBar* tb)
{ {
delete tb; delete tb;
} }

@ -33,8 +33,8 @@
typedef TQValueList<TQCString> QCStringList; typedef TQValueList<TQCString> QCStringList;
class KAction; class TDEAction;
class KToggleAction; class TDEToggleAction;
class KURL; class KURL;
class KTorrentCore; class KTorrentCore;
class KTorrentView; class KTorrentView;
@ -104,8 +104,8 @@ public:
virtual void addToolWidget(TQWidget* w,const TQString & icon,const TQString & caption,ToolDock dock); virtual void addToolWidget(TQWidget* w,const TQString & icon,const TQString & caption,ToolDock dock);
virtual void removeToolWidget(TQWidget* w); virtual void removeToolWidget(TQWidget* w);
virtual const kt::TorrentInterface* getCurrentTorrent() const; virtual const kt::TorrentInterface* getCurrentTorrent() const;
virtual KToolBar* addToolBar(const char* name); virtual TDEToolBar* addToolBar(const char* name);
virtual void removeToolBar(KToolBar* tb); virtual void removeToolBar(TDEToolBar* tb);
virtual KProgress* addProgressBarToStatusBar(); virtual KProgress* addProgressBarToStatusBar();
virtual void removeProgressBarFromStatusBar(KProgress* p); virtual void removeProgressBarFromStatusBar(KProgress* p);
@ -198,8 +198,8 @@ private:
private: private:
kt::GroupView* m_group_view; kt::GroupView* m_group_view;
ViewManager* m_view_man; ViewManager* m_view_man;
KToggleAction *m_statusbarAction; TDEToggleAction *m_statusbarAction;
KToggleAction* m_menubarAction; TDEToggleAction* m_menubarAction;
KTorrentCore* m_core; KTorrentCore* m_core;
TrayIcon* m_systray_icon; TrayIcon* m_systray_icon;
@ -219,19 +219,19 @@ private:
TQLabel* m_statusDHT; TQLabel* m_statusDHT;
TQLabel* m_statusFirewall; TQLabel* m_statusFirewall;
KAction* m_start; TDEAction* m_start;
KAction* m_stop; TDEAction* m_stop;
KAction* m_remove; TDEAction* m_remove;
KAction* m_startall; TDEAction* m_startall;
KAction* m_startall_systray; TDEAction* m_startall_systray;
KAction* m_stopall; TDEAction* m_stopall;
KAction* m_stopall_systray; TDEAction* m_stopall_systray;
KAction* m_pasteurl; TDEAction* m_pasteurl;
KAction* m_queuemgr; TDEAction* m_queuemgr;
KAction* m_queueaction; TDEAction* m_queueaction;
KAction* m_datacheck; TDEAction* m_datacheck;
KAction* m_ipfilter; TDEAction* m_ipfilter;
KAction* m_find; TDEAction* m_find;
KProgress* m_status_prog; KProgress* m_status_prog;
}; };

@ -55,7 +55,7 @@ using namespace bt;
using namespace kt; using namespace kt;
TorrentView::TorrentView(KTorrentView* parent) : KListView(parent),ktview(parent) TorrentView::TorrentView(KTorrentView* parent) : TDEListView(parent),ktview(parent)
{} {}
TorrentView::~TorrentView() TorrentView::~TorrentView()
@ -79,7 +79,7 @@ bool TorrentView::eventFilter(TQObject* watched, TQEvent* e)
} }
} }
return KListView::eventFilter(watched, e); return TDEListView::eventFilter(watched, e);
} }
KTorrentView::KTorrentView(TQWidget *parent) KTorrentView::KTorrentView(TQWidget *parent)
@ -99,8 +99,8 @@ KTorrentView::KTorrentView(TQWidget *parent)
connect(view,TQT_SIGNAL(currentChanged(TQListViewItem* )), connect(view,TQT_SIGNAL(currentChanged(TQListViewItem* )),
this,TQT_SLOT(onExecuted(TQListViewItem* ))); this,TQT_SLOT(onExecuted(TQListViewItem* )));
connect(view,TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint& )), connect(view,TQT_SIGNAL(contextMenu(TDEListView*, TQListViewItem*, const TQPoint& )),
this,TQT_SLOT(showContextMenu(KListView*, TQListViewItem*, const TQPoint& ))); this,TQT_SLOT(showContextMenu(TDEListView*, TQListViewItem*, const TQPoint& )));
connect(view,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(onSelectionChanged())); connect(view,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(onSelectionChanged()));
@ -127,7 +127,7 @@ void KTorrentView::insertColumn(TQString label, TQt::AlignmentFlags align)
void KTorrentView::setupColumns() void KTorrentView::setupColumns()
{ {
//Header menu //Header menu
m_headerMenu = new KPopupMenu(view); m_headerMenu = new TDEPopupMenu(view);
m_headerMenu->setCheckable(true); m_headerMenu->setCheckable(true);
m_headerMenu->insertTitle(i18n("Visible columns")); m_headerMenu->insertTitle(i18n("Visible columns"));
@ -461,7 +461,7 @@ void KTorrentView::onExecuted(TQListViewItem* item)
} }
} }
void KTorrentView::showContextMenu(KListView* ,TQListViewItem*,const TQPoint & p) void KTorrentView::showContextMenu(TDEListView* ,TQListViewItem*,const TQPoint & p)
{ {
updateGroupsSubMenu(menu->getGroupsSubMenu()); updateGroupsSubMenu(menu->getGroupsSubMenu());
menu->show(p); menu->show(p);

@ -29,7 +29,7 @@ typedef TQValueList<TQCString> QCStringList;
class KURL; class KURL;
class KTorrentViewItem; class KTorrentViewItem;
class KPopupMenu; class TDEPopupMenu;
class KTorrentCore; class KTorrentCore;
class KTorrentViewMenu; class KTorrentViewMenu;
class KTorrentView; class KTorrentView;
@ -45,7 +45,7 @@ namespace kt
using namespace bt; using namespace bt;
class TorrentView : public KListView class TorrentView : public TDEListView
{ {
public: public:
TorrentView(KTorrentView* parent); TorrentView(KTorrentView* parent);
@ -131,7 +131,7 @@ public:
TQPtrList<TQListViewItem> selectedItems() {return view->selectedItems();} TQPtrList<TQListViewItem> selectedItems() {return view->selectedItems();}
KListView* listView() {return view;} TDEListView* listView() {return view;}
/** /**
* Toggle the visibility of the filter bar * Toggle the visibility of the filter bar
@ -165,7 +165,7 @@ public slots:
private slots: private slots:
void onExecuted(TQListViewItem* item); void onExecuted(TQListViewItem* item);
void showContextMenu(KListView* ,TQListViewItem* item,const TQPoint & p); void showContextMenu(TDEListView* ,TQListViewItem* item,const TQPoint & p);
void onColumnVisibilityChange(int); void onColumnVisibilityChange(int);
void gsmItemActived(const TQString & group); void gsmItemActived(const TQString & group);
@ -185,7 +185,7 @@ signals:
void updateActions(int flags); void updateActions(int flags);
void queue(kt::TorrentInterface* tc); void queue(kt::TorrentInterface* tc);
void needsDataCheck(kt::TorrentInterface* tc); void needsDataCheck(kt::TorrentInterface* tc);
void updateGroupsSubMenu(KPopupMenu* gsm); void updateGroupsSubMenu(TDEPopupMenu* gsm);
void groupsSubMenuItemActivated(KTorrentView* v,const TQString & group); void groupsSubMenuItemActivated(KTorrentView* v,const TQString & group);
private: private:
@ -204,7 +204,7 @@ private:
private: private:
TQMap<kt::TorrentInterface*,KTorrentViewItem*> items; TQMap<kt::TorrentInterface*,KTorrentViewItem*> items;
KTorrentViewMenu* menu; KTorrentViewMenu* menu;
KPopupMenu* m_headerMenu; TDEPopupMenu* m_headerMenu;
kt::Group* current_group; kt::Group* current_group;
Uint32 running; Uint32 running;
Uint32 total; Uint32 total;

@ -117,7 +117,7 @@ static double Percentage(const TorrentStats & s)
KTorrentViewItem::KTorrentViewItem(KTorrentView* parent,TorrentInterface* tc) KTorrentViewItem::KTorrentViewItem(KTorrentView* parent,TorrentInterface* tc)
: KListViewItem(parent->listView()),tc(tc) : TDEListViewItem(parent->listView()),tc(tc)
{ {
m_parent = parent; m_parent = parent;
update(); update();
@ -350,5 +350,5 @@ void KTorrentViewItem::paintCell(TQPainter* p,const TQColorGroup & cg,
_cg.setColor(TQColorGroup::Text, ratioToColor(kt::ShareRatio(tc->getStats()))); _cg.setColor(TQColorGroup::Text, ratioToColor(kt::ShareRatio(tc->getStats())));
KListViewItem::paintCell(p,_cg,column,width,align); TDEListViewItem::paintCell(p,_cg,column,width,align);
} }

@ -34,7 +34,7 @@ class KTorrentView;
/** /**
* @author Joris Guisson * @author Joris Guisson
*/ */
class KTorrentViewItem : public KListViewItem class KTorrentViewItem : public TDEListViewItem
{ {
kt::TorrentInterface* tc; kt::TorrentInterface* tc;
bt::Int64 eta; bt::Int64 eta;

@ -29,7 +29,7 @@
using namespace kt; using namespace kt;
KTorrentViewMenu::KTorrentViewMenu (KTorrentView *parent, const char *name ) KTorrentViewMenu::KTorrentViewMenu (KTorrentView *parent, const char *name )
: KPopupMenu ( parent, name ),view(parent) : TDEPopupMenu ( parent, name ),view(parent)
{ {
KIconLoader* iload = TDEGlobal::iconLoader(); KIconLoader* iload = TDEGlobal::iconLoader();
@ -59,7 +59,7 @@ KTorrentViewMenu::KTorrentViewMenu (KTorrentView *parent, const char *name )
iload->loadIconSet("add", KIcon::Small), i18n("Add Peers"), iload->loadIconSet("add", KIcon::Small), i18n("Add Peers"),
parent, TQT_SLOT(showAddPeersWidget())); parent, TQT_SLOT(showAddPeersWidget()));
peer_sources_menu = new KPopupMenu(this); peer_sources_menu = new TDEPopupMenu(this);
peer_sources_id = insertItem(i18n("Additional Peer Sources"), peer_sources_menu); peer_sources_id = insertItem(i18n("Additional Peer Sources"), peer_sources_menu);
peer_sources_menu->insertTitle(i18n("Torrent Peer Sources:")); peer_sources_menu->insertTitle(i18n("Torrent Peer Sources:"));
peer_sources_menu->setCheckable(true); peer_sources_menu->setCheckable(true);
@ -77,7 +77,7 @@ KTorrentViewMenu::KTorrentViewMenu (KTorrentView *parent, const char *name )
parent, TQT_SLOT(previewFiles())); parent, TQT_SLOT(previewFiles()));
insertSeparator(); insertSeparator();
dirs_sub_menu = new KPopupMenu(this); dirs_sub_menu = new TDEPopupMenu(this);
dirs_id = insertItem(i18n("Open Directory"), dirs_sub_menu); dirs_id = insertItem(i18n("Open Directory"), dirs_sub_menu);
outputdir_id = dirs_sub_menu->insertItem(iload->loadIconSet("folder",KIcon::Small), i18n("Data Directory"), outputdir_id = dirs_sub_menu->insertItem(iload->loadIconSet("folder",KIcon::Small), i18n("Data Directory"),
parent, TQT_SLOT(openOutputDirectory())); parent, TQT_SLOT(openOutputDirectory()));
@ -88,7 +88,7 @@ KTorrentViewMenu::KTorrentViewMenu (KTorrentView *parent, const char *name )
insertSeparator(); insertSeparator();
remove_from_group_id = insertItem(i18n("Remove From Group"),parent, TQT_SLOT(removeFromGroup())); remove_from_group_id = insertItem(i18n("Remove From Group"),parent, TQT_SLOT(removeFromGroup()));
groups_sub_menu = new KPopupMenu(this); groups_sub_menu = new TDEPopupMenu(this);
add_to_group_id = insertItem(i18n("Add to Group"),groups_sub_menu); add_to_group_id = insertItem(i18n("Add to Group"),groups_sub_menu);

@ -27,7 +27,7 @@ class KTorrentView;
/** /**
@author Joris Guisson <joris.guisson@gmail.com> @author Joris Guisson <joris.guisson@gmail.com>
*/ */
class KTorrentViewMenu : public KPopupMenu class KTorrentViewMenu : public TDEPopupMenu
{ {
Q_OBJECT Q_OBJECT
@ -39,7 +39,7 @@ public:
void show(const TQPoint & p); void show(const TQPoint & p);
/// Get the group sub menu /// Get the group sub menu
KPopupMenu* getGroupsSubMenu() {return groups_sub_menu;} TDEPopupMenu* getGroupsSubMenu() {return groups_sub_menu;}
public slots: public slots:
void gsmItemActived(int id); void gsmItemActived(int id);
@ -50,9 +50,9 @@ signals:
private: private:
KTorrentView* view; KTorrentView* view;
KPopupMenu* groups_sub_menu; TDEPopupMenu* groups_sub_menu;
KPopupMenu* dirs_sub_menu; TDEPopupMenu* dirs_sub_menu;
KPopupMenu* peer_sources_menu; TDEPopupMenu* peer_sources_menu;
int stop_id; int stop_id;
int start_id; int start_id;
int remove_id; int remove_id;

@ -55,9 +55,9 @@ Button::Button(ButtonBar *parent, const TQString text, const TQIconSet &icon,
TQToolTip::add(this, m_realText); TQToolTip::add(this, m_realText);
m_assignAccelAction = new KAction(i18n("Assign Accelerator..."), 0, m_assignAccelAction = new TDEAction(i18n("Assign Accelerator..."), 0,
TQT_TQOBJECT(this), TQT_SLOT(assignAccel()), TQT_TQOBJECT(this)); TQT_TQOBJECT(this), TQT_SLOT(assignAccel()), TQT_TQOBJECT(this));
m_clearAccelAction = new KAction(i18n("Clear Accelerator"), 0, m_clearAccelAction = new TDEAction(i18n("Clear Accelerator"), 0,
TQT_TQOBJECT(this), TQT_SLOT(clearAccel()), TQT_TQOBJECT(this)); TQT_TQOBJECT(this), TQT_SLOT(clearAccel()), TQT_TQOBJECT(this));
TDEConfig *config = kapp->config(); TDEConfig *config = kapp->config();

@ -25,7 +25,7 @@
#include "comdefs.h" #include "comdefs.h"
class KAction; class TDEAction;
namespace Ideal { namespace Ideal {
@ -98,8 +98,8 @@ private:
TQString m_realText; TQString m_realText;
TQIconSet m_realIconSet; TQIconSet m_realIconSet;
KAction *m_assignAccelAction; TDEAction *m_assignAccelAction;
KAction *m_clearAccelAction; TDEAction *m_clearAccelAction;
friend class ButtonBar; friend class ButtonBar;
}; };

@ -85,9 +85,9 @@ DDockWindow::DDockWindow(DMainWindow *parent, Position position)
m_widgetStack = new TQWidgetStack(this); m_widgetStack = new TQWidgetStack(this);
m_internalLayout->addWidget(m_widgetStack); m_internalLayout->addWidget(m_widgetStack);
m_moveToDockLeft = new KAction( i18n("Move to left dock"), 0, TQT_TQOBJECT(this), TQT_SLOT(moveToDockLeft()), TQT_TQOBJECT(this) ); m_moveToDockLeft = new TDEAction( i18n("Move to left dock"), 0, TQT_TQOBJECT(this), TQT_SLOT(moveToDockLeft()), TQT_TQOBJECT(this) );
m_moveToDockRight = new KAction( i18n("Move to right dock"), 0, TQT_TQOBJECT(this), TQT_SLOT(moveToDockRight()), TQT_TQOBJECT(this) ); m_moveToDockRight = new TDEAction( i18n("Move to right dock"), 0, TQT_TQOBJECT(this), TQT_SLOT(moveToDockRight()), TQT_TQOBJECT(this) );
m_moveToDockBottom = new KAction( i18n("Move to bottom dock"), 0, TQT_TQOBJECT(this), TQT_SLOT(moveToDockBottom()), TQT_TQOBJECT(this) ); m_moveToDockBottom = new TDEAction( i18n("Move to bottom dock"), 0, TQT_TQOBJECT(this), TQT_SLOT(moveToDockBottom()), TQT_TQOBJECT(this) );
setVisible(m_visible); setVisible(m_visible);
@ -320,7 +320,7 @@ void DDockWindow::showWidget(TQWidget *widget)
void DDockWindow::setMovingEnabled(bool) void DDockWindow::setMovingEnabled(bool)
{ {
//some operations on KMainWindow cause moving to be enabled //some operations on TDEMainWindow cause moving to be enabled
//but we always don't want DDockWindow instances to be movable //but we always don't want DDockWindow instances to be movable
TQDockWindow::setMovingEnabled(false); TQDockWindow::setMovingEnabled(false);
} }

@ -29,7 +29,7 @@ class TQWidgetStack;
class TQPopupMenu; class TQPopupMenu;
class KComboBox; class KComboBox;
class KAction; class TDEAction;
class DMainWindow; class DMainWindow;
@ -109,9 +109,9 @@ private:
TQBoxLayout *m_internalLayout; TQBoxLayout *m_internalLayout;
KAction * m_moveToDockLeft; TDEAction * m_moveToDockLeft;
KAction * m_moveToDockRight; TDEAction * m_moveToDockRight;
KAction * m_moveToDockBottom; TDEAction * m_moveToDockBottom;
}; };
#endif #endif

@ -379,7 +379,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="KListView" row="1" column="0" rowspan="3" colspan="1"> <widget class="TDEListView" row="1" column="0" rowspan="3" colspan="1">
<column> <column>
<property name="text"> <property name="text">
<string>IP or hostname</string> <string>IP or hostname</string>

@ -282,7 +282,7 @@ void TrayIcon::lowDiskSpace(kt::TorrentInterface * tc, bool stopped)
showPassivePopup(msg,i18n("Device running out of space")); showPassivePopup(msg,i18n("Device running out of space"));
} }
SetMaxRate::SetMaxRate( KTorrentCore* tc, int t, TQWidget *parent, const char *name):KPopupMenu(parent, name) SetMaxRate::SetMaxRate( KTorrentCore* tc, int t, TQWidget *parent, const char *name):TDEPopupMenu(parent, name)
{ {
m_core = tc; m_core = tc;
type=t; type=t;

@ -121,7 +121,7 @@ private:
TQPixmap m_kt_pix; TQPixmap m_kt_pix;
}; };
class SetMaxRate : public KPopupMenu class SetMaxRate : public TDEPopupMenu
{ {
Q_OBJECT Q_OBJECT

@ -30,7 +30,7 @@ using namespace bt;
using namespace kt; using namespace kt;
UPnPTestApp::UPnPTestApp(TQWidget *parent, const char *name) UPnPTestApp::UPnPTestApp(TQWidget *parent, const char *name)
: KMainWindow(parent, name) : TDEMainWindow(parent, name)
{ {
sock = new UPnPMCastSocket(true); sock = new UPnPMCastSocket(true);
connect(sock,TQT_SIGNAL(discovered( UPnPRouter* )),this,TQT_SLOT(discovered( UPnPRouter* ))); connect(sock,TQT_SIGNAL(discovered( UPnPRouter* )),this,TQT_SLOT(discovered( UPnPRouter* )));

@ -35,7 +35,7 @@ using kt::UPnPRouter;
/** /**
@author Joris Guisson <joris.guisson@gmail.com> @author Joris Guisson <joris.guisson@gmail.com>
*/ */
class UPnPTestApp : public KMainWindow, public kt::LogMonitorInterface class UPnPTestApp : public TDEMainWindow, public kt::LogMonitorInterface
{ {
Q_OBJECT Q_OBJECT

@ -17,7 +17,7 @@ Index: estimation-scripts/enable-logging.diff
- -
-@@ -77,6 +78,9 @@ -@@ -77,6 +78,9 @@
- KTorrentViewItem::KTorrentViewItem(QListView* parent,bt::TorrentControl* tc) - KTorrentViewItem::KTorrentViewItem(QListView* parent,bt::TorrentControl* tc)
- : KListViewItem(parent),tc(tc) - : TDEListViewItem(parent),tc(tc)
- { - {
-+ toLog = true; -+ toLog = true;
-+ counter = 1; -+ counter = 1;
@ -126,7 +126,7 @@ Index: apps/ktorrent/ktorrentviewitem.cpp
@@ -78,6 +81,9 @@ @@ -78,6 +81,9 @@
KTorrentViewItem::KTorrentViewItem(QListView* parent,TorrentInterface* tc) KTorrentViewItem::KTorrentViewItem(QListView* parent,TorrentInterface* tc)
: KListViewItem(parent),tc(tc) : TDEListViewItem(parent),tc(tc)
{ {
+ toLog = true; + toLog = true;
+ counter = 1; + counter = 1;

@ -34,7 +34,7 @@ using namespace bt;
namespace kt namespace kt
{ {
FileTreeDirItem::FileTreeDirItem(KListView* klv,const TQString & name,FileTreeRootListener* rl) FileTreeDirItem::FileTreeDirItem(TDEListView* klv,const TQString & name,FileTreeRootListener* rl)
: TQCheckListItem(klv,TQString(),TQCheckListItem::CheckBox),name(name),root_listener(rl) : TQCheckListItem(klv,TQString(),TQCheckListItem::CheckBox),name(name),root_listener(rl)
{ {
parent = 0; parent = 0;

@ -55,7 +55,7 @@ namespace kt
bool manual_change; bool manual_change;
FileTreeRootListener* root_listener; FileTreeRootListener* root_listener;
public: public:
FileTreeDirItem(KListView* klv,const TQString & name,FileTreeRootListener* rl = 0); FileTreeDirItem(TDEListView* klv,const TQString & name,FileTreeRootListener* rl = 0);
FileTreeDirItem(FileTreeDirItem* parent,const TQString & name); FileTreeDirItem(FileTreeDirItem* parent,const TQString & name);
virtual ~FileTreeDirItem(); virtual ~FileTreeDirItem();

@ -25,7 +25,7 @@
class TQWidget; class TQWidget;
class TQIconSet; class TQIconSet;
class TQString; class TQString;
class KToolBar; class TDEToolBar;
class KProgress; class KProgress;
namespace kt namespace kt
@ -200,10 +200,10 @@ namespace kt
virtual const TorrentInterface* getCurrentTorrent() const = 0; virtual const TorrentInterface* getCurrentTorrent() const = 0;
/// Add a toolbar /// Add a toolbar
virtual KToolBar* addToolBar(const char* name) = 0; virtual TDEToolBar* addToolBar(const char* name) = 0;
/// Remove a toolbar /// Remove a toolbar
virtual void removeToolBar(KToolBar* tb) = 0; virtual void removeToolBar(TDEToolBar* tb) = 0;
protected: protected:
/** /**

@ -31,8 +31,8 @@ using namespace kt;
namespace kt namespace kt
{ {
ChunkDownloadViewItem::ChunkDownloadViewItem(KListView* cdv,kt::ChunkDownloadInterface* cd) ChunkDownloadViewItem::ChunkDownloadViewItem(TDEListView* cdv,kt::ChunkDownloadInterface* cd)
: KListViewItem(cdv),cd(cd) : TDEListViewItem(cdv),cd(cd)
{ {
update(); update();
} }

@ -29,11 +29,11 @@ namespace kt
class ChunkDownloadInterface; class ChunkDownloadInterface;
class ChunkDownloadView; class ChunkDownloadView;
class ChunkDownloadViewItem : public KListViewItem class ChunkDownloadViewItem : public TDEListViewItem
{ {
kt::ChunkDownloadInterface* cd; kt::ChunkDownloadInterface* cd;
public: public:
ChunkDownloadViewItem(KListView* cdv,kt::ChunkDownloadInterface* cd); ChunkDownloadViewItem(TDEListView* cdv,kt::ChunkDownloadInterface* cd);
void update(); void update();
int compare(TQListViewItem * i,int col,bool) const; int compare(TQListViewItem * i,int col,bool) const;

@ -274,7 +274,7 @@
</spacer> </spacer>
</hbox> </hbox>
</widget> </widget>
<widget class="KListView"> <widget class="TDEListView">
<column> <column>
<property name="text"> <property name="text">
<string>Chunk</string> <string>Chunk</string>

@ -41,7 +41,7 @@ namespace kt
{ {
FileView::FileView(TQWidget *parent, const char *name) FileView::FileView(TQWidget *parent, const char *name)
: KListView(parent, name),curr_tc(0),multi_root(0),pending_fill(0),next_fill_item(0) : TDEListView(parent, name),curr_tc(0),multi_root(0),pending_fill(0),next_fill_item(0)
{ {
setFrameShape(TQFrame::NoFrame); setFrameShape(TQFrame::NoFrame);
addColumn( i18n( "File" ) ); addColumn( i18n( "File" ) );
@ -51,7 +51,7 @@ namespace kt
addColumn( i18n( "% Complete" ) ); addColumn( i18n( "% Complete" ) );
setShowSortIndicator(true); setShowSortIndicator(true);
context_menu = new KPopupMenu(this); context_menu = new TDEPopupMenu(this);
preview_id = context_menu->insertItem(SmallIcon("fileopen"),i18n("Open")); preview_id = context_menu->insertItem(SmallIcon("fileopen"),i18n("Open"));
context_menu->insertSeparator(); context_menu->insertSeparator();
first_id = context_menu->insertItem(i18n("Download First")); first_id = context_menu->insertItem(i18n("Download First"));
@ -69,8 +69,8 @@ namespace kt
context_menu->setItemEnabled(dnd_keep_id, false); context_menu->setItemEnabled(dnd_keep_id, false);
context_menu->setItemEnabled(dnd_throw_away_id, false); context_menu->setItemEnabled(dnd_throw_away_id, false);
connect(this,TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint& )), connect(this,TQT_SIGNAL(contextMenu(TDEListView*, TQListViewItem*, const TQPoint& )),
this,TQT_SLOT(showContextMenu(KListView*, TQListViewItem*, const TQPoint& ))); this,TQT_SLOT(showContextMenu(TDEListView*, TQListViewItem*, const TQPoint& )));
connect(context_menu, TQT_SIGNAL ( activated ( int ) ), this, TQT_SLOT ( contextItem ( int ) ) ); connect(context_menu, TQT_SIGNAL ( activated ( int ) ), this, TQT_SLOT ( contextItem ( int ) ) );
connect(this,TQT_SIGNAL(doubleClicked( TQListViewItem*, const TQPoint&, int )), connect(this,TQT_SIGNAL(doubleClicked( TQListViewItem*, const TQPoint&, int )),
this,TQT_SLOT(onDoubleClicked(TQListViewItem*, const TQPoint&, int))); this,TQT_SLOT(onDoubleClicked(TQListViewItem*, const TQPoint&, int)));
@ -134,7 +134,7 @@ namespace kt
{ {
const TorrentStats & s = curr_tc->getStats(); const TorrentStats & s = curr_tc->getStats();
this->setRootIsDecorated(false); this->setRootIsDecorated(false);
KListViewItem* item = new KListViewItem( TDEListViewItem* item = new TDEListViewItem(
this, this,
s.torrent_name, s.torrent_name,
BytesToString(s.total_bytes)); BytesToString(s.total_bytes));
@ -211,7 +211,7 @@ namespace kt
} }
} }
void FileView::showContextMenu(KListView* ,TQListViewItem*,const TQPoint & p) void FileView::showContextMenu(TDEListView* ,TQListViewItem*,const TQPoint & p)
{ {
const TorrentStats & s = curr_tc->getStats(); const TorrentStats & s = curr_tc->getStats();
// don't show a menu if item is 0 or if it is a directory // don't show a menu if item is 0 or if it is a directory

@ -32,7 +32,7 @@ namespace kt
/** /**
@author Joris Guisson <joris.guisson@gmail.com> @author Joris Guisson <joris.guisson@gmail.com>
*/ */
class FileView : public KListView class FileView : public TDEListView
{ {
Q_OBJECT Q_OBJECT
@ -44,7 +44,7 @@ namespace kt
void changeTC(kt::TorrentInterface* tc); void changeTC(kt::TorrentInterface* tc);
private slots: private slots:
void contextItem(int id); void contextItem(int id);
void showContextMenu(KListView* ,TQListViewItem* item,const TQPoint & p); void showContextMenu(TDEListView* ,TQListViewItem* item,const TQPoint & p);
void refreshFileTree(kt::TorrentInterface* tc); void refreshFileTree(kt::TorrentInterface* tc);
void onDoubleClicked(TQListViewItem* item,const TQPoint & ,int ); void onDoubleClicked(TQListViewItem* item,const TQPoint & ,int );
void fillTreePartial(); void fillTreePartial();
@ -59,7 +59,7 @@ namespace kt
kt::TorrentInterface* curr_tc; kt::TorrentInterface* curr_tc;
IWFileTreeDirItem* multi_root; IWFileTreeDirItem* multi_root;
bool pending_fill; bool pending_fill;
KPopupMenu* context_menu; TDEPopupMenu* context_menu;
TQString preview_path; TQString preview_path;
TQTimer fill_timer; TQTimer fill_timer;
int preview_id; int preview_id;

@ -33,7 +33,7 @@ using namespace kt;
namespace kt namespace kt
{ {
IWFileTreeDirItem::IWFileTreeDirItem(KListView* klv,const TQString & name) IWFileTreeDirItem::IWFileTreeDirItem(TDEListView* klv,const TQString & name)
: kt::FileTreeDirItem(klv,name) : kt::FileTreeDirItem(klv,name)
{ {
} }

@ -49,7 +49,7 @@ namespace kt
class IWFileTreeDirItem : public kt::FileTreeDirItem class IWFileTreeDirItem : public kt::FileTreeDirItem
{ {
public: public:
IWFileTreeDirItem(KListView* klv,const TQString & name); IWFileTreeDirItem(TDEListView* klv,const TQString & name);
IWFileTreeDirItem(IWFileTreeDirItem* parent,const TQString & name); IWFileTreeDirItem(IWFileTreeDirItem* parent,const TQString & name);
virtual ~IWFileTreeDirItem(); virtual ~IWFileTreeDirItem();

@ -61,7 +61,7 @@ namespace kt
static bool geoip_db_exists = true; static bool geoip_db_exists = true;
static TQString geoip_data_file; static TQString geoip_data_file;
PeerViewItem::PeerViewItem(PeerView* pv,kt::PeerInterface* peer) : KListViewItem(pv),peer(peer) PeerViewItem::PeerViewItem(PeerView* pv,kt::PeerInterface* peer) : TDEListViewItem(pv),peer(peer)
{ {
if (!yes_no_pix_loaded) if (!yes_no_pix_loaded)
{ {
@ -208,7 +208,7 @@ namespace kt
} }
PeerView::PeerView(TQWidget *parent, const char *name) PeerView::PeerView(TQWidget *parent, const char *name)
: KListView(parent, name) : TDEListView(parent, name)
{ {
addColumn(i18n("IP")); addColumn(i18n("IP"));
addColumn(i18n("Country")); addColumn(i18n("Country"));
@ -245,12 +245,12 @@ namespace kt
setShowSortIndicator(true); setShowSortIndicator(true);
menu = new KPopupMenu(this); menu = new TDEPopupMenu(this);
kick_id = menu->insertItem(TDEGlobal::iconLoader()->loadIcon("delete_user", KIcon::NoGroup), i18n("to kick", "Kick peer")); kick_id = menu->insertItem(TDEGlobal::iconLoader()->loadIcon("delete_user", KIcon::NoGroup), i18n("to kick", "Kick peer"));
ban_id = menu->insertItem(TDEGlobal::iconLoader()->loadIcon("filter",KIcon::NoGroup), i18n("to ban", "Ban peer")); ban_id = menu->insertItem(TDEGlobal::iconLoader()->loadIcon("filter",KIcon::NoGroup), i18n("to ban", "Ban peer"));
connect(this,TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint& )), connect(this,TQT_SIGNAL(contextMenu(TDEListView*, TQListViewItem*, const TQPoint& )),
this,TQT_SLOT(showContextMenu(KListView*, TQListViewItem*, const TQPoint& ))); this,TQT_SLOT(showContextMenu(TDEListView*, TQListViewItem*, const TQPoint& )));
connect(menu, TQT_SIGNAL ( activated ( int ) ), this, TQT_SLOT ( contextItem ( int ) ) ); connect(menu, TQT_SIGNAL ( activated ( int ) ), this, TQT_SLOT ( contextItem ( int ) ) );
setFrameShape(TQFrame::NoFrame); setFrameShape(TQFrame::NoFrame);
} }
@ -330,7 +330,7 @@ namespace kt
clear(); clear();
} }
void PeerView::showContextMenu( KListView*, TQListViewItem* item, const TQPoint& p) void PeerView::showContextMenu( TDEListView*, TQListViewItem* item, const TQPoint& p)
{ {
if(!item) if(!item)
return; return;

@ -32,7 +32,7 @@ namespace kt
class PeerInterface; class PeerInterface;
class PeerView; class PeerView;
class PeerViewItem : public KListViewItem class PeerViewItem : public TDEListViewItem
{ {
kt::PeerInterface* peer; kt::PeerInterface* peer;
TQString m_country; TQString m_country;
@ -52,7 +52,7 @@ namespace kt
/** /**
@author Joris Guisson @author Joris Guisson
*/ */
class PeerView : public KListView class PeerView : public TDEListView
{ {
Q_OBJECT Q_OBJECT
@ -69,10 +69,10 @@ namespace kt
void kickPeer(kt::PeerInterface* peer); void kickPeer(kt::PeerInterface* peer);
void update(); void update();
void removeAll(); void removeAll();
void showContextMenu(KListView* ,TQListViewItem* item,const TQPoint & p); void showContextMenu(TDEListView* ,TQListViewItem* item,const TQPoint & p);
void contextItem(int id); void contextItem(int id);
private: private:
KPopupMenu* menu; TDEPopupMenu* menu;
int ban_id; int ban_id;
int kick_id; int kick_id;
PeerViewItem* curr; PeerViewItem* curr;

@ -105,7 +105,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="KListView" row="2" column="0"> <widget class="TDEListView" row="2" column="0">
<column> <column>
<property name="text"> <property name="text">
<string>Trackers</string> <string>Trackers</string>

@ -53,7 +53,7 @@ namespace kt
void PartFileImportPlugin::load() void PartFileImportPlugin::load()
{ {
import_action = new KAction(i18n("Import existing download" ), 0, this, import_action = new TDEAction(i18n("Import existing download" ), 0, this,
TQT_SLOT(onImport()), actionCollection(), "partfileimport" ); TQT_SLOT(onImport()), actionCollection(), "partfileimport" );
} }

@ -22,7 +22,7 @@
#include <interfaces/plugin.h> #include <interfaces/plugin.h>
class KAction; class TDEAction;
namespace kt namespace kt
{ {
@ -45,7 +45,7 @@ namespace kt
void onImport(); void onImport();
private: private:
KAction* import_action; TDEAction* import_action;
}; };
} }

@ -94,7 +94,7 @@ namespace kt
BWScheduler::instance().trigger(); BWScheduler::instance().trigger();
// updateEnabledBWS(); // updateEnabledBWS();
bws_action = new KAction(i18n("Open Bandwidth Scheduler" ), "clock", 0, this, bws_action = new TDEAction(i18n("Open Bandwidth Scheduler" ), "clock", 0, this,
TQT_SLOT(openBWS()), actionCollection(), "bwscheduler" ); TQT_SLOT(openBWS()), actionCollection(), "bwscheduler" );
} }
@ -134,7 +134,7 @@ namespace kt
{ {
if(SchedulerPluginSettings::enableBWS()) if(SchedulerPluginSettings::enableBWS())
{ {
bws_action = new KAction(i18n("Open Bandwidth Scheduler" ), "clock", 0, this, bws_action = new TDEAction(i18n("Open Bandwidth Scheduler" ), "clock", 0, this,
TQT_SLOT(openBWS()), actionCollection(), "bwscheduler" ); TQT_SLOT(openBWS()), actionCollection(), "bwscheduler" );
} }
else else

@ -63,7 +63,7 @@ namespace kt
/* BANDWIDTH SCHEDULE PLUGIN */ /* BANDWIDTH SCHEDULE PLUGIN */
SchedulerPrefPage* Pref; SchedulerPrefPage* Pref;
KAction* bws_action; TDEAction* bws_action;
}; };
} }

@ -63,7 +63,7 @@ namespace kt
void SearchPlugin::load() void SearchPlugin::load()
{ {
engines.load(TDEGlobal::dirs()->saveLocation("data","ktorrent") + "search_engines"); engines.load(TDEGlobal::dirs()->saveLocation("data","ktorrent") + "search_engines");
KToolBar* tb = getGUI()->addToolBar("search"); TDEToolBar* tb = getGUI()->addToolBar("search");
tab = new SearchTab(tb); tab = new SearchTab(tb);
connect(tab,TQT_SIGNAL(search( const TQString&, int, bool )), connect(tab,TQT_SIGNAL(search( const TQString&, int, bool )),
this,TQT_SLOT(search( const TQString&, int, bool ))); this,TQT_SLOT(search( const TQString&, int, bool )));
@ -118,7 +118,7 @@ namespace kt
SearchWidget* search = new SearchWidget(this); SearchWidget* search = new SearchWidget(this);
getGUI()->addTabPage(search,iload->loadIconSet("viewmag", KIcon::Small),text,this); getGUI()->addTabPage(search,iload->loadIconSet("viewmag", KIcon::Small),text,this);
KAction* copy_act = KStdAction::copy(TQT_TQOBJECT(search),TQT_SLOT(copy()),actionCollection()); TDEAction* copy_act = KStdAction::copy(TQT_TQOBJECT(search),TQT_SLOT(copy()),actionCollection());
copy_act->plug(search->rightClickMenu(),0); copy_act->plug(search->rightClickMenu(),0);
searches.append(search); searches.append(search);

@ -39,7 +39,7 @@ using namespace bt;
namespace kt namespace kt
{ {
SearchTab::SearchTab(KToolBar* tb) : m_tool_bar(tb) SearchTab::SearchTab(TDEToolBar* tb) : m_tool_bar(tb)
{ {
m_search_text = new KComboBox(tb); m_search_text = new KComboBox(tb);
m_search_text->setEditable(true); m_search_text->setEditable(true);

@ -39,11 +39,11 @@ namespace kt
public: public:
SearchTab(KToolBar* toolbar); SearchTab(TDEToolBar* toolbar);
virtual ~SearchTab(); virtual ~SearchTab();
/// Get the tool bar /// Get the tool bar
KToolBar* getToolBar() {return m_tool_bar;} TDEToolBar* getToolBar() {return m_tool_bar;}
/// Update the search engine list /// Update the search engine list
void updateSearchEngines(const SearchEngineList & sl); void updateSearchEngines(const SearchEngineList & sl);
@ -66,7 +66,7 @@ namespace kt
void saveSearchHistory(); void saveSearchHistory();
private: private:
KToolBar* m_tool_bar; TDEToolBar* m_tool_bar;
KComboBox* m_search_text; KComboBox* m_search_text;
KComboBox* m_search_engine; KComboBox* m_search_engine;
KPushButton* m_clear_button; KPushButton* m_clear_button;

@ -64,7 +64,7 @@ namespace kt
sbar = new SearchBar(this); sbar = new SearchBar(this);
html_part = new HTMLPart(this); html_part = new HTMLPart(this);
right_click_menu = new KPopupMenu(this); right_click_menu = new TDEPopupMenu(this);
right_click_menu->insertSeparator(); right_click_menu->insertSeparator();
back_id = right_click_menu->insertItem( back_id = right_click_menu->insertItem(
TDEGlobal::iconLoader()->loadIconSet(TQApplication::reverseLayout() TDEGlobal::iconLoader()->loadIconSet(TQApplication::reverseLayout()
@ -224,7 +224,7 @@ namespace kt
right_click_menu->popup(p); right_click_menu->popup(p);
} }
KPopupMenu* SearchWidget::rightClickMenu() TDEPopupMenu* SearchWidget::rightClickMenu()
{ {
return right_click_menu; return right_click_menu;
} }

@ -26,7 +26,7 @@
class SearchBar; class SearchBar;
class KProgress; class KProgress;
class KPopupMenu; class TDEPopupMenu;
namespace KParts namespace KParts
{ {
@ -53,7 +53,7 @@ namespace kt
SearchWidget(SearchPlugin* sp); SearchWidget(SearchPlugin* sp);
virtual ~SearchWidget(); virtual ~SearchWidget();
KPopupMenu* rightClickMenu(); TDEPopupMenu* rightClickMenu();
void updateSearchEngines(const SearchEngineList & sl); void updateSearchEngines(const SearchEngineList & sl);
@ -79,7 +79,7 @@ namespace kt
private: private:
HTMLPart* html_part; HTMLPart* html_part;
SearchBar* sbar; SearchBar* sbar;
KPopupMenu* right_click_menu; TDEPopupMenu* right_click_menu;
int back_id; int back_id;
SearchPlugin* sp; SearchPlugin* sp;
KProgress* prog; KProgress* prog;

@ -73,7 +73,7 @@ namespace kt
void UPnPPrefWidget::addDevice(UPnPRouter* r) void UPnPPrefWidget::addDevice(UPnPRouter* r)
{ {
connect(r,TQT_SIGNAL(updateGUI()),this,TQT_SLOT(updatePortMappings())); connect(r,TQT_SIGNAL(updateGUI()),this,TQT_SLOT(updatePortMappings()));
KListViewItem* item = new KListViewItem(m_device_list,r->getDescription().friendlyName); TDEListViewItem* item = new TDEListViewItem(m_device_list,r->getDescription().friendlyName);
item->setMultiLinesEnabled(true); item->setMultiLinesEnabled(true);
itemmap[item] = r; itemmap[item] = r;
// if we have discovered the default device or there is none // if we have discovered the default device or there is none
@ -107,7 +107,7 @@ namespace kt
void UPnPPrefWidget::onForwardBtnClicked() void UPnPPrefWidget::onForwardBtnClicked()
{ {
KListViewItem* item = (KListViewItem*)m_device_list->currentItem();; TDEListViewItem* item = (TDEListViewItem*)m_device_list->currentItem();;
if (!item) if (!item)
return; return;
@ -149,7 +149,7 @@ namespace kt
void UPnPPrefWidget::onUndoForwardBtnClicked() void UPnPPrefWidget::onUndoForwardBtnClicked()
{ {
KListViewItem* item = (KListViewItem*)m_device_list->currentItem();; TDEListViewItem* item = (TDEListViewItem*)m_device_list->currentItem();;
if (!item) if (!item)
return; return;
@ -186,11 +186,11 @@ namespace kt
void UPnPPrefWidget::updatePortMappings() void UPnPPrefWidget::updatePortMappings()
{ {
// update all port mappings // update all port mappings
TQMap<KListViewItem*,UPnPRouter*>::iterator i = itemmap.begin(); TQMap<TDEListViewItem*,UPnPRouter*>::iterator i = itemmap.begin();
while (i != itemmap.end()) while (i != itemmap.end())
{ {
UPnPRouter* r = i.data(); UPnPRouter* r = i.data();
KListViewItem* item = i.key(); TDEListViewItem* item = i.key();
TQString msg,services; TQString msg,services;
TQValueList<UPnPRouter::Forwarding>::iterator j = r->beginPortMappings(); TQValueList<UPnPRouter::Forwarding>::iterator j = r->beginPortMappings();
while (j != r->endPortMappings()) while (j != r->endPortMappings())

@ -25,7 +25,7 @@
#include "upnprouter.h" #include "upnprouter.h"
#include "upnpwidget.h" #include "upnpwidget.h"
class KListViewItem; class TDEListViewItem;
namespace bt namespace bt
{ {
@ -75,7 +75,7 @@ namespace kt
virtual void portRemoved(const net::Port & port); virtual void portRemoved(const net::Port & port);
private: private:
TQMap<KListViewItem*,UPnPRouter*> itemmap; TQMap<TDEListViewItem*,UPnPRouter*> itemmap;
UPnPRouter* def_router; UPnPRouter* def_router;
}; };
} }

@ -35,7 +35,7 @@
<string>Detected devices:</string> <string>Detected devices:</string>
</property> </property>
</widget> </widget>
<widget class="KListView"> <widget class="TDEListView">
<column> <column>
<property name="text"> <property name="text">
<string>Device</string> <string>Device</string>

Loading…
Cancel
Save