diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:04:44 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:04:44 -0600 |
commit | 4ba6286d9eaa3754119526dc1ac3435a341549cb (patch) | |
tree | 92749c4fa4e554fd060c8ac9aeb4d1490f05141c /plugins | |
parent | 2cf12b3b4be272da465791312b82cfcc77704b9d (diff) | |
download | ktorrent-4ba6286d9eaa3754119526dc1ac3435a341549cb.tar.gz ktorrent-4ba6286d9eaa3754119526dc1ac3435a341549cb.zip |
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'plugins')
22 files changed, 52 insertions, 52 deletions
diff --git a/plugins/infowidget/chunkdownloadview.cpp b/plugins/infowidget/chunkdownloadview.cpp index a19dc78..0a93f14 100644 --- a/plugins/infowidget/chunkdownloadview.cpp +++ b/plugins/infowidget/chunkdownloadview.cpp @@ -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(); } diff --git a/plugins/infowidget/chunkdownloadview.h b/plugins/infowidget/chunkdownloadview.h index af6b109..cb30800 100644 --- a/plugins/infowidget/chunkdownloadview.h +++ b/plugins/infowidget/chunkdownloadview.h @@ -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; diff --git a/plugins/infowidget/chunkdownloadviewbase.ui b/plugins/infowidget/chunkdownloadviewbase.ui index a68b412..6ad04d8 100644 --- a/plugins/infowidget/chunkdownloadviewbase.ui +++ b/plugins/infowidget/chunkdownloadviewbase.ui @@ -274,7 +274,7 @@ </spacer> </hbox> </widget> - <widget class="KListView"> + <widget class="TDEListView"> <column> <property name="text"> <string>Chunk</string> diff --git a/plugins/infowidget/fileview.cpp b/plugins/infowidget/fileview.cpp index 25d910b..b61afaa 100644 --- a/plugins/infowidget/fileview.cpp +++ b/plugins/infowidget/fileview.cpp @@ -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 diff --git a/plugins/infowidget/fileview.h b/plugins/infowidget/fileview.h index 826cab9..604b710 100644 --- a/plugins/infowidget/fileview.h +++ b/plugins/infowidget/fileview.h @@ -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; diff --git a/plugins/infowidget/iwfiletreediritem.cpp b/plugins/infowidget/iwfiletreediritem.cpp index 2abd159..bb6b821 100644 --- a/plugins/infowidget/iwfiletreediritem.cpp +++ b/plugins/infowidget/iwfiletreediritem.cpp @@ -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) { } diff --git a/plugins/infowidget/iwfiletreediritem.h b/plugins/infowidget/iwfiletreediritem.h index 1439cbe..4a1cd4c 100644 --- a/plugins/infowidget/iwfiletreediritem.h +++ b/plugins/infowidget/iwfiletreediritem.h @@ -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(); diff --git a/plugins/infowidget/peerview.cpp b/plugins/infowidget/peerview.cpp index 6d163e4..a304193 100644 --- a/plugins/infowidget/peerview.cpp +++ b/plugins/infowidget/peerview.cpp @@ -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; diff --git a/plugins/infowidget/peerview.h b/plugins/infowidget/peerview.h index f7a293b..6b5af44 100644 --- a/plugins/infowidget/peerview.h +++ b/plugins/infowidget/peerview.h @@ -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; diff --git a/plugins/infowidget/trackerviewbase.ui b/plugins/infowidget/trackerviewbase.ui index 24d92c2..0f951bf 100644 --- a/plugins/infowidget/trackerviewbase.ui +++ b/plugins/infowidget/trackerviewbase.ui @@ -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> diff --git a/plugins/partfileimport/partfileimportplugin.cpp b/plugins/partfileimport/partfileimportplugin.cpp index e831a1b..f54358b 100644 --- a/plugins/partfileimport/partfileimportplugin.cpp +++ b/plugins/partfileimport/partfileimportplugin.cpp @@ -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" ); } diff --git a/plugins/partfileimport/partfileimportplugin.h b/plugins/partfileimport/partfileimportplugin.h index 7053bb5..6753f07 100644 --- a/plugins/partfileimport/partfileimportplugin.h +++ b/plugins/partfileimport/partfileimportplugin.h @@ -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; }; } diff --git a/plugins/scheduler/schedulerplugin.cpp b/plugins/scheduler/schedulerplugin.cpp index 436f32b..0f1c6fa 100644 --- a/plugins/scheduler/schedulerplugin.cpp +++ b/plugins/scheduler/schedulerplugin.cpp @@ -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 diff --git a/plugins/scheduler/schedulerplugin.h b/plugins/scheduler/schedulerplugin.h index 90bfd76..6fb9733 100644 --- a/plugins/scheduler/schedulerplugin.h +++ b/plugins/scheduler/schedulerplugin.h @@ -63,7 +63,7 @@ namespace kt /* BANDWIDTH SCHEDULE PLUGIN */ SchedulerPrefPage* Pref; - KAction* bws_action; + TDEAction* bws_action; }; } diff --git a/plugins/search/searchplugin.cpp b/plugins/search/searchplugin.cpp index 9759cce..30893ea 100644 --- a/plugins/search/searchplugin.cpp +++ b/plugins/search/searchplugin.cpp @@ -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); diff --git a/plugins/search/searchtab.cpp b/plugins/search/searchtab.cpp index 02f3acf..002e62d 100644 --- a/plugins/search/searchtab.cpp +++ b/plugins/search/searchtab.cpp @@ -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); diff --git a/plugins/search/searchtab.h b/plugins/search/searchtab.h index 95236d3..27ee3c9 100644 --- a/plugins/search/searchtab.h +++ b/plugins/search/searchtab.h @@ -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; diff --git a/plugins/search/searchwidget.cpp b/plugins/search/searchwidget.cpp index 61f871a..fc72a3d 100644 --- a/plugins/search/searchwidget.cpp +++ b/plugins/search/searchwidget.cpp @@ -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; } diff --git a/plugins/search/searchwidget.h b/plugins/search/searchwidget.h index c48be71..9d42b93 100644 --- a/plugins/search/searchwidget.h +++ b/plugins/search/searchwidget.h @@ -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; diff --git a/plugins/upnp/upnpprefwidget.cpp b/plugins/upnp/upnpprefwidget.cpp index 9b4c453..fba0c34 100644 --- a/plugins/upnp/upnpprefwidget.cpp +++ b/plugins/upnp/upnpprefwidget.cpp @@ -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()) diff --git a/plugins/upnp/upnpprefwidget.h b/plugins/upnp/upnpprefwidget.h index 9be0a24..272e0a2 100644 --- a/plugins/upnp/upnpprefwidget.h +++ b/plugins/upnp/upnpprefwidget.h @@ -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; }; } diff --git a/plugins/upnp/upnpwidget.ui b/plugins/upnp/upnpwidget.ui index d06576a..3bc2408 100644 --- a/plugins/upnp/upnpwidget.ui +++ b/plugins/upnp/upnpwidget.ui @@ -35,7 +35,7 @@ <string>Detected devices:</string> </property> </widget> - <widget class="KListView"> + <widget class="TDEListView"> <column> <property name="text"> <string>Device</string> |