summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 20:34:15 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 20:34:15 +0000
commit1c1403293485f35fd53db45aaa77a01cdd9627e7 (patch)
tree38559cd68cd4f63023fb5f6375def9db3b8b491e /plugins
parent894f94545727610df22c4f73911d62d58266f695 (diff)
downloadktorrent-1c1403293485f35fd53db45aaa77a01cdd9627e7.tar.gz
ktorrent-1c1403293485f35fd53db45aaa77a01cdd9627e7.zip
TQt4 port ktorrent
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktorrent@1238733 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'plugins')
-rw-r--r--plugins/infowidget/GeoIP.c6
-rw-r--r--plugins/infowidget/availabilitychunkbar.cpp6
-rw-r--r--plugins/infowidget/availabilitychunkbar.h3
-rw-r--r--plugins/infowidget/chunkbar.cpp100
-rw-r--r--plugins/infowidget/chunkbar.h23
-rw-r--r--plugins/infowidget/chunkdownloadview.cpp46
-rw-r--r--plugins/infowidget/chunkdownloadview.h13
-rw-r--r--plugins/infowidget/chunkdownloadviewbase.ui82
-rw-r--r--plugins/infowidget/downloadedchunkbar.cpp4
-rw-r--r--plugins/infowidget/downloadedchunkbar.h3
-rw-r--r--plugins/infowidget/fileview.cpp60
-rw-r--r--plugins/infowidget/fileview.h15
-rw-r--r--plugins/infowidget/flagdb.cpp40
-rw-r--r--plugins/infowidget/flagdb.h32
-rw-r--r--plugins/infowidget/floatspinbox.cpp48
-rw-r--r--plugins/infowidget/floatspinbox.h15
-rw-r--r--plugins/infowidget/infowidgetplugin.cpp14
-rw-r--r--plugins/infowidget/infowidgetplugin.h5
-rw-r--r--plugins/infowidget/infowidgetprefpage.cpp6
-rw-r--r--plugins/infowidget/infowidgetprefpage.h2
-rw-r--r--plugins/infowidget/iwfiletreediritem.cpp42
-rw-r--r--plugins/infowidget/iwfiletreediritem.h8
-rw-r--r--plugins/infowidget/iwfiletreeitem.cpp14
-rw-r--r--plugins/infowidget/iwfiletreeitem.h9
-rw-r--r--plugins/infowidget/iwpref.ui12
-rw-r--r--plugins/infowidget/localefloatvalidator.cpp10
-rw-r--r--plugins/infowidget/localefloatvalidator.h13
-rw-r--r--plugins/infowidget/peerview.cpp76
-rw-r--r--plugins/infowidget/peerview.h17
-rw-r--r--plugins/infowidget/statustab.cpp30
-rw-r--r--plugins/infowidget/statustab.h3
-rw-r--r--plugins/infowidget/statustabbase.ui134
-rw-r--r--plugins/infowidget/trackerview.cpp46
-rw-r--r--plugins/infowidget/trackerview.h5
-rw-r--r--plugins/infowidget/trackerviewbase.ui44
-rw-r--r--plugins/ipfilter/antip2p.cpp20
-rw-r--r--plugins/ipfilter/antip2p.h14
-rw-r--r--plugins/ipfilter/convert_dlg.ui26
-rw-r--r--plugins/ipfilter/convertdialog.cpp56
-rw-r--r--plugins/ipfilter/convertdialog.h7
-rw-r--r--plugins/ipfilter/ipblockingpref.ui34
-rw-r--r--plugins/ipfilter/ipblockingprefpage.cpp48
-rw-r--r--plugins/ipfilter/ipblockingprefpage.h8
-rw-r--r--plugins/ipfilter/ipfilterplugin.cpp18
-rw-r--r--plugins/ipfilter/ipfilterplugin.h9
-rw-r--r--plugins/logviewer/logflags.cpp4
-rw-r--r--plugins/logviewer/logflags.h4
-rw-r--r--plugins/logviewer/logprefpage.cpp4
-rw-r--r--plugins/logviewer/logprefpage.h2
-rw-r--r--plugins/logviewer/logprefwidget.cpp12
-rw-r--r--plugins/logviewer/logprefwidget.h3
-rw-r--r--plugins/logviewer/logprefwidgetbase.ui70
-rw-r--r--plugins/logviewer/logviewer.cpp34
-rw-r--r--plugins/logviewer/logviewer.h7
-rw-r--r--plugins/logviewer/logviewerplugin.cpp6
-rw-r--r--plugins/logviewer/logviewerplugin.h5
-rw-r--r--plugins/partfileimport/importdialog.cpp64
-rw-r--r--plugins/partfileimport/importdialog.h13
-rw-r--r--plugins/partfileimport/importdlgbase.ui30
-rw-r--r--plugins/partfileimport/partfileimportplugin.cpp8
-rw-r--r--plugins/partfileimport/partfileimportplugin.h5
-rw-r--r--plugins/rssfeed/rss/article.cpp86
-rw-r--r--plugins/rssfeed/rss/article.h42
-rw-r--r--plugins/rssfeed/rss/document.cpp374
-rw-r--r--plugins/rssfeed/rss/document.h34
-rw-r--r--plugins/rssfeed/rss/global.h8
-rw-r--r--plugins/rssfeed/rss/image.cpp50
-rw-r--r--plugins/rssfeed/rss/image.h27
-rw-r--r--plugins/rssfeed/rss/loader.cpp86
-rw-r--r--plugins/rssfeed/rss/loader.h34
-rw-r--r--plugins/rssfeed/rss/testlibrss.cpp8
-rw-r--r--plugins/rssfeed/rss/testlibrss.h11
-rw-r--r--plugins/rssfeed/rss/textinput.cpp26
-rw-r--r--plugins/rssfeed/rss/textinput.h20
-rw-r--r--plugins/rssfeed/rss/tools_p.cpp22
-rw-r--r--plugins/rssfeed/rss/tools_p.h8
-rw-r--r--plugins/rssfeed/rssarticle.cpp14
-rw-r--r--plugins/rssfeed/rssarticle.h32
-rw-r--r--plugins/rssfeed/rssfeed.cpp74
-rw-r--r--plugins/rssfeed/rssfeed.h51
-rw-r--r--plugins/rssfeed/rssfeedmanager.cpp420
-rw-r--r--plugins/rssfeed/rssfeedmanager.h29
-rw-r--r--plugins/rssfeed/rssfeedplugin.cpp18
-rw-r--r--plugins/rssfeed/rssfeedplugin.h7
-rw-r--r--plugins/rssfeed/rssfeedwidget.ui172
-rw-r--r--plugins/rssfeed/rssfilter.cpp60
-rw-r--r--plugins/rssfeed/rssfilter.h69
-rw-r--r--plugins/rssfeed/rsslinkdownloader.cpp40
-rw-r--r--plugins/rssfeed/rsslinkdownloader.h15
-rw-r--r--plugins/scanfolder/scanfolder.cpp58
-rw-r--r--plugins/scanfolder/scanfolder.h23
-rw-r--r--plugins/scanfolder/scanfolderplugin.cpp30
-rw-r--r--plugins/scanfolder/scanfolderplugin.h7
-rw-r--r--plugins/scanfolder/scanfolderprefpage.cpp4
-rw-r--r--plugins/scanfolder/scanfolderprefpage.h2
-rw-r--r--plugins/scanfolder/scanfolderprefpagewidget.cpp32
-rw-r--r--plugins/scanfolder/scanfolderprefpagewidget.h3
-rw-r--r--plugins/scanfolder/sfprefwidgetbase.ui34
-rw-r--r--plugins/scheduler/bwscheduler.cpp34
-rw-r--r--plugins/scheduler/bwspage.ui154
-rw-r--r--plugins/scheduler/bwsprefpagewidget.cpp104
-rw-r--r--plugins/scheduler/bwsprefpagewidget.h9
-rw-r--r--plugins/scheduler/bwswidget.cpp110
-rw-r--r--plugins/scheduler/bwswidget.h35
-rw-r--r--plugins/scheduler/schedulerpage.ui24
-rw-r--r--plugins/scheduler/schedulerplugin.cpp40
-rw-r--r--plugins/scheduler/schedulerplugin.h11
-rw-r--r--plugins/scheduler/schedulerprefpage.cpp4
-rw-r--r--plugins/scheduler/schedulerprefpage.h2
-rw-r--r--plugins/scheduler/schedulerprefpagewidget.cpp16
-rw-r--r--plugins/scheduler/schedulerprefpagewidget.h5
-rw-r--r--plugins/search/htmlpart.cpp38
-rw-r--r--plugins/search/htmlpart.h11
-rw-r--r--plugins/search/searchbar.ui8
-rw-r--r--plugins/search/searchenginelist.cpp44
-rw-r--r--plugins/search/searchenginelist.h14
-rw-r--r--plugins/search/searchplugin.cpp26
-rw-r--r--plugins/search/searchplugin.h13
-rw-r--r--plugins/search/searchpref.ui56
-rw-r--r--plugins/search/searchprefpage.cpp104
-rw-r--r--plugins/search/searchprefpage.h9
-rw-r--r--plugins/search/searchtab.cpp44
-rw-r--r--plugins/search/searchtab.h9
-rw-r--r--plugins/search/searchwidget.cpp82
-rw-r--r--plugins/search/searchwidget.h15
-rw-r--r--plugins/stats/ChartDrawer.cc86
-rw-r--r--plugins/stats/ChartDrawer.h39
-rw-r--r--plugins/stats/ChartDrawerData.cc20
-rw-r--r--plugins/stats/ChartDrawerData.h22
-rw-r--r--plugins/stats/PeerMonitor.cc24
-rw-r--r--plugins/stats/PeerMonitor.h6
-rw-r--r--plugins/stats/StatsCon.cc34
-rw-r--r--plugins/stats/StatsCon.h15
-rw-r--r--plugins/stats/StatsPluginPrefs.cc4
-rw-r--r--plugins/stats/StatsPluginPrefs.h11
-rw-r--r--plugins/stats/StatsPluginPrefsPage.cc2
-rw-r--r--plugins/stats/StatsPluginPrefsPage.h2
-rw-r--r--plugins/stats/StatsSpd.cc42
-rw-r--r--plugins/stats/StatsSpd.h17
-rw-r--r--plugins/stats/sprefwgt.ui108
-rw-r--r--plugins/stats/statsconwgt.ui12
-rw-r--r--plugins/stats/statsplugin.cc40
-rw-r--r--plugins/stats/statsplugin.h13
-rw-r--r--plugins/stats/statsspdwgt.ui14
-rw-r--r--plugins/upnp/soap.cpp16
-rw-r--r--plugins/upnp/soap.h12
-rw-r--r--plugins/upnp/upnpdescriptionparser.cpp44
-rw-r--r--plugins/upnp/upnpdescriptionparser.h2
-rw-r--r--plugins/upnp/upnpmcastsocket.cpp83
-rw-r--r--plugins/upnp/upnpmcastsocket.h11
-rw-r--r--plugins/upnp/upnpplugin.cpp10
-rw-r--r--plugins/upnp/upnpplugin.h5
-rw-r--r--plugins/upnp/upnpprefpage.cpp8
-rw-r--r--plugins/upnp/upnpprefpage.h2
-rw-r--r--plugins/upnp/upnpprefwidget.cpp32
-rw-r--r--plugins/upnp/upnpprefwidget.h7
-rw-r--r--plugins/upnp/upnprouter.cpp92
-rw-r--r--plugins/upnp/upnprouter.h55
-rw-r--r--plugins/upnp/upnpwidget.ui18
-rw-r--r--plugins/webinterface/httpclienthandler.cpp62
-rw-r--r--plugins/webinterface/httpclienthandler.h29
-rw-r--r--plugins/webinterface/httpresponseheader.cpp16
-rw-r--r--plugins/webinterface/httpresponseheader.h10
-rw-r--r--plugins/webinterface/httpserver.cpp174
-rw-r--r--plugins/webinterface/httpserver.h39
-rw-r--r--plugins/webinterface/php_handler.cpp38
-rw-r--r--plugins/webinterface/php_handler.h17
-rw-r--r--plugins/webinterface/php_interface.cpp160
-rw-r--r--plugins/webinterface/php_interface.h6
-rw-r--r--plugins/webinterface/webinterfaceplugin.cpp6
-rw-r--r--plugins/webinterface/webinterfaceplugin.h5
-rw-r--r--plugins/webinterface/webinterfacepref.ui50
-rw-r--r--plugins/webinterface/webinterfaceprefpage.cpp4
-rw-r--r--plugins/webinterface/webinterfaceprefpage.h2
-rw-r--r--plugins/webinterface/webinterfaceprefwidget.cpp40
-rw-r--r--plugins/webinterface/webinterfaceprefwidget.h5
-rw-r--r--plugins/webinterface/www/coldmilk/page_update.js10
-rw-r--r--plugins/webinterface/www/coldmilk/rest.php4
-rw-r--r--plugins/webinterface/www/default/details.php4
-rw-r--r--plugins/webinterface/www/default/interface.php8
-rw-r--r--plugins/webinterface/www/default/wz_tooltip.js4
-rw-r--r--plugins/webinterface/www/mobile/interface.php4
-rw-r--r--plugins/webinterface/www/mobile/torrent.php6
-rw-r--r--plugins/zeroconf/avahiservice.cpp18
-rw-r--r--plugins/zeroconf/avahiservice.h7
-rw-r--r--plugins/zeroconf/zeroconfplugin.cpp32
-rw-r--r--plugins/zeroconf/zeroconfplugin.h5
187 files changed, 3140 insertions, 3081 deletions
diff --git a/plugins/infowidget/GeoIP.c b/plugins/infowidget/GeoIP.c
index f71f830..81a9d80 100644
--- a/plugins/infowidget/GeoIP.c
+++ b/plugins/infowidget/GeoIP.c
@@ -65,10 +65,10 @@
const char GeoIP_country_code[247][3] = { "--","AP","EU","AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BM","BN","BO","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","FX","GA","GB","GD","GE","GF","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IN","IO","IQ","IR","IS","IT","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","ST","SV","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","CS","ZA","ZM","ZR","ZW","A1","A2","O1"};
-const char GeoIP_country_code3[247][4] = { "--","AP","EU","AND","ARE","AFG","ATG","AIA","ALB","ARM","ANT","AGO","AQ","ARG","ASM","AUT","AUS","ABW","AZE","BIH","BRB","BGD","BEL","BFA","BGR","BHR","BDI","BEN","BMU","BRN","BOL","BRA","BHS","BTN","BV","BWA","BLR","BLZ","CAN","CC","COD","CAF","COG","CHE","CIV","COK","CHL","CMR","CHN","COL","CRI","CUB","CPV","CX","CYP","CZE","DEU","DJI","DNK","DMA","DOM","DZA","ECU","EST","EGY","ESH","ERI","ESP","ETH","FIN","FJI","FLK","FSM","FRO","FRA","FX","GAB","GBR","GRD","GEO","GUF","GHA","GIB","GRL","GMB","GIN","GLP","GNQ","GRC","GS","GTM","GUM","GNB","GUY","HKG","HM","HND","HRV","HTI","HUN","IDN","IRL","ISR","IND","IO","IRQ","IRN","ISL","ITA","JAM","JOR","JPN","KEN","KGZ","KHM","KIR","COM","KNA","PRK","KOR","KWT","CYM","KAZ","LAO","LBN","LCA","LIE","LKA","LBR","LSO","LTU","LUX","LVA","LBY","MAR","MCO","MDA","MDG","MHL","MKD","MLI","MMR","MNG","MAC","MNP","MTQ","MRT","MSR","MLT","MUS","MDV","MWI","MEX","MYS","MOZ","NAM","NCL","NER","NFK","NGA","NIC","NLD","NOR","NPL","NRU","NIU","NZL","OMN","PAN","PER","PYF","PNG","PHL","PAK","POL","SPM","PCN","PRI","PSE","PRT","PLW","PRY","QAT","REU","ROU","RUS","RWA","SAU","SLB","SYC","SDN","SWE","SGP","SHN","SVN","SJM","SVK","SLE","SMR","SEN","SOM","SUR","STP","SLV","SYR","SWZ","TCA","TCD","TF","TGO","THA","TJK","TKL","TLS","TKM","TUN","TON","TUR","TTO","TUV","TWN","TZA","UKR","UGA","UM","USA","URY","UZB","VAT","VCT","VEN","VGB","VIR","VNM","VUT","WLF","WSM","YEM","YT","SCG","ZAF","ZMB","ZR","ZWE","A1","A2","O1"};
+const char GeoIP_country_code3[247][4] = { "--","AP","EU","AND","ARE","AFG","ATG","AIA","ALB","ARM","ANT","AGO","AQ","ARG","ASM","AUT","AUS","ABW","AZE","BIH","BRB","BGD","BEL","BFA","BGR","BHR","BDI","BEN","BMU","BRN","BOL","BRA","BHS","BTN","BV","BWA","BLR","BLZ","CAN","CC","COD","CAF","COG","CHE","CIV","COK","CHL","CMR","CHN","COL","CRI","CUB","CPV","CX","CYP","CZE","DEU","DJI","DNK","DMA","DOM","DZA","ECU","EST","EGY","ESH","ERI","ESP","ETH","FIN","FJI","FLK","FSM","FRO","FRA","FX","GAB","GBR","GRD","GEO","GUF","GHA","GIB","GRL","GMB","GIN","GLP","GNQ","GRC","GS","GTM","GUM","GNB","GUY","HKG","HM","HND","HRV","HTI","HUN","IDN","IRL","ISR","IND","IO","IRQ","IRN","ISL","ITA","JAM","JOR","JPN","KEN","KGZ","KHM","KIR","COM","KNA","PRK","KOR","KWT","CYM","KAZ","LAO","LBN","LCA","LIE","LKA","LBR","LSO","LTU","LUX","LVA","LBY","MAR","MCO","MDA","MDG","MHL","MKD","MLI","MMR","MNG","MAC","MNP","MTQ","MRT","MSR","MLT","MUS","MDV","MWI","MEX","MYS","MOZ","NAM","NCL","NER","NFK","NGA","NIC","NLD","NOR","NPL","NRU","NIU","NZL","OMN","PAN","PER","PYF","PNG","PHL","PAK","POL","SPM","PCN","PRI","PSE","PRT","PLW","PRY","TQAT","REU","ROU","RUS","RWA","SAU","SLB","SYC","SDN","SWE","SGP","SHN","SVN","SJM","SVK","SLE","SMR","SEN","SOM","SUR","STP","SLV","SYR","SWZ","TCA","TCD","TF","TGO","THA","TJK","TKL","TLS","TKM","TUN","TON","TUR","TTO","TUV","TWN","TZA","UKR","UGA","UM","USA","URY","UZB","VAT","VCT","VEN","VGB","VIR","VNM","VUT","WLF","WSM","YEM","YT","SCG","ZAF","ZMB","ZR","ZWE","A1","A2","O1"};
-const char * GeoIP_country_name[247] = {"N/A","Asia/Pacific Region","Europe","Andorra","United Arab Emirates","Afghanistan","Antigua and Barbuda","Anguilla","Albania","Armenia","Netherlands Antilles","Angola","Antarctica","Argentina","American Samoa","Austria","Australia","Aruba","Azerbaijan","Bosnia and Herzegovina","Barbados","Bangladesh","Belgium","Burkina Faso","Bulgaria","Bahrain","Burundi","Benin","Bermuda","Brunei Darussalam","Bolivia","Brazil","Bahamas","Bhutan","Bouvet Island","Botswana","Belarus","Belize","Canada","Cocos (Keeling) Islands","Congo, The Democratic Republic of the","Central African Republic","Congo","Switzerland","Cote D'Ivoire","Cook Islands","Chile","Cameroon","China","Colombia","Costa Rica","Cuba","Cape Verde","Christmas Island","Cyprus","Czech Republic","Germany","Djibouti","Denmark","Dominica","Dominican Republic","Algeria","Ecuador","Estonia","Egypt","Western Sahara","Eritrea","Spain","Ethiopia","Finland","Fiji","Falkland Islands (Malvinas)","Micronesia, Federated States of","Faroe Islands","France","France, Metropolitan","Gabon","United Kingdom","Grenada","Georgia","French Guiana","Ghana","Gibraltar","Greenland","Gambia","Guinea","Guadeloupe","Equatorial Guinea","Greece","South Georgia and the South Sandwich Islands","Guatemala","Guam","Guinea-Bissau","Guyana","Hong Kong","Heard Island and McDonald Islands","Honduras","Croatia","Haiti","Hungary","Indonesia","Ireland","Israel","India","British Indian Ocean Territory","Iraq","Iran, Islamic Republic of","Iceland","Italy","Jamaica","Jordan","Japan","Kenya","Kyrgyzstan","Cambodia","Kiribati","Comoros","Saint Kitts and Nevis",
-"Korea, Democratic People's Republic of","Korea, Republic of","Kuwait","Cayman Islands","Kazakhstan","Lao People's Democratic Republic","Lebanon","Saint Lucia","Liechtenstein","Sri Lanka","Liberia","Lesotho","Lithuania","Luxembourg","Latvia","Libyan Arab Jamahiriya","Morocco","Monaco","Moldova, Republic of","Madagascar","Marshall Islands","Macedonia","Mali","Myanmar","Mongolia","Macau","Northern Mariana Islands","Martinique","Mauritania","Montserrat","Malta","Mauritius","Maldives","Malawi","Mexico","Malaysia","Mozambique","Namibia","New Caledonia","Niger","Norfolk Island","Nigeria","Nicaragua","Netherlands","Norway","Nepal","Nauru","Niue","New Zealand","Oman","Panama","Peru","French Polynesia","Papua New Guinea","Philippines","Pakistan","Poland","Saint Pierre and Miquelon","Pitcairn Islands","Puerto Rico","Palestinian Territory","Portugal","Palau","Paraguay","Qatar","Reunion","Romania","Russian Federation","Rwanda","Saudi Arabia","Solomon Islands","Seychelles","Sudan","Sweden","Singapore","Saint Helena","Slovenia","Svalbard and Jan Mayen","Slovakia","Sierra Leone","San Marino","Senegal","Somalia","Suriname","Sao Tome and Principe","El Salvador","Syrian Arab Republic","Swaziland","Turks and Caicos Islands","Chad","French Southern Territories","Togo","Thailand","Tajikistan","Tokelau","Turkmenistan","Tunisia","Tonga","East Timor","Turkey","Trinidad and Tobago","Tuvalu","Taiwan","Tanzania, United Republic of","Ukraine","Uganda","United States Minor Outlying Islands","United States","Uruguay","Uzbekistan","Holy See (Vatican City State)","Saint Vincent and the Grenadines","Venezuela","Virgin Islands, British","Virgin Islands, U.S.","Vietnam","Vanuatu","Wallis and Futuna","Samoa","Yemen","Mayotte","Serbia and Montenegro","South Africa","Zambia","Zaire","Zimbabwe",
+const char * GeoIP_country_name[247] = {"N/A","Asia/Pacific Region","Europe","Andorra","United Arab Emirates","Afghanistan","Antigua and Barbuda","Anguilla","Albania","Armenia","Netherlands Antilles","Angola","Antarctica","Argentina","American Samoa","Austria","Australia","Aruba","Azerbaijan","Bosnia and Herzegovina","Barbados","Bangladesh","Belgium","Burkina Faso","Bulgaria","Bahrain","Burundi","Benin","Bermuda","Brunei Darussalam","Bolivia","Brazil","Bahamas","Bhutan","Bouvet Island","Botswana","Belarus","Belize","Canada","Cocos (Keeling) Islands","Congo, The Detqmocratic Republic of the","Central African Republic","Congo","Switzerland","Cote D'Ivoire","Cook Islands","Chile","Cameroon","China","Colombia","Costa Rica","Cuba","Cape Verde","Christmas Island","Cyprus","Czech Republic","Germany","Djibouti","Denmark","Dominica","Dominican Republic","Algeria","Ecuador","Estonia","Egypt","Western Sahara","Eritrea","Spain","Ethiopia","Finland","Fiji","Falkland Islands (Malvinas)","Micronesia, Federated States of","Faroe Islands","France","France, Metropolitan","Gabon","United Kingdom","Grenada","Georgia","French Guiana","Ghana","Gibraltar","Greenland","Gambia","Guinea","Guadeloupe","Equatorial Guinea","Greece","South Georgia and the South Sandwich Islands","Guatemala","Guam","Guinea-Bissau","Guyana","Hong Kong","Heard Island and McDonald Islands","Honduras","Croatia","Haiti","Hungary","Indonesia","Ireland","Israel","India","British Indian Ocean Territory","Iraq","Iran, Islamic Republic of","Iceland","Italy","Jamaica","Jordan","Japan","Kenya","Kyrgyzstan","Cambodia","Kiribati","Comoros","Saint Kitts and Nevis",
+"Korea, Detqmocratic People's Republic of","Korea, Republic of","Kuwait","Cayman Islands","Kazakhstan","Lao People's Detqmocratic Republic","Lebanon","Saint Lucia","Liechtenstein","Sri Lanka","Liberia","Lesotho","Lithuania","Luxembourg","Latvia","Libyan Arab Jamahiriya","Morocco","Monaco","Moldova, Republic of","Madagascar","Marshall Islands","Macedonia","Mali","Myanmar","Mongolia","Macau","Northern Mariana Islands","Martinique","Mauritania","Montserrat","Malta","Mauritius","Maldives","Malawi","Mexico","Malaysia","Mozambique","Namibia","New Caledonia","Niger","Norfolk Island","Nigeria","Nicaragua","Netherlands","Norway","Nepal","Nauru","Niue","New Zealand","Oman","Panama","Peru","French Polynesia","Papua New Guinea","Philippines","Pakistan","Poland","Saint Pierre and Miquelon","Pitcairn Islands","Puerto Rico","Palestinian Territory","Portugal","Palau","Paraguay","Qatar","Reunion","Romania","Russian Federation","Rwanda","Saudi Arabia","Solomon Islands","Seychelles","Sudan","Sweden","Singapore","Saint Helena","Slovenia","Svalbard and Jan Mayen","Slovakia","Sierra Leone","San Marino","Senegal","Somalia","Suriname","Sao Tome and Principe","El Salvador","Syrian Arab Republic","Swaziland","Turks and Caicos Islands","Chad","French Southern Territories","Togo","Thailand","Tajikistan","Tokelau","Turkmenistan","Tunisia","Tonga","East Timor","Turkey","Trinidad and Tobago","Tuvalu","Taiwan","Tanzania, United Republic of","Ukraine","Uganda","United States Minor Outlying Islands","United States","Uruguay","Uzbekistan","Holy See (Vatican City State)","Saint Vincent and the Grenadines","Venezuela","Virgin Islands, British","Virgin Islands, U.S.","Vietnam","Vanuatu","Wallis and Futuna","Samoa","Yemen","Mayotte","Serbia and Montenegro","South Africa","Zambia","Zaire","Zimbabwe",
"Anonymous Proxy","Satellite Provider","Other"};
const char GeoIP_country_continent[247][3] = {"--","AS","EU","EU","AS","AS","SA","SA","EU","AS","SA","AF","AN","SA","OC","EU","OC","SA","AS","EU","SA","AS","EU","AF","EU","AS","AF","AF","SA","AS","SA","SA","SA","AS","AF","AF","EU","SA","NA","AS","AF","AF","AF","EU","AF","OC","SA","AF","AS","SA","SA","SA","AF","AS","AS","EU","EU","AF","EU","SA","SA","AF","SA","EU","AF","AF","AF","EU","AF","EU","OC","SA","OC","EU","EU","EU","AF","EU","SA","AS","SA","AF","EU","SA","AF","AF","SA","AF","EU","SA","SA","OC","AF","SA","AS","AF","SA","EU","SA","EU","AS","EU","AS","AS","AS","AS","AS","EU","EU","SA","AS","AS","AF","AS","AS","OC","AF","SA","AS","AS","AS","SA","AS","AS","AS","SA","EU","AS","AF","AF","EU","EU","EU","AF","AF","EU","EU","AF","OC","EU","AF","AS","AS","AS","OC","SA","AF","SA","EU","AF","AS","AF","NA","AS","AF","AF","OC","AF","OC","AF","SA","EU","EU","AS","OC","OC","OC","AS","SA","SA","OC","OC","AS","AS","EU","SA","OC","SA","AS","EU","OC","SA","AS","AF","EU","AS","AF","AS","OC","AF","AF","EU","AS","AF","EU","EU","EU","AF","EU","AF","AF","SA","AF","SA","AS","AF","SA","AF","AF","AF","AS","AS","OC","AS","AF","OC","AS","AS","SA","OC","AS","AF","EU","AF","OC","NA","SA","AS","EU","SA","SA","SA","SA","AS","OC","OC","OC","AS","AF","EU","AF","AF","AF","AF"};
diff --git a/plugins/infowidget/availabilitychunkbar.cpp b/plugins/infowidget/availabilitychunkbar.cpp
index 9d96268..23c4dba 100644
--- a/plugins/infowidget/availabilitychunkbar.cpp
+++ b/plugins/infowidget/availabilitychunkbar.cpp
@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <klocale.h>
#include <util/bitset.h>
@@ -27,9 +27,9 @@
namespace kt
{
-AvailabilityChunkBar::AvailabilityChunkBar(QWidget* parent, const char* name): ChunkBar(parent, name)
+AvailabilityChunkBar::AvailabilityChunkBar(TQWidget* tqparent, const char* name): ChunkBar(tqparent, name)
{
- QToolTip::add(this, i18n("<img src=\"available_color\">&nbsp; - Available Chunks<br><img src=\"unavailable_color\">&nbsp; - Unavailable Chunks<br><img src=\"excluded_color\">&nbsp; - Excluded Chunks"));
+ TQToolTip::add(this, i18n("<img src=\"available_color\">&nbsp; - Available Chunks<br><img src=\"unavailable_color\">&nbsp; - Unavailable Chunks<br><img src=\"excluded_color\">&nbsp; - Excluded Chunks"));
}
diff --git a/plugins/infowidget/availabilitychunkbar.h b/plugins/infowidget/availabilitychunkbar.h
index a5ae625..31a5b65 100644
--- a/plugins/infowidget/availabilitychunkbar.h
+++ b/plugins/infowidget/availabilitychunkbar.h
@@ -31,8 +31,9 @@ namespace kt
class AvailabilityChunkBar : public ChunkBar
{
Q_OBJECT
+ TQ_OBJECT
public:
- AvailabilityChunkBar(QWidget* parent, const char* name);
+ AvailabilityChunkBar(TQWidget* tqparent, const char* name);
virtual ~AvailabilityChunkBar();
virtual const bt::BitSet & getBitSet() const;
diff --git a/plugins/infowidget/chunkbar.cpp b/plugins/infowidget/chunkbar.cpp
index a30571a..48f0aac 100644
--- a/plugins/infowidget/chunkbar.cpp
+++ b/plugins/infowidget/chunkbar.cpp
@@ -18,16 +18,16 @@
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qpainter.h>
-#include <qpen.h>
-#include <qbrush.h>
-#include <qvaluelist.h>
-#include <qpixmap.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqbrush.h>
+#include <tqvaluelist.h>
+#include <tqpixmap.h>
#include <math.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <klocale.h>
-#include <qmime.h>
-#include <qimage.h>
+#include <tqmime.h>
+#include <tqimage.h>
#include <util/log.h>
#include <interfaces/torrentinterface.h>
#include <util/bitset.h>
@@ -47,7 +47,7 @@ namespace kt
};
- static void FillAndFrameBlack(QImage* image, uint color, int size)
+ static void FillAndFrameBlack(TQImage* image, uint color, int size)
{
image->fill(color);
for (int i = 0; i < size; i++)
@@ -68,23 +68,23 @@ namespace kt
return;
images_initialized = true;
- QMimeSourceFactory* factory = QMimeSourceFactory::defaultFactory();
+ TQMimeSourceFactory* factory = TQMimeSourceFactory::defaultFactory();
- QImage excluded(16, 16, 32);
- FillAndFrameBlack(&excluded, bar->colorGroup().color(QColorGroup::Mid).pixel(), 16);
+ TQImage excluded(16, 16, 32);
+ FillAndFrameBlack(&excluded, TQColor(bar->tqcolorGroup().color(TQColorGroup::Mid)).pixel(), 16);
factory->setImage("excluded_color", excluded);
- QImage available(16, 16, 32);
- FillAndFrameBlack(&available, bar->colorGroup().highlight().pixel(), 16);
+ TQImage available(16, 16, 32);
+ FillAndFrameBlack(&available, bar->tqcolorGroup().highlight().pixel(), 16);
factory->setImage("available_color", available);
- QImage unavailable(16, 16, 32);
- FillAndFrameBlack(&unavailable, bar->colorGroup().base().pixel(), 16);
+ TQImage unavailable(16, 16, 32);
+ FillAndFrameBlack(&unavailable, bar->tqcolorGroup().base().pixel(), 16);
factory->setImage("unavailable_color", unavailable);
}
- ChunkBar::ChunkBar(QWidget *parent, const char *name)
- : QFrame(parent, name),curr_tc(0)
+ ChunkBar::ChunkBar(TQWidget *tqparent, const char *name)
+ : TQFrame(tqparent, name),curr_tc(0)
{
setFrameShape(StyledPanel);
setFrameShadow(Sunken);
@@ -95,7 +95,7 @@ namespace kt
InitializeToolTipImages(this);
- QToolTip::add(this, i18n("<img src=\"available_color\">&nbsp; - Downloaded Chunks<br><img src=\"unavailable_color\">&nbsp; - Chunks to Download<br><img src=\"excluded_color\">&nbsp; - Excluded Chunks"));
+ TQToolTip::add(this, i18n("<img src=\"available_color\">&nbsp; - Downloaded Chunks<br><img src=\"unavailable_color\">&nbsp; - Chunks to Download<br><img src=\"excluded_color\">&nbsp; - Excluded Chunks"));
}
@@ -106,7 +106,7 @@ namespace kt
void ChunkBar::updateBar()
{
const BitSet & bs = getBitSet();
- QSize s = contentsRect().size();
+ TQSize s = contentsRect().size();
bool changed = !(curr == bs);
if (show_excluded && curr_tc)
{
@@ -121,22 +121,22 @@ namespace kt
// PROFILE("ChunkBar::updateBar");
// Out() << "Pixmap : " << s.width() << " " << s.height() << endl;
pixmap.resize(s);
- pixmap.fill(colorGroup().color(QColorGroup::Base));
- QPainter painter(&pixmap);
+ pixmap.fill(tqcolorGroup().color(TQColorGroup::Base));
+ TQPainter painter(&pixmap);
drawBarContents(&painter);
update();
}
}
- void ChunkBar::drawContents(QPainter *p)
+ void ChunkBar::drawContents(TQPainter *p)
{
// first draw background
if (isEnabled())
- p->setBrush(colorGroup().base());
+ p->setBrush(tqcolorGroup().base());
else
- p->setBrush(colorGroup().background());
+ p->setBrush(tqcolorGroup().background());
- p->setPen(Qt::NoPen);
+ p->setPen(TQt::NoPen);
p->drawRect(contentsRect());
if (isEnabled())
p->drawPixmap(contentsRect(),pixmap);
@@ -145,16 +145,16 @@ namespace kt
void ChunkBar::setTC(kt::TorrentInterface* tc)
{
curr_tc = tc;
- QSize s = contentsRect().size();
+ TQSize s = contentsRect().size();
//Out() << "Pixmap : " << s.width() << " " << s.height() << endl;
pixmap.resize(s);
- pixmap.fill(colorGroup().color(QColorGroup::Base));
- QPainter painter(&pixmap);
+ pixmap.fill(tqcolorGroup().color(TQColorGroup::Base));
+ TQPainter painter(&pixmap);
drawBarContents(&painter);
update();
}
- void ChunkBar::drawBarContents(QPainter *p)
+ void ChunkBar::drawBarContents(TQPainter *p)
{
p->saveWorldMatrix();
if (curr_tc)
@@ -164,15 +164,15 @@ namespace kt
const BitSet & bs = getBitSet();
curr = bs;
if (bs.allOn())
- drawAllOn(p,colorGroup().highlight());
+ drawAllOn(p,tqcolorGroup().highlight());
else if (s.total_chunks > w)
- drawMoreChunksThenPixels(p,bs,colorGroup().highlight());
+ drawMoreChunksThenPixels(p,bs,tqcolorGroup().highlight());
else
- drawEqual(p,bs,colorGroup().highlight());
+ drawEqual(p,bs,tqcolorGroup().highlight());
if (show_excluded && s.num_chunks_excluded > 0)
{
- QColor c = colorGroup().color(QColorGroup::Mid);
+ TQColor c = tqcolorGroup().color(TQColorGroup::Mid);
if (curr_ebs.allOn())
drawAllOn(p,c);
else if (s.total_chunks > w)
@@ -184,10 +184,10 @@ namespace kt
p->restoreWorldMatrix();
}
- void ChunkBar::drawEqual(QPainter *p,const BitSet & bs,const QColor & color)
+ void ChunkBar::drawEqual(TQPainter *p,const BitSet & bs,const TQColor & color)
{
- //p->setPen(QPen(colorGroup().highlight(),1,Qt::SolidLine));
- QColor c = color;
+ //p->setPen(TQPen(tqcolorGroup().highlight(),1,TQt::SolidLine));
+ TQColor c = color;
Uint32 w = contentsRect().width();
double scale = 1.0;
@@ -195,10 +195,10 @@ namespace kt
if (curr_tc->getStats().total_chunks != w)
scale = (double)w / total_chunks;
- p->setPen(QPen(c,1,Qt::SolidLine));
+ p->setPen(TQPen(c,1,TQt::SolidLine));
p->setBrush(c);
- QValueList<Range> rs;
+ TQValueList<Range> rs;
for (Uint32 i = 0;i < bs.getNumBits();i++)
{
@@ -225,9 +225,9 @@ namespace kt
}
}
- QRect r = contentsRect();
+ TQRect r = contentsRect();
- for (QValueList<Range>::iterator i = rs.begin();i != rs.end();++i)
+ for (TQValueList<Range>::iterator i = rs.begin();i != rs.end();++i)
{
Range & ra = *i;
int rw = ra.last - ra.first + 1;
@@ -235,11 +235,11 @@ namespace kt
}
}
- void ChunkBar::drawMoreChunksThenPixels(QPainter *p,const BitSet & bs,const QColor & color)
+ void ChunkBar::drawMoreChunksThenPixels(TQPainter *p,const BitSet & bs,const TQColor & color)
{
Uint32 w = contentsRect().width();
double chunks_per_pixel = (double)bs.getNumBits() / w;
- QValueList<Range> rs;
+ TQValueList<Range> rs;
for (Uint32 i = 0;i < w;i++)
{
@@ -274,14 +274,14 @@ namespace kt
}
}
- QRect r = contentsRect();
+ TQRect r = contentsRect();
- for (QValueList<Range>::iterator i = rs.begin();i != rs.end();++i)
+ for (TQValueList<Range>::iterator i = rs.begin();i != rs.end();++i)
{
Range & ra = *i;
int rw = ra.last - ra.first + 1;
int fac = ra.fac;
- QColor c = color;
+ TQColor c = color;
if (fac < 100)
{
// do some rounding off
@@ -293,18 +293,18 @@ namespace kt
fac = 65;
c = color.light(200-fac);
}
- p->setPen(QPen(c,1,Qt::SolidLine));
+ p->setPen(TQPen(c,1,TQt::SolidLine));
p->setBrush(c);
p->drawRect(ra.first,0,rw,r.height());
}
}
- void ChunkBar::drawAllOn(QPainter *p,const QColor & color)
+ void ChunkBar::drawAllOn(TQPainter *p,const TQColor & color)
{
- p->setPen(QPen(color,1,Qt::SolidLine));
+ p->setPen(TQPen(color,1,TQt::SolidLine));
p->setBrush(color);
- QSize s = contentsRect().size();
+ TQSize s = contentsRect().size();
p->drawRect(0,0,s.width(),s.height());
}
}
diff --git a/plugins/infowidget/chunkbar.h b/plugins/infowidget/chunkbar.h
index 6cf0d6a..32366c3 100644
--- a/plugins/infowidget/chunkbar.h
+++ b/plugins/infowidget/chunkbar.h
@@ -21,11 +21,11 @@
#ifndef CHUNKBAR_H
#define CHUNKBAR_H
-#include <qlabel.h>
+#include <tqlabel.h>
#include <util/bitset.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
-class QPainter;
+class TQPainter;
namespace kt
{
@@ -47,30 +47,31 @@ namespace kt
* BitSets can represent which chunks are downloaded, which chunks are available
* and which chunks are excluded.
*/
- class ChunkBar : public QFrame
+ class ChunkBar : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- ChunkBar(QWidget *parent = 0, const char *name = 0);
+ ChunkBar(TQWidget *tqparent = 0, const char *name = 0);
virtual ~ChunkBar();
void setTC(kt::TorrentInterface* tc);
virtual const bt::BitSet & getBitSet() const = 0;
- virtual void drawContents(QPainter *p);
+ virtual void drawContents(TQPainter *p);
virtual void updateBar();
private:
- void drawEqual(QPainter *p,const bt::BitSet & bs,const QColor & color);
- void drawMoreChunksThenPixels(QPainter *p,const bt::BitSet & bs,const QColor & color);
- void drawAllOn(QPainter *p,const QColor & color);
- void drawBarContents(QPainter *p);
+ void drawEqual(TQPainter *p,const bt::BitSet & bs,const TQColor & color);
+ void drawMoreChunksThenPixels(TQPainter *p,const bt::BitSet & bs,const TQColor & color);
+ void drawAllOn(TQPainter *p,const TQColor & color);
+ void drawBarContents(TQPainter *p);
protected:
kt::TorrentInterface* curr_tc;
bool show_excluded;
bt::BitSet curr,curr_ebs;
- QPixmap pixmap;
+ TQPixmap pixmap;
};
}
diff --git a/plugins/infowidget/chunkdownloadview.cpp b/plugins/infowidget/chunkdownloadview.cpp
index 276a311..3258441 100644
--- a/plugins/infowidget/chunkdownloadview.cpp
+++ b/plugins/infowidget/chunkdownloadview.cpp
@@ -18,7 +18,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include <klocale.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <interfaces/chunkdownloadinterface.h>
#include <interfaces/functions.h>
#include <interfaces/torrentinterface.h>
@@ -42,14 +42,14 @@ namespace kt
ChunkDownloadInterface::Stats s;
cd->getStats(s);
- setText(0,QString::number(s.chunk_index));
- setText(1,QString("%1 / %2").arg(s.pieces_downloaded).arg(s.total_pieces));
+ setText(0,TQString::number(s.chunk_index));
+ setText(1,TQString("%1 / %2").tqarg(s.pieces_downloaded).tqarg(s.total_pieces));
setText(2,s.current_peer_id);
setText(3,KBytesPerSecToString(s.download_speed / 1024.0));
- setText(4,QString::number(s.num_downloaders));
+ setText(4,TQString::number(s.num_downloaders));
}
- int ChunkDownloadViewItem::compare(QListViewItem * i,int col,bool) const
+ int ChunkDownloadViewItem::compare(TQListViewItem * i,int col,bool) const
{
ChunkDownloadViewItem* it = (ChunkDownloadViewItem*)i;
kt::ChunkDownloadInterface* ocd = it->cd;
@@ -61,7 +61,7 @@ namespace kt
{
case 0: return CompareVal(s.chunk_index,os.chunk_index);
case 1: return CompareVal(s.pieces_downloaded,os.pieces_downloaded);
- case 2: return QString::compare(s.current_peer_id,os.current_peer_id);
+ case 2: return TQString::compare(s.current_peer_id,os.current_peer_id);
case 3: return CompareVal(s.download_speed,os.download_speed);
case 4: return CompareVal(s.num_downloaders,os.num_downloaders);
}
@@ -69,16 +69,16 @@ namespace kt
}
- ChunkDownloadView::ChunkDownloadView(QWidget *parent, const char *name)
- : ChunkDownloadViewBase(parent, name)
+ ChunkDownloadView::ChunkDownloadView(TQWidget *tqparent, const char *name)
+ : ChunkDownloadViewBase(tqparent, name)
{
m_list_view->setShowSortIndicator(true);
m_list_view->setAllColumnsShowFocus(true);
- m_list_view->setColumnAlignment(0,Qt::AlignLeft);
- m_list_view->setColumnAlignment(1,Qt::AlignCenter);
- m_list_view->setColumnAlignment(3,Qt::AlignRight);
- m_list_view->setColumnAlignment(4,Qt::AlignRight);
+ m_list_view->setColumnAlignment(0,TQt::AlignLeft);
+ m_list_view->setColumnAlignment(1,TQt::AlignCenter);
+ m_list_view->setColumnAlignment(3,TQt::AlignRight);
+ m_list_view->setColumnAlignment(4,TQt::AlignRight);
curr_tc = 0;
}
@@ -95,7 +95,7 @@ namespace kt
void ChunkDownloadView::removeDownload(kt::ChunkDownloadInterface* cd)
{
- if (!items.contains(cd))
+ if (!items.tqcontains(cd))
return;
ChunkDownloadViewItem* it = items[cd];
@@ -121,7 +121,7 @@ namespace kt
if (!curr_tc)
return;
- QMap<ChunkDownloadInterface*,ChunkDownloadViewItem*>::iterator i = items.begin();
+ TQMap<ChunkDownloadInterface*,ChunkDownloadViewItem*>::iterator i = items.begin();
while (i != items.end())
{
ChunkDownloadViewItem* it = i.data();
@@ -131,24 +131,24 @@ namespace kt
m_list_view->sort();
const TorrentStats & s = curr_tc->getStats();
- m_chunks_downloading->setText(QString::number(s.num_chunks_downloading));
- m_chunks_downloaded->setText(QString::number(s.num_chunks_downloaded));
- m_total_chunks->setText(QString::number(s.total_chunks));
- m_excluded_chunks->setText(QString::number(s.num_chunks_excluded));
- m_chunks_left->setText(QString::number(s.num_chunks_left));
+ m_chunks_downloading->setText(TQString::number(s.num_chunks_downloading));
+ m_chunks_downloaded->setText(TQString::number(s.num_chunks_downloaded));
+ m_total_chunks->setText(TQString::number(s.total_chunks));
+ m_excluded_chunks->setText(TQString::number(s.num_chunks_excluded));
+ m_chunks_left->setText(TQString::number(s.num_chunks_left));
if( s.chunk_size / 1024 < 1024 )
- m_size_chunks->setText(QString::number(s.chunk_size / 1024) + "." + QString::number((s.chunk_size % 1024) / 100) + " KB");
+ m_size_chunks->setText(TQString::number(s.chunk_size / 1024) + "." + TQString::number((s.chunk_size % 1024) / 100) + " KB");
else
- m_size_chunks->setText(QString::number(s.chunk_size / 1024 / 1024) + "." + QString::number(((s.chunk_size / 1024) % 1024) / 100) + " MB");
+ m_size_chunks->setText(TQString::number(s.chunk_size / 1024 / 1024) + "." + TQString::number(((s.chunk_size / 1024) % 1024) / 100) + " MB");
}
- void ChunkDownloadView::saveLayout(KConfig* cfg,const QString & group_name)
+ void ChunkDownloadView::saveLayout(KConfig* cfg,const TQString & group_name)
{
m_list_view->saveLayout(cfg,group_name);
}
- void ChunkDownloadView::restoreLayout(KConfig* cfg,const QString & group_name)
+ void ChunkDownloadView::restoreLayout(KConfig* cfg,const TQString & group_name)
{
m_list_view->restoreLayout(cfg,group_name);
}
diff --git a/plugins/infowidget/chunkdownloadview.h b/plugins/infowidget/chunkdownloadview.h
index a00a746..860052d 100644
--- a/plugins/infowidget/chunkdownloadview.h
+++ b/plugins/infowidget/chunkdownloadview.h
@@ -21,7 +21,7 @@
#define BTCHUNKDOWNLOADVIEW_H
#include <klistview.h>
-#include <qmap.h>
+#include <tqmap.h>
#include "chunkdownloadviewbase.h"
namespace kt
@@ -36,7 +36,7 @@ namespace kt
ChunkDownloadViewItem(KListView* cdv,kt::ChunkDownloadInterface* cd);
void update();
- int compare(QListViewItem * i,int col,bool) const;
+ int compare(TQListViewItem * i,int col,bool) const;
};
@@ -46,15 +46,16 @@ namespace kt
class ChunkDownloadView : public ChunkDownloadViewBase
{
Q_OBJECT
+ TQ_OBJECT
- QMap<kt::ChunkDownloadInterface*,ChunkDownloadViewItem*> items;
+ TQMap<kt::ChunkDownloadInterface*,ChunkDownloadViewItem*> items;
kt::TorrentInterface* curr_tc;
public:
- ChunkDownloadView(QWidget *parent = 0, const char *name = 0);
+ ChunkDownloadView(TQWidget *tqparent = 0, const char *name = 0);
virtual ~ChunkDownloadView();
- void saveLayout(KConfig* cfg,const QString & group_name);
- void restoreLayout(KConfig* cfg,const QString & group_name);
+ void saveLayout(KConfig* cfg,const TQString & group_name);
+ void restoreLayout(KConfig* cfg,const TQString & group_name);
void clear();
void update();
void changeTC(kt::TorrentInterface* tc);
diff --git a/plugins/infowidget/chunkdownloadviewbase.ui b/plugins/infowidget/chunkdownloadviewbase.ui
index 24a6e18..d4426b5 100644
--- a/plugins/infowidget/chunkdownloadviewbase.ui
+++ b/plugins/infowidget/chunkdownloadviewbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ChunkDownloadViewBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ChunkDownloadViewBase</cstring>
</property>
@@ -19,23 +19,23 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout8</cstring>
+ <cstring>tqlayout8</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout11</cstring>
+ <cstring>tqlayout11</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -43,11 +43,11 @@
<string>Total:</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_total_chunks</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>50</width>
<height>0</height>
@@ -59,21 +59,21 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout14</cstring>
+ <cstring>tqlayout14</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel5</cstring>
</property>
@@ -81,11 +81,11 @@
<string>Currently downloading:</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_chunks_downloading</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>50</width>
<height>0</height>
@@ -97,21 +97,21 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout13</cstring>
+ <cstring>tqlayout13</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -119,11 +119,11 @@
<string>Downloaded:</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_chunks_downloaded</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>50</width>
<height>0</height>
@@ -135,21 +135,21 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout38</cstring>
+ <cstring>tqlayout38</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_4</cstring>
</property>
@@ -157,11 +157,11 @@
<string>Excluded:</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_excluded_chunks</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>50</width>
<height>0</height>
@@ -173,21 +173,21 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout38_2</cstring>
+ <cstring>tqlayout38_2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_4_2</cstring>
</property>
@@ -195,11 +195,11 @@
<string>Left:</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_chunks_left</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>50</width>
<height>0</height>
@@ -211,21 +211,21 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout24</cstring>
+ <cstring>tqlayout24</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_8</cstring>
</property>
@@ -233,11 +233,11 @@
<string>Size:</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_size_chunks</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>80</width>
<height>0</height>
@@ -249,7 +249,7 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
@@ -265,7 +265,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>40</width>
<height>20</height>
@@ -338,7 +338,7 @@
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
</includehints>
diff --git a/plugins/infowidget/downloadedchunkbar.cpp b/plugins/infowidget/downloadedchunkbar.cpp
index ab87ff7..6e6fe9a 100644
--- a/plugins/infowidget/downloadedchunkbar.cpp
+++ b/plugins/infowidget/downloadedchunkbar.cpp
@@ -24,8 +24,8 @@
namespace kt
{
- DownloadedChunkBar::DownloadedChunkBar(QWidget* parent, const char* name)
- : ChunkBar(parent,name)
+ DownloadedChunkBar::DownloadedChunkBar(TQWidget* tqparent, const char* name)
+ : ChunkBar(tqparent,name)
{
show_excluded = true;
}
diff --git a/plugins/infowidget/downloadedchunkbar.h b/plugins/infowidget/downloadedchunkbar.h
index 996634f..2b9fce1 100644
--- a/plugins/infowidget/downloadedchunkbar.h
+++ b/plugins/infowidget/downloadedchunkbar.h
@@ -30,8 +30,9 @@ namespace kt
class DownloadedChunkBar : public ChunkBar
{
Q_OBJECT
+ TQ_OBJECT
public:
- DownloadedChunkBar(QWidget* parent, const char* name);
+ DownloadedChunkBar(TQWidget* tqparent, const char* name);
virtual ~DownloadedChunkBar();
virtual const bt::BitSet & getBitSet() const;
diff --git a/plugins/infowidget/fileview.cpp b/plugins/infowidget/fileview.cpp
index 7fb56a6..9c64960 100644
--- a/plugins/infowidget/fileview.cpp
+++ b/plugins/infowidget/fileview.cpp
@@ -29,7 +29,7 @@
#include <interfaces/functions.h>
#include <interfaces/torrentinterface.h>
#include <interfaces/torrentfileinterface.h>
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#include "functions.h"
#include "iwfiletreeitem.h"
#include "iwfiletreediritem.h"
@@ -40,10 +40,10 @@ using namespace bt;
namespace kt
{
- FileView::FileView(QWidget *parent, const char *name)
- : KListView(parent, name),curr_tc(0),multi_root(0),pending_fill(0),next_fill_item(0)
+ FileView::FileView(TQWidget *tqparent, const char *name)
+ : KListView(tqparent, name),curr_tc(0),multi_root(0),pending_fill(0),next_fill_item(0)
{
- setFrameShape(QFrame::NoFrame);
+ setFrameShape(TQFrame::NoFrame);
addColumn( i18n( "File" ) );
addColumn( i18n( "Size" ) );
addColumn( i18n( "Download" ) );
@@ -69,17 +69,17 @@ namespace kt
context_menu->setItemEnabled(dnd_keep_id, false);
context_menu->setItemEnabled(dnd_throw_away_id, false);
- connect(this,SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint& )),
- this,SLOT(showContextMenu(KListView*, QListViewItem*, const QPoint& )));
- connect(context_menu, SIGNAL ( activated ( int ) ), this, SLOT ( contextItem ( int ) ) );
- connect(this,SIGNAL(doubleClicked( QListViewItem*, const QPoint&, int )),
- this,SLOT(onDoubleClicked(QListViewItem*, const QPoint&, int)));
+ connect(this,TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint& )),
+ this,TQT_SLOT(showContextMenu(KListView*, 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)));
- connect(&fill_timer, SIGNAL(timeout()), this, SLOT( fillTreePartial() ) );
+ connect(&fill_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT( fillTreePartial() ) );
setEnabled(false);
- setSelectionMode(QListView::Extended);
+ setSelectionMode(TQListView::Extended);
}
@@ -108,8 +108,8 @@ namespace kt
multi_root->updatePercentageInformation();
multi_root->updatePreviewInformation(curr_tc);
fill_timer.stop();
- connect(curr_tc,SIGNAL(missingFilesMarkedDND( kt::TorrentInterface* )),
- this,SLOT(refreshFileTree( kt::TorrentInterface* )));
+ connect(curr_tc,TQT_SIGNAL(missingFilesMarkedDND( kt::TorrentInterface* )),
+ this,TQT_SLOT(refreshFileTree( kt::TorrentInterface* )));
}
else
fill_timer.start(0,true);
@@ -141,8 +141,8 @@ namespace kt
item->setPixmap(0,KMimeType::findByPath(s.torrent_name)->pixmap(KIcon::Small));
setEnabled(true);
- connect(curr_tc,SIGNAL(missingFilesMarkedDND( kt::TorrentInterface* )),
- this,SLOT(refreshFileTree( kt::TorrentInterface* )));
+ connect(curr_tc,TQT_SIGNAL(missingFilesMarkedDND( kt::TorrentInterface* )),
+ this,TQT_SLOT(refreshFileTree( kt::TorrentInterface* )));
}
}
@@ -173,7 +173,7 @@ namespace kt
{
if (curr_tc && !curr_tc->getStats().multi_file_torrent)
{
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
if (!it.current())
return;
@@ -186,7 +186,7 @@ namespace kt
else if (percent > 100.0)
percent = 100.0;
KLocale* loc = KGlobal::locale();
- it.current()->setText(4,i18n("%1 %").arg(loc->formatNumber(percent,2)));
+ it.current()->setText(4,i18n("%1 %").tqarg(loc->formatNumber(percent,2)));
}
}
@@ -194,7 +194,7 @@ namespace kt
{
if (curr_tc && !curr_tc->getStats().multi_file_torrent)
{
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
if (!it.current())
return;
@@ -211,14 +211,14 @@ namespace kt
}
}
- void FileView::showContextMenu(KListView* ,QListViewItem*,const QPoint & p)
+ void FileView::showContextMenu(KListView* ,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
- QPtrList<QListViewItem> sel = selectedItems();
+ TQPtrList<TQListViewItem> sel = selectedItems();
switch(sel.count())
{
case 0:
@@ -237,7 +237,7 @@ namespace kt
return;
break;
}
- QListViewItem* item = sel.getFirst();
+ TQListViewItem* item = sel.getFirst();
context_menu->setItemEnabled(first_id, false);
context_menu->setItemEnabled(normal_id, false);
@@ -321,7 +321,7 @@ namespace kt
void FileView::contextItem(int id)
{
- QPtrList<QListViewItem> sel = selectedItems();
+ TQPtrList<TQListViewItem> sel = selectedItems();
Priority newpriority = NORMAL_PRIORITY;
if(id == this->preview_id)
@@ -338,7 +338,7 @@ namespace kt
n = (*sel.begin())->childCount() == 0 ? 1 : 666;
}
- QString msg = i18n(
+ TQString msg = i18n(
"You will lose all data in this file, are you sure you want to do this ?",
"You will lose all data in these files, are you sure you want to do this ?",n);
@@ -365,17 +365,17 @@ namespace kt
- QPtrList<QListViewItem>::Iterator i = sel.begin();
+ TQPtrList<TQListViewItem>::Iterator i = sel.begin();
while(i != sel.end())
{
- QListViewItem* item = *i;
+ TQListViewItem* item = *i;
changePriority(item, newpriority);
multi_root->updatePriorityInformation(curr_tc);
i++;
}
}
- void FileView::changePriority(QListViewItem* item, Priority newpriority)
+ void FileView::changePriority(TQListViewItem* item, Priority newpriority)
{
if(item->childCount() == 0)
{
@@ -396,7 +396,7 @@ namespace kt
}
return;
}
- QListViewItem* myChild = item->firstChild();
+ TQListViewItem* myChild = item->firstChild();
while( myChild )
{
changePriority(myChild, newpriority);
@@ -413,7 +413,7 @@ namespace kt
multi_root->updateDNDInformation();
}
- void FileView::onDoubleClicked(QListViewItem* item,const QPoint & ,int )
+ void FileView::onDoubleClicked(TQListViewItem* item,const TQPoint & ,int )
{
if (!curr_tc)
return;
@@ -426,7 +426,7 @@ namespace kt
{
// file
FileTreeItem* file = (FileTreeItem*)item;
- QString path = "cache" + bt::DirSeparator() + file->getTorrentFile().getPath();
+ TQString path = "cache" + bt::DirSeparator() + file->getTorrentFile().getPath();
new KRun(KURL::fromPathOrURL(curr_tc->getTorDir() + path), 0, true, true);
}
else
@@ -438,7 +438,7 @@ namespace kt
}
else
{
- QFileInfo fi(curr_tc->getTorDir()+"cache");
+ TQFileInfo fi(curr_tc->getTorDir()+"cache");
new KRun(KURL::fromPathOrURL(fi.readLink()), 0, true, true);
}
}
diff --git a/plugins/infowidget/fileview.h b/plugins/infowidget/fileview.h
index 6a827dc..0e06eba 100644
--- a/plugins/infowidget/fileview.h
+++ b/plugins/infowidget/fileview.h
@@ -22,7 +22,7 @@
#include <klistview.h>
#include <util/constants.h>
-#include <qtimer.h>
+#include <tqtimer.h>
namespace kt
{
@@ -35,32 +35,33 @@ namespace kt
class FileView : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- FileView(QWidget *parent = 0, const char *name = 0);
+ FileView(TQWidget *tqparent = 0, const char *name = 0);
virtual ~FileView();
void update();
void changeTC(kt::TorrentInterface* tc);
private slots:
void contextItem(int id);
- void showContextMenu(KListView* ,QListViewItem* item,const QPoint & p);
+ void showContextMenu(KListView* ,TQListViewItem* item,const TQPoint & p);
void refreshFileTree(kt::TorrentInterface* tc);
- void onDoubleClicked(QListViewItem* item,const QPoint & ,int );
+ void onDoubleClicked(TQListViewItem* item,const TQPoint & ,int );
void fillTreePartial();
private:
void fillFileTree();
void readyPreview();
void readyPercentage();
- void changePriority(QListViewItem* item, bt::Priority newpriority);
+ void changePriority(TQListViewItem* item, bt::Priority newpriority);
private:
kt::TorrentInterface* curr_tc;
IWFileTreeDirItem* multi_root;
bool pending_fill;
KPopupMenu* context_menu;
- QString preview_path;
- QTimer fill_timer;
+ TQString preview_path;
+ TQTimer fill_timer;
int preview_id;
int first_id;
int normal_id;
diff --git a/plugins/infowidget/flagdb.cpp b/plugins/infowidget/flagdb.cpp
index 140a3b7..ceea6fc 100644
--- a/plugins/infowidget/flagdb.cpp
+++ b/plugins/infowidget/flagdb.cpp
@@ -17,17 +17,17 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qfile.h>
-#include <qimage.h>
+#include <tqfile.h>
+#include <tqimage.h>
#include <kstandarddirs.h>
#include "flagdb.h"
-kt::FlagDBSource::FlagDBSource(const char* type, const QString& pathPattern)
+kt::FlagDBSource::FlagDBSource(const char* type, const TQString& pathPattern)
: type(type), pathPattern(pathPattern)
{
}
-kt::FlagDBSource::FlagDBSource(const QString& pathPattern)
+kt::FlagDBSource::FlagDBSource(const TQString& pathPattern)
: type(NULL), pathPattern(pathPattern)
{
}
@@ -37,16 +37,16 @@ kt::FlagDBSource::FlagDBSource()
{
}
-QString kt::FlagDBSource::FlagDBSource::getPath(const QString& country) const
+TQString kt::FlagDBSource::FlagDBSource::getPath(const TQString& country) const
{
if (type) {
- return locate(type, pathPattern.arg(country));
+ return locate(type, pathPattern.tqarg(country));
} else {
- return pathPattern.arg(country);
+ return pathPattern.tqarg(country);
}
}
-const QPixmap& kt::FlagDB::nullPixmap = QPixmap();
+const TQPixmap& kt::FlagDB::nullPixmap = TQPixmap();
kt::FlagDB::FlagDB(int preferredWidth, int preferredHeight)
: preferredWidth(preferredWidth),
@@ -74,33 +74,33 @@ void kt::FlagDB::addFlagSource(const FlagDBSource& source)
sources.append(source);
}
-void kt::FlagDB::addFlagSource(const char* type, const QString& pathPattern)
+void kt::FlagDB::addFlagSource(const char* type, const TQString& pathPattern)
{
addFlagSource(FlagDBSource(type, pathPattern));
}
-const QValueList<kt::FlagDBSource>& kt::FlagDB::listSources() const
+const TQValueList<kt::FlagDBSource>& kt::FlagDB::listSources() const
{
return sources;
}
-bool kt::FlagDB::isFlagAvailable(const QString& country)
+bool kt::FlagDB::isFlagAvailable(const TQString& country)
{
return getFlag(country).isNull();
}
-const QPixmap& kt::FlagDB::getFlag(const QString& country)
+const TQPixmap& kt::FlagDB::getFlag(const TQString& country)
{
- const QString& c = country.lower();
- if (!db.contains(c)) {
- QImage img;
- QPixmap pixmap;
- for (QValueList<FlagDBSource>::const_iterator it = sources.constBegin(); it != sources.constEnd(); it++) {
- const QString& path = (*it).getPath(c);
- if (QFile::exists(path)) {
+ const TQString& c = country.lower();
+ if (!db.tqcontains(c)) {
+ TQImage img;
+ TQPixmap pixmap;
+ for (TQValueList<FlagDBSource>::const_iterator it = sources.constBegin(); it != sources.constEnd(); it++) {
+ const TQString& path = (*it).getPath(c);
+ if (TQFile::exists(path)) {
if (img.load(path)) {
if (img.width() != preferredWidth || img.height() != preferredHeight) {
- const QImage& imgScaled = img.smoothScale(preferredWidth, preferredHeight, QImage::ScaleMin);
+ const TQImage& imgScaled = img.smoothScale(preferredWidth, preferredHeight, TQ_ScaleMin);
if (!imgScaled.isNull()) {
pixmap.convertFromImage(imgScaled);
break;
diff --git a/plugins/infowidget/flagdb.h b/plugins/infowidget/flagdb.h
index f2524ab..9002671 100644
--- a/plugins/infowidget/flagdb.h
+++ b/plugins/infowidget/flagdb.h
@@ -19,10 +19,10 @@
#ifndef FLAGDB_H
#define FLAGDB_H
-#include <qpixmap.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
namespace kt
{
@@ -30,16 +30,16 @@ namespace kt
{
public:
FlagDBSource();
- FlagDBSource(const char* type, const QString& pathPattern);
- FlagDBSource(const QString& pathPattern);
- QString getPath(const QString& country) const;
+ FlagDBSource(const char* type, const TQString& pathPattern);
+ FlagDBSource(const TQString& pathPattern);
+ TQString getPath(const TQString& country) const;
const char* getType() { return type; };
- const QString& getPathPattern() { return pathPattern; };
+ const TQString& getPathPattern() { return pathPattern; };
private:
const char* type;
- const QString pathPattern;
+ const TQString pathPattern;
};
/**
@@ -53,15 +53,15 @@ namespace kt
~FlagDB();
void addFlagSource(const FlagDBSource& source);
- void addFlagSource(const char* type, const QString& pathPattern);
- const QValueList<FlagDBSource>& listSources() const;
- bool isFlagAvailable(const QString& country);
- const QPixmap& getFlag(const QString& country);
+ void addFlagSource(const char* type, const TQString& pathPattern);
+ const TQValueList<FlagDBSource>& listSources() const;
+ bool isFlagAvailable(const TQString& country);
+ const TQPixmap& getFlag(const TQString& country);
private:
- static const QPixmap& nullPixmap;
+ static const TQPixmap& nullPixmap;
int preferredWidth, preferredHeight;
- QValueList<FlagDBSource> sources;
- QMap<QString,QPixmap> db;
+ TQValueList<FlagDBSource> sources;
+ TQMap<TQString,TQPixmap> db;
};
}
diff --git a/plugins/infowidget/floatspinbox.cpp b/plugins/infowidget/floatspinbox.cpp
index 8b78981..d498d7d 100644
--- a/plugins/infowidget/floatspinbox.cpp
+++ b/plugins/infowidget/floatspinbox.cpp
@@ -22,16 +22,16 @@
#include <kglobal.h>
#include <klocale.h>
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include "floatspinbox.h"
#include "localefloatvalidator.h"
kt::FloatSpinBox::FloatSpinBox(
- QWidget * parent,
+ TQWidget * tqparent,
const char * name
)
- :QSpinBox( -100, 100, 1, parent, name),
+ :TQSpinBox( -100, 100, 1, tqparent, name),
m_precision_digits( 2 ),
m_value(0.0f),
m_minValue(0.0f),
@@ -39,19 +39,19 @@ kt::FloatSpinBox::FloatSpinBox(
m_useRange(false),
m_oldIntVal(0)
{
- QSpinBox::setValue(0);
+ TQSpinBox::setValue(0);
setStep( 0.25f );
- connect(this, SIGNAL(valueChanged ( int )), this, SLOT(internalValueChanged( int )));
- setValidator( new LocaleFloatValidator( dynamic_cast<QSpinBox * > (this) ));
- editor()->setAlignment(Qt::AlignRight);
+ connect(this, TQT_SIGNAL(valueChanged ( int )), this, TQT_SLOT(internalValueChanged( int )));
+ setValidator( new LocaleFloatValidator( TQT_TQOBJECT(dynamic_cast<TQSpinBox * > (this)) ));
+ editor()->tqsetAlignment(TQt::AlignRight);
}
kt::FloatSpinBox::FloatSpinBox(
int precision,
- QWidget * parent,
+ TQWidget * tqparent,
const char * name
)
- :QSpinBox( -100, 100, 1, parent, name),
+ :TQSpinBox( -100, 100, 1, tqparent, name),
m_precision_digits( precision ),
m_value(0.0f),
m_minValue(0.0f),
@@ -59,10 +59,10 @@ kt::FloatSpinBox::FloatSpinBox(
m_useRange(false),
m_oldIntVal(0)
{
- QSpinBox::setValue(0);
+ TQSpinBox::setValue(0);
setStep( 0.25 );
- connect(this, SIGNAL(valueChanged ( int )), this, SLOT(internalValueChanged( int )));
- setValidator( new LocaleFloatValidator( dynamic_cast<QSpinBox * > (this) ));
+ connect(this, TQT_SIGNAL(valueChanged ( int )), this, TQT_SLOT(internalValueChanged( int )));
+ setValidator( new LocaleFloatValidator( TQT_TQOBJECT(dynamic_cast<TQSpinBox * > (this)) ));
}
@@ -71,10 +71,10 @@ kt::FloatSpinBox::FloatSpinBox(
float maxValue,
float step,
int precision,
- QWidget * parent,
+ TQWidget * tqparent,
const char * name
)
- :QSpinBox( -100, 100, 1, parent, name),
+ :TQSpinBox( -100, 100, 1, tqparent, name),
m_precision_digits( precision ),
m_value(0.0f),
m_minValue(minValue),
@@ -82,27 +82,27 @@ kt::FloatSpinBox::FloatSpinBox(
m_useRange(true),
m_oldIntVal(0)
{
- QSpinBox::setValue(0);
+ TQSpinBox::setValue(0);
setValue(0.0f);
setStep( step );
- connect(this, SIGNAL(valueChanged ( int )), this, SLOT(internalValueChanged( int )));
- setValidator( new LocaleFloatValidator( this ));
+ connect(this, TQT_SIGNAL(valueChanged ( int )), this, TQT_SLOT(internalValueChanged( int )));
+ setValidator( new LocaleFloatValidator( TQT_TQOBJECT(this) ));
}
-QString kt::FloatSpinBox::mapValueToText( int value )
+TQString kt::FloatSpinBox::mapValueToText( int value )
{
- /// This is called from QSpinBox, which passes an int.
- /// As we don't use the QSpinBox's internal value, we ignore it.
- QString t = KGlobal::locale()->formatNumber( m_value, m_precision_digits);
+ /// This is called from TQSpinBox, which passes an int.
+ /// As we don't use the TQSpinBox's internal value, we ignore it.
+ TQString t = KGlobal::locale()->formatNumber( m_value, m_precision_digits);
editor()->setText(t);
return t;
}
int kt::FloatSpinBox::mapTextToValue( bool * ok )
{
- /// This is called from QSpinBox, which needs an int for return.
- /// As we don't use the QSpinBox's internal value, we only return 0.
+ /// This is called from TQSpinBox, which needs an int for return.
+ /// As we don't use the TQSpinBox's internal value, we only return 0.
float value = KGlobal::locale()->readNumber(text(), ok);
if (*ok)
@@ -183,7 +183,7 @@ void kt::FloatSpinBox::setStep( float step)
void kt::FloatSpinBox::internalValueChanged( int value )
{
/// The step buttons won't work without tracking the
- /// QSpinbox's value changes.
+ /// TQSpinbox's value changes.
if ( value > m_oldIntVal)
{
diff --git a/plugins/infowidget/floatspinbox.h b/plugins/infowidget/floatspinbox.h
index 42545bc..8aa4dc8 100644
--- a/plugins/infowidget/floatspinbox.h
+++ b/plugins/infowidget/floatspinbox.h
@@ -22,7 +22,7 @@
#ifndef FLOATSPINBOX_H
#define FLOATSPINBOX_H
-#include <qspinbox.h>
+#include <tqspinbox.h>
namespace kt
{
@@ -31,21 +31,22 @@ namespace kt
* @author Jonas Widarsson
*
* A Spinbox for float values which respects KGlobal::locale().
- * QSpinBox's internal integer value is only
+ * TQSpinBox's internal integer value is only
* used for step detection.
*/
- class FloatSpinBox : public QSpinBox
+ class FloatSpinBox : public TQSpinBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- FloatSpinBox( QWidget* parent=0, const char* name=0 );
- FloatSpinBox( int precision = 2, QWidget* parent=0, const char* name=0 );
+ FloatSpinBox( TQWidget* tqparent=0, const char* name=0 );
+ FloatSpinBox( int precision = 2, TQWidget* tqparent=0, const char* name=0 );
FloatSpinBox( float minValue, float maxValue, float step = 0.5, int precision = 2,
- QWidget* parent=0, const char* name=0 );
+ TQWidget* tqparent=0, const char* name=0 );
virtual ~FloatSpinBox();
- QString mapValueToText( int value );
+ TQString mapValueToText( int value );
int mapTextToValue( bool *ok );
diff --git a/plugins/infowidget/infowidgetplugin.cpp b/plugins/infowidget/infowidgetplugin.cpp
index 4957c48..cbd30ef 100644
--- a/plugins/infowidget/infowidgetplugin.cpp
+++ b/plugins/infowidget/infowidgetplugin.cpp
@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qscrollview.h>
+#include <tqscrollview.h>
#include <kgenericfactory.h>
#include <kglobal.h>
#include <klocale.h>
@@ -47,8 +47,8 @@ namespace kt
{
- InfoWidgetPlugin::InfoWidgetPlugin(QObject* parent, const char* name, const QStringList& args)
- : Plugin(parent, name, args,NAME,i18n("Info Widget"),AUTHOR,EMAIL,
+ InfoWidgetPlugin::InfoWidgetPlugin(TQObject* tqparent, const char* name, const TQStringList& args)
+ : Plugin(tqparent, name, args,NAME,i18n("Info Widget"),AUTHOR,EMAIL,
i18n("Shows additional information about a download. Like which chunks have been downloaded, how many seeders and leechers ..."),
"ktinfowidget")
{
@@ -73,7 +73,7 @@ namespace kt
pref = new InfoWidgetPrefPage(this);
getGUI()->addViewListener(this);
- getGUI()->addToolWidget(status_tab,"info",i18n("Status"),GUIInterface::DOCK_BOTTOM);
+ getGUI()->addToolWidget(status_tab,"info",i18n("tqStatus"),GUIInterface::DOCK_BOTTOM);
getGUI()->addToolWidget(file_view,"folder",i18n("Files"),GUIInterface::DOCK_BOTTOM);
showPeerView( InfoWidgetPluginSettings::showPeerView() );
@@ -157,7 +157,7 @@ namespace kt
createMonitor(tc);
}
- bool InfoWidgetPlugin::versionCheck(const QString & version) const
+ bool InfoWidgetPlugin::versionCheck(const TQString & version) const
{
return version == KT_VERSION_MACRO;
}
@@ -216,8 +216,8 @@ namespace kt
tracker_view->changeTC(const_cast<kt::TorrentInterface*>(getGUI()->getCurrentTorrent()));
// seeing that a merge of the trackers might happen after a torrent has been loaded
// we need to update the tracker_view
- connect(getCore(),SIGNAL(loadingFinished(const KURL&, bool, bool)),
- tracker_view,SLOT(onLoadingFinished(const KURL&, bool, bool)));
+ connect(getCore(),TQT_SIGNAL(loadingFinished(const KURL&, bool, bool)),
+ tracker_view,TQT_SLOT(onLoadingFinished(const KURL&, bool, bool)));
}
else if (!show && tracker_view)
{
diff --git a/plugins/infowidget/infowidgetplugin.h b/plugins/infowidget/infowidgetplugin.h
index 9e08e75..cb6702c 100644
--- a/plugins/infowidget/infowidgetplugin.h
+++ b/plugins/infowidget/infowidgetplugin.h
@@ -42,15 +42,16 @@ namespace kt
class InfoWidgetPlugin : public Plugin,public ViewListener
{
Q_OBJECT
+ TQ_OBJECT
public:
- InfoWidgetPlugin(QObject* parent, const char* name, const QStringList& args);
+ InfoWidgetPlugin(TQObject* tqparent, const char* name, const TQStringList& args);
virtual ~InfoWidgetPlugin();
virtual void load();
virtual void unload();
virtual void guiUpdate();
virtual void currentTorrentChanged(TorrentInterface* tc);
- virtual bool versionCheck(const QString & version) const;
+ virtual bool versionCheck(const TQString & version) const;
///Show PeerView in main window
void showPeerView(bool show);
diff --git a/plugins/infowidget/infowidgetprefpage.cpp b/plugins/infowidget/infowidgetprefpage.cpp
index 16e1384..2fa7f4e 100644
--- a/plugins/infowidget/infowidgetprefpage.cpp
+++ b/plugins/infowidget/infowidgetprefpage.cpp
@@ -18,7 +18,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include <klocale.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kglobal.h>
#include <kiconloader.h>
#include "infowidgetplugin.h"
@@ -53,9 +53,9 @@ namespace kt
return true;
}
- void InfoWidgetPrefPage::createWidget(QWidget* parent)
+ void InfoWidgetPrefPage::createWidget(TQWidget* tqparent)
{
- pref = new IWPref(parent);
+ pref = new IWPref(tqparent);
updateData();
}
diff --git a/plugins/infowidget/infowidgetprefpage.h b/plugins/infowidget/infowidgetprefpage.h
index a1fa40f..89ab56b 100644
--- a/plugins/infowidget/infowidgetprefpage.h
+++ b/plugins/infowidget/infowidgetprefpage.h
@@ -41,7 +41,7 @@ namespace kt
virtual ~InfoWidgetPrefPage();
virtual bool apply();
- virtual void createWidget(QWidget* parent);
+ virtual void createWidget(TQWidget* tqparent);
virtual void deleteWidget();
virtual void updateData();
diff --git a/plugins/infowidget/iwfiletreediritem.cpp b/plugins/infowidget/iwfiletreediritem.cpp
index 1ddf899..c1eee32 100644
--- a/plugins/infowidget/iwfiletreediritem.cpp
+++ b/plugins/infowidget/iwfiletreediritem.cpp
@@ -33,13 +33,13 @@ using namespace kt;
namespace kt
{
- IWFileTreeDirItem::IWFileTreeDirItem(KListView* klv,const QString & name)
+ IWFileTreeDirItem::IWFileTreeDirItem(KListView* klv,const TQString & name)
: kt::FileTreeDirItem(klv,name)
{
}
- IWFileTreeDirItem::IWFileTreeDirItem(IWFileTreeDirItem* parent,const QString & name)
- : kt::FileTreeDirItem(parent,name)
+ IWFileTreeDirItem::IWFileTreeDirItem(IWFileTreeDirItem* tqparent,const TQString & name)
+ : kt::FileTreeDirItem(tqparent,name)
{
}
@@ -51,8 +51,8 @@ namespace kt
void IWFileTreeDirItem::updatePercentageInformation()
{
// first set all the child items
- bt::PtrMap<QString,FileTreeItem>::iterator i = children.begin();
- while (i != children.end())
+ bt::PtrMap<TQString,FileTreeItem>::iterator i = tqchildren.begin();
+ while (i != tqchildren.end())
{
IWFileTreeItem* item = (IWFileTreeItem*)i->second;
item->updatePercentageInformation();
@@ -60,7 +60,7 @@ namespace kt
}
// then recursivly move on to subdirs
- bt::PtrMap<QString,FileTreeDirItem>::iterator j = subdirs.begin();
+ bt::PtrMap<TQString,FileTreeDirItem>::iterator j = subdirs.begin();
while (j != subdirs.end())
{
((IWFileTreeDirItem*)j->second)->updatePercentageInformation();
@@ -71,8 +71,8 @@ namespace kt
void IWFileTreeDirItem::updatePreviewInformation(kt::TorrentInterface* tc)
{
// first set all the child items
- bt::PtrMap<QString,FileTreeItem>::iterator i = children.begin();
- while (i != children.end())
+ bt::PtrMap<TQString,FileTreeItem>::iterator i = tqchildren.begin();
+ while (i != tqchildren.end())
{
IWFileTreeItem* item = (IWFileTreeItem*)i->second;
item->updatePreviewInformation(tc);
@@ -80,7 +80,7 @@ namespace kt
}
// then recursivly move on to subdirs
- bt::PtrMap<QString,FileTreeDirItem>::iterator j = subdirs.begin();
+ bt::PtrMap<TQString,FileTreeDirItem>::iterator j = subdirs.begin();
while (j != subdirs.end())
{
((IWFileTreeDirItem*)j->second)->updatePreviewInformation(tc);
@@ -91,11 +91,11 @@ namespace kt
Priority IWFileTreeDirItem::updatePriorityInformation(kt::TorrentInterface* tc)
{
// first set all the child items
- bt::PtrMap<QString,FileTreeItem>::iterator i = children.begin();
+ bt::PtrMap<TQString,FileTreeItem>::iterator i = tqchildren.begin();
bool setpriority = false;
bool oneexcluded = false;
Priority priority = PREVIEW_PRIORITY;
- if(i != children.end())
+ if(i != tqchildren.end())
{
IWFileTreeItem* item = (IWFileTreeItem*)i->second;
item->updatePriorityInformation(tc);
@@ -105,7 +105,7 @@ namespace kt
oneexcluded = true;
setpriority = true;
}
- while (i != children.end())
+ while (i != tqchildren.end())
{
IWFileTreeItem* item = (IWFileTreeItem*)i->second;
item->updatePriorityInformation(tc);
@@ -117,8 +117,8 @@ namespace kt
}
// then recursivly move on to subdirs
- bt::PtrMap<QString,FileTreeDirItem>::iterator j = subdirs.begin();
- if(j != subdirs.end() && children.begin() == children.end())
+ bt::PtrMap<TQString,FileTreeDirItem>::iterator j = subdirs.begin();
+ if(j != subdirs.end() && tqchildren.begin() == tqchildren.end())
{
Priority priority =
((IWFileTreeDirItem*)j->second)->updatePriorityInformation(tc);
@@ -176,12 +176,12 @@ namespace kt
return PREVIEW_PRIORITY;
}
- FileTreeItem* IWFileTreeDirItem::newFileTreeItem(const QString & name,TorrentFileInterface & file)
+ FileTreeItem* IWFileTreeDirItem::newFileTreeItem(const TQString & name,TorrentFileInterface & file)
{
return new IWFileTreeItem(this,name,file);
}
- FileTreeDirItem* IWFileTreeDirItem::newFileTreeDirItem(const QString & subdir)
+ FileTreeDirItem* IWFileTreeDirItem::newFileTreeDirItem(const TQString & subdir)
{
return new IWFileTreeDirItem(this,subdir);
}
@@ -189,8 +189,8 @@ namespace kt
void IWFileTreeDirItem::updateDNDInformation()
{
// first set all the child items
- bt::PtrMap<QString,FileTreeItem>::iterator i = children.begin();
- while (i != children.end())
+ bt::PtrMap<TQString,FileTreeItem>::iterator i = tqchildren.begin();
+ while (i != tqchildren.end())
{
IWFileTreeItem* item = (IWFileTreeItem*)i->second;
item->updateDNDInformation();
@@ -198,7 +198,7 @@ namespace kt
}
// then recursivly move on to subdirs
- bt::PtrMap<QString,FileTreeDirItem>::iterator j = subdirs.begin();
+ bt::PtrMap<TQString,FileTreeDirItem>::iterator j = subdirs.begin();
while (j != subdirs.end())
{
((IWFileTreeDirItem*)j->second)->updateDNDInformation();
@@ -209,8 +209,8 @@ namespace kt
bt::ConfirmationResult IWFileTreeDirItem::confirmationDialog()
{
return bt::KEEP_DATA;
-/* QString msg = i18n("Do you want to keep the existing data for seeding ?");
- int ret = KMessageBox::warningYesNoCancel(0,msg,QString::null,
+/* TQString msg = i18n("Do you want to keep the existing data for seeding ?");
+ int ret = KMessageBox::warningYesNoCancel(0,msg,TQString(),
KGuiItem(i18n("Keep the data")),
KGuiItem(i18n("Delete the data")));
if (ret == KMessageBox::Yes)
diff --git a/plugins/infowidget/iwfiletreediritem.h b/plugins/infowidget/iwfiletreediritem.h
index 90aa7ea..3c26031 100644
--- a/plugins/infowidget/iwfiletreediritem.h
+++ b/plugins/infowidget/iwfiletreediritem.h
@@ -49,8 +49,8 @@ namespace kt
class IWFileTreeDirItem : public kt::FileTreeDirItem
{
public:
- IWFileTreeDirItem(KListView* klv,const QString & name);
- IWFileTreeDirItem(IWFileTreeDirItem* parent,const QString & name);
+ IWFileTreeDirItem(KListView* klv,const TQString & name);
+ IWFileTreeDirItem(IWFileTreeDirItem* tqparent,const TQString & name);
virtual ~IWFileTreeDirItem();
/**
@@ -71,8 +71,8 @@ namespace kt
*/
void updateDNDInformation();
- virtual kt::FileTreeItem* newFileTreeItem(const QString & name, kt::TorrentFileInterface & file);
- virtual kt::FileTreeDirItem* newFileTreeDirItem(const QString & subdir);
+ virtual kt::FileTreeItem* newFileTreeItem(const TQString & name, kt::TorrentFileInterface & file);
+ virtual kt::FileTreeDirItem* newFileTreeDirItem(const TQString & subdir);
virtual bt::ConfirmationResult confirmationDialog();
};
}
diff --git a/plugins/infowidget/iwfiletreeitem.cpp b/plugins/infowidget/iwfiletreeitem.cpp
index e6281df..fbfdb4b 100644
--- a/plugins/infowidget/iwfiletreeitem.cpp
+++ b/plugins/infowidget/iwfiletreeitem.cpp
@@ -33,19 +33,19 @@ using namespace kt;
namespace kt
{
- IWFileTreeItem::IWFileTreeItem(IWFileTreeDirItem* item,const QString & name,kt::TorrentFileInterface & file)
+ IWFileTreeItem::IWFileTreeItem(IWFileTreeDirItem* item,const TQString & name,kt::TorrentFileInterface & file)
: FileTreeItem(item,name,file)
{
perc_complete = 0.0;
- connect(&file,SIGNAL(downloadPercentageChanged( float )),this,SLOT(onPercentageUpdated( float )));
- connect(&file,SIGNAL(previewAvailable( bool )),this,SLOT(onPreviewAvailable( bool )));
+ connect(&file,TQT_SIGNAL(downloadPercentageChanged( float )),this,TQT_SLOT(onPercentageUpdated( float )));
+ connect(&file,TQT_SIGNAL(previewAvailable( bool )),this,TQT_SLOT(onPreviewAvailable( bool )));
}
IWFileTreeItem::~IWFileTreeItem()
{
}
- int IWFileTreeItem::compare(QListViewItem* i, int col, bool ascending) const
+ int IWFileTreeItem::compare(TQListViewItem* i, int col, bool ascending) const
{
if (col == 4)
{
@@ -92,7 +92,7 @@ namespace kt
else if (percent > 100.0)
percent = 100.0;
KLocale* loc = KGlobal::locale();
- setText(4,i18n("%1 %").arg(loc->formatNumber(percent,2)));
+ setText(4,i18n("%1 %").tqarg(loc->formatNumber(percent,2)));
perc_complete = percent;
}
@@ -147,8 +147,8 @@ namespace kt
{
return bt::KEEP_DATA;
/*
- QString msg = i18n("Do you want to keep the existing data for seeding ?");
- int ret = KMessageBox::warningYesNoCancel(0,msg,QString::null,
+ TQString msg = i18n("Do you want to keep the existing data for seeding ?");
+ int ret = KMessageBox::warningYesNoCancel(0,msg,TQString(),
KGuiItem(i18n("Keep the data")),
KGuiItem(i18n("Delete the data")));
if (ret == KMessageBox::Yes)
diff --git a/plugins/infowidget/iwfiletreeitem.h b/plugins/infowidget/iwfiletreeitem.h
index 7877ff1..4810f92 100644
--- a/plugins/infowidget/iwfiletreeitem.h
+++ b/plugins/infowidget/iwfiletreeitem.h
@@ -20,7 +20,7 @@
#ifndef IWFILETREEITEM_H
#define IWFILETREEITEM_H
-#include <qobject.h>
+#include <tqobject.h>
#include <interfaces/filetreeitem.h>
using namespace bt;
@@ -36,13 +36,14 @@ namespace kt
*
* File item in the InfoWidget's file view.
*/
- class IWFileTreeItem : public QObject, public kt::FileTreeItem
+ class IWFileTreeItem : public TQObject, public kt::FileTreeItem
{
Q_OBJECT
+ TQ_OBJECT
double perc_complete;
public:
- IWFileTreeItem(IWFileTreeDirItem* item,const QString & name,kt::TorrentFileInterface & file);
+ IWFileTreeItem(IWFileTreeDirItem* item,const TQString & name,kt::TorrentFileInterface & file);
virtual ~IWFileTreeItem();
void updatePreviewInformation(kt::TorrentInterface* tc);
@@ -50,7 +51,7 @@ namespace kt
void updatePriorityInformation(kt::TorrentInterface* tc);
void updateDNDInformation();
protected:
- virtual int compare(QListViewItem* i, int col, bool ascending) const;
+ virtual int compare(TQListViewItem* i, int col, bool ascending) const;
virtual bt::ConfirmationResult confirmationDialog();
protected slots:
diff --git a/plugins/infowidget/iwpref.ui b/plugins/infowidget/iwpref.ui
index 1007259..3973143 100644
--- a/plugins/infowidget/iwpref.ui
+++ b/plugins/infowidget/iwpref.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>IWPref</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>IWPref</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>m_show_pv</cstring>
</property>
@@ -27,7 +27,7 @@
<string></string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="0">
+ <widget class="TQCheckBox" row="1" column="0">
<property name="name">
<cstring>m_show_cdv</cstring>
</property>
@@ -45,14 +45,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QCheckBox" row="2" column="0">
+ <widget class="TQCheckBox" row="2" column="0">
<property name="name">
<cstring>m_show_tv</cstring>
</property>
@@ -65,5 +65,5 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/plugins/infowidget/localefloatvalidator.cpp b/plugins/infowidget/localefloatvalidator.cpp
index 7faafed..f0c20ae 100644
--- a/plugins/infowidget/localefloatvalidator.cpp
+++ b/plugins/infowidget/localefloatvalidator.cpp
@@ -23,16 +23,16 @@
#include <klocale.h>
#include "localefloatvalidator.h"
-kt::LocaleFloatValidator::LocaleFloatValidator( QObject * parent, const char * name )
-:QValidator(parent, name)
+kt::LocaleFloatValidator::LocaleFloatValidator( TQObject * tqparent, const char * name )
+:TQValidator(tqparent, name)
{
- QString decimalPoint = QRegExp::escape(KGlobal::locale()->decimalSymbol());
+ TQString decimalPoint = TQRegExp::escape(KGlobal::locale()->decimalSymbol());
regexp.setPattern("^-?\\d*(" + decimalPoint + "\\d*)?$");
}
-QValidator::State kt::LocaleFloatValidator::validate( QString & str, int & pos) const
+TQValidator::State kt::LocaleFloatValidator::validate( TQString & str, int & pos) const
{
- return regexp.exactMatch(str) ? QValidator::Acceptable : QValidator::Invalid;
+ return regexp.exactMatch(str) ? TQValidator::Acceptable : TQValidator::Invalid;
}
diff --git a/plugins/infowidget/localefloatvalidator.h b/plugins/infowidget/localefloatvalidator.h
index d4d12ee..3466445 100644
--- a/plugins/infowidget/localefloatvalidator.h
+++ b/plugins/infowidget/localefloatvalidator.h
@@ -22,23 +22,24 @@
#ifndef LOCALEFLOATVALIDATOR_H
#define LOCALEFLOATVALIDATOR_H
-#include <qvalidator.h>
-class QRegExp;
+#include <tqvalidator.h>
+class TQRegExp;
namespace kt{
/**
* @author Jonas Widarsson
*
* A float validator that respects KLocale::decimalSymbol()
*/
- class LocaleFloatValidator : public QValidator
+ class LocaleFloatValidator : public TQValidator
{
Q_OBJECT
+ TQ_OBJECT
public:
- LocaleFloatValidator( QObject * parent, const char *name = 0 );
+ LocaleFloatValidator( TQObject * tqparent, const char *name = 0 );
- virtual QValidator::State validate( QString & str, int & pos) const;
+ virtual TQValidator::State validate( TQString & str, int & pos) const;
private:
- QRegExp regexp;
+ TQRegExp regexp;
};
}
diff --git a/plugins/infowidget/peerview.cpp b/plugins/infowidget/peerview.cpp
index 0e05791..a3876c6 100644
--- a/plugins/infowidget/peerview.cpp
+++ b/plugins/infowidget/peerview.cpp
@@ -27,8 +27,8 @@
#include <kstandarddirs.h>
#include <kmessagebox.h>
#include <ksocketaddress.h>
-#include <qpoint.h>
-#include <qlistview.h>
+#include <tqpoint.h>
+#include <tqlistview.h>
#include <kpopupmenu.h>
#include <interfaces/peerinterface.h>
#include <interfaces/functions.h>
@@ -53,13 +53,13 @@ namespace kt
Uint32 PeerViewItem::pvi_count = 0;
// Global GeoIP pointer, gets destroyed when no PeerViewItem's exist
static GeoIP* geo_ip = 0;
- static QPixmap yes_pix;
- static QPixmap no_pix;
- static QPixmap lock_pix;
+ static TQPixmap yes_pix;
+ static TQPixmap no_pix;
+ static TQPixmap lock_pix;
static FlagDB flagDB(22, 18);
static bool yes_no_pix_loaded = false;
static bool geoip_db_exists = true;
- static QString geoip_data_file;
+ static TQString geoip_data_file;
PeerViewItem::PeerViewItem(PeerView* pv,kt::PeerInterface* peer) : KListViewItem(pv),peer(peer)
{
@@ -67,8 +67,8 @@ namespace kt
{
KIconLoader* iload = KGlobal::iconLoader();
/* Prefer builtin flag images to the ones provided by KDE */
- flagDB.addFlagSource("data", QString("ktorrent/geoip/%1.png"));
- flagDB.addFlagSource("locale", QString("l10n/%1/flag.png"));
+ flagDB.addFlagSource("data", TQString("ktorrent/geoip/%1.png"));
+ flagDB.addFlagSource("locale", TQString("l10n/%1/flag.png"));
yes_pix = iload->loadIcon("button_ok",KIcon::Small);
no_pix = iload->loadIcon("button_cancel",KIcon::Small);
lock_pix = iload->loadIcon("ktencrypted",KIcon::Small);
@@ -111,7 +111,7 @@ namespace kt
country_code = GeoIP_country_code[country_id];
country_name = GeoIP_country_name[country_id];
setText(1, country_name);
- m_country = QString(country_name);
+ m_country = TQString(country_name);
}
else
{
@@ -170,16 +170,16 @@ namespace kt
setText(5,s.choked ? i18n("Yes") : i18n("No"));
//setPixmap(6,!s.snubbed ? yes_pix : no_pix);
setText(6,s.snubbed ? i18n("Yes") : i18n("No"));
- setText(7,QString("%1 %").arg(loc->formatNumber(s.perc_of_file,2)));
+ setText(7,TQString("%1 %").tqarg(loc->formatNumber(s.perc_of_file,2)));
setPixmap(8,s.dht_support ? yes_pix : no_pix);
setText(9,loc->formatNumber(s.aca_score,2));
- setPixmap(10,s.has_upload_slot ? yes_pix : QPixmap());
- setText(11,QString("%1 / %2").arg(s.num_down_requests).arg(s.num_up_requests));
+ setPixmap(10,s.has_upload_slot ? yes_pix : TQPixmap());
+ setText(11,TQString("%1 / %2").tqarg(s.num_down_requests).tqarg(s.num_up_requests));
setText(12, BytesToString(s.bytes_downloaded));
setText(13, BytesToString(s.bytes_uploaded));
}
- int PeerViewItem::compare(QListViewItem * i,int col,bool) const
+ int PeerViewItem::compare(TQListViewItem * i,int col,bool) const
{
PeerViewItem* pvi = (PeerViewItem*) i;
PeerInterface* op = pvi->peer;
@@ -188,9 +188,9 @@ namespace kt
switch (col)
{
case 0: return CompareVal(ip,pvi->ip); // use numeric representation to sort
- //return QString::compare(s.ip_address,os.ip_address);
- case 1: return QString::compare(m_country, pvi->m_country);
- case 2: return QString::compare(s.client,os.client);
+ //return TQString::compare(s.ip_address,os.ip_address);
+ case 1: return TQString::compare(m_country, pvi->m_country);
+ case 2: return TQString::compare(s.client,os.client);
case 3: return CompareVal(s.download_rate,os.download_rate);
case 4: return CompareVal(s.upload_rate,os.upload_rate);
case 5: return CompareVal(s.choked,os.choked);
@@ -207,8 +207,8 @@ namespace kt
return 0;
}
- PeerView::PeerView(QWidget *parent, const char *name)
- : KListView(parent, name)
+ PeerView::PeerView(TQWidget *tqparent, const char *name)
+ : KListView(tqparent, name)
{
addColumn(i18n("IP"));
addColumn(i18n("Country"));
@@ -228,20 +228,20 @@ namespace kt
setAllColumnsShowFocus(true);
setShowSortIndicator(true);
- setColumnAlignment(3,Qt::AlignRight);
- setColumnAlignment(4,Qt::AlignRight);
- setColumnAlignment(5,Qt::AlignCenter);
- setColumnAlignment(6,Qt::AlignCenter);
- setColumnAlignment(7,Qt::AlignRight);
- setColumnAlignment(8,Qt::AlignCenter);
- setColumnAlignment(9,Qt::AlignRight);
- setColumnAlignment(10,Qt::AlignCenter);
- setColumnAlignment(11,Qt::AlignCenter);
- setColumnAlignment(12,Qt::AlignRight);
- setColumnAlignment(13,Qt::AlignRight);
+ setColumnAlignment(3,TQt::AlignRight);
+ setColumnAlignment(4,TQt::AlignRight);
+ setColumnAlignment(5,TQt::AlignCenter);
+ setColumnAlignment(6,TQt::AlignCenter);
+ setColumnAlignment(7,TQt::AlignRight);
+ setColumnAlignment(8,TQt::AlignCenter);
+ setColumnAlignment(9,TQt::AlignRight);
+ setColumnAlignment(10,TQt::AlignCenter);
+ setColumnAlignment(11,TQt::AlignCenter);
+ setColumnAlignment(12,TQt::AlignRight);
+ setColumnAlignment(13,TQt::AlignRight);
for (Uint32 i = 0;i < (Uint32)columns();i++)
- setColumnWidthMode(i,QListView::Manual);
+ setColumnWidthMode(i,TQListView::Manual);
setShowSortIndicator(true);
@@ -249,10 +249,10 @@ namespace kt
kick_id = menu->insertItem(KGlobal::iconLoader()->loadIcon("delete_user", KIcon::NoGroup), i18n("to kick", "Kick peer"));
ban_id = menu->insertItem(KGlobal::iconLoader()->loadIcon("filter",KIcon::NoGroup), i18n("to ban", "Ban peer"));
- connect(this,SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint& )),
- this,SLOT(showContextMenu(KListView*, QListViewItem*, const QPoint& )));
- connect(menu, SIGNAL ( activated ( int ) ), this, SLOT ( contextItem ( int ) ) );
- setFrameShape(QFrame::NoFrame);
+ connect(this,TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint& )),
+ this,TQT_SLOT(showContextMenu(KListView*, TQListViewItem*, const TQPoint& )));
+ connect(menu, TQT_SIGNAL ( activated ( int ) ), this, TQT_SLOT ( contextItem ( int ) ) );
+ setFrameShape(TQFrame::NoFrame);
}
@@ -267,7 +267,7 @@ namespace kt
void PeerView::removePeer(kt::PeerInterface* peer)
{
- QMap<kt::PeerInterface*,PeerViewItem*>::iterator it = items.find(peer);
+ TQMap<kt::PeerInterface*,PeerViewItem*>::iterator it = items.tqfind(peer);
if (it == items.end())
{
return;
@@ -290,7 +290,7 @@ namespace kt
IPBlocklist& filter = IPBlocklist::instance();
const PeerInterface::Stats & s = peer->getStats();
KNetwork::KIpAddress ip(s.ip_address);
- QString ips = ip.toString();
+ TQString ips = ip.toString();
/**
* @TODO Clean this up.
* this whole mess was because of KNetwork classes
@@ -314,7 +314,7 @@ namespace kt
void PeerView::update()
{
- QMap<kt::PeerInterface*,PeerViewItem*>::iterator i = items.begin();
+ TQMap<kt::PeerInterface*,PeerViewItem*>::iterator i = items.begin();
while (i != items.end())
{
PeerViewItem* it = i.data();
@@ -330,7 +330,7 @@ namespace kt
clear();
}
- void PeerView::showContextMenu( KListView*, QListViewItem* item, const QPoint& p)
+ void PeerView::showContextMenu( KListView*, TQListViewItem* item, const TQPoint& p)
{
if(!item)
return;
diff --git a/plugins/infowidget/peerview.h b/plugins/infowidget/peerview.h
index a4a8b94..e7e403b 100644
--- a/plugins/infowidget/peerview.h
+++ b/plugins/infowidget/peerview.h
@@ -20,11 +20,11 @@
#ifndef PEERVIEW_H
#define PEERVIEW_H
-#include <qmap.h>
+#include <tqmap.h>
#include <klistview.h>
-#include <qlistview.h>
+#include <tqlistview.h>
#include <kpopupmenu.h>
-#include <qpoint.h>
+#include <tqpoint.h>
#include <util/constants.h>
namespace kt
@@ -35,7 +35,7 @@ namespace kt
class PeerViewItem : public KListViewItem
{
kt::PeerInterface* peer;
- QString m_country;
+ TQString m_country;
bt::Uint32 ip;
// counter to keep track of how many PeerViewItem objects are in existence
static bt::Uint32 pvi_count;
@@ -44,7 +44,7 @@ namespace kt
virtual ~PeerViewItem();
void update();
- int compare(QListViewItem * i,int col,bool) const;
+ int compare(TQListViewItem * i,int col,bool) const;
kt::PeerInterface* getPeer() { return peer; }
};
@@ -55,10 +55,11 @@ namespace kt
class PeerView : public KListView
{
Q_OBJECT
+ TQ_OBJECT
- QMap<kt::PeerInterface*,PeerViewItem*> items;
+ TQMap<kt::PeerInterface*,PeerViewItem*> items;
public:
- PeerView(QWidget *parent = 0, const char *name = 0);
+ PeerView(TQWidget *tqparent = 0, const char *name = 0);
virtual ~PeerView();
public slots:
@@ -68,7 +69,7 @@ namespace kt
void kickPeer(kt::PeerInterface* peer);
void update();
void removeAll();
- void showContextMenu(KListView* ,QListViewItem* item,const QPoint & p);
+ void showContextMenu(KListView* ,TQListViewItem* item,const TQPoint & p);
void contextItem(int id);
private:
KPopupMenu* menu;
diff --git a/plugins/infowidget/statustab.cpp b/plugins/infowidget/statustab.cpp
index b0974ed..0fc6f16 100644
--- a/plugins/infowidget/statustab.cpp
+++ b/plugins/infowidget/statustab.cpp
@@ -19,8 +19,8 @@
***************************************************************************/
#include <math.h>
#include <float.h>
-#include <qdatetime.h>
-#include <qcheckbox.h>
+#include <tqdatetime.h>
+#include <tqcheckbox.h>
#include <kglobal.h>
#include <klocale.h>
#include <interfaces/functions.h>
@@ -34,10 +34,10 @@
namespace kt
{
- StatusTab::StatusTab(QWidget* parent, const char* name, WFlags fl)
- : StatusTabBase(parent,name,fl),curr_tc(0)
+ StatusTab::StatusTab(TQWidget* tqparent, const char* name, WFlags fl)
+ : StatusTabBase(tqparent,name,fl),curr_tc(0)
{
- QColorGroup cg = colorGroup();
+ TQColorGroup cg = tqcolorGroup();
// do not use hardcoded colors
m_info_caption->setPaletteBackgroundColor(cg.mid());
m_chunks_caption->setPaletteBackgroundColor(cg.mid());
@@ -46,15 +46,15 @@ namespace kt
maxRatio->setMinValue(0.0f);
maxRatio->setMaxValue(100.0f);
maxRatio->setStep(0.1f);
- connect(maxRatio, SIGNAL(valueHasChanged()), this, SLOT(maxRatioReturnPressed()));
- connect(useLimit, SIGNAL( toggled(bool) ), this, SLOT( useLimitToggled(bool) ) );
+ connect(maxRatio, TQT_SIGNAL(valueHasChanged()), this, TQT_SLOT(maxRatioReturnPressed()));
+ connect(useLimit, TQT_SIGNAL( toggled(bool) ), this, TQT_SLOT( useLimitToggled(bool) ) );
maxTime->setMinValue(0.0f);
maxTime->setMaxValue(10000000.0f);
maxTime->setStep(0.05f);
maxTime->setSpecialValueText(i18n("No limit"));
- connect(useTimeLimit,SIGNAL(toggled(bool)), this,SLOT(useTimeLimitToggled(bool)));
- connect(maxTime,SIGNAL(valueHasChanged()), this, SLOT(timeValueChanged()));
+ connect(useTimeLimit,TQT_SIGNAL(toggled(bool)), this,TQT_SLOT(useTimeLimitToggled(bool)));
+ connect(maxTime,TQT_SIGNAL(valueHasChanged()), this, TQT_SLOT(timeValueChanged()));
int h = (int)ceil(fontMetrics().height()*1.25);
m_chunk_bar->setFixedHeight(h);
@@ -130,7 +130,7 @@ namespace kt
if (s.running)
{
- QTime t;
+ TQTime t;
t = t.addSecs(curr_tc->getTimeToNextTrackerUpdate());
m_tracker_update_time->setText(t.toString("mm:ss"));
}
@@ -141,17 +141,17 @@ namespace kt
m_tracker_status->setText(s.trackerstatus);
- m_seeders->setText(QString("%1 (%2)")
- .arg(s.seeders_connected_to).arg(s.seeders_total));
+ m_seeders->setText(TQString("%1 (%2)")
+ .tqarg(s.seeders_connected_to).tqarg(s.seeders_total));
- m_leechers->setText(QString("%1 (%2)")
- .arg(s.leechers_connected_to).arg(s.leechers_total));
+ m_leechers->setText(TQString("%1 (%2)")
+ .tqarg(s.leechers_connected_to).tqarg(s.leechers_total));
float ratio = kt::ShareRatio(s);
if(!maxRatio->hasFocus() && useLimit->isChecked())
maxRatioUpdate();
- m_share_ratio->setText(QString("<font color=\"%1\">%2</font>").arg(ratio <= 0.8 ? "#ff0000" : "#1c9a1c").arg(KGlobal::locale()->formatNumber(ratio,2)));
+ m_share_ratio->setText(TQString("<font color=\"%1\">%2</font>").tqarg(ratio <= 0.8 ? "#ff0000" : "#1c9a1c").tqarg(KGlobal::locale()->formatNumber(ratio,2)));
Uint32 secs = curr_tc->getRunningTimeUL();
if (secs == 0)
diff --git a/plugins/infowidget/statustab.h b/plugins/infowidget/statustab.h
index 14e987d..b747596 100644
--- a/plugins/infowidget/statustab.h
+++ b/plugins/infowidget/statustab.h
@@ -30,9 +30,10 @@ namespace kt
class StatusTab : public StatusTabBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- StatusTab(QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ StatusTab(TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 );
virtual ~StatusTab();
diff --git a/plugins/infowidget/statustabbase.ui b/plugins/infowidget/statustabbase.ui
index 179f68a..3ef85e8 100644
--- a/plugins/infowidget/statustabbase.ui
+++ b/plugins/infowidget/statustabbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>StatusTabBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>StatusTabBase</cstring>
</property>
@@ -13,13 +13,13 @@
</rect>
</property>
<property name="caption">
- <string>Status</string>
+ <string>tqStatus</string>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_info_caption</cstring>
</property>
@@ -39,23 +39,23 @@
<string>Info</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout16</cstring>
+ <cstring>tqlayout16</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout15</cstring>
+ <cstring>tqlayout15</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -63,7 +63,7 @@
<string>Seeders:</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1_6</cstring>
</property>
@@ -71,11 +71,11 @@
<string>Leechers:</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="1">
+ <widget class="TQLabel" row="1" column="1">
<property name="name">
<cstring>m_seeders</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>100</width>
<height>0</height>
@@ -87,15 +87,15 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="0" column="1">
+ <widget class="TQLabel" row="0" column="1">
<property name="name">
<cstring>m_leechers</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>100</width>
<height>0</height>
@@ -107,21 +107,21 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
</grid>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout14</cstring>
+ <cstring>tqlayout14</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
@@ -129,11 +129,11 @@
<string>Average Down Speed:</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="1">
+ <widget class="TQLabel" row="1" column="1">
<property name="name">
<cstring>m_avg_down</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>100</width>
<height>0</height>
@@ -145,15 +145,15 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="0" column="1">
+ <widget class="TQLabel" row="0" column="1">
<property name="name">
<cstring>m_avg_up</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>100</width>
<height>0</height>
@@ -165,11 +165,11 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1_7</cstring>
</property>
@@ -179,15 +179,15 @@
</widget>
</grid>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout12</cstring>
+ <cstring>tqlayout12</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel3_2</cstring>
</property>
@@ -195,19 +195,19 @@
<string>Next update in:</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1_5</cstring>
</property>
<property name="text">
- <string>Tracker Status:</string>
+ <string>Tracker tqStatus:</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="1">
+ <widget class="TQLabel" row="0" column="1">
<property name="name">
<cstring>m_tracker_status</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>100</width>
<height>0</height>
@@ -219,15 +219,15 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="1" column="1">
+ <widget class="TQLabel" row="1" column="1">
<property name="name">
<cstring>m_tracker_update_time</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>100</width>
<height>0</height>
@@ -239,7 +239,7 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
@@ -255,7 +255,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>207</width>
<height>20</height>
@@ -264,31 +264,31 @@
</spacer>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout17</cstring>
+ <cstring>tqlayout17</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout23</cstring>
+ <cstring>tqlayout23</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout25</cstring>
+ <cstring>tqlayout25</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_chunks_caption</cstring>
</property>
@@ -316,7 +316,7 @@
<string>Chunks</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -344,14 +344,14 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
@@ -379,7 +379,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>20</height>
@@ -398,7 +398,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>16</height>
@@ -429,15 +429,15 @@
<enum>Vertical</enum>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout16</cstring>
+ <cstring>tqlayout16</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>m_sharing_caption</cstring>
</property>
@@ -457,9 +457,9 @@
<string>Sharing</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout15</cstring>
+ <cstring>tqlayout15</cstring>
</property>
<grid>
<property name="name">
@@ -477,7 +477,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>20</width>
<height>0</height>
@@ -487,7 +487,7 @@
<string>Your upload will stop when share ratio gets to this value. Zero means no limit.</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel3_3</cstring>
</property>
@@ -495,9 +495,9 @@
<string>Share ratio:</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="2" column="1">
+ <widget class="TQLayoutWidget" row="2" column="1">
<property name="name">
- <cstring>layout11</cstring>
+ <cstring>tqlayout11</cstring>
</property>
<hbox>
<property name="name">
@@ -515,7 +515,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>20</width>
<height>0</height>
@@ -525,7 +525,7 @@
<string>Your upload will stop when you have uploaded for this many hours.</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_9</cstring>
</property>
@@ -535,7 +535,7 @@
</widget>
</hbox>
</widget>
- <widget class="QCheckBox" row="1" column="0">
+ <widget class="TQCheckBox" row="1" column="0">
<property name="name">
<cstring>useLimit</cstring>
</property>
@@ -549,7 +549,7 @@
<string>Limit works only in seed mode</string>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="0">
+ <widget class="TQCheckBox" row="2" column="0">
<property name="name">
<cstring>useTimeLimit</cstring>
</property>
@@ -557,11 +557,11 @@
<string>Time &amp;limit:</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="1">
+ <widget class="TQLabel" row="0" column="1">
<property name="name">
<cstring>m_share_ratio</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>50</width>
<height>0</height>
@@ -573,7 +573,7 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
@@ -589,7 +589,7 @@
<property name="sizeType">
<enum>MinimumExpanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -657,7 +657,7 @@
<data format="XBM.GZ" length="79">789c534e494dcbcc4b554829cdcdad8c2fcf4c29c95030e0524611cd48cd4ccf28010a1797249664262b2467241641a592324b8aa363156c15aab914146aadb90067111b1f</data>
</image>
</images>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>downloadedchunkbar.h</includehint>
<includehint>availabilitychunkbar.h</includehint>
diff --git a/plugins/infowidget/trackerview.cpp b/plugins/infowidget/trackerview.cpp
index 2339189..0c23548 100644
--- a/plugins/infowidget/trackerview.cpp
+++ b/plugins/infowidget/trackerview.cpp
@@ -21,13 +21,13 @@
#include <interfaces/torrentinterface.h>
#include <interfaces/trackerslist.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qlabel.h>
-#include <qlistview.h>
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqlabel.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
#include <klocale.h>
#include <kurl.h>
@@ -43,8 +43,8 @@
namespace kt
{
- TrackerView::TrackerView(QWidget *parent, const char *name)
- :TrackerViewBase(parent, name), tc(0)
+ TrackerView::TrackerView(TQWidget *tqparent, const char *name)
+ :TrackerViewBase(tqparent, name), tc(0)
{
KIconLoader* iload = KGlobal::iconLoader();
btnUpdate->setIconSet(iload->loadIconSet("apply", KIcon::Small));
@@ -52,8 +52,8 @@ namespace kt
btnRemove->setIconSet(iload->loadIconSet("remove", KIcon::Small));
btnRestore->setIconSet(iload->loadIconSet("undo", KIcon::Small));
- QPalette p = lblCurrent->palette();
- p.setColor(QPalette::Active,QColorGroup::Base,p.color(QPalette::Active,QColorGroup::Background));
+ TQPalette p = lblCurrent->palette();
+ p.setColor(TQPalette::Active,TQColorGroup::Base,p.color(TQPalette::Active,TQColorGroup::Background));
lblCurrent->setPalette(p);
}
@@ -79,13 +79,13 @@ namespace kt
return;
}
- new QListViewItem(listTrackers, txtTracker->text());
+ new TQListViewItem(listTrackers, txtTracker->text());
tc->getTrackersList()->addTracker(url,true);
}
void TrackerView::btnRemove_clicked()
{
- QListViewItem* current = listTrackers->currentItem();
+ TQListViewItem* current = listTrackers->currentItem();
if(!current)
return;
@@ -98,7 +98,7 @@ namespace kt
void TrackerView::btnChange_clicked()
{
- QListViewItem* current = listTrackers->currentItem();
+ TQListViewItem* current = listTrackers->currentItem();
if(!current)
return;
@@ -120,7 +120,7 @@ namespace kt
return;
for (KURL::List::const_iterator i = trackers.begin();i != trackers.end();i++)
- new QListViewItem(listTrackers, (*i).prettyURL());
+ new TQListViewItem(listTrackers, (*i).prettyURL());
}
void TrackerView::btnUpdate_clicked()
@@ -131,7 +131,7 @@ namespace kt
tc->updateTracker();
}
- void TrackerView::listTrackers_currentChanged(QListViewItem* item)
+ void TrackerView::listTrackers_currentChanged(TQListViewItem* item)
{
if(!item)
txtTracker->clear();
@@ -157,7 +157,7 @@ namespace kt
const TorrentStats & s = tc->getStats();
if (s.running)
{
- QTime t;
+ TQTime t;
t = t.addSecs(tc->getTimeToNextTrackerUpdate());
lblUpdate->setText(t.toString("mm:ss"));
}
@@ -167,17 +167,17 @@ namespace kt
// only enable change when we can actually change and the torrent is running
btnChange->setEnabled(s.running && listTrackers->childCount() > 1);
- lblStatus->setText("<b>" + s.trackerstatus + "</b>");
+ lbltqStatus->setText("<b>" + s.trackerstatus + "</b>");
if (tc->getTrackersList())
{
- QString t = tc->getTrackersList()->getTrackerURL().prettyURL();
+ TQString t = tc->getTrackersList()->getTrackerURL().prettyURL();
if (lblCurrent->text() != t )
lblCurrent->setText(t);
}
else
lblCurrent->clear();
- btnAdd->setEnabled(txtTracker->text() != QString::null && !tc->getStats().priv_torrent);
+ btnAdd->setEnabled(txtTracker->text() != TQString() && !tc->getStats().priv_torrent);
}
void TrackerView::onLoadingFinished(const KURL & ,bool,bool)
@@ -191,7 +191,7 @@ namespace kt
listTrackers->clear();
if(!tc)
{
- lblStatus->clear();
+ lbltqStatus->clear();
lblCurrent->clear();
lblUpdate->clear();
txtTracker->clear();
@@ -226,12 +226,12 @@ namespace kt
const KURL::List trackers = tc->getTrackersList()->getTrackerURLs();
if(trackers.empty())
{
- new QListViewItem(listTrackers, tc->getTrackersList()->getTrackerURL().prettyURL());
+ new TQListViewItem(listTrackers, tc->getTrackersList()->getTrackerURL().prettyURL());
}
else
{
for (KURL::List::const_iterator i = trackers.begin();i != trackers.end();i++)
- new QListViewItem(listTrackers, (*i).prettyURL());
+ new TQListViewItem(listTrackers, (*i).prettyURL());
}
btnUpdate->setEnabled(s.running && tc->announceAllowed());
diff --git a/plugins/infowidget/trackerview.h b/plugins/infowidget/trackerview.h
index fd23fb8..9499e4b 100644
--- a/plugins/infowidget/trackerview.h
+++ b/plugins/infowidget/trackerview.h
@@ -35,8 +35,9 @@ namespace kt
class TrackerView: public TrackerViewBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- TrackerView(QWidget *parent = 0, const char *name = 0);
+ TrackerView(TQWidget *tqparent = 0, const char *name = 0);
virtual ~TrackerView();
void update();
@@ -48,7 +49,7 @@ namespace kt
virtual void btnChange_clicked();
virtual void btnRemove_clicked();
virtual void btnAdd_clicked();
- virtual void listTrackers_currentChanged(QListViewItem*);
+ virtual void listTrackers_currentChanged(TQListViewItem*);
void onLoadingFinished(const KURL & ,bool,bool);
private:
diff --git a/plugins/infowidget/trackerviewbase.ui b/plugins/infowidget/trackerviewbase.ui
index 758ddc7..cbdbce5 100644
--- a/plugins/infowidget/trackerviewbase.ui
+++ b/plugins/infowidget/trackerviewbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>TrackerViewBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>TrackerViewBase</cstring>
</property>
@@ -24,7 +24,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLineEdit" row="1" column="0">
+ <widget class="TQLineEdit" row="1" column="0">
<property name="name">
<cstring>txtTracker</cstring>
</property>
@@ -48,9 +48,9 @@
<string>Add Trac&amp;ker</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="2" column="1">
+ <widget class="TQLayoutWidget" row="2" column="1">
<property name="name">
- <cstring>layout8</cstring>
+ <cstring>tqlayout8</cstring>
</property>
<vbox>
<property name="name">
@@ -67,7 +67,7 @@
<string></string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>btnChange</cstring>
</property>
@@ -85,7 +85,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>68</height>
@@ -127,15 +127,15 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout6</cstring>
+ <cstring>tqlayout6</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -151,7 +151,7 @@
<string>URL:</string>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>lblCurrent</cstring>
</property>
@@ -180,14 +180,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -200,12 +200,12 @@
</sizepolicy>
</property>
<property name="text">
- <string>Status:</string>
+ <string>tqStatus:</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
- <cstring>lblStatus</cstring>
+ <cstring>lbltqStatus</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
@@ -229,14 +229,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel5</cstring>
</property>
@@ -252,7 +252,7 @@
<string>Next update in:</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>lblUpdate</cstring>
</property>
@@ -298,15 +298,15 @@
<slot>btnRestore_clicked()</slot>
</connection>
</connections>
-<slots>
+<Q_SLOTS>
<slot>btnChange_clicked()</slot>
- <slot>listTrackers_currentChanged(QListViewItem*)</slot>
+ <slot>listTrackers_currentChanged(TQListViewItem*)</slot>
<slot>btnUpdate_clicked()</slot>
<slot>btnAdd_clicked()</slot>
<slot>btnRemove_clicked()</slot>
<slot>btnRestore_clicked()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kpushbutton.h</includehint>
<includehint>kpushbutton.h</includehint>
diff --git a/plugins/ipfilter/antip2p.cpp b/plugins/ipfilter/antip2p.cpp
index 28f9b24..b3755ec 100644
--- a/plugins/ipfilter/antip2p.cpp
+++ b/plugins/ipfilter/antip2p.cpp
@@ -28,8 +28,8 @@
#include <kglobal.h>
#include <kstandarddirs.h>
-#include <qstring.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
using namespace bt;
@@ -46,7 +46,7 @@ namespace kt
return ip1 < b.ip1;// a and b intersect
}
- Uint32 AntiP2P::toUint32(const QString& ip)
+ Uint32 AntiP2P::toUint32(const TQString& ip)
{
bool test;
Uint32 ret = ip.section('.',0,0).toULongLong(&test);
@@ -60,26 +60,26 @@ namespace kt
return ret;
}
- QString fromUint32(Uint32 ip)
+ TQString fromUint32(Uint32 ip)
{
Uint32 tmp = ip;
- QString out;
+ TQString out;
tmp = ip;
tmp &= 0x000000FF;
- out.prepend(QString("%1").arg(tmp));
+ out.prepend(TQString("%1").tqarg(tmp));
ip >>= 8;
tmp = ip;
tmp &= 0x000000FF;
- out.prepend(QString("%1.").arg(tmp));
+ out.prepend(TQString("%1.").tqarg(tmp));
ip >>= 8;
tmp = ip;
tmp &= 0x000000FF;
- out.prepend(QString("%1.").arg(tmp));
+ out.prepend(TQString("%1.").tqarg(tmp));
ip >>= 8;
tmp = ip;
tmp &= 0x000000FF;
- out.prepend(QString("%1.").arg(tmp));
+ out.prepend(TQString("%1.").tqarg(tmp));
return out;
}
@@ -152,7 +152,7 @@ namespace kt
return file != 0;
}
- bool AntiP2P::isBlockedIP(const QString& ip )
+ bool AntiP2P::isBlockedIP(const TQString& ip )
{
Uint32 test = toUint32(ip);
return isBlockedIP(test);
diff --git a/plugins/ipfilter/antip2p.h b/plugins/ipfilter/antip2p.h
index 48350e3..ce54c53 100644
--- a/plugins/ipfilter/antip2p.h
+++ b/plugins/ipfilter/antip2p.h
@@ -24,8 +24,8 @@
#include <util/mmapfile.h>
#include <util/constants.h>
-#include <qvaluelist.h>
-#include <qstring.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
namespace kt
{
@@ -70,9 +70,9 @@ namespace kt
/**
* Checks if specified IP is listed in filter file.
* @return TRUE if IP should be blocked, FALSE otherwise
- * @param ip QString representation of IP to be checked
+ * @param ip TQString representation of IP to be checked
**/
- bool isBlockedIP(const QString& ip);
+ bool isBlockedIP(const TQString& ip);
/**
* Overloaded function. Uses Uint32 IP to be checked
@@ -80,13 +80,13 @@ namespace kt
bool isBlockedIP(bt::Uint32& ip);
/**
- * This function converts QString IP to Uint32 format.
+ * This function converts TQString IP to Uint32 format.
**/
- static bt::Uint32 toUint32(const QString& ip);
+ static bt::Uint32 toUint32(const TQString& ip);
private:
bt::MMapFile* file;
- QValueList<HeaderBlock> blocks;
+ TQValueList<HeaderBlock> blocks;
///Is AntiP2P header loaded
bool header_loaded;
diff --git a/plugins/ipfilter/convert_dlg.ui b/plugins/ipfilter/convert_dlg.ui
index cc246ed..b63b4f7 100644
--- a/plugins/ipfilter/convert_dlg.ui
+++ b/plugins/ipfilter/convert_dlg.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ConvertingDlg</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>ConvertingDlg</cstring>
</property>
@@ -33,7 +33,7 @@
<property name="resizeMode">
<enum>Fixed</enum>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -46,14 +46,14 @@
<property name="scaledContents">
<bool>false</bool>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignVCenter</set>
</property>
<property name="indent">
<number>-2</number>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>lbl_progress</cstring>
</property>
@@ -73,22 +73,22 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>390</width>
<height>0</height>
</size>
</property>
</widget>
- <widget class="QLayoutWidget" row="3" column="0">
+ <widget class="TQLayoutWidget" row="3" column="0">
<property name="name">
- <cstring>layout6</cstring>
+ <cstring>tqlayout6</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>label1</cstring>
</property>
@@ -96,7 +96,7 @@
<string></string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>btnClose</cstring>
</property>
@@ -112,7 +112,7 @@
<string>&amp;Close</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>btnCancel</cstring>
</property>
@@ -146,11 +146,11 @@
<slot>btnCancel_clicked()</slot>
</connection>
</connections>
-<slots>
+<Q_SLOTS>
<slot>btnClose_clicked()</slot>
<slot>btnCancel_clicked()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kprogress.h</includehint>
</includehints>
diff --git a/plugins/ipfilter/convertdialog.cpp b/plugins/ipfilter/convertdialog.cpp
index 6fed40f..c8fef33 100644
--- a/plugins/ipfilter/convertdialog.cpp
+++ b/plugins/ipfilter/convertdialog.cpp
@@ -34,15 +34,15 @@
#include <torrent/globals.h>
#include <interfaces/coreinterface.h>
-#include <qfile.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qvalidator.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qevent.h>
-#include <qurloperator.h>
+#include <tqfile.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqvalidator.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqevent.h>
+#include <tqurloperator.h>
#include "antip2p.h"
using namespace bt;
@@ -51,7 +51,7 @@ namespace kt
{
- Uint32 toUint32(QString& ip)
+ Uint32 toUint32(TQString& ip)
{
bool test;
Uint32 ret = ip.section('.',0,0).toULongLong(&test);
@@ -65,17 +65,17 @@ namespace kt
return ret;
}
- IPBlock RangeToBlock(const QString& range)
+ IPBlock RangeToBlock(const TQString& range)
{
IPBlock block;
- QStringList ls = QStringList::split('-', range);
+ TQStringList ls = TQStringList::split('-', range);
block.ip1 = toUint32(ls[0]);
block.ip2 = toUint32(ls[1]);
return block;
}
- ConvertDialog::ConvertDialog( IPFilterPlugin* p, QWidget *parent, const char *name )
- : ConvertingDlg( parent, name )
+ ConvertDialog::ConvertDialog( IPFilterPlugin* p, TQWidget *tqparent, const char *name )
+ : ConvertingDlg( tqparent, name )
{
m_plugin = p;
btnClose->setText(i18n("Convert"));
@@ -87,9 +87,9 @@ namespace kt
void ConvertDialog::convert()
{
- QFile source( KGlobal::dirs() ->saveLocation( "data", "ktorrent" ) + "level1.txt" );
- QFile target( KGlobal::dirs() ->saveLocation( "data", "ktorrent" ) + "level1.dat" );
- QFile temp( KGlobal::dirs() ->saveLocation( "data", "ktorrent" ) + "level1.dat.tmp" );
+ TQFile source( KGlobal::dirs() ->saveLocation( "data", "ktorrent" ) + "level1.txt" );
+ TQFile target( KGlobal::dirs() ->saveLocation( "data", "ktorrent" ) + "level1.dat" );
+ TQFile temp( KGlobal::dirs() ->saveLocation( "data", "ktorrent" ) + "level1.dat.tmp" );
if(target.exists())
{
@@ -98,7 +98,7 @@ namespace kt
}
/* READ INPUT FILE */
- QValueList<IPBlock> list;
+ TQValueList<IPBlock> list;
lbl_progress->setText( i18n( "Loading txt file..." ) );
label1->setText( i18n("Please wait...") );
ulong source_size = source.size();
@@ -109,12 +109,12 @@ namespace kt
if ( source.open( IO_ReadOnly ) )
{
- QTextStream stream( &source );
+ TQTextStream stream( &source );
kProgress1->setEnabled(true);
int i = 0;
- QRegExp rx( "[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}-[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}" );
- QRegExpValidator v( rx, 0 );
+ TQRegExp rx( "[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}-[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}" );
+ TQRegExpValidator v( rx, 0 );
int poz = 0;
while ( !stream.atEnd() )
@@ -123,13 +123,13 @@ namespace kt
return;
KApplication::kApplication() ->processEvents();
- QString line = stream.readLine();
+ TQString line = stream.readLine();
i += line.length() * sizeof( char ); //rough estimation of string size
kProgress1->setProgress( i * 100 / source_size );
++i;
- QString ip_part = line.section( ':' , -1 );
- if ( v.validate( ip_part, poz ) != QValidator::Acceptable )
+ TQString ip_part = line.section( ':' , -1 );
+ if ( v.validate( ip_part, poz ) != TQValidator::Acceptable )
continue;
else
++counter;
@@ -172,7 +172,7 @@ namespace kt
Out(SYS_IPF|LOG_NOTICE) << "Loading finished. Starting conversion..." << endl;
- QValueList<IPBlock>::iterator iter;
+ TQValueList<IPBlock>::iterator iter;
int i = 0;
for (iter = list.begin(); iter != list.end(); ++iter, ++i)
{
@@ -226,7 +226,7 @@ namespace kt
this->close();
}
- void ConvertDialog::closeEvent(QCloseEvent* e)
+ void ConvertDialog::closeEvent(TQCloseEvent* e)
{
if(!converting)
e->accept();
@@ -238,11 +238,11 @@ namespace kt
{
if(converting)
{
- QFile target( KGlobal::dirs() ->saveLocation( "data", "ktorrent" ) + "level1.dat" );
+ TQFile target( KGlobal::dirs() ->saveLocation( "data", "ktorrent" ) + "level1.dat" );
if(target.exists())
target.remove();
- QFile temp( KGlobal::dirs() ->saveLocation( "data", "ktorrent" ) + "level1.dat.tmp");
+ TQFile temp( KGlobal::dirs() ->saveLocation( "data", "ktorrent" ) + "level1.dat.tmp");
if(temp.exists())
{
KIO::NetAccess::file_copy(KGlobal::dirs() ->saveLocation( "data", "ktorrent" ) + "level1.dat.tmp", KGlobal::dirs() ->saveLocation( "data", "ktorrent" ) + "level1.dat", -1, true);
diff --git a/plugins/ipfilter/convertdialog.h b/plugins/ipfilter/convertdialog.h
index be451f3..53eab64 100644
--- a/plugins/ipfilter/convertdialog.h
+++ b/plugins/ipfilter/convertdialog.h
@@ -23,16 +23,17 @@
#include "convert_dlg.h"
#include "ipfilterplugin.h"
-#include <qevent.h>
+#include <tqevent.h>
namespace kt
{
class ConvertDialog: public ConvertingDlg
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConvertDialog( IPFilterPlugin* p, QWidget *parent = 0, const char *name = 0 );
+ ConvertDialog( IPFilterPlugin* p, TQWidget *tqparent = 0, const char *name = 0 );
public slots:
virtual void btnClose_clicked();
@@ -45,7 +46,7 @@ namespace kt
bool canceled;
private slots:
- void closeEvent(QCloseEvent* e);
+ void closeEvent(TQCloseEvent* e);
virtual void btnCancel_clicked();
};
}
diff --git a/plugins/ipfilter/ipblockingpref.ui b/plugins/ipfilter/ipblockingpref.ui
index 43870f0..afb13c0 100644
--- a/plugins/ipfilter/ipblockingpref.ui
+++ b/plugins/ipfilter/ipblockingpref.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>IPBlockingPref</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>IPBlockingPref</cstring>
</property>
@@ -29,14 +29,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QGroupBox" row="0" column="0">
+ <widget class="TQGroupBox" row="0" column="0">
<property name="name">
<cstring>groupBox1</cstring>
</property>
@@ -50,7 +50,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>checkUseLevel1</cstring>
</property>
@@ -61,15 +61,15 @@
<string></string>
</property>
</widget>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
@@ -90,9 +90,9 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="2" column="0">
+ <widget class="TQLayoutWidget" row="2" column="0">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<hbox>
<property name="name">
@@ -108,14 +108,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>361</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>btnDownload</cstring>
</property>
@@ -125,7 +125,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -134,7 +134,7 @@
NOTE: ZIP file from bluetack.co.uk is supported.</string>
</property>
</widget>
- <widget class="QLabel" row="5" column="0">
+ <widget class="TQLabel" row="5" column="0">
<property name="name">
<cstring>lbl_status1</cstring>
</property>
@@ -152,7 +152,7 @@ NOTE: ZIP file from bluetack.co.uk is supported.</string>
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -191,12 +191,12 @@ NOTE: ZIP file from bluetack.co.uk is supported.</string>
<slot>setEnabled(bool)</slot>
</connection>
</connections>
-<slots>
+<Q_SLOTS>
<slot>btnDownload_clicked()</slot>
<slot>checkUseLevel1_toggled(bool)</slot>
<slot>checkUseKTfilter_toggled(bool)</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>kpushbutton.h</includehint>
diff --git a/plugins/ipfilter/ipblockingprefpage.cpp b/plugins/ipfilter/ipblockingprefpage.cpp
index 6d06d1b..41d427d 100644
--- a/plugins/ipfilter/ipblockingprefpage.cpp
+++ b/plugins/ipfilter/ipblockingprefpage.cpp
@@ -40,14 +40,14 @@
#include <torrent/globals.h>
#include <interfaces/coreinterface.h>
-#include <qthread.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qregexp.h>
-#include <qvalidator.h>
-#include <qlayout.h>
-#include <qdialog.h>
-#include <qobject.h>
+#include <tqthread.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqregexp.h>
+#include <tqvalidator.h>
+#include <tqlayout.h>
+#include <tqdialog.h>
+#include <tqobject.h>
using namespace bt;
@@ -55,11 +55,11 @@ using namespace bt;
namespace kt
{
- IPBlockingPrefPageWidget::IPBlockingPrefPageWidget(QWidget* parent) : IPBlockingPref(parent)
+ IPBlockingPrefPageWidget::IPBlockingPrefPageWidget(TQWidget* tqparent) : IPBlockingPref(tqparent)
{
m_url->setURL(IPBlockingPluginSettings::filterURL());
if (m_url->url() == "")
- m_url->setURL(QString("http://www.bluetack.co.uk/config/splist.zip"));
+ m_url->setURL(TQString("http://www.bluetack.co.uk/config/splist.zip"));
bool use_level1 = IPBlockingPluginSettings::useLevel1();
@@ -67,13 +67,13 @@ namespace kt
if(use_level1)
{
- lbl_status1->setText(i18n("Status: Loaded and running."));
+ lbl_status1->setText(i18n("tqStatus: Loaded and running."));
m_url->setEnabled(true);
btnDownload->setEnabled(true);
}
else
{
- lbl_status1->setText(i18n("Status: Not loaded."));
+ lbl_status1->setText(i18n("tqStatus: Not loaded."));
m_url->setEnabled(false);
btnDownload->setEnabled(false);
}
@@ -89,21 +89,21 @@ namespace kt
if(checkUseLevel1->isChecked())
{
- QFile target(KGlobal::dirs()->saveLocation("data","ktorrent") + "level1.dat");
+ TQFile target(KGlobal::dirs()->saveLocation("data","ktorrent") + "level1.dat");
if(target.exists())
- lbl_status1->setText(i18n("Status: Loaded and running."));
+ lbl_status1->setText(i18n("tqStatus: Loaded and running."));
else
- lbl_status1->setText(i18n("Status: <font color=\"#ff0000\">Filter file not found.</font> Download and convert filter file."));
+ lbl_status1->setText(i18n("tqStatus: <font color=\"#ff0000\">Filter file not found.</font> Download and convert filter file."));
}
else
- lbl_status1->setText(i18n("Status: Not loaded."));
+ lbl_status1->setText(i18n("tqStatus: Not loaded."));
}
void IPBlockingPrefPageWidget::btnDownload_clicked()
{
- QString target(KGlobal::dirs()->saveLocation("data","ktorrent") + "level1");
- QFile target_file(target);
- QFile txtfile(target + ".txt");
+ TQString target(KGlobal::dirs()->saveLocation("data","ktorrent") + "level1");
+ TQFile target_file(target);
+ TQFile txtfile(target + ".txt");
KURL url(m_url->url());
KURL dest(target);
KURL temp(KGlobal::dirs()->saveLocation("data","ktorrent") + "level1.tmp");
@@ -132,8 +132,8 @@ namespace kt
}
else
{
- QString err = KIO::NetAccess::lastErrorString();
- if(err != QString::null)
+ TQString err = KIO::NetAccess::lastErrorString();
+ if(err != TQString())
KMessageBox::error(0,KIO::NetAccess::lastErrorString(),i18n("Error"));
else
KIO::NetAccess::move(temp, target);
@@ -188,7 +188,7 @@ namespace kt
void IPBlockingPrefPageWidget::convert()
{
- QFile target(KGlobal::dirs()->saveLocation("data","ktorrent") + "level1.dat");
+ TQFile target(KGlobal::dirs()->saveLocation("data","ktorrent") + "level1.dat");
if(target.exists())
{
if((KMessageBox::questionYesNo(this,i18n("Filter file (level1.dat) already exists, do you want to convert it again?"),i18n("File Exists")) == 4))
@@ -240,9 +240,9 @@ namespace kt
return true;
}
- void IPBlockingPrefPage::createWidget(QWidget* parent)
+ void IPBlockingPrefPage::createWidget(TQWidget* tqparent)
{
- widget = new IPBlockingPrefPageWidget(parent);
+ widget = new IPBlockingPrefPageWidget(tqparent);
widget->setPlugin(m_plugin);
widget->setPrefPage(this);
}
diff --git a/plugins/ipfilter/ipblockingprefpage.h b/plugins/ipfilter/ipblockingprefpage.h
index 3779965..7626bea 100644
--- a/plugins/ipfilter/ipblockingprefpage.h
+++ b/plugins/ipfilter/ipblockingprefpage.h
@@ -25,8 +25,8 @@
#include "ipblockingpref.h"
#include "ipfilterplugin.h"
#include <interfaces/coreinterface.h>
-#include <qthread.h>
-#include <qobject.h>
+#include <tqthread.h>
+#include <tqobject.h>
class KProgress;
@@ -41,7 +41,7 @@ namespace kt
class IPBlockingPrefPageWidget : public IPBlockingPref
{
public:
- IPBlockingPrefPageWidget(QWidget *parent = 0);
+ IPBlockingPrefPageWidget(TQWidget *tqparent = 0);
void apply();
void convert();
void setPlugin(IPFilterPlugin* p);
@@ -70,7 +70,7 @@ namespace kt
virtual ~IPBlockingPrefPage();
virtual bool apply();
- virtual void createWidget(QWidget* parent);
+ virtual void createWidget(TQWidget* tqparent);
virtual void updateData();
virtual void deleteWidget();
diff --git a/plugins/ipfilter/ipfilterplugin.cpp b/plugins/ipfilter/ipfilterplugin.cpp
index 2f53197..8381226 100644
--- a/plugins/ipfilter/ipfilterplugin.cpp
+++ b/plugins/ipfilter/ipfilterplugin.cpp
@@ -25,7 +25,7 @@
#include <util/constants.h>
#include <torrent/ipblocklist.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "ipfilterplugin.h"
#include "ipfilterpluginsettings.h"
@@ -37,13 +37,13 @@ K_EXPORT_COMPONENT_FACTORY(ktipfilterplugin,KGenericFactory<kt::IPFilterPlugin>(
namespace kt
{
- const QString NAME = "IP Filter";
- const QString AUTHOR = "Ivan Vasic";
- const QString EMAIL = "ivasic@gmail.com";
- const QString DESCRIPTION = i18n("Filters out unwanted peers based on their IP address");
+ const TQString NAME = "IP Filter";
+ const TQString AUTHOR = "Ivan Vasic";
+ const TQString EMAIL = "ivasic@gmail.com";
+ const TQString DESCRIPTION = i18n("Filters out unwanted peers based on their IP address");
- IPFilterPlugin::IPFilterPlugin(QObject* parent, const char* name, const QStringList& args)
- : Plugin(parent, name, args,NAME,i18n("IP Filter"),AUTHOR,EMAIL,DESCRIPTION,"filter")
+ IPFilterPlugin::IPFilterPlugin(TQObject* tqparent, const char* name, const TQStringList& args)
+ : Plugin(tqparent, name, args,NAME,i18n("IP Filter"),AUTHOR,EMAIL,DESCRIPTION,"filter")
{
// setXMLFile("ktpluginui.rc");
level1 = 0;
@@ -114,7 +114,7 @@ namespace kt
return true;
}
- bool IPFilterPlugin::isBlockedIP(const QString& ip)
+ bool IPFilterPlugin::isBlockedIP(const TQString& ip)
{
if (level1 == 0)
return false;
@@ -122,7 +122,7 @@ namespace kt
return level1->isBlockedIP(ip);
}
- bool IPFilterPlugin::versionCheck(const QString & version) const
+ bool IPFilterPlugin::versionCheck(const TQString & version) const
{
return version == KT_VERSION_MACRO;
}
diff --git a/plugins/ipfilter/ipfilterplugin.h b/plugins/ipfilter/ipfilterplugin.h
index 2e9c984..d016ee9 100644
--- a/plugins/ipfilter/ipfilterplugin.h
+++ b/plugins/ipfilter/ipfilterplugin.h
@@ -27,7 +27,7 @@
#include "ipblockingprefpage.h"
#include "antip2p.h"
-class QString;
+class TQString;
namespace kt
{
@@ -42,8 +42,9 @@ namespace kt
class IPFilterPlugin : public Plugin, public kt::IPBlockingInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
- IPFilterPlugin(QObject* parent, const char* name, const QStringList& args);
+ IPFilterPlugin(TQObject* tqparent, const char* name, const TQStringList& args);
virtual ~IPFilterPlugin();
virtual void load();
@@ -60,9 +61,9 @@ namespace kt
///Checks if IP is listed in AntiP2P filter list.
- bool isBlockedIP(const QString& ip);
+ bool isBlockedIP(const TQString& ip);
- bool versionCheck(const QString & version) const;
+ bool versionCheck(const TQString & version) const;
private:
IPBlockingPrefPage* pref;
AntiP2P* level1;
diff --git a/plugins/logviewer/logflags.cpp b/plugins/logviewer/logflags.cpp
index ef1ba69..c6ab95b 100644
--- a/plugins/logviewer/logflags.cpp
+++ b/plugins/logviewer/logflags.cpp
@@ -24,7 +24,7 @@
#include <util/log.h>
#include <torrent/globals.h>
-#include <qstring.h>
+#include <tqstring.h>
using namespace bt;
@@ -137,7 +137,7 @@ namespace kt
m_log = log;
}
- QString& LogFlags::getFormattedMessage(unsigned int arg, QString& line)
+ TQString& LogFlags::getFormattedMessage(unsigned int arg, TQString& line)
{
if( (arg & LOG_ALL) == LOG_ALL)
{
diff --git a/plugins/logviewer/logflags.h b/plugins/logviewer/logflags.h
index 9d7245a..618a020 100644
--- a/plugins/logviewer/logflags.h
+++ b/plugins/logviewer/logflags.h
@@ -20,7 +20,7 @@
#ifndef KTLOGFLAGS_H
#define KTLOGFLAGS_H
-class QString;
+class TQString;
namespace kt
{
@@ -72,7 +72,7 @@ namespace kt
void setLog(LogViewer* log);
///Makes line rich text according to arg level.
- QString& getFormattedMessage(unsigned int arg, QString& line);
+ TQString& getFormattedMessage(unsigned int arg, TQString& line);
private:
LogFlags();
diff --git a/plugins/logviewer/logprefpage.cpp b/plugins/logviewer/logprefpage.cpp
index cc89a68..b49c4ce 100644
--- a/plugins/logviewer/logprefpage.cpp
+++ b/plugins/logviewer/logprefpage.cpp
@@ -46,9 +46,9 @@ namespace kt
return true;
}
- void LogPrefPage::createWidget(QWidget* parent)
+ void LogPrefPage::createWidget(TQWidget* tqparent)
{
- m_widget = new LogPrefWidget(parent);
+ m_widget = new LogPrefWidget(tqparent);
}
void LogPrefPage::updateData()
diff --git a/plugins/logviewer/logprefpage.h b/plugins/logviewer/logprefpage.h
index 3aed61b..cd8e6a8 100644
--- a/plugins/logviewer/logprefpage.h
+++ b/plugins/logviewer/logprefpage.h
@@ -38,7 +38,7 @@ namespace kt
virtual ~LogPrefPage();
virtual bool apply();
- virtual void createWidget(QWidget* parent);
+ virtual void createWidget(TQWidget* tqparent);
virtual void updateData();
virtual void deleteWidget();
diff --git a/plugins/logviewer/logprefwidget.cpp b/plugins/logviewer/logprefwidget.cpp
index 6bf99bd..215bce6 100644
--- a/plugins/logviewer/logprefwidget.cpp
+++ b/plugins/logviewer/logprefwidget.cpp
@@ -24,15 +24,15 @@
#include <kglobal.h>
#include <klocale.h>
-#include <qwidget.h>
-#include <qstring.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
+#include <tqwidget.h>
+#include <tqstring.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
namespace kt
{
- LogPrefWidget::LogPrefWidget(QWidget *parent, const char *name)
- :LogPrefWidgetBase(parent, name)
+ LogPrefWidget::LogPrefWidget(TQWidget *tqparent, const char *name)
+ :LogPrefWidgetBase(tqparent, name)
{
m_sysgen->setCurrentItem(getLevel(LogViewerPluginSettings::sysGEN()));
m_syscon->setCurrentItem(getLevel(LogViewerPluginSettings::sysCON()));
diff --git a/plugins/logviewer/logprefwidget.h b/plugins/logviewer/logprefwidget.h
index 35a6c06..4bb1030 100644
--- a/plugins/logviewer/logprefwidget.h
+++ b/plugins/logviewer/logprefwidget.h
@@ -27,8 +27,9 @@ namespace kt
class LogPrefWidget: public LogPrefWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- LogPrefWidget(QWidget *parent = 0, const char *name = 0);
+ LogPrefWidget(TQWidget *tqparent = 0, const char *name = 0);
bool apply();
private:
diff --git a/plugins/logviewer/logprefwidgetbase.ui b/plugins/logviewer/logprefwidgetbase.ui
index 76e7124..32ccf61 100644
--- a/plugins/logviewer/logprefwidgetbase.ui
+++ b/plugins/logviewer/logprefwidgetbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>LogPrefWidgetBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>LogPrefWidgetBase</cstring>
</property>
@@ -29,14 +29,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>110</height>
</size>
</property>
</spacer>
- <widget class="QButtonGroup" row="0" column="1">
+ <widget class="TQButtonGroup" row="0" column="1">
<property name="name">
<cstring>buttonGroup2</cstring>
</property>
@@ -47,7 +47,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QComboBox" row="0" column="1">
+ <widget class="TQComboBox" row="0" column="1">
<item>
<property name="text">
<string>All</string>
@@ -77,7 +77,7 @@
<cstring>m_sysipf</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -88,7 +88,7 @@
<cstring>comboBox1_5</cstring>
</property>
</widget>
- <widget class="QComboBox" row="1" column="1">
+ <widget class="TQComboBox" row="1" column="1">
<item>
<property name="text">
<string>All</string>
@@ -118,7 +118,7 @@
<cstring>m_syssrc</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
@@ -129,7 +129,7 @@
<cstring>comboBox1_6</cstring>
</property>
</widget>
- <widget class="QComboBox" row="2" column="1">
+ <widget class="TQComboBox" row="2" column="1">
<item>
<property name="text">
<string>All</string>
@@ -159,7 +159,7 @@
<cstring>m_syspnp</cstring>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel2_3</cstring>
</property>
@@ -170,7 +170,7 @@
<cstring>comboBox1_7</cstring>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel2_4</cstring>
</property>
@@ -181,7 +181,7 @@
<cstring>comboBox1_8</cstring>
</property>
</widget>
- <widget class="QComboBox" row="3" column="1">
+ <widget class="TQComboBox" row="3" column="1">
<item>
<property name="text">
<string>All</string>
@@ -211,7 +211,7 @@
<cstring>m_syssnf</cstring>
</property>
</widget>
- <widget class="QComboBox" row="4" column="1">
+ <widget class="TQComboBox" row="4" column="1">
<item>
<property name="text">
<string>All</string>
@@ -241,7 +241,7 @@
<cstring>m_sysscd</cstring>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>textLabel2_5</cstring>
</property>
@@ -252,7 +252,7 @@
<cstring>comboBox1_9</cstring>
</property>
</widget>
- <widget class="QComboBox" row="5" column="1">
+ <widget class="TQComboBox" row="5" column="1">
<item>
<property name="text">
<string>All</string>
@@ -282,7 +282,7 @@
<cstring>m_syspfi</cstring>
</property>
</widget>
- <widget class="QLabel" row="5" column="0">
+ <widget class="TQLabel" row="5" column="0">
<property name="name">
<cstring>textLabel2_6</cstring>
</property>
@@ -293,7 +293,7 @@
<cstring>comboBox1_10</cstring>
</property>
</widget>
- <widget class="QLabel" row="6" column="0">
+ <widget class="TQLabel" row="6" column="0">
<property name="name">
<cstring>textLabel2_7</cstring>
</property>
@@ -304,7 +304,7 @@
<cstring>comboBox1_11</cstring>
</property>
</widget>
- <widget class="QComboBox" row="6" column="1">
+ <widget class="TQComboBox" row="6" column="1">
<item>
<property name="text">
<string>All</string>
@@ -334,7 +334,7 @@
<cstring>m_sysinw</cstring>
</property>
</widget>
- <widget class="QLabel" row="7" column="0">
+ <widget class="TQLabel" row="7" column="0">
<property name="name">
<cstring>textLabel2_7_2</cstring>
</property>
@@ -345,7 +345,7 @@
<cstring>comboBox1_11</cstring>
</property>
</widget>
- <widget class="QComboBox" row="7" column="1">
+ <widget class="TQComboBox" row="7" column="1">
<item>
<property name="text">
<string>All</string>
@@ -375,7 +375,7 @@
<cstring>m_sysrss</cstring>
</property>
</widget>
- <widget class="QComboBox" row="8" column="1">
+ <widget class="TQComboBox" row="8" column="1">
<item>
<property name="text">
<string>All</string>
@@ -405,7 +405,7 @@
<cstring>m_sysweb</cstring>
</property>
</widget>
- <widget class="QLabel" row="8" column="0">
+ <widget class="TQLabel" row="8" column="0">
<property name="name">
<cstring>textLabel2_7_2_2</cstring>
</property>
@@ -418,7 +418,7 @@
</widget>
</grid>
</widget>
- <widget class="QButtonGroup" row="0" column="0">
+ <widget class="TQButtonGroup" row="0" column="0">
<property name="name">
<cstring>buttonGroup3</cstring>
</property>
@@ -429,7 +429,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -437,7 +437,7 @@
<string>General:</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2_8</cstring>
</property>
@@ -445,7 +445,7 @@
<string>Connections:</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel2_9</cstring>
</property>
@@ -453,7 +453,7 @@
<string>DHT:</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel2_10</cstring>
</property>
@@ -461,7 +461,7 @@
<string>Tracker:</string>
</property>
</widget>
- <widget class="QComboBox" row="0" column="1">
+ <widget class="TQComboBox" row="0" column="1">
<item>
<property name="text">
<string>All</string>
@@ -491,7 +491,7 @@
<cstring>m_sysgen</cstring>
</property>
</widget>
- <widget class="QComboBox" row="1" column="1">
+ <widget class="TQComboBox" row="1" column="1">
<item>
<property name="text">
<string>All</string>
@@ -521,7 +521,7 @@
<cstring>m_syscon</cstring>
</property>
</widget>
- <widget class="QComboBox" row="2" column="1">
+ <widget class="TQComboBox" row="2" column="1">
<item>
<property name="text">
<string>All</string>
@@ -551,7 +551,7 @@
<cstring>m_sysdht</cstring>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -559,7 +559,7 @@
<string>Disk I/O:</string>
</property>
</widget>
- <widget class="QComboBox" row="3" column="1">
+ <widget class="TQComboBox" row="3" column="1">
<item>
<property name="text">
<string>All</string>
@@ -589,7 +589,7 @@
<cstring>m_systrk</cstring>
</property>
</widget>
- <widget class="QComboBox" row="4" column="1">
+ <widget class="TQComboBox" row="4" column="1">
<item>
<property name="text">
<string>All</string>
@@ -621,7 +621,7 @@
</widget>
</grid>
</widget>
- <widget class="QButtonGroup" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQButtonGroup" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>buttonGroup3_2</cstring>
</property>
@@ -632,7 +632,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>m_useRich</cstring>
</property>
@@ -644,5 +644,5 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/plugins/logviewer/logviewer.cpp b/plugins/logviewer/logviewer.cpp
index 5e6b16c..916af8e 100644
--- a/plugins/logviewer/logviewer.cpp
+++ b/plugins/logviewer/logviewer.cpp
@@ -19,7 +19,7 @@
***************************************************************************/
#include <kglobal.h>
#include <kconfig.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include "logviewer.h"
#include "logflags.h"
#include "logviewerpluginsettings.h"
@@ -28,33 +28,33 @@ namespace kt
{
const int LOG_EVENT_TYPE = 65432;
- class LogEvent : public QCustomEvent
+ class LogEvent : public TQCustomEvent
{
- QString str;
+ TQString str;
public:
- LogEvent(const QString & str) : QCustomEvent(LOG_EVENT_TYPE),str(str)
+ LogEvent(const TQString & str) : TQCustomEvent(LOG_EVENT_TYPE),str(str)
{}
virtual ~LogEvent()
{}
- const QString & msg() const {return str;}
+ const TQString & msg() const {return str;}
};
- LogViewer::LogViewer(QWidget *parent, const char *name)
- : KTextBrowser(parent, name), LogMonitorInterface()
+ LogViewer::LogViewer(TQWidget *tqparent, const char *name)
+ : KTextBrowser(tqparent, name), LogMonitorInterface()
{
/*
IMPORTANT: use LogText mode, so that setMaxLogLines will work, if not everything will be kept in memory.
*/
- setTextFormat(Qt::LogText);
+ setTextFormat(TQt::LogText);
setMaxLogLines(200);
- setMinimumSize(QSize(0,50));
- setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding);
+ setMinimumSize(TQSize(0,50));
+ tqsetSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding);
KGlobal::config()->setGroup("LogViewer");
if (KGlobal::config()->hasKey("LogViewerWidgetSize"))
{
- QSize s = KGlobal::config()->readSizeEntry("LogViewerWidgetSize",0);
+ TQSize s = KGlobal::config()->readSizeEntry("LogViewerWidgetSize",0);
resize(s);
}
@@ -70,10 +70,10 @@ namespace kt
}
- void LogViewer::message(const QString& line, unsigned int arg)
+ void LogViewer::message(const TQString& line, unsigned int arg)
{
/*
- IMPORTANT: because QTextBrowser is not thread safe, we must use the Qt event mechanism
+ IMPORTANT: because TQTextBrowser is not thread safe, we must use the TQt event mechanism
to add strings to it, this will ensure that strings will only be added in the main application
thread.
*/
@@ -81,19 +81,19 @@ namespace kt
{
if(m_useRichText)
{
- QString tmp = line;
+ TQString tmp = line;
LogEvent* le = new LogEvent(LogFlags::instance().getFormattedMessage(arg, tmp));
- QApplication::postEvent(this,le);
+ TQApplication::postEvent(this,le);
}
else
{
LogEvent* le = new LogEvent(line);
- QApplication::postEvent(this,le);
+ TQApplication::postEvent(this,le);
}
}
}
- void LogViewer::customEvent(QCustomEvent* ev)
+ void LogViewer::customEvent(TQCustomEvent* ev)
{
if (ev->type() == LOG_EVENT_TYPE)
{
diff --git a/plugins/logviewer/logviewer.h b/plugins/logviewer/logviewer.h
index 4198215..ced8bf0 100644
--- a/plugins/logviewer/logviewer.h
+++ b/plugins/logviewer/logviewer.h
@@ -32,12 +32,13 @@ namespace kt
class LogViewer : public KTextBrowser, public LogMonitorInterface
{
Q_OBJECT
+ TQ_OBJECT
public:
- LogViewer(QWidget *parent = 0, const char *name = 0);
+ LogViewer(TQWidget *tqparent = 0, const char *name = 0);
virtual ~LogViewer();
- virtual void message(const QString& line, unsigned int arg);
- virtual void customEvent(QCustomEvent* ev);
+ virtual void message(const TQString& line, unsigned int arg);
+ virtual void customEvent(TQCustomEvent* ev);
void setRichText(bool val);
diff --git a/plugins/logviewer/logviewerplugin.cpp b/plugins/logviewer/logviewerplugin.cpp
index aa35d2f..5df9fac 100644
--- a/plugins/logviewer/logviewerplugin.cpp
+++ b/plugins/logviewer/logviewerplugin.cpp
@@ -40,8 +40,8 @@ K_EXPORT_COMPONENT_FACTORY(ktlogviewerplugin,KGenericFactory<kt::LogViewerPlugin
namespace kt
{
- LogViewerPlugin::LogViewerPlugin(QObject* parent, const char* qt_name, const QStringList& args)
- : Plugin(parent, qt_name, args, NAME,i18n("Log Viewer"), AUTHOR, EMAIL,
+ LogViewerPlugin::LogViewerPlugin(TQObject* tqparent, const char* qt_name, const TQStringList& args)
+ : Plugin(tqparent, qt_name, args, NAME,i18n("Log Viewer"), AUTHOR, EMAIL,
i18n("Displays ktorrent logging output"),"log")
{
lv = 0;
@@ -75,7 +75,7 @@ namespace kt
LogFlags::finalize();
}
- bool LogViewerPlugin::versionCheck(const QString & version) const
+ bool LogViewerPlugin::versionCheck(const TQString & version) const
{
return version == KT_VERSION_MACRO;
}
diff --git a/plugins/logviewer/logviewerplugin.h b/plugins/logviewer/logviewerplugin.h
index 9cd5af8..238121f 100644
--- a/plugins/logviewer/logviewerplugin.h
+++ b/plugins/logviewer/logviewerplugin.h
@@ -35,13 +35,14 @@ namespace kt
class LogViewerPlugin : public Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- LogViewerPlugin(QObject* parent, const char* qt_name, const QStringList& args);
+ LogViewerPlugin(TQObject* tqparent, const char* qt_name, const TQStringList& args);
virtual ~LogViewerPlugin();
virtual void load();
virtual void unload();
- virtual bool versionCheck(const QString& version) const;
+ virtual bool versionCheck(const TQString& version) const;
private:
LogViewer* lv;
LogPrefPage* pref;
diff --git a/plugins/partfileimport/importdialog.cpp b/plugins/partfileimport/importdialog.cpp
index 22f9a4b..158b4f8 100644
--- a/plugins/partfileimport/importdialog.cpp
+++ b/plugins/partfileimport/importdialog.cpp
@@ -42,8 +42,8 @@ using namespace bt;
namespace kt
{
- ImportDialog::ImportDialog(CoreInterface* core,QWidget* parent, const char* name, bool modal, WFlags fl)
- : ImportDlgBase(parent,name, modal,fl),DataCheckerListener(false),core(core)
+ ImportDialog::ImportDialog(CoreInterface* core,TQWidget* tqparent, const char* name, bool modal, WFlags fl)
+ : ImportDlgBase(tqparent,name, modal,fl),DataCheckerListener(false),core(core)
{
KURLRequester* r = m_torrent_url;
r->setMode(KFile::File|KFile::LocalOnly);
@@ -52,8 +52,8 @@ namespace kt
r = m_data_url;
r->setMode(KFile::File|KFile::Directory|KFile::LocalOnly);
- connect(m_import_btn,SIGNAL(clicked()),this,SLOT(onImport()));
- connect(m_cancel_btn,SIGNAL(clicked()),this,SLOT(reject()));
+ connect(m_import_btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(onImport()));
+ connect(m_cancel_btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(reject()));
m_progress->setEnabled(false);
}
@@ -92,18 +92,18 @@ namespace kt
try
{
dc->setListener(this);
- dc->check(data_url.path(),tor,QString::null);
+ dc->check(data_url.path(),tor,TQString());
}
catch (Error & e)
{
delete dc;
- KMessageBox::error(this,i18n("Cannot verify data : %1").arg(e.toString()),i18n("Error"));
+ KMessageBox::error(this,i18n("Cannot verify data : %1").tqarg(e.toString()),i18n("Error"));
reject();
return;
}
// find a new torrent dir and make it if necessary
- QString tor_dir = core->findNewTorrentDir();
+ TQString tor_dir = core->findNewTorrentDir();
if (!tor_dir.endsWith(bt::DirSeparator()))
tor_dir += bt::DirSeparator();
@@ -123,11 +123,11 @@ namespace kt
// make the cache
if (tor.isMultiFile())
{
- QValueList<Uint32> dnd_files;
+ TQValueList<Uint32> dnd_files;
bool dnd = false;
// first make tor_dir/cache/
- QString cache_dir = tor_dir + "cache" + bt::DirSeparator();
- QString dnd_dir = tor_dir + "dnd" + bt::DirSeparator();
+ TQString cache_dir = tor_dir + "cache" + bt::DirSeparator();
+ TQString dnd_dir = tor_dir + "dnd" + bt::DirSeparator();
if (!bt::Exists(cache_dir))
MakeDir(cache_dir);
if (!bt::Exists(dnd_dir))
@@ -143,10 +143,10 @@ namespace kt
dnd = false;
}
- QString durl = data_url.path();
+ TQString durl = data_url.path();
if (durl.endsWith(bt::DirSeparator()))
durl = durl.left(durl.length() - 1);
- int ds = durl.findRev(bt::DirSeparator());
+ int ds = durl.tqfindRev(bt::DirSeparator());
if (durl.mid(ds+1) == tor.getNameSuggestion())
{
durl = durl.left(ds);
@@ -162,8 +162,8 @@ namespace kt
{
// single file, just symlink the data_url to tor_dir/cache
bt::SymLink(data_url.path(),tor_dir + "cache");
- QString durl = data_url.path();
- int ds = durl.findRev(bt::DirSeparator());
+ TQString durl = data_url.path();
+ int ds = durl.tqfindRev(bt::DirSeparator());
durl = durl.left(ds);
saveStats(tor_dir + "stats",durl,imported,false);
}
@@ -204,7 +204,7 @@ namespace kt
}
catch (Error & e)
{
- KMessageBox::error(this,i18n("Cannot load the torrent file : %1").arg(e.toString()),
+ KMessageBox::error(this,i18n("Cannot load the torrent file : %1").tqarg(e.toString()),
i18n("Error"));
reject();
return;
@@ -226,7 +226,7 @@ namespace kt
{
// download the torrent file
KIO::StoredTransferJob* j = KIO::storedGet(tor_url);
- connect(j,SIGNAL(result(KIO::Job* )),this,SLOT(onTorrentGetReult(KIO::Job*)));
+ connect(j,TQT_SIGNAL(result(KIO::Job* )),this,TQT_SLOT(onTorrentGetReult(KIO::Job*)));
}
else
{
@@ -240,7 +240,7 @@ namespace kt
}
catch (Error & e)
{
- KMessageBox::error(this,i18n("Cannot load the torrent file : %1").arg(e.toString()),
+ KMessageBox::error(this,i18n("Cannot load the torrent file : %1").tqarg(e.toString()),
i18n("Error"));
reject();
return;
@@ -249,12 +249,12 @@ namespace kt
}
}
- void ImportDialog::writeIndex(const QString & file,const BitSet & chunks)
+ void ImportDialog::writeIndex(const TQString & file,const BitSet & chunks)
{
// first try to open it
File fptr;
if (!fptr.open(file,"wb"))
- throw Error(i18n("Cannot open %1 : %2").arg(file).arg(fptr.errorString()));
+ throw Error(i18n("Cannot open %1 : %2").tqarg(file).tqarg(fptr.errorString()));
// write all chunks to the file
for (Uint32 i = 0;i < chunks.getNumBits();i++)
@@ -270,18 +270,18 @@ namespace kt
}
}
- void ImportDialog::linkTorFile(const QString & cache_dir,const QString & dnd_dir,
- const KURL & data_url,const QString & fpath,bool & dnd)
+ void ImportDialog::linkTorFile(const TQString & cache_dir,const TQString & dnd_dir,
+ const KURL & data_url,const TQString & fpath,bool & dnd)
{
- QStringList sl = QStringList::split(bt::DirSeparator(),fpath);
+ TQStringList sl = TQStringList::split(bt::DirSeparator(),fpath);
// create all necessary subdirs
- QString ctmp = cache_dir;
- QString otmp = data_url.path();
+ TQString ctmp = cache_dir;
+ TQString otmp = data_url.path();
if (!otmp.endsWith(bt::DirSeparator()))
otmp += bt::DirSeparator();
- QString dtmp = dnd_dir;
+ TQString dtmp = dnd_dir;
for (Uint32 i = 0;i < sl.count() - 1;i++)
{
otmp += sl[i];
@@ -300,7 +300,7 @@ namespace kt
dtmp += bt::DirSeparator();
}
- QString dfile = otmp + sl.last();
+ TQString dfile = otmp + sl.last();
if (!bt::Exists(dfile))
{
// when we start the torrent the user will be asked what to do
@@ -315,16 +315,16 @@ namespace kt
}
}
- void ImportDialog::saveStats(const QString & stats_file,const KURL & data_url,Uint64 imported,bool custom_output_name)
+ void ImportDialog::saveStats(const TQString & stats_file,const KURL & data_url,Uint64 imported,bool custom_output_name)
{
- QFile fptr(stats_file);
+ TQFile fptr(stats_file);
if (!fptr.open(IO_WriteOnly))
{
Out(SYS_PFI|LOG_IMPORTANT) << "Warning : can't create stats file" << endl;
return;
}
- QTextStream out(&fptr);
+ TQTextStream out(&fptr);
out << "OUTPUTDIR=" << data_url.path() << ::endl;
out << "UPLOADED=0" << ::endl;
out << "RUNNING_TIME_DL=0" << ::endl;
@@ -332,8 +332,8 @@ namespace kt
out << "PRIORITY=0" << ::endl;
out << "AUTOSTART=1" << ::endl;
if (core->getGlobalMaxShareRatio() > 0)
- out << QString("MAX_RATIO=%1").arg(core->getGlobalMaxShareRatio(),0,'f',2) << ::endl;
- out << QString("IMPORTED=%1").arg(imported) << ::endl;
+ out << TQString("MAX_RATIO=%1").tqarg(core->getGlobalMaxShareRatio(),0,'f',2) << ::endl;
+ out << TQString("IMPORTED=%1").tqarg(imported) << ::endl;
if (custom_output_name)
out << "CUSTOM_OUTPUT_NAME=1" << endl;
}
@@ -358,7 +358,7 @@ namespace kt
return nb;
}
- void ImportDialog::saveFileInfo(const QString & file_info_file,QValueList<Uint32> & dnd)
+ void ImportDialog::saveFileInfo(const TQString & file_info_file,TQValueList<Uint32> & dnd)
{
// saves which TorrentFile's do not need to be downloaded
File fptr;
diff --git a/plugins/partfileimport/importdialog.h b/plugins/partfileimport/importdialog.h
index b7617fc..9f7db9f 100644
--- a/plugins/partfileimport/importdialog.h
+++ b/plugins/partfileimport/importdialog.h
@@ -46,9 +46,10 @@ namespace kt
class ImportDialog : public ImportDlgBase,public bt::DataCheckerListener
{
Q_OBJECT
+ TQ_OBJECT
public:
- ImportDialog(CoreInterface* core,QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ ImportDialog(CoreInterface* core,TQWidget* tqparent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
virtual ~ImportDialog();
public slots:
@@ -56,12 +57,12 @@ namespace kt
void onTorrentGetReult(KIO::Job* j);
private:
- void writeIndex(const QString & file,const bt::BitSet & chunks);
- void linkTorFile(const QString & cache_dir,const QString & dnd_dir,
- const KURL & data_url,const QString & fpath,bool & dnd);
- void saveStats(const QString & stats_file,const KURL & data_url,bt::Uint64 imported,bool custom_output_name);
+ void writeIndex(const TQString & file,const bt::BitSet & chunks);
+ void linkTorFile(const TQString & cache_dir,const TQString & dnd_dir,
+ const KURL & data_url,const TQString & fpath,bool & dnd);
+ void saveStats(const TQString & stats_file,const KURL & data_url,bt::Uint64 imported,bool custom_output_name);
bt::Uint64 calcImportedBytes(const bt::BitSet & chunks,const bt::Torrent & tor);
- void saveFileInfo(const QString & file_info_file,QValueList<bt::Uint32> & dnd);
+ void saveFileInfo(const TQString & file_info_file,TQValueList<bt::Uint32> & dnd);
virtual void progress(bt::Uint32 num,bt::Uint32 total);
virtual void status(bt::Uint32 num_failed,bt::Uint32 num_downloaded);
diff --git a/plugins/partfileimport/importdlgbase.ui b/plugins/partfileimport/importdlgbase.ui
index e1cdd64..c14ceee 100644
--- a/plugins/partfileimport/importdlgbase.ui
+++ b/plugins/partfileimport/importdlgbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ImportDlgBase</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>ImportDlgBase</cstring>
</property>
@@ -19,27 +19,27 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout6</cstring>
+ <cstring>tqlayout6</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>60</width>
<height>0</height>
@@ -49,11 +49,11 @@
<string>Torrent:</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>60</width>
<height>0</height>
@@ -65,9 +65,9 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<vbox>
<property name="name">
@@ -100,9 +100,9 @@
<cstring>m_progress</cstring>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<hbox>
<property name="name">
@@ -118,7 +118,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>61</width>
<height>20</height>
@@ -147,7 +147,7 @@
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/plugins/partfileimport/partfileimportplugin.cpp b/plugins/partfileimport/partfileimportplugin.cpp
index c154478..04ef8fd 100644
--- a/plugins/partfileimport/partfileimportplugin.cpp
+++ b/plugins/partfileimport/partfileimportplugin.cpp
@@ -39,8 +39,8 @@ K_EXPORT_COMPONENT_FACTORY(ktpartfileimportplugin,KGenericFactory<kt::PartFileIm
namespace kt
{
- PartFileImportPlugin::PartFileImportPlugin(QObject* parent, const char* name, const QStringList& args)
- : Plugin(parent, name, args,NAME,i18n("Import"),AUTHOR,EMAIL,i18n("Imports partially or fully downloaded torrents from other clients"),"ktplugins")
+ PartFileImportPlugin::PartFileImportPlugin(TQObject* tqparent, const char* name, const TQStringList& args)
+ : Plugin(tqparent, name, args,NAME,i18n("Import"),AUTHOR,EMAIL,i18n("Imports partially or fully downloaded torrents from other clients"),"ktplugins")
{
setXMLFile("ktpartfileimportpluginui.rc");
import_action = 0;
@@ -54,7 +54,7 @@ namespace kt
void PartFileImportPlugin::load()
{
import_action = new KAction(i18n("Import existing download" ), 0, this,
- SLOT(onImport()), actionCollection(), "partfileimport" );
+ TQT_SLOT(onImport()), actionCollection(), "partfileimport" );
}
void PartFileImportPlugin::unload()
@@ -69,7 +69,7 @@ namespace kt
dlg.exec();
}
- bool PartFileImportPlugin::versionCheck(const QString & version) const
+ bool PartFileImportPlugin::versionCheck(const TQString & version) const
{
return version == KT_VERSION_MACRO;
}
diff --git a/plugins/partfileimport/partfileimportplugin.h b/plugins/partfileimport/partfileimportplugin.h
index 31f2d3a..da2874e 100644
--- a/plugins/partfileimport/partfileimportplugin.h
+++ b/plugins/partfileimport/partfileimportplugin.h
@@ -33,13 +33,14 @@ namespace kt
class PartFileImportPlugin : public Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- PartFileImportPlugin(QObject* parent, const char* name, const QStringList& args);
+ PartFileImportPlugin(TQObject* tqparent, const char* name, const TQStringList& args);
virtual ~PartFileImportPlugin();
virtual void load();
virtual void unload();
- virtual bool versionCheck(const QString& version) const;
+ virtual bool versionCheck(const TQString& version) const;
public slots:
void onImport();
diff --git a/plugins/rssfeed/rss/article.cpp b/plugins/rssfeed/rss/article.cpp
index 571490e..476eb09 100644
--- a/plugins/rssfeed/rss/article.cpp
+++ b/plugins/rssfeed/rss/article.cpp
@@ -17,8 +17,8 @@
#include <kurllabel.h>
#include <kmdcodec.h>
-#include <qdatetime.h>
-#include <qdom.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
using namespace RSS;
namespace RSS
@@ -28,11 +28,11 @@ namespace RSS
struct Article::Private : public Shared
{
- QString title;
+ TQString title;
KURL link;
- QString description;
- QDateTime pubDate;
- QString guid;
+ TQString description;
+ TQDateTime pubDate;
+ TQString guid;
bool guidIsPermaLink;
MetaInfoMap meta;
KURL commentsLink;
@@ -48,28 +48,28 @@ Article::Article(const Article &other) : d(0)
*this = other;
}
-Article::Article(const QDomNode &node, Format format) : d(new Private)
+Article::Article(const TQDomNode &node, Format format) : d(new Private)
{
- QString elemText;
+ TQString elemText;
d->numComments=0;
- if (!(elemText = extractNode(node, QString::fromLatin1("title"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("title"))).isNull())
d->title = elemText;
- QDomNode n;
+ TQDomNode n;
bool foundTorrentEnclosure = false;
for (n = node.firstChild(); !n.isNull(); n = n.nextSibling()) {
- const QDomElement e = n.toElement();
- if ( (e.tagName()==QString::fromLatin1("enclosure") ) )
+ const TQDomElement e = n.toElement();
+ if ( (e.tagName()==TQString::tqfromLatin1("enclosure") ) )
{
- QString enclosureAttr = e.attribute(QString::fromLatin1("type"));
+ TQString enclosureAttr = e.attribute(TQString::tqfromLatin1("type"));
if (!enclosureAttr.isNull() )
{
if (enclosureAttr == "application/x-bittorrent")
{
- enclosureAttr = e.attribute(QString::fromLatin1("url"));
+ enclosureAttr = e.attribute(TQString::tqfromLatin1("url"));
if (!enclosureAttr.isNull() )
{
d->link=enclosureAttr;
@@ -85,44 +85,44 @@ Article::Article(const QDomNode &node, Format format) : d(new Private)
{
if (format==AtomFeed)
{
- QDomNode n;
+ TQDomNode n;
for (n = node.firstChild(); !n.isNull(); n = n.nextSibling()) {
- const QDomElement e = n.toElement();
- if ( (e.tagName()==QString::fromLatin1("link")) &&
- (e.attribute(QString::fromLatin1("rel"))==QString::fromLatin1("alternate")))
+ const TQDomElement e = n.toElement();
+ if ( (e.tagName()==TQString::tqfromLatin1("link")) &&
+ (e.attribute(TQString::tqfromLatin1("rel"))==TQString::tqfromLatin1("alternate")))
{
- d->link=n.toElement().attribute(QString::fromLatin1("href"));
+ d->link=n.toElement().attribute(TQString::tqfromLatin1("href"));
break;
}
}
}
else
{
- if (!(elemText = extractNode(node, QString::fromLatin1("link"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("link"))).isNull())
d->link = elemText;
}
}
// prefer content/content:encoded over summary/description for feeds that provide it
- QString tagName=(format==AtomFeed)? QString::fromLatin1("content"): QString::fromLatin1("content:encoded");
+ TQString tagName=(format==AtomFeed)? TQString::tqfromLatin1("content"): TQString::tqfromLatin1("content:encoded");
if (!(elemText = extractNode(node, tagName, false)).isNull())
d->description = elemText;
if (d->description.isEmpty())
{
- if (!(elemText = extractNode(node, QString::fromLatin1("body"), false)).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("body"), false)).isNull())
d->description = elemText;
if (d->description.isEmpty()) // 3rd try: see http://www.intertwingly.net/blog/1299.html
{
- if (!(elemText = extractNode(node, QString::fromLatin1((format==AtomFeed)? "summary" : "description"), false)).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1((format==AtomFeed)? "summary" : "description"), false)).isNull())
d->description = elemText;
}
}
- if (!(elemText = extractNode(node, QString::fromLatin1((format==AtomFeed)? "created": "pubDate"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1((format==AtomFeed)? "created": "pubDate"))).isNull())
{
time_t _time;
if (format==AtomFeed)
@@ -134,7 +134,7 @@ Article::Article(const QDomNode &node, Format format) : d(new Private)
if (_time != 0)
d->pubDate.setTime_t(_time);
}
- if (!(elemText = extractNode(node, QString::fromLatin1("dc:date"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("dc:date"))).isNull())
{
time_t _time = parseISO8601Date(elemText);
@@ -146,23 +146,23 @@ Article::Article(const QDomNode &node, Format format) : d(new Private)
//no luck so far - so let's set it to the current time
if (!d->pubDate.isValid())
{
- d->pubDate = QDateTime::currentDateTime();
+ d->pubDate = TQDateTime::tqcurrentDateTime();
}
- if (!(elemText = extractNode(node, QString::fromLatin1("wfw:comment"))).isNull()) {
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("wfw:comment"))).isNull()) {
d->commentsLink = elemText;
}
- if (!(elemText = extractNode(node, QString::fromLatin1("slash:comments"))).isNull()) {
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("slash:comments"))).isNull()) {
d->numComments = elemText.toInt();
}
- tagName=(format==AtomFeed)? QString::fromLatin1("id"): QString::fromLatin1("guid");
+ tagName=(format==AtomFeed)? TQString::tqfromLatin1("id"): TQString::tqfromLatin1("guid");
n = node.namedItem(tagName);
if (!n.isNull()) {
d->guidIsPermaLink = (format==AtomFeed)? false : true;
- if (n.toElement().attribute(QString::fromLatin1("isPermaLink"), "true") == "false") d->guidIsPermaLink = false;
+ if (n.toElement().attribute(TQString::tqfromLatin1("isPermaLink"), "true") == "false") d->guidIsPermaLink = false;
if (!(elemText = extractNode(node, tagName)).isNull())
d->guid = elemText;
@@ -172,18 +172,18 @@ Article::Article(const QDomNode &node, Format format) : d(new Private)
d->guidIsPermaLink = false;
md5Machine.reset();
- QDomNode n(node);
+ TQDomNode n(node);
md5Machine.update(d->title.utf8());
md5Machine.update(d->description.utf8());
- d->guid = QString(md5Machine.hexDigest().data());
- d->meta[QString::fromLatin1("guidIsHash")] = QString::fromLatin1("true");
+ d->guid = TQString(md5Machine.hexDigest().data());
+ d->meta[TQString::tqfromLatin1("guidIsHash")] = TQString::tqfromLatin1("true");
}
- for (QDomNode i = node.firstChild(); !i.isNull(); i = i.nextSibling())
+ for (TQDomNode i = node.firstChild(); !i.isNull(); i = i.nextSibling())
{
- if (i.isElement() && i.toElement().tagName() == QString::fromLatin1("metaInfo:meta"))
+ if (i.isElement() && i.toElement().tagName() == TQString::tqfromLatin1("metaInfo:meta"))
{
- QString type = i.toElement().attribute(QString::fromLatin1("type"));
+ TQString type = i.toElement().attribute(TQString::tqfromLatin1("type"));
d->meta[type] = i.toElement().text();
}
}
@@ -195,7 +195,7 @@ Article::~Article()
delete d;
}
-QString Article::title() const
+TQString Article::title() const
{
return d->title;
}
@@ -205,12 +205,12 @@ const KURL &Article::link() const
return d->link;
}
-QString Article::description() const
+TQString Article::description() const
{
return d->description;
}
-QString Article::guid() const
+TQString Article::guid() const
{
return d->guid;
}
@@ -220,7 +220,7 @@ bool Article::guidIsPermaLink() const
return d->guidIsPermaLink;
}
-const QDateTime &Article::pubDate() const
+const TQDateTime &Article::pubDate() const
{
return d->pubDate;
}
@@ -236,14 +236,14 @@ int Article::comments() const
}
-QString Article::meta(const QString &key) const
+TQString Article::meta(const TQString &key) const
{
return d->meta[key];
}
-KURLLabel *Article::widget(QWidget *parent, const char *name) const
+KURLLabel *Article::widget(TQWidget *tqparent, const char *name) const
{
- KURLLabel *label = new KURLLabel(d->link.url(), d->title, parent, name);
+ KURLLabel *label = new KURLLabel(d->link.url(), d->title, tqparent, name);
label->setUseTips(true);
if (!d->description.isNull())
label->setTipText(d->description);
diff --git a/plugins/rssfeed/rss/article.h b/plugins/rssfeed/rss/article.h
index bab7a38..93f1908 100644
--- a/plugins/rssfeed/rss/article.h
+++ b/plugins/rssfeed/rss/article.h
@@ -11,15 +11,15 @@
#ifndef LIBRSS_ARTICLE_H
#define LIBRSS_ARTICLE_H
-#include <qmap.h>
+#include <tqmap.h>
#include "global.h"
-class QDateTime;
-class QDomNode;
-template <class> class QValueList;
-class QString;
-class QWidget;
+class TQDateTime;
+class TQDomNode;
+template <class> class TQValueList;
+class TQString;
+class TQWidget;
class KURL;
class KURLLabel;
@@ -37,7 +37,7 @@ namespace RSS
/**
* A list of articles.
*/
- typedef QValueList<Article> List;
+ typedef TQValueList<Article> List;
/**
* Default constructor.
@@ -52,10 +52,10 @@ namespace RSS
/**
* Constructs an Article from a piece of RSS markup.
- * @param node A QDomNode which references the DOM leaf to be used
+ * @param node A TQDomNode which references the DOM leaf to be used
* for constructing the Article.
*/
- Article(const QDomNode &node, Format format);
+ Article(const TQDomNode &node, Format format);
/**
* Assignment operator.
@@ -87,10 +87,10 @@ namespace RSS
/**
* RSS 0.90 and upwards
- * @return The headline of this article, or QString::null if
+ * @return The headline of this article, or TQString() if
* no headline was available.
*/
- QString title() const;
+ TQString title() const;
/**
* RSS 0.90 and upwards
@@ -103,20 +103,20 @@ namespace RSS
/**
* RSS 0.91 and upwards
- * @return A story synopsis, or QString::null if no description
+ * @return A story synopsis, or TQString() if no description
* was available.
*/
- QString description() const;
+ TQString description() const;
/**
* RSS 2.0 and upwards
* @return An article GUID (globally unique identifier).
*/
- QString guid() const;
+ TQString guid() const;
/**
* RSS 2.0 and upwards
- * @return If this article GUID is permalink. Has no meaning when guid() is QString::null.
+ * @return If this article GUID is permalink. Has no meaning when guid() is TQString().
*/
bool guidIsPermaLink() const;
@@ -124,30 +124,30 @@ namespace RSS
* RSS 2.0 and upwards
* @return The date when the article was published.
*/
- const QDateTime &pubDate() const;
+ const TQDateTime &pubDate() const;
const KURL &commentsLink() const;
int comments() const;
- QString meta(const QString &key) const;
+ TQString meta(const TQString &key) const;
/**
- * @param parent The parent widget for the KURLLabel.
+ * @param tqparent The tqparent widget for the KURLLabel.
* @param name A name for the widget which will be used internally.
* @return a widget (a KURLLabel in this case) for the Article.
* This makes building a user-interface which contains the
* information in this Article object more convenient.
* The returned KURLLabel's caption will be the title(), clicking
- * on it will emit the URL link(), and it has a QToolTip attached
+ * on it will emit the URL link(), and it has a TQToolTip attached
* to it which displays the description() (in case it has one,
* if there is no description, the URL which the label links to
* will be used).
* Note that you have to delete the KURLLabel object returned by
* this method yourself.
*/
- KURLLabel *widget(QWidget *parent = 0, const char *name = 0) const;
+ KURLLabel *widget(TQWidget *tqparent = 0, const char *name = 0) const;
- typedef QMap<QString, QString> MetaInfoMap;
+ typedef TQMap<TQString, TQString> MetaInfoMap;
private:
struct Private;
diff --git a/plugins/rssfeed/rss/document.cpp b/plugins/rssfeed/rss/document.cpp
index be353e4..f2e3763 100644
--- a/plugins/rssfeed/rss/document.cpp
+++ b/plugins/rssfeed/rss/document.cpp
@@ -18,9 +18,9 @@
#include <krfcdate.h>
#include <kurl.h>
-#include <qdatetime.h>
-#include <qdom.h>
-#include <qptrlist.h>
+#include <tqdatetime.h>
+#include <tqdom.h>
+#include <tqptrlist.h>
using namespace RSS;
@@ -40,22 +40,22 @@ struct Document::Private : public Shared
}
Version version;
- QString title;
- QString description;
+ TQString title;
+ TQString description;
KURL link;
Image *image;
TextInput *textInput;
Article::List articles;
Language language;
Format format;
- QString copyright;
- QDateTime pubDate;
- QDateTime lastBuildDate;
- QString rating;
+ TQString copyright;
+ TQDateTime pubDate;
+ TQDateTime lastBuildDate;
+ TQString rating;
KURL docs;
int ttl;
- QString managingEditor;
- QString webMaster;
+ TQString managingEditor;
+ TQString webMaster;
HourList skipHours;
DayList skipDays;
bool valid;
@@ -70,51 +70,51 @@ Document::Document(const Document &other) : d(0)
*this = other;
}
-Document::Document(const QDomDocument &doc) : d(new Private)
+Document::Document(const TQDomDocument &doc) : d(new Private)
{
- QString elemText;
- QDomNode rootNode = doc.documentElement();
+ TQString elemText;
+ TQDomNode rootNode = doc.documentElement();
// Determine the version of the present RSS markup.
- QString attr;
+ TQString attr;
// we should probably check that it ISN'T feed or rss, rather than check if it is xhtml
- if (rootNode.toElement().tagName()==QString::fromLatin1("html"))
+ if (rootNode.toElement().tagName()==TQString::tqfromLatin1("html"))
d->valid=false;
else
d->valid=true;
- attr = rootNode.toElement().attribute(QString::fromLatin1("version"), QString::null);
+ attr = rootNode.toElement().attribute(TQString::tqfromLatin1("version"), TQString());
if (!attr.isNull()) {
if (rootNode.toElement().tagName()=="feed")
{
d->format=AtomFeed;
- if (attr == QString::fromLatin1("0.3"))
+ if (attr == TQString::tqfromLatin1("0.3"))
d->version = vAtom_0_3;
- else if (attr == QString::fromLatin1("0.2")) /* smt -> review */
+ else if (attr == TQString::tqfromLatin1("0.2")) /* smt -> review */
d->version = vAtom_0_2;
- else if (attr == QString::fromLatin1("0.1")) /* smt -> review */
+ else if (attr == TQString::tqfromLatin1("0.1")) /* smt -> review */
d->version = vAtom_0_1;
}
else
{
d->format=RSSFeed;
- if (attr == QString::fromLatin1("0.91"))
+ if (attr == TQString::tqfromLatin1("0.91"))
d->version = v0_91;
- else if (attr == QString::fromLatin1("0.92"))
+ else if (attr == TQString::tqfromLatin1("0.92"))
d->version = v0_92;
- else if (attr == QString::fromLatin1("0.93"))
+ else if (attr == TQString::tqfromLatin1("0.93"))
d->version = v0_93;
- else if (attr == QString::fromLatin1("0.94"))
+ else if (attr == TQString::tqfromLatin1("0.94"))
d->version = v0_94;
- else if (attr.startsWith("2.0") || attr == QString::fromLatin1("2")) // http://www.breuls.org/rss puts 2.00 in version (BR #0000016)
+ else if (attr.startsWith("2.0") || attr == TQString::tqfromLatin1("2")) // http://www.breuls.org/rss puts 2.00 in version (BR #0000016)
d->version = v2_0;
}
}
if (d->format==UnknownFormat)
{
- attr = rootNode.toElement().attribute(QString::fromLatin1("xmlns"), QString::null);
+ attr = rootNode.toElement().attribute(TQString::tqfromLatin1("xmlns"), TQString());
if (!attr.isNull()) {
/*
* Hardcoding these URLs is actually a bad idea, since the DTD doesn't
@@ -124,275 +124,275 @@ Document::Document(const QDomDocument &doc) : d(new Private)
* distinguish the RSS versions by analyzing the relationship between
* the nodes.
*/
- if (attr == QString::fromLatin1("http://my.netscape.com/rdf/simple/0.9/")) {
+ if (attr == TQString::tqfromLatin1("http://my.netscape.com/rdf/simple/0.9/")) {
d->format=RSSFeed;
d->version = v0_90;
}
- else if (attr == QString::fromLatin1("http://purl.org/rss/1.0/")) {
+ else if (attr == TQString::tqfromLatin1("http://purl.org/rss/1.0/")) {
d->format=RSSFeed;
d->version = v1_0;
}
}
}
- QDomNode channelNode;
+ TQDomNode channelNode;
if (d->format == AtomFeed)
channelNode=rootNode;
else
- channelNode=rootNode.namedItem(QString::fromLatin1("channel"));
+ channelNode=rootNode.namedItem(TQString::tqfromLatin1("channel"));
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("title"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("title"))).isNull())
d->title = elemText;
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("description"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("description"))).isNull())
d->description = elemText;
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("link"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("link"))).isNull())
d->link = elemText;
- /* This is ugly but necessary since RSS 0.90 and 1.0 have a different parent
+ /* This is ugly but necessary since RSS 0.90 and 1.0 have a different tqparent
* node for <image>, <textinput> and <item> than RSS 0.91-0.94 and RSS 2.0.
*/
- QDomNode parentNode;
+ TQDomNode tqparentNode;
if (d->version == v0_90 || d->version == v1_0 || d->format == AtomFeed)
- parentNode = rootNode;
+ tqparentNode = rootNode;
else
{
// following is a HACK for broken 0.91 feeds like xanga.com's
- if (!rootNode.namedItem(QString::fromLatin1("item")).isNull())
- parentNode = rootNode;
+ if (!rootNode.namedItem(TQString::tqfromLatin1("item")).isNull())
+ tqparentNode = rootNode;
else
- parentNode = channelNode;
+ tqparentNode = channelNode;
}
// image and textinput aren't supported by Atom.. handle in case feed provides
- QDomNode n = parentNode.namedItem(QString::fromLatin1("image"));
+ TQDomNode n = tqparentNode.namedItem(TQString::tqfromLatin1("image"));
if (!n.isNull())
d->image = new Image(n);
- n = parentNode.namedItem(QString::fromLatin1("textinput"));
+ n = tqparentNode.namedItem(TQString::tqfromLatin1("textinput"));
if (!n.isNull())
d->textInput = new TextInput(n);
// Our (hopefully faster) version of elementsByTagName()
- QString tagName;
+ TQString tagName;
if (d->format == AtomFeed)
- tagName=QString::fromLatin1("entry");
+ tagName=TQString::tqfromLatin1("entry");
else
- tagName=QString::fromLatin1("item");
+ tagName=TQString::tqfromLatin1("item");
- for (n = parentNode.firstChild(); !n.isNull(); n = n.nextSibling()) {
- const QDomElement e = n.toElement();
+ for (n = tqparentNode.firstChild(); !n.isNull(); n = n.nextSibling()) {
+ const TQDomElement e = n.toElement();
if (e.tagName() == tagName)
d->articles.append(Article(e, d->format));
}
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("copyright"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("copyright"))).isNull())
d->copyright = elemText;
if (d->format == AtomFeed)
- elemText = rootNode.toElement().attribute(QString::fromLatin1("xml:lang"), QString::null);
+ elemText = rootNode.toElement().attribute(TQString::tqfromLatin1("xml:lang"), TQString());
else
- elemText = extractNode(channelNode, QString::fromLatin1("language"));
+ elemText = extractNode(channelNode, TQString::tqfromLatin1("language"));
if (!elemText.isNull()){
- if (elemText == QString::fromLatin1("af"))
+ if (elemText == TQString::tqfromLatin1("af"))
d->language = af;
- else if (elemText == QString::fromLatin1("sq"))
+ else if (elemText == TQString::tqfromLatin1("sq"))
d->language = sq;
- else if (elemText == QString::fromLatin1("eu"))
+ else if (elemText == TQString::tqfromLatin1("eu"))
d->language = eu;
- else if (elemText == QString::fromLatin1("be"))
+ else if (elemText == TQString::tqfromLatin1("be"))
d->language = be;
- else if (elemText == QString::fromLatin1("bg"))
+ else if (elemText == TQString::tqfromLatin1("bg"))
d->language = bg;
- else if (elemText == QString::fromLatin1("ca"))
+ else if (elemText == TQString::tqfromLatin1("ca"))
d->language = ca;
- else if (elemText == QString::fromLatin1("zh-cn"))
+ else if (elemText == TQString::tqfromLatin1("zh-cn"))
d->language = zh_cn;
- else if (elemText == QString::fromLatin1("zh-tw"))
+ else if (elemText == TQString::tqfromLatin1("zh-tw"))
d->language = zh_tw;
- else if (elemText == QString::fromLatin1("hr"))
+ else if (elemText == TQString::tqfromLatin1("hr"))
d->language = hr;
- else if (elemText == QString::fromLatin1("cs"))
+ else if (elemText == TQString::tqfromLatin1("cs"))
d->language = cs;
- else if (elemText == QString::fromLatin1("da"))
+ else if (elemText == TQString::tqfromLatin1("da"))
d->language = da;
- else if (elemText == QString::fromLatin1("nl"))
+ else if (elemText == TQString::tqfromLatin1("nl"))
d->language = nl;
- else if (elemText == QString::fromLatin1("nl-be"))
+ else if (elemText == TQString::tqfromLatin1("nl-be"))
d->language = nl_be;
- else if (elemText == QString::fromLatin1("nl-nl"))
+ else if (elemText == TQString::tqfromLatin1("nl-nl"))
d->language = nl_nl;
- else if (elemText == QString::fromLatin1("en"))
+ else if (elemText == TQString::tqfromLatin1("en"))
d->language = en;
- else if (elemText == QString::fromLatin1("en-au"))
+ else if (elemText == TQString::tqfromLatin1("en-au"))
d->language = en_au;
- else if (elemText == QString::fromLatin1("en-bz"))
+ else if (elemText == TQString::tqfromLatin1("en-bz"))
d->language = en_bz;
- else if (elemText == QString::fromLatin1("en-ca"))
+ else if (elemText == TQString::tqfromLatin1("en-ca"))
d->language = en_ca;
- else if (elemText == QString::fromLatin1("en-ie"))
+ else if (elemText == TQString::tqfromLatin1("en-ie"))
d->language = en_ie;
- else if (elemText == QString::fromLatin1("en-jm"))
+ else if (elemText == TQString::tqfromLatin1("en-jm"))
d->language = en_jm;
- else if (elemText == QString::fromLatin1("en-nz"))
+ else if (elemText == TQString::tqfromLatin1("en-nz"))
d->language = en_nz;
- else if (elemText == QString::fromLatin1("en-ph"))
+ else if (elemText == TQString::tqfromLatin1("en-ph"))
d->language = en_ph;
- else if (elemText == QString::fromLatin1("en-za"))
+ else if (elemText == TQString::tqfromLatin1("en-za"))
d->language = en_za;
- else if (elemText == QString::fromLatin1("en-tt"))
+ else if (elemText == TQString::tqfromLatin1("en-tt"))
d->language = en_tt;
- else if (elemText == QString::fromLatin1("en-gb"))
+ else if (elemText == TQString::tqfromLatin1("en-gb"))
d->language = en_gb;
- else if (elemText == QString::fromLatin1("en-us"))
+ else if (elemText == TQString::tqfromLatin1("en-us"))
d->language = en_us;
- else if (elemText == QString::fromLatin1("en-zw"))
+ else if (elemText == TQString::tqfromLatin1("en-zw"))
d->language = en_zw;
- else if (elemText == QString::fromLatin1("fo"))
+ else if (elemText == TQString::tqfromLatin1("fo"))
d->language = fo;
- else if (elemText == QString::fromLatin1("fi"))
+ else if (elemText == TQString::tqfromLatin1("fi"))
d->language = fi;
- else if (elemText == QString::fromLatin1("fr"))
+ else if (elemText == TQString::tqfromLatin1("fr"))
d->language = fr;
- else if (elemText == QString::fromLatin1("fr-be"))
+ else if (elemText == TQString::tqfromLatin1("fr-be"))
d->language = fr_be;
- else if (elemText == QString::fromLatin1("fr-ca"))
+ else if (elemText == TQString::tqfromLatin1("fr-ca"))
d->language = fr_ca;
- else if (elemText == QString::fromLatin1("fr-fr"))
+ else if (elemText == TQString::tqfromLatin1("fr-fr"))
d->language = fr_fr;
- else if (elemText == QString::fromLatin1("fr-lu"))
+ else if (elemText == TQString::tqfromLatin1("fr-lu"))
d->language = fr_lu;
- else if (elemText == QString::fromLatin1("fr-mc"))
+ else if (elemText == TQString::tqfromLatin1("fr-mc"))
d->language = fr_mc;
- else if (elemText == QString::fromLatin1("fr-ch"))
+ else if (elemText == TQString::tqfromLatin1("fr-ch"))
d->language = fr_ch;
- else if (elemText == QString::fromLatin1("gl"))
+ else if (elemText == TQString::tqfromLatin1("gl"))
d->language = gl;
- else if (elemText == QString::fromLatin1("gd"))
+ else if (elemText == TQString::tqfromLatin1("gd"))
d->language = gd;
- else if (elemText == QString::fromLatin1("de"))
+ else if (elemText == TQString::tqfromLatin1("de"))
d->language = de;
- else if (elemText == QString::fromLatin1("de-at"))
+ else if (elemText == TQString::tqfromLatin1("de-at"))
d->language = de_at;
- else if (elemText == QString::fromLatin1("de-de"))
+ else if (elemText == TQString::tqfromLatin1("de-de"))
d->language = de_de;
- else if (elemText == QString::fromLatin1("de-li"))
+ else if (elemText == TQString::tqfromLatin1("de-li"))
d->language = de_li;
- else if (elemText == QString::fromLatin1("de-lu"))
+ else if (elemText == TQString::tqfromLatin1("de-lu"))
d->language = de_lu;
- else if (elemText == QString::fromLatin1("de-ch"))
+ else if (elemText == TQString::tqfromLatin1("de-ch"))
d->language = de_ch;
- else if (elemText == QString::fromLatin1("el"))
+ else if (elemText == TQString::tqfromLatin1("el"))
d->language = el;
- else if (elemText == QString::fromLatin1("hu"))
+ else if (elemText == TQString::tqfromLatin1("hu"))
d->language = hu;
- else if (elemText == QString::fromLatin1("is"))
+ else if (elemText == TQString::tqfromLatin1("is"))
d->language = is;
- else if (elemText == QString::fromLatin1("id"))
+ else if (elemText == TQString::tqfromLatin1("id"))
d->language = id;
- else if (elemText == QString::fromLatin1("ga"))
+ else if (elemText == TQString::tqfromLatin1("ga"))
d->language = ga;
- else if (elemText == QString::fromLatin1("it"))
+ else if (elemText == TQString::tqfromLatin1("it"))
d->language = it;
- else if (elemText == QString::fromLatin1("it-it"))
+ else if (elemText == TQString::tqfromLatin1("it-it"))
d->language = it_it;
- else if (elemText == QString::fromLatin1("it-ch"))
+ else if (elemText == TQString::tqfromLatin1("it-ch"))
d->language = it_ch;
- else if (elemText == QString::fromLatin1("ja"))
+ else if (elemText == TQString::tqfromLatin1("ja"))
d->language = ja;
- else if (elemText == QString::fromLatin1("ko"))
+ else if (elemText == TQString::tqfromLatin1("ko"))
d->language = ko;
- else if (elemText == QString::fromLatin1("mk"))
+ else if (elemText == TQString::tqfromLatin1("mk"))
d->language = mk;
- else if (elemText == QString::fromLatin1("no"))
+ else if (elemText == TQString::tqfromLatin1("no"))
d->language = no;
- else if (elemText == QString::fromLatin1("pl"))
+ else if (elemText == TQString::tqfromLatin1("pl"))
d->language = pl;
- else if (elemText == QString::fromLatin1("pt"))
+ else if (elemText == TQString::tqfromLatin1("pt"))
d->language = pt;
- else if (elemText == QString::fromLatin1("pt-br"))
+ else if (elemText == TQString::tqfromLatin1("pt-br"))
d->language = pt_br;
- else if (elemText == QString::fromLatin1("pt-pt"))
+ else if (elemText == TQString::tqfromLatin1("pt-pt"))
d->language = pt_pt;
- else if (elemText == QString::fromLatin1("ro"))
+ else if (elemText == TQString::tqfromLatin1("ro"))
d->language = ro;
- else if (elemText == QString::fromLatin1("ro-mo"))
+ else if (elemText == TQString::tqfromLatin1("ro-mo"))
d->language = ro_mo;
- else if (elemText == QString::fromLatin1("ro-ro"))
+ else if (elemText == TQString::tqfromLatin1("ro-ro"))
d->language = ro_ro;
- else if (elemText == QString::fromLatin1("ru"))
+ else if (elemText == TQString::tqfromLatin1("ru"))
d->language = ru;
- else if (elemText == QString::fromLatin1("ru-mo"))
+ else if (elemText == TQString::tqfromLatin1("ru-mo"))
d->language = ru_mo;
- else if (elemText == QString::fromLatin1("ru-ru"))
+ else if (elemText == TQString::tqfromLatin1("ru-ru"))
d->language = ru_ru;
- else if (elemText == QString::fromLatin1("sr"))
+ else if (elemText == TQString::tqfromLatin1("sr"))
d->language = sr;
- else if (elemText == QString::fromLatin1("sk"))
+ else if (elemText == TQString::tqfromLatin1("sk"))
d->language = sk;
- else if (elemText == QString::fromLatin1("sl"))
+ else if (elemText == TQString::tqfromLatin1("sl"))
d->language = sl;
- else if (elemText == QString::fromLatin1("es"))
+ else if (elemText == TQString::tqfromLatin1("es"))
d->language = es;
- else if (elemText == QString::fromLatin1("es-ar"))
+ else if (elemText == TQString::tqfromLatin1("es-ar"))
d->language = es_ar;
- else if (elemText == QString::fromLatin1("es-bo"))
+ else if (elemText == TQString::tqfromLatin1("es-bo"))
d->language = es_bo;
- else if (elemText == QString::fromLatin1("es-cl"))
+ else if (elemText == TQString::tqfromLatin1("es-cl"))
d->language = es_cl;
- else if (elemText == QString::fromLatin1("es-co"))
+ else if (elemText == TQString::tqfromLatin1("es-co"))
d->language = es_co;
- else if (elemText == QString::fromLatin1("es-cr"))
+ else if (elemText == TQString::tqfromLatin1("es-cr"))
d->language = es_cr;
- else if (elemText == QString::fromLatin1("es-do"))
+ else if (elemText == TQString::tqfromLatin1("es-do"))
d->language = es_do;
- else if (elemText == QString::fromLatin1("es-ec"))
+ else if (elemText == TQString::tqfromLatin1("es-ec"))
d->language = es_ec;
- else if (elemText == QString::fromLatin1("es-sv"))
+ else if (elemText == TQString::tqfromLatin1("es-sv"))
d->language = es_sv;
- else if (elemText == QString::fromLatin1("es-gt"))
+ else if (elemText == TQString::tqfromLatin1("es-gt"))
d->language = es_gt;
- else if (elemText == QString::fromLatin1("es-hn"))
+ else if (elemText == TQString::tqfromLatin1("es-hn"))
d->language = es_hn;
- else if (elemText == QString::fromLatin1("es-mx"))
+ else if (elemText == TQString::tqfromLatin1("es-mx"))
d->language = es_mx;
- else if (elemText == QString::fromLatin1("es-ni"))
+ else if (elemText == TQString::tqfromLatin1("es-ni"))
d->language = es_ni;
- else if (elemText == QString::fromLatin1("es-pa"))
+ else if (elemText == TQString::tqfromLatin1("es-pa"))
d->language = es_pa;
- else if (elemText == QString::fromLatin1("es-py"))
+ else if (elemText == TQString::tqfromLatin1("es-py"))
d->language = es_py;
- else if (elemText == QString::fromLatin1("es-pe"))
+ else if (elemText == TQString::tqfromLatin1("es-pe"))
d->language = es_pe;
- else if (elemText == QString::fromLatin1("es-pr"))
+ else if (elemText == TQString::tqfromLatin1("es-pr"))
d->language = es_pr;
- else if (elemText == QString::fromLatin1("es-es"))
+ else if (elemText == TQString::tqfromLatin1("es-es"))
d->language = es_es;
- else if (elemText == QString::fromLatin1("es-uy"))
+ else if (elemText == TQString::tqfromLatin1("es-uy"))
d->language = es_uy;
- else if (elemText == QString::fromLatin1("es-ve"))
+ else if (elemText == TQString::tqfromLatin1("es-ve"))
d->language = es_ve;
- else if (elemText == QString::fromLatin1("sv"))
+ else if (elemText == TQString::tqfromLatin1("sv"))
d->language = sv;
- else if (elemText == QString::fromLatin1("sv-fi"))
+ else if (elemText == TQString::tqfromLatin1("sv-fi"))
d->language = sv_fi;
- else if (elemText == QString::fromLatin1("sv-se"))
+ else if (elemText == TQString::tqfromLatin1("sv-se"))
d->language = sv_se;
- else if (elemText == QString::fromLatin1("tr"))
+ else if (elemText == TQString::tqfromLatin1("tr"))
d->language = tr;
- else if (elemText == QString::fromLatin1("uk"))
+ else if (elemText == TQString::tqfromLatin1("uk"))
d->language = uk;
else
d->language = UndefinedLanguage;
}
if (d->format == AtomFeed)
- tagName=QString::fromLatin1("issued"); // atom doesn't specify this for feeds
+ tagName=TQString::tqfromLatin1("issued"); // atom doesn't specify this for feeds
// but some broken feeds do this
else
- tagName=QString::fromLatin1("pubDate");
+ tagName=TQString::tqfromLatin1("pubDate");
if (!(elemText = extractNode(channelNode, tagName)).isNull()) {
time_t _time;
@@ -408,7 +408,7 @@ Document::Document(const QDomDocument &doc) : d(new Private)
d->pubDate.setTime_t(_time);
}
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("dc:date"))).isNull()) {
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("dc:date"))).isNull()) {
time_t _time = parseISO8601Date(elemText);
/* \bug This isn't really the right way since it will set the date to
* Jan 1 1970, 1:00:00 if the passed date was invalid; this means that
@@ -418,9 +418,9 @@ Document::Document(const QDomDocument &doc) : d(new Private)
}
if (d->format == AtomFeed)
- tagName=QString::fromLatin1("modified");
+ tagName=TQString::tqfromLatin1("modified");
else
- tagName=QString::fromLatin1("lastBuildDate");
+ tagName=TQString::tqfromLatin1("lastBuildDate");
if (!(elemText = extractNode(channelNode, tagName)).isNull()) {
time_t _time;
if (d->format == AtomFeed)
@@ -430,44 +430,44 @@ Document::Document(const QDomDocument &doc) : d(new Private)
d->lastBuildDate.setTime_t(_time);
}
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("rating"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("rating"))).isNull())
d->rating = elemText;
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("docs"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("docs"))).isNull())
d->docs = elemText;
- if (!(elemText = extractNode(channelNode, QString::fromLatin1((d->format == AtomFeed) ? "author" : "managingEditor"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1((d->format == AtomFeed) ? "author" : "managingEditor"))).isNull())
d->managingEditor = elemText;
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("webMaster"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("webMaster"))).isNull())
d->webMaster = elemText;
- if (!(elemText = extractNode(channelNode, QString::fromLatin1("ttl"))).isNull())
+ if (!(elemText = extractNode(channelNode, TQString::tqfromLatin1("ttl"))).isNull())
d->ttl = elemText.toUInt();
- n = channelNode.namedItem(QString::fromLatin1("skipHours"));
+ n = channelNode.namedItem(TQString::tqfromLatin1("skipHours"));
if (!n.isNull())
- for (QDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement())
- if (e.tagName() == QString::fromLatin1("hour"))
+ for (TQDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement())
+ if (e.tagName() == TQString::tqfromLatin1("hour"))
d->skipHours.append(e.text().toUInt());
- n = channelNode.namedItem(QString::fromLatin1("skipDays"));
+ n = channelNode.namedItem(TQString::tqfromLatin1("skipDays"));
if (!n.isNull()) {
Day day;
- QString elemText;
- for (QDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement())
- if (e.tagName() == QString::fromLatin1("day")) {
+ TQString elemText;
+ for (TQDomElement e = n.firstChild().toElement(); !e.isNull(); e = e.nextSibling().toElement())
+ if (e.tagName() == TQString::tqfromLatin1("day")) {
elemText = e.text().lower();
- if (elemText == QString::fromLatin1("monday"))
+ if (elemText == TQString::tqfromLatin1("monday"))
day = Monday;
- else if (elemText == QString::fromLatin1("tuesday"))
+ else if (elemText == TQString::tqfromLatin1("tuesday"))
day = Tuesday;
- else if (elemText == QString::fromLatin1("wednesday"))
+ else if (elemText == TQString::tqfromLatin1("wednesday"))
day = Wednesday;
- else if (elemText == QString::fromLatin1("thursday"))
+ else if (elemText == TQString::tqfromLatin1("thursday"))
day = Thursday;
- else if (elemText == QString::fromLatin1("friday"))
+ else if (elemText == TQString::tqfromLatin1("friday"))
day = Friday;
- else if (elemText == QString::fromLatin1("saturday"))
+ else if (elemText == TQString::tqfromLatin1("saturday"))
day = Saturday;
- else if (elemText == QString::fromLatin1("sunday"))
+ else if (elemText == TQString::tqfromLatin1("sunday"))
day = Sunday;
else
day = UndefinedDay;
@@ -493,29 +493,29 @@ Version Document::version() const
return d->version;
}
-QString Document::verbVersion() const
+TQString Document::verbVersion() const
{
switch (d->version) {
- case v0_90: return QString::fromLatin1("0.90");
- case v0_91: return QString::fromLatin1("0.91");
- case v0_92: return QString::fromLatin1("0.92");
- case v0_93: return QString::fromLatin1("0.93");
- case v0_94: return QString::fromLatin1("0.94");
- case v1_0: return QString::fromLatin1("1.0");
- case v2_0: return QString::fromLatin1("2.0");
- case vAtom_0_3: return QString::fromLatin1("0.3");
- case vAtom_0_2: return QString::fromLatin1("0.2");
- case vAtom_0_1: return QString::fromLatin1("0.1");
+ case v0_90: return TQString::tqfromLatin1("0.90");
+ case v0_91: return TQString::tqfromLatin1("0.91");
+ case v0_92: return TQString::tqfromLatin1("0.92");
+ case v0_93: return TQString::tqfromLatin1("0.93");
+ case v0_94: return TQString::tqfromLatin1("0.94");
+ case v1_0: return TQString::tqfromLatin1("1.0");
+ case v2_0: return TQString::tqfromLatin1("2.0");
+ case vAtom_0_3: return TQString::tqfromLatin1("0.3");
+ case vAtom_0_2: return TQString::tqfromLatin1("0.2");
+ case vAtom_0_1: return TQString::tqfromLatin1("0.1");
}
- return QString::null;
+ return TQString();
}
-QString Document::title() const
+TQString Document::title() const
{
return d->title;
}
-QString Document::description() const
+TQString Document::description() const
{
return d->description;
}
@@ -555,22 +555,22 @@ Language Document::language() const
return d->language;
}
-QString Document::copyright() const
+TQString Document::copyright() const
{
return d->copyright;
}
-const QDateTime &Document::pubDate() const
+const TQDateTime &Document::pubDate() const
{
return d->pubDate;
}
-const QDateTime &Document::lastBuildDate() const
+const TQDateTime &Document::lastBuildDate() const
{
return d->lastBuildDate;
}
-QString Document::rating() const
+TQString Document::rating() const
{
return d->rating;
}
@@ -580,12 +580,12 @@ const KURL &Document::docs() const
return d->docs;
}
-QString Document::managingEditor() const
+TQString Document::managingEditor() const
{
return d->managingEditor;
}
-QString Document::webMaster() const
+TQString Document::webMaster() const
{
return d->webMaster;
}
diff --git a/plugins/rssfeed/rss/document.h b/plugins/rssfeed/rss/document.h
index 1ead634..c65c15e 100644
--- a/plugins/rssfeed/rss/document.h
+++ b/plugins/rssfeed/rss/document.h
@@ -14,8 +14,8 @@
#include "article.h"
#include "global.h"
-class QDateTime;
-class QDomDocument;
+class TQDateTime;
+class TQDomDocument;
namespace RSS
{
@@ -45,7 +45,7 @@ namespace RSS
/**
* Constructs a Document from a piece of XML markup.
*/
- Document(const QDomDocument &doc);
+ Document(const TQDomDocument &doc);
/**
* Assignment operator.
@@ -75,28 +75,28 @@ namespace RSS
/**
* Convenience method. Differs from version() only in how the result
* is returned.
- * @return A QString representing the verbose version of the
+ * @return A TQString representing the verbose version of the
* document.
* @see version()
*/
- QString verbVersion() const;
+ TQString verbVersion() const;
/**
* RSS 0.90 and upwards
- * @return The title of the RSS document, or QString::null if no
+ * @return The title of the RSS document, or TQString() if no
* title was available. This is often the name of the news source
* from which the RSS document was retrieved.
*/
- QString title() const;
+ TQString title() const;
/**
* RSS 0.90 and upwards
- * @return The description of the RSS document, or QString::null
+ * @return The description of the RSS document, or TQString()
* if no description was available. This is usually a short slogan
* or description of the news source from which the RSS document
* was retrieved.
*/
- QString description() const;
+ TQString description() const;
/**
* RSS 0.90 and upwards
@@ -158,28 +158,28 @@ namespace RSS
/**
* RSS 0.91 and upwards
* @return A copyright of the information contained in the RSS
- * document, or QString::null if no copyright is available.
+ * document, or TQString() if no copyright is available.
*/
- QString copyright() const;
+ TQString copyright() const;
/**
* RSS 0.91 and upwards
* @return The date when the RSS document was published.
*/
- const QDateTime &pubDate() const;
+ const TQDateTime &pubDate() const;
/**
* RSS 0.91 and upwards.
* @return The last time the channel was modified.
*/
- const QDateTime &lastBuildDate() const;
+ const TQDateTime &lastBuildDate() const;
/**
* RSS 0.91 and upwards
* @return A <a href="http://www.w3.org/PICS/#Specs">PICS</a>
* rating for this page.
*/
- QString rating() const;
+ TQString rating() const;
/**
* RSS 0.91 and upwards
@@ -197,16 +197,16 @@ namespace RSS
* bull@mancuso.com (Bull Mancuso).
* @see webMaster()
*/
- QString managingEditor() const;
+ TQString managingEditor() const;
/**
* RSS 0.91 and upwards
* @return The email address of the webmaster for the site, the
* person to contact if there are technical problems with the
- * channel, or QString::null if this information isn't available.
+ * channel, or TQString() if this information isn't available.
* @see managingEditor()
*/
- QString webMaster() const;
+ TQString webMaster() const;
/**
* RSS 0.91 and upwards
diff --git a/plugins/rssfeed/rss/global.h b/plugins/rssfeed/rss/global.h
index 3a954e6..e4bc7c7 100644
--- a/plugins/rssfeed/rss/global.h
+++ b/plugins/rssfeed/rss/global.h
@@ -12,7 +12,7 @@
#define LIBRSS_GLOBAL_H
template <class>
-class QValueList;
+class TQValueList;
namespace RSS
{
@@ -39,7 +39,7 @@ namespace RSS
* Possible status values returned by the signal
* Loader::loadingComplete().
*/
- enum Status {
+ enum tqStatus {
Success, /**
* Nothing went wrong so far, but you still have to check
* what values are returned by the classes since it's not
@@ -133,12 +133,12 @@ namespace RSS
/**
* This type is used by Document::skipDays().
*/
- typedef QValueList<Day> DayList;
+ typedef TQValueList<Day> DayList;
/**
* This type is used by Document::skipHours().
*/
- typedef QValueList<unsigned short> HourList;
+ typedef TQValueList<unsigned short> HourList;
}
#endif // LIBRSS_GLOBAL_H
diff --git a/plugins/rssfeed/rss/image.cpp b/plugins/rssfeed/rss/image.cpp
index 33e1544..98074be 100644
--- a/plugins/rssfeed/rss/image.cpp
+++ b/plugins/rssfeed/rss/image.cpp
@@ -14,9 +14,9 @@
#include <kio/job.h>
#include <kurl.h>
-#include <qbuffer.h>
-#include <qdom.h>
-#include <qpixmap.h>
+#include <tqbuffer.h>
+#include <tqdom.h>
+#include <tqpixmap.h>
using namespace RSS;
@@ -25,40 +25,40 @@ struct Image::Private : public Shared
Private() : height(31), width(88), pixmapBuffer(NULL), job(NULL)
{ }
- QString title;
+ TQString title;
KURL url;
KURL link;
- QString description;
+ TQString description;
unsigned int height;
unsigned int width;
- QBuffer *pixmapBuffer;
+ TQBuffer *pixmapBuffer;
KIO::Job *job;
};
-Image::Image() : QObject(), d(new Private)
+Image::Image() : TQObject(), d(new Private)
{
}
-Image::Image(const Image &other) : QObject(), d(0)
+Image::Image(const Image &other) : TQObject(), d(0)
{
*this = other;
}
-Image::Image(const QDomNode &node) : QObject(), d(new Private)
+Image::Image(const TQDomNode &node) : TQObject(), d(new Private)
{
- QString elemText;
+ TQString elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("title"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("title"))).isNull())
d->title = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("url"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("url"))).isNull())
d->url = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("link"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("link"))).isNull())
d->link = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("description"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("description"))).isNull())
d->description = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("height"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("height"))).isNull())
d->height = elemText.toUInt();
- if (!(elemText = extractNode(node, QString::fromLatin1("width"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("width"))).isNull())
d->width = elemText.toUInt();
}
@@ -72,7 +72,7 @@ Image::~Image()
}
}
-QString Image::title() const
+TQString Image::title() const
{
return d->title;
}
@@ -87,7 +87,7 @@ const KURL &Image::link() const
return d->link;
}
-QString Image::description() const
+TQString Image::description() const
{
return d->description;
}
@@ -108,25 +108,25 @@ void Image::getPixmap()
if (d->pixmapBuffer)
return;
- d->pixmapBuffer = new QBuffer;
+ d->pixmapBuffer = new TQBuffer;
d->pixmapBuffer->open(IO_WriteOnly);
d->job = KIO::get(d->url, false, false);
- connect(d->job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- this, SLOT(slotData(KIO::Job *, const QByteArray &)));
- connect(d->job, SIGNAL(result(KIO::Job *)), this, SLOT(slotResult(KIO::Job *)));
+ connect(d->job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ this, TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));
+ connect(d->job, TQT_SIGNAL(result(KIO::Job *)), this, TQT_SLOT(slotResult(KIO::Job *)));
}
-void Image::slotData(KIO::Job *, const QByteArray &data)
+void Image::slotData(KIO::Job *, const TQByteArray &data)
{
d->pixmapBuffer->writeBlock(data.data(), data.size());
}
void Image::slotResult(KIO::Job *job)
{
- QPixmap pixmap;
+ TQPixmap pixmap;
if (!job->error())
- pixmap = QPixmap(d->pixmapBuffer->buffer());
+ pixmap = TQPixmap(d->pixmapBuffer->buffer());
emit gotPixmap(pixmap);
delete d->pixmapBuffer;
diff --git a/plugins/rssfeed/rss/image.h b/plugins/rssfeed/rss/image.h
index e9e65b1..f0a43ca 100644
--- a/plugins/rssfeed/rss/image.h
+++ b/plugins/rssfeed/rss/image.h
@@ -13,9 +13,9 @@
#include "global.h"
-#include <qobject.h>
+#include <tqobject.h>
-class QDomNode;
+class TQDomNode;
namespace KIO
{
@@ -31,9 +31,10 @@ namespace RSS
* is via Document::image().
* @see Document::image()
*/
- class Image : public QObject
+ class Image : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default constructor.
@@ -48,10 +49,10 @@ namespace RSS
/**
* Constructs an Image from a piece of RSS markup.
- * @param node A QDomNode which references the DOM leaf to be used
+ * @param node A TQDomNode which references the DOM leaf to be used
* for constructing the Image.
*/
- Image(const QDomNode &node);
+ Image(const TQDomNode &node);
/**
* Assignment operator.
@@ -83,10 +84,10 @@ namespace RSS
/**
* RSS 0.90 and upwards
- * @return The 'caption' of this image, or QString::null if no
+ * @return The 'caption' of this image, or TQString() if no
* caption is available.
*/
- QString title() const;
+ TQString title() const;
/**
* RSS 0.90 and upwards
@@ -112,11 +113,11 @@ namespace RSS
/**
* RSS 0.91 and upwards
* @return A description of what this picture shows, or
- * QString::null if no description is available. Useful for
+ * TQString() if no description is available. Useful for
* people who deactivated images but want or need to know what is
* shown.
*/
- QString description() const;
+ TQString description() const;
/**
* RSS 0.91 and upwards
@@ -125,7 +126,7 @@ namespace RSS
* this value to be between 1 and 400.
* '0' if this information isn't available. This is merely provided
* for completeness, you should not rely on this value but rather
- * check what height the QPixmap as returned by gotPixmap()
+ * check what height the TQPixmap as returned by gotPixmap()
* reports.
*/
unsigned int height() const;
@@ -136,7 +137,7 @@ namespace RSS
* default value is 88 pixels. The RSS 0.91 Specification requires
* this value to be between 1 and 144.
* This is merely provided for completeness, you should not rely
- * on this value but rather check what width the QPixmap as
+ * on this value but rather check what width the TQPixmap as
* returned by gotPixmap() reports.
*/
unsigned int width() const;
@@ -157,10 +158,10 @@ namespace RSS
* @param pixmap The pixmap as constructed from the data referenced
* by the URL returned by link().
*/
- void gotPixmap(const QPixmap &pixmap);
+ void gotPixmap(const TQPixmap &pixmap);
private slots:
- void slotData(KIO::Job *job, const QByteArray &data);
+ void slotData(KIO::Job *job, const TQByteArray &data);
void slotResult(KIO::Job *job);
private:
diff --git a/plugins/rssfeed/rss/loader.cpp b/plugins/rssfeed/rss/loader.cpp
index 9dfb50a..835a2e6 100644
--- a/plugins/rssfeed/rss/loader.cpp
+++ b/plugins/rssfeed/rss/loader.cpp
@@ -16,11 +16,11 @@
#include <kurl.h>
#include <kdebug.h>
-#include <qdom.h>
-#include <qbuffer.h>
-#include <qregexp.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqdom.h>
+#include <tqbuffer.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
using namespace RSS;
@@ -45,7 +45,7 @@ struct FileRetriever::Private
delete buffer;
}
- QBuffer *buffer;
+ TQBuffer *buffer;
int lastError;
KIO::Job *job;
};
@@ -72,7 +72,7 @@ void FileRetriever::retrieveData(const KURL &url)
if (d->buffer)
return;
- d->buffer = new QBuffer;
+ d->buffer = new TQBuffer;
d->buffer->open(IO_WriteOnly);
KURL u=url;
@@ -83,13 +83,13 @@ void FileRetriever::retrieveData(const KURL &url)
d->job = KIO::get(u, !m_useCache, false);
- QTimer::singleShot(1000*90, this, SLOT(slotTimeout()));
+ TQTimer::singleShot(1000*90, this, TQT_SLOT(slotTimeout()));
- connect(d->job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- SLOT(slotData(KIO::Job *, const QByteArray &)));
- connect(d->job, SIGNAL(result(KIO::Job *)), SLOT(slotResult(KIO::Job *)));
- connect(d->job, SIGNAL(permanentRedirection(KIO::Job *, const KURL &, const KURL &)),
- SLOT(slotPermanentRedirection(KIO::Job *, const KURL &, const KURL &)));
+ connect(d->job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));
+ connect(d->job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *)));
+ connect(d->job, TQT_SIGNAL(permanentRedirection(KIO::Job *, const KURL &, const KURL &)),
+ TQT_SLOT(slotPermanentRedirection(KIO::Job *, const KURL &, const KURL &)));
}
void FileRetriever::slotTimeout()
@@ -101,7 +101,7 @@ void FileRetriever::slotTimeout()
d->lastError = KIO::ERR_SERVER_TIMEOUT;
- emit dataRetrieved(QByteArray(), false);
+ emit dataRetrieved(TQByteArray(), false);
}
int FileRetriever::errorCode() const
@@ -109,14 +109,14 @@ int FileRetriever::errorCode() const
return d->lastError;
}
-void FileRetriever::slotData(KIO::Job *, const QByteArray &data)
+void FileRetriever::slotData(KIO::Job *, const TQByteArray &data)
{
d->buffer->writeBlock(data.data(), data.size());
}
void FileRetriever::slotResult(KIO::Job *job)
{
- QByteArray data = d->buffer->buffer();
+ TQByteArray data = d->buffer->buffer();
data.detach();
delete d->buffer;
@@ -155,7 +155,7 @@ struct OutputRetriever::Private
}
KShellProcess *process;
- QBuffer *buffer;
+ TQBuffer *buffer;
int lastError;
};
@@ -175,14 +175,14 @@ void OutputRetriever::retrieveData(const KURL &url)
if (d->buffer || d->process)
return;
- d->buffer = new QBuffer;
+ d->buffer = new TQBuffer;
d->buffer->open(IO_WriteOnly);
d->process = new KShellProcess();
- connect(d->process, SIGNAL(processExited(KProcess *)),
- SLOT(slotExited(KProcess *)));
- connect(d->process, SIGNAL(receivedStdout(KProcess *, char *, int)),
- SLOT(slotOutput(KProcess *, char *, int)));
+ connect(d->process, TQT_SIGNAL(processExited(KProcess *)),
+ TQT_SLOT(slotExited(KProcess *)));
+ connect(d->process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
+ TQT_SLOT(slotOutput(KProcess *, char *, int)));
*d->process << url.path();
d->process->start(KProcess::NotifyOnExit, KProcess::Stdout);
}
@@ -202,7 +202,7 @@ void OutputRetriever::slotExited(KProcess *p)
if (!p->normalExit())
d->lastError = p->exitStatus();
- QByteArray data = d->buffer->buffer();
+ TQByteArray data = d->buffer->buffer();
data.detach();
delete d->buffer;
@@ -237,10 +237,10 @@ Loader *Loader::create()
return new Loader;
}
-Loader *Loader::create(QObject *object, const char *slot)
+Loader *Loader::create(TQObject *object, const char *slot)
{
Loader *loader = create();
- connect(loader, SIGNAL(loadingComplete(Loader *, Document, Status)),
+ connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, tqStatus)),
object, slot);
return loader;
}
@@ -262,8 +262,8 @@ void Loader::loadFrom(const KURL &url, DataRetriever *retriever)
d->url=url;
d->retriever = retriever;
- connect(d->retriever, SIGNAL(dataRetrieved(const QByteArray &, bool)),
- this, SLOT(slotRetrieverDone(const QByteArray &, bool)));
+ connect(d->retriever, TQT_SIGNAL(dataRetrieved(const TQByteArray &, bool)),
+ this, TQT_SLOT(slotRetrieverDone(const TQByteArray &, bool)));
d->retriever->retrieveData(url);
}
@@ -281,7 +281,7 @@ void Loader::abort()
delete d->retriever;
d->retriever=NULL;
}
- emit loadingComplete(this, QDomDocument(), Aborted);
+ emit loadingComplete(this, TQDomDocument(), Aborted);
delete this;
}
@@ -292,7 +292,7 @@ const KURL &Loader::discoveredFeedURL() const
#include <kdebug.h>
-void Loader::slotRetrieverDone(const QByteArray &data, bool success)
+void Loader::slotRetrieverDone(const TQByteArray &data, bool success)
{
d->lastError = d->retriever->errorCode();
@@ -300,29 +300,29 @@ void Loader::slotRetrieverDone(const QByteArray &data, bool success)
d->retriever = NULL;
Document rssDoc;
- Status status = Success;
+ tqStatus status = Success;
if (success) {
- QDomDocument doc;
+ TQDomDocument doc;
/* Some servers insert whitespace before the <?xml...?> declaration.
- * QDom doesn't tolerate that (and it's right, that's invalid XML),
+ * TQDom doesn't tolerate that (and it's right, that's invalid XML),
* so we strip that.
*/
const char *charData = data.data();
int len = data.count();
- while (len && QChar(*charData).isSpace()) {
+ while (len && TQChar(*charData).isSpace()) {
--len;
++charData;
}
- if ( len > 3 && QChar(*charData) == QChar(0357) ) { // 0357 0273 0277
+ if ( len > 3 && TQChar(*charData) == TQChar(0357) ) { // 0357 0273 0277
len -= 3;
charData += 3;
}
- QByteArray tmpData;
+ TQByteArray tmpData;
tmpData.setRawData(charData, len);
if (doc.setContent(tmpData))
@@ -349,24 +349,24 @@ void Loader::slotRetrieverDone(const QByteArray &data, bool success)
delete this;
}
-void Loader::discoverFeeds(const QByteArray &data)
+void Loader::discoverFeeds(const TQByteArray &data)
{
- QString str = QString(data).simplifyWhiteSpace();
- QString s2;
- //QTextStream ts( &str, IO_WriteOnly );
+ TQString str = TQString(data).simplifyWhiteSpace();
+ TQString s2;
+ //TQTextStream ts( &str, IO_WriteOnly );
//ts << data.data();
// "<[\\s]link[^>]*rel[\\s]=[\\s]\\\"[\\s]alternate[\\s]\\\"[^>]*>"
// "type[\\s]=[\\s]\\\"application/rss+xml\\\""
// "href[\\s]=[\\s]\\\"application/rss+xml\\\""
- QRegExp rx( "(?:REL)[^=]*=[^sAa]*(?:service.feed|ALTERNATE)[\\s]*[^s][^s](?:[^>]*)(?:HREF)[^=]*=[^A-Z0-9-_~,./$]*([^'\">\\s]*)", false);
+ TQRegExp rx( "(?:REL)[^=]*=[^sAa]*(?:service.feed|ALTERNATE)[\\s]*[^s][^s](?:[^>]*)(?:HREF)[^=]*=[^A-Z0-9-_~,./$]*([^'\">\\s]*)", false);
if (rx.search(str)!=-1)
s2=rx.cap(1);
else{
// does not support Atom/RSS autodiscovery.. try finding feeds by brute force....
int pos=0;
- QStringList feeds;
- QString host=d->url.host();
+ TQStringList feeds;
+ TQString host=d->url.host();
rx.setPattern("(?:<A )[^H]*(?:HREF)[^=]*=[^A-Z0-9-_~,./]*([^'\">\\s]*)");
while ( pos >= 0 ) {
pos = rx.search( str, pos );
@@ -381,7 +381,7 @@ void Loader::discoverFeeds(const QByteArray &data)
s2=feeds.first();
KURL testURL;
// loop through, prefer feeds on same host
- for ( QStringList::Iterator it = feeds.begin(); it != feeds.end(); ++it ) {
+ for ( TQStringList::Iterator it = feeds.begin(); it != feeds.end(); ++it ) {
testURL=*it;
if (testURL.host()==host)
{
diff --git a/plugins/rssfeed/rss/loader.h b/plugins/rssfeed/rss/loader.h
index fb06634..438ebaf 100644
--- a/plugins/rssfeed/rss/loader.h
+++ b/plugins/rssfeed/rss/loader.h
@@ -15,7 +15,7 @@
class KURL;
-#include <qobject.h>
+#include <tqobject.h>
namespace KIO
{
@@ -32,9 +32,10 @@ namespace RSS
* a new retrieval algorithm which can then be plugged into the RSS loader.
* @see Loader, FileRetriever, OutputRetriever
*/
- class DataRetriever : public QObject
+ class DataRetriever : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default constructor.
@@ -75,7 +76,7 @@ namespace RSS
* wrong and that the data parameter might contain no or invalid
* data.
*/
- void dataRetrieved(const QByteArray &data, bool success);
+ void dataRetrieved(const TQByteArray &data, bool success);
private:
DataRetriever(const DataRetriever &other);
@@ -89,6 +90,7 @@ namespace RSS
class FileRetriever : public DataRetriever
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default constructor.
@@ -135,7 +137,7 @@ namespace RSS
void slotTimeout();
private slots:
- void slotData(KIO::Job *job, const QByteArray &data);
+ void slotData(KIO::Job *job, const TQByteArray &data);
void slotResult(KIO::Job *job);
void slotPermanentRedirection(KIO::Job *job, const KURL &fromUrl,
const KURL &toUrl);
@@ -158,6 +160,7 @@ namespace RSS
class OutputRetriever : public DataRetriever
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default constructor.
@@ -206,8 +209,8 @@ namespace RSS
*
* \code
* Loader *loader = Loader::create();
- * connect(loader, SIGNAL(loadingComplete(Loader *, Document, Status)),
- * this, SLOT(slotLoadingComplete(Loader *, Document, Status)));
+ * connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, tqStatus)),
+ * this, TQT_SLOT(slotLoadingComplete(Loader *, Document, tqStatus)));
* loader->loadFrom("http://www.blah.org/foobar.rdf", new FileRetriever);
* \endcode
*
@@ -231,7 +234,7 @@ namespace RSS
* 'slotLoadingComplete' method might look like this:
*
* \code
- * void MyClass::slotLoadingComplete(Loader *loader, Document doc, Status status)
+ * void MyClass::slotLoadingComplete(Loader *loader, Document doc, tqStatus status)
* {
* // Note that Loader::~Loader() is private, so you cannot delete Loader instances.
* // You don't need to do that anyway since Loader instances delete themselves.
@@ -239,7 +242,7 @@ namespace RSS
* if (status != RSS::Success)
* return;
*
- * QString title = doc.title();
+ * TQString title = doc.title();
* // do whatever you want with the information.
* }
* \endcode
@@ -249,9 +252,10 @@ namespace RSS
* loadingComplete signal goes out of scope. This is e.g. the case if you
* intend to call getPixmap() on Document::image()!
*/
- class Loader : public QObject
+ class Loader : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
friend class someClassWhichDoesNotExist;
public:
/**
@@ -268,10 +272,10 @@ namespace RSS
* Convenience method. Does the same as the above method except that
* it also does the job of connecting the loadingComplete() signal
* to the given slot for you.
- * @param object A QObject which features the specified slot
+ * @param object A TQObject which features the specified slot
* @param slot Which slot to connect to.
*/
- static Loader *create(QObject *object, const char *slot);
+ static Loader *create(TQObject *object, const char *slot);
/**
* Loads the RSS file referenced by the given URL using the
@@ -316,19 +320,19 @@ namespace RSS
* the case if you intend to call getPixmap() on Document::image()!
* @param status A status byte telling whether there were any problems
* while retrieving or parsing the data.
- * @see Document, Status
+ * @see Document, tqStatus
*/
- void loadingComplete(Loader *loader, Document doc, Status status);
+ void loadingComplete(Loader *loader, Document doc, tqStatus status);
private slots:
- void slotRetrieverDone(const QByteArray &data, bool success);
+ void slotRetrieverDone(const TQByteArray &data, bool success);
private:
Loader();
Loader(const Loader &other);
Loader &operator=(const Loader &other);
~Loader();
- void discoverFeeds(const QByteArray &data);
+ void discoverFeeds(const TQByteArray &data);
struct Private;
Private *d;
diff --git a/plugins/rssfeed/rss/testlibrss.cpp b/plugins/rssfeed/rss/testlibrss.cpp
index 5d98bba..571717a 100644
--- a/plugins/rssfeed/rss/testlibrss.cpp
+++ b/plugins/rssfeed/rss/testlibrss.cpp
@@ -16,15 +16,15 @@ static const KCmdLineOptions options[] =
};
-void Tester::test( const QString &url )
+void Tester::test( const TQString &url )
{
Loader *loader = Loader::create();
- connect( loader, SIGNAL( loadingComplete( Loader *, Document, Status ) ),
- this, SLOT( slotLoadingComplete( Loader *, Document, Status ) ) );
+ connect( loader, TQT_SIGNAL( loadingComplete( Loader *, Document, tqStatus ) ),
+ this, TQT_SLOT( slotLoadingComplete( Loader *, Document, tqStatus ) ) );
loader->loadFrom( url, new FileRetriever );
}
-void Tester::slotLoadingComplete( Loader *loader, Document doc, Status status )
+void Tester::slotLoadingComplete( Loader *loader, Document doc, tqStatus status )
{
if ( status == Success )
{
diff --git a/plugins/rssfeed/rss/testlibrss.h b/plugins/rssfeed/rss/testlibrss.h
index c65fa3b..18e1832 100644
--- a/plugins/rssfeed/rss/testlibrss.h
+++ b/plugins/rssfeed/rss/testlibrss.h
@@ -1,7 +1,7 @@
#ifndef TESTLIBRSS_H
#define TESTLIBRSS_H
-#include <qobject.h>
+#include <tqobject.h>
#include "loader.h"
#include "document.h"
@@ -10,16 +10,17 @@
using RSS::Loader;
using RSS::Document;
-using RSS::Status;
+using RSS::tqStatus;
-class Tester : public QObject
+class Tester : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- void test( const QString &url );
+ void test( const TQString &url );
private slots:
- void slotLoadingComplete( Loader *loader, Document doc, Status status );
+ void slotLoadingComplete( Loader *loader, Document doc, tqStatus status );
};
#endif
diff --git a/plugins/rssfeed/rss/textinput.cpp b/plugins/rssfeed/rss/textinput.cpp
index 432b773..a12442f 100644
--- a/plugins/rssfeed/rss/textinput.cpp
+++ b/plugins/rssfeed/rss/textinput.cpp
@@ -13,15 +13,15 @@
#include <kurl.h>
-#include <qdom.h>
+#include <tqdom.h>
using namespace RSS;
struct TextInput::Private : public Shared
{
- QString title;
- QString description;
- QString name;
+ TQString title;
+ TQString description;
+ TQString name;
KURL link;
};
@@ -34,17 +34,17 @@ TextInput::TextInput(const TextInput &other) : d(0)
*this = other;
}
-TextInput::TextInput(const QDomNode &node) : d(new Private)
+TextInput::TextInput(const TQDomNode &node) : d(new Private)
{
- QString elemText;
+ TQString elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("title"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("title"))).isNull())
d->title = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("description"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("description"))).isNull())
d->description = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("name"))))
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("name"))))
d->name = elemText;
- if (!(elemText = extractNode(node, QString::fromLatin1("link"))).isNull())
+ if (!(elemText = extractNode(node, TQString::tqfromLatin1("link"))).isNull())
d->link = elemText;
}
@@ -54,17 +54,17 @@ TextInput::~TextInput()
delete d;
}
-QString TextInput::title() const
+TQString TextInput::title() const
{
return d->title;
}
-QString TextInput::description() const
+TQString TextInput::description() const
{
return d->description;
}
-QString TextInput::name() const
+TQString TextInput::name() const
{
return d->name;
}
diff --git a/plugins/rssfeed/rss/textinput.h b/plugins/rssfeed/rss/textinput.h
index dd13c42..cbf5bdb 100644
--- a/plugins/rssfeed/rss/textinput.h
+++ b/plugins/rssfeed/rss/textinput.h
@@ -15,8 +15,8 @@
class KURL;
-class QDomNode;
-class QString;
+class TQDomNode;
+class TQString;
namespace RSS
{
@@ -43,10 +43,10 @@ namespace RSS
/**
* Constructs a TextInput from a piece of RSS markup.
- * @param node A QDomNode which references the DOM leaf to be used
+ * @param node A TQDomNode which references the DOM leaf to be used
* for constructing the TextInput.
*/
- TextInput(const QDomNode &node);
+ TextInput(const TQDomNode &node);
/**
* Assignment operator.
@@ -79,25 +79,25 @@ namespace RSS
/**
* RSS 0.90 and upwards
* @return The title (often a label to be used for the input field)
- * of the text input, or QString::null if no title is available.
+ * of the text input, or TQString() if no title is available.
*/
- QString title() const;
+ TQString title() const;
/**
* RSS 0.90 and upwards
* @return The description (usually used as a tooltip which appears
* if the mouse hovers above the input field for a short time) of
- * the text input, or QString::null if no description is
+ * the text input, or TQString() if no description is
* available.
*/
- QString description() const;
+ TQString description() const;
/**
* RSS 0.90 and upwards
* @return The name of the text input (what's this for?) of the
- * text input, or QString::null, if no name is available.
+ * text input, or TQString(), if no name is available.
*/
- QString name() const;
+ TQString name() const;
/**
* RSS 0.90 and upwards
diff --git a/plugins/rssfeed/rss/tools_p.cpp b/plugins/rssfeed/rss/tools_p.cpp
index c1ebbc9..51fcbf5 100644
--- a/plugins/rssfeed/rss/tools_p.cpp
+++ b/plugins/rssfeed/rss/tools_p.cpp
@@ -11,39 +11,39 @@
#include "tools_p.h"
#include <krfcdate.h>
-#include <qdom.h>
+#include <tqdom.h>
-time_t RSS::parseISO8601Date(const QString &s)
+time_t RSS::parseISO8601Date(const TQString &s)
{
// do some sanity check: 26-12-2004T00:00+00:00 is parsed to epoch+1 in the KRFCDate, which is wrong. So let's check if the date begins with YYYY -fo
if (s.stripWhiteSpace().left(4).toInt() < 1000)
return 0; // error
// FIXME: imho this is done in KRFCDate::parseDateISO8601() automatically, so we could omit it? -fo
- if (s.find('T') != -1)
+ if (s.tqfind('T') != -1)
return KRFCDate::parseDateISO8601(s);
else
return KRFCDate::parseDateISO8601(s + "T12:00:00");
}
-QString RSS::extractNode(const QDomNode &parent, const QString &elemName, bool isInlined)
+TQString RSS::extractNode(const TQDomNode &tqparent, const TQString &elemName, bool isInlined)
{
- QDomNode node = parent.namedItem(elemName);
+ TQDomNode node = tqparent.namedItem(elemName);
if (node.isNull())
- return QString::null;
+ return TQString();
- QString result = node.toElement().text();
+ TQString result = node.toElement().text();
- bool hasPre = result.contains("<pre>",false);
- bool hasHtml = hasPre || result.contains("<"); // FIXME: test if we have html, should be more clever -> regexp
+ bool hasPre = result.tqcontains("<pre>",false);
+ bool hasHtml = hasPre || result.tqcontains("<"); // FIXME: test if we have html, should be more clever -> regexp
if(!isInlined && !hasHtml) // perform nl2br if not a inline elt and it has no html elts
- result = result = result.replace(QChar('\n'), "<br />");
+ result = result = result.tqreplace(TQChar('\n'), "<br />");
if(!hasPre) // strip white spaces if no <pre>
result = result.simplifyWhiteSpace();
if (result.isEmpty())
- return QString::null;
+ return TQString();
return result;
}
diff --git a/plugins/rssfeed/rss/tools_p.h b/plugins/rssfeed/rss/tools_p.h
index 5076004..1f77171 100644
--- a/plugins/rssfeed/rss/tools_p.h
+++ b/plugins/rssfeed/rss/tools_p.h
@@ -13,8 +13,8 @@
#include <time.h>
-class QDomNode;
-class QString;
+class TQDomNode;
+class TQString;
namespace RSS
{
@@ -26,8 +26,8 @@ namespace RSS
unsigned int count;
};
- QString extractNode(const QDomNode &parent, const QString &elemName, bool isInlined=true);
- time_t parseISO8601Date(const QString &s);
+ TQString extractNode(const TQDomNode &tqparent, const TQString &elemName, bool isInlined=true);
+ time_t parseISO8601Date(const TQString &s);
}
#endif // LIBRSS_TOOLS_P_H
diff --git a/plugins/rssfeed/rssarticle.cpp b/plugins/rssfeed/rssarticle.cpp
index afc932d..a73b3c9 100644
--- a/plugins/rssfeed/rssarticle.cpp
+++ b/plugins/rssfeed/rssarticle.cpp
@@ -43,7 +43,7 @@ namespace kt
*this = other;
}
- RssArticle::RssArticle(QString title, KURL link, QString description, QDateTime pubDate, QString guid, int downloaded)
+ RssArticle::RssArticle(TQString title, KURL link, TQString description, TQDateTime pubDate, TQString guid, int downloaded)
{
m_title = title;
m_link = link;
@@ -74,20 +74,20 @@ namespace kt
return m_guid==other.guid();
}
- QDataStream &operator<<( QDataStream &out, const RssArticle &article )
+ TQDataStream &operator<<( TQDataStream &out, const RssArticle &article )
{
out << article.title() << article.link() << article.description() << article.pubDate() << article.guid() << article.downloaded();
return out;
}
- QDataStream &operator>>( QDataStream &in, RssArticle &article )
+ TQDataStream &operator>>( TQDataStream &in, RssArticle &article )
{
KURL link;
- QString title;
- QString description;
- QDateTime pubDate;
- QString guid;
+ TQString title;
+ TQString description;
+ TQDateTime pubDate;
+ TQString guid;
int downloaded;
in >> title >> link >> description >> pubDate >> guid >> downloaded;
article = RssArticle(title, link, description, pubDate, guid, downloaded);
diff --git a/plugins/rssfeed/rssarticle.h b/plugins/rssfeed/rssarticle.h
index 4d8c536..e727456 100644
--- a/plugins/rssfeed/rssarticle.h
+++ b/plugins/rssfeed/rssarticle.h
@@ -20,9 +20,9 @@
#ifndef RSSARTICLE_H
#define RSSARTICLE_H
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qdatastream.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqdatastream.h>
#include <kurl.h>
@@ -41,7 +41,7 @@ namespace kt
{
public:
- typedef QValueList<RssArticle> List;
+ typedef TQValueList<RssArticle> List;
/**
* Default constructor.
@@ -51,31 +51,31 @@ namespace kt
RssArticle(const RssArticle &other);
RssArticle &operator=(const RssArticle &other);
bool operator==(const RssArticle &other) const;
- RssArticle(QString title, KURL link, QString description, QDateTime pubDate, QString guid, int downloaded = 0);
+ RssArticle(TQString title, KURL link, TQString description, TQDateTime pubDate, TQString guid, int downloaded = 0);
- void setTitle(const QString& title) { m_title=title; }
+ void setTitle(const TQString& title) { m_title=title; }
void setDownloaded(const int downloaded) { m_downloaded=downloaded; }
- QString title() const { return m_title; }
+ TQString title() const { return m_title; }
KURL link() const { return m_link; }
- QString description() const { return m_description; }
- QDateTime pubDate() const { return m_pubDate; }
- QString guid() const { return m_guid; }
+ TQString description() const { return m_description; }
+ TQDateTime pubDate() const { return m_pubDate; }
+ TQString guid() const { return m_guid; }
int downloaded() const { return m_downloaded; }
~RssArticle();
private:
KURL m_link;
- QString m_title;
- QString m_description;
- QDateTime m_pubDate;
- QString m_guid;
+ TQString m_title;
+ TQString m_description;
+ TQDateTime m_pubDate;
+ TQString m_guid;
int m_downloaded;
};
- QDataStream &operator<<( QDataStream &out, const RssArticle &article );
- QDataStream &operator>>( QDataStream &in, RssArticle &article );
+ TQDataStream &operator<<( TQDataStream &out, const RssArticle &article );
+ TQDataStream &operator>>( TQDataStream &in, RssArticle &article );
}
diff --git a/plugins/rssfeed/rssfeed.cpp b/plugins/rssfeed/rssfeed.cpp
index 0d1244b..f5b4c64 100644
--- a/plugins/rssfeed/rssfeed.cpp
+++ b/plugins/rssfeed/rssfeed.cpp
@@ -23,9 +23,9 @@
#include <kstandarddirs.h>
#include <krfcdate.h>
#include <kio/netaccess.h>
-#include <qfile.h>
-#include <qapplication.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqapplication.h>
+#include <tqdir.h>
namespace kt
{
@@ -35,7 +35,7 @@ namespace kt
if (m_active)
{
refreshFeed();
- refreshTimer.start(QTime().msecsTo(m_autoRefresh));
+ refreshTimer.start(TQTime().msecsTo(m_autoRefresh));
}
else
{
@@ -48,13 +48,13 @@ namespace kt
feedLoading = false;
loadArticles();
- connect(&refreshTimer, SIGNAL(timeout()), this, SLOT( refreshFeed() ) );
- connect(this, SIGNAL(articlesChanged(const RssArticle::List&)), this, SLOT( saveArticles() ) );
+ connect(&refreshTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT( refreshFeed() ) );
+ connect(this, TQT_SIGNAL(articlesChanged(const RssArticle::List&)), this, TQT_SLOT( saveArticles() ) );
startFeed();
}
- RssFeed::RssFeed(QObject * parent) : QObject(parent)
+ RssFeed::RssFeed(TQObject * tqparent) : TQObject(tqparent)
{
m_active = false;
m_articleAge = 365;
@@ -64,7 +64,7 @@ namespace kt
initialize();
}
- RssFeed::RssFeed(KURL feedUrl, QString title, bool active, int articleAge, bool ignoreTTL, QTime autoRefresh )
+ RssFeed::RssFeed(KURL feedUrl, TQString title, bool active, int articleAge, bool ignoreTTL, TQTime autoRefresh )
{
m_feedUrl = feedUrl;
m_title = title;
@@ -76,7 +76,7 @@ namespace kt
initialize();
}
- RssFeed::RssFeed(const RssFeed &other) : QObject()
+ RssFeed::RssFeed(const RssFeed &other) : TQObject()
{
*this = other;
}
@@ -109,7 +109,7 @@ namespace kt
}
}
- void RssFeed::setFeedUrl( const QString& url )
+ void RssFeed::setFeedUrl( const TQString& url )
{
if (m_feedUrl != url)
{
@@ -146,7 +146,7 @@ namespace kt
}
}
- void RssFeed::setTitle( const QString& title )
+ void RssFeed::setTitle( const TQString& title )
{
if (m_title != title)
{
@@ -155,14 +155,14 @@ namespace kt
}
}
- void RssFeed::setAutoRefresh( const QTime& autoRefresh )
+ void RssFeed::setAutoRefresh( const TQTime& autoRefresh )
{
if (m_autoRefresh != autoRefresh)
{
m_autoRefresh = autoRefresh;
if (m_active)
{
- refreshTimer.changeInterval(QTime().msecsTo(m_autoRefresh));
+ refreshTimer.changeInterval(TQTime().msecsTo(m_autoRefresh));
}
emit autoRefreshChanged(autoRefresh);
@@ -178,25 +178,25 @@ namespace kt
}
}
- QString RssFeed::getFilename()
+ TQString RssFeed::getFilename()
{
- QDir directory;
+ TQDir directory;
directory.mkdir(KGlobal::dirs()->saveLocation("data","ktorrent") + "rssfeeds");
- return KGlobal::dirs()->saveLocation("data","ktorrent") + "rssfeeds/" + m_feedUrl.prettyURL(-1).replace("/", "_").replace(":", "_") + ".ktr";
+ return KGlobal::dirs()->saveLocation("data","ktorrent") + "rssfeeds/" + m_feedUrl.prettyURL(-1).tqreplace("/", "_").tqreplace(":", "_") + ".ktr";
}
void RssFeed::loadArticles()
{
- QString filename = getFilename();
+ TQString filename = getFilename();
//load articles from disk
- QFile file(filename);
+ TQFile file(filename);
if (file.exists())
{
file.open( IO_ReadOnly );
- QDataStream in(&file);
+ TQDataStream in(&file);
in >> m_articles;
emit articlesChanged( m_articles );
@@ -205,13 +205,13 @@ namespace kt
void RssFeed::saveArticles()
{
- QString filename = getFilename();
+ TQString filename = getFilename();
//load articles from disk
- QFile file(filename);
+ TQFile file(filename);
file.open( IO_WriteOnly );
- QDataStream out(&file);
+ TQDataStream out(&file);
out << m_articles;
}
@@ -223,7 +223,7 @@ namespace kt
RssArticle::List::iterator it;
for ( it = m_articles.begin(); it != m_articles.end(); )
{
- if ((*it).pubDate().daysTo(QDateTime::currentDateTime()) > m_articleAge)
+ if ((*it).pubDate().daysTo(TQDateTime::tqcurrentDateTime()) > m_articleAge)
{
it = m_articles.erase(it);
removed = true;
@@ -254,12 +254,12 @@ namespace kt
feedLoading = true;
cleanArticles();
Loader * feedLoader = Loader::create();
- connect( feedLoader, SIGNAL( loadingComplete( Loader *, Document, Status ) ),
- this, SLOT( feedLoaded( Loader *, Document, Status ) ) );
+ connect( feedLoader, TQT_SIGNAL( loadingComplete( Loader *, Document, tqStatus ) ),
+ this, TQT_SLOT( feedLoaded( Loader *, Document, tqStatus ) ) );
feedLoader->loadFrom( m_feedUrl, new FileRetriever );
}
- void RssFeed::feedLoaded(Loader *feedLoader, Document doc, Status status)
+ void RssFeed::feedLoaded(Loader *feedLoader, Document doc, tqStatus status)
{
feedLoading = false;
@@ -267,7 +267,7 @@ namespace kt
{
bool added = false;
- if (m_title.isEmpty() || m_title == QString("New"))
+ if (m_title.isEmpty() || m_title == TQString("New"))
{
setTitle(doc.title());
emit updateTitle(doc.title());
@@ -277,11 +277,11 @@ namespace kt
{
if (doc.ttl() < 0)
{
- setAutoRefresh(QTime().addSecs(3600));
+ setAutoRefresh(TQTime().addSecs(3600));
}
else
{
- setAutoRefresh(QTime().addSecs(doc.ttl() * 60));
+ setAutoRefresh(TQTime().addSecs(doc.ttl() * 60));
}
}
@@ -290,7 +290,7 @@ namespace kt
for (int i=doc.articles().count()-1; i>=0; i--)
{
curArticle = doc.articles()[i];
- if (curArticle.pubDate().daysTo(QDateTime::currentDateTime()) < m_articleAge && !m_articles.contains(curArticle))
+ if (curArticle.pubDate().daysTo(TQDateTime::tqcurrentDateTime()) < m_articleAge && !m_articles.tqcontains(curArticle))
{
m_articles.prepend(curArticle);
emit scanRssArticle(curArticle);
@@ -306,13 +306,13 @@ namespace kt
qDebug( "There was and error loading the feed\n");
}
- disconnect( feedLoader, SIGNAL( loadingComplete( Loader *, Document, Status ) ),
- this, SLOT( feedLoaded( Loader *, Document, Status ) ) );
+ disconnect( feedLoader, TQT_SIGNAL( loadingComplete( Loader *, Document, tqStatus ) ),
+ this, TQT_SLOT( feedLoaded( Loader *, Document, tqStatus ) ) );
feedLoader->deleteLater();
}
- void RssFeed::setDownloaded(QString link, int downloaded)
+ void RssFeed::setDownloaded(TQString link, int downloaded)
{
bool changed = false;
@@ -332,21 +332,21 @@ namespace kt
}
}
- QDataStream &operator<<( QDataStream &out, const RssFeed &feed )
+ TQDataStream &operator<<( TQDataStream &out, const RssFeed &feed )
{
out << feed.feedUrl() << feed.title() << int(feed.active()) << feed.articleAge() << int(feed.ignoreTTL()) << feed.autoRefresh();
return out;
}
- QDataStream &operator>>( QDataStream &in, RssFeed &feed )
+ TQDataStream &operator>>( TQDataStream &in, RssFeed &feed )
{
KURL feedUrl;
- QString title;
+ TQString title;
int active;
int articleAge;
int ignoreTTL;
- QTime autoRefresh;
+ TQTime autoRefresh;
in >> feedUrl >> title >> active >> articleAge >> ignoreTTL >> autoRefresh;
feed = RssFeed(feedUrl, title, active, articleAge, ignoreTTL, autoRefresh);
diff --git a/plugins/rssfeed/rssfeed.h b/plugins/rssfeed/rssfeed.h
index 9bcd2f7..279862b 100644
--- a/plugins/rssfeed/rssfeed.h
+++ b/plugins/rssfeed/rssfeed.h
@@ -20,12 +20,12 @@
#ifndef RSSFEED_H
#define RSSFEED_H
-#include <qobject.h>
-#include <qstring.h>
-#include <qdatetime.h>
-#include <qvaluelist.h>
-#include <qtimer.h>
-#include <qdatastream.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqdatetime.h>
+#include <tqvaluelist.h>
+#include <tqtimer.h>
+#include <tqdatastream.h>
#include <kurl.h>
@@ -45,16 +45,17 @@ namespace kt
*
*/
- class RssFeed : public QObject
+ class RssFeed : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default constructor.
*/
- RssFeed(QObject * parent = 0);
- RssFeed(KURL feedUrl, QString title = "", bool active = false, int articleAge = 3, bool ignoreTTL = false, QTime autoRefresh = QTime());
+ RssFeed(TQObject * tqparent = 0);
+ RssFeed(KURL feedUrl, TQString title = "", bool active = false, int articleAge = 3, bool ignoreTTL = false, TQTime autoRefresh = TQTime());
RssFeed(const RssFeed &other);
RssFeed &operator=(const RssFeed &other);
~RssFeed();
@@ -62,8 +63,8 @@ namespace kt
KURL feedUrl() const { return m_feedUrl; }
bool active() const { return m_active; }
int articleAge() const { return m_articleAge; }
- QString title() const { return m_title; }
- QTime autoRefresh() const { return m_autoRefresh; }
+ TQString title() const { return m_title; }
+ TQTime autoRefresh() const { return m_autoRefresh; }
bool ignoreTTL() const { return m_ignoreTTL; }
@@ -72,28 +73,28 @@ namespace kt
public slots:
void refreshFeed();
- void feedLoaded(Loader *feedLoader, Document doc, Status status);
+ void feedLoaded(Loader *feedLoader, Document doc, tqStatus status);
void clearArticles();
void setFeedUrl( const KURL& url );
- void setFeedUrl( const QString& url );
+ void setFeedUrl( const TQString& url );
void setActive( bool active );
void setArticleAge( int articleAge );
- void setTitle( const QString& title );
- void setAutoRefresh( const QTime& autoRefresh );
+ void setTitle( const TQString& title );
+ void setAutoRefresh( const TQTime& autoRefresh );
void setIgnoreTTL( bool ignoreTTL );
void saveArticles();
- void setDownloaded(QString link, int downloaded);
+ void setDownloaded(TQString link, int downloaded);
signals:
void feedUrlChanged( const KURL& url );
void activeChanged( bool active );
void articleAgeChanged( int articleAge );
- void titleChanged( const QString& title );
- void updateTitle( const QString& title );
- void autoRefreshChanged( const QTime& autoRefresh );
+ void titleChanged( const TQString& title );
+ void updateTitle( const TQString& title );
+ void autoRefreshChanged( const TQTime& autoRefresh );
void ignoreTTLChanged( bool ignoreTTL );
void articlesChanged( const RssArticle::List& articles );
@@ -104,23 +105,23 @@ namespace kt
KURL m_feedUrl;
bool m_active;
int m_articleAge;
- QString m_title;
- QTime m_autoRefresh;
+ TQString m_title;
+ TQTime m_autoRefresh;
bool m_ignoreTTL;
RssArticle::List m_articles;
- QTimer refreshTimer;
+ TQTimer refreshTimer;
bool feedLoading;
- QString getFilename();
+ TQString getFilename();
void initialize();
void startFeed();
void cleanArticles();
void loadArticles();
};
- QDataStream &operator<<( QDataStream &out, const RssFeed &feed );
- QDataStream &operator>>( QDataStream &in, RssFeed &feed );
+ TQDataStream &operator<<( TQDataStream &out, const RssFeed &feed );
+ TQDataStream &operator>>( TQDataStream &in, RssFeed &feed );
}
diff --git a/plugins/rssfeed/rssfeedmanager.cpp b/plugins/rssfeed/rssfeedmanager.cpp
index 106ca0f..6646f06 100644
--- a/plugins/rssfeed/rssfeedmanager.cpp
+++ b/plugins/rssfeed/rssfeedmanager.cpp
@@ -28,19 +28,19 @@
// #include <kmimetype.h>
#include <kmessagebox.h>
-#include <qstring.h>
-#include <qobject.h>
-#include <qfile.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
-#include <qlineedit.h>
+#include <tqlineedit.h>
#include <kurlrequester.h>
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qdatetimeedit.h>
-#include <qtable.h>
-#include <qregexp.h>
-#include <qlayout.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqdatetimeedit.h>
+#include <tqtable.h>
+#include <tqregexp.h>
+#include <tqlayout.h>
#include <torrent/globals.h>
#include <util/log.h>
@@ -48,7 +48,7 @@
#include <interfaces/coreinterface.h>
-#include <qapplication.h>
+#include <tqapplication.h>
#include "../../libktorrent/torrent/bdecoder.h"
#include "../../libktorrent/torrent/bnode.h"
@@ -60,7 +60,7 @@ using namespace bt;
namespace kt
{
- RssFeedManager::RssFeedManager(CoreInterface* core, QWidget * parent) : RssFeedWidget(parent)
+ RssFeedManager::RssFeedManager(CoreInterface* core, TQWidget * tqparent) : RssFeedWidget(tqparent)
{
//Construct the manager
m_core = core;
@@ -75,7 +75,7 @@ namespace kt
feedArticles->setLeftMargin(0);
feedArticles->verticalHeader()->hide();
feedArticles->setNumCols(3);
- feedArticles->setColumnLabels(QStringList() << i18n("Title") << i18n("Description") << i18n("Link"));
+ feedArticles->setColumnLabels(TQStringList() << i18n("Title") << i18n("Description") << i18n("Link"));
feedArticles->horizontalHeader()->setStretchEnabled(true, 0);
feedArticles->hideColumn(1);
feedArticles->hideColumn(2);
@@ -84,7 +84,7 @@ namespace kt
filterMatches->setLeftMargin(0);
filterMatches->verticalHeader()->hide();
filterMatches->setNumCols(4);
- filterMatches->setColumnLabels(QStringList() << i18n("Season") << i18n("Episode") << i18n("Time") << i18n("Link"));
+ filterMatches->setColumnLabels(TQStringList() << i18n("Season") << i18n("Episode") << i18n("Time") << i18n("Link"));
filterMatches->setColumnWidth(0, 60);
filterMatches->setColumnWidth(1, 60);
filterMatches->setColumnWidth(2, 180);
@@ -94,37 +94,37 @@ namespace kt
loadFilterList();
//connect the buttons
- connect(newFeed, SIGNAL(clicked()), this, SLOT(addNewFeed() ) );
- connect(deleteFeed, SIGNAL(clicked()), this, SLOT(deleteSelectedFeed() ) );
+ connect(newFeed, TQT_SIGNAL(clicked()), this, TQT_SLOT(addNewFeed() ) );
+ connect(deleteFeed, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteSelectedFeed() ) );
- connect(newAcceptFilter, SIGNAL(clicked()), this, SLOT(addNewAcceptFilter() ) );
- connect(deleteAcceptFilter, SIGNAL(clicked()), this, SLOT(deleteSelectedAcceptFilter() ) );
+ connect(newAcceptFilter, TQT_SIGNAL(clicked()), this, TQT_SLOT(addNewAcceptFilter() ) );
+ connect(deleteAcceptFilter, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteSelectedAcceptFilter() ) );
- connect(newRejectFilter, SIGNAL(clicked()), this, SLOT(addNewRejectFilter() ) );
- connect(deleteRejectFilter, SIGNAL(clicked()), this, SLOT(deleteSelectedRejectFilter() ) );
+ connect(newRejectFilter, TQT_SIGNAL(clicked()), this, TQT_SLOT(addNewRejectFilter() ) );
+ connect(deleteRejectFilter, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteSelectedRejectFilter() ) );
//connect the changing of the active feed
- connect(feedlist, SIGNAL(selectionChanged()), this, SLOT(changedActiveFeed()) );
+ connect(feedlist, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(changedActiveFeed()) );
//connect the changing of the url to enable the refresh button
- connect(feedUrl, SIGNAL(textChanged(const QString &)), this, SLOT(changedFeedUrl()) );
+ connect(feedUrl, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(changedFeedUrl()) );
//connect the changing of the filters
- connect(acceptFilterList, SIGNAL(selectionChanged()), this, SLOT(changedActiveAcceptFilter()) );
- connect(rejectFilterList, SIGNAL(selectionChanged()), this, SLOT(changedActiveRejectFilter()) );
+ connect(acceptFilterList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(changedActiveAcceptFilter()) );
+ connect(rejectFilterList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(changedActiveRejectFilter()) );
//connect the selection and downloading of articles
- connect(feedArticles, SIGNAL(selectionChanged()), this, SLOT(changedArticleSelection()) );
- connect(downloadArticle, SIGNAL(clicked()), this, SLOT(downloadSelectedArticles()) );
+ connect(feedArticles, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(changedArticleSelection()) );
+ connect(downloadArticle, TQT_SIGNAL(clicked()), this, TQT_SLOT(downloadSelectedArticles()) );
//connect the selection, downloading and deletion of matches
- connect(filterMatches, SIGNAL(selectionChanged()), this, SLOT(changedMatchSelection()) );
- connect(downloadFilterMatch, SIGNAL(clicked()), this, SLOT(downloadSelectedMatches()) );
- connect(deleteFilterMatch, SIGNAL(clicked()), this, SLOT(deleteSelectedMatches()) );
+ connect(filterMatches, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(changedMatchSelection()) );
+ connect(downloadFilterMatch, TQT_SIGNAL(clicked()), this, TQT_SLOT(downloadSelectedMatches()) );
+ connect(deleteFilterMatch, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteSelectedMatches()) );
//connect the test text update to the slot
- connect(testText, SIGNAL(textChanged(const QString &)), this, SLOT(testTextChanged()) );
- connect(testTestText, SIGNAL(clicked()), this, SLOT(testFilter()) );
+ connect(testText, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(testTextChanged()) );
+ connect(testTestText, TQT_SIGNAL(clicked()), this, TQT_SLOT(testFilter()) );
changedActiveFeed();
changedActiveAcceptFilter();
@@ -138,7 +138,7 @@ namespace kt
void RssFeedManager::clearArticles()
{
- int pos = feeds.find((RssFeed *)sender());
+ int pos = feeds.tqfind((RssFeed *)sender());
if (pos >= 0)
{
@@ -159,65 +159,65 @@ namespace kt
void RssFeedManager::connectFeed(int index)
{
- connect(feedTitle, SIGNAL(textChanged(const QString &)), feeds.at(index), SLOT(setTitle(const QString &) ) );
- connect(feeds.at(index), SIGNAL(titleChanged(const QString &)), this, SLOT(setFeedTitle(const QString &) ) );
+ connect(feedTitle, TQT_SIGNAL(textChanged(const TQString &)), feeds.at(index), TQT_SLOT(setTitle(const TQString &) ) );
+ connect(feeds.at(index), TQT_SIGNAL(titleChanged(const TQString &)), this, TQT_SLOT(setFeedTitle(const TQString &) ) );
//url
- connect(feedUrl, SIGNAL(textChanged(const QString &)), feeds.at(index), SLOT(setFeedUrl(const QString&) ) );
- connect(feeds.at(index), SIGNAL(feedUrlChanged(const KURL&)), feedUrl, SLOT(setKURL(const KURL&) ) );
+ connect(feedUrl, TQT_SIGNAL(textChanged(const TQString &)), feeds.at(index), TQT_SLOT(setFeedUrl(const TQString&) ) );
+ connect(feeds.at(index), TQT_SIGNAL(feedUrlChanged(const KURL&)), feedUrl, TQT_SLOT(setKURL(const KURL&) ) );
//articleAge
- connect(feedArticleAge, SIGNAL(valueChanged(int)), feeds.at(index), SLOT(setArticleAge(int) ) );
- connect(feeds.at(index), SIGNAL(articleAgeChanged(int)), feedArticleAge, SLOT(setValue(int) ) );
+ connect(feedArticleAge, TQT_SIGNAL(valueChanged(int)), feeds.at(index), TQT_SLOT(setArticleAge(int) ) );
+ connect(feeds.at(index), TQT_SIGNAL(articleAgeChanged(int)), feedArticleAge, TQT_SLOT(setValue(int) ) );
//active
- connect(feedActive, SIGNAL(toggled(bool)), feeds.at(index), SLOT(setActive(bool) ) );
- connect(feeds.at(index), SIGNAL(activeChanged(bool)), feedActive, SLOT(setChecked(bool) ) );
+ connect(feedActive, TQT_SIGNAL(toggled(bool)), feeds.at(index), TQT_SLOT(setActive(bool) ) );
+ connect(feeds.at(index), TQT_SIGNAL(activeChanged(bool)), feedActive, TQT_SLOT(setChecked(bool) ) );
//autoRefresh
- connect(feedAutoRefresh, SIGNAL(valueChanged(const QTime&)), feeds.at(index), SLOT(setAutoRefresh(const QTime&) ) );
- connect(feeds.at(index), SIGNAL(autoRefreshChanged(const QTime&)), feedAutoRefresh, SLOT(setTime(const QTime&) ) );
+ connect(feedAutoRefresh, TQT_SIGNAL(valueChanged(const TQTime&)), feeds.at(index), TQT_SLOT(setAutoRefresh(const TQTime&) ) );
+ connect(feeds.at(index), TQT_SIGNAL(autoRefreshChanged(const TQTime&)), feedAutoRefresh, TQT_SLOT(setTime(const TQTime&) ) );
//ignoreTTL
- connect(feedIgnoreTTL, SIGNAL(toggled(bool)), feeds.at(index), SLOT(setIgnoreTTL(bool) ) );
- connect(feeds.at(index), SIGNAL(ignoreTTLChanged(bool)), feedIgnoreTTL, SLOT(setChecked(bool) ) );
+ connect(feedIgnoreTTL, TQT_SIGNAL(toggled(bool)), feeds.at(index), TQT_SLOT(setIgnoreTTL(bool) ) );
+ connect(feeds.at(index), TQT_SIGNAL(ignoreTTLChanged(bool)), feedIgnoreTTL, TQT_SLOT(setChecked(bool) ) );
//articles
- connect(feeds.at(index), SIGNAL(articlesChanged(const RssArticle::List&)), this, SLOT(updateArticles(const RssArticle::List&) ) );
+ connect(feeds.at(index), TQT_SIGNAL(articlesChanged(const RssArticle::List&)), this, TQT_SLOT(updateArticles(const RssArticle::List&) ) );
//connect the refresh button
- connect(refreshFeed, SIGNAL(clicked()), feeds.at(index), SLOT(refreshFeed()) );
+ connect(refreshFeed, TQT_SIGNAL(clicked()), feeds.at(index), TQT_SLOT(refreshFeed()) );
}
void RssFeedManager::disconnectFeed(int index)
{
- disconnect(feedTitle, SIGNAL(textChanged(const QString &)), feeds.at(index), SLOT(setTitle(const QString &) ) );
- disconnect(feeds.at(index), SIGNAL(titleChanged(const QString &)), this, SLOT(setFeedTitle(const QString &) ) );
+ disconnect(feedTitle, TQT_SIGNAL(textChanged(const TQString &)), feeds.at(index), TQT_SLOT(setTitle(const TQString &) ) );
+ disconnect(feeds.at(index), TQT_SIGNAL(titleChanged(const TQString &)), this, TQT_SLOT(setFeedTitle(const TQString &) ) );
//url
- disconnect(feedUrl, SIGNAL(textChanged(const QString &)), feeds.at(index), SLOT(setFeedUrl(const QString&) ) );
- disconnect(feeds.at(index), SIGNAL(feedUrlChanged(const KURL&)), feedUrl, SLOT(setKURL(const KURL&) ) );
+ disconnect(feedUrl, TQT_SIGNAL(textChanged(const TQString &)), feeds.at(index), TQT_SLOT(setFeedUrl(const TQString&) ) );
+ disconnect(feeds.at(index), TQT_SIGNAL(feedUrlChanged(const KURL&)), feedUrl, TQT_SLOT(setKURL(const KURL&) ) );
//articleAge
- disconnect(feedArticleAge, SIGNAL(valueChanged(int)), feeds.at(index), SLOT(setArticleAge(int) ) );
- disconnect(feeds.at(index), SIGNAL(articleAgeChanged(int)), feedArticleAge, SLOT(setValue(int) ) );
+ disconnect(feedArticleAge, TQT_SIGNAL(valueChanged(int)), feeds.at(index), TQT_SLOT(setArticleAge(int) ) );
+ disconnect(feeds.at(index), TQT_SIGNAL(articleAgeChanged(int)), feedArticleAge, TQT_SLOT(setValue(int) ) );
//active
- disconnect(feedActive, SIGNAL(toggled(bool)), feeds.at(index), SLOT(setActive(bool) ) );
- disconnect(feeds.at(index), SIGNAL(activeChanged(bool)), feedActive, SLOT(setChecked(bool) ) );
+ disconnect(feedActive, TQT_SIGNAL(toggled(bool)), feeds.at(index), TQT_SLOT(setActive(bool) ) );
+ disconnect(feeds.at(index), TQT_SIGNAL(activeChanged(bool)), feedActive, TQT_SLOT(setChecked(bool) ) );
//autoRefresh
- disconnect(feedAutoRefresh, SIGNAL(valueChanged(const QTime&)), feeds.at(index), SLOT(setAutoRefresh(const QTime&) ) );
- disconnect(feeds.at(index), SIGNAL(autoRefreshChanged(const QTime&)), feedAutoRefresh, SLOT(setTime(const QTime&) ) );
+ disconnect(feedAutoRefresh, TQT_SIGNAL(valueChanged(const TQTime&)), feeds.at(index), TQT_SLOT(setAutoRefresh(const TQTime&) ) );
+ disconnect(feeds.at(index), TQT_SIGNAL(autoRefreshChanged(const TQTime&)), feedAutoRefresh, TQT_SLOT(setTime(const TQTime&) ) );
//ignoreTTL
- disconnect(feedIgnoreTTL, SIGNAL(toggled(bool)), feeds.at(index), SLOT(setIgnoreTTL(bool) ) );
- disconnect(feeds.at(index), SIGNAL(ignoreTTLChanged(bool)), feedIgnoreTTL, SLOT(setChecked(bool) ) );
+ disconnect(feedIgnoreTTL, TQT_SIGNAL(toggled(bool)), feeds.at(index), TQT_SLOT(setIgnoreTTL(bool) ) );
+ disconnect(feeds.at(index), TQT_SIGNAL(ignoreTTLChanged(bool)), feedIgnoreTTL, TQT_SLOT(setChecked(bool) ) );
//articles
- disconnect(feeds.at(index), SIGNAL(articlesChanged(const RssArticle::List&)), this, SLOT(updateArticles(const RssArticle::List&) ) );
+ disconnect(feeds.at(index), TQT_SIGNAL(articlesChanged(const RssArticle::List&)), this, TQT_SLOT(updateArticles(const RssArticle::List&) ) );
- disconnect(refreshFeed, SIGNAL(clicked()), feeds.at(index), SLOT(refreshFeed()) );
+ disconnect(refreshFeed, TQT_SIGNAL(clicked()), feeds.at(index), TQT_SLOT(refreshFeed()) );
}
void RssFeedManager::connectFilter(int index, bool acceptFilter)
@@ -225,69 +225,69 @@ namespace kt
if (acceptFilter)
{
//title
- connect(filterTitle, SIGNAL(textChanged(const QString &)), acceptFilters.at(index), SLOT(setTitle(const QString &) ) );
- connect(acceptFilters.at(index), SIGNAL(titleChanged(const QString &)), this, SLOT(setFilterTitle(const QString &) ) );
+ connect(filterTitle, TQT_SIGNAL(textChanged(const TQString &)), acceptFilters.at(index), TQT_SLOT(setTitle(const TQString &) ) );
+ connect(acceptFilters.at(index), TQT_SIGNAL(titleChanged(const TQString &)), this, TQT_SLOT(setFilterTitle(const TQString &) ) );
//active
- connect(filterActive, SIGNAL(toggled(bool)), acceptFilters.at(index), SLOT(setActive(bool) ) );
- connect(acceptFilters.at(index), SIGNAL(activeChanged(bool)), filterActive, SLOT(setChecked(bool) ) );
+ connect(filterActive, TQT_SIGNAL(toggled(bool)), acceptFilters.at(index), TQT_SLOT(setActive(bool) ) );
+ connect(acceptFilters.at(index), TQT_SIGNAL(activeChanged(bool)), filterActive, TQT_SLOT(setChecked(bool) ) );
//regExps
- connect(filterRegExps, SIGNAL(changed()), this, SLOT(updateRegExps()) );
+ connect(filterRegExps, TQT_SIGNAL(changed()), this, TQT_SLOT(updateRegExps()) );
//series
- connect(filterSeries, SIGNAL(toggled(bool)), acceptFilters.at(index), SLOT(setSeries(bool) ) );
- connect(acceptFilters.at(index), SIGNAL(seriesChanged(bool)), filterSeries, SLOT(setChecked(bool) ) );
+ connect(filterSeries, TQT_SIGNAL(toggled(bool)), acceptFilters.at(index), TQT_SLOT(setSeries(bool) ) );
+ connect(acceptFilters.at(index), TQT_SIGNAL(seriesChanged(bool)), filterSeries, TQT_SLOT(setChecked(bool) ) );
//sansEpisode
- connect(filterSansEpisode, SIGNAL(toggled(bool)), acceptFilters.at(index), SLOT(setSansEpisode(bool) ) );
- connect(acceptFilters.at(index), SIGNAL(sansEpisodeChanged(bool)), filterSansEpisode, SLOT(setChecked(bool) ) );
+ connect(filterSansEpisode, TQT_SIGNAL(toggled(bool)), acceptFilters.at(index), TQT_SLOT(setSansEpisode(bool) ) );
+ connect(acceptFilters.at(index), TQT_SIGNAL(sansEpisodeChanged(bool)), filterSansEpisode, TQT_SLOT(setChecked(bool) ) );
//minSeason
- connect(filterMinSeason, SIGNAL(valueChanged(int)), acceptFilters.at(index), SLOT(setMinSeason(int) ) );
- connect(acceptFilters.at(index), SIGNAL(minSeasonChanged(int)), filterMinSeason, SLOT(setValue(int) ) );
+ connect(filterMinSeason, TQT_SIGNAL(valueChanged(int)), acceptFilters.at(index), TQT_SLOT(setMinSeason(int) ) );
+ connect(acceptFilters.at(index), TQT_SIGNAL(minSeasonChanged(int)), filterMinSeason, TQT_SLOT(setValue(int) ) );
//minEpisode
- connect(filterMinEpisode, SIGNAL(valueChanged(int)), acceptFilters.at(index), SLOT(setMinEpisode(int) ) );
- connect(acceptFilters.at(index), SIGNAL(minEpisodeChanged(int)), filterMinEpisode, SLOT(setValue(int) ) );
+ connect(filterMinEpisode, TQT_SIGNAL(valueChanged(int)), acceptFilters.at(index), TQT_SLOT(setMinEpisode(int) ) );
+ connect(acceptFilters.at(index), TQT_SIGNAL(minEpisodeChanged(int)), filterMinEpisode, TQT_SLOT(setValue(int) ) );
//maxSeason
- connect(filterMaxSeason, SIGNAL(valueChanged(int)), acceptFilters.at(index), SLOT(setMaxSeason(int) ) );
- connect(acceptFilters.at(index), SIGNAL(maxSeasonChanged(int)), filterMaxSeason, SLOT(setValue(int) ) );
+ connect(filterMaxSeason, TQT_SIGNAL(valueChanged(int)), acceptFilters.at(index), TQT_SLOT(setMaxSeason(int) ) );
+ connect(acceptFilters.at(index), TQT_SIGNAL(maxSeasonChanged(int)), filterMaxSeason, TQT_SLOT(setValue(int) ) );
//maxEpisode
- connect(filterMaxEpisode, SIGNAL(valueChanged(int)), acceptFilters.at(index), SLOT(setMaxEpisode(int) ) );
- connect(acceptFilters.at(index), SIGNAL(maxEpisodeChanged(int)), filterMaxEpisode, SLOT(setValue(int) ) );
+ connect(filterMaxEpisode, TQT_SIGNAL(valueChanged(int)), acceptFilters.at(index), TQT_SLOT(setMaxEpisode(int) ) );
+ connect(acceptFilters.at(index), TQT_SIGNAL(maxEpisodeChanged(int)), filterMaxEpisode, TQT_SLOT(setValue(int) ) );
//matches
- connect(acceptFilters.at(index), SIGNAL(matchesChanged(const QValueList<FilterMatch>&)), this, SLOT(updateMatches(const QValueList<FilterMatch>&) ) );
+ connect(acceptFilters.at(index), TQT_SIGNAL(matchesChanged(const TQValueList<FilterMatch>&)), this, TQT_SLOT(updateMatches(const TQValueList<FilterMatch>&) ) );
- connect(processFilter, SIGNAL(clicked()), acceptFilters.at(index), SIGNAL(rescanFilter()) );
+ connect(processFilter, TQT_SIGNAL(clicked()), acceptFilters.at(index), TQT_SIGNAL(rescanFilter()) );
}
else
{
//title
- connect(filterTitle, SIGNAL(textChanged(const QString &)), rejectFilters.at(index), SLOT(setTitle(const QString &) ) );
- connect(rejectFilters.at(index), SIGNAL(titleChanged(const QString &)), this, SLOT(setFilterTitle(const QString &) ) );
+ connect(filterTitle, TQT_SIGNAL(textChanged(const TQString &)), rejectFilters.at(index), TQT_SLOT(setTitle(const TQString &) ) );
+ connect(rejectFilters.at(index), TQT_SIGNAL(titleChanged(const TQString &)), this, TQT_SLOT(setFilterTitle(const TQString &) ) );
//active
- connect(filterActive, SIGNAL(toggled(bool)), rejectFilters.at(index), SLOT(setActive(bool) ) );
- connect(rejectFilters.at(index), SIGNAL(activeChanged(bool)), filterActive, SLOT(setChecked(bool) ) );
+ connect(filterActive, TQT_SIGNAL(toggled(bool)), rejectFilters.at(index), TQT_SLOT(setActive(bool) ) );
+ connect(rejectFilters.at(index), TQT_SIGNAL(activeChanged(bool)), filterActive, TQT_SLOT(setChecked(bool) ) );
//regExps
- connect(filterRegExps, SIGNAL(changed()), this, SLOT(updateRegExps()) );
+ connect(filterRegExps, TQT_SIGNAL(changed()), this, TQT_SLOT(updateRegExps()) );
//series
- connect(filterSeries, SIGNAL(toggled(bool)), rejectFilters.at(index), SLOT(setSeries(bool) ) );
- connect(rejectFilters.at(index), SIGNAL(seriesChanged(bool)), filterSeries, SLOT(setChecked(bool) ) );
+ connect(filterSeries, TQT_SIGNAL(toggled(bool)), rejectFilters.at(index), TQT_SLOT(setSeries(bool) ) );
+ connect(rejectFilters.at(index), TQT_SIGNAL(seriesChanged(bool)), filterSeries, TQT_SLOT(setChecked(bool) ) );
//sansEpisode
- connect(filterSansEpisode, SIGNAL(toggled(bool)), rejectFilters.at(index), SLOT(setSansEpisode(bool) ) );
- connect(rejectFilters.at(index), SIGNAL(sansEpisodeChanged(bool)), filterSansEpisode, SLOT(setChecked(bool) ) );
+ connect(filterSansEpisode, TQT_SIGNAL(toggled(bool)), rejectFilters.at(index), TQT_SLOT(setSansEpisode(bool) ) );
+ connect(rejectFilters.at(index), TQT_SIGNAL(sansEpisodeChanged(bool)), filterSansEpisode, TQT_SLOT(setChecked(bool) ) );
//minSeason
- connect(filterMinSeason, SIGNAL(valueChanged(int)), rejectFilters.at(index), SLOT(setMinSeason(int) ) );
- connect(rejectFilters.at(index), SIGNAL(minSeasonChanged(int)), filterMinSeason, SLOT(setValue(int) ) );
+ connect(filterMinSeason, TQT_SIGNAL(valueChanged(int)), rejectFilters.at(index), TQT_SLOT(setMinSeason(int) ) );
+ connect(rejectFilters.at(index), TQT_SIGNAL(minSeasonChanged(int)), filterMinSeason, TQT_SLOT(setValue(int) ) );
//minEpisode
- connect(filterMinEpisode, SIGNAL(valueChanged(int)), rejectFilters.at(index), SLOT(setMinEpisode(int) ) );
- connect(rejectFilters.at(index), SIGNAL(minEpisodeChanged(int)), filterMinEpisode, SLOT(setValue(int) ) );
+ connect(filterMinEpisode, TQT_SIGNAL(valueChanged(int)), rejectFilters.at(index), TQT_SLOT(setMinEpisode(int) ) );
+ connect(rejectFilters.at(index), TQT_SIGNAL(minEpisodeChanged(int)), filterMinEpisode, TQT_SLOT(setValue(int) ) );
//maxSeason
- connect(filterMaxSeason, SIGNAL(valueChanged(int)), rejectFilters.at(index), SLOT(setMaxSeason(int) ) );
- connect(rejectFilters.at(index), SIGNAL(maxSeasonChanged(int)), filterMaxSeason, SLOT(setValue(int) ) );
+ connect(filterMaxSeason, TQT_SIGNAL(valueChanged(int)), rejectFilters.at(index), TQT_SLOT(setMaxSeason(int) ) );
+ connect(rejectFilters.at(index), TQT_SIGNAL(maxSeasonChanged(int)), filterMaxSeason, TQT_SLOT(setValue(int) ) );
//maxEpisode
- connect(filterMaxEpisode, SIGNAL(valueChanged(int)), rejectFilters.at(index), SLOT(setMaxEpisode(int) ) );
- connect(rejectFilters.at(index), SIGNAL(maxEpisodeChanged(int)), filterMaxEpisode, SLOT(setValue(int) ) );
+ connect(filterMaxEpisode, TQT_SIGNAL(valueChanged(int)), rejectFilters.at(index), TQT_SLOT(setMaxEpisode(int) ) );
+ connect(rejectFilters.at(index), TQT_SIGNAL(maxEpisodeChanged(int)), filterMaxEpisode, TQT_SLOT(setValue(int) ) );
//matches
- connect(rejectFilters.at(index), SIGNAL(matchesChanged(const QValueList<FilterMatch>&)), this, SLOT(updateMatches(const QValueList<FilterMatch>&) ) );
+ connect(rejectFilters.at(index), TQT_SIGNAL(matchesChanged(const TQValueList<FilterMatch>&)), this, TQT_SLOT(updateMatches(const TQValueList<FilterMatch>&) ) );
- connect(processFilter, SIGNAL(clicked()), rejectFilters.at(index), SIGNAL(rescanFilter()) );
+ connect(processFilter, TQT_SIGNAL(clicked()), rejectFilters.at(index), TQT_SIGNAL(rescanFilter()) );
}
}
@@ -297,68 +297,68 @@ namespace kt
if (acceptFilter)
{
//title
- disconnect(filterTitle, SIGNAL(textChanged(const QString &)), acceptFilters.at(index), SLOT(setTitle(const QString &) ) );
- disconnect(acceptFilters.at(index), SIGNAL(titleChanged(const QString &)), this, SLOT(setFilterTitle(const QString &) ) );
+ disconnect(filterTitle, TQT_SIGNAL(textChanged(const TQString &)), acceptFilters.at(index), TQT_SLOT(setTitle(const TQString &) ) );
+ disconnect(acceptFilters.at(index), TQT_SIGNAL(titleChanged(const TQString &)), this, TQT_SLOT(setFilterTitle(const TQString &) ) );
//active
- disconnect(filterActive, SIGNAL(toggled(bool)), acceptFilters.at(index), SLOT(setActive(bool) ) );
- disconnect(acceptFilters.at(index), SIGNAL(activeChanged(bool)), filterActive, SLOT(setChecked(bool) ) );
+ disconnect(filterActive, TQT_SIGNAL(toggled(bool)), acceptFilters.at(index), TQT_SLOT(setActive(bool) ) );
+ disconnect(acceptFilters.at(index), TQT_SIGNAL(activeChanged(bool)), filterActive, TQT_SLOT(setChecked(bool) ) );
//regExps
- disconnect(filterRegExps, SIGNAL(changed()), this, SLOT(updateRegExps()) );
+ disconnect(filterRegExps, TQT_SIGNAL(changed()), this, TQT_SLOT(updateRegExps()) );
//series
- disconnect(filterSeries, SIGNAL(toggled(bool)), acceptFilters.at(index), SLOT(setSeries(bool) ) );
- disconnect(acceptFilters.at(index), SIGNAL(seriesChanged(bool)), filterSeries, SLOT(setChecked(bool) ) );
+ disconnect(filterSeries, TQT_SIGNAL(toggled(bool)), acceptFilters.at(index), TQT_SLOT(setSeries(bool) ) );
+ disconnect(acceptFilters.at(index), TQT_SIGNAL(seriesChanged(bool)), filterSeries, TQT_SLOT(setChecked(bool) ) );
//sansEpisode
- disconnect(filterSansEpisode, SIGNAL(toggled(bool)), acceptFilters.at(index), SLOT(setSansEpisode(bool) ) );
- disconnect(acceptFilters.at(index), SIGNAL(sansEpisodeChanged(bool)), filterSansEpisode, SLOT(setChecked(bool) ) );
+ disconnect(filterSansEpisode, TQT_SIGNAL(toggled(bool)), acceptFilters.at(index), TQT_SLOT(setSansEpisode(bool) ) );
+ disconnect(acceptFilters.at(index), TQT_SIGNAL(sansEpisodeChanged(bool)), filterSansEpisode, TQT_SLOT(setChecked(bool) ) );
//minSeason
- disconnect(filterMinSeason, SIGNAL(valueChanged(int)), acceptFilters.at(index), SLOT(setMinSeason(int) ) );
- disconnect(acceptFilters.at(index), SIGNAL(minSeasonChanged(int)), filterMinSeason, SLOT(setValue(int) ) );
+ disconnect(filterMinSeason, TQT_SIGNAL(valueChanged(int)), acceptFilters.at(index), TQT_SLOT(setMinSeason(int) ) );
+ disconnect(acceptFilters.at(index), TQT_SIGNAL(minSeasonChanged(int)), filterMinSeason, TQT_SLOT(setValue(int) ) );
//minEpisode
- disconnect(filterMinEpisode, SIGNAL(valueChanged(int)), acceptFilters.at(index), SLOT(setMinEpisode(int) ) );
- disconnect(acceptFilters.at(index), SIGNAL(minEpisodeChanged(int)), filterMinEpisode, SLOT(setValue(int) ) );
+ disconnect(filterMinEpisode, TQT_SIGNAL(valueChanged(int)), acceptFilters.at(index), TQT_SLOT(setMinEpisode(int) ) );
+ disconnect(acceptFilters.at(index), TQT_SIGNAL(minEpisodeChanged(int)), filterMinEpisode, TQT_SLOT(setValue(int) ) );
//maxSeason
- disconnect(filterMaxSeason, SIGNAL(valueChanged(int)), acceptFilters.at(index), SLOT(setMaxSeason(int) ) );
- disconnect(acceptFilters.at(index), SIGNAL(maxSeasonChanged(int)), filterMaxSeason, SLOT(setValue(int) ) );
+ disconnect(filterMaxSeason, TQT_SIGNAL(valueChanged(int)), acceptFilters.at(index), TQT_SLOT(setMaxSeason(int) ) );
+ disconnect(acceptFilters.at(index), TQT_SIGNAL(maxSeasonChanged(int)), filterMaxSeason, TQT_SLOT(setValue(int) ) );
//maxEpisode
- disconnect(filterMaxEpisode, SIGNAL(valueChanged(int)), acceptFilters.at(index), SLOT(setMaxEpisode(int) ) );
- disconnect(acceptFilters.at(index), SIGNAL(maxEpisodeChanged(int)), filterMaxEpisode, SLOT(setValue(int) ) );
+ disconnect(filterMaxEpisode, TQT_SIGNAL(valueChanged(int)), acceptFilters.at(index), TQT_SLOT(setMaxEpisode(int) ) );
+ disconnect(acceptFilters.at(index), TQT_SIGNAL(maxEpisodeChanged(int)), filterMaxEpisode, TQT_SLOT(setValue(int) ) );
//matches
- disconnect(acceptFilters.at(index), SIGNAL(matchesChanged(const QValueList<FilterMatch>&)), this, SLOT(updateMatches(const QValueList<FilterMatch>&) ) );
+ disconnect(acceptFilters.at(index), TQT_SIGNAL(matchesChanged(const TQValueList<FilterMatch>&)), this, TQT_SLOT(updateMatches(const TQValueList<FilterMatch>&) ) );
- disconnect(processFilter, SIGNAL(clicked()), acceptFilters.at(index), SIGNAL(rescanFilter()) );
+ disconnect(processFilter, TQT_SIGNAL(clicked()), acceptFilters.at(index), TQT_SIGNAL(rescanFilter()) );
}
else
{
//title
- disconnect(filterTitle, SIGNAL(textChanged(const QString &)), rejectFilters.at(index), SLOT(setTitle(const QString &) ) );
- disconnect(rejectFilters.at(index), SIGNAL(titleChanged(const QString &)), this, SLOT(setFilterTitle(const QString &) ) );
+ disconnect(filterTitle, TQT_SIGNAL(textChanged(const TQString &)), rejectFilters.at(index), TQT_SLOT(setTitle(const TQString &) ) );
+ disconnect(rejectFilters.at(index), TQT_SIGNAL(titleChanged(const TQString &)), this, TQT_SLOT(setFilterTitle(const TQString &) ) );
//active
- disconnect(filterActive, SIGNAL(toggled(bool)), rejectFilters.at(index), SLOT(setActive(bool) ) );
- disconnect(rejectFilters.at(index), SIGNAL(activeChanged(bool)), filterActive, SLOT(setChecked(bool) ) );
+ disconnect(filterActive, TQT_SIGNAL(toggled(bool)), rejectFilters.at(index), TQT_SLOT(setActive(bool) ) );
+ disconnect(rejectFilters.at(index), TQT_SIGNAL(activeChanged(bool)), filterActive, TQT_SLOT(setChecked(bool) ) );
//regExps
- disconnect(filterRegExps, SIGNAL(changed()), this, SLOT(updateRegExps()) );
+ disconnect(filterRegExps, TQT_SIGNAL(changed()), this, TQT_SLOT(updateRegExps()) );
//series
- disconnect(filterSeries, SIGNAL(toggled(bool)), rejectFilters.at(index), SLOT(setSeries(bool) ) );
- disconnect(rejectFilters.at(index), SIGNAL(seriesChanged(bool)), filterSeries, SLOT(setChecked(bool) ) );
+ disconnect(filterSeries, TQT_SIGNAL(toggled(bool)), rejectFilters.at(index), TQT_SLOT(setSeries(bool) ) );
+ disconnect(rejectFilters.at(index), TQT_SIGNAL(seriesChanged(bool)), filterSeries, TQT_SLOT(setChecked(bool) ) );
//sansEpisode
- disconnect(filterSansEpisode, SIGNAL(toggled(bool)), rejectFilters.at(index), SLOT(setSansEpisode(bool) ) );
- disconnect(rejectFilters.at(index), SIGNAL(sansEpisodeChanged(bool)), filterSansEpisode, SLOT(setChecked(bool) ) );
+ disconnect(filterSansEpisode, TQT_SIGNAL(toggled(bool)), rejectFilters.at(index), TQT_SLOT(setSansEpisode(bool) ) );
+ disconnect(rejectFilters.at(index), TQT_SIGNAL(sansEpisodeChanged(bool)), filterSansEpisode, TQT_SLOT(setChecked(bool) ) );
//minSeason
- disconnect(filterMinSeason, SIGNAL(valueChanged(int)), rejectFilters.at(index), SLOT(setMinSeason(int) ) );
- disconnect(rejectFilters.at(index), SIGNAL(minSeasonChanged(int)), filterMinSeason, SLOT(setValue(int) ) );
+ disconnect(filterMinSeason, TQT_SIGNAL(valueChanged(int)), rejectFilters.at(index), TQT_SLOT(setMinSeason(int) ) );
+ disconnect(rejectFilters.at(index), TQT_SIGNAL(minSeasonChanged(int)), filterMinSeason, TQT_SLOT(setValue(int) ) );
//minEpisode
- disconnect(filterMinEpisode, SIGNAL(valueChanged(int)), rejectFilters.at(index), SLOT(setMinEpisode(int) ) );
- disconnect(rejectFilters.at(index), SIGNAL(minEpisodeChanged(int)), filterMinEpisode, SLOT(setValue(int) ) );
+ disconnect(filterMinEpisode, TQT_SIGNAL(valueChanged(int)), rejectFilters.at(index), TQT_SLOT(setMinEpisode(int) ) );
+ disconnect(rejectFilters.at(index), TQT_SIGNAL(minEpisodeChanged(int)), filterMinEpisode, TQT_SLOT(setValue(int) ) );
//maxSeason
- disconnect(filterMaxSeason, SIGNAL(valueChanged(int)), rejectFilters.at(index), SLOT(setMaxSeason(int) ) );
- disconnect(rejectFilters.at(index), SIGNAL(maxSeasonChanged(int)), filterMaxSeason, SLOT(setValue(int) ) );
+ disconnect(filterMaxSeason, TQT_SIGNAL(valueChanged(int)), rejectFilters.at(index), TQT_SLOT(setMaxSeason(int) ) );
+ disconnect(rejectFilters.at(index), TQT_SIGNAL(maxSeasonChanged(int)), filterMaxSeason, TQT_SLOT(setValue(int) ) );
//maxEpisode
- disconnect(filterMaxEpisode, SIGNAL(valueChanged(int)), rejectFilters.at(index), SLOT(setMaxEpisode(int) ) );
- disconnect(rejectFilters.at(index), SIGNAL(maxEpisodeChanged(int)), filterMaxEpisode, SLOT(setValue(int) ) );
+ disconnect(filterMaxEpisode, TQT_SIGNAL(valueChanged(int)), rejectFilters.at(index), TQT_SLOT(setMaxEpisode(int) ) );
+ disconnect(rejectFilters.at(index), TQT_SIGNAL(maxEpisodeChanged(int)), filterMaxEpisode, TQT_SLOT(setValue(int) ) );
//matches
- disconnect(rejectFilters.at(index), SIGNAL(matchesChanged(const QValueList<FilterMatch>&)), this, SLOT(updateMatches(const QValueList<FilterMatch>&) ) );
+ disconnect(rejectFilters.at(index), TQT_SIGNAL(matchesChanged(const TQValueList<FilterMatch>&)), this, TQT_SLOT(updateMatches(const TQValueList<FilterMatch>&) ) );
- disconnect(processFilter, SIGNAL(clicked()), rejectFilters.at(index), SIGNAL(rescanFilter()) );
+ disconnect(processFilter, TQT_SIGNAL(clicked()), rejectFilters.at(index), TQT_SIGNAL(rescanFilter()) );
}
}
@@ -375,27 +375,27 @@ namespace kt
feedlist->setCurrentItem(index);
//update the feed list
- connect(feeds.at(index), SIGNAL(titleChanged(const QString&)), this, SLOT(updateFeedList()) );
+ connect(feeds.at(index), TQT_SIGNAL(titleChanged(const TQString&)), this, TQT_SLOT(updateFeedList()) );
//clear the articles list when the url is changed
- connect(feeds.at(index), SIGNAL(feedUrlChanged(const KURL&)), this, SLOT(clearArticles() ) );
+ connect(feeds.at(index), TQT_SIGNAL(feedUrlChanged(const KURL&)), this, TQT_SLOT(clearArticles() ) );
//connect the scanArticle signal to the scanArticle slot
- connect(feeds.at(index), SIGNAL(scanRssArticle(RssArticle)), this, SLOT(scanArticle(RssArticle) ) );
+ connect(feeds.at(index), TQT_SIGNAL(scanRssArticle(RssArticle)), this, TQT_SLOT(scanArticle(RssArticle) ) );
//connect all the fields to the save slot
//title
- connect(feeds.at(index), SIGNAL(titleChanged(const QString &)), this, SLOT(saveFeedList() ) );
+ connect(feeds.at(index), TQT_SIGNAL(titleChanged(const TQString &)), this, TQT_SLOT(saveFeedList() ) );
//url
- connect(feeds.at(index), SIGNAL(feedUrlChanged(const KURL&)), this, SLOT(saveFeedList() ) );
+ connect(feeds.at(index), TQT_SIGNAL(feedUrlChanged(const KURL&)), this, TQT_SLOT(saveFeedList() ) );
//articleAge
- connect(feeds.at(index), SIGNAL(articleAgeChanged(int)), this, SLOT(saveFeedList() ) );
+ connect(feeds.at(index), TQT_SIGNAL(articleAgeChanged(int)), this, TQT_SLOT(saveFeedList() ) );
//active
- connect(feeds.at(index), SIGNAL(activeChanged(bool)), this, SLOT(saveFeedList() ) );
+ connect(feeds.at(index), TQT_SIGNAL(activeChanged(bool)), this, TQT_SLOT(saveFeedList() ) );
//autoRefresh
- connect(feeds.at(index), SIGNAL(autoRefreshChanged(const QTime&)), this, SLOT(saveFeedList() ) );
+ connect(feeds.at(index), TQT_SIGNAL(autoRefreshChanged(const TQTime&)), this, TQT_SLOT(saveFeedList() ) );
//ignoreTTL
- connect(feeds.at(index), SIGNAL(ignoreTTLChanged(bool)), this, SLOT(saveFeedList() ) );
+ connect(feeds.at(index), TQT_SIGNAL(ignoreTTLChanged(bool)), this, TQT_SLOT(saveFeedList() ) );
}
@@ -410,52 +410,52 @@ namespace kt
acceptFilterList->insertItem(acceptFilters.at(index)->title());
acceptFilterList->setCurrentItem(index);
- connect(acceptFilters.at(index), SIGNAL(titleChanged(const QString&)), this, SLOT(updateAcceptFilterList()) );
+ connect(acceptFilters.at(index), TQT_SIGNAL(titleChanged(const TQString&)), this, TQT_SLOT(updateAcceptFilterList()) );
//connect all the fields to the save slot
//title
- connect(acceptFilters.at(index), SIGNAL(titleChanged(const QString &)), this, SLOT(saveFilterList() ) );
+ connect(acceptFilters.at(index), TQT_SIGNAL(titleChanged(const TQString &)), this, TQT_SLOT(saveFilterList() ) );
//active
- connect(acceptFilters.at(index), SIGNAL(activeChanged( bool )), this, SLOT(saveFilterList() ) );
+ connect(acceptFilters.at(index), TQT_SIGNAL(activeChanged( bool )), this, TQT_SLOT(saveFilterList() ) );
//regexps
- connect(acceptFilters.at(index), SIGNAL(regExpsChanged( const QStringList& )), this, SLOT(saveFilterList() ) );
+ connect(acceptFilters.at(index), TQT_SIGNAL(regExpsChanged( const TQStringList& )), this, TQT_SLOT(saveFilterList() ) );
//series
- connect(acceptFilters.at(index), SIGNAL(seriesChanged( bool )), this, SLOT(saveFilterList() ) );
+ connect(acceptFilters.at(index), TQT_SIGNAL(seriesChanged( bool )), this, TQT_SLOT(saveFilterList() ) );
//sansEpisode
- connect(acceptFilters.at(index), SIGNAL(sansEpisodeChanged( bool )), this, SLOT(saveFilterList() ) );
+ connect(acceptFilters.at(index), TQT_SIGNAL(sansEpisodeChanged( bool )), this, TQT_SLOT(saveFilterList() ) );
//minSeason
- connect(acceptFilters.at(index), SIGNAL(minSeasonChanged (int )), this, SLOT(saveFilterList() ) );
+ connect(acceptFilters.at(index), TQT_SIGNAL(minSeasonChanged (int )), this, TQT_SLOT(saveFilterList() ) );
//minEpisode
- connect(acceptFilters.at(index), SIGNAL(minEpisodeChanged (int )), this, SLOT(saveFilterList() ) );
+ connect(acceptFilters.at(index), TQT_SIGNAL(minEpisodeChanged (int )), this, TQT_SLOT(saveFilterList() ) );
//maxSeason
- connect(acceptFilters.at(index), SIGNAL(maxSeasonChanged (int )), this, SLOT(saveFilterList() ) );
+ connect(acceptFilters.at(index), TQT_SIGNAL(maxSeasonChanged (int )), this, TQT_SLOT(saveFilterList() ) );
//maxEpiosde
- connect(acceptFilters.at(index), SIGNAL(maxEpisodeChanged (int )), this, SLOT(saveFilterList() ) );
+ connect(acceptFilters.at(index), TQT_SIGNAL(maxEpisodeChanged (int )), this, TQT_SLOT(saveFilterList() ) );
//matches
- connect(acceptFilters.at(index), SIGNAL(matchesChanged( const QValueList<FilterMatch>& )), this, SLOT(saveFilterList() ) );
+ connect(acceptFilters.at(index), TQT_SIGNAL(matchesChanged( const TQValueList<FilterMatch>& )), this, TQT_SLOT(saveFilterList() ) );
//connect the rescan signal to the rescan slot
- connect(acceptFilters.at(index), SIGNAL(rescanFilter()), this, SLOT(rescanFilter()) );
+ connect(acceptFilters.at(index), TQT_SIGNAL(rescanFilter()), this, TQT_SLOT(rescanFilter()) );
// //connect all except the matchesChanged to the rescanFilter slot
// //title
-// connect(acceptFilters.at(index), SIGNAL(titleChanged(const QString &)), this, SLOT(rescanFilter() ) );
+// connect(acceptFilters.at(index), TQT_SIGNAL(titleChanged(const TQString &)), this, TQT_SLOT(rescanFilter() ) );
// //active
-// connect(acceptFilters.at(index), SIGNAL(activeChanged( bool )), this, SLOT(rescanFilter() ) );
+// connect(acceptFilters.at(index), TQT_SIGNAL(activeChanged( bool )), this, TQT_SLOT(rescanFilter() ) );
// //regexps
-// connect(acceptFilters.at(index), SIGNAL(regExpsChanged( const QStringList& )), this, SLOT(rescanFilter() ) );
+// connect(acceptFilters.at(index), TQT_SIGNAL(regExpsChanged( const TQStringList& )), this, TQT_SLOT(rescanFilter() ) );
// //series
-// connect(acceptFilters.at(index), SIGNAL(seriesChanged( bool )), this, SLOT(rescanFilter() ) );
+// connect(acceptFilters.at(index), TQT_SIGNAL(seriesChanged( bool )), this, TQT_SLOT(rescanFilter() ) );
// //sansEpisode
-// connect(acceptFilters.at(index), SIGNAL(sansEpisodeChanged( bool )), this, SLOT(rescanFilter() ) );
+// connect(acceptFilters.at(index), TQT_SIGNAL(sansEpisodeChanged( bool )), this, TQT_SLOT(rescanFilter() ) );
// //minSeason
-// connect(acceptFilters.at(index), SIGNAL(minSeasonChanged (int )), this, SLOT(rescanFilter() ) );
+// connect(acceptFilters.at(index), TQT_SIGNAL(minSeasonChanged (int )), this, TQT_SLOT(rescanFilter() ) );
// //minEpisode
-// connect(acceptFilters.at(index), SIGNAL(minEpisodeChanged (int )), this, SLOT(rescanFilter() ) );
+// connect(acceptFilters.at(index), TQT_SIGNAL(minEpisodeChanged (int )), this, TQT_SLOT(rescanFilter() ) );
// //maxSeason
-// connect(acceptFilters.at(index), SIGNAL(maxSeasonChanged (int )), this, SLOT(rescanFilter() ) );
+// connect(acceptFilters.at(index), TQT_SIGNAL(maxSeasonChanged (int )), this, TQT_SLOT(rescanFilter() ) );
// //maxEpiosde
-// connect(acceptFilters.at(index), SIGNAL(maxEpisodeChanged (int )), this, SLOT(rescanFilter() ) );
+// connect(acceptFilters.at(index), TQT_SIGNAL(maxEpisodeChanged (int )), this, TQT_SLOT(rescanFilter() ) );
}
@@ -470,29 +470,29 @@ namespace kt
rejectFilterList->insertItem(rejectFilters.at(index)->title());
rejectFilterList->setCurrentItem(index);
- connect(rejectFilters.at(index), SIGNAL(titleChanged(const QString&)), this, SLOT(updateRejectFilterList()) );
+ connect(rejectFilters.at(index), TQT_SIGNAL(titleChanged(const TQString&)), this, TQT_SLOT(updateRejectFilterList()) );
//connect all the fields to the save slot
//title
- connect(rejectFilters.at(index), SIGNAL(titleChanged(const QString &)), this, SLOT(saveFilterList() ) );
+ connect(rejectFilters.at(index), TQT_SIGNAL(titleChanged(const TQString &)), this, TQT_SLOT(saveFilterList() ) );
//active
- connect(rejectFilters.at(index), SIGNAL(activeChanged( bool )), this, SLOT(saveFilterList() ) );
+ connect(rejectFilters.at(index), TQT_SIGNAL(activeChanged( bool )), this, TQT_SLOT(saveFilterList() ) );
//regexps
- connect(rejectFilters.at(index), SIGNAL(regExpsChanged( const QStringList& )), this, SLOT(saveFilterList() ) );
+ connect(rejectFilters.at(index), TQT_SIGNAL(regExpsChanged( const TQStringList& )), this, TQT_SLOT(saveFilterList() ) );
//series
- connect(rejectFilters.at(index), SIGNAL(seriesChanged( bool )), this, SLOT(saveFilterList() ) );
+ connect(rejectFilters.at(index), TQT_SIGNAL(seriesChanged( bool )), this, TQT_SLOT(saveFilterList() ) );
//sansEpisode
- connect(rejectFilters.at(index), SIGNAL(sansEpisodeChanged( bool )), this, SLOT(saveFilterList() ) );
+ connect(rejectFilters.at(index), TQT_SIGNAL(sansEpisodeChanged( bool )), this, TQT_SLOT(saveFilterList() ) );
//minSeason
- connect(rejectFilters.at(index), SIGNAL(minSeasonChanged (int )), this, SLOT(saveFilterList() ) );
+ connect(rejectFilters.at(index), TQT_SIGNAL(minSeasonChanged (int )), this, TQT_SLOT(saveFilterList() ) );
//minEpisode
- connect(rejectFilters.at(index), SIGNAL(minEpisodeChanged (int )), this, SLOT(saveFilterList() ) );
+ connect(rejectFilters.at(index), TQT_SIGNAL(minEpisodeChanged (int )), this, TQT_SLOT(saveFilterList() ) );
//maxSeason
- connect(rejectFilters.at(index), SIGNAL(maxSeasonChanged (int )), this, SLOT(saveFilterList() ) );
+ connect(rejectFilters.at(index), TQT_SIGNAL(maxSeasonChanged (int )), this, TQT_SLOT(saveFilterList() ) );
//maxEpiosde
- connect(rejectFilters.at(index), SIGNAL(maxEpisodeChanged (int )), this, SLOT(saveFilterList() ) );
+ connect(rejectFilters.at(index), TQT_SIGNAL(maxEpisodeChanged (int )), this, TQT_SLOT(saveFilterList() ) );
//matches
- connect(rejectFilters.at(index), SIGNAL(matchesChanged( const QValueList<FilterMatch>& )), this, SLOT(saveFilterList() ) );
+ connect(rejectFilters.at(index), TQT_SIGNAL(matchesChanged( const TQValueList<FilterMatch>& )), this, TQT_SLOT(saveFilterList() ) );
}
@@ -606,7 +606,7 @@ namespace kt
if (item < 0)
{
//let's check which one sent the signal - if we can't figure it all then update them all
- int pos = feeds.find((RssFeed *)sender());
+ int pos = feeds.tqfind((RssFeed *)sender());
if (pos < 0)
{
@@ -639,7 +639,7 @@ namespace kt
if (item < 0)
{
//let's check which one sent the signal - if we can't figure it all then update them all
- int pos = acceptFilters.find((RssFilter *)sender());
+ int pos = acceptFilters.tqfind((RssFilter *)sender());
if (pos < 0)
{
@@ -672,7 +672,7 @@ namespace kt
if (item < 0)
{
//let's check which one sent the signal - if we can't figure it all then update them all
- int pos = rejectFilters.find((RssFilter *)sender());
+ int pos = rejectFilters.tqfind((RssFilter *)sender());
if (pos < 0)
{
@@ -704,7 +704,7 @@ namespace kt
feedArticles->setNumRows(articles.count());
for (int i=0; i<articles.count(); i++)
{
- QString info;
+ TQString info;
if (articles[i].downloaded()==1)
{
info = ": Manually downloaded";
@@ -719,13 +719,13 @@ namespace kt
}
}
- void RssFeedManager::updateMatches(const QValueList<FilterMatch>& matches)
+ void RssFeedManager::updateMatches(const TQValueList<FilterMatch>& matches)
{
filterMatches->setNumRows(matches.count());
for (int i=0; i<matches.count(); i++)
{
- filterMatches->setText(i, 0, QString::number(matches[i].season()));
- filterMatches->setText(i, 1, QString::number(matches[i].episode()));
+ filterMatches->setText(i, 0, TQString::number(matches[i].season()));
+ filterMatches->setText(i, 1, TQString::number(matches[i].episode()));
filterMatches->setText(i, 2, matches[i].time());
filterMatches->setText(i, 3, matches[i].link());
}
@@ -773,7 +773,7 @@ namespace kt
curDownload = new RssLinkDownloader(m_core, feedArticles->text(j, 2));
for (int i=0; i<feeds.count(); i++)
{
- connect(curDownload, SIGNAL(linkDownloaded( QString, int )), feeds.at(i), SLOT(setDownloaded(QString, int)) );
+ connect(curDownload, TQT_SIGNAL(linkDownloaded( TQString, int )), feeds.at(i), TQT_SLOT(setDownloaded(TQString, int)) );
}
}
}
@@ -793,7 +793,7 @@ namespace kt
void RssFeedManager::deleteSelectedMatches()
{
- QStringList selectedLinks;
+ TQStringList selectedLinks;
for (int i=0; i<filterMatches->numSelections(); i++)
{
int endRow = filterMatches->selection(i).topRow() + filterMatches->selection(i).numRows();
@@ -883,7 +883,7 @@ namespace kt
//active
feedActive->setChecked(false);
//autoRefresh
- feedAutoRefresh->setTime(QTime());
+ feedAutoRefresh->setTime(TQTime());
//ignoreTTL
feedIgnoreTTL->setChecked(false);
//articles
@@ -1080,12 +1080,12 @@ namespace kt
}
}
- QString RssFeedManager::getFeedListFilename()
+ TQString RssFeedManager::getFeedListFilename()
{
return KGlobal::dirs()->saveLocation("data","ktorrent") + "rssfeeds.ktr";
}
- QString RssFeedManager::getFilterListFilename()
+ TQString RssFeedManager::getFilterListFilename()
{
return KGlobal::dirs()->saveLocation("data","ktorrent") + "rssfilters.ktr";
}
@@ -1097,13 +1097,13 @@ namespace kt
feedListSaving = true;
- QString filename = getFeedListFilename();
+ TQString filename = getFeedListFilename();
//save feeds to disk
- QFile file(filename);
+ TQFile file(filename);
file.open( IO_WriteOnly );
- QDataStream out(&file);
+ TQDataStream out(&file);
out << feeds.count();
@@ -1117,15 +1117,15 @@ namespace kt
void RssFeedManager::loadFeedList()
{
- QString filename = getFeedListFilename();
+ TQString filename = getFeedListFilename();
//load feeds from disk
- QFile file(filename);
+ TQFile file(filename);
if (file.exists())
{
file.open( IO_ReadOnly );
- QDataStream in(&file);
+ TQDataStream in(&file);
int numFeeds;
@@ -1150,13 +1150,13 @@ namespace kt
filterListSaving = true;
- QString filename = getFilterListFilename();
+ TQString filename = getFilterListFilename();
//save feeds to disk
- QFile file(filename);
+ TQFile file(filename);
file.open( IO_WriteOnly );
- QDataStream out(&file);
+ TQDataStream out(&file);
out << acceptFilters.count();
@@ -1177,15 +1177,15 @@ namespace kt
void RssFeedManager::loadFilterList()
{
- QString filename = getFilterListFilename();
+ TQString filename = getFilterListFilename();
//load feeds from disk
- QFile file(filename);
+ TQFile file(filename);
if (file.exists())
{
file.open( IO_ReadOnly );
- QDataStream in(&file);
+ TQDataStream in(&file);
int numFilters;
@@ -1232,7 +1232,7 @@ namespace kt
RssLinkDownloader * curDownload = new RssLinkDownloader(m_core, article.link().prettyURL(), filter);
for (int i=0; i<feeds.count(); i++)
{
- connect(curDownload, SIGNAL(linkDownloaded( QString, int )), feeds.at(i), SLOT(setDownloaded(QString, int)) );
+ connect(curDownload, TQT_SIGNAL(linkDownloaded( TQString, int )), feeds.at(i), TQT_SLOT(setDownloaded(TQString, int)) );
}
}
}
@@ -1245,7 +1245,7 @@ namespace kt
RssLinkDownloader * curDownload = new RssLinkDownloader(m_core, article.link().prettyURL(), acceptFilters.at(i));
for (int i=0; i<feeds.count(); i++)
{
- connect(curDownload, SIGNAL(linkDownloaded( QString, int )), feeds.at(i), SLOT(setDownloaded(QString, int)) );
+ connect(curDownload, TQT_SIGNAL(linkDownloaded( TQString, int )), feeds.at(i), TQT_SLOT(setDownloaded(TQString, int)) );
}
}
}
@@ -1254,7 +1254,7 @@ namespace kt
void RssFeedManager::rescanFilter()
{
- int pos = acceptFilters.find((RssFilter *)sender());
+ int pos = acceptFilters.tqfind((RssFilter *)sender());
if (pos >= 0)
{
@@ -1270,7 +1270,7 @@ namespace kt
void RssFeedManager::testTextChanged()
{
- testText->setPaletteBackgroundColor(QColor(255, 255, 255));
+ testText->setPaletteBackgroundColor(TQColor(255, 255, 255));
testTestText->setEnabled(!testText->text().isEmpty());
}
@@ -1293,22 +1293,22 @@ namespace kt
if (curFilter->scanArticle(testArticle, false, false))
{
- testText->setPaletteBackgroundColor(QColor(0, 255, 0));
+ testText->setPaletteBackgroundColor(TQColor(0, 255, 0));
}
else
{
- testText->setPaletteBackgroundColor(QColor(255, 0, 0));
+ testText->setPaletteBackgroundColor(TQColor(255, 0, 0));
}
}
- void RssFeedManager::setFilterTitle(const QString& title)
+ void RssFeedManager::setFilterTitle(const TQString& title)
{
int cursorPos = filterTitle->cursorPosition();
filterTitle->setText(title);
filterTitle->setCursorPosition(cursorPos);
}
- void RssFeedManager::setFeedTitle(const QString& title)
+ void RssFeedManager::setFeedTitle(const TQString& title)
{
int cursorPos = feedTitle->cursorPosition();
feedTitle->setText(title);
diff --git a/plugins/rssfeed/rssfeedmanager.h b/plugins/rssfeed/rssfeedmanager.h
index 1afc766..2d3e7cd 100644
--- a/plugins/rssfeed/rssfeedmanager.h
+++ b/plugins/rssfeed/rssfeedmanager.h
@@ -22,12 +22,12 @@
#include <kdirlister.h>
#include <kfileitem.h>
-#include <qstring.h>
-#include <qobject.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqdir.h>
-#include <qptrlist.h>
-#include <qwidget.h>
+#include <tqptrlist.h>
+#include <tqwidget.h>
#include "rssfeedwidget.h"
#include "rssfeed.h"
@@ -47,6 +47,7 @@ namespace kt
class RssFeedManager : public RssFeedWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -54,7 +55,7 @@ namespace kt
* @param core Pointer to core interface
* @param openSilently Wheather to open torrent silently or nor.
*/
- RssFeedManager(CoreInterface* core, QWidget * parent = 0);
+ RssFeedManager(CoreInterface* core, TQWidget * tqparent = 0);
~RssFeedManager();
public slots:
@@ -85,7 +86,7 @@ namespace kt
void deleteSelectedRejectFilter();
void updateRegExps();
- void updateMatches(const QValueList<FilterMatch>& matches);
+ void updateMatches(const TQValueList<FilterMatch>& matches);
void saveFeedList();
void saveFilterList();
@@ -102,24 +103,24 @@ namespace kt
void testTextChanged();
void testFilter();
- void setFilterTitle(const QString& title);
- void setFeedTitle(const QString& title);
+ void setFilterTitle(const TQString& title);
+ void setFeedTitle(const TQString& title);
private:
CoreInterface* m_core;
- QPtrList<RssFeed> feeds;
+ TQPtrList<RssFeed> feeds;
int currentFeed;
- QPtrList<RssFilter> acceptFilters;
+ TQPtrList<RssFilter> acceptFilters;
int currentAcceptFilter;
- QPtrList<RssFilter> rejectFilters;
+ TQPtrList<RssFilter> rejectFilters;
int currentRejectFilter;
- QString getFeedListFilename();
+ TQString getFeedListFilename();
void loadFeedList();
- QString getFilterListFilename();
+ TQString getFilterListFilename();
void loadFilterList();
bool feedListSaving;
diff --git a/plugins/rssfeed/rssfeedplugin.cpp b/plugins/rssfeed/rssfeedplugin.cpp
index 0d845b7..66761cc 100644
--- a/plugins/rssfeed/rssfeedplugin.cpp
+++ b/plugins/rssfeed/rssfeedplugin.cpp
@@ -26,8 +26,8 @@
#include <util/constants.h>
#include <util/log.h>
-#include <qstring.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqfile.h>
#include <kmessagebox.h>
#include <klocale.h>
@@ -42,13 +42,13 @@ K_EXPORT_COMPONENT_FACTORY(ktrssfeedplugin,KGenericFactory<kt::RssFeedPlugin>("r
namespace kt
{
- const QString NAME = "RSS Feeds";
- const QString AUTHOR = "Alan Jones";
- const QString EMAIL = "skyphyr@gmail.com";
- const QString DESCRIPTION = i18n("Automatically scans RSS feeds for torrent matching regular expressions and loads them.");
+ const TQString NAME = "RSS Feeds";
+ const TQString AUTHOR = "Alan Jones";
+ const TQString EMAIL = "skyphyr@gmail.com";
+ const TQString DESCRIPTION = i18n("Automatically scans RSS feeds for torrent matching regular expressions and loads them.");
- RssFeedPlugin::RssFeedPlugin(QObject* parent, const char* name, const QStringList& args)
- : Plugin(parent, name, args,NAME,i18n("RSS Feeds"),AUTHOR,EMAIL,DESCRIPTION,"player_playlist")
+ RssFeedPlugin::RssFeedPlugin(TQObject* tqparent, const char* name, const TQStringList& args)
+ : Plugin(tqparent, name, args,NAME,i18n("RSS Feeds"),AUTHOR,EMAIL,DESCRIPTION,"player_playlist")
{
m_rssFeedManager = 0;
}
@@ -77,7 +77,7 @@ namespace kt
m_rssFeedManager = 0;
}
- bool RssFeedPlugin::versionCheck(const QString & version) const
+ bool RssFeedPlugin::versionCheck(const TQString & version) const
{
return version == KT_VERSION_MACRO;
}
diff --git a/plugins/rssfeed/rssfeedplugin.h b/plugins/rssfeed/rssfeedplugin.h
index 4ecc6af..991727f 100644
--- a/plugins/rssfeed/rssfeedplugin.h
+++ b/plugins/rssfeed/rssfeedplugin.h
@@ -22,7 +22,7 @@
#include <interfaces/plugin.h>
-class QString;
+class TQString;
namespace kt
@@ -37,13 +37,14 @@ namespace kt
class RssFeedPlugin : public Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- RssFeedPlugin(QObject* parent, const char* name, const QStringList& args);
+ RssFeedPlugin(TQObject* tqparent, const char* name, const TQStringList& args);
virtual ~RssFeedPlugin();
virtual void load();
virtual void unload();
- virtual bool versionCheck(const QString& version) const;
+ virtual bool versionCheck(const TQString& version) const;
private:
RssFeedManager * m_rssFeedManager;
diff --git a/plugins/rssfeed/rssfeedwidget.ui b/plugins/rssfeed/rssfeedwidget.ui
index 55bd27b..2a4b014 100644
--- a/plugins/rssfeed/rssfeedwidget.ui
+++ b/plugins/rssfeed/rssfeedwidget.ui
@@ -2,7 +2,7 @@
<class>RssFeedWidget</class>
<comment>The display widget for the rssfeed tab</comment>
<author>Alan Jones</author>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>RssFeedWidget</cstring>
</property>
@@ -21,14 +21,14 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QTabWidget" row="0" column="0">
+ <widget class="TQTabWidget" row="0" column="0">
<property name="name">
<cstring>tabs</cstring>
</property>
<property name="margin">
<number>2</number>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>feeds</cstring>
</property>
@@ -39,22 +39,22 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QSplitter">
+ <widget class="TQSplitter">
<property name="name">
<cstring>splitter16</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QListBox" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQListBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>feedlist</cstring>
</property>
@@ -67,7 +67,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>deleteFeed</cstring>
</property>
@@ -78,7 +78,7 @@
<string>De&amp;lete</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="0">
+ <widget class="TQPushButton" row="1" column="0">
<property name="name">
<cstring>newFeed</cstring>
</property>
@@ -88,7 +88,7 @@
</widget>
</grid>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>feedLayout</cstring>
</property>
@@ -101,7 +101,7 @@
<cstring>feedUrl</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>feedUrlLabel</cstring>
</property>
@@ -120,7 +120,7 @@
<cstring>feedUrl</cstring>
</property>
</widget>
- <widget class="QGroupBox" row="3" column="0" rowspan="1" colspan="2">
+ <widget class="TQGroupBox" row="3" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>feedBox</cstring>
</property>
@@ -152,14 +152,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>90</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QPushButton" row="1" column="2">
+ <widget class="TQPushButton" row="1" column="2">
<property name="name">
<cstring>downloadArticle</cstring>
</property>
@@ -173,7 +173,7 @@
<string></string>
</property>
</widget>
- <widget class="QTable" row="0" column="0" rowspan="1" colspan="3">
+ <widget class="TQTable" row="0" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>feedArticles</cstring>
</property>
@@ -192,15 +192,15 @@
</widget>
</grid>
</widget>
- <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2">
+ <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="2">
<property name="name">
- <cstring>layout13</cstring>
+ <cstring>tqlayout13</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>feedRefreshTimeLabel</cstring>
</property>
@@ -219,7 +219,7 @@
<cstring>feedAutoRefresh</cstring>
</property>
</widget>
- <widget class="QTimeEdit">
+ <widget class="TQTimeEdit">
<property name="name">
<cstring>feedAutoRefresh</cstring>
</property>
@@ -234,7 +234,7 @@
</time>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>feedIgnoreTTL</cstring>
</property>
@@ -252,14 +252,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>60</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>refreshFeed</cstring>
</property>
@@ -275,15 +275,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQLayoutWidget" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
- <cstring>layout47</cstring>
+ <cstring>tqlayout47</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>feedTitleLabel</cstring>
</property>
@@ -302,12 +302,12 @@
<cstring>feedTitle</cstring>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>feedTitle</cstring>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>feedArticleAgeLabel</cstring>
</property>
@@ -323,7 +323,7 @@
<string>Keep Articles (days)</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>feedArticleAge</cstring>
</property>
@@ -331,7 +331,7 @@
<number>3650</number>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>feedActive</cstring>
</property>
@@ -354,7 +354,7 @@
</widget>
</vbox>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>filters</cstring>
</property>
@@ -365,15 +365,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout28</cstring>
+ <cstring>tqlayout28</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox12</cstring>
</property>
@@ -392,12 +392,12 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QListBox" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQListBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>acceptFilterList</cstring>
</property>
</widget>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>deleteAcceptFilter</cstring>
</property>
@@ -411,7 +411,7 @@
<string></string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="0">
+ <widget class="TQPushButton" row="1" column="0">
<property name="name">
<cstring>newAcceptFilter</cstring>
</property>
@@ -421,7 +421,7 @@
</widget>
</grid>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox13</cstring>
</property>
@@ -443,12 +443,12 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QListBox" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQListBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>rejectFilterList</cstring>
</property>
</widget>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>deleteRejectFilter</cstring>
</property>
@@ -462,7 +462,7 @@
<string></string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="0">
+ <widget class="TQPushButton" row="1" column="0">
<property name="name">
<cstring>newRejectFilter</cstring>
</property>
@@ -474,23 +474,23 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout14</cstring>
+ <cstring>tqlayout14</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout9</cstring>
+ <cstring>tqlayout9</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>filterTitleLabel</cstring>
</property>
@@ -509,12 +509,12 @@
<cstring>filterTitle</cstring>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>filterTitle</cstring>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>filterActive</cstring>
</property>
@@ -524,9 +524,9 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout12</cstring>
+ <cstring>tqlayout12</cstring>
</property>
<hbox>
<property name="name">
@@ -563,23 +563,23 @@
<set>Remove|Add</set>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout11</cstring>
+ <cstring>tqlayout11</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout28</cstring>
+ <cstring>tqlayout28</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>filterSeries</cstring>
</property>
@@ -600,21 +600,21 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>50</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>processFilter</cstring>
</property>
<property name="enabled">
<bool>true</bool>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>60</width>
<height>32767</height>
@@ -629,11 +629,11 @@
</widget>
</hbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>seriesBox</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32000</width>
<height>32000</height>
@@ -646,9 +646,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout9</cstring>
+ <cstring>tqlayout9</cstring>
</property>
<hbox>
<property name="name">
@@ -664,14 +664,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>filterSansEpisode</cstring>
</property>
@@ -684,20 +684,20 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout10</cstring>
+ <cstring>tqlayout10</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QSpinBox" row="0" column="1">
+ <widget class="TQSpinBox" row="0" column="1">
<property name="name">
<cstring>filterMinSeason</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="2">
+ <widget class="TQLabel" row="1" column="2">
<property name="name">
<cstring>filterMaxEpisodeLabel</cstring>
</property>
@@ -713,17 +713,17 @@
<string>Max Episode</string>
</property>
</widget>
- <widget class="QSpinBox" row="0" column="3">
+ <widget class="TQSpinBox" row="0" column="3">
<property name="name">
<cstring>filterMinEpisode</cstring>
</property>
</widget>
- <widget class="QSpinBox" row="1" column="1">
+ <widget class="TQSpinBox" row="1" column="1">
<property name="name">
<cstring>filterMaxSeason</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>filterMaxSeasonLabel</cstring>
</property>
@@ -742,7 +742,7 @@
<cstring>filterMinSeason</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>filterMinSeasonLabel</cstring>
</property>
@@ -761,12 +761,12 @@
<cstring>filterMinSeason</cstring>
</property>
</widget>
- <widget class="QSpinBox" row="1" column="3">
+ <widget class="TQSpinBox" row="1" column="3">
<property name="name">
<cstring>filterMaxEpisode</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="2">
+ <widget class="TQLabel" row="0" column="2">
<property name="name">
<cstring>filterMinEpisodeLabel</cstring>
</property>
@@ -790,15 +790,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout33</cstring>
+ <cstring>tqlayout33</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>testTextLabel</cstring>
</property>
@@ -817,7 +817,7 @@
<cstring>testText</cstring>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>testText</cstring>
</property>
@@ -829,7 +829,7 @@
</color>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>testTestText</cstring>
</property>
@@ -842,7 +842,7 @@
</widget>
</hbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>filterMatchesBox</cstring>
</property>
@@ -861,7 +861,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QTable">
+ <widget class="TQTable">
<property name="name">
<cstring>filterMatches</cstring>
</property>
@@ -878,15 +878,15 @@
<enum>MultiRow</enum>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout13</cstring>
+ <cstring>tqlayout13</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>downloadFilterMatch</cstring>
</property>
@@ -910,14 +910,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>170</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>deleteFilterMatch</cstring>
</property>
@@ -958,7 +958,7 @@
<slot>setEnabled(bool)</slot>
</connection>
</connections>
-<layoutdefaults spacing="2" margin="2"/>
+<tqlayoutdefaults spacing="2" margin="2"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/plugins/rssfeed/rssfilter.cpp b/plugins/rssfeed/rssfilter.cpp
index 6cf1f1f..e7c4925 100644
--- a/plugins/rssfeed/rssfilter.cpp
+++ b/plugins/rssfeed/rssfilter.cpp
@@ -22,7 +22,7 @@
namespace kt
{
- FilterMatch::FilterMatch(int season, int episode, QString link, QString time)
+ FilterMatch::FilterMatch(int season, int episode, TQString link, TQString time)
{
m_season = season;
m_episode = episode;
@@ -53,7 +53,7 @@ namespace kt
return m_link==other.link() && m_season==other.season() && m_episode==other.episode();
}
- RssFilter::RssFilter(QObject * parent) : QObject(parent)
+ RssFilter::RssFilter(TQObject * tqparent) : TQObject(tqparent)
{
m_title = "New";
m_active = false;
@@ -62,9 +62,9 @@ namespace kt
m_minSeason = m_minEpisode = m_maxSeason = m_maxEpisode = 0;
}
- RssFilter::RssFilter(QString title, bool active, QStringList regExps, bool series, bool sansEpisode,
+ RssFilter::RssFilter(TQString title, bool active, TQStringList regExps, bool series, bool sansEpisode,
int minSeason, int minEpisode, int maxSeason, int maxEpisode,
- QValueList<FilterMatch> matches)
+ TQValueList<FilterMatch> matches)
{
m_title = title;
m_active = active;
@@ -78,7 +78,7 @@ namespace kt
m_matches = matches;
}
- RssFilter::RssFilter(const RssFilter &other) : QObject()
+ RssFilter::RssFilter(const RssFilter &other) : TQObject()
{
*this = other;
}
@@ -102,7 +102,7 @@ namespace kt
return *this;
}
- void RssFilter::setTitle( const QString& title )
+ void RssFilter::setTitle( const TQString& title )
{
if (m_title != title)
{
@@ -121,7 +121,7 @@ namespace kt
}
}
- void RssFilter::setRegExps( const QStringList& regExps )
+ void RssFilter::setRegExps( const TQStringList& regExps )
{
if (regExps != m_regExps)
{
@@ -191,7 +191,7 @@ namespace kt
}
}
- void RssFilter::setMatches( const QValueList<FilterMatch>& matches )
+ void RssFilter::setMatches( const TQValueList<FilterMatch>& matches )
{
if (matches != m_matches)
{
@@ -252,7 +252,7 @@ namespace kt
if (!m_active && saveMatch)
return false;
- QRegExp regEx;
+ TQRegExp regEx;
regEx.setCaseSensitive(false);
if (!m_regExps.count())
@@ -263,7 +263,7 @@ namespace kt
if (m_regExps[i].isEmpty())
continue;
- QString curExp = m_regExps[i];
+ TQString curExp = m_regExps[i];
bool invert=false;
if (curExp.startsWith( "!" ))
@@ -276,14 +276,14 @@ namespace kt
if (!invert)
{
- if (!article.title().contains(regEx) && !article.link().prettyURL().contains(regEx) && !article.description().contains(regEx) )
+ if (!article.title().tqcontains(regEx) && !article.link().prettyURL().tqcontains(regEx) && !article.description().tqcontains(regEx) )
{
return false;
}
}
else
{
- if (article.title().contains(regEx) || article.link().prettyURL().contains(regEx) || article.description().contains(regEx) )
+ if (article.title().tqcontains(regEx) || article.link().prettyURL().tqcontains(regEx) || article.description().tqcontains(regEx) )
{
return false;
}
@@ -295,15 +295,15 @@ namespace kt
if (m_series)
{
- QStringList episodeFormats;
+ TQStringList episodeFormats;
episodeFormats << "s([0-9]{1,2})[de]([0-9]{1,2})[^0-9]" << "[^0-9]([0-9]{1,2})x([0-9]{1,2})[^0-9]" << "[^0-9]([0-9]{1,2})([0-9]{2})[^0-9]";
for (int i=0; i<episodeFormats.count(); i++)
{
regEx.setPattern(*episodeFormats.at(i));
if (regEx.search(article.title()) >= 0)
{
- season = (*regEx.capturedTexts().at(1)).toInt();
- episode = (*regEx.capturedTexts().at(2)).toInt();
+ season = (*regEx.tqcapturedTexts().at(1)).toInt();
+ episode = (*regEx.tqcapturedTexts().at(2)).toInt();
if (!episodeInRange(season,episode,ignoreMatches,alreadyDownloaded))
{
return false;
@@ -313,8 +313,8 @@ namespace kt
if (regEx.search(article.link().prettyURL()) >= 0)
{
- season = (*regEx.capturedTexts().at(1)).toInt();
- episode = (*regEx.capturedTexts().at(2)).toInt();
+ season = (*regEx.tqcapturedTexts().at(1)).toInt();
+ episode = (*regEx.tqcapturedTexts().at(2)).toInt();
if (!episodeInRange(season,episode,ignoreMatches,alreadyDownloaded))
{
return false;
@@ -324,8 +324,8 @@ namespace kt
if (regEx.search(article.description()) >= 0)
{
- season = (*regEx.capturedTexts().at(1)).toInt();
- episode = (*regEx.capturedTexts().at(2)).toInt();
+ season = (*regEx.tqcapturedTexts().at(1)).toInt();
+ episode = (*regEx.tqcapturedTexts().at(2)).toInt();
if (!episodeInRange(season,episode,ignoreMatches,alreadyDownloaded))
{
return false;
@@ -354,10 +354,10 @@ namespace kt
return true;
}
- void RssFilter::deleteMatch(const QString& link)
+ void RssFilter::deleteMatch(const TQString& link)
{
- QValueList<FilterMatch>::iterator it = m_matches.begin();
+ TQValueList<FilterMatch>::iterator it = m_matches.begin();
while (it != m_matches.end())
{
if ((*it).link() == link)
@@ -372,43 +372,43 @@ namespace kt
}
- QDataStream &operator<<( QDataStream &out, const FilterMatch &filterMatch )
+ TQDataStream &operator<<( TQDataStream &out, const FilterMatch &filterMatch )
{
out << filterMatch.season() << filterMatch.episode() << filterMatch.time() << filterMatch.link();
return out;
}
- QDataStream &operator>>( QDataStream &in, FilterMatch &filterMatch )
+ TQDataStream &operator>>( TQDataStream &in, FilterMatch &filterMatch )
{
int season, episode;
- QString time;
- QString link;
+ TQString time;
+ TQString link;
in >> season >> episode >> time >> link;
filterMatch = FilterMatch(season, episode, link, time);
return in;
}
- QDataStream &operator<<( QDataStream &out, const RssFilter &filter )
+ TQDataStream &operator<<( TQDataStream &out, const RssFilter &filter )
{
out << filter.title() << int(filter.active()) << filter.regExps() << int(filter.series()) << int(filter.sansEpisode()) << filter.minSeason() << filter.minEpisode() << filter.maxSeason() << filter.maxEpisode() << filter.matches();
return out;
}
- QDataStream &operator>>( QDataStream &in, RssFilter &filter )
+ TQDataStream &operator>>( TQDataStream &in, RssFilter &filter )
{
- QString title;
+ TQString title;
int active;
- QStringList regExps;
+ TQStringList regExps;
int series;
int sansEpisode;
int minSeason;
int minEpisode;
int maxSeason;
int maxEpisode;
- QValueList<FilterMatch> matches;
+ TQValueList<FilterMatch> matches;
in >> title >> active >> regExps >> series >> sansEpisode >> minSeason >> minEpisode >> maxSeason >> maxEpisode >> matches;
filter = RssFilter(title, active, regExps, series, sansEpisode, minSeason, minEpisode, maxSeason, maxEpisode, matches);
diff --git a/plugins/rssfeed/rssfilter.h b/plugins/rssfeed/rssfilter.h
index be31d18..2bf3dca 100644
--- a/plugins/rssfeed/rssfilter.h
+++ b/plugins/rssfeed/rssfilter.h
@@ -20,11 +20,11 @@
#ifndef RSSFILTER_H
#define RSSFILTER_H
-#include <qobject.h>
-#include <qstring.h>
-#include <qtimer.h>
-#include <qdatastream.h>
-#include <qregexp.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqtimer.h>
+#include <tqdatastream.h>
+#include <tqregexp.h>
#include "rssarticle.h"
@@ -42,109 +42,110 @@ namespace kt
{
public:
- FilterMatch() { m_season = 0; m_episode = 0; m_time = QDateTime::currentDateTime().toString(); m_link=QString(); };
- FilterMatch(int season, int episode, QString link, QString time = QDateTime::currentDateTime().toString());
+ FilterMatch() { m_season = 0; m_episode = 0; m_time = TQDateTime::tqcurrentDateTime().toString(); m_link=TQString(); };
+ FilterMatch(int season, int episode, TQString link, TQString time = TQDateTime::tqcurrentDateTime().toString());
FilterMatch(const FilterMatch &other);
FilterMatch &operator=(const FilterMatch &other);
bool operator==(const FilterMatch &other) const;
~FilterMatch() {};
- QString link() const { return m_link; }
+ TQString link() const { return m_link; }
int season() const { return m_season; }
int episode() const { return m_episode; }
- QString time() const { return m_time; }
+ TQString time() const { return m_time; }
- void setLink(const QString& link) { m_link = link; }
+ void setLink(const TQString& link) { m_link = link; }
void setSeason(int season) { m_season = season; }
void setEpisode(int episode) { m_episode = episode; }
- void setTime(QString time) { m_time = time; }
+ void setTime(TQString time) { m_time = time; }
private:
int m_season;
int m_episode;
- QString m_link;
- QString m_time;
+ TQString m_link;
+ TQString m_time;
};
- class RssFilter : public QObject
+ class RssFilter : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default constructor.
*/
- RssFilter(QObject * parent = 0);
+ RssFilter(TQObject * tqparent = 0);
RssFilter(const RssFilter &other);
- RssFilter(QString title, bool active, QStringList regexps, bool series, bool sansEpisode,
+ RssFilter(TQString title, bool active, TQStringList regexps, bool series, bool sansEpisode,
int minSeason, int minEpisode, int maxSeason, int maxEpisode,
- QValueList<FilterMatch> matches);
+ TQValueList<FilterMatch> matches);
RssFilter &operator=(const RssFilter &other);
~RssFilter();
- QString title() const { return m_title; }
+ TQString title() const { return m_title; }
bool active() const { return m_active; }
- QStringList regExps() const { return m_regExps; }
+ TQStringList regExps() const { return m_regExps; }
bool series() const { return m_series; }
bool sansEpisode() const { return m_sansEpisode; }
int minSeason() const { return m_minSeason; }
int minEpisode() const { return m_minEpisode; }
int maxSeason() const { return m_maxSeason; }
int maxEpisode() const { return m_maxEpisode; }
- QValueList<FilterMatch> matches() const { return m_matches; }
+ TQValueList<FilterMatch> matches() const { return m_matches; }
bool scanArticle(RssArticle article, bool ignoreMatches = true, bool saveMatch = true);
- void deleteMatch(const QString& link);
+ void deleteMatch(const TQString& link);
public slots:
- void setTitle( const QString& title );
+ void setTitle( const TQString& title );
void setActive( bool active );
- void setRegExps ( const QStringList& regexps );
+ void setRegExps ( const TQStringList& regexps );
void setSeries ( bool series );
void setSansEpisode ( bool sansEpisode );
void setMinSeason( int minSeason );
void setMinEpisode( int minEpisode );
void setMaxSeason( int maxSeason );
void setMaxEpisode( int maxEpisode );
- void setMatches( const QValueList<FilterMatch>& matches );
+ void setMatches( const TQValueList<FilterMatch>& matches );
//void scanFilter();
signals:
- void titleChanged( const QString& title );
+ void titleChanged( const TQString& title );
void activeChanged( bool active );
- void regExpsChanged( const QStringList& regexps );
+ void regExpsChanged( const TQStringList& regexps );
void seriesChanged( bool series );
void sansEpisodeChanged( bool sansEpisode );
void minSeasonChanged (int minSeason);
void minEpisodeChanged (int minEpisode);
void maxSeasonChanged (int maxSeason);
void maxEpisodeChanged (int maxEpisode);
- void matchesChanged( const QValueList<FilterMatch>& matches );
+ void matchesChanged( const TQValueList<FilterMatch>& matches );
void rescanFilter();
private:
- QString m_title;
+ TQString m_title;
bool m_active;
- QStringList m_regExps;
+ TQStringList m_regExps;
bool m_series;
bool m_sansEpisode;
int m_minSeason;
int m_minEpisode;
int m_maxSeason;
int m_maxEpisode;
- QValueList<FilterMatch> m_matches;
+ TQValueList<FilterMatch> m_matches;
bool episodeInRange(int season, int episode, bool ignoreMatches, bool& alreadyDownloaded);
};
- QDataStream &operator<<( QDataStream &out, const FilterMatch &filterMatch );
- QDataStream &operator>>( QDataStream &in, FilterMatch &filterMatch );
+ TQDataStream &operator<<( TQDataStream &out, const FilterMatch &filterMatch );
+ TQDataStream &operator>>( TQDataStream &in, FilterMatch &filterMatch );
- QDataStream &operator<<( QDataStream &out, const RssFilter &filter );
- QDataStream &operator>>( QDataStream &in, RssFilter &filter );
+ TQDataStream &operator<<( TQDataStream &out, const RssFilter &filter );
+ TQDataStream &operator>>( TQDataStream &in, RssFilter &filter );
}
diff --git a/plugins/rssfeed/rsslinkdownloader.cpp b/plugins/rssfeed/rsslinkdownloader.cpp
index 4b0f390..467055e 100644
--- a/plugins/rssfeed/rsslinkdownloader.cpp
+++ b/plugins/rssfeed/rsslinkdownloader.cpp
@@ -23,7 +23,7 @@
#include <kmimetype.h>
#include <kmessagebox.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "../../libktorrent/torrent/bdecoder.h"
#include "../../libktorrent/torrent/bnode.h"
@@ -33,7 +33,7 @@ using namespace bt;
namespace kt
{
- RssLinkDownloader::RssLinkDownloader(CoreInterface* core, QString link, RssFilter * filter, QObject * parent) : QObject (parent)
+ RssLinkDownloader::RssLinkDownloader(CoreInterface* core, TQString link, RssFilter * filter, TQObject * tqparent) : TQObject (tqparent)
{
//tempFile.setAutoDelete(true);
m_core = core;
@@ -42,15 +42,15 @@ namespace kt
if (!KURL(link).isValid())
{
// no valid URL, so just display an error message
- KMessageBox::error(0,i18n("Failed to find and download a valid torrent for %1").arg(curLink));
- QTimer::singleShot(50,this,SLOT(suicide()));
+ KMessageBox::error(0,i18n("Failed to find and download a valid torrent for %1").tqarg(curLink));
+ TQTimer::singleShot(50,this,TQT_SLOT(suicide()));
}
else
{
//first let's download the link so we can process it to check for the actual torrent
curLink = curSubLink = link;
curFile = KIO::storedGet(link,false,false);
- connect(curFile, SIGNAL(result(KIO::Job*)),this,SLOT(processLink( KIO::Job* )));
+ connect(curFile, TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(processLink( KIO::Job* )));
}
}
@@ -59,10 +59,10 @@ namespace kt
}
- void RssLinkDownloader::processLink(KIO::Job* jobStatus)
+ void RssLinkDownloader::processLink(KIO::Job* jobtqStatus)
{
- if (!jobStatus->error())
+ if (!jobtqStatus->error())
{
//the file downloaded ok - so let's check if it's a torrent
KMimeType linkType = *KMimeType::findByContent(curFile->data());
@@ -72,22 +72,22 @@ namespace kt
{
KURL url = curLink;
//let's go through the data and populate our sublink array
- QTextStream html(curFile->data(), IO_ReadOnly);
+ TQTextStream html(curFile->data(), IO_ReadOnly);
//go through a line at a time checking for a torrent
- QString htmlline = html.readLine();
+ TQString htmlline = html.readLine();
while (!htmlline.isNull())
{
- QRegExp hrefTags = QString("<A.*HREF.*</A");
+ TQRegExp hrefTags = TQString("<A.*HREF.*</A");
hrefTags.setCaseSensitive(false);
hrefTags.setMinimal(true);
int matchPos = 0;
- while (htmlline.find(hrefTags, matchPos) >= 0)
+ while (htmlline.tqfind(hrefTags, matchPos) >= 0)
{
matchPos += hrefTags.matchedLength();
//we're found an <a href tag - let's check it if contains download
- QRegExp hrefText = QString("d(own)?load");
+ TQRegExp hrefText = TQString("d(own)?load");
hrefText.setCaseSensitive(false);
if (!hrefTags.capturedTexts()[0].contains(hrefText))
@@ -97,20 +97,20 @@ namespace kt
}
//we're found an <a href tag - now let's the the url out of it
- hrefText = QString("HREF=\"?([^\">< ]*)[\" ]");
+ hrefText = TQString("HREF=\"?([^\">< ]*)[\" ]");
hrefText.setCaseSensitive(false);
- hrefTags.capturedTexts()[0].find(hrefText);
+ hrefTags.tqcapturedTexts()[0].tqfind(hrefText);
//lets get the captured
- QString hrefLink = hrefText.capturedTexts()[1];
+ TQString hrefLink = hrefText.capturedTexts()[1];
- if (hrefLink.startsWith("/"))
+ if (hrefLink.tqstartsWith("/"))
{
hrefLink = url.protocol() + "://" + url.host() + hrefLink;
}
- else if (!hrefLink.startsWith("http://", false))
+ else if (!hrefLink.tqstartsWith("http://", false))
{
- hrefLink = url.url().left(url.url().findRev("/")+1) + hrefLink;
+ hrefLink = url.url().left(url.url().tqfindRev("/")+1) + hrefLink;
}
subLinks.append(hrefLink);
@@ -180,7 +180,7 @@ namespace kt
else
{
//failed to download a selected article from a feed
- KMessageBox::error(0,i18n("Failed to find and download a valid torrent for %1").arg(curLink));
+ KMessageBox::error(0,i18n("Failed to find and download a valid torrent for %1").tqarg(curLink));
}
deleteLater();
}
@@ -189,7 +189,7 @@ namespace kt
curSubLink = subLinks.first();
subLinks.pop_front();
curFile = KIO::storedGet(curSubLink,false,false);
- connect(curFile, SIGNAL(result(KIO::Job*)),this,SLOT(processLink( KIO::Job* )));
+ connect(curFile, TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(processLink( KIO::Job* )));
}
}
diff --git a/plugins/rssfeed/rsslinkdownloader.h b/plugins/rssfeed/rsslinkdownloader.h
index 2266f29..0c5541f 100644
--- a/plugins/rssfeed/rsslinkdownloader.h
+++ b/plugins/rssfeed/rsslinkdownloader.h
@@ -28,7 +28,7 @@
#include <util/log.h>
#include <util/constants.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "rssfilter.h"
#include "rssarticle.h"
@@ -44,30 +44,31 @@ namespace kt
*
*/
- class RssLinkDownloader : public QObject
+ class RssLinkDownloader : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Default constructor.
*/
- RssLinkDownloader(CoreInterface* core, QString link, RssFilter * filter = 0, QObject * parent = 0);
+ RssLinkDownloader(CoreInterface* core, TQString link, RssFilter * filter = 0, TQObject * tqparent = 0);
~RssLinkDownloader();
public slots:
- void processLink(KIO::Job* jobStatus);
+ void processLink(KIO::Job* jobtqStatus);
void suicide();
signals:
- void linkDownloaded( QString link, int downloaded );
+ void linkDownloaded( TQString link, int downloaded );
private:
KIO::StoredTransferJob * curFile;
- QString curLink, curSubLink;
- QStringList subLinks;
+ TQString curLink, curSubLink;
+ TQStringList subLinks;
RssFilter * curFilter;
bool firstLink;
diff --git a/plugins/scanfolder/scanfolder.cpp b/plugins/scanfolder/scanfolder.cpp
index 3c30299..36b1ce2 100644
--- a/plugins/scanfolder/scanfolder.cpp
+++ b/plugins/scanfolder/scanfolder.cpp
@@ -24,10 +24,10 @@
#include <klocale.h>
#include <kio/job.h>
-#include <qstring.h>
-#include <qobject.h>
-#include <qfile.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqfile.h>
+#include <tqvaluelist.h>
#include <torrent/globals.h>
#include <util/log.h>
@@ -45,7 +45,7 @@ using namespace bt;
namespace kt
{
- ScanFolder::ScanFolder(CoreInterface* core, QString& dir, LoadedTorrentAction action, bool openSilently)
+ ScanFolder::ScanFolder(CoreInterface* core, TQString& dir, LoadedTorrentAction action, bool openSilently)
: m_core(core), m_dir(0), m_loadedAction(action), m_openSilently(openSilently)
{
m_dir = new KDirLister();
@@ -58,9 +58,9 @@ namespace kt
m_dir->setShowingDotFiles(true);
- connect(m_dir, SIGNAL(newItems( const KFileItemList& )), this, SLOT(onNewItems( const KFileItemList& )));
- connect(m_core, SIGNAL(loadingFinished( const KURL&, bool, bool )), this, SLOT(onLoadingFinished( const KURL&, bool, bool )));
- connect(&m_incomplePollingTimer,SIGNAL(timeout()),this,SLOT(onIncompletePollingTimeout()));
+ connect(m_dir, TQT_SIGNAL(newItems( const KFileItemList& )), this, TQT_SLOT(onNewItems( const KFileItemList& )));
+ connect(m_core, TQT_SIGNAL(loadingFinished( const KURL&, bool, bool )), this, TQT_SLOT(onLoadingFinished( const KURL&, bool, bool )));
+ connect(&m_incomplePollingTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(onIncompletePollingTimeout()));
}
@@ -76,9 +76,9 @@ namespace kt
KFileItem* file;
for(file=list.first(); file; file=list.next())
{
- QString name = file->name();
- QString dirname = m_dir->url().path();
- QString filename = dirname + bt::DirSeparator() + name;
+ TQString name = file->name();
+ TQString dirname = m_dir->url().path();
+ TQString filename = dirname + bt::DirSeparator() + name;
if(!name.endsWith(".torrent"))
continue;
@@ -86,8 +86,8 @@ namespace kt
if(name.startsWith("."))
{
//Check if corresponding torrent exists
- if(!QFile::exists(m_dir->url().path() + bt::DirSeparator() + name.right(name.length() - 1)) && (m_loadedAction == defaultAction))
- QFile::remove(filename);
+ if(!TQFile::exists(m_dir->url().path() + bt::DirSeparator() + name.right(name.length() - 1)) && (m_loadedAction == defaultAction))
+ TQFile::remove(filename);
continue;
}
@@ -96,7 +96,7 @@ namespace kt
source.setPath(filename);
//If torrent has it's hidden complement - skip it.
- if(QFile::exists(dirname + "/." + name))
+ if(TQFile::exists(dirname + "/." + name))
continue;
if (incomplete(source))
@@ -132,7 +132,7 @@ namespace kt
return;
//search for entry
- QValueList<KURL>::iterator it = m_pendingURLs.find(url);
+ TQValueList<KURL>::iterator it = m_pendingURLs.tqfind(url);
//if no entry is found than this torrent was not started by this plugin so - quit
if(it == m_pendingURLs.end())
@@ -144,30 +144,30 @@ namespace kt
if(canceled)
return;
- QString name = url.filename(false);
- QString dirname = m_dir->url().path();
- QString filename = dirname + "/" + name;
+ TQString name = url.filename(false);
+ TQString dirname = m_dir->url().path();
+ TQString filename = dirname + "/" + name;
KURL destination(dirname + "/" + i18n("loaded") + "/" + name);
switch(m_loadedAction) {
case deleteAction:
//If torrent has it's hidden complement - remove it too.
- if(QFile::exists(dirname + "/." + name))
- QFile::remove(dirname + "/." + name);
+ if(TQFile::exists(dirname + "/." + name))
+ TQFile::remove(dirname + "/." + name);
// Out() << "Deleting: " << name.ascii() << endl;
- QFile::remove(filename);
+ TQFile::remove(filename);
break;
case moveAction:
// Out() << "Moving: " << name.ascii() << endl;
//If torrent has it's hidden complement - remove it too.
- if(QFile::exists(dirname + "/." + name))
- QFile::remove(dirname + "/." + name);
+ if(TQFile::exists(dirname + "/." + name))
+ TQFile::remove(dirname + "/." + name);
// NetAccess considered harmfull !!!
KIO::file_move(url, destination);
break;
case defaultAction:
- QFile f(dirname + "/." + name);
+ TQFile f(dirname + "/." + name);
f.open(IO_WriteOnly);
f.close();
break;
@@ -183,13 +183,13 @@ namespace kt
{
m_loadedAction = theValue;
- QDir tmp(m_dir->url().path());
+ TQDir tmp(m_dir->url().path());
if( (m_loadedAction == moveAction) && !tmp.exists(i18n("loaded"), false))
tmp.mkdir(i18n("loaded"), false);
}
- void ScanFolder::setFolderUrl(QString& url)
+ void ScanFolder::setFolderUrl(TQString& url)
{
if(!m_dir->openURL(url)) {
m_valid = false;
@@ -201,13 +201,13 @@ namespace kt
bool ScanFolder::incomplete(const KURL & src)
{
// try to decode file, if it is syntactically correct, we can try to load it
- QFile fptr(src.path());
+ TQFile fptr(src.path());
if (!fptr.open(IO_ReadOnly))
return false;
try
{
- QByteArray data(fptr.size());
+ TQByteArray data(fptr.size());
fptr.readBlock(data.data(),fptr.size());
bt::BDecoder dec(data,false);
bt::BNode* n = dec.decode();
@@ -234,7 +234,7 @@ namespace kt
void ScanFolder::onIncompletePollingTimeout()
{
bt::Out(SYS_SNF|LOG_NOTICE) << "ScanFolder : checking incomplete files" << endl;
- for (QValueList<KURL>::iterator i = m_incompleteURLs.begin(); i != m_incompleteURLs.end();)
+ for (TQValueList<KURL>::iterator i = m_incompleteURLs.begin(); i != m_incompleteURLs.end();)
{
KURL source = *i;
if (!bt::Exists(source.path()))
diff --git a/plugins/scanfolder/scanfolder.h b/plugins/scanfolder/scanfolder.h
index 8e8c27c..fdae09a 100644
--- a/plugins/scanfolder/scanfolder.h
+++ b/plugins/scanfolder/scanfolder.h
@@ -22,11 +22,11 @@
#include <kdirlister.h>
#include <kfileitem.h>
-#include <qstring.h>
-#include <qobject.h>
-#include <qdir.h>
-#include <qvaluelist.h>
-#include <qtimer.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqdir.h>
+#include <tqvaluelist.h>
+#include <tqtimer.h>
#include <kurl.h>
namespace kt
@@ -53,9 +53,10 @@ namespace kt
* @see LoadedTorrentAction
*
*/
- class ScanFolder : public QObject
+ class ScanFolder : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -65,7 +66,7 @@ namespace kt
* @param action Action to perform on loaded torrents.
* @param openSilently Wheather to open torrent silently or not.
*/
- ScanFolder(CoreInterface* core, QString& dir, LoadedTorrentAction action = defaultAction, bool openSilently = true);
+ ScanFolder(CoreInterface* core, TQString& dir, LoadedTorrentAction action = defaultAction, bool openSilently = true);
~ScanFolder();
///Accessor method for m_openSilently.
@@ -82,7 +83,7 @@ namespace kt
bool isValid() const { return m_valid; }
///Sets directory path
- void setFolderUrl(QString& url);
+ void setFolderUrl(TQString& url);
public slots:
void onNewItems(const KFileItemList &items);
@@ -102,10 +103,10 @@ namespace kt
LoadedTorrentAction m_loadedAction;
bool m_openSilently;
- QValueList<KURL> m_pendingURLs;
- QValueList<KURL> m_incompleteURLs;
+ TQValueList<KURL> m_pendingURLs;
+ TQValueList<KURL> m_incompleteURLs;
- QTimer m_incomplePollingTimer;
+ TQTimer m_incomplePollingTimer;
};
}
#endif
diff --git a/plugins/scanfolder/scanfolderplugin.cpp b/plugins/scanfolder/scanfolderplugin.cpp
index a994243..b4bcd5c 100644
--- a/plugins/scanfolder/scanfolderplugin.cpp
+++ b/plugins/scanfolder/scanfolderplugin.cpp
@@ -25,8 +25,8 @@
#include <util/constants.h>
#include <util/log.h>
-#include <qstring.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqfile.h>
#include <kmessagebox.h>
#include <klocale.h>
@@ -43,13 +43,13 @@ K_EXPORT_COMPONENT_FACTORY(ktscanfolderplugin,KGenericFactory<kt::ScanFolderPlug
namespace kt
{
- const QString NAME = "Scan Folder";
- const QString AUTHOR = "Ivan Vasic";
- const QString EMAIL = "ivasic@gmail.com";
- const QString DESCRIPTION = i18n("Automatically scans directories for torrent files and loads them.");
+ const TQString NAME = "Scan Folder";
+ const TQString AUTHOR = "Ivan Vasic";
+ const TQString EMAIL = "ivasic@gmail.com";
+ const TQString DESCRIPTION = i18n("Automatically scans directories for torrent files and loads them.");
- ScanFolderPlugin::ScanFolderPlugin(QObject* parent, const char* name, const QStringList& args)
- : Plugin(parent, name, args,NAME,i18n("Scan Folder"),AUTHOR,EMAIL,DESCRIPTION,"view_sidetree")
+ ScanFolderPlugin::ScanFolderPlugin(TQObject* tqparent, const char* name, const TQStringList& args)
+ : Plugin(tqparent, name, args,NAME,i18n("Scan Folder"),AUTHOR,EMAIL,DESCRIPTION,"view_sidetree")
{
// setXMLFile("ktscanfolderpluginui.rc");
m_sf1 = 0;
@@ -90,13 +90,13 @@ namespace kt
void ScanFolderPlugin::updateScanFolders()
{
- QString sfPath1 = ScanFolderPluginSettings::folder1();
- QString sfPath2 = ScanFolderPluginSettings::folder2();
- QString sfPath3 = ScanFolderPluginSettings::folder3();
+ TQString sfPath1 = ScanFolderPluginSettings::folder1();
+ TQString sfPath2 = ScanFolderPluginSettings::folder2();
+ TQString sfPath3 = ScanFolderPluginSettings::folder3();
- bool valid1 = QFile::exists(sfPath1);
- bool valid2 = QFile::exists(sfPath2);
- bool valid3 = QFile::exists(sfPath3);
+ bool valid1 = TQFile::exists(sfPath1);
+ bool valid2 = TQFile::exists(sfPath2);
+ bool valid3 = TQFile::exists(sfPath3);
bool usesf1 = ScanFolderPluginSettings::useFolder1() && valid1;
bool usesf2 = ScanFolderPluginSettings::useFolder2() && valid2;
@@ -180,7 +180,7 @@ namespace kt
}
- bool ScanFolderPlugin::versionCheck(const QString & version) const
+ bool ScanFolderPlugin::versionCheck(const TQString & version) const
{
return version == KT_VERSION_MACRO;
}
diff --git a/plugins/scanfolder/scanfolderplugin.h b/plugins/scanfolder/scanfolderplugin.h
index 2ef50c1..64f2f5b 100644
--- a/plugins/scanfolder/scanfolderplugin.h
+++ b/plugins/scanfolder/scanfolderplugin.h
@@ -22,7 +22,7 @@
#include <interfaces/plugin.h>
-class QString;
+class TQString;
namespace kt
@@ -38,13 +38,14 @@ namespace kt
class ScanFolderPlugin : public Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- ScanFolderPlugin(QObject* parent, const char* name, const QStringList& args);
+ ScanFolderPlugin(TQObject* tqparent, const char* name, const TQStringList& args);
virtual ~ScanFolderPlugin();
virtual void load();
virtual void unload();
- virtual bool versionCheck(const QString& version) const;
+ virtual bool versionCheck(const TQString& version) const;
void updateScanFolders();
diff --git a/plugins/scanfolder/scanfolderprefpage.cpp b/plugins/scanfolder/scanfolderprefpage.cpp
index 9abbf0d..f5a462b 100644
--- a/plugins/scanfolder/scanfolderprefpage.cpp
+++ b/plugins/scanfolder/scanfolderprefpage.cpp
@@ -49,9 +49,9 @@ namespace kt
return true;
}
- void ScanFolderPrefPage::createWidget(QWidget* parent)
+ void ScanFolderPrefPage::createWidget(TQWidget* tqparent)
{
- m_widget = new ScanFolderPrefPageWidget(parent);
+ m_widget = new ScanFolderPrefPageWidget(tqparent);
}
void ScanFolderPrefPage::updateData()
diff --git a/plugins/scanfolder/scanfolderprefpage.h b/plugins/scanfolder/scanfolderprefpage.h
index 539a5fe..e09210b 100644
--- a/plugins/scanfolder/scanfolderprefpage.h
+++ b/plugins/scanfolder/scanfolderprefpage.h
@@ -39,7 +39,7 @@ namespace kt
virtual ~ScanFolderPrefPage();
virtual bool apply();
- virtual void createWidget(QWidget* parent);
+ virtual void createWidget(TQWidget* tqparent);
virtual void updateData();
virtual void deleteWidget();
diff --git a/plugins/scanfolder/scanfolderprefpagewidget.cpp b/plugins/scanfolder/scanfolderprefpagewidget.cpp
index b577a88..b1a6125 100644
--- a/plugins/scanfolder/scanfolderprefpagewidget.cpp
+++ b/plugins/scanfolder/scanfolderprefpagewidget.cpp
@@ -20,10 +20,10 @@
#include "scanfolderprefpagewidget.h"
#include "scanfolderpluginsettings.h"
-#include <qwidget.h>
-#include <qstring.h>
-#include <qcheckbox.h>
-#include <qfile.h>
+#include <tqwidget.h>
+#include <tqstring.h>
+#include <tqcheckbox.h>
+#include <tqfile.h>
#include <kglobal.h>
#include <klocale.h>
@@ -32,8 +32,8 @@
namespace kt
{
- ScanFolderPrefPageWidget::ScanFolderPrefPageWidget(QWidget *parent, const char *name)
- :SfPrefPageWidgetBase(parent, name)
+ ScanFolderPrefPageWidget::ScanFolderPrefPageWidget(TQWidget *tqparent, const char *name)
+ :SfPrefPageWidgetBase(tqparent, name)
{
use1->setChecked(ScanFolderPluginSettings::useFolder1());
use2->setChecked(ScanFolderPluginSettings::useFolder2());
@@ -58,9 +58,9 @@ namespace kt
bool usesf2 = use2->isChecked();
bool usesf3 = use3->isChecked();
- QString sfPath1 = url1->url();
- QString sfPath2 = url2->url();
- QString sfPath3 = url3->url();
+ TQString sfPath1 = url1->url();
+ TQString sfPath2 = url2->url();
+ TQString sfPath3 = url3->url();
bool silently = openSilently->isChecked();
bool deleteChecked = deleteCheck->isChecked();
@@ -70,26 +70,26 @@ namespace kt
ScanFolderPluginSettings::setActionDelete(deleteChecked);
ScanFolderPluginSettings::setActionMove(moveChecked);
- QString message = i18n( "ScanFolder - Folder %1: Invalid URL or folder does not exist. Please, choose a valid directory." );
- if(!QFile::exists(sfPath1) && usesf1)
+ TQString message = i18n( "ScanFolder - Folder %1: Invalid URL or folder does not exist. Please, choose a valid directory." );
+ if(!TQFile::exists(sfPath1) && usesf1)
{
- KMessageBox::sorry(0, message.arg( 1 ) );
+ KMessageBox::sorry(0, message.tqarg( 1 ) );
usesf1 = false;
}
else
ScanFolderPluginSettings::setFolder1(sfPath1);
- if(!QFile::exists(sfPath2) && usesf2)
+ if(!TQFile::exists(sfPath2) && usesf2)
{
- KMessageBox::sorry(0, message.arg( 2 ) );
+ KMessageBox::sorry(0, message.tqarg( 2 ) );
usesf2 = false;
}
else
ScanFolderPluginSettings::setFolder2(sfPath2);
- if(!QFile::exists(sfPath3) && usesf3)
+ if(!TQFile::exists(sfPath3) && usesf3)
{
- KMessageBox::sorry(0, message.arg( 3 ) );
+ KMessageBox::sorry(0, message.tqarg( 3 ) );
usesf3 = false;
}
else
diff --git a/plugins/scanfolder/scanfolderprefpagewidget.h b/plugins/scanfolder/scanfolderprefpagewidget.h
index 480b3b0..6419e1c 100644
--- a/plugins/scanfolder/scanfolderprefpagewidget.h
+++ b/plugins/scanfolder/scanfolderprefpagewidget.h
@@ -27,8 +27,9 @@ namespace kt
class ScanFolderPrefPageWidget: public SfPrefPageWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- ScanFolderPrefPageWidget(QWidget *parent = 0, const char *name = 0);
+ ScanFolderPrefPageWidget(TQWidget *tqparent = 0, const char *name = 0);
void apply();
};
diff --git a/plugins/scanfolder/sfprefwidgetbase.ui b/plugins/scanfolder/sfprefwidgetbase.ui
index 8b2c83a..a6263be 100644
--- a/plugins/scanfolder/sfprefwidgetbase.ui
+++ b/plugins/scanfolder/sfprefwidgetbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>SfPrefPageWidgetBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>SfPrefPageWidgetBase</cstring>
</property>
@@ -19,15 +19,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout16</cstring>
+ <cstring>tqlayout16</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>use1</cstring>
</property>
@@ -38,7 +38,7 @@
<string>Alt+1</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>use2</cstring>
</property>
@@ -49,7 +49,7 @@
<string>Alt+2</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>use3</cstring>
</property>
@@ -62,7 +62,7 @@
</widget>
</vbox>
</widget>
- <widget class="QButtonGroup" row="3" column="0">
+ <widget class="TQButtonGroup" row="3" column="0">
<property name="name">
<cstring>buttonGroup1</cstring>
</property>
@@ -73,7 +73,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="2" column="0">
+ <widget class="TQCheckBox" row="2" column="0">
<property name="name">
<cstring>moveCheck</cstring>
</property>
@@ -84,7 +84,7 @@
<string>Move torrent to "loaded" directory after loading it</string>
</property>
</widget>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>openSilently</cstring>
</property>
@@ -95,7 +95,7 @@
<string>Do not show 'Select files to download' dialog</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="0">
+ <widget class="TQCheckBox" row="1" column="0">
<property name="name">
<cstring>deleteCheck</cstring>
</property>
@@ -108,7 +108,7 @@
</widget>
</grid>
</widget>
- <widget class="QGroupBox" row="2" column="0">
+ <widget class="TQGroupBox" row="2" column="0">
<property name="name">
<cstring>groupBox9</cstring>
</property>
@@ -143,7 +143,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -154,7 +154,7 @@
<cstring>kURLRequester1</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -165,7 +165,7 @@
<cstring>kURLRequester4</cstring>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -188,7 +188,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -205,7 +205,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>90</height>
@@ -257,7 +257,7 @@
<tabstop>deleteCheck</tabstop>
<tabstop>moveCheck</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kurlrequester.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/plugins/scheduler/bwscheduler.cpp b/plugins/scheduler/bwscheduler.cpp
index 56375b5..a669360 100644
--- a/plugins/scheduler/bwscheduler.cpp
+++ b/plugins/scheduler/bwscheduler.cpp
@@ -31,9 +31,9 @@
#include <util/constants.h>
#include <util/log.h>
-#include <qdatetime.h>
-#include <qfile.h>
-#include <qptrlist.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
+#include <tqptrlist.h>
#include <kglobal.h>
#include <kstandarddirs.h>
@@ -160,9 +160,9 @@ namespace kt
if(!m_enabled)
return;
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::tqcurrentDateTime();
- QString prefix = QString("BWS: %1 :: ").arg(now.toString());
+ TQString prefix = TQString("BWS: %1 :: ").tqarg(now.toString());
int t1 = now.date().dayOfWeek();
int t2 = now.time().hour();
@@ -172,8 +172,8 @@ namespace kt
{
case CAT_NORMAL:
Out(SYS_SCD|LOG_NOTICE) << prefix << "Switching to NORMAL category" << endl;
- Out(SYS_SCD|LOG_NOTICE) << prefix << QString("%1 Up, %2 Down")
- .arg(m_core->getMaxUploadSpeed()).arg(m_core->getMaxDownloadSpeed()) << endl;
+ Out(SYS_SCD|LOG_NOTICE) << prefix << TQString("%1 Up, %2 Down")
+ .tqarg(m_core->getMaxUploadSpeed()).tqarg(m_core->getMaxDownloadSpeed()) << endl;
if(!m_core)
break;
m_core->setPausedState(false);
@@ -182,8 +182,8 @@ namespace kt
break;
case CAT_FIRST:
Out(SYS_SCD|LOG_NOTICE) << prefix << "Switching to FIRST category" << endl;
- Out(SYS_SCD|LOG_NOTICE) << prefix << QString("%1 Up, %2 Down")
- .arg(m_schedule.getUpload(0)).arg(m_schedule.getDownload(0)) << endl;
+ Out(SYS_SCD|LOG_NOTICE) << prefix << TQString("%1 Up, %2 Down")
+ .tqarg(m_schedule.getUpload(0)).tqarg(m_schedule.getDownload(0)) << endl;
if(!m_core)
break;
m_core->setPausedState(false);
@@ -192,8 +192,8 @@ namespace kt
break;
case CAT_SECOND:
Out(SYS_SCD|LOG_NOTICE) << prefix << "Switching to SECOND category" << endl;
- Out(SYS_SCD|LOG_NOTICE) << prefix << QString("%1 Up, %2 Down")
- .arg(m_schedule.getUpload(1)).arg(m_schedule.getDownload(1)) << endl;
+ Out(SYS_SCD|LOG_NOTICE) << prefix << TQString("%1 Up, %2 Down")
+ .tqarg(m_schedule.getUpload(1)).tqarg(m_schedule.getDownload(1)) << endl;
if(!m_core)
break;
m_core->setPausedState(false);
@@ -202,8 +202,8 @@ namespace kt
break;
case CAT_THIRD:
Out(SYS_SCD|LOG_NOTICE) << prefix << "Switching to THIRD category" << endl;
- Out(SYS_SCD|LOG_NOTICE) << prefix << QString("%1 Up, %2 Down")
- .arg(m_schedule.getUpload(2)).arg(m_schedule.getDownload(2)) << endl;
+ Out(SYS_SCD|LOG_NOTICE) << prefix << TQString("%1 Up, %2 Down")
+ .tqarg(m_schedule.getUpload(2)).tqarg(m_schedule.getDownload(2)) << endl;
if(!m_core)
break;
m_core->setPausedState(false);
@@ -222,13 +222,13 @@ namespace kt
void BWScheduler::loadSchedule()
{
- QFile file(KGlobal::dirs()->saveLocation("data","ktorrent") + "bwschedule");
+ TQFile file(KGlobal::dirs()->saveLocation("data","ktorrent") + "bwschedule");
if(!file.exists())
return;
file.open(IO_ReadOnly);
- QDataStream stream(&file);
+ TQDataStream stream(&file);
int tmp;
@@ -256,10 +256,10 @@ namespace kt
void BWScheduler::saveSchedule()
{
- QFile file(KGlobal::dirs()->saveLocation("data","ktorrent") + "bwschedule");
+ TQFile file(KGlobal::dirs()->saveLocation("data","ktorrent") + "bwschedule");
file.open(IO_WriteOnly);
- QDataStream stream(&file);
+ TQDataStream stream(&file);
for(int i=0; i<3; ++i)
{
diff --git a/plugins/scheduler/bwspage.ui b/plugins/scheduler/bwspage.ui
index af0e771..c4fb9db 100644
--- a/plugins/scheduler/bwspage.ui
+++ b/plugins/scheduler/bwspage.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>BWSPage</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>BWSPage</cstring>
</property>
@@ -12,13 +12,13 @@
<height>530</height>
</rect>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>750</width>
<height>540</height>
@@ -34,15 +34,15 @@
<property name="resizeMode">
<enum>Fixed</enum>
</property>
- <widget class="QLayoutWidget" row="0" column="1">
+ <widget class="TQLayoutWidget" row="0" column="1">
<property name="name">
- <cstring>layout21</cstring>
+ <cstring>tqlayout21</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>buttonGroup1</cstring>
</property>
@@ -53,7 +53,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton" row="1" column="1">
+ <widget class="TQRadioButton" row="1" column="1">
<property name="name">
<cstring>radio2</cstring>
</property>
@@ -61,7 +61,7 @@
<string>Categor&amp;y 1</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>pix1</cstring>
</property>
@@ -73,7 +73,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>15</height>
@@ -83,7 +83,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>pix2</cstring>
</property>
@@ -95,7 +95,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>15</height>
@@ -105,7 +105,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>pix3</cstring>
</property>
@@ -117,7 +117,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>15</height>
@@ -127,7 +127,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>pix5</cstring>
</property>
@@ -139,7 +139,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>15</height>
@@ -149,7 +149,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QRadioButton" row="4" column="1">
+ <widget class="TQRadioButton" row="4" column="1">
<property name="name">
<cstring>radio5</cstring>
</property>
@@ -157,7 +157,7 @@
<string>T&amp;urn off</string>
</property>
</widget>
- <widget class="QRadioButton" row="0" column="1">
+ <widget class="TQRadioButton" row="0" column="1">
<property name="name">
<cstring>radio1</cstring>
</property>
@@ -165,7 +165,7 @@
<string>&amp;Normal</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>pix4</cstring>
</property>
@@ -177,7 +177,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>15</height>
@@ -187,7 +187,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QRadioButton" row="3" column="1">
+ <widget class="TQRadioButton" row="3" column="1">
<property name="name">
<cstring>radio4</cstring>
</property>
@@ -198,7 +198,7 @@
<string>Alt+3</string>
</property>
</widget>
- <widget class="QRadioButton" row="2" column="1">
+ <widget class="TQRadioButton" row="2" column="1">
<property name="name">
<cstring>radio3</cstring>
</property>
@@ -211,7 +211,7 @@
</widget>
</grid>
</widget>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>buttonGroup1_2</cstring>
</property>
@@ -222,7 +222,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton" row="1" column="1">
+ <widget class="TQRadioButton" row="1" column="1">
<property name="name">
<cstring>radio22</cstring>
</property>
@@ -233,7 +233,7 @@
<string>Alt+1</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>pix12</cstring>
</property>
@@ -245,7 +245,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>15</height>
@@ -255,7 +255,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>pix22</cstring>
</property>
@@ -267,7 +267,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>15</height>
@@ -277,7 +277,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>pix32</cstring>
</property>
@@ -289,7 +289,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>15</height>
@@ -299,7 +299,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>pix52</cstring>
</property>
@@ -311,7 +311,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>15</height>
@@ -321,7 +321,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QRadioButton" row="4" column="1">
+ <widget class="TQRadioButton" row="4" column="1">
<property name="name">
<cstring>radio52</cstring>
</property>
@@ -329,7 +329,7 @@
<string>T&amp;urn off</string>
</property>
</widget>
- <widget class="QRadioButton" row="0" column="1">
+ <widget class="TQRadioButton" row="0" column="1">
<property name="name">
<cstring>radio12</cstring>
</property>
@@ -337,7 +337,7 @@
<string>&amp;Normal</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>pix42</cstring>
</property>
@@ -349,7 +349,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>30</width>
<height>15</height>
@@ -359,7 +359,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QRadioButton" row="3" column="1">
+ <widget class="TQRadioButton" row="3" column="1">
<property name="name">
<cstring>radio42</cstring>
</property>
@@ -367,7 +367,7 @@
<string>&amp;Category 3</string>
</property>
</widget>
- <widget class="QRadioButton" row="2" column="1">
+ <widget class="TQRadioButton" row="2" column="1">
<property name="name">
<cstring>radio32</cstring>
</property>
@@ -382,7 +382,7 @@
</widget>
</hbox>
</widget>
- <widget class="QGroupBox" row="1" column="1">
+ <widget class="TQGroupBox" row="1" column="1">
<property name="name">
<cstring>groupCategories_2</cstring>
</property>
@@ -393,7 +393,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel8_4</cstring>
</property>
@@ -401,7 +401,7 @@
<string>&lt;b&gt;1. Category&lt;/b&gt;</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>textLabel8_3_2</cstring>
</property>
@@ -409,15 +409,15 @@
<string>&lt;b&gt;3. Category&lt;/b&gt;</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout8</cstring>
+ <cstring>tqlayout8</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel6_5</cstring>
</property>
@@ -433,7 +433,7 @@
<number>30000</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel6_4_4</cstring>
</property>
@@ -449,7 +449,7 @@
<number>30000</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel9_4</cstring>
</property>
@@ -459,15 +459,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="3" column="0">
+ <widget class="TQLayoutWidget" row="3" column="0">
<property name="name">
- <cstring>layout9</cstring>
+ <cstring>tqlayout9</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel6_2_2</cstring>
</property>
@@ -483,7 +483,7 @@
<number>30000</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel6_4_2_2</cstring>
</property>
@@ -499,7 +499,7 @@
<number>30000</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel9_2_2</cstring>
</property>
@@ -509,15 +509,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="5" column="0">
+ <widget class="TQLayoutWidget" row="5" column="0">
<property name="name">
- <cstring>layout10</cstring>
+ <cstring>tqlayout10</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel6_3_2</cstring>
</property>
@@ -533,7 +533,7 @@
<number>30000</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel6_4_3_2</cstring>
</property>
@@ -549,7 +549,7 @@
<number>30000</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel9_3_2</cstring>
</property>
@@ -559,7 +559,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel8_2_2</cstring>
</property>
@@ -581,36 +581,36 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>379</width>
<height>510</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>379</width>
<height>508</height>
</size>
</property>
</widget>
- <widget class="QLayoutWidget" row="2" column="1">
+ <widget class="TQLayoutWidget" row="2" column="1">
<property name="name">
- <cstring>layout34</cstring>
+ <cstring>tqlayout34</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
- <cstring>lblStatus</cstring>
+ <cstring>lbltqStatus</cstring>
</property>
<property name="text">
<string></string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel10</cstring>
</property>
@@ -625,7 +625,7 @@
<property name="text">
<string>* zero means no limit</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
@@ -641,24 +641,24 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>16</height>
</size>
</property>
</spacer>
- <widget class="QLayoutWidget" row="4" column="1">
+ <widget class="TQLayoutWidget" row="4" column="1">
<property name="name">
- <cstring>layout32</cstring>
+ <cstring>tqlayout32</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout31</cstring>
+ <cstring>tqlayout31</cstring>
</property>
<vbox>
<property name="name">
@@ -700,14 +700,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>36</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>pix_icon</cstring>
</property>
@@ -728,16 +728,16 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>35</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout29</cstring>
+ <cstring>tqlayout29</cstring>
</property>
<vbox>
<property name="name">
@@ -850,15 +850,15 @@
<tabstop>dlCat3</tabstop>
<tabstop>ulCat3</tabstop>
</tabstops>
-<slots>
+<Q_SLOTS>
<slot>btnOk_clicked()</slot>
<slot>btnApply_clicked()</slot>
<slot>btnCancel_clicked()</slot>
<slot>btnSave_clicked()</slot>
<slot>btnLoad_clicked()</slot>
<slot>btnReset_clicked()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
diff --git a/plugins/scheduler/bwsprefpagewidget.cpp b/plugins/scheduler/bwsprefpagewidget.cpp
index 0c44a43..96e0613 100644
--- a/plugins/scheduler/bwsprefpagewidget.cpp
+++ b/plugins/scheduler/bwsprefpagewidget.cpp
@@ -33,25 +33,25 @@
#include <kstdguiitem.h>
#include <kpushbutton.h>
-#include <qcombobox.h>
-#include <qfile.h>
-#include <qdatastream.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
+#include <tqcombobox.h>
+#include <tqfile.h>
+#include <tqdatastream.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
namespace kt
{
/* PREF PAGE WIDGET --------------------------------------------------------*/
- BWSPrefPageWidget::BWSPrefPageWidget(QWidget* parent, const char* name, WFlags fl)
- : BWSPage(parent,name,fl)
+ BWSPrefPageWidget::BWSPrefPageWidget(TQWidget* tqparent, const char* name, WFlags fl)
+ : BWSPage(tqparent,name,fl)
{
loadDefault();
- lblStatus->clear();
+ lbltqStatus->clear();
pix_icon->setPixmap(KGlobal::iconLoader()->loadIcon("clock",KIcon::NoGroup));
@@ -67,42 +67,42 @@ namespace kt
if(use_colors) //set up colors
{
- pix1->setPaletteBackgroundColor(QColor(30,165,105));
- pix2->setPaletteBackgroundColor(QColor(195,195,70));
- pix3->setPaletteBackgroundColor(QColor(195,195,70));
- pix4->setPaletteBackgroundColor(QColor(195,195,70));
- pix5->setPaletteBackgroundColor(QColor(190,30,30));
+ pix1->setPaletteBackgroundColor(TQColor(30,165,105));
+ pix2->setPaletteBackgroundColor(TQColor(195,195,70));
+ pix3->setPaletteBackgroundColor(TQColor(195,195,70));
+ pix4->setPaletteBackgroundColor(TQColor(195,195,70));
+ pix5->setPaletteBackgroundColor(TQColor(190,30,30));
- pix12->setPaletteBackgroundColor(QColor(30,165,105));
- pix22->setPaletteBackgroundColor(QColor(195,195,70));
- pix32->setPaletteBackgroundColor(QColor(195,195,70));
- pix42->setPaletteBackgroundColor(QColor(195,195,70));
- pix52->setPaletteBackgroundColor(QColor(190,30,30));
+ pix12->setPaletteBackgroundColor(TQColor(30,165,105));
+ pix22->setPaletteBackgroundColor(TQColor(195,195,70));
+ pix32->setPaletteBackgroundColor(TQColor(195,195,70));
+ pix42->setPaletteBackgroundColor(TQColor(195,195,70));
+ pix52->setPaletteBackgroundColor(TQColor(190,30,30));
} else //set up pixmaps
{
- pix1->setPixmap(QPixmap(locate("data", QString("ktorrent/icons/cell-a-0000.png"))));
- pix2->setPixmap(QPixmap(locate("data", QString("ktorrent/icons/cell-a-0001.png"))));
- pix3->setPixmap(QPixmap(locate("data", QString("ktorrent/icons/cell-a-0002.png"))));
- pix4->setPixmap(QPixmap(locate("data", QString("ktorrent/icons/cell-a-0003.png"))));
- pix5->setPixmap(QPixmap(locate("data", QString("ktorrent/icons/cell-a-0004.png"))));
-
- pix12->setPixmap(QPixmap(locate("data", QString("ktorrent/icons/cell-a-0000.png"))));
- pix22->setPixmap(QPixmap(locate("data", QString("ktorrent/icons/cell-a-0001.png"))));
- pix32->setPixmap(QPixmap(locate("data", QString("ktorrent/icons/cell-a-0002.png"))));
- pix42->setPixmap(QPixmap(locate("data", QString("ktorrent/icons/cell-a-0003.png"))));
- pix52->setPixmap(QPixmap(locate("data", QString("ktorrent/icons/cell-a-0004.png"))));
+ pix1->setPixmap(TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0000.png"))));
+ pix2->setPixmap(TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0001.png"))));
+ pix3->setPixmap(TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0002.png"))));
+ pix4->setPixmap(TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0003.png"))));
+ pix5->setPixmap(TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0004.png"))));
+
+ pix12->setPixmap(TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0000.png"))));
+ pix22->setPixmap(TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0001.png"))));
+ pix32->setPixmap(TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0002.png"))));
+ pix42->setPixmap(TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0003.png"))));
+ pix52->setPixmap(TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0004.png"))));
}
- connect(radio1, SIGNAL(stateChanged(int)), this, SLOT(categoryChanged(int)));
- connect(radio2, SIGNAL(stateChanged(int)), this, SLOT(categoryChanged(int)));
- connect(radio3, SIGNAL(stateChanged(int)), this, SLOT(categoryChanged(int)));
- connect(radio4, SIGNAL(stateChanged(int)), this, SLOT(categoryChanged(int)));
- connect(radio5, SIGNAL(stateChanged(int)), this, SLOT(categoryChanged(int)));
- connect(radio12, SIGNAL(stateChanged(int)), this, SLOT(categoryChanged(int)));
- connect(radio22, SIGNAL(stateChanged(int)), this, SLOT(categoryChanged(int)));
- connect(radio32, SIGNAL(stateChanged(int)), this, SLOT(categoryChanged(int)));
- connect(radio42, SIGNAL(stateChanged(int)), this, SLOT(categoryChanged(int)));
- connect(radio52, SIGNAL(stateChanged(int)), this, SLOT(categoryChanged(int)));
+ connect(radio1, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(categoryChanged(int)));
+ connect(radio2, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(categoryChanged(int)));
+ connect(radio3, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(categoryChanged(int)));
+ connect(radio4, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(categoryChanged(int)));
+ connect(radio5, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(categoryChanged(int)));
+ connect(radio12, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(categoryChanged(int)));
+ connect(radio22, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(categoryChanged(int)));
+ connect(radio32, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(categoryChanged(int)));
+ connect(radio42, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(categoryChanged(int)));
+ connect(radio52, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(categoryChanged(int)));
//pre-check default categories (say 1 for left and 0 for right)
radio2->setChecked(true);
@@ -116,7 +116,7 @@ namespace kt
void BWSPrefPageWidget::btnSave_clicked()
{
- QString sf = KFileDialog::getSaveFileName("/home","*",this,i18n("Choose a filename to save under"));
+ TQString sf = KFileDialog::getSaveFileName("/home","*",this,i18n("Choose a filename to save under"));
if(sf.isEmpty())
return;
@@ -126,7 +126,7 @@ namespace kt
void BWSPrefPageWidget::btnLoad_clicked()
{
- QString lf = KFileDialog::getOpenFileName("/home", "*",this,i18n("Choose a file"));
+ TQString lf = KFileDialog::getOpenFileName("/home", "*",this,i18n("Choose a file"));
if(lf.isEmpty())
return;
@@ -135,14 +135,14 @@ namespace kt
loadSchedule(lf);
}
- void BWSPrefPageWidget::saveSchedule(QString& fn)
+ void BWSPrefPageWidget::saveSchedule(TQString& fn)
{
schedule = m_bwsWidget->schedule();
- QFile file(fn);
+ TQFile file(fn);
file.open(IO_WriteOnly);
- QDataStream stream(&file);
+ TQDataStream stream(&file);
//First category
stream << dlCat1->value();
@@ -162,12 +162,12 @@ namespace kt
stream << (int) schedule.getCategory(i, j);
file.close();
- lblStatus->setText(i18n("Schedule saved."));
+ lbltqStatus->setText(i18n("Schedule saved."));
}
- void BWSPrefPageWidget::loadSchedule(QString& fn, bool showmsg)
+ void BWSPrefPageWidget::loadSchedule(TQString& fn, bool showmsg)
{
- QFile file(fn);
+ TQFile file(fn);
if(!file.exists()) {
if(showmsg)
@@ -176,7 +176,7 @@ namespace kt
}
file.open(IO_ReadOnly);
- QDataStream stream(&file);
+ TQDataStream stream(&file);
int tmp;
@@ -205,13 +205,13 @@ namespace kt
file.close();
m_bwsWidget->setSchedule(schedule);
- lblStatus->setText(i18n("Schedule loaded."));
+ lbltqStatus->setText(i18n("Schedule loaded."));
}
void BWSPrefPageWidget::loadDefault()
{
//read schedule from HD
- QString fn = KGlobal::dirs()->saveLocation("data","ktorrent") + "bwschedule";
+ TQString fn = KGlobal::dirs()->saveLocation("data","ktorrent") + "bwschedule";
loadSchedule(fn, false);
}
@@ -228,7 +228,7 @@ namespace kt
ulCat2->setValue(0);
ulCat3->setValue(0);
- lblStatus->clear();
+ lbltqStatus->clear();
}
void BWSPrefPageWidget::apply()
diff --git a/plugins/scheduler/bwsprefpagewidget.h b/plugins/scheduler/bwsprefpagewidget.h
index ca0e80b..7529887 100644
--- a/plugins/scheduler/bwsprefpagewidget.h
+++ b/plugins/scheduler/bwsprefpagewidget.h
@@ -20,7 +20,7 @@
#ifndef KTBWSPREFPAGEWIDGET_H
#define KTBWSPREFPAGEWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "bwspage.h"
#include "bwscheduler.h"
@@ -34,8 +34,9 @@ namespace kt
class BWSPrefPageWidget : public BWSPage
{
Q_OBJECT
+ TQ_OBJECT
public:
- BWSPrefPageWidget(QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ BWSPrefPageWidget(TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 );
~BWSPrefPageWidget();
/*$PUBLIC_FUNCTIONS$*/
@@ -52,13 +53,13 @@ namespace kt
* @ref BWSPrefPageWidget::btnLoad_clicked()
* @ref BWSPrefPageWidget::loadDefault()
*/
- void loadSchedule(QString& fn, bool showmsg = true);
+ void loadSchedule(TQString& fn, bool showmsg = true);
/**
* Saves current schedule to HD.
* @param fn Schedule filename.
*/
- void saveSchedule(QString& fn);
+ void saveSchedule(TQString& fn);
public slots:
diff --git a/plugins/scheduler/bwswidget.cpp b/plugins/scheduler/bwswidget.cpp
index b430de3..4cfb3f4 100644
--- a/plugins/scheduler/bwswidget.cpp
+++ b/plugins/scheduler/bwswidget.cpp
@@ -21,26 +21,26 @@
#include "schedulerpluginsettings.h"
#include <klocale.h>
-#include <qstringlist.h>
-#include <qpixmap.h>
-#include <qtable.h>
-#include <qpainter.h>
-#include <qrect.h>
-#include <qfont.h>
-#include <qcolor.h>
+#include <tqstringlist.h>
+#include <tqpixmap.h>
+#include <tqtable.h>
+#include <tqpainter.h>
+#include <tqrect.h>
+#include <tqfont.h>
+#include <tqcolor.h>
#include <kglobal.h>
#include <kstandarddirs.h>
namespace kt
{
- BWSWidget::BWSWidget(QWidget* parent, const char* name, bool useColors)
- : QTable(parent,name), m_leftCategory(1), m_rightCategory(0), draw_focus(true), right_click(false), use_colors(useColors)
+ BWSWidget::BWSWidget(TQWidget* tqparent, const char* name, bool useColors)
+ : TQTable(tqparent,name), m_leftCategory(1), m_rightCategory(0), draw_focus(true), right_click(false), use_colors(useColors)
{
use_colors = SchedulerPluginSettings::useColors();
- QStringList days;
- QStringList hours;
+ TQStringList days;
+ TQStringList hours;
days << i18n("MON") << i18n("TUE") << i18n("WED") << i18n("THU") << i18n("FRI") << i18n("SAT") << i18n("SUN");
hours <<
@@ -63,9 +63,9 @@ namespace kt
setColumnLabels(days);
setRowLabels(hours);
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQ_StrongFocus);
- QFont f;
+ TQFont f;
f.setPointSize(8);
setFont(f);
@@ -96,13 +96,13 @@ namespace kt
resetSchedule();
- setSelectionMode(QTable::NoSelection);
+ setSelectionMode(TQTable::NoSelection);
- setHScrollBarMode(QTable::AlwaysOff);
- setVScrollBarMode(QTable::AlwaysOff);
+ setHScrollBarMode(TQTable::AlwaysOff);
+ setVScrollBarMode(TQTable::AlwaysOff);
- connect(this, SIGNAL(currentChanged( int, int )), this, SLOT(cellSelectionChanged( int, int )));
- connect(this, SIGNAL(pressed(int, int, int, const QPoint&)), this, SLOT(cellMouseDown(int, int, int, const QPoint& )));
+ connect(this, TQT_SIGNAL(currentChanged( int, int )), this, TQT_SLOT(cellSelectionChanged( int, int )));
+ connect(this, TQT_SIGNAL(pressed(int, int, int, const TQPoint&)), this, TQT_SLOT(cellMouseDown(int, int, int, const TQPoint& )));
}
BWSWidget::~BWSWidget()
@@ -115,7 +115,7 @@ namespace kt
}
}
- void BWSWidget::paintFocus(QPainter* p, const QRect& cr)
+ void BWSWidget::paintFocus(TQPainter* p, const TQRect& cr)
{
int x = rowAt(cr.y());
int y = columnAt(cr.x());
@@ -146,12 +146,12 @@ namespace kt
void BWSWidget::cellSelectionChanged(int row, int col)
{
if(right_click)
- setText(row, col, QString::number(m_rightCategory));
+ setText(row, col, TQString::number(m_rightCategory));
else
- setText(row, col, QString::number(m_leftCategory));
+ setText(row, col, TQString::number(m_leftCategory));
}
- void BWSWidget::paintCell(QPainter* p, int row, int col, const QRect& cr, bool selected)
+ void BWSWidget::paintCell(TQPainter* p, int row, int col, const TQRect& cr, bool selected)
{
if(selected)
return;
@@ -161,8 +161,8 @@ namespace kt
if((ok || cat == 0) && cat >= 0 && cat <= 4)
drawCell(p, cat);
else
- setText(row,col,QString::number(0));
- // QTable::paintCell(p,row,col,cr,selected);
+ setText(row,col,TQString::number(0));
+ // TQTable::paintCell(p,row,col,cr,selected);
}
void BWSWidget::resetSchedule()
@@ -175,14 +175,14 @@ namespace kt
updateHeaderStates();
}
- void BWSWidget::repaintWidget()
+ void BWSWidget::tqrepaintWidget()
{
for(int i=0; i<7; ++i)
for(int j=0; j<24; ++j)
updateCell(j,i);
}
- void BWSWidget::cellMouseDown(int row, int col, int button, const QPoint& mousePos)
+ void BWSWidget::cellMouseDown(int row, int col, int button, const TQPoint& mousePos)
{
right_click = button == 2;
draw_focus = true;
@@ -194,7 +194,7 @@ namespace kt
draw_focus = false;
clearSelection();
updateHeaderStates();
- repaintWidget();
+ tqrepaintWidget();
}
void BWSWidget::setLeftCategory(const int& theValue)
@@ -213,7 +213,7 @@ namespace kt
use_colors = theValue;
}
- void BWSWidget::drawCell(QPainter* p, int category, bool focus)
+ void BWSWidget::drawCell(TQPainter* p, int category, bool focus)
{
if(use_colors) {
if(focus) {
@@ -224,15 +224,15 @@ namespace kt
switch(category) {
case 0:
- // p->drawText(QRect(0,0,40,20), Qt::AlignCenter | Qt::SingleLine, "normalllll");
+ // p->drawText(TQRect(0,0,40,20), TQt::AlignCenter | TQt::SingleLine, "normalllll");
break;
case 1:
case 2:
case 3:
- p->drawText(QRect(0,0,40,20), Qt::AlignCenter | Qt::SingleLine, QString::number(category));
+ p->drawText(TQRect(0,0,40,20), TQt::AlignCenter | TQt::SingleLine, TQString::number(category));
break;
case 4:
- p->drawText(QRect(0,0,40,20), Qt::AlignCenter | Qt::SingleLine, "off");
+ p->drawText(TQRect(0,0,40,20), TQt::AlignCenter | TQt::SingleLine, "off");
break;
}
@@ -258,17 +258,17 @@ namespace kt
m_pixf[i] = 0;
}
- m_color[0] = new QColor(30,165,105);
- m_color[1] = new QColor(195,195,70);
- m_color[2] = new QColor(195,195,70);
- m_color[3] = new QColor(195,195,70);
- m_color[4] = new QColor(190,30,30);
+ m_color[0] = new TQColor(30,165,105);
+ m_color[1] = new TQColor(195,195,70);
+ m_color[2] = new TQColor(195,195,70);
+ m_color[3] = new TQColor(195,195,70);
+ m_color[4] = new TQColor(190,30,30);
- m_colorf[0] = new QColor(40,200,130);
- m_colorf[1] = new QColor(210,220,130);
- m_colorf[2] = new QColor(210,220,130);
- m_colorf[3] = new QColor(210,220,130);
- m_colorf[4] = new QColor(230,40,40);
+ m_colorf[0] = new TQColor(40,200,130);
+ m_colorf[1] = new TQColor(210,220,130);
+ m_colorf[2] = new TQColor(210,220,130);
+ m_colorf[3] = new TQColor(210,220,130);
+ m_colorf[4] = new TQColor(230,40,40);
} else {
for(int i=0; i<5; ++i) {
@@ -281,22 +281,22 @@ namespace kt
m_colorf[i] = 0;
}
- m_pix[0] = new QPixmap(locate("data", QString("ktorrent/icons/cell-a-0000.png")));
- m_pix[1] = new QPixmap(locate("data", QString("ktorrent/icons/cell-a-0001.png")));
- m_pix[2] = new QPixmap(locate("data", QString("ktorrent/icons/cell-a-0002.png")));
- m_pix[3] = new QPixmap(locate("data", QString("ktorrent/icons/cell-a-0003.png")));
- m_pix[4] = new QPixmap(locate("data", QString("ktorrent/icons/cell-a-0004.png")));
-
- m_pixf[0] = new QPixmap(locate("data", QString("ktorrent/icons/cell-b-0000.png")));
- m_pixf[1] = new QPixmap(locate("data", QString("ktorrent/icons/cell-b-0001.png")));
- m_pixf[2] = new QPixmap(locate("data", QString("ktorrent/icons/cell-b-0002.png")));
- m_pixf[3] = new QPixmap(locate("data", QString("ktorrent/icons/cell-b-0003.png")));
- m_pixf[4] = new QPixmap(locate("data", QString("ktorrent/icons/cell-b-0004.png")));
+ m_pix[0] = new TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0000.png")));
+ m_pix[1] = new TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0001.png")));
+ m_pix[2] = new TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0002.png")));
+ m_pix[3] = new TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0003.png")));
+ m_pix[4] = new TQPixmap(locate("data", TQString("ktorrent/icons/cell-a-0004.png")));
+
+ m_pixf[0] = new TQPixmap(locate("data", TQString("ktorrent/icons/cell-b-0000.png")));
+ m_pixf[1] = new TQPixmap(locate("data", TQString("ktorrent/icons/cell-b-0001.png")));
+ m_pixf[2] = new TQPixmap(locate("data", TQString("ktorrent/icons/cell-b-0002.png")));
+ m_pixf[3] = new TQPixmap(locate("data", TQString("ktorrent/icons/cell-b-0003.png")));
+ m_pixf[4] = new TQPixmap(locate("data", TQString("ktorrent/icons/cell-b-0004.png")));
}
use_colors = color;
- repaintWidget();
+ tqrepaintWidget();
}
void BWSWidget::setSchedule(const BWS& theValue)
@@ -304,7 +304,7 @@ namespace kt
m_schedule = theValue;
for(int i=0; i<7; ++i)
for(int j=0; j<24; ++j)
- setText(j,i, QString::number((int) m_schedule.getCategory(i,j)));
+ setText(j,i, TQString::number((int) m_schedule.getCategory(i,j)));
}
const BWS& BWSWidget::schedule()
@@ -326,7 +326,7 @@ namespace kt
return m_schedule;
}
- void BWSWidget::focusOutEvent(QFocusEvent* e)
+ void BWSWidget::focusOutEvent(TQFocusEvent* e)
{
if(e->lostFocus())
clearSelect();
diff --git a/plugins/scheduler/bwswidget.h b/plugins/scheduler/bwswidget.h
index c035edb..bd0a94d 100644
--- a/plugins/scheduler/bwswidget.h
+++ b/plugins/scheduler/bwswidget.h
@@ -20,10 +20,10 @@
#ifndef KTBWSWIDGET_H
#define KTBWSWIDGET_H
-#include <qtable.h>
-#include <qpixmap.h>
-#include <qpoint.h>
-#include <qcolor.h>
+#include <tqtable.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
+#include <tqcolor.h>
#include "bwscheduler.h"
@@ -39,17 +39,18 @@ namespace kt
/**
* @brief Bandwidth scheduler widget.
* @author Ivan Vasić <ivasic@gmail.com>
- * This class is a QTable with customized cells. It's used for bandwidth scheduling by painting each cell with mouse moves or keyboard.
+ * This class is a TQTable with customized cells. It's used for bandwidth scheduling by painting each cell with mouse moves or keyboard.
*/
- class BWSWidget : public QTable
+ class BWSWidget : public TQTable
{
Q_OBJECT
+ TQ_OBJECT
public:
- BWSWidget(QWidget* parent = 0, const char* name = 0, bool useColors = true);
+ BWSWidget(TQWidget* tqparent = 0, const char* name = 0, bool useColors = true);
~BWSWidget();
///Repaints the whole widget
- void repaintWidget();
+ void tqrepaintWidget();
///Clears selection (removes focus)
void clearSelect();
@@ -77,19 +78,19 @@ namespace kt
private slots:
void cellSelectionChanged(int row, int col);
- void cellMouseDown(int row, int col, int button, const QPoint& mousePos);
+ void cellMouseDown(int row, int col, int button, const TQPoint& mousePos);
private:
- void paintFocus(QPainter* p, const QRect& cr);
- void paintCell(QPainter* p, int row, int col, const QRect& cr, bool selected);
- void drawCell(QPainter* p, int category, bool focus = false);
- void focusOutEvent(QFocusEvent*);
+ void paintFocus(TQPainter* p, const TQRect& cr);
+ void paintCell(TQPainter* p, int row, int col, const TQRect& cr, bool selected);
+ void drawCell(TQPainter* p, int category, bool focus = false);
+ void focusOutEvent(TQFocusEvent*);
- QPixmap* m_pix[5];
- QPixmap* m_pixf[5];
+ TQPixmap* m_pix[5];
+ TQPixmap* m_pixf[5];
- QColor* m_color[5];
- QColor* m_colorf[5];
+ TQColor* m_color[5];
+ TQColor* m_colorf[5];
int m_leftCategory;
int m_rightCategory;
diff --git a/plugins/scheduler/schedulerpage.ui b/plugins/scheduler/schedulerpage.ui
index 01a4f47..1a42edf 100644
--- a/plugins/scheduler/schedulerpage.ui
+++ b/plugins/scheduler/schedulerpage.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>SchedulerPage</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>SchedulerPage</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>useBS</cstring>
</property>
@@ -27,7 +27,7 @@
<string>Use &amp;bandwidth scheduler?</string>
</property>
</widget>
- <widget class="QGroupBox" row="1" column="0">
+ <widget class="TQGroupBox" row="1" column="0">
<property name="name">
<cstring>groupBWS</cstring>
</property>
@@ -38,7 +38,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>useColors</cstring>
</property>
@@ -46,7 +46,7 @@
<string>Use colors instead of pi&amp;xmaps?</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="2">
+ <widget class="TQLabel" row="0" column="2">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -54,7 +54,7 @@
<string>(Recommended for slower systems)</string>
</property>
</widget>
- <widget class="QPushButton" row="2" column="0">
+ <widget class="TQPushButton" row="2" column="0">
<property name="name">
<cstring>btnEditBWS</cstring>
</property>
@@ -72,7 +72,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>40</width>
<height>20</height>
@@ -89,7 +89,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>80</height>
@@ -108,7 +108,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>40</height>
@@ -137,10 +137,10 @@
<slot>useColors_toggled(bool)</slot>
</connection>
</connections>
-<slots>
+<Q_SLOTS>
<slot>btnEditBWS_toggled(bool)</slot>
<slot>btnEditBWS_clicked()</slot>
<slot>useColors_toggled(bool)</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/plugins/scheduler/schedulerplugin.cpp b/plugins/scheduler/schedulerplugin.cpp
index 7639293..9177ebb 100644
--- a/plugins/scheduler/schedulerplugin.cpp
+++ b/plugins/scheduler/schedulerplugin.cpp
@@ -24,9 +24,9 @@
#include <util/constants.h>
#include <util/log.h>
-#include <qstring.h>
-#include <qtimer.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqtimer.h>
+#include <tqdatetime.h>
#include <kmessagebox.h>
#include <klocale.h>
@@ -50,17 +50,17 @@ K_EXPORT_COMPONENT_FACTORY(ktschedulerplugin,KGenericFactory<kt::SchedulerPlugin
namespace kt
{
- const QString NAME = "Bandwith Scheduler";
- const QString AUTHOR = "Ivan Vasic";
- const QString EMAIL = "ivasic@gmail.com";
- const QString DESCRIPTION = i18n("Bandwidth scheduling plugin");
+ const TQString NAME = "Bandwith Scheduler";
+ const TQString AUTHOR = "Ivan Vasic";
+ const TQString EMAIL = "ivasic@gmail.com";
+ const TQString DESCRIPTION = i18n("Bandwidth scheduling plugin");
- SchedulerPlugin::SchedulerPlugin(QObject* parent, const char* name, const QStringList& args)
- : Plugin(parent, name, args,NAME,i18n("Bandwidth Scheduler"),AUTHOR,EMAIL,DESCRIPTION, "clock")
+ SchedulerPlugin::SchedulerPlugin(TQObject* tqparent, const char* name, const TQStringList& args)
+ : Plugin(tqparent, name, args,NAME,i18n("Bandwidth Scheduler"),AUTHOR,EMAIL,DESCRIPTION, "clock")
{
setXMLFile("ktschedulerpluginui.rc");
bws_action = 0;
- connect(&m_timer, SIGNAL(timeout()), this, SLOT(timer_triggered()));
+ connect(&m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timer_triggered()));
}
@@ -74,17 +74,17 @@ namespace kt
getGUI()->addPrefPage(Pref);
BWScheduler::instance().setCoreInterface(getCore());
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::tqcurrentDateTime();
//each hour
- QDateTime hour = now.addSecs(3600);
- QTime t(hour.time().hour(), 0);
+ TQDateTime hour = now.addSecs(3600);
+ TQTime t(hour.time().hour(), 0);
//each minute
-// QDateTime hour = now.addSecs(60);
-// QTime t(hour.time().hour(), hour.time().minute());
+// TQDateTime hour = now.addSecs(60);
+// TQTime t(hour.time().hour(), hour.time().minute());
- QDateTime round(hour.date(), t);
+ TQDateTime round(hour.date(), t);
// add a 5 second safety margin (BUG: 131246)
int secs_to = now.secsTo(round) + 5;
@@ -95,7 +95,7 @@ namespace kt
// updateEnabledBWS();
bws_action = new KAction(i18n("Open Bandwidth Scheduler" ), "clock", 0, this,
- SLOT(openBWS()), actionCollection(), "bwscheduler" );
+ TQT_SLOT(openBWS()), actionCollection(), "bwscheduler" );
}
void SchedulerPlugin::unload()
@@ -115,7 +115,7 @@ namespace kt
void SchedulerPlugin::timer_triggered()
{
m_timer.changeInterval(3600*1000);
- QDateTime now = QDateTime::currentDateTime();
+ TQDateTime now = TQDateTime::tqcurrentDateTime();
BWScheduler::instance().trigger();
}
@@ -135,7 +135,7 @@ namespace kt
if(SchedulerPluginSettings::enableBWS())
{
bws_action = new KAction(i18n("Open Bandwidth Scheduler" ), "clock", 0, this,
- SLOT(openBWS()), actionCollection(), "bwscheduler" );
+ TQT_SLOT(openBWS()), actionCollection(), "bwscheduler" );
}
else
{
@@ -145,7 +145,7 @@ namespace kt
}
}
- bool SchedulerPlugin::versionCheck(const QString & version) const
+ bool SchedulerPlugin::versionCheck(const TQString & version) const
{
return version == KT_VERSION_MACRO;
}
diff --git a/plugins/scheduler/schedulerplugin.h b/plugins/scheduler/schedulerplugin.h
index 6828d0d..96dad21 100644
--- a/plugins/scheduler/schedulerplugin.h
+++ b/plugins/scheduler/schedulerplugin.h
@@ -24,11 +24,11 @@
#include "schedulerprefpage.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kstdaction.h>
-class QString;
+class TQString;
namespace kt
@@ -43,13 +43,14 @@ namespace kt
class SchedulerPlugin : public Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- SchedulerPlugin(QObject* parent, const char* name, const QStringList& args);
+ SchedulerPlugin(TQObject* tqparent, const char* name, const TQStringList& args);
virtual ~SchedulerPlugin();
virtual void load();
virtual void unload();
- virtual bool versionCheck(const QString& version) const;
+ virtual bool versionCheck(const TQString& version) const;
void updateEnabledBWS();
@@ -58,7 +59,7 @@ namespace kt
void openBWS();
private:
- QTimer m_timer;
+ TQTimer m_timer;
/* BANDWIDTH SCHEDULE PLUGIN */
SchedulerPrefPage* Pref;
diff --git a/plugins/scheduler/schedulerprefpage.cpp b/plugins/scheduler/schedulerprefpage.cpp
index fe82f34..076fb5c 100644
--- a/plugins/scheduler/schedulerprefpage.cpp
+++ b/plugins/scheduler/schedulerprefpage.cpp
@@ -48,9 +48,9 @@ namespace kt
return true;
}
- void SchedulerPrefPage::createWidget( QWidget * parent )
+ void SchedulerPrefPage::createWidget( TQWidget * tqparent )
{
- widget = new SchedulerPrefPageWidget(parent);
+ widget = new SchedulerPrefPageWidget(tqparent);
}
void SchedulerPrefPage::updateData()
diff --git a/plugins/scheduler/schedulerprefpage.h b/plugins/scheduler/schedulerprefpage.h
index a10a98a..a2efa21 100644
--- a/plugins/scheduler/schedulerprefpage.h
+++ b/plugins/scheduler/schedulerprefpage.h
@@ -40,7 +40,7 @@ namespace kt
virtual ~SchedulerPrefPage();
virtual bool apply();
- virtual void createWidget(QWidget* parent);
+ virtual void createWidget(TQWidget* tqparent);
virtual void updateData();
virtual void deleteWidget();
diff --git a/plugins/scheduler/schedulerprefpagewidget.cpp b/plugins/scheduler/schedulerprefpagewidget.cpp
index d6e73dd..ad12e73 100644
--- a/plugins/scheduler/schedulerprefpagewidget.cpp
+++ b/plugins/scheduler/schedulerprefpagewidget.cpp
@@ -22,16 +22,16 @@
#include "bwscheduler.h"
#include "schedulerpluginsettings.h"
-#include <qcheckbox.h>
-#include <qtimer.h>
-#include <qpushbutton.h>
-#include <qgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqtimer.h>
+#include <tqpushbutton.h>
+#include <tqgroupbox.h>
namespace kt
{
- SchedulerPrefPageWidget::SchedulerPrefPageWidget(QWidget* parent, const char* name, WFlags fl)
- : SchedulerPage(parent,name,fl)
+ SchedulerPrefPageWidget::SchedulerPrefPageWidget(TQWidget* tqparent, const char* name, WFlags fl)
+ : SchedulerPage(tqparent,name,fl)
{
groupBWS->setEnabled(false);
bool useit = SchedulerPluginSettings::enableBWS();
@@ -59,9 +59,9 @@ namespace kt
SchedulerPluginSettings::writeConfig();
/* force trigger since the schedule has changed but after KTorrent::apply()
- * Used QTimer with fixed interval - not very nice solution... */
+ * Used TQTimer with fixed interval - not very nice solution... */
if(useBS->isChecked())
- QTimer::singleShot(1000, this, SLOT(scheduler_trigger()));
+ TQTimer::singleShot(1000, this, TQT_SLOT(scheduler_trigger()));
BWScheduler::instance().setEnabled(use_bws);
}
diff --git a/plugins/scheduler/schedulerprefpagewidget.h b/plugins/scheduler/schedulerprefpagewidget.h
index 9f62c20..5274f3d 100644
--- a/plugins/scheduler/schedulerprefpagewidget.h
+++ b/plugins/scheduler/schedulerprefpagewidget.h
@@ -20,7 +20,7 @@
#ifndef KTSCHEDULERPREFPAGEWIDGET_H
#define KTSCHEDULERPREFPAGEWIDGET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include "schedulerpage.h"
namespace kt
@@ -32,8 +32,9 @@ namespace kt
class SchedulerPrefPageWidget : public SchedulerPage
{
Q_OBJECT
+ TQ_OBJECT
public:
- SchedulerPrefPageWidget(QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ SchedulerPrefPageWidget(TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 );
~SchedulerPrefPageWidget();
diff --git a/plugins/search/htmlpart.cpp b/plugins/search/htmlpart.cpp
index b1c6b23..00d5326 100644
--- a/plugins/search/htmlpart.cpp
+++ b/plugins/search/htmlpart.cpp
@@ -20,9 +20,9 @@
#include <kmessagebox.h>
#include <kio/job.h>
#include <kio/jobclasses.h>
-//#include <qfile.h>
-#include <qclipboard.h>
-#include <qapplication.h>
+//#include <tqfile.h>
+#include <tqclipboard.h>
+#include <tqapplication.h>
#include <kio/netaccess.h>
#include <klocale.h>
#include <kfiledialog.h>
@@ -36,8 +36,8 @@ using namespace bt;
namespace kt
{
- HTMLPart::HTMLPart(QWidget *parent)
- : KHTMLPart(parent)
+ HTMLPart::HTMLPart(TQWidget *tqparent)
+ : KHTMLPart(tqparent)
{
setJScriptEnabled(true);
setJavaEnabled(true);
@@ -45,8 +45,8 @@ namespace kt
setPluginsEnabled(false);
setStatusMessagesEnabled(false);
KParts::BrowserExtension* ext = this->browserExtension();
- connect(ext,SIGNAL(openURLRequest(const KURL&,const KParts::URLArgs&)),
- this,SLOT(openURLRequest(const KURL&, const KParts::URLArgs& )));
+ connect(ext,TQT_SIGNAL(openURLRequest(const KURL&,const KParts::URLArgs&)),
+ this,TQT_SLOT(openURLRequest(const KURL&, const KParts::URLArgs& )));
ext->enableAction("copy",true);
ext->enableAction("paste",true);
@@ -59,11 +59,11 @@ namespace kt
void HTMLPart::copy()
{
- QString txt = selectedText();
- QClipboard *cb = QApplication::clipboard();
+ TQString txt = selectedText();
+ TQClipboard *cb = TQApplication::tqclipboard();
// Copy text into the clipboard
if (cb)
- cb->setText(txt,QClipboard::Clipboard);
+ cb->setText(txt,TQClipboard::Clipboard);
}
void HTMLPart::openURLRequest(const KURL &u,const KParts::URLArgs &)
@@ -75,15 +75,15 @@ namespace kt
}
KIO::TransferJob* j = KIO::get(u,false,false);
- connect(j,SIGNAL(data(KIO::Job*,const QByteArray &)),
- this,SLOT(dataRecieved(KIO::Job*, const QByteArray& )));
- connect(j,SIGNAL(result(KIO::Job*)),this,SLOT(jobDone(KIO::Job* )));
- connect(j,SIGNAL(mimetype(KIO::Job*, const QString &)),
- this,SLOT(mimetype(KIO::Job*, const QString& )));
+ connect(j,TQT_SIGNAL(data(KIO::Job*,const TQByteArray &)),
+ this,TQT_SLOT(dataRecieved(KIO::Job*, const TQByteArray& )));
+ connect(j,TQT_SIGNAL(result(KIO::Job*)),this,TQT_SLOT(jobDone(KIO::Job* )));
+ connect(j,TQT_SIGNAL(mimetype(KIO::Job*, const TQString &)),
+ this,TQT_SLOT(mimetype(KIO::Job*, const TQString& )));
active_job = j;
curr_data.resize(0);
- mime_type = QString::null;
+ mime_type = TQString();
curr_url = u;
}
@@ -115,7 +115,7 @@ namespace kt
openURL(url());
}
- void HTMLPart::dataRecieved(KIO::Job* job,const QByteArray & data)
+ void HTMLPart::dataRecieved(KIO::Job* job,const TQByteArray & data)
{
if (job != active_job)
{
@@ -134,7 +134,7 @@ namespace kt
}
}
- void HTMLPart::mimetype(KIO::Job* job,const QString & mt)
+ void HTMLPart::mimetype(KIO::Job* job,const TQString & mt)
{
if (job != active_job)
{
@@ -191,7 +191,7 @@ namespace kt
active_job = 0;
curr_data.resize(0);
curr_url = KURL();
- mime_type = QString::null;
+ mime_type = TQString();
}
}
diff --git a/plugins/search/htmlpart.h b/plugins/search/htmlpart.h
index f5b78ee..8b400dc 100644
--- a/plugins/search/htmlpart.h
+++ b/plugins/search/htmlpart.h
@@ -37,8 +37,9 @@ namespace kt
class HTMLPart : public KHTMLPart
{
Q_OBJECT
+ TQ_OBJECT
public:
- HTMLPart(QWidget *parent = 0);
+ HTMLPart(TQWidget *tqparent = 0);
virtual ~HTMLPart();
public slots:
@@ -49,8 +50,8 @@ namespace kt
private slots:
void addToHistory(const KURL & url);
- void dataRecieved(KIO::Job* job,const QByteArray & data);
- void mimetype(KIO::Job* job,const QString & mt);
+ void dataRecieved(KIO::Job* job,const TQByteArray & data);
+ void mimetype(KIO::Job* job,const TQString & mt);
void jobDone(KIO::Job* job);
@@ -63,8 +64,8 @@ namespace kt
private:
KURL::List history;
KIO::Job* active_job;
- QByteArray curr_data;
- QString mime_type;
+ TQByteArray curr_data;
+ TQString mime_type;
KURL curr_url;
};
}
diff --git a/plugins/search/searchbar.ui b/plugins/search/searchbar.ui
index 2b91ea0..a0e0db0 100644
--- a/plugins/search/searchbar.ui
+++ b/plugins/search/searchbar.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>SearchBar</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>SearchBar</cstring>
</property>
@@ -63,14 +63,14 @@
<property name="sizeType">
<enum>Maximum</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>60</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -87,7 +87,7 @@
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kpushbutton.h</includehint>
<includehint>kpushbutton.h</includehint>
diff --git a/plugins/search/searchenginelist.cpp b/plugins/search/searchenginelist.cpp
index cf7a11b..9e22990 100644
--- a/plugins/search/searchenginelist.cpp
+++ b/plugins/search/searchenginelist.cpp
@@ -17,9 +17,9 @@
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
#include "searchenginelist.h"
using namespace bt;
@@ -34,36 +34,36 @@ namespace kt
SearchEngineList::~SearchEngineList()
{}
- void SearchEngineList::save(const QString& file)
+ void SearchEngineList::save(const TQString& file)
{
- QFile fptr(file);
+ TQFile fptr(file);
if (!fptr.open(IO_WriteOnly))
return;
- QTextStream out(&fptr);
+ TQTextStream out(&fptr);
out << "# PLEASE DO NOT MODIFY THIS FILE. Use KTorrent configuration dialog for adding new search engines." << ::endl;
out << "# SEARCH ENGINES list" << ::endl;
- QValueList<SearchEngine>::iterator i = m_search_engines.begin();
+ TQValueList<SearchEngine>::iterator i = m_search_engines.begin();
while (i != m_search_engines.end())
{
SearchEngine & e = *i;
// replace spaces by %20
- QString name = e.name;
- name = name.replace(" ","%20");
- QString u = e.url.prettyURL();
- u = u.replace(" ","%20");
+ TQString name = e.name;
+ name = name.tqreplace(" ","%20");
+ TQString u = e.url.prettyURL();
+ u = u.tqreplace(" ","%20");
out << name << " " << u << ::endl;
i++;
}
}
- void SearchEngineList::load(const QString& file)
+ void SearchEngineList::load(const TQString& file)
{
m_search_engines.clear();
- QFile fptr(file);
+ TQFile fptr(file);
if(!fptr.exists())
makeDefaultFile(file);
@@ -71,21 +71,21 @@ namespace kt
if (!fptr.open(IO_ReadOnly))
return;
- QTextStream in(&fptr);
+ TQTextStream in(&fptr);
int id = 0;
while (!in.atEnd())
{
- QString line = in.readLine();
+ TQString line = in.readLine();
if(line.startsWith("#") || line.startsWith(" ") || line.isEmpty() ) continue;
- QStringList tokens = QStringList::split(" ", line);
+ TQStringList tokens = TQStringList::split(" ", line);
SearchEngine se;
se.name = tokens[0];
- se.name = se.name.replace("%20"," ");
+ se.name = se.name.tqreplace("%20"," ");
se.url = KURL::fromPathOrURL(tokens[1]);
for(Uint32 i=2; i<tokens.count(); ++i)
@@ -95,13 +95,13 @@ namespace kt
}
}
- void SearchEngineList::makeDefaultFile(const QString& file)
+ void SearchEngineList::makeDefaultFile(const TQString& file)
{
- QFile fptr(file);
+ TQFile fptr(file);
if (!fptr.open(IO_WriteOnly))
return;
- QTextStream out(&fptr);
+ TQTextStream out(&fptr);
out << "# PLEASE DO NOT MODIFY THIS FILE. Use KTorrent configuration dialog for adding new search engines." << ::endl;
out << "# SEARCH ENGINES list" << ::endl;
out << "KTorrents http://www.ktorrents.com/search.php?lg=0&sourceid=ktorrent&q=FOOBAR&f=0" << ::endl;
@@ -123,10 +123,10 @@ namespace kt
return m_search_engines[engine].url;
}
- QString SearchEngineList::getEngineName(bt::Uint32 engine) const
+ TQString SearchEngineList::getEngineName(bt::Uint32 engine) const
{
if (engine >= m_search_engines.count())
- return QString::null;
+ return TQString();
else
return m_search_engines[engine].name;
}
diff --git a/plugins/search/searchenginelist.h b/plugins/search/searchenginelist.h
index 236b8eb..4b4d68e 100644
--- a/plugins/search/searchenginelist.h
+++ b/plugins/search/searchenginelist.h
@@ -21,7 +21,7 @@
#define KTSEARCHENGINELIST_H
#include <kurl.h>
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <util/constants.h>
namespace kt
@@ -35,21 +35,21 @@ namespace kt
{
struct SearchEngine
{
- QString name;
+ TQString name;
KURL url;
};
- QValueList<SearchEngine> m_search_engines;
+ TQValueList<SearchEngine> m_search_engines;
public:
SearchEngineList();
virtual ~SearchEngineList();
- void save(const QString& file);
- void load(const QString& file);
- void makeDefaultFile(const QString& file);
+ void save(const TQString& file);
+ void load(const TQString& file);
+ void makeDefaultFile(const TQString& file);
KURL getSearchURL(bt::Uint32 engine) const;
- QString getEngineName(bt::Uint32 engine) const;
+ TQString getEngineName(bt::Uint32 engine) const;
/// Get the number of engines
bt::Uint32 getNumEngines() const {return m_search_engines.count();}
diff --git a/plugins/search/searchplugin.cpp b/plugins/search/searchplugin.cpp
index c674369..8638dfe 100644
--- a/plugins/search/searchplugin.cpp
+++ b/plugins/search/searchplugin.cpp
@@ -46,8 +46,8 @@ K_EXPORT_COMPONENT_FACTORY(ktsearchplugin,KGenericFactory<kt::SearchPlugin>("kts
namespace kt
{
- SearchPlugin::SearchPlugin(QObject* parent, const char* name, const QStringList& args)
- : Plugin(parent, name, args,NAME,i18n("Search"),AUTHOR,EMAIL,
+ SearchPlugin::SearchPlugin(TQObject* tqparent, const char* name, const TQStringList& args)
+ : Plugin(tqparent, name, args,NAME,i18n("Search"),AUTHOR,EMAIL,
i18n("Search for torrents on several popular torrent search engines"),"viewmag")
{
// setXMLFile("ktsearchpluginui.rc");
@@ -65,8 +65,8 @@ namespace kt
engines.load(KGlobal::dirs()->saveLocation("data","ktorrent") + "search_engines");
KToolBar* tb = getGUI()->addToolBar("search");
tab = new SearchTab(tb);
- connect(tab,SIGNAL(search( const QString&, int, bool )),
- this,SLOT(search( const QString&, int, bool )));
+ connect(tab,TQT_SIGNAL(search( const TQString&, int, bool )),
+ this,TQT_SLOT(search( const TQString&, int, bool )));
pref = new SearchPrefPage(this);
getGUI()->addPrefPage(pref);
@@ -92,7 +92,7 @@ namespace kt
tab = 0;
}
- void SearchPlugin::search(const QString & text,int engine,bool external)
+ void SearchPlugin::search(const TQString & text,int engine,bool external)
{
if(external)
{
@@ -101,14 +101,14 @@ namespace kt
if (engine < 0 || engine >= sl.getNumEngines())
engine = 0;
- QString s_url = sl.getSearchURL(engine).prettyURL();
- s_url.replace("FOOBAR", KURL::encode_string(text), true);
+ TQString s_url = sl.getSearchURL(engine).prettyURL();
+ s_url.tqreplace("FOOBAR", KURL::encode_string(text), true);
KURL url = KURL::fromPathOrURL(s_url);
if(SearchPluginSettings::useDefaultBrowser())
kapp->invokeBrowser(url.url());
else
- KRun::runCommand(QString("%1 \"%2\"").arg(SearchPluginSettings::customBrowser()).arg(url.url()), SearchPluginSettings::customBrowser(), "viewmag" );
+ KRun::runCommand(TQString("%1 \"%2\"").tqarg(SearchPluginSettings::customBrowser()).tqarg(url.url()), SearchPluginSettings::customBrowser(), "viewmag" );
return;
}
@@ -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(search,SLOT(copy()),actionCollection());
+ KAction* copy_act = KStdAction::copy(TQT_TQOBJECT(search),TQT_SLOT(copy()),actionCollection());
copy_act->plug(search->rightClickMenu(),0);
searches.append(search);
@@ -132,16 +132,16 @@ namespace kt
if (tab)
tab->updateSearchEngines(engines);
- for (QPtrList<SearchWidget>::iterator i = searches.begin(); i != searches.end();i++)
+ for (TQPtrList<SearchWidget>::iterator i = searches.begin(); i != searches.end();i++)
{
SearchWidget* w = *i;
w->updateSearchEngines(engines);
}
}
- void SearchPlugin::tabCloseRequest(kt::GUIInterface* gui,QWidget* tab)
+ void SearchPlugin::tabCloseRequest(kt::GUIInterface* gui,TQWidget* tab)
{
- if (searches.contains((SearchWidget*)tab))
+ if (searches.tqcontains((SearchWidget*)tab))
{
searches.remove((SearchWidget*)tab);
gui->removeTabPage(tab);
@@ -149,7 +149,7 @@ namespace kt
}
}
- bool SearchPlugin::versionCheck(const QString & version) const
+ bool SearchPlugin::versionCheck(const TQString & version) const
{
return version == KT_VERSION_MACRO;
}
diff --git a/plugins/search/searchplugin.h b/plugins/search/searchplugin.h
index ce65499..9bfbb0b 100644
--- a/plugins/search/searchplugin.h
+++ b/plugins/search/searchplugin.h
@@ -20,7 +20,7 @@
#ifndef KTSEARCHPLUGIN_H
#define KTSEARCHPLUGIN_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <interfaces/plugin.h>
#include <interfaces/guiinterface.h>
#include "searchenginelist.h"
@@ -37,28 +37,29 @@ namespace kt
class SearchPlugin : public Plugin, public kt::CloseTabListener
{
Q_OBJECT
+ TQ_OBJECT
public:
- SearchPlugin(QObject* parent, const char* name, const QStringList& args);
+ SearchPlugin(TQObject* tqparent, const char* name, const TQStringList& args);
virtual ~SearchPlugin();
virtual void load();
virtual void unload();
- virtual bool versionCheck(const QString& version) const;
+ virtual bool versionCheck(const TQString& version) const;
void preferencesUpdated();
const SearchEngineList & getSearchEngineList() const {return engines;}
private slots:
- void search(const QString & text,int engine,bool external);
+ void search(const TQString & text,int engine,bool external);
private:
- virtual void tabCloseRequest(kt::GUIInterface* gui,QWidget* tab);
+ virtual void tabCloseRequest(kt::GUIInterface* gui,TQWidget* tab);
private:
SearchPrefPage* pref;
SearchTab* tab;
SearchEngineList engines;
- QPtrList<SearchWidget> searches;
+ TQPtrList<SearchWidget> searches;
};
}
diff --git a/plugins/search/searchpref.ui b/plugins/search/searchpref.ui
index 8c8c026..5e68f1e 100644
--- a/plugins/search/searchpref.ui
+++ b/plugins/search/searchpref.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>SEPreferences</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>SEPreferences</cstring>
</property>
@@ -20,7 +20,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>500</width>
<height>350</height>
@@ -33,7 +33,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>buttonGroup1</cstring>
</property>
@@ -44,7 +44,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>openExternal</cstring>
</property>
@@ -52,7 +52,7 @@
<string>Open searches in external browser</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>useDefaultBrowser</cstring>
</property>
@@ -63,15 +63,15 @@
<string></string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout29</cstring>
+ <cstring>tqlayout29</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>useCustomBrowser</cstring>
</property>
@@ -97,7 +97,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>40</width>
<height>20</height>
@@ -108,7 +108,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox8</cstring>
</property>
@@ -127,15 +127,15 @@
<string></string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout22</cstring>
+ <cstring>tqlayout22</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -150,15 +150,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout23</cstring>
+ <cstring>tqlayout23</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -171,7 +171,7 @@
<cstring>m_engine_url</cstring>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>btnAdd</cstring>
</property>
@@ -189,7 +189,7 @@
</widget>
</hbox>
</widget>
- <widget class="QListView">
+ <widget class="TQListView">
<column>
<property name="text">
<string>Engines</string>
@@ -223,7 +223,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>50</height>
@@ -233,15 +233,15 @@
<enum>AllColumns</enum>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>btnRemove</cstring>
</property>
@@ -249,7 +249,7 @@
<string>&amp;Remove</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>btnRemoveAll</cstring>
</property>
@@ -267,14 +267,14 @@
<property name="sizeType">
<enum>Maximum</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>btn_add_default</cstring>
</property>
@@ -306,10 +306,10 @@
<slot>btnUpdate_clicked()</slot>
</connection>
</connections>
-<slots>
+<Q_SLOTS>
<slot>btnUpdate_clicked()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klineedit.h</includehint>
<includehint>kactivelabel.h</includehint>
diff --git a/plugins/search/searchprefpage.cpp b/plugins/search/searchprefpage.cpp
index 2285ead..e7ee9c3 100644
--- a/plugins/search/searchprefpage.cpp
+++ b/plugins/search/searchprefpage.cpp
@@ -19,8 +19,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
#include <kurl.h>
-#include <qtooltip.h>
-#include <qfile.h>
+#include <tqtooltip.h>
+#include <tqfile.h>
#include <klocale.h>
#include <kglobal.h>
#include <kstandarddirs.h>
@@ -33,9 +33,9 @@
#include <kio/netaccess.h>
#include <klineedit.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
#include <util/constants.h>
#include "searchprefpage.h"
@@ -47,25 +47,25 @@ using namespace bt;
namespace kt
{
- SearchPrefPageWidget::SearchPrefPageWidget(QWidget *parent) : SEPreferences(parent)
+ SearchPrefPageWidget::SearchPrefPageWidget(TQWidget *tqparent) : SEPreferences(tqparent)
{
- QString info = i18n("Use your web browser to search for the string %1"
+ TQString info = i18n("Use your web browser to search for the string %1"
" (capital letters) on the search engine you want to add. <br> "
"Then copy the URL in the addressbar after the search is finished, and paste it here.<br><br>Searching for %1"
" on Google for example, will result in http://www.google.com/search?q=FOOBAR&ie=UTF-8&oe=UTF-8. <br> "
- "If you add this URL here, ktorrent can search using Google.").arg("FOOBAR").arg("FOOBAR");
- QString info_short = i18n("Use your web browser to search for the string %1 (capital letters) "
- "on the search engine you want to add. Use the resulting URL below.").arg("FOOBAR");
+ "If you add this URL here, ktorrent can search using Google.").tqarg("FOOBAR").tqarg("FOOBAR");
+ TQString info_short = i18n("Use your web browser to search for the string %1 (capital letters) "
+ "on the search engine you want to add. Use the resulting URL below.").tqarg("FOOBAR");
m_infoLabel->setText(info_short);
- QToolTip::add(m_infoLabel,info);
- QToolTip::add(m_engine_name,info);
+ TQToolTip::add(m_infoLabel,info);
+ TQToolTip::add(m_engine_name,info);
- connect(btnAdd, SIGNAL(clicked()), this, SLOT(addClicked()));
- connect(btnRemove, SIGNAL(clicked()), this, SLOT(removeClicked()));
- connect(btn_add_default, SIGNAL(clicked()), this, SLOT(addDefaultClicked()));
- connect(btnRemoveAll, SIGNAL(clicked()), this, SLOT(removeAllClicked()));
+ connect(btnAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(addClicked()));
+ connect(btnRemove, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeClicked()));
+ connect(btn_add_default, TQT_SIGNAL(clicked()), this, TQT_SLOT(addDefaultClicked()));
+ connect(btnRemoveAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeAllClicked()));
- connect(useCustomBrowser, SIGNAL(toggled(bool)), this, SLOT(customToggled( bool )));
+ connect(useCustomBrowser, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(customToggled( bool )));
useCustomBrowser->setChecked(SearchPluginSettings::useCustomBrowser());
useDefaultBrowser->setChecked(SearchPluginSettings::useDefaultBrowser());
@@ -81,7 +81,7 @@ namespace kt
for (Uint32 i = 0;i < se.getNumEngines();i++)
{
- new QListViewItem(m_engines,se.getEngineName(i),se.getSearchURL(i).prettyURL());
+ new TQListViewItem(m_engines,se.getEngineName(i),se.getSearchURL(i).prettyURL());
}
}
@@ -99,20 +99,20 @@ namespace kt
void SearchPrefPageWidget::saveSearchEngines()
{
- QFile fptr(KGlobal::dirs()->saveLocation("data","ktorrent") + "search_engines");
+ TQFile fptr(KGlobal::dirs()->saveLocation("data","ktorrent") + "search_engines");
if (!fptr.open(IO_WriteOnly))
return;
- QTextStream out(&fptr);
+ TQTextStream out(&fptr);
out << "# PLEASE DO NOT MODIFY THIS FILE. Use KTorrent configuration dialog for adding new search engines." << ::endl;
out << "# SEARCH ENGINES list" << ::endl;
- QListViewItemIterator itr(m_engines);
+ TQListViewItemIterator itr(m_engines);
while (itr.current())
{
- QListViewItem* item = itr.current();
- QString u = item->text(1);
- QString name = item->text(0);
- out << name.replace(" ","%20") << " " << u.replace(" ","%20") << endl;
+ TQListViewItem* item = itr.current();
+ TQString u = item->text(1);
+ TQString name = item->text(0);
+ out << name.tqreplace(" ","%20") << " " << u.tqreplace(" ","%20") << endl;
itr++;
}
}
@@ -123,7 +123,7 @@ namespace kt
{
KMessageBox::error(this, i18n("You must enter the search engine's name and URL"));
}
- else if ( m_engine_url->text().contains("FOOBAR") )
+ else if ( m_engine_url->text().tqcontains("FOOBAR") )
{
KURL url = KURL::fromPathOrURL(m_engine_url->text());
if ( !url.isValid() )
@@ -132,12 +132,12 @@ namespace kt
return;
}
- if (m_engines->findItem(m_engine_name->text(), 0))
+ if (m_engines->tqfindItem(m_engine_name->text(), 0))
{
KMessageBox::error(this, i18n("A search engine with the same name already exists. Please use a different name.")); return;
}
- new QListViewItem(m_engines, m_engine_name->text(), m_engine_url->text());
+ new TQListViewItem(m_engines, m_engine_name->text(), m_engine_url->text());
m_engine_url->setText("");
m_engine_name->setText("");
}
@@ -152,30 +152,30 @@ namespace kt
if ( m_engines->selectedItem() == 0 )
return;
- QListViewItem* item = m_engines->selectedItem();
+ TQListViewItem* item = m_engines->selectedItem();
m_engines->takeItem(item);
delete item;
}
void SearchPrefPageWidget::addDefaultClicked()
{
- QListViewItem* se = new QListViewItem(m_engines, "KTorrents", "http://www.ktorrents.com/search.php?lg=0&sourceid=ktorrent&q=FOOBAR&f=0");
+ TQListViewItem* se = new TQListViewItem(m_engines, "KTorrents", "http://www.ktorrents.com/search.php?lg=0&sourceid=ktorrent&q=FOOBAR&f=0");
- se = new QListViewItem(m_engines, "bittorrent.com", "http://search.bittorrent.com/search.jsp?query=FOOBAR");
+ se = new TQListViewItem(m_engines, "bittorrent.com", "http://search.bittorrent.com/search.jsp?query=FOOBAR");
- se = new QListViewItem(m_engines, "isohunt.com", "http://isohunt.com/torrents.php?ihq=FOOBAR&op=and");
+ se = new TQListViewItem(m_engines, "isohunt.com", "http://isohunt.com/torrents.php?ihq=FOOBAR&op=and");
- se = new QListViewItem(m_engines, "mininova.org", "http://www.mininova.org/search.php?search=FOOBAR");
+ se = new TQListViewItem(m_engines, "mininova.org", "http://www.mininova.org/search.php?search=FOOBAR");
- se = new QListViewItem(m_engines, "thepiratebay.org", "http://thepiratebay.org/search.php?q=FOOBAR");
+ se = new TQListViewItem(m_engines, "thepiratebay.org", "http://thepiratebay.org/search.php?q=FOOBAR");
- se = new QListViewItem(m_engines, "bitoogle.com", "http://bitoogle.com/search.php?q=FOOBAR");
+ se = new TQListViewItem(m_engines, "bitoogle.com", "http://bitoogle.com/search.php?q=FOOBAR");
- se = new QListViewItem(m_engines, "bytenova.org", "http://www.bitenova.org/search.php?search=FOOBAR&start=0&start=0&ie=utf-8&oe=utf-8");
+ se = new TQListViewItem(m_engines, "bytenova.org", "http://www.bitenova.org/search.php?search=FOOBAR&start=0&start=0&ie=utf-8&oe=utf-8");
- se = new QListViewItem(m_engines, "torrentspy.com", "http://torrentspy.com/search.asp?query=FOOBAR");
+ se = new TQListViewItem(m_engines, "torrentspy.com", "http://torrentspy.com/search.asp?query=FOOBAR");
- se = new QListViewItem(m_engines, "torrentz.com", "http://www.torrentz.com/search_FOOBAR");
+ se = new TQListViewItem(m_engines, "torrentz.com", "http://www.torrentz.com/search_FOOBAR");
}
void SearchPrefPageWidget::removeAllClicked()
@@ -185,7 +185,7 @@ namespace kt
void SearchPrefPageWidget::btnUpdate_clicked()
{
- QString fn = KGlobal::dirs()->saveLocation("data","ktorrent") + "search_engines.tmp";
+ TQString fn = KGlobal::dirs()->saveLocation("data","ktorrent") + "search_engines.tmp";
KURL source("http://www.ktorrent.org/downloads/search_engines");
if (KIO::NetAccess::download(source,fn,NULL))
@@ -197,27 +197,27 @@ namespace kt
}
}
- void SearchPrefPageWidget::updateList(QString& source)
+ void SearchPrefPageWidget::updateList(TQString& source)
{
- QFile fptr(source);
+ TQFile fptr(source);
if (!fptr.open(IO_ReadOnly))
return;
- QTextStream in(&fptr);
+ TQTextStream in(&fptr);
- QMap<QString,KURL> engines;
+ TQMap<TQString,KURL> engines;
while (!in.atEnd())
{
- QString line = in.readLine();
+ TQString line = in.readLine();
if(line.startsWith("#") || line.startsWith(" ") || line.isEmpty() )
continue;
- QStringList tokens = QStringList::split(" ", line);
- QString name = tokens[0];
- name = name.replace("%20"," ");
+ TQStringList tokens = TQStringList::split(" ", line);
+ TQString name = tokens[0];
+ name = name.tqreplace("%20"," ");
KURL url = KURL::fromPathOrURL(tokens[1]);
for(Uint32 i=2; i<tokens.count(); ++i)
@@ -226,15 +226,15 @@ namespace kt
engines.insert(name,url);
}
- QMap<QString,KURL>::iterator i = engines.begin();
+ TQMap<TQString,KURL>::iterator i = engines.begin();
while (i != engines.end())
{
- QListViewItem* item = m_engines->findItem(i.key(),0);
+ TQListViewItem* item = m_engines->tqfindItem(i.key(),0);
// if we have found the item, replace it if not make a new one
if (item)
item->setText(1, i.data().prettyURL());
else
- new QListViewItem(m_engines,i.key(),i.data().prettyURL());
+ new TQListViewItem(m_engines,i.key(),i.data().prettyURL());
i++;
}
@@ -264,9 +264,9 @@ namespace kt
return ret;
}
- void SearchPrefPage::createWidget(QWidget* parent)
+ void SearchPrefPage::createWidget(TQWidget* tqparent)
{
- widget = new SearchPrefPageWidget(parent);
+ widget = new SearchPrefPageWidget(tqparent);
}
void SearchPrefPage::deleteWidget()
diff --git a/plugins/search/searchprefpage.h b/plugins/search/searchprefpage.h
index a8d647d..748b378 100644
--- a/plugins/search/searchprefpage.h
+++ b/plugins/search/searchprefpage.h
@@ -24,7 +24,7 @@
#include <interfaces/prefpageinterface.h>
#include "searchpref.h"
-#include <qstring.h>
+#include <tqstring.h>
namespace kt
{
@@ -34,12 +34,13 @@ namespace kt
class SearchPrefPageWidget : public SEPreferences
{
Q_OBJECT
+ TQ_OBJECT
public:
- SearchPrefPageWidget(QWidget *parent = 0);
+ SearchPrefPageWidget(TQWidget *tqparent = 0);
bool apply();
void saveSearchEngines();
- void updateList(QString& source);
+ void updateList(TQString& source);
void updateSearchEngines(const SearchEngineList & se);
@@ -64,7 +65,7 @@ namespace kt
virtual ~SearchPrefPage();
virtual bool apply();
- virtual void createWidget(QWidget* parent);
+ virtual void createWidget(TQWidget* tqparent);
virtual void updateData();
virtual void deleteWidget();
diff --git a/plugins/search/searchtab.cpp b/plugins/search/searchtab.cpp
index 1beaa6a..02f3acf 100644
--- a/plugins/search/searchtab.cpp
+++ b/plugins/search/searchtab.cpp
@@ -17,17 +17,17 @@
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qapplication.h>
-#include <qlistbox.h>
-#include <qcheckbox.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqapplication.h>
+#include <tqlistbox.h>
+#include <tqcheckbox.h>
#include <kglobal.h>
#include <kpushbutton.h>
#include <kiconloader.h>
#include <kcombobox.h>
#include <kcompletion.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
#include "searchtab.h"
#include "searchenginelist.h"
@@ -48,21 +48,21 @@ namespace kt
m_search_new_tab = new KPushButton(i18n("Search"),tb);
m_search_engine = new KComboBox(tb);
- m_clear_button->setIconSet(SmallIconSet(QApplication::reverseLayout() ? "clear_left" : "locationbar_erase"));
+ m_clear_button->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase"));
m_clear_button->setEnabled(false);
- connect(m_search_new_tab,SIGNAL(clicked()),this,SLOT(searchNewTabPressed()));
- connect(m_search_text,SIGNAL(returnPressed(const QString&)),this,SLOT(searchBoxReturn( const QString& )));
- connect(m_search_text,SIGNAL(textChanged(const QString &)),this,SLOT(textChanged( const QString& )));
- connect(m_clear_button,SIGNAL(clicked()),this,SLOT(clearButtonPressed()));
+ connect(m_search_new_tab,TQT_SIGNAL(clicked()),this,TQT_SLOT(searchNewTabPressed()));
+ connect(m_search_text,TQT_SIGNAL(returnPressed(const TQString&)),this,TQT_SLOT(searchBoxReturn( const TQString& )));
+ connect(m_search_text,TQT_SIGNAL(textChanged(const TQString &)),this,TQT_SLOT(textChanged( const TQString& )));
+ connect(m_clear_button,TQT_SIGNAL(clicked()),this,TQT_SLOT(clearButtonPressed()));
m_search_text->setMaxCount(20);
m_search_new_tab->setEnabled(false);
- m_search_text->setInsertionPolicy(QComboBox::NoInsertion);
+ m_search_text->setInsertionPolicy(TQComboBox::NoInsertion);
tb->insertWidget(1,-1,m_clear_button);
tb->insertWidget(2,-1,m_search_text);
tb->insertWidget(3,-1,m_search_new_tab);
- tb->insertWidget(4,-1,new QLabel(i18n(" Engine: "),tb));
+ tb->insertWidget(4,-1,new TQLabel(i18n(" Engine: "),tb));
tb->insertWidget(5,-1,m_search_engine);
loadSearchHistory();
}
@@ -93,7 +93,7 @@ namespace kt
m_search_engine->setCurrentItem(ci);
}
- void SearchTab::searchBoxReturn(const QString & str)
+ void SearchTab::searchBoxReturn(const TQString & str)
{
KCompletion *comp = m_search_text->completionObject();
if (!m_search_text->contains(str))
@@ -116,7 +116,7 @@ namespace kt
searchBoxReturn(m_search_text->currentText());
}
- void SearchTab::textChanged(const QString & str)
+ void SearchTab::textChanged(const TQString & str)
{
m_search_new_tab->setEnabled(str.length() > 0);
m_clear_button->setEnabled(str.length() > 0);
@@ -124,17 +124,17 @@ namespace kt
void SearchTab::loadSearchHistory()
{
- QFile fptr(kt::DataDir() + "search_history");
+ TQFile fptr(kt::DataDir() + "search_history");
if (!fptr.open(IO_ReadOnly))
return;
KCompletion *comp = m_search_text->completionObject();
Uint32 cnt = 0;
- QTextStream in(&fptr);
+ TQTextStream in(&fptr);
while (!in.atEnd() && cnt < 50)
{
- QString line = in.readLine();
+ TQString line = in.readLine();
if (line.isNull())
break;
@@ -151,14 +151,14 @@ namespace kt
void SearchTab::saveSearchHistory()
{
- QFile fptr(kt::DataDir() + "search_history");
+ TQFile fptr(kt::DataDir() + "search_history");
if (!fptr.open(IO_WriteOnly))
return;
- QTextStream out(&fptr);
+ TQTextStream out(&fptr);
KCompletion *comp = m_search_text->completionObject();
- QStringList items = comp->items();
- for (QStringList::iterator i = items.begin();i != items.end();i++)
+ TQStringList items = comp->items();
+ for (TQStringList::iterator i = items.begin();i != items.end();i++)
{
out << *i << endl;
}
diff --git a/plugins/search/searchtab.h b/plugins/search/searchtab.h
index c392de9..9c62bf3 100644
--- a/plugins/search/searchtab.h
+++ b/plugins/search/searchtab.h
@@ -33,9 +33,10 @@ namespace kt
/**
Holds all widgets of the toolbar of the search plugin.
*/
- class SearchTab : public QObject
+ class SearchTab : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
SearchTab(KToolBar* toolbar);
@@ -53,12 +54,12 @@ namespace kt
protected slots:
void clearButtonPressed();
void searchNewTabPressed();
- void searchBoxReturn(const QString & str);
- void textChanged(const QString & str);
+ void searchBoxReturn(const TQString & str);
+ void textChanged(const TQString & str);
signals:
/// Emitted when the user presses enter or clicks search
- void search(const QString & text,int engine,bool external);
+ void search(const TQString & text,int engine,bool external);
private:
void loadSearchHistory();
diff --git a/plugins/search/searchwidget.cpp b/plugins/search/searchwidget.cpp
index 2ed19e8..b7e2627 100644
--- a/plugins/search/searchwidget.cpp
+++ b/plugins/search/searchwidget.cpp
@@ -21,11 +21,11 @@
#include <kapplication.h>
#include <khtmlview.h>
-#include <qlayout.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqlayout.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <klineedit.h>
#include <kpushbutton.h>
#include <kglobal.h>
@@ -59,55 +59,55 @@ namespace kt
SearchWidget::SearchWidget(SearchPlugin* sp) : html_part(0),sp(sp)
{
- QVBoxLayout* layout = new QVBoxLayout(this);
- layout->setAutoAdd(true);
+ TQVBoxLayout* tqlayout = new TQVBoxLayout(this);
+ tqlayout->setAutoAdd(true);
sbar = new SearchBar(this);
html_part = new HTMLPart(this);
right_click_menu = new KPopupMenu(this);
right_click_menu->insertSeparator();
back_id = right_click_menu->insertItem(
- KGlobal::iconLoader()->loadIconSet(QApplication::reverseLayout()
+ KGlobal::iconLoader()->loadIconSet(TQApplication::reverseLayout()
? "forward" : "back",KIcon::Small),
- i18n("Back"),html_part,SLOT(back()));
+ i18n("Back"),html_part,TQT_SLOT(back()));
right_click_menu->insertItem(
KGlobal::iconLoader()->loadIconSet("reload",KIcon::Small),
- i18n("Reload"),html_part,SLOT(reload()));
+ i18n("Reload"),html_part,TQT_SLOT(reload()));
right_click_menu->setItemEnabled(back_id,false);
sbar->m_back->setEnabled(false);
- connect(sbar->m_search_button,SIGNAL(clicked()),this,SLOT(searchPressed()));
- connect(sbar->m_clear_button,SIGNAL(clicked()),this,SLOT(clearPressed()));
- connect(sbar->m_search_text,SIGNAL(returnPressed()),this,SLOT(searchPressed()));
- connect(sbar->m_back,SIGNAL(clicked()),html_part,SLOT(back()));
- connect(sbar->m_reload,SIGNAL(clicked()),html_part,SLOT(reload()));
+ connect(sbar->m_search_button,TQT_SIGNAL(clicked()),this,TQT_SLOT(searchPressed()));
+ connect(sbar->m_clear_button,TQT_SIGNAL(clicked()),this,TQT_SLOT(clearPressed()));
+ connect(sbar->m_search_text,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(searchPressed()));
+ connect(sbar->m_back,TQT_SIGNAL(clicked()),html_part,TQT_SLOT(back()));
+ connect(sbar->m_reload,TQT_SIGNAL(clicked()),html_part,TQT_SLOT(reload()));
sbar->m_clear_button->setIconSet(
- KGlobal::iconLoader()->loadIconSet(QApplication::reverseLayout()
+ KGlobal::iconLoader()->loadIconSet(TQApplication::reverseLayout()
? "clear_left" : "locationbar_erase",KIcon::Small));
sbar->m_back->setIconSet(
- KGlobal::iconLoader()->loadIconSet(QApplication::reverseLayout()
+ KGlobal::iconLoader()->loadIconSet(TQApplication::reverseLayout()
? "forward" : "back", KIcon::Small));
sbar->m_reload->setIconSet(
KGlobal::iconLoader()->loadIconSet("reload",KIcon::Small));
- connect(html_part,SIGNAL(backAvailable(bool )),
- this,SLOT(onBackAvailable(bool )));
- connect(html_part,SIGNAL(onURL(const QString& )),
- this,SLOT(onURLHover(const QString& )));
- connect(html_part,SIGNAL(openTorrent(const KURL& )),
- this,SLOT(onOpenTorrent(const KURL& )));
- connect(html_part,SIGNAL(popupMenu(const QString&, const QPoint& )),
- this,SLOT(showPopupMenu(const QString&, const QPoint& )));
- connect(html_part,SIGNAL(searchFinished()),this,SLOT(onFinished()));
- connect(html_part,SIGNAL(saveTorrent(const KURL& )),
- this,SLOT(onSaveTorrent(const KURL& )));
+ connect(html_part,TQT_SIGNAL(backAvailable(bool )),
+ this,TQT_SLOT(onBackAvailable(bool )));
+ connect(html_part,TQT_SIGNAL(onURL(const TQString& )),
+ this,TQT_SLOT(onURLHover(const TQString& )));
+ connect(html_part,TQT_SIGNAL(openTorrent(const KURL& )),
+ this,TQT_SLOT(onOpenTorrent(const KURL& )));
+ connect(html_part,TQT_SIGNAL(popupMenu(const TQString&, const TQPoint& )),
+ this,TQT_SLOT(showPopupMenu(const TQString&, const TQPoint& )));
+ connect(html_part,TQT_SIGNAL(searchFinished()),this,TQT_SLOT(onFinished()));
+ connect(html_part,TQT_SIGNAL(saveTorrent(const KURL& )),
+ this,TQT_SLOT(onSaveTorrent(const KURL& )));
KParts::PartManager* pman = html_part->partManager();
- connect(pman,SIGNAL(partAdded(KParts::Part*)),this,SLOT(onFrameAdded(KParts::Part* )));
+ connect(pman,TQT_SIGNAL(partAdded(KParts::Part*)),this,TQT_SLOT(onFrameAdded(KParts::Part* )));
- connect(html_part->browserExtension(),SIGNAL(loadingProgress(int)),this,SLOT(loadingProgress(int)));
+ connect(html_part->browserExtension(),TQT_SIGNAL(loadingProgress(int)),this,TQT_SLOT(loadingProgress(int)));
prog = 0;
}
@@ -143,8 +143,8 @@ namespace kt
KHTMLPart* frame = dynamic_cast<KHTMLPart*>(p);
if (frame)
{
- connect(frame,SIGNAL(popupMenu(const QString&, const QPoint& )),
- this,SLOT(showPopupMenu(const QString&, const QPoint& )));
+ connect(frame,TQT_SIGNAL(popupMenu(const TQString&, const TQPoint& )),
+ this,TQT_SLOT(showPopupMenu(const TQString&, const TQPoint& )));
}
}
@@ -155,7 +155,7 @@ namespace kt
html_part->copy();
}
- void SearchWidget::search(const QString & text,int engine)
+ void SearchWidget::search(const TQString & text,int engine)
{
if (!html_part)
return;
@@ -171,11 +171,11 @@ namespace kt
if (engine < 0 || (Uint32)engine >= sl.getNumEngines())
engine = sbar->m_search_engine->currentItem();
- QString s_url = sl.getSearchURL(engine).prettyURL();
- s_url.replace("FOOBAR", KURL::encode_string(text), true);
+ TQString s_url = sl.getSearchURL(engine).prettyURL();
+ s_url.tqreplace("FOOBAR", KURL::encode_string(text), true);
KURL url = KURL::fromPathOrURL(s_url);
- statusBarMsg(i18n("Searching for %1...").arg(text));
+ statusBarMsg(i18n("Searching for %1...").tqarg(text));
//html_part->openURL(url);
html_part->openURLRequest(url,KParts::URLArgs());
}
@@ -190,7 +190,7 @@ namespace kt
sbar->m_search_text->clear();
}
- void SearchWidget::onURLHover(const QString & url)
+ void SearchWidget::onURLHover(const TQString & url)
{
statusBarMsg(url);
}
@@ -206,10 +206,10 @@ namespace kt
void SearchWidget::onSaveTorrent(const KURL & url)
{
- KFileDialog fdlg(QString::null,"*.torrent | " + i18n("torrent files"),this,0,true);
+ KFileDialog fdlg(TQString(),"*.torrent | " + i18n("torrent files"),this,0,true);
fdlg.setSelection(url.fileName());
fdlg.setOperationMode(KFileDialog::Saving);
- if (fdlg.exec() == QDialog::Accepted)
+ if (fdlg.exec() == TQDialog::Accepted)
{
KURL save_url = fdlg.selectedURL();
// start a copy job
@@ -219,7 +219,7 @@ namespace kt
}
}
- void SearchWidget::showPopupMenu(const QString & url,const QPoint & p)
+ void SearchWidget::showPopupMenu(const TQString & url,const TQPoint & p)
{
right_click_menu->popup(p);
}
@@ -235,7 +235,7 @@ namespace kt
html_part = 0;
}
- void SearchWidget::statusBarMsg(const QString & url)
+ void SearchWidget::statusBarMsg(const TQString & url)
{
sp->getGUI()->changeStatusbar(url);
}
diff --git a/plugins/search/searchwidget.h b/plugins/search/searchwidget.h
index 36fb73e..fc03a06 100644
--- a/plugins/search/searchwidget.h
+++ b/plugins/search/searchwidget.h
@@ -20,8 +20,8 @@
#ifndef BTSEARCHWIDGET_H
#define BTSEARCHWIDGET_H
-#include <qwidget.h>
-#include <qvaluevector.h>
+#include <tqwidget.h>
+#include <tqvaluevector.h>
#include <kurl.h>
class SearchBar;
@@ -45,9 +45,10 @@ namespace kt
Widget which shows a KHTML window with the users search in it
*/
- class SearchWidget : public QWidget
+ class SearchWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
SearchWidget(SearchPlugin* sp);
virtual ~SearchWidget();
@@ -57,21 +58,21 @@ namespace kt
void updateSearchEngines(const SearchEngineList & sl);
public slots:
- void search(const QString & text,int engine = 0);
+ void search(const TQString & text,int engine = 0);
void copy();
void onShutDown();
private slots:
void searchPressed();
void clearPressed();
- void onURLHover(const QString & url);
+ void onURLHover(const TQString & url);
void onFinished();
void onOpenTorrent(const KURL & url);
void onSaveTorrent(const KURL & url);
- void showPopupMenu(const QString & s,const QPoint & p);
+ void showPopupMenu(const TQString & s,const TQPoint & p);
void onBackAvailable(bool available);
void onFrameAdded(KParts::Part* p);
- void statusBarMsg(const QString & url);
+ void statusBarMsg(const TQString & url);
void openTorrent(const KURL & url);
void loadingProgress(int perc);
diff --git a/plugins/stats/ChartDrawer.cc b/plugins/stats/ChartDrawer.cc
index 75142e6..5824684 100644
--- a/plugins/stats/ChartDrawer.cc
+++ b/plugins/stats/ChartDrawer.cc
@@ -28,7 +28,7 @@ int isinf(double x) { return !finite(x) && x==x; }
namespace kt {
-ChartDrawer::ChartDrawer(QWidget *p, wgtsize_t x_max, wgtsize_t y_max, bool autom, const QString & uname) : QWidget(p), mXMax(x_max), mYMax(y_max), mAutoMax(autom),
+ChartDrawer::ChartDrawer(TQWidget *p, wgtsize_t x_max, wgtsize_t y_max, bool autom, const TQString & uname) : TQWidget(p), mXMax(x_max), mYMax(y_max), mAutoMax(autom),
mUnitName(uname), mMMode(MaxModeExact)
{
setBackgroundColor("white");
@@ -36,7 +36,7 @@ ChartDrawer::ChartDrawer(QWidget *p, wgtsize_t x_max, wgtsize_t y_max, bool auto
ChartDrawer::~ChartDrawer()
{
- QToolTip::remove(this);
+ TQToolTip::remove(this);
}
ChartDrawer::wgtsize_t ChartDrawer::GetXMax() const
@@ -75,9 +75,9 @@ inline ChartDrawer::wgtunit_t ChartDrawer::TrY(const ChartDrawer::wgtunit_t y) c
return height() - y;
}
-void ChartDrawer::paintEvent ( QPaintEvent *)
+void ChartDrawer::paintEvent ( TQPaintEvent *)
{
- QPainter pnt( this );
+ TQPainter pnt( this );
DrawScale(pnt);
DrawFrame(pnt);
@@ -87,25 +87,25 @@ void ChartDrawer::paintEvent ( QPaintEvent *)
inline ChartDrawer::wgtunit_t ChartDrawer::height() const
{
- return QWidget::height() - 15;
+ return TQWidget::height() - 15;
}
inline ChartDrawer::wgtunit_t ChartDrawer::width() const
{
- return QWidget::width() - 65;
+ return TQWidget::width() - 65;
}
-void ChartDrawer::DrawFrame(QPainter & rPnt )
+void ChartDrawer::DrawFrame(TQPainter & rPnt )
{
- QPen op = rPnt.pen();
- rPnt.setPen(QPen("#000", 3));
+ TQPen op = rPnt.pen();
+ rPnt.setPen(TQPen("#000", 3));
rPnt.drawLine(0, TrY(0), width()+3, TrY(0));
- rPnt.drawLine(width()+1, TrY(0), width()+1, TrY(QWidget::height()));
+ rPnt.drawLine(width()+1, TrY(0), width()+1, TrY(TQWidget::height()));
- QFont oldf(rPnt.font());
- QFont newf(oldf);
- newf.setWeight(QFont::Bold);
+ TQFont oldf(rPnt.font());
+ TQFont newf(oldf);
+ newf.setWeight(TQFont::Bold);
newf.setPointSize(10);
newf.setUnderline(1);
@@ -116,7 +116,7 @@ void ChartDrawer::DrawFrame(QPainter & rPnt )
rPnt.setPen(op);
}
-void ChartDrawer::DrawScale(QPainter & rPnt )
+void ChartDrawer::DrawScale(TQPainter & rPnt )
{
if(!mYMax)
@@ -124,10 +124,10 @@ void ChartDrawer::DrawScale(QPainter & rPnt )
return;
}
- QPen op = rPnt.pen();
- QPen ep("#eee", 1, Qt::DashLine);
- QPen lp("#666", 2, Qt::DotLine);
- QPen tp("#000");
+ TQPen op = rPnt.pen();
+ TQPen ep("#eee", 1, TQt::DashLine);
+ TQPen lp("#666", 2, TQt::DotLine);
+ TQPen tp("#000");
rPnt.setPen(ep);
@@ -144,23 +144,23 @@ void ChartDrawer::DrawScale(QPainter & rPnt )
rPnt.setPen(lp);
rPnt.drawLine(0, TrY(height() - 10), width(), TrY(height() - 10));
rPnt.setPen(tp);
- rPnt.drawText(width() + 4, TrY(height() - 10) + 4, QString::number (mYMax));
+ rPnt.drawText(width() + 4, TrY(height() - 10) + 4, TQString::number (mYMax));
for(wgtsize_t i = 0; i < height() - 15 ; i += GetYScale())
{
rPnt.setPen(lp);
rPnt.drawLine(0, TrY(i), width(), TrY(i));
rPnt.setPen(tp);
- rPnt.drawText(width() + 4, TrY(i) + 4, QString::number ( (mYMax / 8.0 ) * ( i / static_cast<double>(GetYScale() )), 'f', 1 ) );
+ rPnt.drawText(width() + 4, TrY(i) + 4, TQString::number ( (mYMax / 8.0 ) * ( i / static_cast<double>(GetYScale() )), 'f', 1 ) );
}
rPnt.setPen(op);
}
-void ChartDrawer::DrawChart(QPainter & rPnt)
+void ChartDrawer::DrawChart(TQPainter & rPnt)
{
- QPen op = rPnt.pen();
+ TQPen op = rPnt.pen();
uint32_t skip_max = 0;
@@ -188,20 +188,20 @@ void ChartDrawer::DrawChart(QPainter & rPnt)
// --------------------
// Line on top
// ------------
- QPen myop(rPnt.pen());
- QPen topl(myop);
+ TQPen myop(rPnt.pen());
+ TQPen topl(myop);
topl.setStyle(Qt::DotLine);
rPnt.setPen(topl);
rPnt.drawLine(0, TrY(FindYScreenCoords(mEls[i].pmVals -> at(mEls[i].pmVals -> size() - 1))), width(), TrY(FindYScreenCoords(mEls[i].pmVals -> at(mEls[i].pmVals -> size() - 1))) );
rPnt.setPen(myop);
- QFont oldf(rPnt.font());
- QFont newf(oldf);
- newf.setWeight(QFont::Bold);
+ TQFont oldf(rPnt.font());
+ TQFont newf(oldf);
+ newf.setWeight(TQFont::Bold);
newf.setPointSize(8);
rPnt.setFont(newf);
- rPnt.drawText(5 + (i * 50), TrY(FindYScreenCoords(mEls[i].pmVals -> at(mEls[i].pmVals -> size() - 1))) + 11, QString::number (mEls[i].pmVals -> at(mEls[i].pmVals -> size() - 1), 'f', 2 ) );
+ rPnt.drawText(5 + (i * 50), TrY(FindYScreenCoords(mEls[i].pmVals -> at(mEls[i].pmVals -> size() - 1))) + 11, TQString::number (mEls[i].pmVals -> at(mEls[i].pmVals -> size() - 1), 'f', 2 ) );
//------------------
@@ -220,7 +220,7 @@ void ChartDrawer::DrawChart(QPainter & rPnt)
rPnt.setPen(myop);
rPnt.setFont(newf);
- QString maxv(QString::number (max.first, 'f', 2));
+ TQString maxv(TQString::number (max.first, 'f', 2));
if(FindXScreenCoords(max.second) < 35)
{
@@ -336,7 +336,7 @@ void ChartDrawer::AddValues(ChartDrawerData Cdd, const size_t idx, const bool ma
MakeLegendTooltip();
}
-void ChartDrawer::AddValuesCnt(const QString & rN, const bool max)
+void ChartDrawer::AddValuesCnt(const TQString & rN, const bool max)
{
mEls.push_back(ChartDrawerData(mXMax, rN));
mMarkMax.push_back(max);
@@ -344,7 +344,7 @@ void ChartDrawer::AddValuesCnt(const QString & rN, const bool max)
MakeLegendTooltip();
}
-void ChartDrawer::AddValuesCnt(const QPen & rP, const QString & rN, const bool max)
+void ChartDrawer::AddValuesCnt(const TQPen & rP, const TQString & rN, const bool max)
{
mEls.push_back(ChartDrawerData(rP, mXMax, rN));
mMarkMax.push_back(max);
@@ -352,17 +352,17 @@ void ChartDrawer::AddValuesCnt(const QPen & rP, const QString & rN, const bool m
MakeLegendTooltip();
}
-void ChartDrawer::SetUnitName(const QString & rN)
+void ChartDrawer::SetUnitName(const TQString & rN)
{
mUnitName = rN;
}
-QString ChartDrawer::GetUnitName() const
+TQString ChartDrawer::GetUnitName() const
{
return mUnitName;
}
-void ChartDrawer::mouseDoubleClickEvent ( QMouseEvent * evt )
+void ChartDrawer::mouseDoubleClickEvent ( TQMouseEvent * evt )
{
FindSetMax();
@@ -414,16 +414,16 @@ void ChartDrawer::Zero(const size_t idx)
void ChartDrawer::MakeLegendTooltip()
{
- QToolTip::remove(this);
+ TQToolTip::remove(this);
- QString helpstr(QString("<b>%1:</b><br><br>").arg(i18n("Legend")));
- QMimeSourceFactory* factory = QMimeSourceFactory::defaultFactory();
- std::vector<QImage> img;
+ TQString helpstr(TQString("<b>%1:</b><br><br>").tqarg(i18n("Legend")));
+ TQMimeSourceFactory* factory = TQMimeSourceFactory::defaultFactory();
+ std::vector<TQImage> img;
for(size_t i = 0; i < mEls.size(); i++)
{
- img.push_back(QImage(16,16, 32));
- img[i].fill(mEls[i].GetPen() -> color().pixel());
+ img.push_back(TQImage(16,16, 32));
+ img[i].fill(TQColor(mEls[i].GetPen() -> color()).pixel());
for(uint8_t px = 0; px < 16; px++)
{
@@ -433,11 +433,11 @@ void ChartDrawer::MakeLegendTooltip()
img[i].setPixel(15, px, 0); //r
}
- factory->setImage(mEls[i].GetName().replace(' ', '_') + "-" + QString::number(i), img[i]);
- helpstr += QString("<img src='%1'>&nbsp;&nbsp;-&nbsp;&nbsp;%2<br>").arg(mEls[i].GetName().replace(" ", "_") + "-" + QString::number(i)).arg( mEls[i].GetName() );
+ factory->setImage(mEls[i].GetName().tqreplace(' ', '_') + "-" + TQString::number(i), img[i]);
+ helpstr += TQString("<img src='%1'>&nbsp;&nbsp;-&nbsp;&nbsp;%2<br>").tqarg(mEls[i].GetName().tqreplace(" ", "_") + "-" + TQString::number(i)).tqarg( mEls[i].GetName() );
}
- QToolTip::add(this, helpstr);
+ TQToolTip::add(this, helpstr);
}
void ChartDrawer::FindSetMax()
diff --git a/plugins/stats/ChartDrawer.h b/plugins/stats/ChartDrawer.h
index 44b8d9f..2345f14 100644
--- a/plugins/stats/ChartDrawer.h
+++ b/plugins/stats/ChartDrawer.h
@@ -23,12 +23,12 @@
#include <stdint.h>
-#include <qwidget.h>
-#include <qpainter.h>
-#include <qstring.h>
-#include <qtooltip.h>
-#include <qmime.h>
-#include <qimage.h>
+#include <tqwidget.h>
+#include <tqpainter.h>
+#include <tqstring.h>
+#include <tqtooltip.h>
+#include <tqmime.h>
+#include <tqimage.h>
#include <klocale.h>
@@ -44,9 +44,10 @@ namespace kt {
\brief Widget for drawing line charts
\author Krzysztof Kundzicz <athantor@gmail.com>
*/
-class ChartDrawer : public QWidget
+class ChartDrawer : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
///Type used as widget size unit
@@ -71,29 +72,29 @@ class ChartDrawer : public QWidget
///Chart data
val_t mEls;
///Name of the chart unit
- QString mUnitName;
+ TQString mUnitName;
///Mark max
std::vector<bool> mMarkMax;
///Max mode
MaxMode mMMode;
///Paint event handler
- void paintEvent ( QPaintEvent * );
+ void paintEvent ( TQPaintEvent * );
/**
\brief Draws chart's frame
\param rPnt Painter on which things will be drawn
*/
- void DrawFrame(QPainter &rPnt);
+ void DrawFrame(TQPainter &rPnt);
/**
\brief Draws chart's scale
\param rPnt Painter on which things will be drawn
*/
- void DrawScale(QPainter &rPnt);
+ void DrawScale(TQPainter &rPnt);
/**
\brief Draws chart
\param rPnt Painter on which things will be drawn
*/
- void DrawChart(QPainter &rPnt);
+ void DrawChart(TQPainter &rPnt);
/**
\brief Gets distance between two values on OY
@@ -149,7 +150,7 @@ class ChartDrawer : public QWidget
\param autom Whether athomagically set the maximum Y size
\param uname Unit name
*/
- ChartDrawer(QWidget *p = 0, wgtsize_t x_max = 2, wgtsize_t y_max = 1, bool autom = true, const QString & uname = "KB/s");
+ ChartDrawer(TQWidget *p = 0, wgtsize_t x_max = 2, wgtsize_t y_max = 1, bool autom = true, const TQString & uname = "KB/s");
~ChartDrawer();
/**
@@ -169,18 +170,18 @@ class ChartDrawer : public QWidget
\note It'l be drawn on the chart
*/
- void SetUnitName(const QString & rN);
+ void SetUnitName(const TQString & rN);
/**
\brief Gets unit name
\return name
*/
- QString GetUnitName() const;
+ TQString GetUnitName() const;
/**
\brief Doubleclick handler
\param evt Mouse event
*/
- void mouseDoubleClickEvent ( QMouseEvent * evt );
+ void mouseDoubleClickEvent ( TQMouseEvent * evt );
/**
\brief Gets mode of OY axis maximum drawing
@@ -215,14 +216,14 @@ class ChartDrawer : public QWidget
\param rN Set's data name
\param max Whether mark maximum of this dataset
*/
- void AddValuesCnt(const QString & rN, const bool max = true);
+ void AddValuesCnt(const TQString & rN, const bool max = true);
/**
\brief Adds empty dataset
\param rP Pen that will be used to drawing
\param rN Dataset name
\param max Whether mark maximum of this dataset
*/
- void AddValuesCnt(const QPen & rP, const QString & rN, const bool max = true );
+ void AddValuesCnt(const TQPen & rP, const TQString & rN, const bool max = true );
/**
\brief Removes dataset
@@ -273,7 +274,7 @@ class ChartDrawer : public QWidget
\brief Emited when widget is doubleclicked
\param evt Mouse event
*/
- void DoubleClicked(QMouseEvent * evt);
+ void DoubleClicked(TQMouseEvent * evt);
};
diff --git a/plugins/stats/ChartDrawerData.cc b/plugins/stats/ChartDrawerData.cc
index 9a49a95..ba03261 100644
--- a/plugins/stats/ChartDrawerData.cc
+++ b/plugins/stats/ChartDrawerData.cc
@@ -22,25 +22,25 @@
namespace kt {
-ChartDrawerData::ChartDrawerData(const QString & rN) : pmQp(new QPen("#000", 1, Qt::SolidLine)), pmVals(new val_t(2, 0.0)), mName(rN)
+ChartDrawerData::ChartDrawerData(const TQString & rN) : pmQp(new TQPen("#000", 1, TQt::SolidLine)), pmVals(new val_t(2, 0.0)), mName(rN)
{
}
-ChartDrawerData::ChartDrawerData(const size_t s, const QString & rN) : pmQp(new QPen("#000", 1, Qt::SolidLine)), pmVals(new val_t(s, 0.0)), mName(rN)
+ChartDrawerData::ChartDrawerData(const size_t s, const TQString & rN) : pmQp(new TQPen("#000", 1, TQt::SolidLine)), pmVals(new val_t(s, 0.0)), mName(rN)
{
}
-ChartDrawerData::ChartDrawerData(const QPen & rQp, const QString & rN) : pmQp(new QPen(rQp)), pmVals(new val_t(2, 0.0)), mName(rN)
+ChartDrawerData::ChartDrawerData(const TQPen & rQp, const TQString & rN) : pmQp(new TQPen(rQp)), pmVals(new val_t(2, 0.0)), mName(rN)
{
}
-ChartDrawerData::ChartDrawerData(const QPen & rQp, const size_t s, const QString & rN) : pmQp(new QPen(rQp)), pmVals(new val_t(s, 0.0)), mName(rN)
+ChartDrawerData::ChartDrawerData(const TQPen & rQp, const size_t s, const TQString & rN) : pmQp(new TQPen(rQp)), pmVals(new val_t(s, 0.0)), mName(rN)
{
}
ChartDrawerData::ChartDrawerData(const ChartDrawerData & rS)
{
- pmQp = new QPen(*rS.pmQp);
+ pmQp = new TQPen(*rS.pmQp);
pmVals = new val_t(*rS.pmVals);
mName = rS.mName;
}
@@ -56,15 +56,15 @@ const ChartDrawerData::val_t * ChartDrawerData::GetVals() const
return pmVals;
}
-const QPen * ChartDrawerData::GetPen() const
+const TQPen * ChartDrawerData::GetPen() const
{
return pmQp;
}
-void ChartDrawerData::SetPen(const QPen & rQp)
+void ChartDrawerData::SetPen(const TQPen & rQp)
{
delete pmQp;
- pmQp = new QPen(rQp);
+ pmQp = new TQPen(rQp);
}
std::pair<double, size_t> ChartDrawerData::Max() const
@@ -88,11 +88,11 @@ std::pair<double, size_t> ChartDrawerData::Max() const
return std::make_pair(max, maxpos);
}
-QString ChartDrawerData::GetName() const
+TQString ChartDrawerData::GetName() const
{
return mName;
}
-void ChartDrawerData::SetName( const QString & rN )
+void ChartDrawerData::SetName( const TQString & rN )
{
mName = rN;
}
diff --git a/plugins/stats/ChartDrawerData.h b/plugins/stats/ChartDrawerData.h
index 561e76a..19d16e5 100644
--- a/plugins/stats/ChartDrawerData.h
+++ b/plugins/stats/ChartDrawerData.h
@@ -21,7 +21,7 @@
#ifndef CHARTDRAWERDATA_H_
#define CHARTDRAWERDATA_H_
-#include <qpen.h>
+#include <tqpen.h>
#include <vector>
#include <map>
@@ -43,18 +43,18 @@ class ChartDrawerData
private:
///Pen used for drawing
- QPen * pmQp;
+ TQPen * pmQp;
///Values
val_t * pmVals;
///Name of set
- QString mName;
+ TQString mName;
public:
/**
\brief Constructor
\param rN Name
*/
- ChartDrawerData(const QString & rN);
+ ChartDrawerData(const TQString & rN);
/**
\brief Copy constructor
\param rS Source
@@ -65,20 +65,20 @@ class ChartDrawerData
\param s Size
\param rN Name
*/
- ChartDrawerData(const size_t s, const QString & rN);
+ ChartDrawerData(const size_t s, const TQString & rN);
/**
\brief Constructor
\param rQp Pen used for drawing
\param rN Name
*/
- ChartDrawerData(const QPen & rQp, const QString & rN);
+ ChartDrawerData(const TQPen & rQp, const TQString & rN);
/**
\brief Constructor
\param rQp Pen used for drawing
\param s Size
\param rN Name
*/
- ChartDrawerData(const QPen & rQp, const size_t s, const QString & rN);
+ ChartDrawerData(const TQPen & rQp, const size_t s, const TQString & rN);
///Destructor
~ChartDrawerData();
@@ -92,23 +92,23 @@ class ChartDrawerData
\brief Gets pen
\return Pointer pen
*/
- const QPen * GetPen() const;
+ const TQPen * GetPen() const;
/**
\brief Gets name
\return Name
*/
- QString GetName() const;
+ TQString GetName() const;
/**
\brief Sets pen
\param rQp Pen
*/
- void SetPen(const QPen & rQp);
+ void SetPen(const TQPen & rQp);
/**
\brief Sets name
\param rN Name
*/
- void SetName( const QString & rN );
+ void SetName( const TQString & rN );
/**
\brief Finds maximum value
diff --git a/plugins/stats/PeerMonitor.cc b/plugins/stats/PeerMonitor.cc
index a4cf449..935efda 100644
--- a/plugins/stats/PeerMonitor.cc
+++ b/plugins/stats/PeerMonitor.cc
@@ -22,7 +22,7 @@
namespace kt {
-PeerMonitor::PeerMonitor(kt::TorrentInterface * pTi, std::map<bt::SHA1Hash, PeerMonitor *> * pM) : kt::MonitorInterface(), QObject(), pmTorIface(pTi), pmPeerMMgr(pM)
+PeerMonitor::PeerMonitor(kt::TorrentInterface * pTi, std::map<bt::SHA1Hash, PeerMonitor *> * pM) : kt::MonitorInterface(), TQObject(), pmTorIface(pTi), pmPeerMMgr(pM)
{
}
@@ -33,7 +33,7 @@ PeerMonitor::~PeerMonitor()
void PeerMonitor::peerAdded (kt::PeerInterface *peer)
{
- QMutexLocker lock(&mtx);
+ TQMutexLocker lock(&mtx);
mPeers.push_back( peer );
}
@@ -41,9 +41,9 @@ void PeerMonitor::peerAdded (kt::PeerInterface *peer)
void PeerMonitor::peerRemoved (kt::PeerInterface *peer)
{
- QMutexLocker lock(&mtx);
+ TQMutexLocker lock(&mtx);
- data_t::iterator it = std::find(mPeers.begin(), mPeers.end(), peer);
+ data_t::iterator it = std::tqfind(mPeers.begin(), mPeers.end(), peer);
if(it != mPeers.end())
{
@@ -65,7 +65,7 @@ void PeerMonitor::downloadRemoved (kt::ChunkDownloadInterface *)
void PeerMonitor::stopped ()
{
- QMutexLocker lock(&mtx);
+ TQMutexLocker lock(&mtx);
std::fill(mPeers.begin(), mPeers.end(), static_cast<PeerInterface*>( 0 ) );
// mPeers.clear();
@@ -73,7 +73,7 @@ void PeerMonitor::stopped ()
void PeerMonitor::destroyed ()
{
- if(pmPeerMMgr -> find(pmTorIface -> getInfoHash()) != pmPeerMMgr -> end() )
+ if(pmPeerMMgr -> tqfind(pmTorIface -> getInfoHash()) != pmPeerMMgr -> end() )
{
pmTorIface -> setMonitor(0);
pmPeerMMgr -> erase(pmTorIface -> getInfoHash());
@@ -84,12 +84,12 @@ void PeerMonitor::destroyed ()
double PeerMonitor::LeechersUpSpeed()
{
- QMutexLocker lock(&mtx);
+ TQMutexLocker lock(&mtx);
double spd = 0.0;
//without it'll segfault/SIGABRT on stop as in meantime the iterator from
- // mPeers will be invalidated
+ // mPeers will be tqinvalidated
for( data_t::const_iterator it = mPeers.begin(); it != mPeers.end(); it++)
{
@@ -104,7 +104,7 @@ double PeerMonitor::LeechersUpSpeed()
double PeerMonitor::LeechersDownSpeed()
{
- QMutexLocker lock(&mtx);
+ TQMutexLocker lock(&mtx);
double spd = 0.0;
@@ -123,7 +123,7 @@ double PeerMonitor::LeechersDownSpeed()
double PeerMonitor::SeedersUpSpeed()
{
- QMutexLocker lock(&mtx);
+ TQMutexLocker lock(&mtx);
double spd = 0.0;
@@ -143,7 +143,7 @@ double PeerMonitor::SeedersUpSpeed()
uint64_t PeerMonitor::GetLeechers()
{
- QMutexLocker lock(&mtx);
+ TQMutexLocker lock(&mtx);
uint64_t l = 0;
@@ -162,7 +162,7 @@ uint64_t PeerMonitor::GetLeechers()
uint64_t PeerMonitor::GetSeeders()
{
- QMutexLocker lock(&mtx);
+ TQMutexLocker lock(&mtx);
uint64_t s = 0;
diff --git a/plugins/stats/PeerMonitor.h b/plugins/stats/PeerMonitor.h
index d1ef4fc..3489378 100644
--- a/plugins/stats/PeerMonitor.h
+++ b/plugins/stats/PeerMonitor.h
@@ -21,7 +21,7 @@
#ifndef PEERMONITOR_H_
#define PEERMONITOR_H_
-#include <qmutex.h>
+#include <tqmutex.h>
#include <interfaces/monitorinterface.h>
#include <interfaces/peerinterface.h>
@@ -43,7 +43,7 @@ Used for peers statistics
\warning Don't use it, as There Can Be Only One™ and the infowidgetplugin relays on it
*/
-class PeerMonitor : public MonitorInterface, public QObject
+class PeerMonitor : public MonitorInterface, public TQObject
{
public:
///Type of conteiner of pointers to peers
@@ -55,7 +55,7 @@ class PeerMonitor : public MonitorInterface, public QObject
Used for locking conteiner with pointers to peers
*/
- QMutex mtx;
+ TQMutex mtx;
///Container with pointers to peers
data_t mPeers;
///Monitored torrent
diff --git a/plugins/stats/StatsCon.cc b/plugins/stats/StatsCon.cc
index 069ba75..548b38a 100644
--- a/plugins/stats/StatsCon.cc
+++ b/plugins/stats/StatsCon.cc
@@ -22,20 +22,20 @@
namespace kt {
-StatsCon::StatsCon(QWidget * p) : StatsConWgt(p), pmPeersConCht(new ChartDrawer(PeersConGbw, StatsPluginSettings::connectionsMeasurements())),
+StatsCon::StatsCon(TQWidget * p) : StatsConWgt(p), pmPeersConCht(new ChartDrawer(PeersConGbw, StatsPluginSettings::connectionsMeasurements())),
pmDHTCht(new ChartDrawer(DHTGbw, StatsPluginSettings::dHTMeasurements()))
{
PeersConGbw->setColumnLayout(0, Qt::Vertical );
- PeersConGbw->layout()->setSpacing( 6 );
- PeersConGbw->layout()->setMargin( 11 );
+ PeersConGbw->tqlayout()->setSpacing( 6 );
+ PeersConGbw->tqlayout()->setMargin( 11 );
- pmPeersConLay = new QVBoxLayout(PeersConGbw -> layout());
+ pmPeersConLay = new TQVBoxLayout(PeersConGbw -> tqlayout());
DHTGbw->setColumnLayout(0, Qt::Vertical );
- DHTGbw->layout()->setSpacing( 6 );
- DHTGbw->layout()->setMargin( 11 );
+ DHTGbw->tqlayout()->setSpacing( 6 );
+ DHTGbw->tqlayout()->setMargin( 11 );
- pmDHTLay = new QVBoxLayout(DHTGbw -> layout());
+ pmDHTLay = new TQVBoxLayout(DHTGbw -> tqlayout());
//-------------
@@ -46,20 +46,20 @@ StatsCon::StatsCon(QWidget * p) : StatsConWgt(p), pmPeersConCht(new ChartDrawer
pmPeersConCht -> SetUnitName("n");
- pmPeersConCht -> AddValuesCnt(QPen("#f00"), i18n("Leechers connected"));
- pmPeersConCht -> AddValuesCnt(QPen("#900"), i18n("Leechers in swarms"));
- pmPeersConCht -> AddValuesCnt(QPen("#00f"), i18n("Seeders connected"));
- pmPeersConCht -> AddValuesCnt(QPen("#009"), i18n("Seeders in swarms"));
- pmPeersConCht -> AddValuesCnt(QPen("#0a0"), i18n("Average connected leechers per torrent"));
- pmPeersConCht -> AddValuesCnt(QPen("#060"), i18n("Average connected seeders per torrent"));
- pmPeersConCht -> AddValuesCnt(QPen("#099"), i18n("Average connected leechers per running torrent"));
- pmPeersConCht -> AddValuesCnt(QPen("#055"), i18n("Average connected seeders per running torrent"));
+ pmPeersConCht -> AddValuesCnt(TQPen("#f00"), i18n("Leechers connected"));
+ pmPeersConCht -> AddValuesCnt(TQPen("#900"), i18n("Leechers in swarms"));
+ pmPeersConCht -> AddValuesCnt(TQPen("#00f"), i18n("Seeders connected"));
+ pmPeersConCht -> AddValuesCnt(TQPen("#009"), i18n("Seeders in swarms"));
+ pmPeersConCht -> AddValuesCnt(TQPen("#0a0"), i18n("Average connected leechers per torrent"));
+ pmPeersConCht -> AddValuesCnt(TQPen("#060"), i18n("Average connected seeders per torrent"));
+ pmPeersConCht -> AddValuesCnt(TQPen("#099"), i18n("Average connected leechers per running torrent"));
+ pmPeersConCht -> AddValuesCnt(TQPen("#055"), i18n("Average connected seeders per running torrent"));
pmDHTCht -> SetUnitName("n");
- pmDHTCht -> AddValuesCnt(QPen("#f00"), i18n("Nodes"));
- pmDHTCht -> AddValuesCnt(QPen("#00f"), i18n("Tasks"));
+ pmDHTCht -> AddValuesCnt(TQPen("#f00"), i18n("Nodes"));
+ pmDHTCht -> AddValuesCnt(TQPen("#00f"), i18n("Tasks"));
}
StatsCon::~StatsCon()
diff --git a/plugins/stats/StatsCon.h b/plugins/stats/StatsCon.h
index 9d60048..da984f1 100644
--- a/plugins/stats/StatsCon.h
+++ b/plugins/stats/StatsCon.h
@@ -21,10 +21,10 @@
#ifndef STATSCON_H_
#define STATSCON_H_
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qgroupbox.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tqgroupbox.h>
#include "statspluginsettings.h"
#include "statsconwgt.h"
@@ -35,11 +35,12 @@ namespace kt {
class StatsCon : public StatsConWgt
{
Q_OBJECT
+ TQ_OBJECT
private:
///Layout of peers connections
- QVBoxLayout * pmPeersConLay;
+ TQVBoxLayout * pmPeersConLay;
///Layout of DHT stats
- QVBoxLayout * pmDHTLay;
+ TQVBoxLayout * pmDHTLay;
///Chart widget of peers connted
ChartDrawer * pmPeersConCht;
@@ -47,7 +48,7 @@ class StatsCon : public StatsConWgt
ChartDrawer * pmDHTCht;
public:
- StatsCon(QWidget * p = 0);
+ StatsCon(TQWidget * p = 0);
virtual ~StatsCon();
/**
\brief Adds value to peers connections chart
diff --git a/plugins/stats/StatsPluginPrefs.cc b/plugins/stats/StatsPluginPrefs.cc
index 07cfa23..1d501a6 100644
--- a/plugins/stats/StatsPluginPrefs.cc
+++ b/plugins/stats/StatsPluginPrefs.cc
@@ -54,9 +54,9 @@ bool StatsPluginPrefs::apply ()
return true;
}
-void StatsPluginPrefs::createWidget (QWidget *parent)
+void StatsPluginPrefs::createWidget (TQWidget *tqparent)
{
- pmUi = new StatsPluginPrefsPage(parent);
+ pmUi = new StatsPluginPrefsPage(tqparent);
}
void StatsPluginPrefs::updateData ()
diff --git a/plugins/stats/StatsPluginPrefs.h b/plugins/stats/StatsPluginPrefs.h
index 6d563ec..2eabcac 100644
--- a/plugins/stats/StatsPluginPrefs.h
+++ b/plugins/stats/StatsPluginPrefs.h
@@ -21,9 +21,9 @@
#ifndef STATSPLUGINPREFS_H_
#define STATSPLUGINPREFS_H_
-#include <qspinbox.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
+#include <tqspinbox.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
#include <klocale.h>
#include <kglobal.h>
@@ -40,9 +40,10 @@ namespace kt {
\brief Prefs page
\author Krzysztof Kundzicz <athantor@gmail.com>
*/
-class StatsPluginPrefs : public QObject, public PrefPageInterface
+class StatsPluginPrefs : public TQObject, public PrefPageInterface
{
Q_OBJECT
+ TQ_OBJECT
private:
///Widget
@@ -54,7 +55,7 @@ class StatsPluginPrefs : public QObject, public PrefPageInterface
virtual ~StatsPluginPrefs();
virtual bool apply ();
- virtual void createWidget (QWidget *parent);
+ virtual void createWidget (TQWidget *tqparent);
virtual void updateData ();
virtual void deleteWidget ();
signals:
diff --git a/plugins/stats/StatsPluginPrefsPage.cc b/plugins/stats/StatsPluginPrefsPage.cc
index 1278127..e641349 100644
--- a/plugins/stats/StatsPluginPrefsPage.cc
+++ b/plugins/stats/StatsPluginPrefsPage.cc
@@ -22,7 +22,7 @@
namespace kt {
-StatsPluginPrefsPage::StatsPluginPrefsPage(QWidget *p) : sprefwgt(p)
+StatsPluginPrefsPage::StatsPluginPrefsPage(TQWidget *p) : sprefwgt(p)
{
}
diff --git a/plugins/stats/StatsPluginPrefsPage.h b/plugins/stats/StatsPluginPrefsPage.h
index 59bd9f1..eca849f 100644
--- a/plugins/stats/StatsPluginPrefsPage.h
+++ b/plugins/stats/StatsPluginPrefsPage.h
@@ -36,7 +36,7 @@ class StatsPluginPrefsPage : public sprefwgt
\brief Constructor
\param p Parent
*/
- StatsPluginPrefsPage(QWidget * p = 0);
+ StatsPluginPrefsPage(TQWidget * p = 0);
};
}
diff --git a/plugins/stats/StatsSpd.cc b/plugins/stats/StatsSpd.cc
index e4f9d53..0ea427a 100644
--- a/plugins/stats/StatsSpd.cc
+++ b/plugins/stats/StatsSpd.cc
@@ -22,29 +22,29 @@
namespace kt {
-StatsSpd::StatsSpd(QWidget *p) : StatsSpdWgt(p),
+StatsSpd::StatsSpd(TQWidget *p) : StatsSpdWgt(p),
pmDownCht(new ChartDrawer(DownSpeedGbw, StatsPluginSettings::downloadMeasurements())),
pmPeersSpdCht(new ChartDrawer(PeersSpdGbw, StatsPluginSettings::peersSpeedMeasurements())),
pmUpCht(new ChartDrawer(UpSpeedGbw, StatsPluginSettings::uploadMeasurements()))
{
DownSpeedGbw->setColumnLayout(0, Qt::Vertical );
- DownSpeedGbw->layout()->setSpacing( 6 );
- DownSpeedGbw->layout()->setMargin( 11 );
+ DownSpeedGbw->tqlayout()->setSpacing( 6 );
+ DownSpeedGbw->tqlayout()->setMargin( 11 );
- pmDSpdLay = new QVBoxLayout(DownSpeedGbw -> layout());
+ pmDSpdLay = new TQVBoxLayout(DownSpeedGbw -> tqlayout());
UpSpeedGbw->setColumnLayout(0, Qt::Vertical );
- UpSpeedGbw->layout()->setSpacing( 6 );
- UpSpeedGbw->layout()->setMargin( 11 );
+ UpSpeedGbw->tqlayout()->setSpacing( 6 );
+ UpSpeedGbw->tqlayout()->setMargin( 11 );
- pmUSpdLay = new QVBoxLayout(UpSpeedGbw -> layout());
+ pmUSpdLay = new TQVBoxLayout(UpSpeedGbw -> tqlayout());
PeersSpdGbw->setColumnLayout(0, Qt::Vertical );
- PeersSpdGbw->layout()->setSpacing( 6 );
- PeersSpdGbw->layout()->setMargin( 11 );
+ PeersSpdGbw->tqlayout()->setSpacing( 6 );
+ PeersSpdGbw->tqlayout()->setMargin( 11 );
- pmPeersSpdLay = new QVBoxLayout(PeersSpdGbw -> layout());
+ pmPeersSpdLay = new TQVBoxLayout(PeersSpdGbw -> tqlayout());
//-----------------
@@ -54,25 +54,25 @@ StatsSpd::StatsSpd(QWidget *p) : StatsSpdWgt(p),
// ----------------
- pmUpCht -> AddValuesCnt(QPen("#f00"), i18n("Current"));
- pmDownCht -> AddValuesCnt(QPen("#f00"), i18n("Current"));
+ pmUpCht -> AddValuesCnt(TQPen("#f00"), i18n("Current"));
+ pmDownCht -> AddValuesCnt(TQPen("#f00"), i18n("Current"));
- pmUpCht -> AddValuesCnt(QPen("#00f"), i18n("Average"));
- pmDownCht -> AddValuesCnt(QPen("#00f"), i18n("Average"));
+ pmUpCht -> AddValuesCnt(TQPen("#00f"), i18n("Average"));
+ pmDownCht -> AddValuesCnt(TQPen("#00f"), i18n("Average"));
pmUpCht -> AddValuesCnt(i18n("Limit"), 0);
pmDownCht -> AddValuesCnt(i18n("Limit"), 0);
-// pmUpCht -> AddValuesCnt(QPen("#f0f"), i18n("Current torrent"));
-// pmDownCht -> AddValuesCnt(QPen("#f0f"), i18n("Current torrent"));
+// pmUpCht -> AddValuesCnt(TQPen("#f0f"), i18n("Current torrent"));
+// pmDownCht -> AddValuesCnt(TQPen("#f0f"), i18n("Current torrent"));
//
- pmPeersSpdCht -> AddValuesCnt(QPen("#090"), i18n("Average from leecher"));
- pmPeersSpdCht -> AddValuesCnt(QPen("#f00"), i18n("Average to leecher"));
- pmPeersSpdCht -> AddValuesCnt(QPen("#00f"), i18n("Average from seeder"));
- pmPeersSpdCht -> AddValuesCnt(QPen("magenta"), i18n("From leechers"));
- pmPeersSpdCht -> AddValuesCnt(QPen("orange"), i18n("From seeders"));
+ pmPeersSpdCht -> AddValuesCnt(TQPen("#090"), i18n("Average from leecher"));
+ pmPeersSpdCht -> AddValuesCnt(TQPen("#f00"), i18n("Average to leecher"));
+ pmPeersSpdCht -> AddValuesCnt(TQPen("#00f"), i18n("Average from seeder"));
+ pmPeersSpdCht -> AddValuesCnt(TQPen("magenta"), i18n("From leechers"));
+ pmPeersSpdCht -> AddValuesCnt(TQPen("orange"), i18n("From seeders"));
}
diff --git a/plugins/stats/StatsSpd.h b/plugins/stats/StatsSpd.h
index 7ba8d43..971209a 100644
--- a/plugins/stats/StatsSpd.h
+++ b/plugins/stats/StatsSpd.h
@@ -21,10 +21,10 @@
#ifndef STATSSPD_H_
#define STATSSPD_H_
-#include <qwidget.h>
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qgroupbox.h>
+#include <tqwidget.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tqgroupbox.h>
#include "statspluginsettings.h"
#include "statsspdwgt.h"
@@ -39,14 +39,15 @@ namespace kt {
class StatsSpd : public StatsSpdWgt
{
Q_OBJECT
+ TQ_OBJECT
private:
///Layout of upload speed
- QVBoxLayout * pmUSpdLay;
+ TQVBoxLayout * pmUSpdLay;
///Layout of down speed
- QVBoxLayout * pmDSpdLay;
+ TQVBoxLayout * pmDSpdLay;
///Layout of peers speed
- QVBoxLayout * pmPeersSpdLay;
+ TQVBoxLayout * pmPeersSpdLay;
///Chart widget of download speed
ChartDrawer * pmDownCht;
@@ -60,7 +61,7 @@ class StatsSpd : public StatsSpdWgt
\brief Constructor
\param p Parent
*/
- StatsSpd(QWidget *p = 0);
+ StatsSpd(TQWidget *p = 0);
///Destructor
virtual ~StatsSpd();
diff --git a/plugins/stats/sprefwgt.ui b/plugins/stats/sprefwgt.ui
index 7b6674a..4ee3641 100644
--- a/plugins/stats/sprefwgt.ui
+++ b/plugins/stats/sprefwgt.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>sprefwgt</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>sprefwgt</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="spacing">
<number>0</number>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox1</cstring>
</property>
@@ -30,15 +30,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -49,7 +49,7 @@
<cstring>GuiUpdatesSbw</cstring>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>GuiUpdatesSbw</cstring>
</property>
@@ -63,7 +63,7 @@
<number>4</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -76,15 +76,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -95,7 +95,7 @@
<cstring>spinBox2</cstring>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>DataIvalSbw</cstring>
</property>
@@ -112,7 +112,7 @@
<number>1000</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -127,7 +127,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox5</cstring>
</property>
@@ -138,15 +138,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout11</cstring>
+ <cstring>tqlayout11</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_4</cstring>
</property>
@@ -154,7 +154,7 @@
<string>Maximum speed scale mode:</string>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<item>
<property name="text">
<string>Top</string>
@@ -184,7 +184,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox3</cstring>
</property>
@@ -195,15 +195,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>PeersSpdCbw</cstring>
</property>
@@ -214,7 +214,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -222,7 +222,7 @@
<string>update every</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>PeersSpdUpdIvalSbw</cstring>
</property>
@@ -236,7 +236,7 @@
<number>4</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
@@ -246,20 +246,20 @@
</widget>
</hbox>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel3_2</cstring>
</property>
<property name="text">
<string>Gathering data about many connected peers can be CPU consuming.</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox11</cstring>
</property>
@@ -273,15 +273,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout7</cstring>
+ <cstring>tqlayout7</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>ConnSdrInSwaCbw</cstring>
</property>
@@ -289,7 +289,7 @@
<string>Show seeders in swarms</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>ConnLchInSwaCbw</cstring>
</property>
@@ -301,7 +301,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupBox8</cstring>
</property>
@@ -312,15 +312,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
@@ -328,7 +328,7 @@
<string>Download</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>DownloadMrmtSbw</cstring>
</property>
@@ -344,15 +344,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout5_2</cstring>
+ <cstring>tqlayout5_2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_3_2</cstring>
</property>
@@ -360,7 +360,7 @@
<string>Peers speed</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>PeersSpdMrmtSbw</cstring>
</property>
@@ -376,15 +376,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="2" column="0">
+ <widget class="TQLayoutWidget" row="2" column="0">
<property name="name">
- <cstring>layout5_3</cstring>
+ <cstring>tqlayout5_3</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_3_3</cstring>
</property>
@@ -392,7 +392,7 @@
<string>Upload</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>UploadMrmtSbw</cstring>
</property>
@@ -408,15 +408,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="0" column="1">
+ <widget class="TQLayoutWidget" row="0" column="1">
<property name="name">
- <cstring>layout5_5</cstring>
+ <cstring>tqlayout5_5</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_3_5</cstring>
</property>
@@ -424,7 +424,7 @@
<string>Connections</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>ConnsMrmtSbw</cstring>
</property>
@@ -440,15 +440,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="1" column="1">
+ <widget class="TQLayoutWidget" row="1" column="1">
<property name="name">
- <cstring>layout5_4</cstring>
+ <cstring>tqlayout5_4</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_3_4</cstring>
</property>
@@ -456,7 +456,7 @@
<string>DHT</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>DHTMrmtSbw</cstring>
</property>
@@ -484,7 +484,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>40</height>
@@ -513,5 +513,5 @@
<slot>setEnabled(bool)</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/plugins/stats/statsconwgt.ui b/plugins/stats/statsconwgt.ui
index 07753dc..84f5d55 100644
--- a/plugins/stats/statsconwgt.ui
+++ b/plugins/stats/statsconwgt.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>StatsConWgt</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>StatsConWgt</cstring>
</property>
@@ -16,15 +16,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>PeersConGbw</cstring>
</property>
@@ -32,7 +32,7 @@
<string>Peers</string>
</property>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>DHTGbw</cstring>
</property>
@@ -44,5 +44,5 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/plugins/stats/statsplugin.cc b/plugins/stats/statsplugin.cc
index d3d1b03..224d736 100644
--- a/plugins/stats/statsplugin.cc
+++ b/plugins/stats/statsplugin.cc
@@ -25,8 +25,8 @@ K_EXPORT_COMPONENT_FACTORY(ktstatsplugin, KGenericFactory<kt::StatsPlugin>("ktst
namespace kt
{
-StatsPlugin::StatsPlugin(QObject* parent, const char* qt_name, const QStringList& args):
- Plugin(parent, qt_name, args, "Statistics", i18n("Statistics"),"Krzysztof Kundzicz", "athantor@gmail.com", i18n("Shows transfers statistics"),"ktimemon"), pmUiSpd(0), pmUiCon(0), pmPrefsUi(0), pmUpdTmr(0)
+StatsPlugin::StatsPlugin(TQObject* tqparent, const char* qt_name, const TQStringList& args):
+ Plugin(tqparent, qt_name, args, "Statistics", i18n("Statistics"),"Krzysztof Kundzicz", "athantor@gmail.com", i18n("Shows transfers statistics"),"ktimemon"), pmUiSpd(0), pmUiCon(0), pmPrefsUi(0), pmUpdTmr(0)
{
mUpAvg = std::make_pair(0.0, 0.0);
mDownAvg = std::make_pair(0.0, 0.0);
@@ -46,18 +46,18 @@ void StatsPlugin::load()
mUpdCtr = 1;
mPeerSpdUpdCtr = 1;
- pmUiSpd = new StatsSpd(dynamic_cast<QWidget *>(parent()));
- pmUiCon = new StatsCon(dynamic_cast<QWidget *>(parent()));
+ pmUiSpd = new StatsSpd(dynamic_cast<TQWidget *>(tqparent()));
+ pmUiCon = new StatsCon(dynamic_cast<TQWidget *>(tqparent()));
pmPrefsUi = new StatsPluginPrefs();
- pmUpdTmr = new QTimer(this);
+ pmUpdTmr = new TQTimer(this);
- connect(pmUpdTmr, SIGNAL(timeout () ), this, SLOT(UpdateData()));
- connect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(RestartTimer()));
- connect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(TogglePeersSpdCht()));
- connect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(ToggleLchInSwmDrawing()));
- connect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(ToggleSdrInSwmDrawing()));
- connect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(ChangeMsmtsCounts()));
- connect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(ChangeMaxMode()));
+ connect(pmUpdTmr, TQT_SIGNAL(timeout () ), this, TQT_SLOT(UpdateData()));
+ connect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(RestartTimer()));
+ connect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(TogglePeersSpdCht()));
+ connect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(ToggleLchInSwmDrawing()));
+ connect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(ToggleSdrInSwmDrawing()));
+ connect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(ChangeMsmtsCounts()));
+ connect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(ChangeMaxMode()));
TogglePeersSpdCht();
ChangeMaxMode();
@@ -76,13 +76,13 @@ void StatsPlugin::unload()
getGUI() -> removeToolWidget(pmUiCon);
getGUI() -> removePrefPage(pmPrefsUi);
- disconnect(pmUpdTmr, SIGNAL(timeout()), this, SLOT(UpdateData()));
- disconnect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(RestartTimer()));
- disconnect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(TogglePeersSpdCht()));
- disconnect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(ToggleLchInSwmDrawing()));
- disconnect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(ToggleSdrInSwmDrawing()));
- disconnect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(ChangeMsmtsCounts()));
- disconnect(pmPrefsUi, SIGNAL(Applied()), this, SLOT(ChangeMaxMode()));
+ disconnect(pmUpdTmr, TQT_SIGNAL(timeout()), this, TQT_SLOT(UpdateData()));
+ disconnect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(RestartTimer()));
+ disconnect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(TogglePeersSpdCht()));
+ disconnect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(ToggleLchInSwmDrawing()));
+ disconnect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(ToggleSdrInSwmDrawing()));
+ disconnect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(ChangeMsmtsCounts()));
+ disconnect(pmPrefsUi, TQT_SIGNAL(Applied()), this, TQT_SLOT(ChangeMaxMode()));
delete pmUiSpd;
delete pmUiCon;
@@ -90,7 +90,7 @@ void StatsPlugin::unload()
delete pmUpdTmr;
}
-bool StatsPlugin::versionCheck(const QString& rVer) const
+bool StatsPlugin::versionCheck(const TQString& rVer) const
{
return rVer == KT_VERSION_MACRO;
}
diff --git a/plugins/stats/statsplugin.h b/plugins/stats/statsplugin.h
index 14f1fcd..df482a7 100644
--- a/plugins/stats/statsplugin.h
+++ b/plugins/stats/statsplugin.h
@@ -23,8 +23,8 @@
#include <kgenericfactory.h>
-#include <qwidget.h>
-#include <qtimer.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
#include <interfaces/plugin.h>
#include <interfaces/guiinterface.h>
@@ -52,6 +52,7 @@ namespace kt {
class StatsPlugin : public Plugin
{
Q_OBJECT
+ TQ_OBJECT
private:
///Speed UI of the plugin
@@ -104,7 +105,7 @@ class StatsPlugin : public Plugin
std::pair<uint32_t, uint32_t> mRunningSeedAvg;
///Data update timer
- QTimer * pmUpdTmr;
+ TQTimer * pmUpdTmr;
///Update ctr
uint32_t mUpdCtr;
@@ -133,17 +134,17 @@ class StatsPlugin : public Plugin
public:
/**
\brief Constructor
- \param parent Parent
+ \param tqparent Parent
\param qt_name
\param args
*/
- StatsPlugin(QObject* parent, const char* qt_name, const QStringList& args);
+ StatsPlugin(TQObject* tqparent, const char* qt_name, const TQStringList& args);
///Destructor
virtual ~StatsPlugin();
virtual void load();
virtual void unload();
- virtual bool versionCheck(const QString&) const;
+ virtual bool versionCheck(const TQString&) const;
virtual void guiUpdate();
};
diff --git a/plugins/stats/statsspdwgt.ui b/plugins/stats/statsspdwgt.ui
index 162bf9c..c31124d 100644
--- a/plugins/stats/statsspdwgt.ui
+++ b/plugins/stats/statsspdwgt.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>StatsSpdWgt</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>StatsSpdWgt</cstring>
</property>
@@ -16,15 +16,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>DownSpeedGbw</cstring>
</property>
@@ -32,7 +32,7 @@
<string>Download</string>
</property>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>PeersSpdGbw</cstring>
</property>
@@ -40,7 +40,7 @@
<string>Peers</string>
</property>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>UpSpeedGbw</cstring>
</property>
@@ -52,5 +52,5 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/plugins/upnp/soap.cpp b/plugins/upnp/soap.cpp
index b155b55..f80d5af 100644
--- a/plugins/upnp/soap.cpp
+++ b/plugins/upnp/soap.cpp
@@ -22,32 +22,32 @@
namespace kt
{
- QString SOAP::createCommand(const QString & action,const QString & service)
+ TQString SOAP::createCommand(const TQString & action,const TQString & service)
{
- QString comm = QString("<?xml version=\"1.0\"?>\r\n"
+ TQString comm = TQString("<?xml version=\"1.0\"?>\r\n"
"<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\"SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">"
"<SOAP-ENV:Body>"
"<m:%1 xmlns:m=\"%2\"/>"
"</SOAP-ENV:Body></SOAP-ENV:Envelope>"
- "\r\n").arg(action).arg(service);
+ "\r\n").tqarg(action).tqarg(service);
return comm;
}
- QString SOAP::createCommand(const QString & action,const QString & service,const QValueList<Arg> & args)
+ TQString SOAP::createCommand(const TQString & action,const TQString & service,const TQValueList<Arg> & args)
{
- QString comm = QString("<?xml version=\"1.0\"?>\r\n"
+ TQString comm = TQString("<?xml version=\"1.0\"?>\r\n"
"<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\" SOAP-ENV:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">"
"<SOAP-ENV:Body>"
- "<m:%1 xmlns:m=\"%2\">").arg(action).arg(service);
+ "<m:%1 xmlns:m=\"%2\">").tqarg(action).tqarg(service);
- for (QValueList<Arg>::const_iterator i = args.begin();i != args.end();i++)
+ for (TQValueList<Arg>::const_iterator i = args.begin();i != args.end();i++)
{
const Arg & a = *i;
comm += "<" + a.element + ">" + a.value + "</" + a.element + ">";
}
- comm += QString("</m:%1></SOAP-ENV:Body></SOAP-ENV:Envelope>\r\n").arg(action);
+ comm += TQString("</m:%1></SOAP-ENV:Body></SOAP-ENV:Envelope>\r\n").tqarg(action);
return comm;
}
}
diff --git a/plugins/upnp/soap.h b/plugins/upnp/soap.h
index c11e2ed..6632342 100644
--- a/plugins/upnp/soap.h
+++ b/plugins/upnp/soap.h
@@ -20,8 +20,8 @@
#ifndef KTSOAP_H
#define KTSOAP_H
-#include <qvaluelist.h>
-#include <qstring.h>
+#include <tqvaluelist.h>
+#include <tqstring.h>
namespace kt
{
@@ -39,12 +39,12 @@ namespace kt
* @param service The name of the service
* @return The command
*/
- static QString createCommand(const QString & action,const QString & service);
+ static TQString createCommand(const TQString & action,const TQString & service);
struct Arg
{
- QString element;
- QString value;
+ TQString element;
+ TQString value;
};
/**
@@ -54,7 +54,7 @@ namespace kt
* @param args Arguments for command
* @return The command
*/
- static QString createCommand(const QString & action,const QString & service,const QValueList<Arg> & args);
+ static TQString createCommand(const TQString & action,const TQString & service,const TQValueList<Arg> & args);
};
}
diff --git a/plugins/upnp/upnpdescriptionparser.cpp b/plugins/upnp/upnpdescriptionparser.cpp
index 43afbc3..bd933a4 100644
--- a/plugins/upnp/upnpdescriptionparser.cpp
+++ b/plugins/upnp/upnpdescriptionparser.cpp
@@ -17,8 +17,8 @@
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qxml.h>
-#include <qvaluestack.h>
+#include <tqxml.h>
+#include <tqvaluestack.h>
#include <util/fileops.h>
#include <util/log.h>
#include <torrent/globals.h>
@@ -30,17 +30,17 @@ using namespace bt;
namespace kt
{
- class XMLContentHandler : public QXmlDefaultHandler
+ class XMLContentHandler : public TQXmlDefaultHandler
{
- enum Status
+ enum tqStatus
{
TOPLEVEL,ROOT,DEVICE,SERVICE,FIELD,OTHER
};
- QString tmp;
+ TQString tmp;
UPnPRouter* router;
UPnPService curr_service;
- QValueStack<Status> status_stack;
+ TQValueStack<tqStatus> status_stack;
public:
XMLContentHandler(UPnPRouter* router);
virtual ~XMLContentHandler();
@@ -48,13 +48,13 @@ namespace kt
bool startDocument();
bool endDocument();
- bool startElement(const QString &, const QString & localName, const QString &,
- const QXmlAttributes & atts);
- bool endElement(const QString & , const QString & localName, const QString & );
- bool characters(const QString & ch);
+ bool startElement(const TQString &, const TQString & localName, const TQString &,
+ const TQXmlAttributes & atts);
+ bool endElement(const TQString & , const TQString & localName, const TQString & );
+ bool characters(const TQString & ch);
- bool interestingDeviceField(const QString & name);
- bool interestingServiceField(const QString & name);
+ bool interestingDeviceField(const TQString & name);
+ bool interestingServiceField(const TQString & name);
};
@@ -65,17 +65,17 @@ namespace kt
UPnPDescriptionParser::~UPnPDescriptionParser()
{}
- bool UPnPDescriptionParser::parse(const QString & file,UPnPRouter* router)
+ bool UPnPDescriptionParser::parse(const TQString & file,UPnPRouter* router)
{
bool ret = true;
{
- QFile fptr(file);
+ TQFile fptr(file);
if (!fptr.open(IO_ReadOnly))
return false;
- QXmlInputSource input(&fptr);
+ TQXmlInputSource input(TQT_TQIODEVICE(&fptr));
XMLContentHandler chandler(router);
- QXmlSimpleReader reader;
+ TQXmlSimpleReader reader;
reader.setContentHandler(&chandler);
ret = reader.parse(&input,false);
@@ -111,21 +111,21 @@ namespace kt
return true;
}
- bool XMLContentHandler::interestingDeviceField(const QString & name)
+ bool XMLContentHandler::interestingDeviceField(const TQString & name)
{
return name == "friendlyName" || name == "manufacturer" || name == "modelDescription" ||
name == "modelName" || name == "modelNumber";
}
- bool XMLContentHandler::interestingServiceField(const QString & name)
+ bool XMLContentHandler::interestingServiceField(const TQString & name)
{
return name == "serviceType" || name == "serviceId" || name == "SCPDURL" ||
name == "controlURL" || name == "eventSubURL";
}
- bool XMLContentHandler::startElement(const QString &, const QString & localName, const QString &,
- const QXmlAttributes & )
+ bool XMLContentHandler::startElement(const TQString &, const TQString & localName, const TQString &,
+ const TQXmlAttributes & )
{
tmp = "";
switch (status_stack.top())
@@ -172,7 +172,7 @@ namespace kt
return true;
}
- bool XMLContentHandler::endElement(const QString & , const QString & localName, const QString & )
+ bool XMLContentHandler::endElement(const TQString & , const TQString & localName, const TQString & )
{
switch (status_stack.top())
{
@@ -208,7 +208,7 @@ namespace kt
}
- bool XMLContentHandler::characters(const QString & ch)
+ bool XMLContentHandler::characters(const TQString & ch)
{
if (ch.length() > 0)
{
diff --git a/plugins/upnp/upnpdescriptionparser.h b/plugins/upnp/upnpdescriptionparser.h
index 5d4bf1e..2aaacfe 100644
--- a/plugins/upnp/upnpdescriptionparser.h
+++ b/plugins/upnp/upnpdescriptionparser.h
@@ -41,7 +41,7 @@ namespace kt
* @param router The router off the xml description
* @return true upon success
*/
- bool parse(const QString & file,UPnPRouter* router);
+ bool parse(const TQString & file,UPnPRouter* router);
};
}
diff --git a/plugins/upnp/upnpmcastsocket.cpp b/plugins/upnp/upnpmcastsocket.cpp
index 47712ea..6395752 100644
--- a/plugins/upnp/upnpmcastsocket.cpp
+++ b/plugins/upnp/upnpmcastsocket.cpp
@@ -19,24 +19,25 @@
***************************************************************************/
#include <kurl.h>
-#include <unistd.h>
+extern "C" {
+ #include <unistd.h>
+ inline ssize_t mycread (int __fd, void *__buf, size_t __nbytes) { read(__fd, __buf, __nbytes); }
+};
#include <sys/socket.h>
#include <netinet/in.h>
-#include <netinet/in_systm.h>
+#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <arpa/inet.h>
#include <netinet/ip.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <ksocketdevice.h>
#include <ksocketaddress.h>
#include <util/log.h>
#include <torrent/globals.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include "upnpmcastsocket.h"
-
-
using namespace KNetwork;
using namespace bt;
@@ -46,14 +47,14 @@ namespace kt
UPnPMCastSocket::UPnPMCastSocket(bool verbose) : verbose(verbose)
{
routers.setAutoDelete(true);
- QObject::connect(this,SIGNAL(readyRead()),this,SLOT(onReadyRead()));
- QObject::connect(this,SIGNAL(gotError(int)),this,SLOT(onError(int)));
+ TQObject::connect(this,TQT_SIGNAL(readyRead()),this,TQT_SLOT(onReadyRead()));
+ TQObject::connect(this,TQT_SIGNAL(gotError(int)),this,TQT_SLOT(onError(int)));
setAddressReuseable(true);
setFamily(KNetwork::KResolver::IPv4Family);
setBlocking(true);
for (Uint32 i = 0;i < 10;i++)
{
- if (!bind(QString::null,QString::number(1900 + i)))
+ if (!bind(TQString(),TQString::number(1900 + i)))
Out(SYS_PNP|LOG_IMPORTANT) << "Cannot bind to UDP port 1900" << endl;
else
break;
@@ -66,8 +67,8 @@ namespace kt
UPnPMCastSocket::~UPnPMCastSocket()
{
leaveUPnPMCastGroup();
- QObject::disconnect(this,SIGNAL(readyRead()),this,SLOT(onReadyRead()));
- QObject::disconnect(this,SIGNAL(gotError(int)),this,SLOT(onError(int)));
+ TQObject::disconnect(this,TQT_SIGNAL(readyRead()),this,TQT_SLOT(onReadyRead()));
+ TQObject::disconnect(this,TQT_SIGNAL(gotError(int)),this,TQT_SLOT(onError(int)));
}
void UPnPMCastSocket::discover()
@@ -102,7 +103,7 @@ namespace kt
else
{
// add it to the list and emit the signal
- if (!routers.contains(r->getServer()))
+ if (!routers.tqcontains(r->getServer()))
{
routers.insert(r->getServer(),r);
discovered(r);
@@ -123,7 +124,7 @@ namespace kt
// so we need to deal with it oursleves
int fd = socketDevice()->socket();
char tmp;
- read(fd,&tmp,1);
+ mycread(fd,&tmp,1);
return;
}
@@ -134,25 +135,25 @@ namespace kt
if (verbose)
{
Out(SYS_PNP|LOG_NOTICE) << "Received : " << endl;
- Out(SYS_PNP|LOG_NOTICE) << QString(p.data()) << endl;
+ Out(SYS_PNP|LOG_NOTICE) << TQString(p.data()) << endl;
}
// try to make a router of it
UPnPRouter* r = parseResponse(p.data());
if (r)
{
- QObject::connect(r,SIGNAL(xmlFileDownloaded( UPnPRouter*, bool )),
- this,SLOT(onXmlFileDownloaded( UPnPRouter*, bool )));
+ TQObject::connect(r,TQT_SIGNAL(xmlFileDownloaded( UPnPRouter*, bool )),
+ this,TQT_SLOT(onXmlFileDownloaded( UPnPRouter*, bool )));
// download it's xml file
r->downloadXMLFile();
}
}
- UPnPRouter* UPnPMCastSocket::parseResponse(const QByteArray & arr)
+ UPnPRouter* UPnPMCastSocket::parseResponse(const TQByteArray & arr)
{
- QStringList lines = QStringList::split("\r\n",QString(arr),false);
- QString server;
+ TQStringList lines = TQStringList::split("\r\n",TQString(arr),false);
+ TQString server;
KURL location;
/*
@@ -162,14 +163,14 @@ namespace kt
*/
// first read first line and see if contains a HTTP 200 OK message
- QString line = lines.first();
- if (!line.contains("HTTP"))
+ TQString line = lines.first();
+ if (!line.tqcontains("HTTP"))
{
// it is either a 200 OK or a NOTIFY
- if (!line.contains("NOTIFY") && !line.contains("200"))
+ if (!line.tqcontains("NOTIFY") && !line.tqcontains("200"))
return 0;
}
- else if (line.contains("M-SEARCH")) // ignore M-SEARCH
+ else if (line.tqcontains("M-SEARCH")) // ignore M-SEARCH
return 0;
// quick check that the response being parsed is valid
@@ -177,7 +178,7 @@ namespace kt
for (Uint32 idx = 0;idx < lines.count() && !validDevice; idx++)
{
line = lines[idx];
- if ((line.contains("ST:") || line.contains("NT:")) && line.contains("InternetGatewayDevice"))
+ if ((line.tqcontains("ST:") || line.tqcontains("NT:")) && line.tqcontains("InternetGatewayDevice"))
{
validDevice = true;
}
@@ -194,20 +195,20 @@ namespace kt
line = lines[i];
if (line.startsWith("Location") || line.startsWith("LOCATION") || line.startsWith("location"))
{
- location = line.mid(line.find(':') + 1).stripWhiteSpace();
+ location = line.mid(line.tqfind(':') + 1).stripWhiteSpace();
if (!location.isValid())
return 0;
}
else if (line.startsWith("Server") || line.startsWith("server") || line.startsWith("SERVER"))
{
- server = line.mid(line.find(':') + 1).stripWhiteSpace();
+ server = line.mid(line.tqfind(':') + 1).stripWhiteSpace();
if (server.length() == 0)
return 0;
}
}
- if (routers.contains(server))
+ if (routers.tqcontains(server))
{
return 0;
}
@@ -221,22 +222,22 @@ namespace kt
void UPnPMCastSocket::onError(int)
{
- Out(SYS_PNP|LOG_IMPORTANT) << "UPnPMCastSocket Error : " << errorString() << endl;
+ Out(SYS_PNP|LOG_IMPORTANT) << "UPnPMCastSocket Error : " << KSocketBase::errorString() << endl;
}
- void UPnPMCastSocket::saveRouters(const QString & file)
+ void UPnPMCastSocket::saveRouters(const TQString & file)
{
- QFile fptr(file);
+ TQFile fptr(file);
if (!fptr.open(IO_WriteOnly))
{
- Out(SYS_PNP|LOG_IMPORTANT) << "Cannot open file " << file << " : " << fptr.errorString() << endl;
+ Out(SYS_PNP|LOG_IMPORTANT) << "Cannot open file " << file << " : " << TQString(fptr.errorString()) << endl;
return;
}
// file format is simple : 2 lines per router,
// one containing the server, the other the location
- QTextStream fout(&fptr);
- bt::PtrMap<QString,UPnPRouter>::iterator i = routers.begin();
+ TQTextStream fout(&fptr);
+ bt::PtrMap<TQString,UPnPRouter>::iterator i = routers.begin();
while (i != routers.end())
{
UPnPRouter* r = i->second;
@@ -246,29 +247,29 @@ namespace kt
}
}
- void UPnPMCastSocket::loadRouters(const QString & file)
+ void UPnPMCastSocket::loadRouters(const TQString & file)
{
- QFile fptr(file);
+ TQFile fptr(file);
if (!fptr.open(IO_ReadOnly))
{
- Out(SYS_PNP|LOG_IMPORTANT) << "Cannot open file " << file << " : " << fptr.errorString() << endl;
+ Out(SYS_PNP|LOG_IMPORTANT) << "Cannot open file " << file << " : " << TQString(fptr.errorString()) << endl;
return;
}
// file format is simple : 2 lines per router,
// one containing the server, the other the location
- QTextStream fin(&fptr);
+ TQTextStream fin(&fptr);
while (!fin.atEnd())
{
- QString server, location;
+ TQString server, location;
server = fin.readLine();
location = fin.readLine();
- if (!routers.contains(server))
+ if (!routers.tqcontains(server))
{
UPnPRouter* r = new UPnPRouter(server,location);
// download it's xml file
- QObject::connect(r,SIGNAL(xmlFileDownloaded( UPnPRouter*, bool )),this,SLOT(onXmlFileDownloaded( UPnPRouter*, bool )));
+ TQObject::connect(r,TQT_SIGNAL(xmlFileDownloaded( UPnPRouter*, bool )),this,TQT_SLOT(onXmlFileDownloaded( UPnPRouter*, bool )));
r->downloadXMLFile();
}
}
diff --git a/plugins/upnp/upnpmcastsocket.h b/plugins/upnp/upnpmcastsocket.h
index 493c5b9..86688a2 100644
--- a/plugins/upnp/upnpmcastsocket.h
+++ b/plugins/upnp/upnpmcastsocket.h
@@ -40,6 +40,7 @@ namespace kt
class UPnPMCastSocket : public KNetwork::KDatagramSocket
{
Q_OBJECT
+ TQ_OBJECT
public:
UPnPMCastSocket(bool verbose = false);
virtual ~UPnPMCastSocket();
@@ -48,13 +49,13 @@ namespace kt
Uint32 getNumDevicesDiscovered() const {return routers.count();}
/// Find a router using it's server name
- UPnPRouter* findDevice(const QString & name) {return routers.find(name);}
+ UPnPRouter* findDevice(const TQString & name) {return routers.tqfind(name);}
/// Save all routers to a file (for convenience at startup)
- void saveRouters(const QString & file);
+ void saveRouters(const TQString & file);
/// Load all routers from a file
- void loadRouters(const QString & file);
+ void loadRouters(const TQString & file);
public slots:
/**
@@ -76,14 +77,14 @@ namespace kt
void discovered(UPnPRouter* router);
public:
- UPnPRouter* parseResponse(const QByteArray & arr);
+ UPnPRouter* parseResponse(const TQByteArray & arr);
private:
void joinUPnPMCastGroup();
void leaveUPnPMCastGroup();
private:
- bt::PtrMap<QString,UPnPRouter> routers;
+ bt::PtrMap<TQString,UPnPRouter> routers;
bool verbose;
};
}
diff --git a/plugins/upnp/upnpplugin.cpp b/plugins/upnp/upnpplugin.cpp
index dbe58b4..95df507 100644
--- a/plugins/upnp/upnpplugin.cpp
+++ b/plugins/upnp/upnpplugin.cpp
@@ -42,8 +42,8 @@ K_EXPORT_COMPONENT_FACTORY(ktupnpplugin,KGenericFactory<kt::UPnPPlugin>("ktupnpp
namespace kt
{
- UPnPPlugin::UPnPPlugin(QObject* parent, const char* name, const QStringList& args)
- : Plugin(parent, name, args,NAME,i18n("UPnP"),AUTHOR,EMAIL,i18n("Uses UPnP to automatically forward ports on your router"),"ktupnp")
+ UPnPPlugin::UPnPPlugin(TQObject* tqparent, const char* name, const TQStringList& args)
+ : Plugin(tqparent, name, args,NAME,i18n("UPnP"),AUTHOR,EMAIL,i18n("Uses UPnP to automatically forward ports on your router"),"ktupnp")
{
sock = 0;
pref = 0;
@@ -64,7 +64,7 @@ namespace kt
pref = new UPnPPrefPage(sock);
this->getGUI()->addPrefPage(pref);
// load the routers list
- QString routers_file = KGlobal::dirs()->saveLocation("data","ktorrent") + "routers";
+ TQString routers_file = KGlobal::dirs()->saveLocation("data","ktorrent") + "routers";
if (bt::Exists(routers_file))
sock->loadRouters(routers_file);
sock->discover();
@@ -72,7 +72,7 @@ namespace kt
void UPnPPlugin::unload()
{
- QString routers_file = KGlobal::dirs()->saveLocation("data","ktorrent") + "routers";
+ TQString routers_file = KGlobal::dirs()->saveLocation("data","ktorrent") + "routers";
sock->saveRouters(routers_file);
this->getGUI()->removePrefPage(pref);
sock->close();
@@ -87,7 +87,7 @@ namespace kt
pref->shutdown(job);
}
- bool UPnPPlugin::versionCheck(const QString & version) const
+ bool UPnPPlugin::versionCheck(const TQString & version) const
{
return version == KT_VERSION_MACRO;
}
diff --git a/plugins/upnp/upnpplugin.h b/plugins/upnp/upnpplugin.h
index a6ca78a..f6e10f0 100644
--- a/plugins/upnp/upnpplugin.h
+++ b/plugins/upnp/upnpplugin.h
@@ -33,14 +33,15 @@ namespace kt
class UPnPPlugin : public Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- UPnPPlugin(QObject* parent, const char* name, const QStringList& args);
+ UPnPPlugin(TQObject* tqparent, const char* name, const TQStringList& args);
virtual ~UPnPPlugin();
virtual void load();
virtual void unload();
virtual void shutdown(bt::WaitJob* job);
- virtual bool versionCheck(const QString& version) const;
+ virtual bool versionCheck(const TQString& version) const;
private:
UPnPMCastSocket* sock;
UPnPPrefPage* pref;
diff --git a/plugins/upnp/upnpprefpage.cpp b/plugins/upnp/upnpprefpage.cpp
index dc50c2f..aa7a241 100644
--- a/plugins/upnp/upnpprefpage.cpp
+++ b/plugins/upnp/upnpprefpage.cpp
@@ -43,11 +43,11 @@ namespace kt
return true;
}
- void UPnPPrefPage::createWidget(QWidget* parent)
+ void UPnPPrefPage::createWidget(TQWidget* tqparent)
{
- widget = new UPnPPrefWidget(parent);
- QObject::connect(sock,SIGNAL(discovered(UPnPRouter* )),widget,SLOT(addDevice(UPnPRouter* )));
- QObject::connect(widget,SIGNAL(rescan()),sock,SLOT(discover()));
+ widget = new UPnPPrefWidget(tqparent);
+ TQObject::connect(sock,TQT_SIGNAL(discovered(UPnPRouter* )),widget,TQT_SLOT(addDevice(UPnPRouter* )));
+ TQObject::connect(widget,TQT_SIGNAL(rescan()),sock,TQT_SLOT(discover()));
}
void UPnPPrefPage::deleteWidget()
diff --git a/plugins/upnp/upnpprefpage.h b/plugins/upnp/upnpprefpage.h
index 7d5b4f5..abba967 100644
--- a/plugins/upnp/upnpprefpage.h
+++ b/plugins/upnp/upnpprefpage.h
@@ -46,7 +46,7 @@ namespace kt
virtual ~UPnPPrefPage();
virtual bool apply();
- virtual void createWidget(QWidget* parent);
+ virtual void createWidget(TQWidget* tqparent);
virtual void deleteWidget();
virtual void updateData();
diff --git a/plugins/upnp/upnpprefwidget.cpp b/plugins/upnp/upnpprefwidget.cpp
index 43e2aec..bd4e593 100644
--- a/plugins/upnp/upnpprefwidget.cpp
+++ b/plugins/upnp/upnpprefwidget.cpp
@@ -37,13 +37,13 @@ using namespace bt;
namespace kt
{
- UPnPPrefWidget::UPnPPrefWidget(QWidget* parent, const char* name, WFlags fl)
- : UPnPWidget(parent,name,fl)
+ UPnPPrefWidget::UPnPPrefWidget(TQWidget* tqparent, const char* name, WFlags fl)
+ : UPnPWidget(tqparent,name,fl)
{
def_router = 0;
- connect(m_forward_btn,SIGNAL(clicked()),this,SLOT(onForwardBtnClicked()));
- connect(m_undo_forward_btn,SIGNAL(clicked()),this,SLOT(onUndoForwardBtnClicked()));
- connect(m_rescan,SIGNAL(clicked()),this,SLOT(onRescanClicked()));
+ connect(m_forward_btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(onForwardBtnClicked()));
+ connect(m_undo_forward_btn,TQT_SIGNAL(clicked()),this,TQT_SLOT(onUndoForwardBtnClicked()));
+ connect(m_rescan,TQT_SIGNAL(clicked()),this,TQT_SLOT(onRescanClicked()));
bt::Globals::instance().getPortList().setListener(this);
}
@@ -72,13 +72,13 @@ namespace kt
void UPnPPrefWidget::addDevice(UPnPRouter* r)
{
- connect(r,SIGNAL(updateGUI()),this,SLOT(updatePortMappings()));
+ connect(r,TQT_SIGNAL(updateGUI()),this,TQT_SLOT(updatePortMappings()));
KListViewItem* item = new KListViewItem(m_device_list,r->getDescription().friendlyName);
item->setMultiLinesEnabled(true);
itemmap[item] = r;
// if we have discovered the default device or there is none
// forward it's ports
- QString def_dev = UPnPPluginSettings::defaultDevice();
+ TQString def_dev = UPnPPluginSettings::defaultDevice();
if (def_dev == r->getServer() || def_dev.length() == 0)
{
Out(SYS_PNP|LOG_DEBUG) << "Doing default port mappings ..." << endl;
@@ -126,7 +126,7 @@ namespace kt
r->forward(p);
}
- QString def_dev = UPnPPluginSettings::defaultDevice();
+ TQString def_dev = UPnPPluginSettings::defaultDevice();
if (def_dev != r->getServer())
{
UPnPPluginSettings::setDefaultDevice(r->getServer());
@@ -168,10 +168,10 @@ namespace kt
r->undoForward(p,false);
}
- QString def_dev = UPnPPluginSettings::defaultDevice();
+ TQString def_dev = UPnPPluginSettings::defaultDevice();
if (def_dev == r->getServer())
{
- UPnPPluginSettings::setDefaultDevice(QString::null);
+ UPnPPluginSettings::setDefaultDevice(TQString());
UPnPPluginSettings::writeConfig();
def_router = 0;
}
@@ -186,22 +186,22 @@ namespace kt
void UPnPPrefWidget::updatePortMappings()
{
// update all port mappings
- QMap<KListViewItem*,UPnPRouter*>::iterator i = itemmap.begin();
+ TQMap<KListViewItem*,UPnPRouter*>::iterator i = itemmap.begin();
while (i != itemmap.end())
{
UPnPRouter* r = i.data();
KListViewItem* item = i.key();
- QString msg,services;
- QValueList<UPnPRouter::Forwarding>::iterator j = r->beginPortMappings();
+ TQString msg,services;
+ TQValueList<UPnPRouter::Forwarding>::iterator j = r->beginPortMappings();
while (j != r->endPortMappings())
{
UPnPRouter::Forwarding & f = *j;
if (!f.pending_req)
{
- msg += QString::number(f.port.number) + " (";
- QString prot = (f.port.proto == net::UDP ? "UDP" : "TCP");
+ msg += TQString::number(f.port.number) + " (";
+ TQString prot = (f.port.proto == net::UDP ? "UDP" : "TCP");
msg += prot + ")";
- if (f.service->servicetype.contains("WANPPPConnection"))
+ if (f.service->servicetype.tqcontains("WANPPPConnection"))
services += "PPP";
else
services += "IP";
diff --git a/plugins/upnp/upnpprefwidget.h b/plugins/upnp/upnpprefwidget.h
index 16fa31b..4c2c954 100644
--- a/plugins/upnp/upnpprefwidget.h
+++ b/plugins/upnp/upnpprefwidget.h
@@ -21,7 +21,7 @@
#ifndef UPNPPREFWIDGET_H
#define UPNPPREFWIDGET_H
-#include <qmap.h>
+#include <tqmap.h>
#include "upnprouter.h"
#include "upnpwidget.h"
@@ -41,9 +41,10 @@ namespace kt
class UPnPPrefWidget : public UPnPWidget,public net::PortListener
{
Q_OBJECT
+ TQ_OBJECT
public:
- UPnPPrefWidget(QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ UPnPPrefWidget(TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 );
virtual ~UPnPPrefWidget();
void shutdown(bt::WaitJob* job);
@@ -74,7 +75,7 @@ namespace kt
virtual void portRemoved(const net::Port & port);
private:
- QMap<KListViewItem*,UPnPRouter*> itemmap;
+ TQMap<KListViewItem*,UPnPRouter*> itemmap;
UPnPRouter* def_router;
};
}
diff --git a/plugins/upnp/upnprouter.cpp b/plugins/upnp/upnprouter.cpp
index 617abf5..e5593ea 100644
--- a/plugins/upnp/upnprouter.cpp
+++ b/plugins/upnp/upnprouter.cpp
@@ -21,7 +21,7 @@
#include <klocale.h>
#include <kglobal.h>
#include <kstandarddirs.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kio/netaccess.h>
#include <kio/job.h>
#include <torrent/globals.h>
@@ -54,7 +54,7 @@ namespace kt
this->scpdurl = s.scpdurl;
}
- void UPnPService::setProperty(const QString & name,const QString & value)
+ void UPnPService::setProperty(const TQString & name,const TQString & value)
{
if (name == "serviceType")
servicetype = value;
@@ -94,7 +94,7 @@ namespace kt
///////////////////////////////////////
- void UPnPDeviceDescription::setProperty(const QString & name,const QString & value)
+ void UPnPDeviceDescription::setProperty(const TQString & name,const TQString & value)
{
if (name == "friendlyName")
friendlyName = value;
@@ -110,16 +110,16 @@ namespace kt
///////////////////////////////////////
- UPnPRouter::UPnPRouter(const QString & server,const KURL & location,bool verbose) : server(server),location(location),verbose(verbose)
+ UPnPRouter::UPnPRouter(const TQString & server,const KURL & location,bool verbose) : server(server),location(location),verbose(verbose)
{
// make the tmp_file unique, current time * a random number should be enough
- tmp_file = QString("/tmp/ktorrent_upnp_description-%1.xml").arg(bt::GetCurrentTime() * rand());
+ tmp_file = TQString("/tmp/ktorrent_upnp_description-%1.xml").tqarg(bt::GetCurrentTime() * rand());
}
UPnPRouter::~UPnPRouter()
{
- QValueList<HTTPRequest*>::iterator i = active_reqs.begin();
+ TQValueList<HTTPRequest*>::iterator i = active_reqs.begin();
while (i != active_reqs.end())
{
(*i)->deleteLater();
@@ -129,7 +129,7 @@ namespace kt
void UPnPRouter::addService(const UPnPService & s)
{
- QValueList<UPnPService>::iterator i = services.begin();
+ TQValueList<UPnPService>::iterator i = services.begin();
while (i != services.end())
{
UPnPService & os = *i;
@@ -148,14 +148,14 @@ namespace kt
return;
}
- QString target = tmp_file;
+ TQString target = tmp_file;
// load in the file (target is always local)
UPnPDescriptionParser desc_parse;
bool ret = desc_parse.parse(target,this);
if (!ret)
{
Out(SYS_PNP|LOG_IMPORTANT) << "Error parsing router description !" << endl;
- QString dest = KGlobal::dirs()->saveLocation("data","ktorrent") + "upnp_failure";
+ TQString dest = KGlobal::dirs()->saveLocation("data","ktorrent") + "upnp_failure";
KIO::file_copy(target,dest,-1,true,false,false);
}
else
@@ -171,7 +171,7 @@ namespace kt
{
// downlaod XML description into a temporary file in /tmp
KIO::Job* job = KIO::file_copy(location,tmp_file,-1,true,false,false);
- connect(job,SIGNAL(result(KIO::Job *)),this,SLOT(downloadFinished( KIO::Job* )));
+ connect(job,TQT_SIGNAL(result(KIO::Job *)),this,TQT_SLOT(downloadFinished( KIO::Job* )));
}
void UPnPRouter::debugPrintData()
@@ -182,7 +182,7 @@ namespace kt
Out(SYS_PNP|LOG_DEBUG) << "Model description = " << desc.modelDescription << endl;
Out(SYS_PNP|LOG_DEBUG) << "Model name = " << desc.modelName << endl;
Out(SYS_PNP|LOG_DEBUG) << "Model number = " << desc.modelNumber << endl;
- for (QValueList<UPnPService>::iterator i = services.begin();i != services.end();i++)
+ for (TQValueList<UPnPService>::iterator i = services.begin();i != services.end();i++)
{
UPnPService & s = *i;
Out() << "Service : " << endl;
@@ -196,14 +196,14 @@ namespace kt
void UPnPRouter::forward(UPnPService* srv,const net::Port & port)
{
// add all the arguments for the command
- QValueList<SOAP::Arg> args;
+ TQValueList<SOAP::Arg> args;
SOAP::Arg a;
a.element = "NewRemoteHost";
args.append(a);
// the external port
a.element = "NewExternalPort";
- a.value = QString::number(port.number);
+ a.value = TQString::number(port.number);
args.append(a);
// the protocol
@@ -213,7 +213,7 @@ namespace kt
// the local port
a.element = "NewInternalPort";
- a.value = QString::number(port.number);
+ a.value = TQString::number(port.number);
args.append(a);
// the local IP address
@@ -227,19 +227,19 @@ namespace kt
a.element = "NewPortMappingDescription";
static Uint32 cnt = 0;
- a.value = QString("KTorrent UPNP %1").arg(cnt++); // TODO: change this
+ a.value = TQString("KTorrent UPNP %1").tqarg(cnt++); // TODO: change this
args.append(a);
a.element = "NewLeaseDuration";
a.value = "0";
args.append(a);
- QString action = "AddPortMapping";
- QString comm = SOAP::createCommand(action,srv->servicetype,args);
+ TQString action = "AddPortMapping";
+ TQString comm = SOAP::createCommand(action,srv->servicetype,args);
Forwarding fw = {port,0,srv};
// erase old forwarding if one exists
- QValueList<Forwarding>::iterator itr = fwds.begin();
+ TQValueList<Forwarding>::iterator itr = fwds.begin();
while (itr != fwds.end())
{
Forwarding & fwo = *itr;
@@ -257,7 +257,7 @@ namespace kt
{
Out(SYS_PNP|LOG_NOTICE) << "Forwarding port " << port.number << " (" << (port.proto == UDP ? "UDP" : "TCP") << ")" << endl;
// first find the right service
- QValueList<UPnPService>::iterator i = services.begin();
+ TQValueList<UPnPService>::iterator i = services.begin();
while (i != services.end())
{
UPnPService & s = *i;
@@ -274,14 +274,14 @@ namespace kt
void UPnPRouter::undoForward(UPnPService* srv,const net::Port & port,bt::WaitJob* waitjob)
{
// add all the arguments for the command
- QValueList<SOAP::Arg> args;
+ TQValueList<SOAP::Arg> args;
SOAP::Arg a;
a.element = "NewRemoteHost";
args.append(a);
// the external port
a.element = "NewExternalPort";
- a.value = QString::number(port.number);
+ a.value = TQString::number(port.number);
args.append(a);
// the protocol
@@ -290,8 +290,8 @@ namespace kt
args.append(a);
- QString action = "DeletePortMapping";
- QString comm = SOAP::createCommand(action,srv->servicetype,args);
+ TQString action = "DeletePortMapping";
+ TQString comm = SOAP::createCommand(action,srv->servicetype,args);
bt::HTTPRequest* r = sendSoapQuery(comm,srv->servicetype + "#" + action,srv->controlurl,waitjob != 0);
if (waitjob)
@@ -306,7 +306,7 @@ namespace kt
Out(SYS_PNP|LOG_NOTICE) << "Undoing forward of port " << port.number
<< " (" << (port.proto == UDP ? "UDP" : "TCP") << ")" << endl;
- QValueList<Forwarding>::iterator itr = fwds.begin();
+ TQValueList<Forwarding>::iterator itr = fwds.begin();
while (itr != fwds.end())
{
Forwarding & wd = *itr;
@@ -322,29 +322,29 @@ namespace kt
}
}
- bt::HTTPRequest* UPnPRouter::sendSoapQuery(const QString & query,const QString & soapact,const QString & controlurl,bool at_exit)
+ bt::HTTPRequest* UPnPRouter::sendSoapQuery(const TQString & query,const TQString & soapact,const TQString & controlurl,bool at_exit)
{
// if port is not set, 0 will be returned
// thanks to Diego R. Brogna for spotting this bug
if (location.port()==0)
location.setPort(80);
- QString http_hdr = QString(
+ TQString http_hdr = TQString(
"POST %1 HTTP/1.1\r\n"
"HOST: %2:%3\r\n"
"Content-length: $CONTENT_LENGTH\r\n"
"Content-Type: text/xml\r\n"
"SOAPAction: \"%4\"\r\n"
- "\r\n").arg(controlurl).arg(location.host()).arg(location.port()).arg(soapact);
+ "\r\n").tqarg(controlurl).tqarg(location.host()).tqarg(location.port()).tqarg(soapact);
HTTPRequest* r = new HTTPRequest(http_hdr,query,location.host(),location.port(),verbose);
- connect(r,SIGNAL(replyError(bt::HTTPRequest* ,const QString& )),
- this,SLOT(onReplyError(bt::HTTPRequest* ,const QString& )));
- connect(r,SIGNAL(replyOK(bt::HTTPRequest* ,const QString& )),
- this,SLOT(onReplyOK(bt::HTTPRequest* ,const QString& )));
- connect(r,SIGNAL(error(bt::HTTPRequest*, bool )),
- this,SLOT(onError(bt::HTTPRequest*, bool )));
+ connect(r,TQT_SIGNAL(replyError(bt::HTTPRequest* ,const TQString& )),
+ this,TQT_SLOT(onReplyError(bt::HTTPRequest* ,const TQString& )));
+ connect(r,TQT_SIGNAL(replyOK(bt::HTTPRequest* ,const TQString& )),
+ this,TQT_SLOT(onReplyOK(bt::HTTPRequest* ,const TQString& )));
+ connect(r,TQT_SIGNAL(error(bt::HTTPRequest*, bool )),
+ this,TQT_SLOT(onError(bt::HTTPRequest*, bool )));
r->start();
if (!at_exit)
active_reqs.append(r);
@@ -353,7 +353,7 @@ namespace kt
void UPnPRouter::httpRequestDone(bt::HTTPRequest* r,bool erase_fwd)
{
- QValueList<Forwarding>::iterator i = fwds.begin();
+ TQValueList<Forwarding>::iterator i = fwds.begin();
while (i != fwds.end())
{
Forwarding & fw = *i;
@@ -372,7 +372,7 @@ namespace kt
r->deleteLater();
}
- void UPnPRouter::onReplyOK(bt::HTTPRequest* r,const QString &)
+ void UPnPRouter::onReplyOK(bt::HTTPRequest* r,const TQString &)
{
if (verbose)
Out(SYS_PNP|LOG_NOTICE) << "UPnPRouter : OK" << endl;
@@ -380,7 +380,7 @@ namespace kt
httpRequestDone(r,false);
}
- void UPnPRouter::onReplyError(bt::HTTPRequest* r,const QString &)
+ void UPnPRouter::onReplyError(bt::HTTPRequest* r,const TQString &)
{
if (verbose)
Out(SYS_PNP|LOG_IMPORTANT) << "UPnPRouter : Error" << endl;
@@ -395,9 +395,9 @@ namespace kt
}
#if 0
- QValueList<UPnPService>::iterator UPnPRouter::findPortForwardingService()
+ TQValueList<UPnPService>::iterator UPnPRouter::findPortForwardingService()
{
- QValueList<UPnPService>::iterator i = services.begin();
+ TQValueList<UPnPService>::iterator i = services.begin();
while (i != services.end())
{
UPnPService & s = *i;
@@ -413,32 +413,32 @@ namespace kt
void UPnPRouter::getExternalIP()
{
// first find the right service
- QValueList<UPnPService>::iterator i = findPortForwardingService();
+ TQValueList<UPnPService>::iterator i = findPortForwardingService();
if (i == services.end())
throw Error(i18n("Cannot find port forwarding service in the device's description!"));
UPnPService & s = *i;
- QString action = "GetExternalIPAddress";
- QString comm = SOAP::createCommand(action,s.servicetype);
+ TQString action = "GetExternalIPAddress";
+ TQString comm = SOAP::createCommand(action,s.servicetype);
sendSoapQuery(comm,s.servicetype + "#" + action,s.controlurl);
}
void UPnPRouter::isPortForwarded(const net::Port & port)
{
// first find the right service
- QValueList<UPnPService>::iterator i = findPortForwardingService();
+ TQValueList<UPnPService>::iterator i = findPortForwardingService();
if (i == services.end())
throw Error(i18n("Cannot find port forwarding service in the device's description!"));
// add all the arguments for the command
- QValueList<SOAP::Arg> args;
+ TQValueList<SOAP::Arg> args;
SOAP::Arg a;
a.element = "NewRemoteHost";
args.append(a);
// the external port
a.element = "NewExternalPort";
- a.value = QString::number(port.number);
+ a.value = TQString::number(port.number);
args.append(a);
// the protocol
@@ -447,8 +447,8 @@ namespace kt
args.append(a);
UPnPService & s = *i;
- QString action = "GetSpecificPortMappingEntry";
- QString comm = SOAP::createCommand(action,s.servicetype,args);
+ TQString action = "GetSpecificPortMappingEntry";
+ TQString comm = SOAP::createCommand(action,s.servicetype,args);
sendSoapQuery(comm,s.servicetype + "#" + action,s.controlurl);
}
#endif
diff --git a/plugins/upnp/upnprouter.h b/plugins/upnp/upnprouter.h
index a4d32b4..88b8054 100644
--- a/plugins/upnp/upnprouter.h
+++ b/plugins/upnp/upnprouter.h
@@ -21,7 +21,7 @@
#define KTUPNPROUTER_H
#include <kurl.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kstreamsocket.h>
#include <net/portlist.h>
@@ -45,11 +45,11 @@ namespace kt
*/
struct UPnPService
{
- QString serviceid;
- QString servicetype;
- QString controlurl;
- QString eventsuburl;
- QString scpdurl;
+ TQString serviceid;
+ TQString servicetype;
+ TQString controlurl;
+ TQString eventsuburl;
+ TQString scpdurl;
UPnPService();
UPnPService(const UPnPService & s);
@@ -59,7 +59,7 @@ namespace kt
* @param name Name of the property (matches to variable names)
* @param value Value of the property
*/
- void setProperty(const QString & name,const QString & value);
+ void setProperty(const TQString & name,const TQString & value);
/**
* Set all strings to empty.
@@ -82,18 +82,18 @@ namespace kt
*/
struct UPnPDeviceDescription
{
- QString friendlyName;
- QString manufacturer;
- QString modelDescription;
- QString modelName;
- QString modelNumber;
+ TQString friendlyName;
+ TQString manufacturer;
+ TQString modelDescription;
+ TQString modelName;
+ TQString modelNumber;
/**
* Set a property of the description
* @param name Name of the property (matches to variable names)
* @param value Value of the property
*/
- void setProperty(const QString & name,const QString & value);
+ void setProperty(const TQString & name,const TQString & value);
};
/**
@@ -102,9 +102,10 @@ namespace kt
* Class representing a UPnP enabled router. This class is also used to communicate
* with the router.
*/
- class UPnPRouter : public QObject
+ class UPnPRouter : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
struct Forwarding
@@ -114,13 +115,13 @@ namespace kt
UPnPService* service;
};
private:
- QString server;
- QString tmp_file;
+ TQString server;
+ TQString tmp_file;
KURL location;
UPnPDeviceDescription desc;
- QValueList<UPnPService> services;
- QValueList<Forwarding> fwds;
- QValueList<bt::HTTPRequest*> active_reqs;
+ TQValueList<UPnPService> services;
+ TQValueList<Forwarding> fwds;
+ TQValueList<bt::HTTPRequest*> active_reqs;
public:
/**
* Construct a router.
@@ -128,11 +129,11 @@ namespace kt
* @param location The location of it's xml description file
* @param verbose Print lots of debug info
*/
- UPnPRouter(const QString & server,const KURL & location,bool verbose = false);
+ UPnPRouter(const TQString & server,const KURL & location,bool verbose = false);
virtual ~UPnPRouter();
/// Get the name of the server
- QString getServer() const {return server;}
+ TQString getServer() const {return server;}
/// Get the location of it's xml description
KURL getLocation() const {return location;}
@@ -183,12 +184,12 @@ namespace kt
void debugPrintData();
- QValueList<Forwarding>::iterator beginPortMappings() {return fwds.begin();}
- QValueList<Forwarding>::iterator endPortMappings() {return fwds.end();}
+ TQValueList<Forwarding>::iterator beginPortMappings() {return fwds.begin();}
+ TQValueList<Forwarding>::iterator endPortMappings() {return fwds.end();}
private slots:
- void onReplyOK(bt::HTTPRequest* r,const QString &);
- void onReplyError(bt::HTTPRequest* r,const QString &);
+ void onReplyOK(bt::HTTPRequest* r,const TQString &);
+ void onReplyError(bt::HTTPRequest* r,const TQString &);
void onError(bt::HTTPRequest* r,bool);
void downloadFinished(KIO::Job* j);
@@ -208,9 +209,9 @@ namespace kt
void xmlFileDownloaded(UPnPRouter* r,bool success);
private:
- QValueList<UPnPService>::iterator findPortForwardingService();
+ TQValueList<UPnPService>::iterator findPortForwardingService();
- bt::HTTPRequest* sendSoapQuery(const QString & query,const QString & soapact,const QString & controlurl,bool at_exit = false);
+ bt::HTTPRequest* sendSoapQuery(const TQString & query,const TQString & soapact,const TQString & controlurl,bool at_exit = false);
bool verbose;
void forward(UPnPService* srv,const net::Port & port);
diff --git a/plugins/upnp/upnpwidget.ui b/plugins/upnp/upnpwidget.ui
index a8f0f7a..ffd8900 100644
--- a/plugins/upnp/upnpwidget.ui
+++ b/plugins/upnp/upnpwidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>UPnPWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>UPnPWidget</cstring>
</property>
@@ -19,15 +19,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout1</cstring>
+ <cstring>tqlayout1</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -75,9 +75,9 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<hbox>
<property name="name">
@@ -109,14 +109,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>70</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>m_rescan</cstring>
</property>
@@ -130,7 +130,7 @@
</widget>
<customwidgets>
</customwidgets>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
<includehint>kpushbutton.h</includehint>
diff --git a/plugins/webinterface/httpclienthandler.cpp b/plugins/webinterface/httpclienthandler.cpp
index d925466..1ad2d8d 100644
--- a/plugins/webinterface/httpclienthandler.cpp
+++ b/plugins/webinterface/httpclienthandler.cpp
@@ -17,8 +17,8 @@
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qsocket.h>
-#include <qhttp.h>
+#include <tqsocket.h>
+#include <tqhttp.h>
#include <util/log.h>
#include <util/mmapfile.h>
#include "httpserver.h"
@@ -31,7 +31,7 @@ using namespace bt;
namespace kt
{
- HttpClientHandler::HttpClientHandler(HttpServer* srv,QSocket* sock) : srv(srv),client(sock),php_response_hdr(200)
+ HttpClientHandler::HttpClientHandler(HttpServer* srv,TQSocket* sock) : srv(srv),client(sock),php_response_hdr(200)
{
state = WAITING_FOR_REQUEST;
bytes_read = 0;
@@ -51,7 +51,7 @@ namespace kt
{
while (client->canReadLine())
{
- QString line = client->readLine();
+ TQString line = client->readLine();
header_data += line;
if (header_data.endsWith("\r\n\r\n"))
{
@@ -87,7 +87,7 @@ namespace kt
void HttpClientHandler::handleRequest()
{
- header = QHttpRequestHeader(header_data);
+ header = TQHttpRequestHeader(header_data);
// Out(SYS_WEB|LOG_DEBUG) << "Parsing request : " << header.toString() << endl;
if (header.method() == "POST")
{
@@ -112,7 +112,7 @@ namespace kt
}
}
- bool HttpClientHandler::sendFile(HttpResponseHeader & hdr,const QString & full_path)
+ bool HttpClientHandler::sendFile(HttpResponseHeader & hdr,const TQString & full_path)
{
// Out(SYS_WEB|LOG_DEBUG) << "Sending file " << full_path << endl;
// first look in cache
@@ -131,12 +131,12 @@ namespace kt
srv->insertIntoCache(full_path,c);
}
- hdr.setValue("Content-Length",QString::number(c->getSize()));
+ hdr.setValue("Content-Length",TQString::number(c->getSize()));
// Out(SYS_WEB|LOG_DEBUG) << "HTTP header : " << endl;
// Out(SYS_WEB|LOG_DEBUG) << hdr.toString() << endl;
- QCString d = hdr.toString().utf8();
+ TQCString d = hdr.toString().utf8();
client->writeBlock(d.data(),d.length());
Uint32 written = 0;
@@ -156,14 +156,14 @@ namespace kt
#define HTTP_500_ERROR "<html><head><title>HTTP/1.1 500 Internal Server Error</title></head><body>HTTP/1.1 Internal Server Error<br>%1</body></html>"
- void HttpClientHandler::send404(HttpResponseHeader & hdr,const QString & path)
+ void HttpClientHandler::send404(HttpResponseHeader & hdr,const TQString & path)
{
// Out(SYS_WEB|LOG_DEBUG) << "Sending 404 " << path << endl;
- QString data = HTTP_404_ERROR;
- hdr.setValue("Content-Length",QString::number(data.length()));
+ TQString data = HTTP_404_ERROR;
+ hdr.setValue("Content-Length",TQString::number(data.length()));
- QTextStream os(client);
- os.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream os(client);
+ os.setEncoding( TQTextStream::UnicodeUTF8 );
os << hdr.toString();
os << data;
}
@@ -171,11 +171,11 @@ namespace kt
void HttpClientHandler::send500(HttpResponseHeader & hdr)
{
// Out(SYS_WEB|LOG_DEBUG) << "Sending 500 " << endl;
- QString data = QString(HTTP_500_ERROR).arg("An internal server error occured !");
- hdr.setValue("Content-Length",QString::number(data.length()));
+ TQString data = TQString(HTTP_500_ERROR).tqarg("An internal server error occured !");
+ hdr.setValue("Content-Length",TQString::number(data.length()));
- QTextStream os(client);
- os.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream os(client);
+ os.setEncoding( TQTextStream::UnicodeUTF8 );
os << hdr.toString();
os << data;
}
@@ -183,28 +183,28 @@ namespace kt
void HttpClientHandler::sendResponse(const HttpResponseHeader & hdr)
{
// Out(SYS_WEB|LOG_DEBUG) << "Sending response " << hdr.toString() << endl;
- QTextStream os(client);
- os.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream os(client);
+ os.setEncoding( TQTextStream::UnicodeUTF8 );
os << hdr.toString();
}
void HttpClientHandler::executePHPScript(
PhpInterface* php_iface,
HttpResponseHeader & hdr,
- const QString & php_exe,
- const QString & php_file,
- const QMap<QString,QString> & args)
+ const TQString & php_exe,
+ const TQString & php_file,
+ const TQMap<TQString,TQString> & args)
{
// Out(SYS_WEB|LOG_DEBUG) << "Launching PHP script " << php_file << endl;
php = new PhpHandler(php_exe,php_iface);
if (!php->executeScript(php_file,args))
{
- QString data = QString(HTTP_500_ERROR).arg("Failed to launch PHP executable !");
+ TQString data = TQString(HTTP_500_ERROR).tqarg("Failed to launch PHP executable !");
hdr.setResponseCode(500);
- hdr.setValue("Content-Length",QString::number(data.utf8().length()));
+ hdr.setValue("Content-Length",TQString::number(data.utf8().length()));
- QTextStream os(client);
- os.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream os(client);
+ os.setEncoding( TQTextStream::UnicodeUTF8 );
os << hdr.toString();
os << data;
state = WAITING_FOR_REQUEST;
@@ -212,18 +212,18 @@ namespace kt
else
{
php_response_hdr = hdr;
- connect(php,SIGNAL(finished()),this,SLOT(onPHPFinished()));
+ connect(php,TQT_SIGNAL(finished()),this,TQT_SLOT(onPHPFinished()));
state = PROCESSING_PHP;
}
}
void HttpClientHandler::onPHPFinished()
{
- const QByteArray & output = php->getOutput();
- php_response_hdr.setValue("Content-Length",QString::number(output.size()));
+ const TQByteArray & output = php->getOutput();
+ php_response_hdr.setValue("Content-Length",TQString::number(output.size()));
- QTextStream os(client);
- os.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream os(client);
+ os.setEncoding( TQTextStream::UnicodeUTF8 );
os << php_response_hdr.toString();
os.writeRawBytes(output.data(),output.size());
diff --git a/plugins/webinterface/httpclienthandler.h b/plugins/webinterface/httpclienthandler.h
index cacf463..c76be5c 100644
--- a/plugins/webinterface/httpclienthandler.h
+++ b/plugins/webinterface/httpclienthandler.h
@@ -21,12 +21,12 @@
#define KTHTTPCLIENTHANDLER_H
-#include <qhttp.h>
-#include <qobject.h>
+#include <tqhttp.h>
+#include <tqobject.h>
#include <util/constants.h>
#include "httpresponseheader.h"
-class QSocket;
+class TQSocket;
namespace kt
@@ -38,9 +38,10 @@ namespace kt
/**
@author Joris Guisson <joris.guisson@gmail.com>
*/
- class HttpClientHandler : public QObject
+ class HttpClientHandler : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
enum State
{
WAITING_FOR_REQUEST,
@@ -48,20 +49,20 @@ namespace kt
PROCESSING_PHP
};
public:
- HttpClientHandler(HttpServer* srv,QSocket* sock);
+ HttpClientHandler(HttpServer* srv,TQSocket* sock);
virtual ~HttpClientHandler();
void readyToRead();
- bool sendFile(HttpResponseHeader & hdr,const QString & full_path);
+ bool sendFile(HttpResponseHeader & hdr,const TQString & full_path);
void sendResponse(const HttpResponseHeader & hdr);
- void send404(HttpResponseHeader & hdr,const QString & path);
+ void send404(HttpResponseHeader & hdr,const TQString & path);
void send500(HttpResponseHeader & hdr);
void executePHPScript(PhpInterface* php_iface,
HttpResponseHeader & hdr,
- const QString & php_exe,
- const QString & php_file,
- const QMap<QString,QString> & args);
+ const TQString & php_exe,
+ const TQString & php_file,
+ const TQMap<TQString,TQString> & args);
private:
void handleRequest();
@@ -71,11 +72,11 @@ namespace kt
private:
HttpServer* srv;
- QSocket* client;
+ TQSocket* client;
State state;
- QHttpRequestHeader header;
- QString header_data;
- QByteArray request_data;
+ TQHttpRequestHeader header;
+ TQString header_data;
+ TQByteArray request_data;
bt::Uint32 bytes_read;
PhpHandler* php;
HttpResponseHeader php_response_hdr;
diff --git a/plugins/webinterface/httpresponseheader.cpp b/plugins/webinterface/httpresponseheader.cpp
index da7556f..7b87892 100644
--- a/plugins/webinterface/httpresponseheader.cpp
+++ b/plugins/webinterface/httpresponseheader.cpp
@@ -21,7 +21,7 @@
namespace kt
{
- static QString ResponseCodeToString(int r)
+ static TQString ResponseCodeToString(int r)
{
switch (r)
{
@@ -30,7 +30,7 @@ namespace kt
case 304: return "Not Modified";
case 404: return "Not Found";
}
- return QString::null;
+ return TQString();
}
HttpResponseHeader::HttpResponseHeader(int response_code)
@@ -53,20 +53,20 @@ namespace kt
response_code = rc;
}
- void HttpResponseHeader::setValue(const QString & key,const QString & value)
+ void HttpResponseHeader::setValue(const TQString & key,const TQString & value)
{
fields[key] = value;
}
- QString HttpResponseHeader::toString() const
+ TQString HttpResponseHeader::toString() const
{
- QString str;
- str += QString("HTTP/1.1 %1 %2\r\n").arg(response_code).arg(ResponseCodeToString(response_code));
+ TQString str;
+ str += TQString("HTTP/1.1 %1 %2\r\n").tqarg(response_code).tqarg(ResponseCodeToString(response_code));
- QMap<QString,QString>::const_iterator itr = fields.begin();
+ TQMap<TQString,TQString>::const_iterator itr = fields.begin();
while (itr != fields.end())
{
- str += QString("%1: %2\r\n").arg(itr.key()).arg(itr.data());
+ str += TQString("%1: %2\r\n").tqarg(itr.key()).tqarg(itr.data());
itr++;
}
str += "\r\n";
diff --git a/plugins/webinterface/httpresponseheader.h b/plugins/webinterface/httpresponseheader.h
index 9672191..417fe6b 100644
--- a/plugins/webinterface/httpresponseheader.h
+++ b/plugins/webinterface/httpresponseheader.h
@@ -21,8 +21,8 @@
#define KTHTTPRESPONSEHEADER_H
-#include <qmap.h>
-#include <qstring.h>
+#include <tqmap.h>
+#include <tqstring.h>
namespace kt
{
@@ -33,16 +33,16 @@ namespace kt
class HttpResponseHeader
{
int response_code;
- QMap<QString,QString> fields;
+ TQMap<TQString,TQString> fields;
public:
HttpResponseHeader(int response_code);
HttpResponseHeader(const HttpResponseHeader & hdr);
virtual ~HttpResponseHeader();
void setResponseCode(int response_code);
- void setValue(const QString & key,const QString & value);
+ void setValue(const TQString & key,const TQString & value);
- QString toString() const;
+ TQString toString() const;
};
diff --git a/plugins/webinterface/httpserver.cpp b/plugins/webinterface/httpserver.cpp
index e2c0eeb..06d8d34 100644
--- a/plugins/webinterface/httpserver.cpp
+++ b/plugins/webinterface/httpserver.cpp
@@ -17,9 +17,9 @@
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qtimer.h>
-#include <qcstring.h>
-#include <qdatetime.h>
+#include <tqtimer.h>
+#include <tqcstring.h>
+#include <tqdatetime.h>
#include <kapplication.h>
#include <kgenericfactory.h>
#include <kglobal.h>
@@ -27,9 +27,9 @@
#include <kmdcodec.h>
#include <ktempfile.h>
-#include <qfileinfo.h>
-#include <qsocket.h>
-#include <qstringlist.h>
+#include <tqfileinfo.h>
+#include <tqsocket.h>
+#include <tqstringlist.h>
#include <interfaces/coreinterface.h>
#include <interfaces/torrentinterface.h>
@@ -53,12 +53,12 @@ namespace kt
- HttpServer::HttpServer(CoreInterface *core, int port) : QServerSocket(port, 5),core(core),cache(10,23)
+ HttpServer::HttpServer(CoreInterface *core, int port) : TQServerSocket(port, 5),core(core),cache(10,23)
{
php_i = new PhpInterface(core);
clients.setAutoDelete(true);
- QStringList dirList = KGlobal::instance()->dirs()->findDirs("data", "ktorrent/www");
+ TQStringList dirList = KGlobal::instance()->dirs()->findDirs("data", "ktorrent/www");
rootDir = *(dirList.begin());
Out(SYS_WEB|LOG_DEBUG) << "WWW Root Directory "<< rootDir <<endl;
session.logged_in = false;
@@ -72,23 +72,23 @@ namespace kt
void HttpServer::newConnection(int s)
{
- QSocket* socket = new QSocket(this);
+ TQSocket* socket = new TQSocket(this);
socket->setSocket(s);
- connect(socket, SIGNAL(readyRead()), this, SLOT(slotSocketReadyToRead()));
- connect(socket, SIGNAL(delayedCloseFinished()), this, SLOT(slotConnectionClosed()));
- connect(socket, SIGNAL(connectionClosed()), this, SLOT(slotConnectionClosed()));
+ connect(socket, TQT_SIGNAL(readyRead()), this, TQT_SLOT(slotSocketReadyToRead()));
+ connect(socket, TQT_SIGNAL(delayedCloseFinished()), this, TQT_SLOT(slotConnectionClosed()));
+ connect(socket, TQT_SIGNAL(connectionClosed()), this, TQT_SLOT(slotConnectionClosed()));
HttpClientHandler* handler = new HttpClientHandler(this,socket);
clients.insert(socket,handler);
- Out(SYS_WEB|LOG_NOTICE) << "connection from "<< socket->peerAddress().toString() << endl;
+ Out(SYS_WEB|LOG_NOTICE) << "connection from "<< TQString(socket->peerAddress().toString()) << endl;
}
void HttpServer::slotSocketReadyToRead()
{
- QSocket* client = (QSocket*)sender();
- HttpClientHandler* handler = clients.find(client);
+ TQSocket* client = (TQSocket*)sender();
+ HttpClientHandler* handler = clients.tqfind(client);
if (!handler)
{
client->deleteLater();
@@ -98,10 +98,10 @@ namespace kt
handler->readyToRead();
}
- static int DecodeEscapedChar(QString & password,int idx)
+ static int DecodeEscapedChar(TQString & password,int idx)
{
- QChar a = password[idx + 1].lower();
- QChar b = password[idx + 2].lower();
+ TQChar a = password[idx + 1].lower();
+ TQChar b = password[idx + 2].lower();
if (!a.isNumber() && !(a.latin1() >= 'a' && a.latin1() <= 'f'))
return idx + 2; // not a valid hex digit
@@ -112,21 +112,21 @@ namespace kt
Uint8 h = (a.latin1() - (a.isNumber() ? '0' : 'a')) << 4;
Uint8 l = (b.latin1() - (b.isNumber() ? '0' : 'a'));
char r = (char) h | l; // combine them and cast to a char
- password.replace(idx,3,r);
+ password.tqreplace(idx,3,r);
return idx + 1;
}
- bool HttpServer::checkLogin(const QHttpRequestHeader & hdr,const QByteArray & data)
+ bool HttpServer::checkLogin(const TQHttpRequestHeader & hdr,const TQByteArray & data)
{
if (hdr.contentType() != "application/x-www-form-urlencoded")
return false;
- QString username;
- QString password;
- QStringList params = QStringList::split("&",QString(data));
- for (QStringList::iterator i = params.begin();i != params.end();i++)
+ TQString username;
+ TQString password;
+ TQStringList params = TQStringList::split("&",TQString(data));
+ for (TQStringList::iterator i = params.begin();i != params.end();i++)
{
- QString t = *i;
+ TQString t = *i;
if (t.section("=",0,0) == "username")
username = t.section("=",1,1);
else if (t.section("=",0,0) == "password")
@@ -134,7 +134,7 @@ namespace kt
// check for passwords with url encoded stuff in them and decode them if necessary
int idx = 0;
- while ((idx = password.find('%',idx)) > 0)
+ while ((idx = password.tqfind('%',idx)) > 0)
{
if (idx + 2 < password.length())
{
@@ -154,7 +154,7 @@ namespace kt
{
session.logged_in = true;
session.sessionId=rand();
- session.last_access=QTime::currentTime();
+ session.last_access=TQTime::currentTime();
Out(SYS_WEB|LOG_NOTICE) << "Webgui login succesfull !" << endl;
return true;
}
@@ -163,19 +163,19 @@ namespace kt
return false;
}
- bool HttpServer::checkSession(const QHttpRequestHeader & hdr)
+ bool HttpServer::checkSession(const TQHttpRequestHeader & hdr)
{
// check session in cookie
int session_id = 0;
if (hdr.hasKey("Cookie"))
{
- QString cookie = hdr.value("Cookie");
- int idx = cookie.find("KT_SESSID=");
+ TQString cookie = hdr.value("Cookie");
+ int idx = cookie.tqfind("KT_SESSID=");
if (idx == -1)
return false;
- QString number;
- idx += QString("KT_SESSID=").length();
+ TQString number;
+ idx += TQString("KT_SESSID=").length();
while (idx < cookie.length())
{
if (cookie[idx] >= '0' && cookie[idx] <= '9')
@@ -193,9 +193,9 @@ namespace kt
if (session_id == session.sessionId)
{
// check if the session hasn't expired yet
- if(session.last_access.secsTo(QTime::currentTime())<WebInterfacePluginSettings::sessionTTL())
+ if(session.last_access.secsTo(TQTime::currentTime())<WebInterfacePluginSettings::sessionTTL())
{
- session.last_access=QTime::currentTime();
+ session.last_access=TQTime::currentTime();
}
else
{
@@ -208,7 +208,7 @@ namespace kt
return true;
}
- static QString ExtensionToContentType(const QString & ext)
+ static TQString ExtensionToContentType(const TQString & ext)
{
if (ext == "html")
return "text/html";
@@ -219,41 +219,41 @@ namespace kt
else if (ext == "gif" || ext == "png" || ext == "ico")
return "image/" + ext;
else
- return QString::null;
+ return TQString();
}
// HTTP needs non translated dates
- static QString days[] = {
+ static TQString days[] = {
"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"
};
- static QString months[] = {
+ static TQString months[] = {
"Jan","Feb","Mar","Apr",
"May","Jun","Jul","Aug",
"Sep","Oct","Nov","Dec"
};
- static QString DateTimeToString(const QDateTime & now,bool cookie)
+ static TQString DateTimeToString(const TQDateTime & now,bool cookie)
{
if (!cookie)
return now.toString("%1, dd %2 yyyy hh:mm:ss UTC")
- .arg(days[now.date().dayOfWeek() - 1])
- .arg(months[now.date().month() - 1]);
+ .tqarg(days[now.date().dayOfWeek() - 1])
+ .tqarg(months[now.date().month() - 1]);
else
return now.toString("%1, dd-%2-yyyy hh:mm:ss GMT")
- .arg(days[now.date().dayOfWeek() - 1])
- .arg(months[now.date().month() - 1]);
+ .tqarg(days[now.date().dayOfWeek() - 1])
+ .tqarg(months[now.date().month() - 1]);
}
- void HttpServer::setDefaultResponseHeaders(HttpResponseHeader & hdr,const QString & content_type,bool with_session_info)
+ void HttpServer::setDefaultResponseHeaders(HttpResponseHeader & hdr,const TQString & content_type,bool with_session_info)
{
hdr.setValue("Server","KTorrent/" KT_VERSION_MACRO);
- hdr.setValue("Date",DateTimeToString(QDateTime::currentDateTime(Qt::UTC),false));
+ hdr.setValue("Date",DateTimeToString(TQDateTime::tqcurrentDateTime(Qt::UTC),false));
hdr.setValue("Content-Type",content_type);
hdr.setValue("Connection","keep-alive");
if (with_session_info && session.sessionId && session.logged_in)
{
- hdr.setValue("Set-Cookie",QString("KT_SESSID=%1").arg(session.sessionId));
+ hdr.setValue("Set-Cookie",TQString("KT_SESSID=%1").tqarg(session.sessionId));
}
}
@@ -262,7 +262,7 @@ namespace kt
HttpResponseHeader rhdr(301);
setDefaultResponseHeaders(rhdr,"text/html",false);
rhdr.setValue("Location","/login.html");
- QString path = rootDir + bt::DirSeparator() + WebInterfacePluginSettings::skin() + "/login.html";
+ TQString path = rootDir + bt::DirSeparator() + WebInterfacePluginSettings::skin() + "/login.html";
if (!hdlr->sendFile(rhdr,path))
{
HttpResponseHeader nhdr(404);
@@ -272,9 +272,9 @@ namespace kt
Out(SYS_WEB|LOG_NOTICE) << "Redirecting to /login.html" << endl;
}
- void HttpServer::handleGet(HttpClientHandler* hdlr,const QHttpRequestHeader & hdr,bool do_not_check_session)
+ void HttpServer::handleGet(HttpClientHandler* hdlr,const TQHttpRequestHeader & hdr,bool do_not_check_session)
{
- QString file = hdr.path();
+ TQString file = hdr.path();
if (file == "/")
file = "/login.html";
@@ -283,7 +283,7 @@ namespace kt
KURL url;
url.setEncodedPathAndQuery(file);
- QString path = rootDir + bt::DirSeparator() + WebInterfacePluginSettings::skin() + url.path();
+ TQString path = rootDir + bt::DirSeparator() + WebInterfacePluginSettings::skin() + url.path();
// first check if the file exists (if not send 404)
if (!bt::Exists(path))
{
@@ -293,8 +293,8 @@ namespace kt
return;
}
- QFileInfo fi(path);
- QString ext = fi.extension();
+ TQFileInfo fi(path);
+ TQString ext = fi.extension();
// if it is the login page send that
if (file == "/login.html" || file == "/")
@@ -328,8 +328,8 @@ namespace kt
if (path.endsWith("login.html"))
{
// clear cookie in case of login page
- QDateTime dt = QDateTime::currentDateTime().addDays(-1);
- QString cookie = QString("KT_SESSID=666; expires=%1 +0000").arg(DateTimeToString(dt,true));
+ TQDateTime dt = TQDateTime::tqcurrentDateTime().addDays(-1);
+ TQString cookie = TQString("KT_SESSID=666; expires=%1 +0000").tqarg(DateTimeToString(dt,true));
rhdr.setValue("Set-Cookie",cookie);
}
@@ -344,14 +344,14 @@ namespace kt
{
if (hdr.hasKey("If-Modified-Since"))
{
- QDateTime dt = parseDate(hdr.value("If-Modified-Since"));
+ TQDateTime dt = parseDate(hdr.value("If-Modified-Since"));
if (dt.isValid() && dt < fi.lastModified())
{
HttpResponseHeader rhdr(304);
setDefaultResponseHeaders(rhdr,"text/html",true);
rhdr.setValue("Cache-Control","max-age=0");
rhdr.setValue("Last-Modified",DateTimeToString(fi.lastModified(),false));
- rhdr.setValue("Expires",DateTimeToString(QDateTime::currentDateTime(Qt::UTC).addSecs(3600),false));
+ rhdr.setValue("Expires",DateTimeToString(TQDateTime::tqcurrentDateTime(Qt::UTC).addSecs(3600),false));
hdlr->sendResponse(rhdr);
return;
}
@@ -361,7 +361,7 @@ namespace kt
HttpResponseHeader rhdr(200);
setDefaultResponseHeaders(rhdr,ExtensionToContentType(ext),true);
rhdr.setValue("Last-Modified",DateTimeToString(fi.lastModified(),false));
- rhdr.setValue("Expires",DateTimeToString(QDateTime::currentDateTime(Qt::UTC).addSecs(3600),false));
+ rhdr.setValue("Expires",DateTimeToString(TQDateTime::tqcurrentDateTime(Qt::UTC).addSecs(3600),false));
rhdr.setValue("Cache-Control","private");
if (!hdlr->sendFile(rhdr,path))
{
@@ -381,7 +381,7 @@ namespace kt
{
// first send back login page
redirectToLoginPage(hdlr);
- QTimer::singleShot(1000,kapp,SLOT(quit()));
+ TQTimer::singleShot(1000,kapp,TQT_SLOT(quit()));
}
else if (redirect)
{
@@ -409,7 +409,7 @@ namespace kt
}
}
- void HttpServer::handlePost(HttpClientHandler* hdlr,const QHttpRequestHeader & hdr,const QByteArray & data)
+ void HttpServer::handlePost(HttpClientHandler* hdlr,const TQHttpRequestHeader & hdr,const TQByteArray & data)
{
// this is either a file or a login
if (hdr.value("Content-Type").startsWith("multipart/form-data"))
@@ -418,7 +418,7 @@ namespace kt
}
else if (!checkLogin(hdr,data))
{
- QHttpRequestHeader tmp = hdr;
+ TQHttpRequestHeader tmp = hdr;
tmp.setRequest("GET","/login.html",1,1);
handleGet(hdlr,tmp);
}
@@ -428,11 +428,11 @@ namespace kt
}
}
- void HttpServer::handleTorrentPost(HttpClientHandler* hdlr,const QHttpRequestHeader & hdr,const QByteArray & data)
+ void HttpServer::handleTorrentPost(HttpClientHandler* hdlr,const TQHttpRequestHeader & hdr,const TQByteArray & data)
{
const char* ptr = data.data();
Uint32 len = data.size();
- int pos = QString(data).find("\r\n\r\n");
+ int pos = TQString(data).tqfind("\r\n\r\n");
if (pos == -1 || pos + 4 >= len || ptr[pos + 4] != 'd')
{
@@ -444,7 +444,7 @@ namespace kt
// save torrent to a temporary file
KTempFile tmp_file(locateLocal("tmp", "ktwebgui-"), ".torrent");
- QDataStream* out = tmp_file.dataStream();
+ TQDataStream* out = tmp_file.dataStream();
if (!out)
{
HttpResponseHeader rhdr(500);
@@ -472,11 +472,11 @@ namespace kt
void HttpServer::slotConnectionClosed()
{
- QSocket* socket= (QSocket*)sender();
+ TQSocket* socket= (TQSocket*)sender();
clients.erase(socket);
}
- QDateTime HttpServer::parseDate(const QString & str)
+ TQDateTime HttpServer::parseDate(const TQString & str)
{
/*
Potential date formats :
@@ -484,66 +484,66 @@ namespace kt
Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
*/
- QStringList sl = QStringList::split(" ",str);
+ TQStringList sl = TQStringList::split(" ",str);
if (sl.count() == 6)
{
// RFC 1123 format
- QDate d;
- QString month = sl[2];
+ TQDate d;
+ TQString month = sl[2];
int m = -1;
for (int i = 1;i <= 12 && m < 0;i++)
- if (QDate::shortMonthName(i) == month)
+ if (TQDate::shortMonthName(i) == month)
m = i;
d.setYMD(sl[3].toInt(),m,sl[1].toInt());
- QTime t = QTime::fromString(sl[4],Qt::ISODate);
- return QDateTime(d,t);
+ TQTime t = TQTime::fromString(sl[4],Qt::ISODate);
+ return TQDateTime(d,t);
}
else if (sl.count() == 4)
{
// RFC 1036
- QStringList dl = QStringList::split("-",sl[1]);
+ TQStringList dl = TQStringList::split("-",sl[1]);
if (dl.count() != 3)
- return QDateTime();
+ return TQDateTime();
- QDate d;
- QString month = dl[1];
+ TQDate d;
+ TQString month = dl[1];
int m = -1;
for (int i = 1;i <= 12 && m < 0;i++)
- if (QDate::shortMonthName(i) == month)
+ if (TQDate::shortMonthName(i) == month)
m = i;
d.setYMD(2000 + dl[2].toInt(),m,dl[0].toInt());
- QTime t = QTime::fromString(sl[2],Qt::ISODate);
- return QDateTime(d,t);
+ TQTime t = TQTime::fromString(sl[2],Qt::ISODate);
+ return TQDateTime(d,t);
}
else if (sl.count() == 5)
{
// ANSI C
- QDate d;
- QString month = sl[1];
+ TQDate d;
+ TQString month = sl[1];
int m = -1;
for (int i = 1;i <= 12 && m < 0;i++)
- if (QDate::shortMonthName(i) == month)
+ if (TQDate::shortMonthName(i) == month)
m = i;
d.setYMD(sl[4].toInt(),m,sl[2].toInt());
- QTime t = QTime::fromString(sl[3],Qt::ISODate);
- return QDateTime(d,t);
+ TQTime t = TQTime::fromString(sl[3],Qt::ISODate);
+ return TQDateTime(d,t);
}
else
- return QDateTime();
+ return TQDateTime();
}
- bt::MMapFile* HttpServer::cacheLookup(const QString & name)
+ bt::MMapFile* HttpServer::cacheLookup(const TQString & name)
{
- return cache.find(name);
+ return cache.tqfind(name);
}
- void HttpServer::insertIntoCache(const QString & name,bt::MMapFile* file)
+ void HttpServer::insertIntoCache(const TQString & name,bt::MMapFile* file)
{
cache.insert(name,file);
}
diff --git a/plugins/webinterface/httpserver.h b/plugins/webinterface/httpserver.h
index 28be441..dcdfdfe 100644
--- a/plugins/webinterface/httpserver.h
+++ b/plugins/webinterface/httpserver.h
@@ -20,13 +20,13 @@
#ifndef HTTPSERVER_H
#define HTTPSERVER_H
-#include <qcache.h>
-#include <qhttp.h>
-#include <qdatetime.h>
-#include <qserversocket.h>
+#include <tqcache.h>
+#include <tqhttp.h>
+#include <tqdatetime.h>
+#include <tqserversocket.h>
#include <util/ptrmap.h>
-class QSocket;
+class TQSocket;
namespace bt
{
@@ -43,7 +43,7 @@ namespace kt
struct Session
{
bool logged_in;
- QTime last_access;
+ TQTime last_access;
int sessionId;
};
@@ -62,41 +62,42 @@ namespace kt
- class HttpServer : public QServerSocket
+ class HttpServer : public TQServerSocket
{
Q_OBJECT
+ TQ_OBJECT
public:
HttpServer(CoreInterface *core, int port);
virtual ~HttpServer();
void newConnection(int s);
- void handleGet(HttpClientHandler* hdlr,const QHttpRequestHeader & hdr,bool do_not_check_session = false);
- void handlePost(HttpClientHandler* hdlr,const QHttpRequestHeader & hdr,const QByteArray & data);
+ void handleGet(HttpClientHandler* hdlr,const TQHttpRequestHeader & hdr,bool do_not_check_session = false);
+ void handlePost(HttpClientHandler* hdlr,const TQHttpRequestHeader & hdr,const TQByteArray & data);
void handleUnsupportedMethod(HttpClientHandler* hdlr);
- bt::MMapFile* cacheLookup(const QString & name);
- void insertIntoCache(const QString & name,bt::MMapFile* file);
+ bt::MMapFile* cacheLookup(const TQString & name);
+ void insertIntoCache(const TQString & name,bt::MMapFile* file);
protected slots:
void slotSocketReadyToRead();
void slotConnectionClosed();
private:
- bool checkSession(const QHttpRequestHeader & hdr);
- bool checkLogin(const QHttpRequestHeader & hdr,const QByteArray & data);
- void setDefaultResponseHeaders(HttpResponseHeader & hdr,const QString & content_type,bool with_session_info);
- void handleTorrentPost(HttpClientHandler* hdlr,const QHttpRequestHeader & hdr,const QByteArray & data);
- QDateTime parseDate(const QString & str);
+ bool checkSession(const TQHttpRequestHeader & hdr);
+ bool checkLogin(const TQHttpRequestHeader & hdr,const TQByteArray & data);
+ void setDefaultResponseHeaders(HttpResponseHeader & hdr,const TQString & content_type,bool with_session_info);
+ void handleTorrentPost(HttpClientHandler* hdlr,const TQHttpRequestHeader & hdr,const TQByteArray & data);
+ TQDateTime parseDate(const TQString & str);
void redirectToLoginPage(HttpClientHandler* hdlr);
private:
- QString rootDir;
+ TQString rootDir;
int sessionTTL;
PhpInterface *php_i;
Session session;
- bt::PtrMap<QSocket*,HttpClientHandler> clients;
+ bt::PtrMap<TQSocket*,HttpClientHandler> clients;
CoreInterface *core;
- QCache<bt::MMapFile> cache;
+ TQCache<bt::MMapFile> cache;
};
diff --git a/plugins/webinterface/php_handler.cpp b/plugins/webinterface/php_handler.cpp
index d04c3b6..852f1fd 100644
--- a/plugins/webinterface/php_handler.cpp
+++ b/plugins/webinterface/php_handler.cpp
@@ -33,24 +33,24 @@ using namespace bt;
namespace kt
{
- QMap<QString,QByteArray> PhpHandler::scripts;
+ TQMap<TQString,TQByteArray> PhpHandler::scripts;
- PhpHandler::PhpHandler(const QString & php_exe,PhpInterface *php) : QProcess(php_exe),php_i(php)
+ PhpHandler::PhpHandler(const TQString & php_exe,PhpInterface *php) : TQProcess(php_exe),php_i(php)
{
- connect(this,SIGNAL(readyReadStdout()),this,SLOT(onReadyReadStdout()));
- connect(this,SIGNAL(processExited()),this,SLOT(onExited()));
+ connect(this,TQT_SIGNAL(readyReadStdout()),this,TQT_SLOT(onReadyReadStdout()));
+ connect(this,TQT_SIGNAL(processExited()),this,TQT_SLOT(onExited()));
}
PhpHandler::~PhpHandler()
{
}
- bool PhpHandler::executeScript(const QString & path,const QMap<QString,QString> & args)
+ bool PhpHandler::executeScript(const TQString & path,const TQMap<TQString,TQString> & args)
{
- QByteArray php_s;
- if (!scripts.contains(path))
+ TQByteArray php_s;
+ if (!scripts.tqcontains(path))
{
- QFile fptr(path);
+ TQFile fptr(path);
if (!fptr.open(IO_ReadOnly))
{
Out(SYS_WEB|LOG_DEBUG) << "Failed to open " << path << endl;
@@ -66,32 +66,32 @@ namespace kt
output.resize(0);
- int firstphptag = QCString(php_s).find("<?php");
+ int firstphptag = TQCString(php_s).tqfind("<?php");
if (firstphptag == -1)
return false;
int off = firstphptag + 6;
- QByteArray data;
- QTextStream ts(data,IO_WriteOnly);
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ TQByteArray data;
+ TQTextStream ts(data,IO_WriteOnly);
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
ts.writeRawBytes(php_s.data(),off); // first write the opening tag from the script
php_i->globalInfo(ts);
- php_i->downloadStatus(ts);
+ php_i->downloadtqStatus(ts);
- QMap<QString,QString>::const_iterator it;
+ TQMap<TQString,TQString>::const_iterator it;
for ( it = args.begin(); it != args.end(); ++it )
{
- ts << QString("$_REQUEST['%1']=\"%2\";\n").arg(it.key()).arg(it.data());
+ ts << TQString("$_REQUEST['%1']=\"%2\";\n").tqarg(it.key()).tqarg(it.data());
}
ts.writeRawBytes(php_s.data() + off,php_s.size() - off); // the rest of the script
ts << flush;
#if 0
- QFile dinges("output.php");
+ TQFile dinges("output.php");
if (dinges.open(IO_WriteOnly))
{
- QTextStream out(&dinges);
+ TQTextStream out(&dinges);
out.writeRawBytes(data.data(),data.size());
dinges.close();
}
@@ -108,10 +108,10 @@ namespace kt
void PhpHandler::onReadyReadStdout()
{
- QTextStream out(output,IO_WriteOnly|IO_Append);
+ TQTextStream out(output,IO_WriteOnly|IO_Append);
while (canReadLineStdout())
{
- QByteArray d = readStdout();
+ TQByteArray d = readStdout();
out.writeRawBytes(d.data(),d.size());
}
}
diff --git a/plugins/webinterface/php_handler.h b/plugins/webinterface/php_handler.h
index b9bfcb6..197bdb7 100644
--- a/plugins/webinterface/php_handler.h
+++ b/plugins/webinterface/php_handler.h
@@ -20,24 +20,25 @@
#ifndef PHP_HANDLER_H
#define PHP_HANDLER_H
-#include <qmap.h>
+#include <tqmap.h>
#include <kurl.h>
-#include <qprocess.h>
+#include <tqprocess.h>
namespace kt
{
class PhpInterface;
- class PhpHandler : public QProcess
+ class PhpHandler : public TQProcess
{
Q_OBJECT
+ TQ_OBJECT
public:
- PhpHandler(const QString & php_exe,PhpInterface *php);
+ PhpHandler(const TQString & php_exe,PhpInterface *php);
virtual ~PhpHandler();
- bool executeScript(const QString & path,const QMap<QString,QString> & args);
- const QByteArray & getOutput() const {return output;};
+ bool executeScript(const TQString & path,const TQMap<TQString,TQString> & args);
+ const TQByteArray & getOutput() const {return output;};
public slots:
void onExited();
@@ -47,10 +48,10 @@ namespace kt
void finished();
private:
- QByteArray output;
+ TQByteArray output;
PhpInterface *php_i;
- static QMap<QString,QByteArray> scripts;
+ static TQMap<TQString,TQByteArray> scripts;
};
}
diff --git a/plugins/webinterface/php_interface.cpp b/plugins/webinterface/php_interface.cpp
index 8ee7d0b..4206caa 100644
--- a/plugins/webinterface/php_interface.cpp
+++ b/plugins/webinterface/php_interface.cpp
@@ -36,7 +36,7 @@ using namespace bt;
namespace kt
{
- extern QString DataDir();
+ extern TQString DataDir();
using bt::FIRST_PRIORITY;
using bt::NORMAL_PRIORITY;
@@ -44,23 +44,23 @@ namespace kt
using bt::EXCLUDED;
- QString BytesToString2(Uint64 bytes,int precision = 2)
+ TQString BytesToString2(Uint64 bytes,int precision = 2)
{
KLocale* loc = KGlobal::locale();
if (bytes >= 1024 * 1024 * 1024)
- return QString("%1 GB").arg(loc->formatNumber(bytes / TO_GIG,precision < 0 ? 2 : precision));
+ return TQString("%1 GB").tqarg(loc->formatNumber(bytes / TO_GIG,precision < 0 ? 2 : precision));
else if (bytes >= 1024*1024)
- return QString("%1 MB").arg(loc->formatNumber(bytes / TO_MEG,precision < 0 ? 1 : precision));
+ return TQString("%1 MB").tqarg(loc->formatNumber(bytes / TO_MEG,precision < 0 ? 1 : precision));
else if (bytes >= 1024)
- return QString("%1 KB").arg(loc->formatNumber(bytes / TO_KB,precision < 0 ? 1 : precision));
+ return TQString("%1 KB").tqarg(loc->formatNumber(bytes / TO_KB,precision < 0 ? 1 : precision));
else
- return QString("%1 B").arg(bytes);
+ return TQString("%1 B").tqarg(bytes);
}
- QString KBytesPerSecToString2(double speed,int precision = 2)
+ TQString KBytesPerSecToString2(double speed,int precision = 2)
{
KLocale* loc = KGlobal::locale();
- return QString("%1 KB/s").arg(loc->formatNumber(speed,precision));
+ return TQString("%1 KB/s").tqarg(loc->formatNumber(speed,precision));
}
/************************
@@ -72,62 +72,62 @@ namespace kt
}
/*Generate php code
- * function downloadStatus()
+ * function downloadtqStatus()
* {
* return array( ... );
* }
*/
- void PhpCodeGenerator::downloadStatus(QTextStream & out)
+ void PhpCodeGenerator::downloadtqStatus(TQTextStream & out)
{
TorrentStats stats;
//Priority file_priority;
- QString status;
- out << "function downloadStatus()\n{\nreturn array(";
+ TQString status;
+ out << "function downloadtqStatus()\n{\nreturn array(";
- QPtrList<TorrentInterface>::iterator i= core->getQueueManager()->begin();
+ TQPtrList<TorrentInterface>::iterator i= core->getQueueManager()->begin();
for(int k=0; i != core->getQueueManager()->end(); i++, k++)
{
if (k > 0)
out << ",\n";
stats=(*i)->getStats();
- out << QString("\n%1 => array(").arg(k);
+ out << TQString("\n%1 => array(").tqarg(k);
- out << QString("\"imported_bytes\" => %1,\n").arg(stats.imported_bytes);
- out << QString("\"bytes_downloaded\" => \"%1\",\n").arg(BytesToString2(stats.bytes_downloaded));
- out << QString("\"bytes_uploaded\" => \"%1\",\n").arg(BytesToString2(stats.bytes_uploaded));
- out << QString("\"bytes_left\" => %1,\n").arg(stats.bytes_left);
- out << QString("\"bytes_left_to_download\" => %1,\n").arg(stats.bytes_left_to_download);
- out << QString("\"total_bytes\" => \"%1\",\n").arg(BytesToString2(stats.total_bytes));
- out << QString("\"total_bytes_to_download\" => %1,\n").arg(stats.total_bytes_to_download);
- out << QString("\"download_rate\" => \"%1\",\n").arg(KBytesPerSecToString2(stats.download_rate / 1024.0));
- out << QString("\"upload_rate\" => \"%1\",\n").arg(KBytesPerSecToString2(stats.upload_rate / 1024.0));
- out << QString("\"num_peers\" => %1,\n").arg(stats.num_peers);
- out << QString("\"num_chunks_downloading\" => %1,\n").arg(stats.num_chunks_downloading);
- out << QString("\"total_chunks\" => %1,\n").arg(stats.total_chunks);
- out << QString("\"num_chunks_downloaded\" => %1,\n").arg(stats.num_chunks_downloaded);
- out << QString("\"num_chunks_excluded\" => %1,\n").arg(stats.num_chunks_excluded);
- out << QString("\"chunk_size\" => %1,\n").arg(stats.chunk_size);
- out << QString("\"seeders_total\" => %1,\n").arg(stats.seeders_total);
- out << QString("\"seeders_connected_to\" => %1,\n").arg(stats.seeders_connected_to);
- out << QString("\"leechers_total\" => %1,\n").arg(stats.leechers_total);
- out << QString("\"leechers_connected_to\" => %1,\n").arg(stats.leechers_connected_to);
- out << QString("\"status\" => %1,\n").arg(stats.status);
- out << QString("\"running\" => %1,\n").arg(stats.running);
- out << QString("\"trackerstatus\" => \"%1\",\n").arg(stats.trackerstatus.replace("\\", "\\\\").replace("\"", "\\\"").replace("$", "\\$"));
- out << QString("\"session_bytes_downloaded\" => %1,\n").arg(stats.session_bytes_downloaded);
- out << QString("\"session_bytes_uploaded\" => %1,\n").arg(stats.session_bytes_uploaded);
- out << QString("\"trk_bytes_downloaded\" => %1,\n").arg(stats.trk_bytes_downloaded);
- out << QString("\"trk_bytes_uploaded\" => %1,\n").arg(stats.trk_bytes_uploaded);
- out << QString("\"torrent_name\" => \"%1\",\n").arg(stats.torrent_name.replace("\\", "\\\\").replace("\"", "\\\"").replace("$", "\\$"));
- out << QString("\"output_path\" => \"%1\",\n").arg(stats.output_path.replace("\\", "\\\\").replace("\"", "\\\"").replace("$", "\\$"));
- out << QString("\"stopped_by_error\" => \"%1\",\n").arg(stats.stopped_by_error);
- out << QString("\"completed\" => \"%1\",\n").arg(stats.completed);
- out << QString("\"user_controlled\" => \"%1\",\n").arg(stats.user_controlled);
- out << QString("\"max_share_ratio\" => %1,\n").arg(stats.max_share_ratio);
- out << QString("\"priv_torrent\" => \"%1\",\n").arg(stats.priv_torrent);
- out << QString("\"num_files\" => \"%1\",\n").arg((*i)->getNumFiles());
- out << QString("\"files\" => array(");
+ out << TQString("\"imported_bytes\" => %1,\n").tqarg(stats.imported_bytes);
+ out << TQString("\"bytes_downloaded\" => \"%1\",\n").tqarg(BytesToString2(stats.bytes_downloaded));
+ out << TQString("\"bytes_uploaded\" => \"%1\",\n").tqarg(BytesToString2(stats.bytes_uploaded));
+ out << TQString("\"bytes_left\" => %1,\n").tqarg(stats.bytes_left);
+ out << TQString("\"bytes_left_to_download\" => %1,\n").tqarg(stats.bytes_left_to_download);
+ out << TQString("\"total_bytes\" => \"%1\",\n").tqarg(BytesToString2(stats.total_bytes));
+ out << TQString("\"total_bytes_to_download\" => %1,\n").tqarg(stats.total_bytes_to_download);
+ out << TQString("\"download_rate\" => \"%1\",\n").tqarg(KBytesPerSecToString2(stats.download_rate / 1024.0));
+ out << TQString("\"upload_rate\" => \"%1\",\n").tqarg(KBytesPerSecToString2(stats.upload_rate / 1024.0));
+ out << TQString("\"num_peers\" => %1,\n").tqarg(stats.num_peers);
+ out << TQString("\"num_chunks_downloading\" => %1,\n").tqarg(stats.num_chunks_downloading);
+ out << TQString("\"total_chunks\" => %1,\n").tqarg(stats.total_chunks);
+ out << TQString("\"num_chunks_downloaded\" => %1,\n").tqarg(stats.num_chunks_downloaded);
+ out << TQString("\"num_chunks_excluded\" => %1,\n").tqarg(stats.num_chunks_excluded);
+ out << TQString("\"chunk_size\" => %1,\n").tqarg(stats.chunk_size);
+ out << TQString("\"seeders_total\" => %1,\n").tqarg(stats.seeders_total);
+ out << TQString("\"seeders_connected_to\" => %1,\n").tqarg(stats.seeders_connected_to);
+ out << TQString("\"leechers_total\" => %1,\n").tqarg(stats.leechers_total);
+ out << TQString("\"leechers_connected_to\" => %1,\n").tqarg(stats.leechers_connected_to);
+ out << TQString("\"status\" => %1,\n").tqarg(stats.status);
+ out << TQString("\"running\" => %1,\n").tqarg(stats.running);
+ out << TQString("\"trackerstatus\" => \"%1\",\n").tqarg(stats.trackerstatus.tqreplace("\\", "\\\\").tqreplace("\"", "\\\"").tqreplace("$", "\\$"));
+ out << TQString("\"session_bytes_downloaded\" => %1,\n").tqarg(stats.session_bytes_downloaded);
+ out << TQString("\"session_bytes_uploaded\" => %1,\n").tqarg(stats.session_bytes_uploaded);
+ out << TQString("\"trk_bytes_downloaded\" => %1,\n").tqarg(stats.trk_bytes_downloaded);
+ out << TQString("\"trk_bytes_uploaded\" => %1,\n").tqarg(stats.trk_bytes_uploaded);
+ out << TQString("\"torrent_name\" => \"%1\",\n").tqarg(stats.torrent_name.tqreplace("\\", "\\\\").tqreplace("\"", "\\\"").tqreplace("$", "\\$"));
+ out << TQString("\"output_path\" => \"%1\",\n").tqarg(stats.output_path.tqreplace("\\", "\\\\").tqreplace("\"", "\\\"").tqreplace("$", "\\$"));
+ out << TQString("\"stopped_by_error\" => \"%1\",\n").tqarg(stats.stopped_by_error);
+ out << TQString("\"completed\" => \"%1\",\n").tqarg(stats.completed);
+ out << TQString("\"user_controlled\" => \"%1\",\n").tqarg(stats.user_controlled);
+ out << TQString("\"max_share_ratio\" => %1,\n").tqarg(stats.max_share_ratio);
+ out << TQString("\"priv_torrent\" => \"%1\",\n").tqarg(stats.priv_torrent);
+ out << TQString("\"num_files\" => \"%1\",\n").tqarg((*i)->getNumFiles());
+ out << TQString("\"files\" => array(");
out << flush;
if (stats.multi_file_torrent)
{
@@ -138,12 +138,12 @@ namespace kt
out << ",\n";
TorrentFileInterface & file = (*i)->getTorrentFile(j);
- out << QString("\"%1\" => array(\n").arg(j);
- out << QString("\"name\" => \"%1\",\n").arg(file.getPath());
- out << QString("\"size\" => \"%1\",\n").arg(KIO::convertSize(file.getSize()));
- out << QString("\"perc_done\" => \"%1\",\n").arg(file.getDownloadPercentage());
- out << QString("\"status\" => \"%1\"\n").arg(file.getPriority());
- out << QString(")\n");
+ out << TQString("\"%1\" => array(\n").tqarg(j);
+ out << TQString("\"name\" => \"%1\",\n").tqarg(file.getPath());
+ out << TQString("\"size\" => \"%1\",\n").tqarg(KIO::convertSize(file.getSize()));
+ out << TQString("\"perc_done\" => \"%1\",\n").tqarg(file.getDownloadPercentage());
+ out << TQString("\"status\" => \"%1\"\n").tqarg(file.getPriority());
+ out << TQString(")\n");
out << flush;
}
}
@@ -156,26 +156,26 @@ namespace kt
}
/*Generate php code
- * function globalStatus()
+ * function globaltqStatus()
* {
* return array( ... );
* }
*/
- void PhpCodeGenerator::globalInfo(QTextStream & out)
+ void PhpCodeGenerator::globalInfo(TQTextStream & out)
{
out << "function globalInfo()\n{\nreturn array(";
CurrentStats stats=core->getStats();
- out << QString("\"download_speed\" => \"%1\",").arg(KBytesPerSecToString2(stats.download_speed / 1024.0));
- out << QString("\"upload_speed\" => \"%1\",").arg(KBytesPerSecToString2(stats.upload_speed / 1024.0));
- out << QString("\"bytes_downloaded\" => \"%1\",").arg(stats.bytes_downloaded);
- out << QString("\"bytes_uploaded\" => \"%1\",").arg(stats.bytes_uploaded);
- out << QString("\"max_download_speed\" => \"%1\",").arg(core->getMaxDownloadSpeed());
- out << QString("\"max_upload_speed\" => \"%1\",").arg(core->getMaxUploadSpeed());
- out << QString("\"max_downloads\" => \"%1\",").arg(Settings::maxDownloads());
- out << QString("\"max_seeds\"=> \"%1\",").arg(Settings::maxSeeds());
- out << QString("\"dht_support\" => \"%1\",").arg(Settings::dhtSupport());
- out << QString("\"use_encryption\" => \"%1\"").arg(Settings::useEncryption());
+ out << TQString("\"download_speed\" => \"%1\",").tqarg(KBytesPerSecToString2(stats.download_speed / 1024.0));
+ out << TQString("\"upload_speed\" => \"%1\",").tqarg(KBytesPerSecToString2(stats.upload_speed / 1024.0));
+ out << TQString("\"bytes_downloaded\" => \"%1\",").tqarg(stats.bytes_downloaded);
+ out << TQString("\"bytes_uploaded\" => \"%1\",").tqarg(stats.bytes_uploaded);
+ out << TQString("\"max_download_speed\" => \"%1\",").tqarg(core->getMaxDownloadSpeed());
+ out << TQString("\"max_upload_speed\" => \"%1\",").tqarg(core->getMaxUploadSpeed());
+ out << TQString("\"max_downloads\" => \"%1\",").tqarg(Settings::maxDownloads());
+ out << TQString("\"max_seeds\"=> \"%1\",").tqarg(Settings::maxSeeds());
+ out << TQString("\"dht_support\" => \"%1\",").tqarg(Settings::dhtSupport());
+ out << TQString("\"use_encryption\" => \"%1\"").tqarg(Settings::useEncryption());
out << ");\n}\n";
}
@@ -193,14 +193,14 @@ namespace kt
bool ret = false;
shutdown = false;
int separator_loc;
- QString parse;
- QString torrent_num;
- QString file_num;
+ TQString parse;
+ TQString torrent_num;
+ TQString file_num;
KURL redirected_url;
redirected_url.setPath(url.path());
- const QMap<QString, QString> & params = url.queryItems();
- QMap<QString, QString>::ConstIterator it;
+ const TQMap<TQString, TQString> & params = url.queryItems();
+ TQMap<TQString, TQString>::ConstIterator it;
for ( it = params.begin(); it != params.end(); ++it )
{
@@ -263,14 +263,14 @@ namespace kt
break;
case 'f':
//parse argument into torrent number and file number
- separator_loc=it.data().find('-');
+ separator_loc=it.data().tqfind('-');
parse=it.data();
torrent_num.append(parse.left(separator_loc));
file_num.append(parse.right(parse.length()-(separator_loc+1)));
if(it.key()=="file_lp")
{
- QPtrList<TorrentInterface>::iterator i= core->getQueueManager()->begin();
+ TQPtrList<TorrentInterface>::iterator i= core->getQueueManager()->begin();
for(int k=0; i != core->getQueueManager()->end(); i++, k++)
{
if(torrent_num.toInt()==k)
@@ -284,7 +284,7 @@ namespace kt
}
else if(it.key()=="file_np")
{
- QPtrList<TorrentInterface>::iterator i= core->getQueueManager()->begin();
+ TQPtrList<TorrentInterface>::iterator i= core->getQueueManager()->begin();
for(int k=0; i != core->getQueueManager()->end(); i++, k++)
{
if(torrent_num.toInt()==k)
@@ -298,7 +298,7 @@ namespace kt
}
else if(it.key()=="file_hp")
{
- QPtrList<TorrentInterface>::iterator i= core->getQueueManager()->begin();
+ TQPtrList<TorrentInterface>::iterator i= core->getQueueManager()->begin();
for(int k=0; i != core->getQueueManager()->end(); i++, k++)
{
if(torrent_num.toInt()==k)
@@ -312,7 +312,7 @@ namespace kt
}
else if(it.key()=="file_stop")
{
- QPtrList<TorrentInterface>::iterator i= core->getQueueManager()->begin();
+ TQPtrList<TorrentInterface>::iterator i= core->getQueueManager()->begin();
for(int k=0; i != core->getQueueManager()->end(); i++, k++)
{
if(torrent_num.toInt()==k)
@@ -410,7 +410,7 @@ namespace kt
case 'r':
if(it.key()=="remove")
{
- QPtrList<TorrentInterface>::iterator i= core->getQueueManager()->begin();
+ TQPtrList<TorrentInterface>::iterator i= core->getQueueManager()->begin();
for(int k=0; i != core->getQueueManager()->end(); i++, k++)
{
if(it.data().toInt()==k)
@@ -433,7 +433,7 @@ namespace kt
}
else if(it.key()=="stop")
{
- QPtrList<TorrentInterface>::iterator i= core->getQueueManager()->begin();
+ TQPtrList<TorrentInterface>::iterator i= core->getQueueManager()->begin();
for(int k=0; i != core->getQueueManager()->end(); i++, k++)
{
if(it.data().toInt()==k)
@@ -446,7 +446,7 @@ namespace kt
}
else if(it.key()=="start")
{
- QPtrList<TorrentInterface>::iterator i= core->getQueueManager()->begin();
+ TQPtrList<TorrentInterface>::iterator i= core->getQueueManager()->begin();
for(int k=0; i != core->getQueueManager()->end(); i++, k++)
{
if(it.data().toInt()==k)
diff --git a/plugins/webinterface/php_interface.h b/plugins/webinterface/php_interface.h
index be79019..4995ae6 100644
--- a/plugins/webinterface/php_interface.h
+++ b/plugins/webinterface/php_interface.h
@@ -21,7 +21,7 @@
#ifndef PHP_INTERFACE_H
#define PHP_INTERFACE_H
-#include <qstring.h>
+#include <tqstring.h>
#include <torrent/peermanager.h>
#include <settings.h>
#include <torrent/queuemanager.h>
@@ -40,8 +40,8 @@ namespace kt
PhpCodeGenerator(CoreInterface *c);
virtual ~PhpCodeGenerator(){}
- void downloadStatus(QTextStream & out);
- void globalInfo(QTextStream & out);
+ void downloadtqStatus(TQTextStream & out);
+ void globalInfo(TQTextStream & out);
private:
CoreInterface *core;
};
diff --git a/plugins/webinterface/webinterfaceplugin.cpp b/plugins/webinterface/webinterfaceplugin.cpp
index bce4115..513f3b8 100644
--- a/plugins/webinterface/webinterfaceplugin.cpp
+++ b/plugins/webinterface/webinterfaceplugin.cpp
@@ -40,8 +40,8 @@ K_EXPORT_COMPONENT_FACTORY(ktwebinterfaceplugin,KGenericFactory<kt::WebInterface
using namespace bt;
namespace kt
{
- WebInterfacePlugin::WebInterfacePlugin(QObject* parent, const char* name, const QStringList& args)
- : Plugin(parent, name, args,NAME,i18n("Web Interface"),AUTHOR,EMAIL,i18n("Allow to control ktorrent through browser"),"toggle_log")
+ WebInterfacePlugin::WebInterfacePlugin(TQObject* tqparent, const char* name, const TQStringList& args)
+ : Plugin(tqparent, name, args,NAME,i18n("Web Interface"),AUTHOR,EMAIL,i18n("Allow to control ktorrent through browser"),"toggle_log")
{
http_server = 0;
pref=0;
@@ -119,7 +119,7 @@ namespace kt
}
}
- bool WebInterfacePlugin::versionCheck(const QString & version) const
+ bool WebInterfacePlugin::versionCheck(const TQString & version) const
{
return version == KT_VERSION_MACRO;
}
diff --git a/plugins/webinterface/webinterfaceplugin.h b/plugins/webinterface/webinterfaceplugin.h
index 469fda2..87c0f4d 100644
--- a/plugins/webinterface/webinterfaceplugin.h
+++ b/plugins/webinterface/webinterfaceplugin.h
@@ -33,13 +33,14 @@ namespace kt
class WebInterfacePlugin : public Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- WebInterfacePlugin(QObject* parent, const char* name, const QStringList& args);
+ WebInterfacePlugin(TQObject* tqparent, const char* name, const TQStringList& args);
virtual ~WebInterfacePlugin();
virtual void load();
virtual void unload();
- virtual bool versionCheck(const QString& version) const;
+ virtual bool versionCheck(const TQString& version) const;
void preferencesUpdated();
private:
diff --git a/plugins/webinterface/webinterfacepref.ui b/plugins/webinterface/webinterfacepref.ui
index 63d368b..339af84 100644
--- a/plugins/webinterface/webinterfacepref.ui
+++ b/plugins/webinterface/webinterfacepref.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>WebInterfacePreference</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>WebInterfacePreference</cstring>
</property>
@@ -20,7 +20,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>500</width>
<height>350</height>
@@ -33,7 +33,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QButtonGroup" row="0" column="0">
+ <widget class="TQButtonGroup" row="0" column="0">
<property name="name">
<cstring>buttonGroup1</cstring>
</property>
@@ -44,15 +44,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -74,7 +74,7 @@
<number>8080</number>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>forward</cstring>
</property>
@@ -92,14 +92,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>54</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -126,15 +126,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -142,30 +142,30 @@
<string>Select interface:</string>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<property name="name">
<cstring>interfaceSkinBox</cstring>
</property>
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="3" column="0">
+ <widget class="TQLayoutWidget" row="3" column="0">
<property name="name">
- <cstring>layout6</cstring>
+ <cstring>tqlayout6</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel5</cstring>
</property>
@@ -180,7 +180,7 @@
</widget>
</hbox>
</widget>
- <widget class="QPushButton" row="0" column="1">
+ <widget class="TQPushButton" row="0" column="1">
<property name="name">
<cstring>btnPassword</cstring>
</property>
@@ -190,15 +190,15 @@
</widget>
</grid>
</widget>
- <widget class="QLayoutWidget" row="2" column="0">
+ <widget class="TQLayoutWidget" row="2" column="0">
<property name="name">
- <cstring>layout7</cstring>
+ <cstring>tqlayout7</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -239,11 +239,11 @@
<slot>changeLedState()</slot>
</connection>
</connections>
-<slots>
+<Q_SLOTS>
<slot>btnUpdate_clicked()</slot>
<slot>changeLedState()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>knuminput.h</includehint>
<includehint>knuminput.h</includehint>
diff --git a/plugins/webinterface/webinterfaceprefpage.cpp b/plugins/webinterface/webinterfaceprefpage.cpp
index 20dbc97..1e1bc16 100644
--- a/plugins/webinterface/webinterfaceprefpage.cpp
+++ b/plugins/webinterface/webinterfaceprefpage.cpp
@@ -43,9 +43,9 @@ namespace kt
return true;
}
- void WebInterfacePrefPage::createWidget(QWidget* parent)
+ void WebInterfacePrefPage::createWidget(TQWidget* tqparent)
{
- m_widget = new WebInterfacePrefWidget(parent);
+ m_widget = new WebInterfacePrefWidget(tqparent);
}
void WebInterfacePrefPage::updateData()
diff --git a/plugins/webinterface/webinterfaceprefpage.h b/plugins/webinterface/webinterfaceprefpage.h
index a10f1c9..ee796af 100644
--- a/plugins/webinterface/webinterfaceprefpage.h
+++ b/plugins/webinterface/webinterfaceprefpage.h
@@ -41,7 +41,7 @@ namespace kt
virtual ~WebInterfacePrefPage();
virtual bool apply();
- virtual void createWidget(QWidget* parent);
+ virtual void createWidget(TQWidget* tqparent);
virtual void updateData();
virtual void deleteWidget();
diff --git a/plugins/webinterface/webinterfaceprefwidget.cpp b/plugins/webinterface/webinterfaceprefwidget.cpp
index fc11d89..ccf9555 100644
--- a/plugins/webinterface/webinterfaceprefwidget.cpp
+++ b/plugins/webinterface/webinterfaceprefwidget.cpp
@@ -26,17 +26,17 @@
#include <kiconloader.h>
#include <kstandarddirs.h>
-#include <qwidget.h>
-#include <qstring.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
+#include <tqwidget.h>
+#include <tqstring.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
#include <knuminput.h>
#include <kurlrequester.h>
#include <klineedit.h>
#include <kpassdlg.h>
#include <kmdcodec.h>
#include <kled.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <net/portlist.h>
#include <torrent/globals.h>
@@ -44,16 +44,16 @@ using namespace bt;
namespace kt
{
-WebInterfacePrefWidget::WebInterfacePrefWidget(QWidget *parent, const char *name):WebInterfacePreference(parent,name)
+WebInterfacePrefWidget::WebInterfacePrefWidget(TQWidget *tqparent, const char *name):WebInterfacePreference(tqparent,name)
{
port->setValue(WebInterfacePluginSettings::port());
forward->setChecked(WebInterfacePluginSettings::forward());
sessionTTL->setValue(WebInterfacePluginSettings::sessionTTL());
- QStringList dirList=KGlobal::instance()->dirs()->findDirs("data", "ktorrent/www");
- QDir d(*(dirList.begin()));
- QStringList skinList=d.entryList(QDir::Dirs);
- for ( QStringList::Iterator it = skinList.begin(); it != skinList.end(); ++it ){
+ TQStringList dirList=KGlobal::instance()->dirs()->findDirs("data", "ktorrent/www");
+ TQDir d(*(dirList.begin()));
+ TQStringList skinList=d.entryList(TQDir::Dirs);
+ for ( TQStringList::Iterator it = skinList.begin(); it != skinList.end(); ++it ){
if(*it=="." || *it=="..")
continue;
interfaceSkinBox->insertItem(*it);
@@ -62,11 +62,11 @@ WebInterfacePrefWidget::WebInterfacePrefWidget(QWidget *parent, const char *name
interfaceSkinBox->setCurrentText (WebInterfacePluginSettings::skin());
if(WebInterfacePluginSettings::phpExecutablePath().isEmpty()){
- QString phpPath=KStandardDirs::findExe("php");
- if(phpPath==QString::null)
+ TQString phpPath=KStandardDirs::findExe("php");
+ if(phpPath==TQString())
phpPath=KStandardDirs::findExe("php-cli");
- if(phpPath==QString::null)
+ if(phpPath==TQString())
phpExecutablePath->setURL (i18n("Php executable is not in default path, please enter the path manually"));
else
phpExecutablePath->setURL (phpPath);
@@ -102,7 +102,7 @@ bool WebInterfacePrefWidget::apply()
void WebInterfacePrefWidget::btnUpdate_clicked()
{
- QCString passwd;
+ TQCString passwd;
int result = KPasswordDialog::getNewPassword(passwd, i18n("Please enter a new password for the web interface."));
if (result == KPasswordDialog::Accepted)
password=passwd;
@@ -111,25 +111,25 @@ void WebInterfacePrefWidget::btnUpdate_clicked()
void WebInterfacePrefWidget::changeLedState()
{
- QFileInfo fi(phpExecutablePath->url());
+ TQFileInfo fi(phpExecutablePath->url());
if(fi.isExecutable() && (fi.isFile() || fi.isSymLink())){
- QToolTip::add( kled, i18n("%1 exists and it is executable").arg(phpExecutablePath->url()));
+ TQToolTip::add( kled, i18n("%1 exists and it is executable").tqarg(phpExecutablePath->url()));
kled->setColor(green);
}
else if (!fi.exists()){
- QToolTip::add( kled, i18n("%1 does not exist").arg(phpExecutablePath->url()) );
+ TQToolTip::add( kled, i18n("%1 does not exist").tqarg(phpExecutablePath->url()) );
kled->setColor(red);
}
else if (!fi.isExecutable()){
- QToolTip::add( kled, i18n("%1 is not executable").arg(phpExecutablePath->url()) );
+ TQToolTip::add( kled, i18n("%1 is not executable").tqarg(phpExecutablePath->url()) );
kled->setColor(red);
}
else if (fi.isDir()){
- QToolTip::add( kled, i18n("%1 is a directory").arg(phpExecutablePath->url()) );
+ TQToolTip::add( kled, i18n("%1 is a directory").tqarg(phpExecutablePath->url()) );
kled->setColor(red);
}
else{
- QToolTip::add( kled, i18n("%1 is not php executable path").arg(phpExecutablePath->url()) );
+ TQToolTip::add( kled, i18n("%1 is not php executable path").tqarg(phpExecutablePath->url()) );
kled->setColor(red);
}
}
diff --git a/plugins/webinterface/webinterfaceprefwidget.h b/plugins/webinterface/webinterfaceprefwidget.h
index b328efe..52bde80 100644
--- a/plugins/webinterface/webinterfaceprefwidget.h
+++ b/plugins/webinterface/webinterfaceprefwidget.h
@@ -28,10 +28,11 @@ namespace kt
class WebInterfacePrefWidget:public WebInterfacePreference
{
Q_OBJECT
+ TQ_OBJECT
public:
- WebInterfacePrefWidget(QWidget *parent = 0, const char *name = 0);
+ WebInterfacePrefWidget(TQWidget *tqparent = 0, const char *name = 0);
bool apply();
- QCString password;
+ TQCString password;
public slots:
void btnUpdate_clicked();
void changeLedState();
diff --git a/plugins/webinterface/www/coldmilk/page_update.js b/plugins/webinterface/www/coldmilk/page_update.js
index c004456..dcbe62b 100644
--- a/plugins/webinterface/www/coldmilk/page_update.js
+++ b/plugins/webinterface/www/coldmilk/page_update.js
@@ -141,7 +141,7 @@ function update_status_bar(xmldoc) {
document.createTextNode("down: " + down + " / up: " + up));
}
var oldtable = document.getElementById('status_bar_table');
- oldtable.parentNode.replaceChild(newtable, oldtable);
+ oldtable.tqparentNode.replaceChild(newtable, oldtable);
}
function update_torrent_table(xmldoc) {
@@ -159,7 +159,7 @@ function update_torrent_table(xmldoc) {
_torrent_table_header(newtable.insertRow(0));
var oldtable = document.getElementById('torrent_list_table');
- oldtable.parentNode.replaceChild(newtable, oldtable);
+ oldtable.tqparentNode.replaceChild(newtable, oldtable);
}
function _torrent_table_row(torrent, table, i) {
@@ -327,7 +327,7 @@ function get_torrents_details(xmldoc) {
_torrent_table_header(newtable.insertRow(0));*/
var oldtable = document.getElementById('torrents_details_files');
- oldtable.parentNode.replaceChild(newtable, oldtable);
+ oldtable.tqparentNode.replaceChild(newtable, oldtable);
}
function _create_action_button(button_name, image_src, command) {
@@ -403,7 +403,7 @@ function _get_file_status_name(status_id)
}
function _torrents_details_header(row) {
- headers = new Array("Actions", "File", "Size", "Perc done", "Status");
+ headers = new Array("Actions", "File", "Size", "Perc done", "tqStatus");
for (var i in headers) {
var header = document.createElement("th");
header.appendChild(document.createTextNode(headers[i]));
@@ -414,7 +414,7 @@ function _torrents_details_header(row) {
function _torrent_table_header(row) {
headers = new Array(
- "Actions", "File", "Status",
+ "Actions", "File", "tqStatus",
"Speed", "Size", "Peers",
"Transferred", "% done"
);
diff --git a/plugins/webinterface/www/coldmilk/rest.php b/plugins/webinterface/www/coldmilk/rest.php
index bab7e68..a61cbfe 100644
--- a/plugins/webinterface/www/coldmilk/rest.php
+++ b/plugins/webinterface/www/coldmilk/rest.php
@@ -174,7 +174,7 @@ class RestInterface {
// Truncate long torrent name, and HTML escape it.
// This is a helper function for download_status.
private function _clean_name($name) {
- $name = str_replace("'", "\'", $name);
+ $name = str_tqreplace("'", "\'", $name);
if (strlen($name) > 30) {
$name = substr($name, 0, 27);
$name .= "...";
@@ -203,7 +203,7 @@ class RestInterface {
class KTorrentXML extends DomDocument {
private $root_element;
public function __construct($root, $value = null, $attributes = null) {
- parent::__construct('1.0');
+ tqparent::__construct('1.0');
$this->root_element = $this->createElement($root);
$this->appendChild($this->root_element);
$this->formatOutput = true;
diff --git a/plugins/webinterface/www/default/details.php b/plugins/webinterface/www/default/details.php
index a19d57e..92c8d48 100644
--- a/plugins/webinterface/www/default/details.php
+++ b/plugins/webinterface/www/default/details.php
@@ -1,5 +1,5 @@
<?php
-$stats=downloadStatus();
+$stats=downloadtqStatus();
$num_torrent=$_REQUEST['torrent'];
function cut_name_if_long($string)
@@ -61,7 +61,7 @@ $display_name=cut_name_if_long($stats[$num_torrent]['torrent_name']);
<tr>
<th>Actions</th>
<th>File</th>
- <th>Status</th>
+ <th>tqStatus</th>
<th>Size</th>
<th>Complete</th>
</tr>
diff --git a/plugins/webinterface/www/default/interface.php b/plugins/webinterface/www/default/interface.php
index 6432798..929bd94 100644
--- a/plugins/webinterface/www/default/interface.php
+++ b/plugins/webinterface/www/default/interface.php
@@ -1,6 +1,6 @@
<?php
$globalinfo=globalInfo();
-$stats=downloadStatus();
+$stats=downloadtqStatus();
function get_torrent_status_name($status_id)
{
@@ -18,7 +18,7 @@ function get_torrent_status_name($status_id)
10 => 'Checking Data'
);
if (array_key_exists($status_id, $table)) return $table[$status_id];
- else return 'Not supported Status';
+ else return 'Not supported tqStatus';
}
function generate_button_code($img, $alt, $href='')
@@ -104,7 +104,7 @@ function generate_button_code($img, $alt, $href='')
<tr>
<th>Actions</th>
<th>File</th>
- <th>Status</th>
+ <th>tqStatus</th>
<th>Downloaded</th>
<th>Size</th>
<th>Uploaded</th>
@@ -118,7 +118,7 @@ function generate_button_code($img, $alt, $href='')
foreach ($stats as $torrent) {
echo "\t\t".'<tr>'."\n\t\t\t";
- $torrent_name = str_replace("'", "\'", $torrent['torrent_name']);
+ $torrent_name = str_tqreplace("'", "\'", $torrent['torrent_name']);
if($torrent['total_bytes_to_download']!=0) $perc = round(100.0 - ($torrent['bytes_left_to_download'] / $torrent['total_bytes_to_download']) * 100.0, 2);
else $perc = 0;
if(strlen($torrent['torrent_name'])>30) $display_name=substr($torrent['torrent_name'], 0, 30)." ...";
diff --git a/plugins/webinterface/www/default/wz_tooltip.js b/plugins/webinterface/www/default/wz_tooltip.js
index 1329a1b..546b421 100644
--- a/plugins/webinterface/www/default/wz_tooltip.js
+++ b/plugins/webinterface/www/default/wz_tooltip.js
@@ -300,7 +300,7 @@ function tt_DeAlt(t_tag)
{
if(t_tag.alt) t_tag.alt = "";
if(t_tag.title) t_tag.title = "";
- var t_c = t_tag.children || t_tag.childNodes || null;
+ var t_c = t_tag.tqchildren || t_tag.childNodes || null;
if(t_c)
{
for(var t_i = t_c.length; t_i; )
@@ -327,7 +327,7 @@ function tt_OpDeHref(t_e)
window.status = tt_tag.t_href;
break;
}
- t_tag = t_tag.parentElement;
+ t_tag = t_tag.tqparentElement;
}
}
}
diff --git a/plugins/webinterface/www/mobile/interface.php b/plugins/webinterface/www/mobile/interface.php
index 57582de..d2fdea9 100644
--- a/plugins/webinterface/www/mobile/interface.php
+++ b/plugins/webinterface/www/mobile/interface.php
@@ -18,7 +18,7 @@
<table width="100%">
<tbody>
<?php
- $stats=downloadStatus();
+ $stats=downloadtqStatus();
$a = 0;
foreach ($stats as $torrent) {
echo "<tr>";
@@ -59,7 +59,7 @@
echo "<td>Checking Data</td>";
break;
default:
- echo "<td>Not supported Status</td>";
+ echo "<td>Not supported tqStatus</td>";
}
echo "<td>$perc%</td>";
$a=$a+1;
diff --git a/plugins/webinterface/www/mobile/torrent.php b/plugins/webinterface/www/mobile/torrent.php
index a1e451d..31d980e 100644
--- a/plugins/webinterface/www/mobile/torrent.php
+++ b/plugins/webinterface/www/mobile/torrent.php
@@ -8,7 +8,7 @@
<tr>
<td align="center"><IMG src="ktorrentwebinterfacelogo.png" width="340" height="150" align="top" border="0"></td>
<?php
- $stats=downloadStatus();
+ $stats=downloadtqStatus();
$t=$stats[$_REQUEST['id']];
echo "<td><strong>ktorrent-><a href=\"interface.php\">transfers</a></strong>->{$t['torrent_name']}</td>";
echo "<td><a href=\"torrent.php?id={$_REQUEST['id']}\" >refresh</a></td>";
@@ -31,7 +31,7 @@
<tbody>
<?php
echo "<tr>";
- echo "<td><strong>Status: </strong></td>";
+ echo "<td><strong>tqStatus: </strong></td>";
switch ($t['status']) {
case 0:
echo "<td>NOT_STARTED</td>";
@@ -67,7 +67,7 @@
echo "<td>CHECKING_DATA</td>";
break;
default:
- echo "<td>Not supported Status</td>";
+ echo "<td>Not supported tqStatus</td>";
}
echo "</tr>";
echo "<tr>";
diff --git a/plugins/zeroconf/avahiservice.cpp b/plugins/zeroconf/avahiservice.cpp
index a190d8e..714d92a 100644
--- a/plugins/zeroconf/avahiservice.cpp
+++ b/plugins/zeroconf/avahiservice.cpp
@@ -19,7 +19,7 @@
#include <util/log.h>
#include <torrent/peerid.h>
#include <avahi-common/watch.h>
-#include <avahi-qt3/qt-watch.h>
+#include <avahi-qt3/tqt-watch.h>
#include "localbrowser.h"
#include "avahiservice.h"
@@ -66,16 +66,16 @@ namespace kt
}
}
- const char* name = avahi_strdup(QString("%1__%2%3").arg(service->id).arg((rand() % 26) + 65).arg((rand() % 26) + 65).ascii());
+ const char* name = avahi_strdup(TQString("%1__%2%3").tqarg(service->id).tqarg((rand() % 26) + 65).tqarg((rand() % 26) + 65).ascii());
const char* type = avahi_strdup("_bittorrent._tcp");
- const char* subtype = avahi_strdup(QString("_" + service->infoHash + "._sub._bittorrent._tcp").ascii());
+ const char* subtype = avahi_strdup(TQString("_" + service->infoHash + "._sub._bittorrent._tcp").ascii());
if (avahi_entry_group_add_service(
service->group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC,
(AvahiPublishFlags)0, name, type, NULL, NULL, service->port, NULL))
{
if (avahi_client_errno(c) != -8)
- Out(SYS_ZCO|LOG_DEBUG) << QString("ZC: Failed to add the service (%i).").arg(avahi_client_errno(c)) << endl;
+ Out(SYS_ZCO|LOG_DEBUG) << TQString("ZC: Failed to add the service (%i).").tqarg(avahi_client_errno(c)) << endl;
else
publish_service(service, c);
return;
@@ -85,7 +85,7 @@ namespace kt
service->group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC,
(AvahiPublishFlags)0, name, type, NULL, subtype))
{
- Out(SYS_ZCO|LOG_DEBUG) << QString("ZC: Failed to add the service subtype (%i).").arg( avahi_client_errno(c)) << endl;
+ Out(SYS_ZCO|LOG_DEBUG) << TQString("ZC: Failed to add the service subtype (%i).").tqarg( avahi_client_errno(c)) << endl;
return;
}
@@ -166,10 +166,10 @@ namespace kt
{
AvahiService* service = reinterpret_cast<AvahiService*>(userdata);
- QString realname = QString(name);
+ TQString realname = TQString(name);
realname.truncate(realname.length() - 5);
- if (service->id != QString(realname))
+ if (service->id != TQString(realname))
{
char a[AVAHI_ADDRESS_STR_MAX];
avahi_address_snprint(a, sizeof(a), address);
@@ -214,7 +214,7 @@ namespace kt
}
case AVAHI_BROWSER_REMOVE:
{
- QString realname = QString(name);
+ TQString realname = TQString(name);
realname.truncate(realname.length() - 5);
LocalBrowser::remove(bt::PeerID(realname.ascii()));
@@ -317,7 +317,7 @@ namespace kt
return false;
}
- if (!(browser = avahi_service_browser_new(listener, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, avahi_strdup(QString("_" + infoHash + "._sub._bittorrent._tcp").ascii()), NULL, (AvahiLookupFlags)0, browser_callback, this)))
+ if (!(browser = avahi_service_browser_new(listener, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, avahi_strdup(TQString("_" + infoHash + "._sub._bittorrent._tcp").ascii()), NULL, (AvahiLookupFlags)0, browser_callback, this)))
{
Out(SYS_ZCO|LOG_DEBUG) << "ZC: Failed to create a service browser." << endl;
stop();
diff --git a/plugins/zeroconf/avahiservice.h b/plugins/zeroconf/avahiservice.h
index 10938d8..fd9e144 100644
--- a/plugins/zeroconf/avahiservice.h
+++ b/plugins/zeroconf/avahiservice.h
@@ -27,7 +27,7 @@
*/
#include <cstdlib>
-#include <qstring.h>
+#include <tqstring.h>
#include <avahi-client/client.h>
@@ -45,6 +45,7 @@ namespace kt
class AvahiService : public kt::PeerSource
{
Q_OBJECT
+ TQ_OBJECT
public:
AvahiService(const bt::PeerID&, bt::Uint16, const bt::SHA1Hash&);
virtual ~AvahiService();
@@ -95,9 +96,9 @@ namespace kt
void*
);
- QString id;
+ TQString id;
int port;
- QString infoHash;
+ TQString infoHash;
bool started;
diff --git a/plugins/zeroconf/zeroconfplugin.cpp b/plugins/zeroconf/zeroconfplugin.cpp
index b906843..462b6a0 100644
--- a/plugins/zeroconf/zeroconfplugin.cpp
+++ b/plugins/zeroconf/zeroconfplugin.cpp
@@ -37,8 +37,8 @@ using namespace bt;
namespace kt
{
- ZeroConfPlugin::ZeroConfPlugin(QObject* parent, const char* name, const QStringList& args)
- : Plugin(parent, name,args,NAME,i18n("Zeroconf"),AUTHOR,QString::null,i18n("Finds peers running ktorrent on the local network to share torrents with"),"ktplugins")
+ ZeroConfPlugin::ZeroConfPlugin(TQObject* tqparent, const char* name, const TQStringList& args)
+ : Plugin(tqparent, name,args,NAME,i18n("Zeroconf"),AUTHOR,TQString(),i18n("Finds peers running ktorrent on the local network to share torrents with"),"ktplugins")
{
services.setAutoDelete(true);
}
@@ -50,14 +50,14 @@ namespace kt
void ZeroConfPlugin::load()
{
CoreInterface* core = getCore();
- connect(core,SIGNAL(torrentAdded( kt::TorrentInterface* )),
- this,SLOT(torrentAdded( kt::TorrentInterface* )));
- connect(core,SIGNAL(torrentRemoved( kt::TorrentInterface* )),
- this,SLOT(torrentRemoved( kt::TorrentInterface* )));
+ connect(core,TQT_SIGNAL(torrentAdded( kt::TorrentInterface* )),
+ this,TQT_SLOT(torrentAdded( kt::TorrentInterface* )));
+ connect(core,TQT_SIGNAL(torrentRemoved( kt::TorrentInterface* )),
+ this,TQT_SLOT(torrentRemoved( kt::TorrentInterface* )));
// go over existing torrents and add them
bt::QueueManager* qman = core->getQueueManager();
- for (QPtrList<kt::TorrentInterface>::iterator i = qman->begin();i != qman->end();i++)
+ for (TQPtrList<kt::TorrentInterface>::iterator i = qman->begin();i != qman->end();i++)
{
torrentAdded(*i);
}
@@ -66,10 +66,10 @@ namespace kt
void ZeroConfPlugin::unload()
{
CoreInterface* core = getCore();
- disconnect(core,SIGNAL(torrentAdded( kt::TorrentInterface* )),
- this,SLOT(torrentAdded( kt::TorrentInterface* )));
- disconnect(core,SIGNAL(torrentRemoved( kt::TorrentInterface* )),
- this,SLOT(torrentRemoved( kt::TorrentInterface*)));
+ disconnect(core,TQT_SIGNAL(torrentAdded( kt::TorrentInterface* )),
+ this,TQT_SLOT(torrentAdded( kt::TorrentInterface* )));
+ disconnect(core,TQT_SIGNAL(torrentRemoved( kt::TorrentInterface* )),
+ this,TQT_SLOT(torrentRemoved( kt::TorrentInterface*)));
bt::PtrMap<kt::TorrentInterface*,AvahiService>::iterator i = services.begin();
while (i != services.end())
@@ -84,7 +84,7 @@ namespace kt
void ZeroConfPlugin::torrentAdded(kt::TorrentInterface* tc)
{
- if (services.contains(tc))
+ if (services.tqcontains(tc))
return;
bt::Uint16 port = bt::Globals::instance().getServer().getPortInUse();
@@ -93,14 +93,14 @@ namespace kt
tc->addPeerSource(av);
Out(SYS_ZCO|LOG_NOTICE) << "ZeroConf service added for "
<< tc->getStats().torrent_name << endl;
- connect(av,SIGNAL(serviceDestroyed( AvahiService* )),
- this,SLOT(avahiServiceDestroyed( AvahiService* )));
+ connect(av,TQT_SIGNAL(serviceDestroyed( AvahiService* )),
+ this,TQT_SLOT(avahiServiceDestroyed( AvahiService* )));
}
void ZeroConfPlugin::torrentRemoved(kt::TorrentInterface* tc)
{
- AvahiService* av = services.find(tc);
+ AvahiService* av = services.tqfind(tc);
if (!av)
return;
Out(SYS_ZCO|LOG_NOTICE) << "ZeroConf service removed for "
@@ -127,7 +127,7 @@ namespace kt
services.setAutoDelete(true);
}
- bool ZeroConfPlugin::versionCheck(const QString & version) const
+ bool ZeroConfPlugin::versionCheck(const TQString & version) const
{
return version == KT_VERSION_MACRO;
}
diff --git a/plugins/zeroconf/zeroconfplugin.h b/plugins/zeroconf/zeroconfplugin.h
index b34e851..f658f3e 100644
--- a/plugins/zeroconf/zeroconfplugin.h
+++ b/plugins/zeroconf/zeroconfplugin.h
@@ -36,13 +36,14 @@ namespace kt
class ZeroConfPlugin : public Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- ZeroConfPlugin(QObject* parent, const char* name, const QStringList& args);
+ ZeroConfPlugin(TQObject* tqparent, const char* name, const TQStringList& args);
virtual ~ZeroConfPlugin();
virtual void load();
virtual void unload();
- virtual bool versionCheck(const QString& version) const;
+ virtual bool versionCheck(const TQString& version) const;
private slots:
/**