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()
{
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(1,BytesToString(tc->getStats().total_bytes));
single_root->setText(2,i18n("Yes"));

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

@ -45,7 +45,7 @@ FilterBar::FilterBar(TQWidget *parent, const char *name) :
TQHBoxLayout* layout = new TQHBoxLayout(foo);
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()));
layout->addWidget(m_close);

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

@ -41,13 +41,13 @@ using namespace bt;
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());
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());
setPixmap(0,g->groupIcon());
@ -65,8 +65,8 @@ namespace kt
return TQString::compare(text(1),i->text(1));
}
GroupView::GroupView(ViewManager* view,KActionCollection* col,TQWidget *parent, const char *name)
: KListView(parent, name),view(view),custom_root(0)
GroupView::GroupView(ViewManager* view,TDEActionCollection* col,TQWidget *parent, const char *name)
: TDEListView(parent, name),view(view),custom_root(0)
{
setFullWidth(true);
setRootIsDecorated(true);
@ -81,8 +81,8 @@ namespace kt
current = gman->allGroup();
connect(this,TQT_SIGNAL(clicked(TQListViewItem*)),this,TQT_SLOT(onExecuted( TQListViewItem* )));
connect(this,TQT_SIGNAL(contextMenu(KListView*,TQListViewItem*,const TQPoint & )),
this,TQT_SLOT(showContextMenu( KListView*, TQListViewItem*, const TQPoint& )));
connect(this,TQT_SIGNAL(contextMenu(TDEListView*,TQListViewItem*,const TQPoint & )),
this,TQT_SLOT(showContextMenu( TDEListView*, TQListViewItem*, const TQPoint& )));
connect(this,TQT_SIGNAL(dropped(TQDropEvent*,TQListViewItem*)),
this,TQT_SLOT(onDropped( TQDropEvent*, TQListViewItem* )));
@ -104,7 +104,7 @@ namespace kt
addGroup(gman->activeDownloadsGroup(), 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));
setOpen(custom_root,true);
}
@ -131,20 +131,20 @@ namespace kt
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");
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");
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");
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");
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;
if (parent)
@ -246,7 +246,7 @@ namespace kt
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);
@ -318,7 +318,7 @@ namespace kt
saveGroups();
}
void GroupView::updateGroupsSubMenu(KPopupMenu* gsm)
void GroupView::updateGroupsSubMenu(TDEPopupMenu* gsm)
{
gsm->clear();
for (GroupManager::iterator i = gman->begin();i != gman->end();i++)

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

@ -48,7 +48,7 @@ IPFilterWidget::IPFilterWidget(TQWidget *parent, const char *name)
for (TQStringList::Iterator it = blocklist->begin(); it != blocklist->end(); ++it)
{
new KListViewItem(lstPeers, *it);
new TDEListViewItem(lstPeers, *it);
}
delete blocklist;
@ -66,7 +66,7 @@ void IPFilterWidget::btnAdd_clicked()
if(v.validate( ip, var ) == TQValidator::Acceptable)
{
if(lstPeers->findItem(ip, 0) == 0)
new KListViewItem(lstPeers, ip);
new TDEListViewItem(lstPeers, ip);
}
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.*'."));
@ -181,7 +181,7 @@ void IPFilterWidget::loadFilter(TQString& fn)
continue;
}
new KListViewItem(lstPeers, line);
new TDEListViewItem(lstPeers, line);
++i;
}

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

@ -295,8 +295,8 @@ void KTorrent::openView(kt::Group* g)
connect(v, TQT_SIGNAL(queue( kt::TorrentInterface* )),
m_core, TQT_SLOT(queue( kt::TorrentInterface* )));
connect(v,TQT_SIGNAL(updateGroupsSubMenu(KPopupMenu*)),
m_group_view,TQT_SLOT(updateGroupsSubMenu(KPopupMenu*)));
connect(v,TQT_SIGNAL(updateGroupsSubMenu(TDEPopupMenu*)),
m_group_view,TQT_SLOT(updateGroupsSubMenu(TDEPopupMenu*)));
connect(v,TQT_SIGNAL(groupsSubMenuItemActivated(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::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()),
actionCollection(), "Start");
m_stop = new KAction(
m_stop = new TDEAction(
i18n("to stop", "Stop"), "ktstop",0,TQT_TQOBJECT(this), TQT_SLOT(stopDownload()),
actionCollection(), "Stop");
m_remove = new KAction(
m_remove = new TDEAction(
i18n("Remove"), "ktremove",0,TQT_TQOBJECT(this), TQT_SLOT(removeDownload()),
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()),
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()),
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()),
actionCollection(), "paste_url");
m_queuemgr = new KAction(
m_queuemgr = new TDEAction(
i18n("to open Queue Manager", "Open Queue Manager..."),
"ktqueuemanager", 0, TQT_TQOBJECT(this), TQT_SLOT(queueManagerShow()),
actionCollection(), "Queue manager");
m_queueaction = new KAction(
m_queueaction = new TDEAction(
i18n("Enqueue/Dequeue"),
"player_playlist", 0, m_view_man, TQT_SLOT(queueAction()),
actionCollection(), "queue_action");
m_ipfilter = new KAction(
m_ipfilter = new TDEAction(
i18n("IPFilter"),
"filter", 0, TQT_TQOBJECT(this), TQT_SLOT(showIPFilter()),
actionCollection(), "ipfilter_action");
m_datacheck = new KAction(
m_datacheck = new TDEAction(
i18n("Check Data Integrity"),
TQString(),0,m_view_man,TQT_SLOT(checkDataIntegrity()),actionCollection(),"check_data");
@ -962,12 +962,12 @@ void KTorrent::openDefaultView()
openView(i18n("All Torrents"));
}
KToolBar* KTorrent::addToolBar(const char* name)
TDEToolBar* KTorrent::addToolBar(const char* name)
{
return toolBar(name);
}
void KTorrent::removeToolBar(KToolBar* tb)
void KTorrent::removeToolBar(TDEToolBar* tb)
{
delete tb;
}

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

@ -55,7 +55,7 @@ using namespace bt;
using namespace kt;
TorrentView::TorrentView(KTorrentView* parent) : KListView(parent),ktview(parent)
TorrentView::TorrentView(KTorrentView* parent) : TDEListView(parent),ktview(parent)
{}
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)
@ -99,8 +99,8 @@ KTorrentView::KTorrentView(TQWidget *parent)
connect(view,TQT_SIGNAL(currentChanged(TQListViewItem* )),
this,TQT_SLOT(onExecuted(TQListViewItem* )));
connect(view,TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint& )),
this,TQT_SLOT(showContextMenu(KListView*, TQListViewItem*, const TQPoint& )));
connect(view,TQT_SIGNAL(contextMenu(TDEListView*, TQListViewItem*, const TQPoint& )),
this,TQT_SLOT(showContextMenu(TDEListView*, TQListViewItem*, const TQPoint& )));
connect(view,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(onSelectionChanged()));
@ -127,7 +127,7 @@ void KTorrentView::insertColumn(TQString label, TQt::AlignmentFlags align)
void KTorrentView::setupColumns()
{
//Header menu
m_headerMenu = new KPopupMenu(view);
m_headerMenu = new TDEPopupMenu(view);
m_headerMenu->setCheckable(true);
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());
menu->show(p);

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

@ -117,7 +117,7 @@ static double Percentage(const TorrentStats & s)
KTorrentViewItem::KTorrentViewItem(KTorrentView* parent,TorrentInterface* tc)
: KListViewItem(parent->listView()),tc(tc)
: TDEListViewItem(parent->listView()),tc(tc)
{
m_parent = parent;
update();
@ -350,5 +350,5 @@ void KTorrentViewItem::paintCell(TQPainter* p,const TQColorGroup & cg,
_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
*/
class KTorrentViewItem : public KListViewItem
class KTorrentViewItem : public TDEListViewItem
{
kt::TorrentInterface* tc;
bt::Int64 eta;

@ -29,7 +29,7 @@
using namespace kt;
KTorrentViewMenu::KTorrentViewMenu (KTorrentView *parent, const char *name )
: KPopupMenu ( parent, name ),view(parent)
: TDEPopupMenu ( parent, name ),view(parent)
{
KIconLoader* iload = TDEGlobal::iconLoader();
@ -59,7 +59,7 @@ KTorrentViewMenu::KTorrentViewMenu (KTorrentView *parent, const char *name )
iload->loadIconSet("add", KIcon::Small), i18n("Add Peers"),
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_menu->insertTitle(i18n("Torrent Peer Sources:"));
peer_sources_menu->setCheckable(true);
@ -77,7 +77,7 @@ KTorrentViewMenu::KTorrentViewMenu (KTorrentView *parent, const char *name )
parent, TQT_SLOT(previewFiles()));
insertSeparator();
dirs_sub_menu = new KPopupMenu(this);
dirs_sub_menu = new TDEPopupMenu(this);
dirs_id = insertItem(i18n("Open Directory"), dirs_sub_menu);
outputdir_id = dirs_sub_menu->insertItem(iload->loadIconSet("folder",KIcon::Small), i18n("Data Directory"),
parent, TQT_SLOT(openOutputDirectory()));
@ -88,7 +88,7 @@ KTorrentViewMenu::KTorrentViewMenu (KTorrentView *parent, const char *name )
insertSeparator();
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);

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

@ -55,9 +55,9 @@ Button::Button(ButtonBar *parent, const TQString text, const TQIconSet &icon,
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));
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));
TDEConfig *config = kapp->config();

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

@ -85,9 +85,9 @@ DDockWindow::DDockWindow(DMainWindow *parent, Position position)
m_widgetStack = new TQWidgetStack(this);
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_moveToDockRight = new KAction( 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_moveToDockLeft = new TDEAction( i18n("Move to left dock"), 0, TQT_TQOBJECT(this), TQT_SLOT(moveToDockLeft()), 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 TDEAction( i18n("Move to bottom dock"), 0, TQT_TQOBJECT(this), TQT_SLOT(moveToDockBottom()), TQT_TQOBJECT(this) );
setVisible(m_visible);
@ -320,7 +320,7 @@ void DDockWindow::showWidget(TQWidget *widget)
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
TQDockWindow::setMovingEnabled(false);
}

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

@ -379,7 +379,7 @@
</size>
</property>
</spacer>
<widget class="KListView" row="1" column="0" rowspan="3" colspan="1">
<widget class="TDEListView" row="1" column="0" rowspan="3" colspan="1">
<column>
<property name="text">
<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"));
}
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;
type=t;

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

@ -30,7 +30,7 @@ using namespace bt;
using namespace kt;
UPnPTestApp::UPnPTestApp(TQWidget *parent, const char *name)
: KMainWindow(parent, name)
: TDEMainWindow(parent, name)
{
sock = new UPnPMCastSocket(true);
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>
*/
class UPnPTestApp : public KMainWindow, public kt::LogMonitorInterface
class UPnPTestApp : public TDEMainWindow, public kt::LogMonitorInterface
{
Q_OBJECT

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

@ -34,7 +34,7 @@ using namespace bt;
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)
{
parent = 0;

@ -55,7 +55,7 @@ namespace kt
bool manual_change;
FileTreeRootListener* root_listener;
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);
virtual ~FileTreeDirItem();

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

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

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

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

@ -41,7 +41,7 @@ namespace kt
{
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);
addColumn( i18n( "File" ) );
@ -51,7 +51,7 @@ namespace kt
addColumn( i18n( "% Complete" ) );
setShowSortIndicator(true);
context_menu = new KPopupMenu(this);
context_menu = new TDEPopupMenu(this);
preview_id = context_menu->insertItem(SmallIcon("fileopen"),i18n("Open"));
context_menu->insertSeparator();
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_throw_away_id, false);
connect(this,TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint& )),
this,TQT_SLOT(showContextMenu(KListView*, TQListViewItem*, const TQPoint& )));
connect(this,TQT_SIGNAL(contextMenu(TDEListView*, TQListViewItem*, const TQPoint& )),
this,TQT_SLOT(showContextMenu(TDEListView*, TQListViewItem*, const TQPoint& )));
connect(context_menu, TQT_SIGNAL ( activated ( int ) ), this, TQT_SLOT ( contextItem ( int ) ) );
connect(this,TQT_SIGNAL(doubleClicked( TQListViewItem*, const TQPoint&, int )),
this,TQT_SLOT(onDoubleClicked(TQListViewItem*, const TQPoint&, int)));
@ -134,7 +134,7 @@ namespace kt
{
const TorrentStats & s = curr_tc->getStats();
this->setRootIsDecorated(false);
KListViewItem* item = new KListViewItem(
TDEListViewItem* item = new TDEListViewItem(
this,
s.torrent_name,
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();
// 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>
*/
class FileView : public KListView
class FileView : public TDEListView
{
Q_OBJECT
@ -44,7 +44,7 @@ namespace kt
void changeTC(kt::TorrentInterface* tc);
private slots:
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 onDoubleClicked(TQListViewItem* item,const TQPoint & ,int );
void fillTreePartial();
@ -59,7 +59,7 @@ namespace kt
kt::TorrentInterface* curr_tc;
IWFileTreeDirItem* multi_root;
bool pending_fill;
KPopupMenu* context_menu;
TDEPopupMenu* context_menu;
TQString preview_path;
TQTimer fill_timer;
int preview_id;

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

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

@ -61,7 +61,7 @@ namespace kt
static bool geoip_db_exists = true;
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)
{
@ -208,7 +208,7 @@ namespace kt
}
PeerView::PeerView(TQWidget *parent, const char *name)
: KListView(parent, name)
: TDEListView(parent, name)
{
addColumn(i18n("IP"));
addColumn(i18n("Country"));
@ -245,12 +245,12 @@ namespace kt
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"));
ban_id = menu->insertItem(TDEGlobal::iconLoader()->loadIcon("filter",KIcon::NoGroup), i18n("to ban", "Ban peer"));
connect(this,TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint& )),
this,TQT_SLOT(showContextMenu(KListView*, TQListViewItem*, const TQPoint& )));
connect(this,TQT_SIGNAL(contextMenu(TDEListView*, TQListViewItem*, const TQPoint& )),
this,TQT_SLOT(showContextMenu(TDEListView*, TQListViewItem*, const TQPoint& )));
connect(menu, TQT_SIGNAL ( activated ( int ) ), this, TQT_SLOT ( contextItem ( int ) ) );
setFrameShape(TQFrame::NoFrame);
}
@ -330,7 +330,7 @@ namespace kt
clear();
}
void PeerView::showContextMenu( KListView*, TQListViewItem* item, const TQPoint& p)
void PeerView::showContextMenu( TDEListView*, TQListViewItem* item, const TQPoint& p)
{
if(!item)
return;

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

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

@ -53,7 +53,7 @@ namespace kt
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" );
}

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

@ -94,7 +94,7 @@ namespace kt
BWScheduler::instance().trigger();
// 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" );
}
@ -134,7 +134,7 @@ namespace kt
{
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" );
}
else

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

@ -63,7 +63,7 @@ namespace kt
void SearchPlugin::load()
{
engines.load(TDEGlobal::dirs()->saveLocation("data","ktorrent") + "search_engines");
KToolBar* tb = getGUI()->addToolBar("search");
TDEToolBar* tb = getGUI()->addToolBar("search");
tab = new SearchTab(tb);
connect(tab,TQT_SIGNAL(search( const TQString&, int, bool )),
this,TQT_SLOT(search( const TQString&, int, bool )));
@ -118,7 +118,7 @@ namespace kt
SearchWidget* search = new SearchWidget(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);
searches.append(search);

@ -39,7 +39,7 @@ using namespace bt;
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->setEditable(true);

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

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

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

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

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

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

Loading…
Cancel
Save