summaryrefslogtreecommitdiffstats
path: root/knewsticker
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:48:06 +0000
commit47c8a359c5276062c4bc17f0e82410f29081b502 (patch)
tree2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /knewsticker
parent6f82532777a35e0e60bbd2b290b2e93e646f349b (diff)
downloadtdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz
tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'knewsticker')
-rw-r--r--knewsticker/common/configaccess.cpp482
-rw-r--r--knewsticker/common/configaccess.h60
-rw-r--r--knewsticker/common/configiface.h16
-rw-r--r--knewsticker/common/newsengine.cpp42
-rw-r--r--knewsticker/common/newsengine.h46
-rw-r--r--knewsticker/common/newsiconmgr.cpp74
-rw-r--r--knewsticker/common/newsiconmgr.h22
-rw-r--r--knewsticker/common/xmlnewsaccess.cpp52
-rw-r--r--knewsticker/common/xmlnewsaccess.h32
-rw-r--r--knewsticker/knewsticker.cpp122
-rw-r--r--knewsticker/knewsticker.h28
-rw-r--r--knewsticker/knewstickerconfig.cpp188
-rw-r--r--knewsticker/knewstickerconfig.h44
-rw-r--r--knewsticker/knewstickerstub/knewstickerstub.cpp10
-rw-r--r--knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.cpp42
-rw-r--r--knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.h10
-rw-r--r--knewsticker/newsscroller.cpp126
-rw-r--r--knewsticker/newsscroller.h44
-rw-r--r--knewsticker/newssourcedlgimpl.cpp72
-rw-r--r--knewsticker/newssourcedlgimpl.h18
20 files changed, 765 insertions, 765 deletions
diff --git a/knewsticker/common/configaccess.cpp b/knewsticker/common/configaccess.cpp
index 942b3f70..68b37f57 100644
--- a/knewsticker/common/configaccess.cpp
+++ b/knewsticker/common/configaccess.cpp
@@ -11,7 +11,7 @@
#include "configaccess.h"
#include "newsengine.h"
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -20,347 +20,347 @@
static NewsSourceBase::Data NewsSourceDefault[DEFAULT_NEWSSOURCES] = {
// Arts ---------------
NewsSourceBase::Data(
- QString::fromLatin1("Bureau 42"),
- QString::fromLatin1("http://www.bureau42.com/rdf/"),
- QString::fromLatin1("http://www.bureau42.com/favicon.ico"),
+ TQString::fromLatin1("Bureau 42"),
+ TQString::fromLatin1("http://www.bureau42.com/rdf/"),
+ TQString::fromLatin1("http://www.bureau42.com/favicon.ico"),
NewsSourceBase::Arts, 5, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("eFilmCritic"),
- QString::fromLatin1("http://efilmcritic.com/fo.rdf"),
- QString::fromLatin1("http://efilmcritic.com/favicon.ico"),
+ TQString::fromLatin1("eFilmCritic"),
+ TQString::fromLatin1("http://efilmcritic.com/fo.rdf"),
+ TQString::fromLatin1("http://efilmcritic.com/favicon.ico"),
NewsSourceBase::Arts, 3, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("superhits.ch"),
- QString::fromLatin1("http://www.superhits.ch/cgi-bin/superhits.cgi?page=rdf"),
- QString::fromLatin1("http://www.superhits.ch/favicon.ico"),
- NewsSourceBase::Arts, 10, false, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("superhits.ch"),
+ TQString::fromLatin1("http://www.superhits.ch/cgi-bin/superhits.cgi?page=rdf"),
+ TQString::fromLatin1("http://www.superhits.ch/favicon.ico"),
+ NewsSourceBase::Arts, 10, false, false, TQString::fromLatin1("de")),
// Business -----------
NewsSourceBase::Data(
- QString::fromLatin1("Internet.com Business"),
- QString::fromLatin1("http://headlines.internet.com/internetnews/bus-news/news.rss"),
- QString::null,
+ TQString::fromLatin1("Internet.com Business"),
+ TQString::fromLatin1("http://headlines.internet.com/internetnews/bus-news/news.rss"),
+ TQString::null,
NewsSourceBase::Business, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("TradeSims"),
- QString::fromLatin1("http://www.tradesims.com/AEX.rdf"),
- QString::null,
+ TQString::fromLatin1("TradeSims"),
+ TQString::fromLatin1("http://www.tradesims.com/AEX.rdf"),
+ TQString::null,
NewsSourceBase::Business, 10, false, false),
// Computers ----------
NewsSourceBase::Data(
- QString::fromLatin1( "linuxartist.org" ),
- QString::fromLatin1( "http://www.linuxartist.org/backend.php"),
- QString::fromLatin1( "http://www.linuxartist.org/favicon.ico"),
+ TQString::fromLatin1( "linuxartist.org" ),
+ TQString::fromLatin1( "http://www.linuxartist.org/backend.php"),
+ TQString::fromLatin1( "http://www.linuxartist.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false ),
NewsSourceBase::Data(
- QString::fromLatin1("KDE Deutschland"),
- QString::fromLatin1("http://www.kde.de/nachrichten/nachrichten.rdf"),
- QString::fromLatin1("http://www.kde.de/favicon.ico"),
- NewsSourceBase::Computers, 10, true, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("KDE Deutschland"),
+ TQString::fromLatin1("http://www.kde.de/nachrichten/nachrichten.rdf"),
+ TQString::fromLatin1("http://www.kde.de/favicon.ico"),
+ NewsSourceBase::Computers, 10, true, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("KDE France"),
- QString::fromLatin1("http://www.kde-france.org/backend-breves.php3"),
- QString::null,
- NewsSourceBase::Computers, 10, true, false, QString::fromLatin1("fr")),
+ TQString::fromLatin1("KDE France"),
+ TQString::fromLatin1("http://www.kde-france.org/backend-breves.php3"),
+ TQString::null,
+ NewsSourceBase::Computers, 10, true, false, TQString::fromLatin1("fr")),
NewsSourceBase::Data(
- QString::fromLatin1("FreeBSD Project News"),
- QString::fromLatin1("http://www.freebsd.org/news/news.rdf"),
- QString::fromLatin1("http://www.freebsd.org/favicon.ico"),
+ TQString::fromLatin1("FreeBSD Project News"),
+ TQString::fromLatin1("http://www.freebsd.org/news/news.rdf"),
+ TQString::fromLatin1("http://www.freebsd.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("dot.kde.org"),
- QString::fromLatin1("http://www.kde.org/dotkdeorg.rdf"),
- QString::fromLatin1("http://www.kde.org/favicon.ico"),
+ TQString::fromLatin1("dot.kde.org"),
+ TQString::fromLatin1("http://www.kde.org/dotkdeorg.rdf"),
+ TQString::fromLatin1("http://www.kde.org/favicon.ico"),
NewsSourceBase::Computers, 10, true, false),
NewsSourceBase::Data(
- QString::fromLatin1("GNOME News"),
- QString::fromLatin1("http://www.gnomedesktop.org/backend.php"),
- QString::null,
+ TQString::fromLatin1("GNOME News"),
+ TQString::fromLatin1("http://www.gnomedesktop.org/backend.php"),
+ TQString::null,
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Slashdot"),
- QString::fromLatin1("http://slashdot.org/slashdot.rdf"),
- QString::fromLatin1("http://slashdot.org/favicon.ico"),
+ TQString::fromLatin1("Slashdot"),
+ TQString::fromLatin1("http://slashdot.org/slashdot.rdf"),
+ TQString::fromLatin1("http://slashdot.org/favicon.ico"),
NewsSourceBase::Computers, 10, true, false),
NewsSourceBase::Data(
- QString::fromLatin1("Ask Slashdot"),
- QString::fromLatin1("http://slashdot.org/askslashdot.rdf"),
- QString::fromLatin1("http://slashdot.org/favicon.ico"),
+ TQString::fromLatin1("Ask Slashdot"),
+ TQString::fromLatin1("http://slashdot.org/askslashdot.rdf"),
+ TQString::fromLatin1("http://slashdot.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Slashdot: Features"),
- QString::fromLatin1("http://slashdot.org/features.rdf"),
- QString::fromLatin1("http://slashdot.org/favicon.ico"),
+ TQString::fromLatin1("Slashdot: Features"),
+ TQString::fromLatin1("http://slashdot.org/features.rdf"),
+ TQString::fromLatin1("http://slashdot.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Slashdot: Apache"),
- QString::fromLatin1("http://slashdot.org/apache.rdf"),
- QString::fromLatin1("http://slashdot.org/favicon.ico"),
+ TQString::fromLatin1("Slashdot: Apache"),
+ TQString::fromLatin1("http://slashdot.org/apache.rdf"),
+ TQString::fromLatin1("http://slashdot.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Slashdot: Books"),
- QString::fromLatin1("http://slashdot.org/books.rdf"),
- QString::fromLatin1("http://slashdot.org/favicon.ico"),
+ TQString::fromLatin1("Slashdot: Books"),
+ TQString::fromLatin1("http://slashdot.org/books.rdf"),
+ TQString::fromLatin1("http://slashdot.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Jabber News"),
- QString::fromLatin1("http://www.jabber.org/news/rss.xml"),
- QString::null,
+ TQString::fromLatin1("Jabber News"),
+ TQString::fromLatin1("http://www.jabber.org/news/rss.xml"),
+ TQString::null,
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Freshmeat"),
- QString::fromLatin1("http://freshmeat.net/backend/fm.rdf"),
- QString::fromLatin1("http://freshmeat.net/favicon.ico"),
+ TQString::fromLatin1("Freshmeat"),
+ TQString::fromLatin1("http://freshmeat.net/backend/fm.rdf"),
+ TQString::fromLatin1("http://freshmeat.net/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Linux Weekly News"),
- QString::fromLatin1("http://www.lwn.net/headlines/rss"),
- QString::fromLatin1("http://www.lwn.net/favicon.ico"),
+ TQString::fromLatin1("Linux Weekly News"),
+ TQString::fromLatin1("http://www.lwn.net/headlines/rss"),
+ TQString::fromLatin1("http://www.lwn.net/favicon.ico"),
NewsSourceBase::Computers, 10, true, false),
NewsSourceBase::Data(
- QString::fromLatin1("heise online news"),
- QString::fromLatin1("http://www.heise.de/newsticker/heise.rdf"),
- QString::fromLatin1("http://www.heise.de/favicon.ico"),
- NewsSourceBase::Computers, 10, true, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("heise online news"),
+ TQString::fromLatin1("http://www.heise.de/newsticker/heise.rdf"),
+ TQString::fromLatin1("http://www.heise.de/favicon.ico"),
+ NewsSourceBase::Computers, 10, true, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("RUS-CERT Ticker"),
- QString::fromLatin1("http://cert.uni-stuttgart.de/ticker/rus-cert.rdf"),
- QString::fromLatin1("http://cert.uni-stuttgart.de/favicon.ico"),
- NewsSourceBase::Computers, 10, true, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("RUS-CERT Ticker"),
+ TQString::fromLatin1("http://cert.uni-stuttgart.de/ticker/rus-cert.rdf"),
+ TQString::fromLatin1("http://cert.uni-stuttgart.de/favicon.ico"),
+ NewsSourceBase::Computers, 10, true, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("RUS-CERT Elsewhere"),
- QString::fromLatin1("http://cert.uni-stuttgart.de/ticker/rus-cert-elsewhere.rdf"),
- QString::fromLatin1("http://cert.uni-stuttgart.de/favicon.ico"),
- NewsSourceBase::Computers, 10, false, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("RUS-CERT Elsewhere"),
+ TQString::fromLatin1("http://cert.uni-stuttgart.de/ticker/rus-cert-elsewhere.rdf"),
+ TQString::fromLatin1("http://cert.uni-stuttgart.de/favicon.ico"),
+ NewsSourceBase::Computers, 10, false, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("Kuro5hin"),
- QString::fromLatin1("http://kuro5hin.org/backend.rdf"),
- QString::fromLatin1("http://kuro5hin.org/favicon.ico"),
+ TQString::fromLatin1("Kuro5hin"),
+ TQString::fromLatin1("http://kuro5hin.org/backend.rdf"),
+ TQString::fromLatin1("http://kuro5hin.org/favicon.ico"),
NewsSourceBase::Computers, 10, true, false),
NewsSourceBase::Data(
- QString::fromLatin1("Prolinux"),
- QString::fromLatin1("http://www.pl-forum.de/backend/pro-linux.rdf"),
- QString::fromLatin1("http://www.prolinux.de/favicon.ico"),
- NewsSourceBase::Computers, 10, false, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("Prolinux"),
+ TQString::fromLatin1("http://www.pl-forum.de/backend/pro-linux.rdf"),
+ TQString::fromLatin1("http://www.prolinux.de/favicon.ico"),
+ NewsSourceBase::Computers, 10, false, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("Linuxde.org"),
- QString::fromLatin1("http://www.linuxde.org/backends/news.rdf"),
- QString::fromLatin1("http://www.linuxde.org/favicon.ico"),
- NewsSourceBase::Computers, 10, false, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("Linuxde.org"),
+ TQString::fromLatin1("http://www.linuxde.org/backends/news.rdf"),
+ TQString::fromLatin1("http://www.linuxde.org/favicon.ico"),
+ NewsSourceBase::Computers, 10, false, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("LinuxSecurity.com"),
- QString::fromLatin1("http://www.linuxsecurity.com/linuxsecurity_hybrid.rdf"),
- QString::null,
+ TQString::fromLatin1("LinuxSecurity.com"),
+ TQString::fromLatin1("http://www.linuxsecurity.com/linuxsecurity_hybrid.rdf"),
+ TQString::null,
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Linux Game Tome"),
- QString::fromLatin1("http://happypenguin.org/html/news.rdf"),
- QString::null,
+ TQString::fromLatin1("Linux Game Tome"),
+ TQString::fromLatin1("http://happypenguin.org/html/news.rdf"),
+ TQString::null,
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Telefragged"),
- QString::fromLatin1("http://www.telefragged.com/cgi-bin/rdf.pl"),
- QString::null,
+ TQString::fromLatin1("Telefragged"),
+ TQString::fromLatin1("http://www.telefragged.com/cgi-bin/rdf.pl"),
+ TQString::null,
NewsSourceBase::Computers, 10, false, false),
/* NewsSourceBase::Data(
- QString::fromLatin1("Gimp News"),
- QString::fromLatin1("http://www.xach.com/gimp/news/channel.rdf"),
- QString::null,
+ TQString::fromLatin1("Gimp News"),
+ TQString::fromLatin1("http://www.xach.com/gimp/news/channel.rdf"),
+ TQString::null,
NewsSourceBase::Computers, 10, false, false),*/
NewsSourceBase::Data(
- QString::fromLatin1("Mozilla"),
- QString::fromLatin1("http://www.mozilla.org/news.rdf"),
- QString::fromLatin1("http://www.mozillazine.org/favicon.ico"),
+ TQString::fromLatin1("Mozilla"),
+ TQString::fromLatin1("http://www.mozilla.org/news.rdf"),
+ TQString::fromLatin1("http://www.mozillazine.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("MozillaZine"),
- QString::fromLatin1("http://www.mozillazine.org/contents.rdf"),
- QString::fromLatin1("http://www.mozillazine.org/favicon.ico"),
+ TQString::fromLatin1("MozillaZine"),
+ TQString::fromLatin1("http://www.mozillazine.org/contents.rdf"),
+ TQString::fromLatin1("http://www.mozillazine.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Daemon News"),
- QString::fromLatin1("http://daily.daemonnews.org/ddn.rdf.php3"),
- QString::null,
+ TQString::fromLatin1("Daemon News"),
+ TQString::fromLatin1("http://daily.daemonnews.org/ddn.rdf.php3"),
+ TQString::null,
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("use Perl;"),
- QString::fromLatin1("http://use.perl.org/useperl.rdf"),
- QString::null,
+ TQString::fromLatin1("use Perl;"),
+ TQString::fromLatin1("http://use.perl.org/useperl.rdf"),
+ TQString::null,
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("desktopian.org"),
- QString::fromLatin1("http://www.desktopian.org/includes/headlines.xml"),
- QString::fromLatin1("http://www.desktopian.org/favicon.ico"),
+ TQString::fromLatin1("desktopian.org"),
+ TQString::fromLatin1("http://www.desktopian.org/includes/headlines.xml"),
+ TQString::fromLatin1("http://www.desktopian.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Root prompt"),
- QString::fromLatin1("http://www.rootprompt.org/rss/"),
- QString::fromLatin1("http://www.rootprompt.org/favicon.ico"),
+ TQString::fromLatin1("Root prompt"),
+ TQString::fromLatin1("http://www.rootprompt.org/rss/"),
+ TQString::fromLatin1("http://www.rootprompt.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("SecurityFocus"),
- QString::fromLatin1("http://www.securityfocus.com/rss/news.xml"),
- QString::fromLatin1("http://www.securityfocus.com/favicon.ico"),
+ TQString::fromLatin1("SecurityFocus"),
+ TQString::fromLatin1("http://www.securityfocus.com/rss/news.xml"),
+ TQString::fromLatin1("http://www.securityfocus.com/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("LinuxNewbie"),
- QString::fromLatin1("http://www.linuxnewbie.org/news.cdf"),
- QString::fromLatin1("http://www.linuxnewbie.org/favicon.ico"),
+ TQString::fromLatin1("LinuxNewbie"),
+ TQString::fromLatin1("http://www.linuxnewbie.org/news.cdf"),
+ TQString::fromLatin1("http://www.linuxnewbie.org/favicon.ico"),
NewsSourceBase::Computers, 5, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("Arstechnica"),
- QString::fromLatin1("http://arstechnica.com/etc/rdf/ars.rdf"),
- QString::fromLatin1("http://arstechnica.com/favicon.ico"),
+ TQString::fromLatin1("Arstechnica"),
+ TQString::fromLatin1("http://arstechnica.com/etc/rdf/ars.rdf"),
+ TQString::fromLatin1("http://arstechnica.com/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("amiga-news.de - deutschsprachige Amiga Nachrichten"),
- QString::fromLatin1("http://www.amiga-news.de/de/backends/news/index.rss"),
- QString::fromLatin1("http://www.amiga-news.de/favicon.ico"),
- NewsSourceBase::Computers, 10, false, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("amiga-news.de - deutschsprachige Amiga Nachrichten"),
+ TQString::fromLatin1("http://www.amiga-news.de/de/backends/news/index.rss"),
+ TQString::fromLatin1("http://www.amiga-news.de/favicon.ico"),
+ NewsSourceBase::Computers, 10, false, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("amiga-news.de - english Amiga news"),
- QString::fromLatin1("http://www.amiga-news.de/en/backends/news/index.rss"),
- QString::fromLatin1("http://www.amiga-news.de/favicon.ico"),
+ TQString::fromLatin1("amiga-news.de - english Amiga news"),
+ TQString::fromLatin1("http://www.amiga-news.de/en/backends/news/index.rss"),
+ TQString::fromLatin1("http://www.amiga-news.de/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("RadioTux)"),
- QString::fromLatin1("http://blog.radiotux.de/feed/"),
- QString::null,
- NewsSourceBase::Computers, 10, false, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("RadioTux)"),
+ TQString::fromLatin1("http://blog.radiotux.de/feed/"),
+ TQString::null,
+ NewsSourceBase::Computers, 10, false, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("kdenews.unixcode.org"),
- QString::fromLatin1("http://kdenews.unixcode.org/?node=news&action=rss"),
- QString::null,
+ TQString::fromLatin1("kdenews.unixcode.org"),
+ TQString::fromLatin1("http://kdenews.unixcode.org/?node=news&action=rss"),
+ TQString::null,
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("FreshPorts - the place for ports"),
- QString::fromLatin1("http://www.freshports.org/news.php"),
- QString::fromLatin1("http://www.freshports.org/favicon.ico"),
+ TQString::fromLatin1("FreshPorts - the place for ports"),
+ TQString::fromLatin1("http://www.freshports.org/news.php"),
+ TQString::fromLatin1("http://www.freshports.org/favicon.ico"),
NewsSourceBase::Computers, 20, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("NetPhoenix"),
- QString::fromLatin1("http://www.netphoenix.at/rss/netphoenix.php"),
- QString::fromLatin1("http://www.netphoenix.at/favicon.ico"),
- NewsSourceBase::Computers, 10, false, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("NetPhoenix"),
+ TQString::fromLatin1("http://www.netphoenix.at/rss/netphoenix.php"),
+ TQString::fromLatin1("http://www.netphoenix.at/favicon.ico"),
+ NewsSourceBase::Computers, 10, false, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("ShortNews - by www.netphoenix.at"),
- QString::fromLatin1("http://www.netphoenix.at/rss/shortnews.php"),
- QString::fromLatin1("http://www.netphoenix.at/favicon.ico"),
- NewsSourceBase::Computers, 10, false, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("ShortNews - by www.netphoenix.at"),
+ TQString::fromLatin1("http://www.netphoenix.at/rss/shortnews.php"),
+ TQString::fromLatin1("http://www.netphoenix.at/favicon.ico"),
+ NewsSourceBase::Computers, 10, false, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("zez.org - about code "),
- QString::fromLatin1("http://zez.org/article/rssheadlines"),
- QString::null,
+ TQString::fromLatin1("zez.org - about code "),
+ TQString::fromLatin1("http://zez.org/article/rssheadlines"),
+ TQString::null,
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("BSDatwork.com"),
- QString::fromLatin1("http://BSDatwork.com/backend.php"),
- QString::fromLatin1("http://BSDatwork.com/favicon.ico"),
+ TQString::fromLatin1("BSDatwork.com"),
+ TQString::fromLatin1("http://BSDatwork.com/backend.php"),
+ TQString::fromLatin1("http://BSDatwork.com/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("FreshSource - the place for source"),
- QString::fromLatin1("http://www.freshsource.org/news.php"),
- QString::fromLatin1("http://www.freshsource.org/favicon.ico"),
+ TQString::fromLatin1("FreshSource - the place for source"),
+ TQString::fromLatin1("http://www.freshsource.org/news.php"),
+ TQString::fromLatin1("http://www.freshsource.org/favicon.ico"),
NewsSourceBase::Computers, 20, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("The FreeBSD Diary"),
- QString::fromLatin1("http://www.freebsddiary.org/news.php"),
- QString::fromLatin1("http://www.freebsddiary.org/favicon.ico"),
+ TQString::fromLatin1("The FreeBSD Diary"),
+ TQString::fromLatin1("http://www.freebsddiary.org/news.php"),
+ TQString::fromLatin1("http://www.freebsddiary.org/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("MaximumBSD"),
- QString::fromLatin1("http://www.maximumbsd.com/backend/mb.rdf"),
- QString::fromLatin1("http://www.maximumbsd.com/favicon.ico"),
+ TQString::fromLatin1("MaximumBSD"),
+ TQString::fromLatin1("http://www.maximumbsd.com/backend/mb.rdf"),
+ TQString::fromLatin1("http://www.maximumbsd.com/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("BR-Linux.org"),
- QString::fromLatin1("http://br-linux.org/noticias/index.rdf"),
- QString::fromLatin1("http://br-linux.org/noticias/favicon.ico"),
+ TQString::fromLatin1("BR-Linux.org"),
+ TQString::fromLatin1("http://br-linux.org/noticias/index.rdf"),
+ TQString::fromLatin1("http://br-linux.org/noticias/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("OSNews.com"),
- QString::fromLatin1("http://www.osnews.com/files/recent.rdf"),
- QString::fromLatin1("http://www.osnews.com/favicon.ico"),
+ TQString::fromLatin1("OSNews.com"),
+ TQString::fromLatin1("http://www.osnews.com/files/recent.rdf"),
+ TQString::fromLatin1("http://www.osnews.com/favicon.ico"),
NewsSourceBase::Computers, 10, false, false),
// Miscellaneous ------
NewsSourceBase::Data(
- QString::fromLatin1("tagesschau.de"),
- QString::fromLatin1("http://www.tagesschau.de/newsticker.rdf"),
- QString::fromLatin1("http://www.tagesschau.de/favicon.ico"),
- NewsSourceBase::Misc, 10, true, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("tagesschau.de"),
+ TQString::fromLatin1("http://www.tagesschau.de/newsticker.rdf"),
+ TQString::fromLatin1("http://www.tagesschau.de/favicon.ico"),
+ NewsSourceBase::Misc, 10, true, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("N24.de"),
- QString::fromLatin1("http://www.n24.de/rss/?rubrik=home"),
- QString::fromLatin1("http://www.n24.de/favicon.ico"),
- NewsSourceBase::Misc, 10, true, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("N24.de"),
+ TQString::fromLatin1("http://www.n24.de/rss/?rubrik=home"),
+ TQString::fromLatin1("http://www.n24.de/favicon.ico"),
+ NewsSourceBase::Misc, 10, true, false, TQString::fromLatin1("de")),
/*
NewsSourceBase::Data(
- QString::fromLatin1("CNN"),
- QString::fromLatin1("http://www.cnn.com/cnn.rss"),
- QString::fromLatin1("http://www.cnn.com/favicon.ico"),
+ TQString::fromLatin1("CNN"),
+ TQString::fromLatin1("http://www.cnn.com/cnn.rss"),
+ TQString::fromLatin1("http://www.cnn.com/favicon.ico"),
NewsSourceBase::Misc, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("CNN Europe"),
- QString::fromLatin1("http://europe.cnn.com/cnn.rss"),
- QString::fromLatin1("http://europe.cnn.com/favicon.ico"),
+ TQString::fromLatin1("CNN Europe"),
+ TQString::fromLatin1("http://europe.cnn.com/cnn.rss"),
+ TQString::fromLatin1("http://europe.cnn.com/favicon.ico"),
NewsSourceBase::Misc, 10, false, false),
*/
NewsSourceBase::Data(
- QString::fromLatin1("HotWired"),
- QString::fromLatin1("http://www.hotwired.com/webmonkey/meta/headlines.rdf"),
- QString::fromLatin1("http://www.hotwired.com/favicon.ico"),
+ TQString::fromLatin1("HotWired"),
+ TQString::fromLatin1("http://www.hotwired.com/webmonkey/meta/headlines.rdf"),
+ TQString::fromLatin1("http://www.hotwired.com/favicon.ico"),
NewsSourceBase::Misc, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1("The Register"),
- QString::fromLatin1("http://www.theregister.co.uk/tonys/slashdot.rdf"),
- QString::fromLatin1("http://www.theregister.co.uk/favicon.ico"),
+ TQString::fromLatin1("The Register"),
+ TQString::fromLatin1("http://www.theregister.co.uk/tonys/slashdot.rdf"),
+ TQString::fromLatin1("http://www.theregister.co.uk/favicon.ico"),
NewsSourceBase::Misc, 10, false, false),
NewsSourceBase::Data(
- QString::fromLatin1( "Christian Science Monitor" ),
- QString::fromLatin1( "http://www.csmonitor.com/rss/csm.rss"),
- QString::fromLatin1( "http://www.csmonitor.com/favicon.ico"),
+ TQString::fromLatin1( "Christian Science Monitor" ),
+ TQString::fromLatin1( "http://www.csmonitor.com/rss/csm.rss"),
+ TQString::fromLatin1( "http://www.csmonitor.com/favicon.ico"),
NewsSourceBase::Misc, 10, false, false ),
// Magazines ------
NewsSourceBase::Data(
- QString::fromLatin1("Revista do Linux"),
- QString::fromLatin1("http://www.revistadolinux.com.br/noticias/arquivo/noticias.rdf"),
- QString::fromLatin1("http://www.revistadolinux.com.br/favicon.ico"),
- NewsSourceBase::Magazines, 10, false, false /*, QString::fromLatin1("br")*/ ),
+ TQString::fromLatin1("Revista do Linux"),
+ TQString::fromLatin1("http://www.revistadolinux.com.br/noticias/arquivo/noticias.rdf"),
+ TQString::fromLatin1("http://www.revistadolinux.com.br/favicon.ico"),
+ NewsSourceBase::Magazines, 10, false, false /*, TQString::fromLatin1("br")*/ ),
NewsSourceBase::Data(
- QString::fromLatin1("Spiegel.de"),
- QString::fromLatin1("http://www.spiegel.de/schlagzeilen/rss/0,5291,,00.xml"),
- QString::fromLatin1("http://www.spiegel.de/favicon.ico"),
- NewsSourceBase::Magazines, 10, true, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("Spiegel.de"),
+ TQString::fromLatin1("http://www.spiegel.de/schlagzeilen/rss/0,5291,,00.xml"),
+ TQString::fromLatin1("http://www.spiegel.de/favicon.ico"),
+ NewsSourceBase::Magazines, 10, true, false, TQString::fromLatin1("de")),
NewsSourceBase::Data(
- QString::fromLatin1("FAZ.de"),
- QString::fromLatin1("http://www.faz.net/s/Rub/Tpl~Epartner~SRss_.xml"),
- QString::fromLatin1("http://www.faz.net/favicon.ico"),
- NewsSourceBase::Magazines, 10, true, false, QString::fromLatin1("de")),
+ TQString::fromLatin1("FAZ.de"),
+ TQString::fromLatin1("http://www.faz.net/s/Rub/Tpl~Epartner~SRss_.xml"),
+ TQString::fromLatin1("http://www.faz.net/favicon.ico"),
+ NewsSourceBase::Magazines, 10, true, false, TQString::fromLatin1("de")),
// Recreation
NewsSourceBase::Data(
- QString::fromLatin1("Segfault"),
- QString::fromLatin1("http://segfault.org/stories.xml"),
- QString::fromLatin1("http://segfault.org/favicon.ico"),
+ TQString::fromLatin1("Segfault"),
+ TQString::fromLatin1("http://segfault.org/stories.xml"),
+ TQString::fromLatin1("http://segfault.org/favicon.ico"),
NewsSourceBase::Recreation, 10, false, false),
// Society
NewsSourceBase::Data(
- QString::fromLatin1("nippon.it"),
- QString::fromLatin1("http://www.nippon.it/backend.it.php"),
- QString::fromLatin1("http://www.nippon.it/favicon.ico"),
- NewsSourceBase::Society, 10, false, false, QString::fromLatin1("it")),
+ TQString::fromLatin1("nippon.it"),
+ TQString::fromLatin1("http://www.nippon.it/backend.it.php"),
+ TQString::fromLatin1("http://www.nippon.it/favicon.ico"),
+ NewsSourceBase::Society, 10, false, false, TQString::fromLatin1("it")),
NewsSourceBase::Data(
- QString::fromLatin1( "gflash" ),
- QString::fromLatin1( "http://www.gflash.de/backend.php"),
- QString::fromLatin1( "http://www.gflash.de/favicon.ico"),
- NewsSourceBase::Society, 10, false, false, QString::fromLatin1( "de" ) ),
+ TQString::fromLatin1( "gflash" ),
+ TQString::fromLatin1( "http://www.gflash.de/backend.php"),
+ TQString::fromLatin1( "http://www.gflash.de/favicon.ico"),
+ NewsSourceBase::Society, 10, false, false, TQString::fromLatin1( "de" ) ),
NewsSourceBase::Data(
- QString::fromLatin1( "Quintessenz" ),
- QString::fromLatin1( "http://quintessenz.at/cgi-bin/rdf"),
- QString::fromLatin1( "http://quintessenz.at/favicon.ico"),
- NewsSourceBase::Society, 9, false, false, QString::fromLatin1( "de" ) )
+ TQString::fromLatin1( "Quintessenz" ),
+ TQString::fromLatin1( "http://quintessenz.at/cgi-bin/rdf"),
+ TQString::fromLatin1( "http://quintessenz.at/favicon.ico"),
+ NewsSourceBase::Society, 9, false, false, TQString::fromLatin1( "de" ) )
};
-ArticleFilter::ArticleFilter(const QString &action, const QString &newsSource,
- const QString &condition, const QString &expression, bool enabled)
+ArticleFilter::ArticleFilter(const TQString &action, const TQString &newsSource,
+ const TQString &condition, const TQString &expression, bool enabled)
: m_action(action),
m_newsSource(newsSource),
m_condition(condition),
@@ -387,7 +387,7 @@ bool ArticleFilter::matches(Article::Ptr a) const
else if (condition() == i18n("do not equal"))
matches = (a->headline() != expression());
else { // condition() == i18n("match")
- QRegExp regexp = QRegExp(expression());
+ TQRegExp regexp = TQRegExp(expression());
matches = regexp.exactMatch(a->headline());
}
@@ -398,7 +398,7 @@ bool ArticleFilter::matches(Article::Ptr a) const
}
ConfigAccess::ConfigAccess()
- : m_defaultCfg(new KConfig(QString::null, true, false))
+ : m_defaultCfg(new KConfig(TQString::null, true, false))
{
m_cfg = m_defaultCfg;
}
@@ -436,13 +436,13 @@ void ConfigAccess::setMouseWheelSpeed(const unsigned int mouseWheelSpeed)
m_cfg->sync();
}
-QFont ConfigAccess::font() const
+TQFont ConfigAccess::font() const
{
- QFont font = KGlobalSettings::fixedFont();
+ TQFont font = KGlobalSettings::fixedFont();
return m_cfg->readFontEntry("Font", &font);
}
-void ConfigAccess::setFont(const QFont &font)
+void ConfigAccess::setFont(const TQFont &font)
{
m_cfg->writeEntry("Font", font);
m_cfg->sync();
@@ -481,9 +481,9 @@ void ConfigAccess::setOfflineMode(bool offlineMode)
m_cfg->sync();
}
-QStringList ConfigAccess::newsSources() const
+TQStringList ConfigAccess::newsSources() const
{
- QStringList tempList = m_cfg->readListEntry("News sources");
+ TQStringList tempList = m_cfg->readListEntry("News sources");
if (tempList.isEmpty())
for (unsigned int i = 0; i < DEFAULT_NEWSSOURCES; i++)
tempList << NewsSourceDefault[i].name;
@@ -495,7 +495,7 @@ ArticleFilter::List ConfigAccess::filters() const
return m_cfg->readIntListEntry("Filters");
}
-void ConfigAccess::setNewsSources(const QStringList &newsSources)
+void ConfigAccess::setNewsSources(const TQStringList &newsSources)
{
m_cfg->writeEntry("News sources", newsSources);
m_cfg->sync();
@@ -529,34 +529,34 @@ void ConfigAccess::setScrollingDirection(const unsigned int scrollingDirection)
m_cfg->sync();
}
-QColor ConfigAccess::foregroundColor() const
+TQColor ConfigAccess::foregroundColor() const
{
return m_cfg->readColorEntry("Foreground color", &Qt::black);
}
-void ConfigAccess::setForegroundColor(const QColor &foregroundColor)
+void ConfigAccess::setForegroundColor(const TQColor &foregroundColor)
{
m_cfg->writeEntry("Foreground color", foregroundColor);
m_cfg->sync();
}
-QColor ConfigAccess::backgroundColor() const
+TQColor ConfigAccess::backgroundColor() const
{
return m_cfg->readColorEntry("Background color", &Qt::white);
}
-void ConfigAccess::setBackgroundColor(const QColor &backgroundColor)
+void ConfigAccess::setBackgroundColor(const TQColor &backgroundColor)
{
m_cfg->writeEntry("Background color", backgroundColor);
m_cfg->sync();
}
-QColor ConfigAccess::highlightedColor() const
+TQColor ConfigAccess::highlightedColor() const
{
return m_cfg->readColorEntry("Highlighted color", &Qt::red);
}
-void ConfigAccess::setHighlightedColor(const QColor &highlightedColor)
+void ConfigAccess::setHighlightedColor(const TQColor &highlightedColor)
{
m_cfg->writeEntry("Highlighted color", highlightedColor);
m_cfg->sync();
@@ -573,7 +573,7 @@ void ConfigAccess::setUnderlineHighlighted(bool underlineHighlighted)
m_cfg->sync();
}
-NewsSourceBase *ConfigAccess::newsSource(const QString &newsSource)
+NewsSourceBase *ConfigAccess::newsSource(const TQString &newsSource)
{
NewsSourceBase::Data nsd;
@@ -587,13 +587,13 @@ NewsSourceBase *ConfigAccess::newsSource(const QString &newsSource)
nsd.icon = m_cfg->readEntry("Icon");
nsd.maxArticles = m_cfg->readNumEntry("Max articles", 10);
nsd.enabled = m_cfg->readBoolEntry("Enabled", true);
- nsd.language = m_cfg->readEntry("Language", QString::fromLatin1("C"));
+ nsd.language = m_cfg->readEntry("Language", TQString::fromLatin1("C"));
m_cfg->setGroup("KNewsTicker");
} else for (unsigned int i = 0; i < DEFAULT_NEWSSOURCES; i++)
if (NewsSourceDefault[i].name == newsSource) {
nsd = NewsSourceDefault[i];
if (nsd.enabled)
- nsd.enabled = (nsd.language == QString::fromLatin1("C") ||
+ nsd.enabled = (nsd.language == TQString::fromLatin1("C") ||
KGlobal::locale()->languageList().contains(nsd.language));
break;
}
@@ -611,8 +611,8 @@ ArticleFilter ConfigAccess::filter(const unsigned int filterNo) const
ArticleFilter f;
f.setId(filterNo);
- if (m_cfg->hasGroup(QString::fromLatin1("Filter #%1").arg(filterNo))) {
- m_cfg->setGroup(QString::fromLatin1("Filter #%1").arg(filterNo));
+ if (m_cfg->hasGroup(TQString::fromLatin1("Filter #%1").arg(filterNo))) {
+ m_cfg->setGroup(TQString::fromLatin1("Filter #%1").arg(filterNo));
f.setAction(m_cfg->readEntry("Action", i18n("Show")));
f.setNewsSource(m_cfg->readEntry("News source", i18n("all news sources")));
f.setCondition(m_cfg->readEntry("Condition", i18n("contain")));
@@ -640,7 +640,7 @@ void ConfigAccess::setNewsSource(const NewsSourceBase::Data &ns)
void ConfigAccess::setFilter(const ArticleFilter &f)
{
- m_cfg->setGroup(QString::fromLatin1("Filter #%1").arg(f.id()));
+ m_cfg->setGroup(TQString::fromLatin1("Filter #%1").arg(f.id()));
m_cfg->writeEntry("Action", f.action());
m_cfg->writeEntry("News source", f.newsSource());
m_cfg->writeEntry("Condition", f.condition());
diff --git a/knewsticker/common/configaccess.h b/knewsticker/common/configaccess.h
index 3cdf80e5..8d2c8a50 100644
--- a/knewsticker/common/configaccess.h
+++ b/knewsticker/common/configaccess.h
@@ -18,8 +18,8 @@
#include <kio/job.h>
#include <klocale.h>
-#include <qpixmap.h>
-#include <qvaluelist.h>
+#include <tqpixmap.h>
+#include <tqvaluelist.h>
#define DEFAULT_NEWSSOURCES 63
#define DEFAULT_SUBJECTS 13
@@ -30,25 +30,25 @@ class KURL;
class ArticleFilter {
public:
- typedef QValueList<int> List;
+ typedef TQValueList<int> List;
- ArticleFilter(const QString & = I18N_NOOP(QString::fromLatin1("Show")),
- const QString & = I18N_NOOP(QString::fromLatin1("all newssources")),
- const QString & = I18N_NOOP(QString::fromLatin1("contain")),
- const QString & = QString::null,
+ ArticleFilter(const TQString & = I18N_NOOP(TQString::fromLatin1("Show")),
+ const TQString & = I18N_NOOP(TQString::fromLatin1("all newssources")),
+ const TQString & = I18N_NOOP(TQString::fromLatin1("contain")),
+ const TQString & = TQString::null,
bool = true);
- QString action() const { return m_action; }
- void setAction(const QString &action) { m_action = action; }
+ TQString action() const { return m_action; }
+ void setAction(const TQString &action) { m_action = action; }
- QString newsSource() const { return m_newsSource; }
- void setNewsSource(const QString &newsSource) { m_newsSource = newsSource; }
+ TQString newsSource() const { return m_newsSource; }
+ void setNewsSource(const TQString &newsSource) { m_newsSource = newsSource; }
- QString condition() const { return m_condition; }
- void setCondition(const QString &condition) { m_condition = condition; }
+ TQString condition() const { return m_condition; }
+ void setCondition(const TQString &condition) { m_condition = condition; }
- QString expression() const { return m_expression; }
- void setExpression(const QString &expression) { m_expression = expression; }
+ TQString expression() const { return m_expression; }
+ void setExpression(const TQString &expression) { m_expression = expression; }
bool enabled() const { return m_enabled; }
void setEnabled(bool enabled) { m_enabled = enabled; }
@@ -59,10 +59,10 @@ class ArticleFilter {
bool matches(Article::Ptr) const;
private:
- QString m_action;
- QString m_newsSource;
- QString m_condition;
- QString m_expression;
+ TQString m_action;
+ TQString m_newsSource;
+ TQString m_condition;
+ TQString m_expression;
bool m_enabled;
unsigned int m_id;
};
@@ -84,12 +84,12 @@ class ConfigAccess : public ConfigIface
virtual bool underlineHighlighted() const;
virtual bool showIcons() const;
virtual bool slowedScrolling() const;
- virtual QColor foregroundColor() const;
- virtual QColor backgroundColor() const;
- virtual QColor highlightedColor() const;
- QFont font() const;
- virtual QStringList newsSources() const;
- NewsSourceBase *newsSource(const QString &);
+ virtual TQColor foregroundColor() const;
+ virtual TQColor backgroundColor() const;
+ virtual TQColor highlightedColor() const;
+ TQFont font() const;
+ virtual TQStringList newsSources() const;
+ NewsSourceBase *newsSource(const TQString &);
ArticleFilter::List filters() const;
ArticleFilter filter(const unsigned int) const;
@@ -117,11 +117,11 @@ class ConfigAccess : public ConfigIface
virtual void setUnderlineHighlighted(bool);
virtual void setShowIcons(bool);
virtual void setSlowedScrolling(bool);
- virtual void setForegroundColor(const QColor &);
- virtual void setBackgroundColor(const QColor &);
- virtual void setHighlightedColor(const QColor &);
- void setFont(const QFont &);
- virtual void setNewsSources(const QStringList &);
+ virtual void setForegroundColor(const TQColor &);
+ virtual void setBackgroundColor(const TQColor &);
+ virtual void setHighlightedColor(const TQColor &);
+ void setFont(const TQFont &);
+ virtual void setNewsSources(const TQStringList &);
void setNewsSource(const NewsSourceBase::Data &);
void setFilters(const ArticleFilter::List &);
void setFilter(const ArticleFilter &);
diff --git a/knewsticker/common/configiface.h b/knewsticker/common/configiface.h
index 64bc312d..e5f425c9 100644
--- a/knewsticker/common/configiface.h
+++ b/knewsticker/common/configiface.h
@@ -32,10 +32,10 @@ class ConfigIface
virtual bool underlineHighlighted() const = 0;
virtual bool showIcons() const = 0;
virtual bool slowedScrolling() const = 0;
- virtual QColor foregroundColor() const = 0;
- virtual QColor backgroundColor() const = 0;
- virtual QColor highlightedColor() const = 0;
- virtual QStringList newsSources() const = 0;
+ virtual TQColor foregroundColor() const = 0;
+ virtual TQColor backgroundColor() const = 0;
+ virtual TQColor highlightedColor() const = 0;
+ virtual TQStringList newsSources() const = 0;
virtual void setInterval(const unsigned int) = 0;
virtual void setScrollingSpeed(const unsigned int) = 0;
@@ -47,10 +47,10 @@ class ConfigIface
virtual void setUnderlineHighlighted(bool) = 0;
virtual void setShowIcons(bool) = 0;
virtual void setSlowedScrolling(bool) = 0;
- virtual void setForegroundColor(const QColor &) = 0;
- virtual void setBackgroundColor(const QColor &) = 0;
- virtual void setHighlightedColor(const QColor &) = 0;
- virtual void setNewsSources(const QStringList &) = 0;
+ virtual void setForegroundColor(const TQColor &) = 0;
+ virtual void setBackgroundColor(const TQColor &) = 0;
+ virtual void setHighlightedColor(const TQColor &) = 0;
+ virtual void setNewsSources(const TQStringList &) = 0;
};
#endif // CONFIGIFACE_H
diff --git a/knewsticker/common/newsengine.cpp b/knewsticker/common/newsengine.cpp
index cce7895c..a283a68b 100644
--- a/knewsticker/common/newsengine.cpp
+++ b/knewsticker/common/newsengine.cpp
@@ -21,9 +21,9 @@
#include <krun.h>
#include <kstandarddirs.h>
-#include <qbuffer.h>
+#include <tqbuffer.h>
-Article::Article(NewsSourceBase *parent, const QString &headline,
+Article::Article(NewsSourceBase *parent, const TQString &headline,
const KURL &address)
: XMLNewsArticle(headline, address),
m_parent(parent),
@@ -45,22 +45,22 @@ void Article::open()
NewsSourceBase::NewsSourceBase(const Data &nsd, ConfigIface *config)
: XMLNewsSource(),
m_data(nsd),
- m_icon(QPixmap()),
+ m_icon(TQPixmap()),
m_cfg(dynamic_cast<ConfigAccess *>(config)),
m_newsIconMgr(NewsIconMgr::self())
{
- connect(this, SIGNAL(loadComplete(XMLNewsSource *, bool)),
- SLOT(slotProcessArticles(XMLNewsSource *, bool)));
+ connect(this, TQT_SIGNAL(loadComplete(XMLNewsSource *, bool)),
+ TQT_SLOT(slotProcessArticles(XMLNewsSource *, bool)));
}
void NewsSourceBase::getIcon()
{
- connect(m_newsIconMgr, SIGNAL(gotIcon(const KURL &, const QPixmap &)),
- this, SLOT(slotGotIcon(const KURL &, const QPixmap &)));
+ connect(m_newsIconMgr, TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)),
+ this, TQT_SLOT(slotGotIcon(const KURL &, const TQPixmap &)));
m_newsIconMgr->getIcon( KURL( m_data.icon ) );
}
-QString NewsSourceBase::newsSourceName() const
+TQString NewsSourceBase::newsSourceName() const
{
if (m_cfg->customNames() || m_name.isEmpty())
return m_data.name;
@@ -68,7 +68,7 @@ QString NewsSourceBase::newsSourceName() const
return m_name;
}
-QString NewsSourceBase::subjectText(const Subject subject)
+TQString NewsSourceBase::subjectText(const Subject subject)
{
switch (subject) {
case Arts: return i18n("Arts");
@@ -144,7 +144,7 @@ void NewsSourceBase::slotProcessArticles(XMLNewsSource *, bool gotEm)
emit newNewsAvailable(this, oldArticles != m_articles);
}
-Article::Ptr NewsSourceBase::article(const QString &headline)
+Article::Ptr NewsSourceBase::article(const TQString &headline)
{
Article::List::ConstIterator it = m_articles.begin();
Article::List::ConstIterator end = m_articles.end();
@@ -155,13 +155,13 @@ Article::Ptr NewsSourceBase::article(const QString &headline)
return 0L;
}
-void NewsSourceBase::slotGotIcon(const KURL &url, const QPixmap &pixmap)
+void NewsSourceBase::slotGotIcon(const KURL &url, const TQPixmap &pixmap)
{
if (url.url() == m_data.icon) {
m_icon = pixmap;
- disconnect(m_newsIconMgr, SIGNAL(gotIcon(const KURL &, const QPixmap &)),
- this, SLOT(slotGotIcon(const KURL &, const QPixmap &)));
+ disconnect(m_newsIconMgr, TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)),
+ this, TQT_SLOT(slotGotIcon(const KURL &, const TQPixmap &)));
}
}
@@ -181,10 +181,10 @@ ProgramNewsSource::ProgramNewsSource(const NewsSourceBase::Data &nsd,
m_program(new KProcess()),
m_programOutput(0)
{
- connect(m_program, SIGNAL(processExited(KProcess *)),
- SLOT(slotProgramExited(KProcess *)));
- connect(m_program, SIGNAL(receivedStdout(KProcess *, char *, int)),
- SLOT(slotGotProgramOutput(KProcess *, char *, int)));
+ connect(m_program, TQT_SIGNAL(processExited(KProcess *)),
+ TQT_SLOT(slotProgramExited(KProcess *)));
+ connect(m_program, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
+ TQT_SLOT(slotGotProgramOutput(KProcess *, char *, int)));
m_data.sourceFile = KURL(m_data.sourceFile).encodedPathAndQuery();
}
@@ -213,7 +213,7 @@ void ProgramNewsSource::slotProgramExited(KProcess *proc)
{
bool okSoFar = true;
- QString errorMsg;
+ TQString errorMsg;
if (!proc->normalExit()) {
errorMsg = i18n("<p>The program '%1' was terminated abnormally.<br>This can"
@@ -228,9 +228,9 @@ void ProgramNewsSource::slotProgramExited(KProcess *proc)
}
if (!okSoFar) {
- QString output = QString(m_programOutput->buffer());
+ TQString output = TQString(m_programOutput->buffer());
if (!output.isEmpty()) {
- output = QString::fromLatin1("\"") + output + QString::fromLatin1("\"");
+ output = TQString::fromLatin1("\"") + output + TQString::fromLatin1("\"");
errorMsg += i18n("<p>Program output:<br>%1<br>").arg(output);
}
KMessageBox::detailedError(0, i18n("An error occurred while updating the"
@@ -244,7 +244,7 @@ void ProgramNewsSource::slotProgramExited(KProcess *proc)
m_programOutput = 0;
}
-QString ProgramNewsSource::errorMessage(const ErrorCode errorCode)
+TQString ProgramNewsSource::errorMessage(const ErrorCode errorCode)
{
switch (errorCode) {
case EPERM: return i18n("The program '%1' could not be started at all.");
diff --git a/knewsticker/common/newsengine.h b/knewsticker/common/newsengine.h
index 342dd7fe..430efff7 100644
--- a/knewsticker/common/newsengine.h
+++ b/knewsticker/common/newsengine.h
@@ -18,9 +18,9 @@
#include "configiface.h"
#include "xmlnewsaccess.h"
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qpixmap.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqpixmap.h>
#include <kio/job.h>
#include <klocale.h>
@@ -40,9 +40,9 @@ class KDE_EXPORT Article : public XMLNewsArticle, public KShared
{
public:
typedef KSharedPtr<Article> Ptr;
- typedef QValueList<Ptr> List;
+ typedef TQValueList<Ptr> List;
- Article(NewsSourceBase *, const QString & = QString::null,
+ Article(NewsSourceBase *, const TQString & = TQString::null,
const KURL & = KURL());
bool operator==(const Article &other) const;
@@ -68,13 +68,13 @@ class KDE_EXPORT NewsSourceBase : public XMLNewsSource, public KShared
Reference, Science, Shopping, Society, Sports, Misc, Magazines
};
struct Data {
- Data(const QString &_name = I18N_NOOP("Unknown"),
- const QString &_sourceFile = QString::null,
- const QString &_icon = QString::null,
+ Data(const TQString &_name = I18N_NOOP("Unknown"),
+ const TQString &_sourceFile = TQString::null,
+ const TQString &_icon = TQString::null,
const Subject _subject = Computers,
unsigned int _maxArticles = 10,
bool _enabled = true, bool _isProgram = false,
- const QString &_language = QString::fromLatin1("C"))
+ const TQString &_language = TQString::fromLatin1("C"))
{
name = _name;
sourceFile = _sourceFile;
@@ -86,32 +86,32 @@ class KDE_EXPORT NewsSourceBase : public XMLNewsSource, public KShared
language = _language;
}
- QString name;
- QString sourceFile;
- QString icon;
+ TQString name;
+ TQString sourceFile;
+ TQString icon;
Subject subject;
unsigned int maxArticles;
bool enabled;
bool isProgram;
- QString language;
+ TQString language;
};
typedef KSharedPtr<NewsSourceBase> Ptr;
- typedef QValueList<Ptr> List;
+ typedef TQValueList<Ptr> List;
NewsSourceBase(const Data &, ConfigIface *);
- virtual QString newsSourceName() const;
- QString sourceFile() const { return m_data.sourceFile; }
+ virtual TQString newsSourceName() const;
+ TQString sourceFile() const { return m_data.sourceFile; }
unsigned int maxArticles() const { return m_data.maxArticles; }
- QPixmap icon() const { return m_icon; }
+ TQPixmap icon() const { return m_icon; }
void getIcon();
Data data() const { return m_data; }
Article::List articles() const { return m_articles; }
- Article::Ptr article(const QString &);
+ Article::Ptr article(const TQString &);
- static QString subjectText(const Subject);
+ static TQString subjectText(const Subject);
signals:
void newNewsAvailable(const NewsSourceBase::Ptr &, bool);
@@ -122,11 +122,11 @@ class KDE_EXPORT NewsSourceBase : public XMLNewsSource, public KShared
protected slots:
void slotProcessArticles(XMLNewsSource *, bool);
- void slotGotIcon(const KURL &, const QPixmap &);
+ void slotGotIcon(const KURL &, const TQPixmap &);
protected:
Data m_data;
- QPixmap m_icon;
+ TQPixmap m_icon;
ConfigAccess *m_cfg;
NewsIconMgr *m_newsIconMgr;
Article::List m_articles;
@@ -194,10 +194,10 @@ class KDE_EXPORT ProgramNewsSource : public NewsSourceBase
void slotProgramExited(KProcess *);
private:
- static QString errorMessage(const ErrorCode);
+ static TQString errorMessage(const ErrorCode);
KProcess *m_program;
- QBuffer *m_programOutput;
+ TQBuffer *m_programOutput;
};
#endif // NEWSENGINE_H
diff --git a/knewsticker/common/newsiconmgr.cpp b/knewsticker/common/newsiconmgr.cpp
index 69617490..b6787dff 100644
--- a/knewsticker/common/newsiconmgr.cpp
+++ b/knewsticker/common/newsiconmgr.cpp
@@ -16,15 +16,15 @@
#include <kiconloader.h>
#include <kstandarddirs.h>
-#include <qbuffer.h>
-#include <qfile.h>
-#include <qimage.h>
+#include <tqbuffer.h>
+#include <tqfile.h>
+#include <tqimage.h>
struct KIODownload
{
KURL url;
- QByteArray data;
- QIODevice::Offset dataOffset;
+ TQByteArray data;
+ TQIODevice::Offset dataOffset;
};
NewsIconMgr *NewsIconMgr::m_instance = 0;
@@ -37,13 +37,13 @@ NewsIconMgr *NewsIconMgr::self()
return m_instance;
}
-NewsIconMgr::NewsIconMgr(QObject *parent, const char *name)
- : QObject(parent, name), DCOPObject("NewsIconMgr"),
- m_stdIcon(SmallIcon(QString::fromLatin1("news")))
+NewsIconMgr::NewsIconMgr(TQObject *parent, const char *name)
+ : TQObject(parent, name), DCOPObject("NewsIconMgr"),
+ m_stdIcon(SmallIcon(TQString::fromLatin1("news")))
{
connectDCOPSignal("kded",
- "favicons", "iconChanged(bool, QString, QString)",
- "slotGotIcon(bool, QString, QString)",
+ "favicons", "iconChanged(bool, TQString, TQString)",
+ "slotGotIcon(bool, TQString, TQString)",
false);
}
@@ -60,11 +60,11 @@ void NewsIconMgr::getIcon(const KURL &url)
}
if (url.isLocalFile()) {
- if (QFile::exists(url.encodedPathAndQuery())) {
- QPixmap icon(url.encodedPathAndQuery());
+ if (TQFile::exists(url.encodedPathAndQuery())) {
+ TQPixmap icon(url.encodedPathAndQuery());
if (!icon.isNull()) {
- if (icon.size() != QSize(16, 16)) {
- if (!icon.convertFromImage(icon.convertToImage().smoothScale(16, 16, QImage::ScaleMin))) {
+ if (icon.size() != TQSize(16, 16)) {
+ if (!icon.convertFromImage(icon.convertToImage().smoothScale(16, 16, TQImage::ScaleMin))) {
emit gotIcon(url, m_stdIcon);
return;
}
@@ -79,19 +79,19 @@ void NewsIconMgr::getIcon(const KURL &url)
if (url.encodedPathAndQuery() == "/favicon.ico") {
if (favicon(url).isNull()) {
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
ds << url;
kapp->dcopClient()->send("kded", "favicons", "downloadHostIcon(KURL)", data);
} else {
- emit gotIcon(url, QPixmap(KGlobal::dirs()->findResource("cache",
- QString::fromLatin1("favicons/%1.png").arg(url.host()))));
+ emit gotIcon(url, TQPixmap(KGlobal::dirs()->findResource("cache",
+ TQString::fromLatin1("favicons/%1.png").arg(url.host()))));
}
} else {
KIO::Job *job = KIO::get(url, true, false);
- connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- SLOT(slotData(KIO::Job *, const QByteArray &)));
- connect(job, SIGNAL(result(KIO::Job *)), SLOT(slotResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *)));
KIODownload download;
download.url = url;
@@ -100,7 +100,7 @@ void NewsIconMgr::getIcon(const KURL &url)
}
}
-bool NewsIconMgr::isStdIcon(const QPixmap &pixmap) const
+bool NewsIconMgr::isStdIcon(const TQPixmap &pixmap) const
{
if (!pixmap.isNull())
return pixmap.convertToImage() == m_stdIcon.convertToImage();
@@ -108,9 +108,9 @@ bool NewsIconMgr::isStdIcon(const QPixmap &pixmap) const
return false;
}
-void NewsIconMgr::slotData(KIO::Job *job, const QByteArray &data)
+void NewsIconMgr::slotData(KIO::Job *job, const TQByteArray &data)
{
- QBuffer buf(m_kioDownload[job].data);
+ TQBuffer buf(m_kioDownload[job].data);
buf.open(IO_WriteOnly);
buf.at(m_kioDownload[job].dataOffset);
buf.writeBlock(data);
@@ -119,41 +119,41 @@ void NewsIconMgr::slotData(KIO::Job *job, const QByteArray &data)
void NewsIconMgr::slotResult(KIO::Job *job)
{
- emit gotIcon(m_kioDownload[job].url, QPixmap(m_kioDownload[job].data));
+ emit gotIcon(m_kioDownload[job].url, TQPixmap(m_kioDownload[job].data));
m_kioDownload.remove(job);
}
-void NewsIconMgr::slotGotIcon(bool isHost, QString hostOrURL, QString iconName)
+void NewsIconMgr::slotGotIcon(bool isHost, TQString hostOrURL, TQString iconName)
{
KURL url = KURL(hostOrURL);
if (!isHost)
- url.setProtocol(QString::fromLatin1("http"));
+ url.setProtocol(TQString::fromLatin1("http"));
if (iconName.isNull())
emit gotIcon(url, m_stdIcon);
else
- emit gotIcon(url, QPixmap(KGlobal::dirs()->findResource("cache",
- QString::fromLatin1("favicons/%1.png").arg(url.host()))));
+ emit gotIcon(url, TQPixmap(KGlobal::dirs()->findResource("cache",
+ TQString::fromLatin1("favicons/%1.png").arg(url.host()))));
}
-QString NewsIconMgr::favicon(const KURL &url) const
+TQString NewsIconMgr::favicon(const KURL &url) const
{
- QByteArray data, reply;
- QCString replyType;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data, reply;
+ TQCString replyType;
+ TQDataStream ds(data, IO_WriteOnly);
ds << url;
kapp->dcopClient()->call("kded", "favicons", "iconForURL(KURL)", data, replyType, reply);
- if (replyType == "QString") {
- QDataStream replyStream(reply, IO_ReadOnly);
- QString result;
+ if (replyType == "TQString") {
+ TQDataStream replyStream(reply, IO_ReadOnly);
+ TQString result;
replyStream >> result;
return result;
}
- return QString::null;
+ return TQString::null;
}
#include "newsiconmgr.moc"
diff --git a/knewsticker/common/newsiconmgr.h b/knewsticker/common/newsiconmgr.h
index e4c6b657..30071155 100644
--- a/knewsticker/common/newsiconmgr.h
+++ b/knewsticker/common/newsiconmgr.h
@@ -11,8 +11,8 @@
#ifndef NEWSICONMGR_H
#define NEWSICONMGR_H
-#include <qobject.h>
-#include <qpixmap.h>
+#include <tqobject.h>
+#include <tqpixmap.h>
#include <dcopobject.h>
#include <kio/job.h>
@@ -21,9 +21,9 @@
class DCOPClient;
struct KIODownload;
-typedef QMap<KIO::Job *, KIODownload> KIODownloadMap;
+typedef TQMap<KIO::Job *, KIODownload> KIODownloadMap;
-class NewsIconMgr : public QObject, public DCOPObject
+class NewsIconMgr : public TQObject, public DCOPObject
{
Q_OBJECT
K_DCOP
@@ -32,26 +32,26 @@ class NewsIconMgr : public QObject, public DCOPObject
static NewsIconMgr *self();
void getIcon(const KURL &);
- bool isStdIcon(const QPixmap &) const;
+ bool isStdIcon(const TQPixmap &) const;
k_dcop:
- void slotGotIcon(bool, QString, QString);
+ void slotGotIcon(bool, TQString, TQString);
signals:
- void gotIcon(const KURL &, const QPixmap &);
+ void gotIcon(const KURL &, const TQPixmap &);
protected:
- NewsIconMgr(QObject * = 0L, const char * = 0L);
+ NewsIconMgr(TQObject * = 0L, const char * = 0L);
~NewsIconMgr();
private slots:
- void slotData(KIO::Job *, const QByteArray &);
+ void slotData(KIO::Job *, const TQByteArray &);
void slotResult(KIO::Job *);
private:
- QString favicon(const KURL &) const;
+ TQString favicon(const KURL &) const;
- QPixmap m_stdIcon;
+ TQPixmap m_stdIcon;
KIODownloadMap m_kioDownload;
static NewsIconMgr *m_instance;
diff --git a/knewsticker/common/xmlnewsaccess.cpp b/knewsticker/common/xmlnewsaccess.cpp
index 1c892e8e..b8998e0c 100644
--- a/knewsticker/common/xmlnewsaccess.cpp
+++ b/knewsticker/common/xmlnewsaccess.cpp
@@ -14,11 +14,11 @@
#include <kdebug.h>
#include <kglobal.h>
-#include <qbuffer.h>
-#include <qdom.h>
-#include <qregexp.h>
+#include <tqbuffer.h>
+#include <tqdom.h>
+#include <tqregexp.h>
-XMLNewsArticle::XMLNewsArticle(const QString &headline, const KURL &address)
+XMLNewsArticle::XMLNewsArticle(const TQString &headline, const KURL &address)
: m_headline(headline),
m_address(address)
{
@@ -36,10 +36,10 @@ bool XMLNewsArticle::operator==(const XMLNewsArticle &a)
return m_headline == a.headline() && m_address == a.address();
}
-XMLNewsSource::XMLNewsSource() : QObject(),
- m_name(QString::null),
- m_link(QString::null),
- m_description(QString::null),
+XMLNewsSource::XMLNewsSource() : TQObject(),
+ m_name(TQString::null),
+ m_link(TQString::null),
+ m_description(TQString::null),
m_downloadData(0)
{
}
@@ -60,14 +60,14 @@ void XMLNewsSource::loadFrom(const KURL &url)
m_downloadData->open(IO_WriteOnly);
KIO::Job *job = KIO::get(url, false, false);
- job->addMetaData(QString::fromLatin1("UserAgent"),
- QString::fromLatin1("KNewsTicker v0.2"));
- connect(job, SIGNAL(data(KIO::Job *, const QByteArray &)),
- SLOT(slotData(KIO::Job *, const QByteArray &)));
- connect(job, SIGNAL(result(KIO::Job *)), SLOT(slotResult(KIO::Job *)));
+ job->addMetaData(TQString::fromLatin1("UserAgent"),
+ TQString::fromLatin1("KNewsTicker v0.2"));
+ connect(job, TQT_SIGNAL(data(KIO::Job *, const TQByteArray &)),
+ TQT_SLOT(slotData(KIO::Job *, const TQByteArray &)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_SLOT(slotResult(KIO::Job *)));
}
-void XMLNewsSource::slotData(KIO::Job *, const QByteArray &data)
+void XMLNewsSource::slotData(KIO::Job *, const TQByteArray &data)
{
m_downloadData->writeBlock(data.data(), data.size());
}
@@ -80,7 +80,7 @@ void XMLNewsSource::slotResult(KIO::Job *job)
m_downloadData = 0;
}
-void XMLNewsSource::processData(const QByteArray &data, bool okSoFar)
+void XMLNewsSource::processData(const TQByteArray &data, bool okSoFar)
{
bool validContent = okSoFar;
kdDebug(5005) << "XMLNewsSource::processData(): validContent = " << validContent << endl;
@@ -90,7 +90,7 @@ void XMLNewsSource::processData(const QByteArray &data, bool okSoFar)
* Some servers prepend whitespace before the <?xml...?> declaration.
* Since QDom doesn't like that we strip this first.
*/
- QDomDocument domDoc;
+ TQDomDocument domDoc;
const char *charData = data.data();
int len = data.count();
@@ -100,25 +100,25 @@ void XMLNewsSource::processData(const QByteArray &data, bool okSoFar)
charData++;
}
- QByteArray tmpData;
+ TQByteArray tmpData;
tmpData.setRawData(charData, len);
if (validContent = domDoc.setContent(tmpData)) {
- QDomNode channelNode = domDoc.documentElement().namedItem(QString::fromLatin1("channel"));
+ TQDomNode channelNode = domDoc.documentElement().namedItem(TQString::fromLatin1("channel"));
- m_name = channelNode.namedItem(QString::fromLatin1("title")).toElement().text().simplifyWhiteSpace();
+ m_name = channelNode.namedItem(TQString::fromLatin1("title")).toElement().text().simplifyWhiteSpace();
kdDebug(5005) << "XMLNewsSource::processData(): Successfully updated " << m_name << endl;
- m_link = channelNode.namedItem(QString::fromLatin1("link")).toElement().text().simplifyWhiteSpace();
- m_description = channelNode.namedItem(QString::fromLatin1("description")).toElement().text().simplifyWhiteSpace();
+ m_link = channelNode.namedItem(TQString::fromLatin1("link")).toElement().text().simplifyWhiteSpace();
+ m_description = channelNode.namedItem(TQString::fromLatin1("description")).toElement().text().simplifyWhiteSpace();
- QDomNodeList items = domDoc.elementsByTagName(QString::fromLatin1("item"));
+ TQDomNodeList items = domDoc.elementsByTagName(TQString::fromLatin1("item"));
m_articles.clear();
- QDomNode itemNode;
- QString headline, address;
+ TQDomNode itemNode;
+ TQString headline, address;
for (unsigned int i = 0; i < items.count(); i++) {
itemNode = items.item(i);
- headline = KCharsets::resolveEntities(itemNode.namedItem(QString::fromLatin1("title")).toElement().text().simplifyWhiteSpace());
- address = KCharsets::resolveEntities(itemNode.namedItem(QString::fromLatin1("link")).toElement().text().simplifyWhiteSpace());
+ headline = KCharsets::resolveEntities(itemNode.namedItem(TQString::fromLatin1("title")).toElement().text().simplifyWhiteSpace());
+ address = KCharsets::resolveEntities(itemNode.namedItem(TQString::fromLatin1("link")).toElement().text().simplifyWhiteSpace());
m_articles.append(XMLNewsArticle(headline, KURL( address )));
}
}
diff --git a/knewsticker/common/xmlnewsaccess.h b/knewsticker/common/xmlnewsaccess.h
index 91cbf77f..46cbab59 100644
--- a/knewsticker/common/xmlnewsaccess.h
+++ b/knewsticker/common/xmlnewsaccess.h
@@ -15,8 +15,8 @@
#include <config.h>
#endif
-#include <qvaluelist.h>
-#include <qobject.h>
+#include <tqvaluelist.h>
+#include <tqobject.h>
#include <kio/job.h>
#include <kurl.h>
@@ -28,15 +28,15 @@ class XMLNewsSource;
class XMLNewsArticle
{
public:
- typedef QValueList<XMLNewsArticle> List;
+ typedef TQValueList<XMLNewsArticle> List;
XMLNewsArticle() {}
- XMLNewsArticle(const QString &headline, const KURL &addresss);
+ XMLNewsArticle(const TQString &headline, const KURL &addresss);
XMLNewsArticle(const XMLNewsArticle &other) { (*this) = other; }
XMLNewsArticle &operator=(const XMLNewsArticle &other);
- QString headline() const { return m_headline; }
- void setHeadline(const QString &headline) { m_headline = headline; }
+ TQString headline() const { return m_headline; }
+ void setHeadline(const TQString &headline) { m_headline = headline; }
KURL address() const { return m_address; }
void setAddress(const KURL &address) { m_address = address; }
@@ -45,7 +45,7 @@ class XMLNewsArticle
bool operator!= (const XMLNewsArticle &a) { return !operator==(a); }
private:
- QString m_headline;
+ TQString m_headline;
KURL m_address;
};
@@ -59,28 +59,28 @@ class XMLNewsSource : public QObject
void loadFrom(const KURL &);
- virtual QString newsSourceName() const { return m_name; }
- virtual QString link() const { return m_link; }
- virtual QString description() const { return m_description; }
+ virtual TQString newsSourceName() const { return m_name; }
+ virtual TQString link() const { return m_link; }
+ virtual TQString description() const { return m_description; }
const XMLNewsArticle::List &articles() const { return m_articles; }
signals:
void loadComplete(XMLNewsSource *, bool);
protected:
- void processData(const QByteArray &, bool = true);
+ void processData(const TQByteArray &, bool = true);
- QString m_name;
- QString m_link;
- QString m_description;
+ TQString m_name;
+ TQString m_link;
+ TQString m_description;
private slots:
- void slotData(KIO::Job *, const QByteArray &);
+ void slotData(KIO::Job *, const TQByteArray &);
void slotResult(KIO::Job *);
private:
XMLNewsArticle::List m_articles;
- QBuffer *m_downloadData;
+ TQBuffer *m_downloadData;
};
#endif // XMLNEWSACCESS_H
diff --git a/knewsticker/knewsticker.cpp b/knewsticker/knewsticker.cpp
index 6d2f90cb..9b15f5da 100644
--- a/knewsticker/knewsticker.cpp
+++ b/knewsticker/knewsticker.cpp
@@ -27,36 +27,36 @@
#include <kstandarddirs.h>
#include <kstartupinfo.h>
-#include <qcursor.h>
-#include <qlayout.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+#include <tqcursor.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <dcopclient.h>
-KNewsTicker::KNewsTicker(const QString &cfgFile, Type t, int actions, QWidget *parent, const char *name)
+KNewsTicker::KNewsTicker(const TQString &cfgFile, Type t, int actions, TQWidget *parent, const char *name)
: ConfigIface(), DCOPObject("KNewsTicker"),
KPanelApplet(cfgFile, t, actions, parent, name),
m_instance(new KInstance("knewsticker")),
m_dcopClient(new DCOPClient()),
m_cfg(new ConfigAccess(config())),
- m_newsTimer(new QTimer(this)),
- m_updateTimer(new QTimer(this)),
+ m_newsTimer(new TQTimer(this)),
+ m_updateTimer(new TQTimer(this)),
m_newsIconMgr(NewsIconMgr::self()),
m_aboutData(new KAboutData("knewsticker", I18N_NOOP("KNewsTicker"), "v0.2",
I18N_NOOP("A news ticker applet."), KAboutData::License_BSD,
I18N_NOOP("(c) 2000, 2001 The KNewsTicker developers")))
{
- QHBoxLayout *layout = new QHBoxLayout(this);
+ TQHBoxLayout *layout = new TQHBoxLayout(this);
m_contextMenu = new KNewsTickerMenu(this);
- connect(m_contextMenu, SIGNAL(aboutToHide()),
- SLOT(slotContextMenuAboutToHide()));
+ connect(m_contextMenu, TQT_SIGNAL(aboutToHide()),
+ TQT_SLOT(slotContextMenuAboutToHide()));
setCustomMenu(m_contextMenu);
m_arrowButton = new KArrowButton(this);
- QToolTip::add(m_arrowButton, i18n("Show menu"));
- connect(m_arrowButton, SIGNAL(clicked()), SLOT(slotArrowButtonPressed()));
+ TQToolTip::add(m_arrowButton, i18n("Show menu"));
+ connect(m_arrowButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotArrowButtonPressed()));
m_arrowButton->setFocusPolicy(NoFocus);
setupArrowButton();
layout->addWidget(m_arrowButton);
@@ -66,12 +66,12 @@ KNewsTicker::KNewsTicker(const QString &cfgFile, Type t, int actions, QWidget *p
m_dcopClient->registerAs("knewsticker", false);
- QToolTip::add(m_scroller, QString::null);
- connect(m_scroller, SIGNAL(contextMenu()), SLOT(slotOpenContextMenu()));
+ TQToolTip::add(m_scroller, TQString::null);
+ connect(m_scroller, TQT_SIGNAL(contextMenu()), TQT_SLOT(slotOpenContextMenu()));
- connect(m_newsTimer, SIGNAL(timeout()), SLOT(slotUpdateNews()));
+ connect(m_newsTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotUpdateNews()));
- connect(m_updateTimer, SIGNAL(timeout()), SLOT(slotNotifyOfFailures()));
+ connect(m_updateTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotNotifyOfFailures()));
m_aboutData->addAuthor("Frerich Raabe", I18N_NOOP("Original author"),
@@ -106,7 +106,7 @@ int KNewsTicker::widthForHeight(int) const
void KNewsTicker::preferences()
{
KNewsTickerConfig dlg(m_cfg, this);
- if (dlg.exec() == QDialog::Accepted) {
+ if (dlg.exec() == TQDialog::Accepted) {
reparseConfig();
}
}
@@ -119,7 +119,7 @@ void KNewsTicker::about()
void KNewsTicker::help()
{
- kapp->invokeHelp(QString::null, QString::fromLatin1("knewsticker"));
+ kapp->invokeHelp(TQString::null, TQString::fromLatin1("knewsticker"));
}
void KNewsTicker::reportBug()
@@ -133,18 +133,18 @@ void KNewsTicker::reparseConfig()
m_cfg->reparseConfiguration();
m_newsSources.clear();
- QStringList newsSources = m_cfg->newsSources();
- QStringList::ConstIterator it = newsSources.begin();
- QStringList::ConstIterator end = newsSources.end();
+ TQStringList newsSources = m_cfg->newsSources();
+ TQStringList::ConstIterator it = newsSources.begin();
+ TQStringList::ConstIterator end = newsSources.end();
for (; it != end; ++it) {
NewsSourceBase::Ptr ns = m_cfg->newsSource((*it));
if (!ns->data().enabled)
continue;
- connect(ns, SIGNAL(newNewsAvailable(const NewsSourceBase::Ptr &, bool)),
- SLOT(slotNewsSourceUpdated(const NewsSourceBase::Ptr &, bool)));
- connect(ns, SIGNAL(invalidInput(const NewsSourceBase::Ptr &)),
- SLOT(slotNewsSourceFailed(const NewsSourceBase::Ptr &)));
+ connect(ns, TQT_SIGNAL(newNewsAvailable(const NewsSourceBase::Ptr &, bool)),
+ TQT_SLOT(slotNewsSourceUpdated(const NewsSourceBase::Ptr &, bool)));
+ connect(ns, TQT_SIGNAL(invalidInput(const NewsSourceBase::Ptr &)),
+ TQT_SLOT(slotNewsSourceFailed(const NewsSourceBase::Ptr &)));
m_newsSources.append(ns);
}
@@ -212,7 +212,7 @@ void KNewsTicker::slotNewsSourceUpdated(const NewsSourceBase::Ptr &ns,
if (m_newNews) {
KNotifyClient::Instance instance(m_instance);
- KNotifyClient::event(winId(), QString::fromLatin1("NewNews"));
+ KNotifyClient::event(winId(), TQString::fromLatin1("NewNews"));
}
}
@@ -222,22 +222,22 @@ void KNewsTicker::slotNewsSourceFailed(const NewsSourceBase::Ptr &ns)
slotNewsSourceUpdated(ns);
}
-void KNewsTicker::mousePressEvent(QMouseEvent *e)
+void KNewsTicker::mousePressEvent(TQMouseEvent *e)
{
- if (e->button() == QMouseEvent::RightButton)
+ if (e->button() == TQMouseEvent::RightButton)
slotOpenContextMenu();
}
void KNewsTicker::slotOpenContextMenu()
{
m_contextMenu->setFullMenu(true);
- m_contextMenu->exec(QCursor::pos());
+ m_contextMenu->exec(TQCursor::pos());
}
void KNewsTicker::slotArrowButtonPressed()
{
- QPoint pos(m_arrowButton->mapToGlobal(QPoint(0, 0)));
- QSize size(m_arrowButton->size());
+ TQPoint pos(m_arrowButton->mapToGlobal(TQPoint(0, 0)));
+ TQSize size(m_arrowButton->size());
if (position() == KPanelApplet::pTop) {
pos.setY(pos.y() + size.height() + 2);
@@ -259,12 +259,12 @@ void KNewsTicker::positionChange(Position)
{
delete layout();
- QBoxLayout *layout;
+ TQBoxLayout *layout;
if (orientation() == Horizontal)
- layout = new QHBoxLayout(this);
+ layout = new TQHBoxLayout(this);
else
- layout = new QVBoxLayout(this);
+ layout = new TQVBoxLayout(this);
if (m_arrowButton) {
layout->addWidget(m_arrowButton);
@@ -283,7 +283,7 @@ void KNewsTicker::slotContextMenuAboutToHide()
void KNewsTicker::slotNotifyOfFailures()
{
KNotifyClient::Instance instance(m_instance);
- QString notification = QString::null;
+ TQString notification = TQString::null;
if (m_failedNewsUpdates.count() == 1)
notification = i18n("<qt>Could not update news site '%1'.<br>"
@@ -292,16 +292,16 @@ void KNewsTicker::slotNotifyOfFailures()
else if (m_failedNewsUpdates.count() > 1 && m_failedNewsUpdates.count() < 8) {
notification = i18n("<qt>The following news sites had problems. Their"
" resource files are probably invalid or broken.<ul>");
- QStringList::ConstIterator it = m_failedNewsUpdates.begin();
- QStringList::ConstIterator end = m_failedNewsUpdates.end();
+ TQStringList::ConstIterator it = m_failedNewsUpdates.begin();
+ TQStringList::ConstIterator end = m_failedNewsUpdates.end();
for (; it != end; ++it)
- notification += QString::fromLatin1("<li>%1</li>").arg(*it);
- notification += QString::fromLatin1("</ul></qt>");
+ notification += TQString::fromLatin1("<li>%1</li>").arg(*it);
+ notification += TQString::fromLatin1("</ul></qt>");
} else
notification = i18n("Failed to update several news"
" sites. The Internet connection might be cut.");
- KNotifyClient::event(winId(), QString::fromLatin1("InvalidRDF"), notification);
+ KNotifyClient::event(winId(), TQString::fromLatin1("InvalidRDF"), notification);
}
void KNewsTicker::setInterval(const uint interval)
@@ -367,19 +367,19 @@ void KNewsTicker::setSlowedScrolling(bool slowedScrolling)
m_cfg->setSlowedScrolling(slowedScrolling);
}
-void KNewsTicker::setForegroundColor(const QColor &foregroundColor)
+void KNewsTicker::setForegroundColor(const TQColor &foregroundColor)
{
m_cfg->setForegroundColor(foregroundColor);
m_scroller->reset(false);
}
-void KNewsTicker::setBackgroundColor(const QColor &backgroundColor)
+void KNewsTicker::setBackgroundColor(const TQColor &backgroundColor)
{
m_cfg->setBackgroundColor(backgroundColor);
m_scroller->reset(false);
}
-void KNewsTicker::setHighlightedColor(const QColor &highlightedColor)
+void KNewsTicker::setHighlightedColor(const TQColor &highlightedColor)
{
m_cfg->setHighlightedColor(highlightedColor);
m_scroller->reset(false);
@@ -417,10 +417,10 @@ void KNewsTickerMenu::populateMenu()
* Perhaps this hardcoded stuff should be replaced by some kind of
* themeing functionality?
*/
- const QPixmap lookIcon = SmallIcon(QString::fromLatin1("viewmag"));
- const QPixmap newArticleIcon = SmallIcon(QString::fromLatin1("info"));
- const QPixmap oldArticleIcon = SmallIcon(QString::fromLatin1("mime_empty"));
- const QPixmap noArticlesIcon = SmallIcon(QString::fromLatin1("remove"));
+ const TQPixmap lookIcon = SmallIcon(TQString::fromLatin1("viewmag"));
+ const TQPixmap newArticleIcon = SmallIcon(TQString::fromLatin1("info"));
+ const TQPixmap oldArticleIcon = SmallIcon(TQString::fromLatin1("mime_empty"));
+ const TQPixmap noArticlesIcon = SmallIcon(TQString::fromLatin1("remove"));
unsigned int articleIdx = 0;
const NewsSourceBase::List sources = m_parent->m_newsSources;
@@ -429,7 +429,7 @@ void KNewsTickerMenu::populateMenu()
NewsSourceBase::Ptr ns = *nIt;
KPopupMenu *submenu = new KPopupMenu;
- int checkNewsId = submenu->insertItem(lookIcon, i18n("Check News"), this, SLOT(slotCheckNews(int)), 0, sources.findIndex(ns) + 1000);
+ int checkNewsId = submenu->insertItem(lookIcon, i18n("Check News"), this, TQT_SLOT(slotCheckNews(int)), 0, sources.findIndex(ns) + 1000);
setItemParameter(checkNewsId, sources.findIndex(ns));
submenu->insertSeparator();
@@ -441,12 +441,12 @@ void KNewsTickerMenu::populateMenu()
Article::List::ConstIterator artIt = articles.begin();
for (; artIt != articles.end(); ++artIt) {
Article::Ptr a = *artIt;
- QString headline = a->headline().replace('&', "&&");
+ TQString headline = a->headline().replace('&', "&&");
int id;
if ( a->read() )
- id = submenu->insertItem(oldArticleIcon, headline, this, SLOT(slotOpenArticle(int)), 0, articleIdx+2000);
+ id = submenu->insertItem(oldArticleIcon, headline, this, TQT_SLOT(slotOpenArticle(int)), 0, articleIdx+2000);
else
- id = submenu->insertItem(newArticleIcon, headline, this, SLOT(slotOpenArticle(int)), 0, articleIdx+2000);
+ id = submenu->insertItem(newArticleIcon, headline, this, TQT_SLOT(slotOpenArticle(int)), 0, articleIdx+2000);
kdDebug( 5005 ) << "Setting articles index for " << a->headline() << " to " << articleIdx << endl;
setItemParameter( id, articleIdx++ );
}
@@ -460,23 +460,23 @@ void KNewsTickerMenu::populateMenu()
if (!m_parent->m_cfg->newsSources().isEmpty())
insertSeparator();
- insertItem(lookIcon, i18n("Check News"), m_parent, SLOT(slotUpdateNews()));
- int i = insertItem(i18n("Offline Mode"), this, SLOT(slotToggleOfflineMode()), 0, 4711 );
+ insertItem(lookIcon, i18n("Check News"), m_parent, TQT_SLOT(slotUpdateNews()));
+ int i = insertItem(i18n("Offline Mode"), this, TQT_SLOT(slotToggleOfflineMode()), 0, 4711 );
setItemChecked(i, m_parent->m_cfg->offlineMode());
if (m_fullMenu) {
insertSeparator();
- const QPixmap logoIcon = SmallIcon(QString::fromLatin1("knewsticker"));
- const QPixmap helpIcon = SmallIcon(QString::fromLatin1("help"));
- const QPixmap confIcon = SmallIcon(QString::fromLatin1("configure"));
+ const TQPixmap logoIcon = SmallIcon(TQString::fromLatin1("knewsticker"));
+ const TQPixmap helpIcon = SmallIcon(TQString::fromLatin1("help"));
+ const TQPixmap confIcon = SmallIcon(TQString::fromLatin1("configure"));
insertTitle(logoIcon, i18n("KNewsTicker"), 0, 0);
- insertItem(helpIcon, i18n("Help"), this, SLOT(slotShowHelp()));
- insertItem(logoIcon, i18n("About KNewsTicker"), this, SLOT(slotShowAbout()));
+ insertItem(helpIcon, i18n("Help"), this, TQT_SLOT(slotShowHelp()));
+ insertItem(logoIcon, i18n("About KNewsTicker"), this, TQT_SLOT(slotShowAbout()));
insertSeparator();
- insertItem(confIcon, i18n("Configure KNewsTicker..."), this, SLOT(slotConfigure()));
+ insertItem(confIcon, i18n("Configure KNewsTicker..."), this, TQT_SLOT(slotConfigure()));
}
}
@@ -533,9 +533,9 @@ void KNewsTickerMenu::slotOpenArticle(int idx)
extern "C"
{
- KDE_EXPORT KPanelApplet* init(QWidget *parent, const QString &configFile)
+ KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString &configFile)
{
- KGlobal::locale()->insertCatalogue(QString::fromLatin1("knewsticker"));
+ KGlobal::locale()->insertCatalogue(TQString::fromLatin1("knewsticker"));
return new KNewsTicker(configFile, KPanelApplet::Stretch,
KPanelApplet::Preferences | KPanelApplet::About |
KPanelApplet::Help | KPanelApplet::ReportBug,
diff --git a/knewsticker/knewsticker.h b/knewsticker/knewsticker.h
index bbb228f6..081918d7 100644
--- a/knewsticker/knewsticker.h
+++ b/knewsticker/knewsticker.h
@@ -17,7 +17,7 @@
#include <dcopobject.h>
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
#include <kpanelapplet.h>
#include <kpopupmenu.h>
@@ -43,7 +43,7 @@ class KNewsTicker : public KPanelApplet, virtual public ConfigIface,
friend class KNewsTickerMenu;
public:
- KNewsTicker(const QString &, Type, int, QWidget * = 0, const char * = 0);
+ KNewsTicker(const TQString &, Type, int, TQWidget * = 0, const char * = 0);
virtual ~KNewsTicker();
virtual int widthForHeight(int) const;
@@ -62,10 +62,10 @@ class KNewsTicker : public KPanelApplet, virtual public ConfigIface,
virtual bool underlineHighlighted() const { return m_cfg->underlineHighlighted(); }
virtual bool showIcons() const { return m_cfg->showIcons(); }
virtual bool slowedScrolling() const { return m_cfg->slowedScrolling(); }
- virtual QColor foregroundColor() const { return m_cfg->foregroundColor(); }
- virtual QColor backgroundColor() const { return m_cfg->backgroundColor(); }
- virtual QColor highlightedColor() const { return m_cfg->highlightedColor(); }
- virtual QStringList newsSources() const { return m_cfg->newsSources(); }
+ virtual TQColor foregroundColor() const { return m_cfg->foregroundColor(); }
+ virtual TQColor backgroundColor() const { return m_cfg->backgroundColor(); }
+ virtual TQColor highlightedColor() const { return m_cfg->highlightedColor(); }
+ virtual TQStringList newsSources() const { return m_cfg->newsSources(); }
virtual void setInterval(const uint);
virtual void setScrollingSpeed(const uint);
virtual void setMouseWheelSpeed(const uint);
@@ -76,10 +76,10 @@ class KNewsTicker : public KPanelApplet, virtual public ConfigIface,
virtual void setUnderlineHighlighted(bool);
virtual void setShowIcons(bool);
virtual void setSlowedScrolling(bool);
- virtual void setForegroundColor(const QColor &);
- virtual void setBackgroundColor(const QColor &);
- virtual void setHighlightedColor(const QColor &);
- virtual void setNewsSources(const QStringList &) {}
+ virtual void setForegroundColor(const TQColor &);
+ virtual void setBackgroundColor(const TQColor &);
+ virtual void setHighlightedColor(const TQColor &);
+ virtual void setNewsSources(const TQStringList &) {}
public slots:
void slotUpdateNews();
@@ -90,7 +90,7 @@ class KNewsTicker : public KPanelApplet, virtual public ConfigIface,
virtual void about();
virtual void help();
virtual void reportBug();
- virtual void mousePressEvent(QMouseEvent *);
+ virtual void mousePressEvent(TQMouseEvent *);
virtual void positionChange(Position);
protected slots:
@@ -107,8 +107,8 @@ class KNewsTicker : public KPanelApplet, virtual public ConfigIface,
DCOPClient *m_dcopClient;
ConfigAccess *m_cfg;
KArrowButton *m_arrowButton;
- QTimer *m_newsTimer;
- QTimer *m_updateTimer;
+ TQTimer *m_newsTimer;
+ TQTimer *m_updateTimer;
NewsIconMgr *m_newsIconMgr;
NewsScroller *m_scroller;
KAboutData *m_aboutData;
@@ -116,7 +116,7 @@ class KNewsTicker : public KPanelApplet, virtual public ConfigIface,
bool m_newNews;
NewsSourceBase::List m_newsSources;
QStringList m_failedNewsUpdates;
- QStringList m_pendingNewsUpdates;
+ TQStringList m_pendingNewsUpdates;
};
class KNewsTickerMenu : public KPopupMenu
diff --git a/knewsticker/knewstickerconfig.cpp b/knewsticker/knewstickerconfig.cpp
index 528269a0..4aa04851 100644
--- a/knewsticker/knewstickerconfig.cpp
+++ b/knewsticker/knewstickerconfig.cpp
@@ -26,15 +26,15 @@
#include <knuminput.h>
#include <kpopupmenu.h>
-#include <qcursor.h>
-#include <qcheckbox.h>
-#include <qdragobject.h>
-#include <qlabel.h>
-#include <qslider.h>
-#include <qregexp.h>
+#include <tqcursor.h>
+#include <tqcheckbox.h>
+#include <tqdragobject.h>
+#include <tqlabel.h>
+#include <tqslider.h>
+#include <tqregexp.h>
-CategoryItem::CategoryItem(QListView *parent, const QString &text)
- : QListViewItem(parent, text)
+CategoryItem::CategoryItem(TQListView *parent, const TQString &text)
+ : TQListViewItem(parent, text)
{
setOpen(true);
}
@@ -42,16 +42,16 @@ CategoryItem::CategoryItem(QListView *parent, const QString &text)
void CategoryItem::setOpen(bool open)
{
if (open)
- setPixmap(0, SmallIcon(QString::fromLatin1("folder_open")));
+ setPixmap(0, SmallIcon(TQString::fromLatin1("folder_open")));
else
- setPixmap(0, SmallIcon(QString::fromLatin1("folder")));
+ setPixmap(0, SmallIcon(TQString::fromLatin1("folder")));
- QListViewItem::setOpen(open);
+ TQListViewItem::setOpen(open);
}
NewsSourceItem::NewsSourceItem(KNewsTickerConfig *kcm, CategoryItem *parent,
const NewsSourceBase::Data &nsd)
- : QCheckListItem(parent, QString::null, QCheckListItem::CheckBox),
+ : TQCheckListItem(parent, TQString::null, TQCheckListItem::CheckBox),
m_parent(parent),
m_kcm(kcm)
{
@@ -76,7 +76,7 @@ void NewsSourceItem::setData(const NewsSourceBase::Data &nsd)
setOn(nsd.enabled);
setText(0, nsd.name);
setText(1, nsd.sourceFile);
- setText(2, QString::number(nsd.maxArticles));
+ setText(2, TQString::number(nsd.maxArticles));
m_icon = nsd.icon;
m_isProgram = nsd.isProgram;
@@ -84,12 +84,12 @@ void NewsSourceItem::setData(const NewsSourceBase::Data &nsd)
m_kcm->getNewsIcon(this, KURL( m_icon ));
}
-void NewsSourceItem::setIcon(const QPixmap &pixmap)
+void NewsSourceItem::setIcon(const TQPixmap &pixmap)
{
setPixmap(0, pixmap);
}
-KNewsTickerConfig::KNewsTickerConfig(ConfigAccess *cfg, QWidget *parent, const char *name)
+KNewsTickerConfig::KNewsTickerConfig(ConfigAccess *cfg, TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("Configuration"), Ok|Close),
m_cfg(cfg),
m_child(new KNewsTickerConfigWidget(this)),
@@ -109,31 +109,31 @@ KNewsTickerConfig::KNewsTickerConfig(ConfigAccess *cfg, QWidget *parent, const
m_child->lvNewsSources->viewport()->installEventFilter(this);
m_child->lvNewsSources->installEventFilter(this);
- connect(m_newsIconMgr, SIGNAL(gotIcon(const KURL &, const QPixmap &)), SLOT(slotGotNewsIcon(const KURL &, const QPixmap &)));
- connect(m_child->bChooseFont, SIGNAL(clicked()), SLOT(slotChooseFont()));
-
- connect(m_child->lvNewsSources, SIGNAL(contextMenu(KListView *, QListViewItem *, const QPoint &)),
- SLOT(slotNewsSourceContextMenu(KListView *, QListViewItem *, const QPoint &)));
- connect(m_child->lvNewsSources, SIGNAL(selectionChanged()),
- SLOT(slotNewsSourceSelectionChanged()));
- connect(m_child->lvNewsSources, SIGNAL(doubleClicked(QListViewItem *, const QPoint &, int)),
- SLOT(slotModifyNewsSource(QListViewItem *, const QPoint &, int)));
- connect(m_child->bAddNewsSource, SIGNAL(clicked()), SLOT(slotAddNewsSource()));
- connect(m_child->bRemoveNewsSource, SIGNAL(clicked()), SLOT(slotRemoveNewsSource()));
- connect(m_child->bModifyNewsSource, SIGNAL(clicked()), SLOT(slotModifyNewsSource()));
-
- connect(m_child->lvFilters, SIGNAL(selectionChanged(QListViewItem *)),
- SLOT(slotFilterSelectionChanged(QListViewItem *)));
- connect(m_child->comboFilterAction, SIGNAL(activated(const QString &)),
- SLOT(slotFilterActionChanged(const QString &)));
- connect(m_child->comboFilterNewsSource, SIGNAL(activated(const QString &)),
- SLOT(slotFilterNewsSourceChanged(const QString &)));
- connect(m_child->comboFilterCondition, SIGNAL(activated(const QString &)),
- SLOT(slotFilterConditionChanged(const QString &)));
- connect(m_child->leFilterExpression, SIGNAL(textChanged(const QString &)),
- SLOT(slotFilterExpressionChanged(const QString &)));
- connect(m_child->bAddFilter, SIGNAL(clicked()), SLOT(slotAddFilter()));
- connect(m_child->bRemoveFilter, SIGNAL(clicked()), SLOT(slotRemoveFilter()));
+ connect(m_newsIconMgr, TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)), TQT_SLOT(slotGotNewsIcon(const KURL &, const TQPixmap &)));
+ connect(m_child->bChooseFont, TQT_SIGNAL(clicked()), TQT_SLOT(slotChooseFont()));
+
+ connect(m_child->lvNewsSources, TQT_SIGNAL(contextMenu(KListView *, TQListViewItem *, const TQPoint &)),
+ TQT_SLOT(slotNewsSourceContextMenu(KListView *, TQListViewItem *, const TQPoint &)));
+ connect(m_child->lvNewsSources, TQT_SIGNAL(selectionChanged()),
+ TQT_SLOT(slotNewsSourceSelectionChanged()));
+ connect(m_child->lvNewsSources, TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint &, int)),
+ TQT_SLOT(slotModifyNewsSource(TQListViewItem *, const TQPoint &, int)));
+ connect(m_child->bAddNewsSource, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddNewsSource()));
+ connect(m_child->bRemoveNewsSource, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveNewsSource()));
+ connect(m_child->bModifyNewsSource, TQT_SIGNAL(clicked()), TQT_SLOT(slotModifyNewsSource()));
+
+ connect(m_child->lvFilters, TQT_SIGNAL(selectionChanged(TQListViewItem *)),
+ TQT_SLOT(slotFilterSelectionChanged(TQListViewItem *)));
+ connect(m_child->comboFilterAction, TQT_SIGNAL(activated(const TQString &)),
+ TQT_SLOT(slotFilterActionChanged(const TQString &)));
+ connect(m_child->comboFilterNewsSource, TQT_SIGNAL(activated(const TQString &)),
+ TQT_SLOT(slotFilterNewsSourceChanged(const TQString &)));
+ connect(m_child->comboFilterCondition, TQT_SIGNAL(activated(const TQString &)),
+ TQT_SLOT(slotFilterConditionChanged(const TQString &)));
+ connect(m_child->leFilterExpression, TQT_SIGNAL(textChanged(const TQString &)),
+ TQT_SLOT(slotFilterExpressionChanged(const TQString &)));
+ connect(m_child->bAddFilter, TQT_SIGNAL(clicked()), TQT_SLOT(slotAddFilter()));
+ connect(m_child->bRemoveFilter, TQT_SIGNAL(clicked()), TQT_SLOT(slotRemoveFilter()));
load();
@@ -162,8 +162,8 @@ void KNewsTickerConfig::load()
m_child->cbShowIcons->setChecked(m_cfg->showIcons());
m_child->lvNewsSources->clear();
- QStringList nsList = m_cfg->newsSources();
- for (QStringList::Iterator it = nsList.begin(); it != nsList.end(); ++it)
+ TQStringList nsList = m_cfg->newsSources();
+ for (TQStringList::Iterator it = nsList.begin(); it != nsList.end(); ++it)
addNewsSource(m_cfg->newsSource((*it))->data());
ArticleFilter::List filterList = m_cfg->filters();
@@ -193,8 +193,8 @@ void KNewsTickerConfig::save()
m_cfg->setUnderlineHighlighted(m_child->cbUnderlineHighlighted->isChecked());
m_cfg->setShowIcons(m_child->cbShowIcons->isChecked());
- QStringList newsSources;
- for (QListViewItemIterator it(m_child->lvNewsSources); it.current(); it++)
+ TQStringList newsSources;
+ for (TQListViewItemIterator it(m_child->lvNewsSources); it.current(); it++)
if (NewsSourceItem *item = dynamic_cast<NewsSourceItem *>(it.current())) {
newsSources += item->data().name;
m_cfg->setNewsSource(item->data());
@@ -204,8 +204,8 @@ void KNewsTickerConfig::save()
ArticleFilter::List filters;
ArticleFilter f;
unsigned int i = 0;
- for (QListViewItemIterator it(m_child->lvFilters); it.current(); it++)
- if (QCheckListItem *item = dynamic_cast<QCheckListItem *>(it.current())) {
+ for (TQListViewItemIterator it(m_child->lvFilters); it.current(); it++)
+ if (TQCheckListItem *item = dynamic_cast<TQCheckListItem *>(it.current())) {
filters.append(i);
f.setAction(item->text(0));
f.setNewsSource(item->text(2));
@@ -218,30 +218,30 @@ void KNewsTickerConfig::save()
m_cfg->setFilters(filters);
}
-bool KNewsTickerConfig::eventFilter(QObject *o, QEvent *e)
+bool KNewsTickerConfig::eventFilter(TQObject *o, TQEvent *e)
{
//<HACK>
- // "if ( e->type() == QEvent::DragEnter ) {" shoult normaly be enough. but there must be a bug somewhere in KListView.
- if ( e->type() == QEvent::DragMove ) {
+ // "if ( e->type() == TQEvent::DragEnter ) {" shoult normaly be enough. but there must be a bug somewhere in KListView.
+ if ( e->type() == TQEvent::DragMove ) {
//</HACK>
- QDragEnterEvent *d = (QDragEnterEvent*)e;
- d->accept(QTextDrag::canDecode(d));
+ TQDragEnterEvent *d = (TQDragEnterEvent*)e;
+ d->accept(TQTextDrag::canDecode(d));
return true; // eat event
}
- else if ( e->type() == QEvent::Drop) {
- QDropEvent *d = (QDropEvent*)e;
- QString newSourceUrl;
- if ( QTextDrag::decode(d, newSourceUrl) ) {
+ else if ( e->type() == TQEvent::Drop) {
+ TQDropEvent *d = (TQDropEvent*)e;
+ TQString newSourceUrl;
+ if ( TQTextDrag::decode(d, newSourceUrl) ) {
// <HACK>
// This is just for http://www.webreference.com/services/news/
- newSourceUrl = newSourceUrl.replace( QRegExp("^view-source:http%3A//"), "http://" );
+ newSourceUrl = newSourceUrl.replace( TQRegExp("^view-source:http%3A//"), "http://" );
// </HACK>
newSourceUrl = newSourceUrl.stripWhiteSpace();
//look for a new Name of Source:
- QString name = i18n("Unknown");
+ TQString name = i18n("Unknown");
bool validName = false;
- for (QListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) {
+ for (TQListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) {
if (it.current()->text(0) == name) {
validName = false;
break;
@@ -252,7 +252,7 @@ bool KNewsTickerConfig::eventFilter(QObject *o, QEvent *e)
int i = 0;
while (validName == false) {
name = i18n("Unknown %1").arg(i);
- for (QListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) {
+ for (TQListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) {
if (it.current()->text(0) == name) {
i++;
validName = false;
@@ -265,17 +265,17 @@ bool KNewsTickerConfig::eventFilter(QObject *o, QEvent *e)
NewsSourceBase::Data nsd(name, newSourceUrl, "" , NewsSourceBase::Computers , 10, true, false);
NewsSourceDlgImpl nsDlg(this, 0L, true);
- connect(&nsDlg, SIGNAL(newsSource(const NewsSourceBase::Data &)),
- SLOT(slotAddNewsSource(const NewsSourceBase::Data &)));
+ connect(&nsDlg, TQT_SIGNAL(newsSource(const NewsSourceBase::Data &)),
+ TQT_SLOT(slotAddNewsSource(const NewsSourceBase::Data &)));
nsDlg.setup(nsd, false);
nsDlg.exec();
}
return true; // eat event
}
- return QWidget::eventFilter( o, e );
+ return TQWidget::eventFilter( o, e );
}
-void KNewsTickerConfig::resizeEvent(QResizeEvent *)
+void KNewsTickerConfig::resizeEvent(TQResizeEvent *)
{
m_child->resize(width(), height());
}
@@ -285,7 +285,7 @@ void KNewsTickerConfig::addNewsSource(const NewsSourceBase::Data &nsd,
{
CategoryItem *catItem = 0L;
- for (QListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) {
+ for (TQListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) {
if (it.current()->text(0) == NewsSourceBase::subjectText(nsd.subject)) {
catItem = static_cast<CategoryItem *>(it.current());
break;
@@ -305,7 +305,7 @@ void KNewsTickerConfig::addNewsSource(const NewsSourceBase::Data &nsd,
void KNewsTickerConfig::addFilter(const ArticleFilter &fd)
{
- QCheckListItem *item = new QCheckListItem(m_child->lvFilters, fd.action(), QCheckListItem::CheckBox);
+ TQCheckListItem *item = new TQCheckListItem(m_child->lvFilters, fd.action(), TQCheckListItem::CheckBox);
item->setOn(fd.enabled());
item->setText(1, m_child->lArticles->text());
item->setText(2, fd.newsSource());
@@ -320,11 +320,11 @@ void KNewsTickerConfig::removeNewsSource()
" source?</p>",
"<p>Do you really want to remove these %n news"
" sources?</p>",
- m_child->lvNewsSources->selectedItems().count()), QString::null, KStdGuiItem::del()) == KMessageBox::Continue) {
+ m_child->lvNewsSources->selectedItems().count()), TQString::null, KStdGuiItem::del()) == KMessageBox::Continue) {
int itemCount = m_child->lvNewsSources->selectedItems().count();
for (int j = 0; j < itemCount; j++) {
if (m_child->lvNewsSources->selectedItems().isEmpty()) { break; }
- QListViewItem *item = m_child->lvNewsSources->selectedItems().take(0);
+ TQListViewItem *item = m_child->lvNewsSources->selectedItems().take(0);
for (int i = 0; i < m_child->comboFilterNewsSource->count(); i++)
if (m_child->comboFilterNewsSource->text(i) == item->text(0)) {
m_child->comboFilterNewsSource->removeItem(i);
@@ -340,26 +340,26 @@ void KNewsTickerConfig::removeNewsSource()
}
}
-void KNewsTickerConfig::removeFilter(QListViewItem *item)
+void KNewsTickerConfig::removeFilter(TQListViewItem *item)
{
if (KMessageBox::warningContinueCancel(this, i18n("<p>Do you really want to remove the selected"
- " filter?</p>"), QString::null, KStdGuiItem::del()) == KMessageBox::Continue) {
+ " filter?</p>"), TQString::null, KStdGuiItem::del()) == KMessageBox::Continue) {
delete item;
m_child->bRemoveFilter->setEnabled(false);
}
}
-void KNewsTickerConfig::slotNewsSourceContextMenu(KListView *, QListViewItem *item, const QPoint &)
+void KNewsTickerConfig::slotNewsSourceContextMenu(KListView *, TQListViewItem *item, const TQPoint &)
{
if (!dynamic_cast<NewsSourceItem *>(item))
return;
KPopupMenu *menu = new KPopupMenu();
- QPixmap addIcon = SmallIcon(QString::fromLatin1("news_subscribe"));
- QPixmap modifyIcon = SmallIcon(QString::fromLatin1("edit"));
- QPixmap removeIcon = SmallIcon(QString::fromLatin1("news_unsubscribe"));
- QPixmap logoIcon = SmallIcon(QString::fromLatin1("knewsticker"));
+ TQPixmap addIcon = SmallIcon(TQString::fromLatin1("news_subscribe"));
+ TQPixmap modifyIcon = SmallIcon(TQString::fromLatin1("edit"));
+ TQPixmap removeIcon = SmallIcon(TQString::fromLatin1("news_unsubscribe"));
+ TQPixmap logoIcon = SmallIcon(TQString::fromLatin1("knewsticker"));
menu->insertTitle(logoIcon, i18n("Edit News Source"));
menu->insertItem(addIcon, i18n("&Add News Source"), 0);
@@ -377,7 +377,7 @@ void KNewsTickerConfig::slotNewsSourceContextMenu(KListView *, QListViewItem *it
menu->setItemEnabled(2, false);
}
- switch (menu->exec(QCursor::pos())) {
+ switch (menu->exec(TQCursor::pos())) {
case 0: slotAddNewsSource(); break;
case 1: modifyNewsSource(item); break;
case 2: removeNewsSource(); break;
@@ -402,8 +402,8 @@ void KNewsTickerConfig::slotChooseFont()
void KNewsTickerConfig::slotAddNewsSource()
{
NewsSourceDlgImpl nsDlg(this, 0L, true);
- connect(&nsDlg, SIGNAL(newsSource(const NewsSourceBase::Data &)),
- SLOT(slotAddNewsSource(const NewsSourceBase::Data &)));
+ connect(&nsDlg, TQT_SIGNAL(newsSource(const NewsSourceBase::Data &)),
+ TQT_SLOT(slotAddNewsSource(const NewsSourceBase::Data &)));
nsDlg.exec();
}
@@ -421,14 +421,14 @@ void KNewsTickerConfig::slotModifyNewsSource()
void KNewsTickerConfig::slotModifyNewsSource(const NewsSourceBase::Data &nsd)
{
if (m_modifyItem->data().subject != nsd.subject) {
- QListViewItem *parentItem = m_modifyItem->parentItem();
+ TQListViewItem *parentItem = m_modifyItem->parentItem();
parentItem->takeItem(m_modifyItem);
if (parentItem->childCount() == 0)
delete parentItem;
CategoryItem *catItem = 0L;
- for (QListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) {
+ for (TQListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) {
if (it.current()->text(0) == NewsSourceBase::subjectText(nsd.subject)) {
catItem = static_cast<CategoryItem *>(it.current());
break;
@@ -445,13 +445,13 @@ void KNewsTickerConfig::slotModifyNewsSource(const NewsSourceBase::Data &nsd)
m_modifyItem->setData(nsd);
}
-void KNewsTickerConfig::slotModifyNewsSource(QListViewItem *item, const QPoint &, int)
+void KNewsTickerConfig::slotModifyNewsSource(TQListViewItem *item, const TQPoint &, int)
{
if (dynamic_cast<NewsSourceItem *>(item))
modifyNewsSource(item);
}
-void KNewsTickerConfig::modifyNewsSource(QListViewItem *item)
+void KNewsTickerConfig::modifyNewsSource(TQListViewItem *item)
{
if ((m_modifyItem = dynamic_cast<NewsSourceItem *>(item)))
openModifyDialog();
@@ -460,8 +460,8 @@ void KNewsTickerConfig::modifyNewsSource(QListViewItem *item)
void KNewsTickerConfig::openModifyDialog()
{
NewsSourceDlgImpl nsDlg(this, 0L, true);
- connect(&nsDlg, SIGNAL(newsSource(const NewsSourceBase::Data &)),
- SLOT(slotModifyNewsSource(const NewsSourceBase::Data &)));
+ connect(&nsDlg, TQT_SIGNAL(newsSource(const NewsSourceBase::Data &)),
+ TQT_SLOT(slotModifyNewsSource(const NewsSourceBase::Data &)));
nsDlg.setup(m_modifyItem->data(), true);
nsDlg.exec();
}
@@ -484,7 +484,7 @@ void KNewsTickerConfig::slotRemoveNewsSource()
void KNewsTickerConfig::slotRemoveFilter()
{
- QListViewItem *item=m_child->lvFilters->selectedItem();
+ TQListViewItem *item=m_child->lvFilters->selectedItem();
if(!item)
return;
removeFilter(item);
@@ -496,7 +496,7 @@ void KNewsTickerConfig::slotNewsSourceSelectionChanged()
m_child->bModifyNewsSource->setEnabled(m_child->lvNewsSources->selectedItems().count() == 1);
}
-void KNewsTickerConfig::slotFilterSelectionChanged(QListViewItem *item)
+void KNewsTickerConfig::slotFilterSelectionChanged(TQListViewItem *item)
{
for (int i = 0; i < m_child->comboFilterAction->count(); i++)
if (m_child->comboFilterAction->text(i) == item->text(0)) {
@@ -521,36 +521,36 @@ void KNewsTickerConfig::slotFilterSelectionChanged(QListViewItem *item)
m_child->bRemoveFilter->setEnabled(item);
}
-void KNewsTickerConfig::slotFilterActionChanged(const QString &action)
+void KNewsTickerConfig::slotFilterActionChanged(const TQString &action)
{
- QListViewItem *item = m_child->lvFilters->selectedItem();
+ TQListViewItem *item = m_child->lvFilters->selectedItem();
if (item) {
item->setText(0, action);
}
}
-void KNewsTickerConfig::slotFilterNewsSourceChanged(const QString &newsSource)
+void KNewsTickerConfig::slotFilterNewsSourceChanged(const TQString &newsSource)
{
- QListViewItem *item = m_child->lvFilters->selectedItem();
+ TQListViewItem *item = m_child->lvFilters->selectedItem();
if (item) {
item->setText(2, newsSource);
}
}
-void KNewsTickerConfig::slotFilterConditionChanged(const QString &condition)
+void KNewsTickerConfig::slotFilterConditionChanged(const TQString &condition)
{
- QListViewItem *item = m_child->lvFilters->selectedItem();
+ TQListViewItem *item = m_child->lvFilters->selectedItem();
if (item) {
item->setText(4, condition);
}
}
-void KNewsTickerConfig::slotFilterExpressionChanged(const QString &expression)
+void KNewsTickerConfig::slotFilterExpressionChanged(const TQString &expression)
{
- QListViewItem *item = m_child->lvFilters->selectedItem();
+ TQListViewItem *item = m_child->lvFilters->selectedItem();
if (item) {
item->setText(5, expression);
@@ -563,7 +563,7 @@ void KNewsTickerConfig::getNewsIcon(NewsSourceItem *item, const KURL &url)
m_newsIconMgr->getIcon(url);
}
-void KNewsTickerConfig::slotGotNewsIcon(const KURL &url, const QPixmap &pixmap)
+void KNewsTickerConfig::slotGotNewsIcon(const KURL &url, const TQPixmap &pixmap)
{
if (m_itemIconMap.find(url.url()) == m_itemIconMap.end()) {
kdDebug(5005) << "Got unknown icon for URL " << url << endl;
diff --git a/knewsticker/knewstickerconfig.h b/knewsticker/knewstickerconfig.h
index ec475236..1280413d 100644
--- a/knewsticker/knewstickerconfig.h
+++ b/knewsticker/knewstickerconfig.h
@@ -17,9 +17,9 @@
#include <kdialogbase.h>
-#include <qevent.h>
-#include <qfont.h>
-#include <qlistview.h>
+#include <tqevent.h>
+#include <tqfont.h>
+#include <tqlistview.h>
class KNewsTickerConfig;
class KNewsTickerConfigWidget;
@@ -30,7 +30,7 @@ class ConfigAccess;
class CategoryItem : public QListViewItem
{
public:
- CategoryItem(QListView *, const QString &);
+ CategoryItem(TQListView *, const TQString &);
void setOpen(bool);
};
@@ -42,12 +42,12 @@ class NewsSourceItem : public QCheckListItem
NewsSourceBase::Data data() const;
void setData(const NewsSourceBase::Data &);
- void setIcon(const QPixmap &);
+ void setIcon(const TQPixmap &);
- QListViewItem *parentItem() { return QCheckListItem::parent(); }
+ TQListViewItem *parentItem() { return TQCheckListItem::parent(); }
private:
- QString m_icon;
+ TQString m_icon;
bool m_isProgram;
NewsSourceBase::Subject m_subject;
CategoryItem *m_parent;
@@ -59,7 +59,7 @@ class KNewsTickerConfig : public KDialogBase
Q_OBJECT
friend class NewsSourceItem;
public:
- KNewsTickerConfig(ConfigAccess *, QWidget * = 0, const char * = 0);
+ KNewsTickerConfig(ConfigAccess *, TQWidget * = 0, const char * = 0);
void load();
void save();
@@ -67,17 +67,17 @@ class KNewsTickerConfig : public KDialogBase
protected:
void addNewsSource(const NewsSourceBase::Data &, bool = false);
- void modifyNewsSource(QListViewItem *);
+ void modifyNewsSource(TQListViewItem *);
void removeNewsSource();
void addFilter(const ArticleFilter &);
- void removeFilter(QListViewItem *);
- void resizeEvent(QResizeEvent *);
+ void removeFilter(TQListViewItem *);
+ void resizeEvent(TQResizeEvent *);
void openModifyDialog();
- bool eventFilter(QObject *o, QEvent *e);
+ bool eventFilter(TQObject *o, TQEvent *e);
void getNewsIcon(NewsSourceItem *, const KURL &);
protected slots:
- void slotNewsSourceContextMenu(KListView *, QListViewItem *, const QPoint &);
+ void slotNewsSourceContextMenu(KListView *, TQListViewItem *, const TQPoint &);
void slotChooseFont();
void slotAddNewsSource();
void slotAddFilter();
@@ -86,25 +86,25 @@ class KNewsTickerConfig : public KDialogBase
void slotRemoveFilter();
void slotModifyNewsSource();
void slotModifyNewsSource(const NewsSourceBase::Data &);
- void slotModifyNewsSource(QListViewItem *, const QPoint &, int);
+ void slotModifyNewsSource(TQListViewItem *, const TQPoint &, int);
void slotNewsSourceSelectionChanged();
- void slotFilterSelectionChanged(QListViewItem *);
- void slotFilterActionChanged(const QString &);
- void slotFilterNewsSourceChanged(const QString &);
- void slotFilterConditionChanged(const QString &);
- void slotFilterExpressionChanged(const QString &);
+ void slotFilterSelectionChanged(TQListViewItem *);
+ void slotFilterActionChanged(const TQString &);
+ void slotFilterNewsSourceChanged(const TQString &);
+ void slotFilterConditionChanged(const TQString &);
+ void slotFilterExpressionChanged(const TQString &);
virtual void slotOk();
private slots:
- void slotGotNewsIcon(const KURL &, const QPixmap &);
+ void slotGotNewsIcon(const KURL &, const TQPixmap &);
private:
ConfigAccess *m_cfg;
KNewsTickerConfigWidget *m_child;
- QFont m_font;
+ TQFont m_font;
NewsSourceItem *m_modifyItem;
NewsIconMgr *m_newsIconMgr;
- QMap<QString, NewsSourceItem *> m_itemIconMap;
+ TQMap<TQString, NewsSourceItem *> m_itemIconMap;
};
#endif // KCMNEWSTICKER_H
diff --git a/knewsticker/knewstickerstub/knewstickerstub.cpp b/knewsticker/knewstickerstub/knewstickerstub.cpp
index 7f5960a4..ac4ddeeb 100644
--- a/knewsticker/knewstickerstub/knewstickerstub.cpp
+++ b/knewsticker/knewstickerstub/knewstickerstub.cpp
@@ -49,14 +49,14 @@ int main(int argc, char **argv)
DCOPClient *dcopClient = app.dcopClient();
dcopClient->attach();
- KConfig cfg(QString::fromLatin1("knewsticker_panelappletrc"), false, false);
+ KConfig cfg(TQString::fromLatin1("knewsticker_panelappletrc"), false, false);
ConfigAccess configFrontend(&cfg);
if (args->isSet("addrdf")) {
- QStringList newsSources = configFrontend.newsSources();
+ TQStringList newsSources = configFrontend.newsSources();
// TODO: Use the "Suggest" functionality from addnewssourcedlgimpl.cpp here.
- QString name = i18n("Unknown");
+ TQString name = i18n("Unknown");
if (newsSources.contains(name))
for (unsigned int i = 0; ; i++)
if (!newsSources.contains(i18n("Unknown %1").arg(i))) {
@@ -66,11 +66,11 @@ int main(int argc, char **argv)
newsSources += name;
- QString sourceFile = QString(args->getOption("addrdf"));
+ TQString sourceFile = TQString(args->getOption("addrdf"));
configFrontend.setNewsSource(NewsSourceBase::Data(name, sourceFile));
configFrontend.setNewsSources(newsSources);
- QByteArray data;
+ TQByteArray data;
dcopClient->send("knewsticker", "KNewsTicker", "reparseConfig()", data);
}
diff --git a/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.cpp b/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.cpp
index 93bc71cc..14ca80d0 100644
--- a/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.cpp
+++ b/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.cpp
@@ -25,15 +25,15 @@
#include <kstandarddirs.h>
#include <kglobal.h>
-#include <qmultilineedit.h>
-#include <qvbox.h>
+#include <tqmultilineedit.h>
+#include <tqvbox.h>
using namespace RSS;
class ArticleListBoxItem : public QListBoxText
{
public:
- ArticleListBoxItem( QListBox *listbox, const Article &article );
+ ArticleListBoxItem( TQListBox *listbox, const Article &article );
const Article &article() const { return m_article; }
@@ -41,8 +41,8 @@ class ArticleListBoxItem : public QListBoxText
Article m_article;
};
-ArticleListBoxItem::ArticleListBoxItem( QListBox *listbox, const Article &article )
- : QListBoxText( listbox ),
+ArticleListBoxItem::ArticleListBoxItem( TQListBox *listbox, const Article &article )
+ : TQListBoxText( listbox ),
m_article( article )
{
setText( article.title() );
@@ -52,18 +52,18 @@ KntSrcFilePropsDlg::KntSrcFilePropsDlg(KPropertiesDialog *props)
: KPropsDlgPlugin(props)
{
m_child = new KntSrcFilePropsDlgWidget(properties->addVBoxPage(i18n("News Resource")));
- connect(m_child->urlName, SIGNAL(leftClickedURL(const QString &)),
- SLOT(slotOpenURL(const QString &)));
- connect(m_child->lbArticles, SIGNAL(executed(QListBoxItem *)),
- SLOT(slotClickedArticle(QListBoxItem *)));
+ connect(m_child->urlName, TQT_SIGNAL(leftClickedURL(const TQString &)),
+ TQT_SLOT(slotOpenURL(const TQString &)));
+ connect(m_child->lbArticles, TQT_SIGNAL(executed(TQListBoxItem *)),
+ TQT_SLOT(slotClickedArticle(TQListBoxItem *)));
Loader *loader = Loader::create();
- connect(loader, SIGNAL(loadingComplete(Loader *, Document, Status)),
- SLOT(slotConstructUI(Loader *, Document, Status)));
+ connect(loader, TQT_SIGNAL(loadingComplete(Loader *, Document, Status)),
+ TQT_SLOT(slotConstructUI(Loader *, Document, Status)));
loader->loadFrom(props->item()->url(), new FileRetriever);
- connect(NewsIconMgr::self(), SIGNAL(gotIcon(const KURL &, const QPixmap &)),
- SLOT(slotGotIcon(const KURL &, const QPixmap &)));
+ connect(NewsIconMgr::self(), TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)),
+ TQT_SLOT(slotGotIcon(const KURL &, const TQPixmap &)));
m_child->show();
}
@@ -74,7 +74,7 @@ void KntSrcFilePropsDlg::slotConstructUI(Loader *, Document doc, Status status)
return;
KURL iconURL = doc.link();
- iconURL.setEncodedPathAndQuery(QString::fromLatin1("/favicon.ico"));
+ iconURL.setEncodedPathAndQuery(TQString::fromLatin1("/favicon.ico"));
NewsIconMgr::self()->getIcon(iconURL);
m_child->urlName->setText(doc.title());
@@ -88,31 +88,31 @@ void KntSrcFilePropsDlg::slotConstructUI(Loader *, Document doc, Status status)
new ArticleListBoxItem(m_child->lbArticles, *it);
}
-void KntSrcFilePropsDlg::slotOpenURL(const QString &url)
+void KntSrcFilePropsDlg::slotOpenURL(const TQString &url)
{
kapp->invokeBrowser(url);
}
-void KntSrcFilePropsDlg::slotGotIcon(const KURL &, const QPixmap &pixmap)
+void KntSrcFilePropsDlg::slotGotIcon(const KURL &, const TQPixmap &pixmap)
{
m_child->pixmapIcon->setPixmap(pixmap);
}
-void KntSrcFilePropsDlg::slotClickedArticle(QListBoxItem *item)
+void KntSrcFilePropsDlg::slotClickedArticle(TQListBoxItem *item)
{
ArticleListBoxItem *articleItem = static_cast<ArticleListBoxItem *>(item);
slotOpenURL(articleItem->article().link().url());
}
-QObject *KntSrcFilePropsFactory::createObject(QObject *parent, const char *,
- const char *classname, const QStringList &)
+TQObject *KntSrcFilePropsFactory::createObject(TQObject *parent, const char *,
+ const char *classname, const TQStringList &)
{
- if (QString::fromLatin1(classname) == "KPropsDlgPlugin")
+ if (TQString::fromLatin1(classname) == "KPropsDlgPlugin")
{
if (!parent->inherits("KPropertiesDialog"))
return 0L;
- QObject *obj = new KntSrcFilePropsDlg(static_cast<KPropertiesDialog *>(parent));
+ TQObject *obj = new KntSrcFilePropsDlg(static_cast<KPropertiesDialog *>(parent));
return obj;
}
return 0L;
diff --git a/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.h b/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.h
index 8fe1be58..0d41682e 100644
--- a/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.h
+++ b/knewsticker/kntsrcfilepropsdlg/kntsrcfilepropsdlg.h
@@ -33,8 +33,8 @@ class KntSrcFilePropsFactory : public KLibFactory
Q_OBJECT
public:
- virtual QObject *createObject(QObject * = 0, const char * = 0,
- const char * = "QObject", const QStringList & = QStringList());
+ virtual TQObject *createObject(TQObject * = 0, const char * = 0,
+ const char * = "TQObject", const TQStringList & = TQStringList());
};
class KntSrcFilePropsDlg : public KPropsDlgPlugin
@@ -45,10 +45,10 @@ class KntSrcFilePropsDlg : public KPropsDlgPlugin
KntSrcFilePropsDlg(KPropertiesDialog *);
protected slots:
- void slotOpenURL(const QString &);
+ void slotOpenURL(const TQString &);
void slotConstructUI(Loader *loader, Document doc, Status status);
- void slotGotIcon(const KURL &, const QPixmap &);
- void slotClickedArticle(QListBoxItem *);
+ void slotGotIcon(const KURL &, const TQPixmap &);
+ void slotClickedArticle(TQListBoxItem *);
private:
KntSrcFilePropsDlgWidget *m_child;
diff --git a/knewsticker/newsscroller.cpp b/knewsticker/newsscroller.cpp
index 9d11f19e..060b7cd9 100644
--- a/knewsticker/newsscroller.cpp
+++ b/knewsticker/newsscroller.cpp
@@ -11,9 +11,9 @@
*/
#include <dcopclient.h>
-#include <qpainter.h>
-#include <qregexp.h>
-#include <qtimer.h>
+#include <tqpainter.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
#include <kcursor.h>
#include <kstandarddirs.h>
@@ -46,11 +46,11 @@ public:
int width() { return pixmap()->width(); }
int height() { return pixmap()->height(); }
- QPixmap *pixmap(bool highlighted = false, bool underlineHighlighted = true)
+ TQPixmap *pixmap(bool highlighted = false, bool underlineHighlighted = true)
{
- QPixmap *result = highlighted ? m_highlighted : m_normal;
+ TQPixmap *result = highlighted ? m_highlighted : m_normal;
if (!result) {
- const QFontMetrics &metrics = m_scroller->fontMetrics();
+ const TQFontMetrics &metrics = m_scroller->fontMetrics();
int w, h;
if (m_scroller->m_cfg->showIcons()) {
@@ -62,13 +62,13 @@ public:
}
if (ConfigAccess::rotated(static_cast<ConfigAccess::Direction>(m_scroller->m_cfg->scrollingDirection())))
- result = new QPixmap(h, w);
+ result = new TQPixmap(h, w);
else
- result = new QPixmap(w, h);
+ result = new TQPixmap(w, h);
result->fill(m_scroller->m_cfg->backgroundColor());
- QPainter p(result);
- QFont f = m_scroller->font();
+ TQPainter p(result);
+ TQFont f = m_scroller->font();
if (highlighted)
f.setUnderline(underlineHighlighted);
@@ -124,14 +124,14 @@ public:
private:
NewsScroller *m_scroller;
Article::Ptr m_article;
- QPixmap *m_normal;
- QPixmap *m_highlighted;
+ TQPixmap *m_normal;
+ TQPixmap *m_highlighted;
};
-NewsScroller::NewsScroller(QWidget *parent, ConfigAccess *cfg, const char *name)
- : QFrame(parent, name, WNoAutoErase),
+NewsScroller::NewsScroller(TQWidget *parent, ConfigAccess *cfg, const char *name)
+ : TQFrame(parent, name, WNoAutoErase),
m_cfg(cfg),
- m_scrollTimer(new QTimer(this)),
+ m_scrollTimer(new TQTimer(this)),
m_activeHeadline(0),
m_mouseDrag(false),
m_totalStepping(0.0)
@@ -143,21 +143,21 @@ NewsScroller::NewsScroller(QWidget *parent, ConfigAccess *cfg, const char *name)
m_headlines.setAutoDelete(true);
- connect(m_scrollTimer, SIGNAL(timeout()), SLOT(slotTimeout()));
+ connect(m_scrollTimer, TQT_SIGNAL(timeout()), TQT_SLOT(slotTimeout()));
setAcceptDrops(true);
reset();
}
-QSize NewsScroller::sizeHint() const
+TQSize NewsScroller::sizeHint() const
{
- return QSize(fontMetrics().width(QString::fromLatin1("X")) * 20, fontMetrics().height() * 2);
+ return TQSize(fontMetrics().width(TQString::fromLatin1("X")) * 20, fontMetrics().height() * 2);
}
-QSizePolicy NewsScroller::sizePolicy() const
+TQSizePolicy NewsScroller::sizePolicy() const
{
- return QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
+ return TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding);
}
void NewsScroller::clear()
@@ -166,30 +166,30 @@ void NewsScroller::clear()
reset();
}
-void NewsScroller::dragEnterEvent(QDragEnterEvent* event)
+void NewsScroller::dragEnterEvent(TQDragEnterEvent* event)
{
- event->accept(QTextDrag::canDecode(event));
+ event->accept(TQTextDrag::canDecode(event));
}
-void NewsScroller::dropEvent(QDropEvent* event)
+void NewsScroller::dropEvent(TQDropEvent* event)
{
- QString newSourceUrl;
- if ( QTextDrag::decode(event, newSourceUrl) ) {
+ TQString newSourceUrl;
+ if ( TQTextDrag::decode(event, newSourceUrl) ) {
// <HACK>
// This is just for http://www.webreference.com/services/news/
- newSourceUrl = newSourceUrl.replace(QRegExp(
- QString::fromLatin1("^view-source:http%3A//")),
- QString::fromLatin1("http://"));
+ newSourceUrl = newSourceUrl.replace(TQRegExp(
+ TQString::fromLatin1("^view-source:http%3A//")),
+ TQString::fromLatin1("http://"));
// </HACK>
newSourceUrl = newSourceUrl.stripWhiteSpace();
if (!isHeadline(newSourceUrl) && KMessageBox::questionYesNo(this, i18n("<p>Do you really want to add '%1' to"
" the list of news sources?</p>")
- .arg(newSourceUrl), QString::null, i18n("Add"), KStdGuiItem::cancel()) == KMessageBox::Yes) {
- KConfig cfg(QString::fromLatin1("knewsticker_panelappletrc"), false, false);
+ .arg(newSourceUrl), TQString::null, i18n("Add"), KStdGuiItem::cancel()) == KMessageBox::Yes) {
+ KConfig cfg(TQString::fromLatin1("knewsticker_panelappletrc"), false, false);
ConfigAccess configFrontend(&cfg);
- QStringList newsSources = configFrontend.newsSources();
+ TQStringList newsSources = configFrontend.newsSources();
- QString name = i18n("Unknown");
+ TQString name = i18n("Unknown");
if (newsSources.contains(name))
for (unsigned int i = 0; ; i++)
if (!newsSources.contains(i18n("Unknown %1").arg(i))) {
@@ -201,13 +201,13 @@ void NewsScroller::dropEvent(QDropEvent* event)
configFrontend.setNewsSource(NewsSourceBase::Data(name, newSourceUrl));
configFrontend.setNewsSources(newsSources);
- QByteArray data;
+ TQByteArray data;
kapp->dcopClient()->send("knewsticker", "KNewsTicker", "reparseConfig()", data);
}
}
}
-bool NewsScroller::isHeadline(const QString &location) const
+bool NewsScroller::isHeadline(const TQString &location) const
{
for (Headline *h = m_headlines.first(); h; h = m_headlines.next())
if (h->article()->address() == location)
@@ -254,7 +254,7 @@ void NewsScroller::scroll(int distance, bool interpret_directions)
m_offset = m_offset + m_separator.height() - scrollHeight();
}
- QPoint pt = mapFromGlobal(QCursor::pos());
+ TQPoint pt = mapFromGlobal(TQCursor::pos());
if (contentsRect().contains(pt))
updateActive(pt);
@@ -262,15 +262,15 @@ void NewsScroller::scroll(int distance, bool interpret_directions)
update();
}
-void NewsScroller::enterEvent(QEvent *)
+void NewsScroller::enterEvent(TQEvent *)
{
if (m_cfg->slowedScrolling() && m_cfg->scrollingSpeed() > 1)
m_scrollTimer->changeInterval(speedAsInterval(m_cfg->scrollingSpeed() / 2));
}
-void NewsScroller::mousePressEvent(QMouseEvent *e)
+void NewsScroller::mousePressEvent(TQMouseEvent *e)
{
- if (e->button() == QMouseEvent::LeftButton || e->button() == QMouseEvent::MidButton) {
+ if (e->button() == TQMouseEvent::LeftButton || e->button() == TQMouseEvent::MidButton) {
m_dragPos = e->pos();
if (m_activeHeadline)
@@ -278,16 +278,16 @@ void NewsScroller::mousePressEvent(QMouseEvent *e)
}
}
-void NewsScroller::mouseReleaseEvent(QMouseEvent *e)
+void NewsScroller::mouseReleaseEvent(TQMouseEvent *e)
{
- if ((e->button() == QMouseEvent::LeftButton || e->button() == QMouseEvent::MidButton)
+ if ((e->button() == TQMouseEvent::LeftButton || e->button() == TQMouseEvent::MidButton)
&& m_activeHeadline && m_activeHeadline->article()->headline() == m_tempHeadline
&& !m_mouseDrag) {
m_activeHeadline->article()->open();
- m_tempHeadline = QString::null;
+ m_tempHeadline = TQString::null;
}
- if (e->button() == QMouseEvent::RightButton)
+ if (e->button() == TQMouseEvent::RightButton)
emit(contextMenu());
if (m_mouseDrag) {
@@ -297,7 +297,7 @@ void NewsScroller::mouseReleaseEvent(QMouseEvent *e)
}
}
-void NewsScroller::mouseMoveEvent(QMouseEvent *e)
+void NewsScroller::mouseMoveEvent(TQMouseEvent *e)
{
// Are we in a drag phase?
if (!m_mouseDrag) {
@@ -307,7 +307,7 @@ void NewsScroller::mouseMoveEvent(QMouseEvent *e)
dragDistance = QABS(e->x() - m_dragPos.x());
else
dragDistance = QABS(e->y() - m_dragPos.y());
- m_mouseDrag = (e->state() & QMouseEvent::LeftButton != 0) &&
+ m_mouseDrag = (e->state() & TQMouseEvent::LeftButton != 0) &&
dragDistance >= KGlobal::config()->readNumEntry("StartDragDist", KApplication::startDragDistance());
if (m_mouseDrag) // Stop the scroller if we just started a drag.
m_scrollTimer->stop();
@@ -327,7 +327,7 @@ void NewsScroller::mouseMoveEvent(QMouseEvent *e)
if (createDrag && m_activeHeadline) {
KURL::List url;
url.append(m_activeHeadline->article()->address());
- QDragObject *drag = new KURLDrag(url, this);
+ TQDragObject *drag = new KURLDrag(url, this);
drag->setPixmap(m_activeHeadline->article()->newsSource()->icon());
drag->drag();
m_mouseDrag = false;
@@ -340,20 +340,20 @@ void NewsScroller::mouseMoveEvent(QMouseEvent *e)
update();
}
-void NewsScroller::wheelEvent(QWheelEvent *e)
+void NewsScroller::wheelEvent(TQWheelEvent *e)
{
// ### This 11 - m_cfg->mouseWheelSpeed() could be eliminated by swapping
- // the labels of the QSlider. :]
+ // the labels of the TQSlider. :]
int distance = qRound(QABS(e->delta()) / (11 - m_cfg->mouseWheelSpeed()));
int direction = e->delta() > 0 ? -1 : 1;
for (int i = 0; i < distance; i++)
scroll(direction);
- QFrame::wheelEvent(e);
+ TQFrame::wheelEvent(e);
}
-void NewsScroller::leaveEvent(QEvent *)
+void NewsScroller::leaveEvent(TQEvent *)
{
if (m_cfg->slowedScrolling() && m_cfg->scrollingSpeed() > 1)
m_scrollTimer->changeInterval(speedAsInterval(m_cfg->scrollingSpeed()));
@@ -364,13 +364,13 @@ void NewsScroller::leaveEvent(QEvent *)
}
}
-void NewsScroller::drawContents(QPainter *p)
+void NewsScroller::drawContents(TQPainter *p)
{
if (!scrollWidth() || // No news and no "No News Available": uninitialized
m_headlines.isEmpty()) // Happens when we're currently fetching new news
return;
- QPixmap buffer(contentsRect().width(), contentsRect().height());
+ TQPixmap buffer(contentsRect().width(), contentsRect().height());
buffer.fill(m_cfg->backgroundColor());
int pos = m_offset;
@@ -393,7 +393,7 @@ void NewsScroller::drawContents(QPainter *p)
// Now do the headlines themselves
do {
- QPtrListIterator<Headline> it(m_headlines);
+ TQPtrListIterator<Headline> it(m_headlines);
for(; *it; ++it) {
if (horizontal()) {
if (pos + (*it)->width() >= 0)
@@ -440,7 +440,7 @@ void NewsScroller::reset(bool bSeparatorOnly)
if (m_cfg->scrollingSpeed())
m_scrollTimer->start(speedAsInterval(m_cfg->scrollingSpeed()));
- QString sep = m_headlines.isEmpty() ? i18n(" +++ No News Available +++") : QString::fromLatin1(" +++ ");
+ TQString sep = m_headlines.isEmpty() ? i18n(" +++ No News Available +++") : TQString::fromLatin1(" +++ ");
int w = fontMetrics().width(sep);
int h = fontMetrics().height();
@@ -452,7 +452,7 @@ void NewsScroller::reset(bool bSeparatorOnly)
m_separator.fill(m_cfg->backgroundColor());
- QPainter p(&m_separator);
+ TQPainter p(&m_separator);
p.setFont(font());
p.setPen(m_cfg->foregroundColor());
@@ -469,7 +469,7 @@ void NewsScroller::reset(bool bSeparatorOnly)
p.end();
if (!bSeparatorOnly)
- for (QPtrListIterator<Headline> it(m_headlines); *it; ++it)
+ for (TQPtrListIterator<Headline> it(m_headlines); *it; ++it)
(*it)->reset();
switch (m_cfg->scrollingDirection()) {
@@ -495,7 +495,7 @@ int NewsScroller::scrollWidth() const
{
int result = (m_headlines.count() + 1) * m_separator.width();
- for (QPtrListIterator<Headline> it(m_headlines); *it; ++it)
+ for (TQPtrListIterator<Headline> it(m_headlines); *it; ++it)
result += (*it)->width();
return result;
@@ -505,13 +505,13 @@ int NewsScroller::scrollHeight() const
{
int result = (m_headlines.count() + 1) * m_separator.height();
- for (QPtrListIterator<Headline> it(m_headlines); *it; ++it)
+ for (TQPtrListIterator<Headline> it(m_headlines); *it; ++it)
result += (*it)->height();
return result;
}
-bool NewsScroller::updateActive(const QPoint &pt)
+bool NewsScroller::updateActive(const TQPoint &pt)
{
int pos = m_offset;
@@ -525,19 +525,19 @@ bool NewsScroller::updateActive(const QPoint &pt)
pos -= scrollHeight() - m_separator.height();
do {
- QPtrListIterator<Headline> it(m_headlines);
+ TQPtrListIterator<Headline> it(m_headlines);
for (; (headline = *it); ++it) {
- QRect rect;
+ TQRect rect;
if (horizontal()) {
pos += m_separator.width();
- rect.moveTopLeft(QPoint(pos, (contentsRect().height() - (*it)->height()) / 2));
+ rect.moveTopLeft(TQPoint(pos, (contentsRect().height() - (*it)->height()) / 2));
pos += (*it)->width();
} else {
pos += m_separator.height();
- rect.moveTopLeft(QPoint((contentsRect().width() - (*it)->width()) / 2, pos));
+ rect.moveTopLeft(TQPoint((contentsRect().width() - (*it)->width()) / 2, pos));
pos += (*it)->height();
}
- rect.setSize(QSize((*it)->width(), (*it)->height()));
+ rect.setSize(TQSize((*it)->width(), (*it)->height()));
if (m_mouseDrag)
if (horizontal()) {
diff --git a/knewsticker/newsscroller.h b/knewsticker/newsscroller.h
index efe0c3c2..3d37dc8d 100644
--- a/knewsticker/newsscroller.h
+++ b/knewsticker/newsscroller.h
@@ -19,24 +19,24 @@
#include "configaccess.h"
#include "newsengine.h"
-#include <qframe.h>
-#include <qptrlist.h>
-#include <qpixmap.h>
+#include <tqframe.h>
+#include <tqptrlist.h>
+#include <tqpixmap.h>
class QTimer;
class Headline;
template <class> class QPtrList;
-typedef QPtrList<Headline> HeadlineList;
+typedef TQPtrList<Headline> HeadlineList;
class NewsScroller : public QFrame
{
Q_OBJECT
public:
- NewsScroller(QWidget *, ConfigAccess *, const char * = 0);
+ NewsScroller(TQWidget *, ConfigAccess *, const char * = 0);
- virtual QSize sizeHint() const;
- virtual QSizePolicy sizePolicy() const;
+ virtual TQSize sizeHint() const;
+ virtual TQSizePolicy sizePolicy() const;
// Convenience stuff. Somehow ugly, no?
inline bool horizontal() const
@@ -63,15 +63,15 @@ class NewsScroller : public QFrame
void contextMenu();
protected:
- virtual void enterEvent(QEvent *);
- virtual void mousePressEvent(QMouseEvent *);
- virtual void mouseReleaseEvent(QMouseEvent *);
- virtual void mouseMoveEvent(QMouseEvent *);
- virtual void wheelEvent(QWheelEvent *);
- virtual void leaveEvent(QEvent *);
- virtual void drawContents(QPainter *);
- virtual void dragEnterEvent( QDragEnterEvent *);
- virtual void dropEvent(QDropEvent *);
+ virtual void enterEvent(TQEvent *);
+ virtual void mousePressEvent(TQMouseEvent *);
+ virtual void mouseReleaseEvent(TQMouseEvent *);
+ virtual void mouseMoveEvent(TQMouseEvent *);
+ virtual void wheelEvent(TQWheelEvent *);
+ virtual void leaveEvent(TQEvent *);
+ virtual void drawContents(TQPainter *);
+ virtual void dragEnterEvent( TQDragEnterEvent *);
+ virtual void dropEvent(TQDropEvent *);
protected slots:
void scroll(int = 1, bool = true);
@@ -80,21 +80,21 @@ class NewsScroller : public QFrame
private:
int scrollWidth() const;
int scrollHeight() const;
- bool updateActive(const QPoint &);
- bool isHeadline(const QString &) const;
+ bool updateActive(const TQPoint &);
+ bool isHeadline(const TQString &) const;
int speedAsInterval( int speed );
private:
friend class Headline;
ConfigAccess *m_cfg;
- QTimer *m_scrollTimer;
+ TQTimer *m_scrollTimer;
mutable HeadlineList m_headlines;
Headline *m_activeHeadline;
- QPixmap m_separator;
+ TQPixmap m_separator;
int m_offset;
- QPoint m_dragPos;
+ TQPoint m_dragPos;
bool m_mouseDrag;
- QString m_tempHeadline;
+ TQString m_tempHeadline;
float m_totalStepping;
float m_stepping;
};
diff --git a/knewsticker/newssourcedlgimpl.cpp b/knewsticker/newssourcedlgimpl.cpp
index 2cf39511..03704155 100644
--- a/knewsticker/newssourcedlgimpl.cpp
+++ b/knewsticker/newssourcedlgimpl.cpp
@@ -19,44 +19,44 @@
#include <knuminput.h>
#include <kurlrequester.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qprogressbar.h>
-#include <qtimer.h>
-#include <qvbox.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqprogressbar.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
-SuggestProgressDlg::SuggestProgressDlg(const KURL &url, QWidget *parent, const char *name)
+SuggestProgressDlg::SuggestProgressDlg(const KURL &url, TQWidget *parent, const char *name)
: KDialogBase(parent, name, true, i18n("Downloading Data"), Cancel, Cancel),
m_gotSourceFile(false),
m_gotIcon(false)
{
- QVBox *mainWidget = makeVBoxMainWidget();
+ TQVBox *mainWidget = makeVBoxMainWidget();
- new QLabel(i18n("<qt>Please wait while KNewsTicker is downloading some "
+ new TQLabel(i18n("<qt>Please wait while KNewsTicker is downloading some "
"data necessary to suggest reasonable values.<br/>"
"<br/>"
"This will not take longer than one minute.</qt>" ),
mainWidget);
- m_progressBar = new QProgressBar(60, mainWidget);
+ m_progressBar = new TQProgressBar(60, mainWidget);
m_progressBar->setPercentageVisible(false);
- m_timeoutTimer = new QTimer(this);
- connect(m_timeoutTimer, SIGNAL(timeout()), this, SLOT(slotTimeoutTick()));
+ m_timeoutTimer = new TQTimer(this);
+ connect(m_timeoutTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeoutTick()));
m_timeoutTimer->start(1000);
m_xmlSrc = new XMLNewsSource;
- connect(m_xmlSrc, SIGNAL(loadComplete(XMLNewsSource *, bool)),
- this, SLOT(slotLoadComplete(XMLNewsSource *, bool)));
+ connect(m_xmlSrc, TQT_SIGNAL(loadComplete(XMLNewsSource *, bool)),
+ this, TQT_SLOT(slotLoadComplete(XMLNewsSource *, bool)));
m_xmlSrc->loadFrom(url);
- connect(NewsIconMgr::self(), SIGNAL(gotIcon(const KURL &, const QPixmap &)),
- this, SLOT(slotGotIcon(const KURL &, const QPixmap &)));
+ connect(NewsIconMgr::self(), TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)),
+ this, TQT_SLOT(slotGotIcon(const KURL &, const TQPixmap &)));
KURL u = url;
if (url.isLocalFile())
- u = QString::null;
+ u = TQString::null;
else
- u.setEncodedPathAndQuery(QString::fromLatin1("/favicon.ico"));
+ u.setEncodedPathAndQuery(TQString::fromLatin1("/favicon.ico"));
NewsIconMgr::self()->getIcon(u);
}
@@ -82,25 +82,25 @@ void SuggestProgressDlg::slotLoadComplete(XMLNewsSource *, bool succeeded)
m_succeeded = succeeded;
if (m_gotIcon)
- done(succeeded ? QDialog::Accepted : QDialog::Rejected);
+ done(succeeded ? TQDialog::Accepted : TQDialog::Rejected);
}
-void SuggestProgressDlg::slotGotIcon(const KURL &url, const QPixmap &pixmap)
+void SuggestProgressDlg::slotGotIcon(const KURL &url, const TQPixmap &pixmap)
{
m_gotIcon = true;
m_icon = pixmap;
m_iconURL = url;
if (m_gotIcon)
- done(m_succeeded ? QDialog::Accepted : QDialog::Rejected);
+ done(m_succeeded ? TQDialog::Accepted : TQDialog::Rejected);
}
-NewsSourceDlgImpl::NewsSourceDlgImpl(QWidget *parent, const char *name, bool modal, WFlags fl)
+NewsSourceDlgImpl::NewsSourceDlgImpl(TQWidget *parent, const char *name, bool modal, WFlags fl)
: NewsSourceDlg(parent, name, modal, fl),
m_modified(false)
{
- connect(NewsIconMgr::self(), SIGNAL(gotIcon(const KURL &, const QPixmap &)),
- this, SLOT(slotGotIcon(const KURL &, const QPixmap &)));
+ connect(NewsIconMgr::self(), TQT_SIGNAL(gotIcon(const KURL &, const TQPixmap &)),
+ this, TQT_SLOT(slotGotIcon(const KURL &, const TQPixmap &)));
for (unsigned int i = 0; i < DEFAULT_SUBJECTS; i++)
comboCategory->insertItem(
@@ -138,12 +138,12 @@ void NewsSourceDlgImpl::slotOkClicked()
KURL iconURL ( leIcon->text() );
if (iconURL.protocol().isEmpty())
- if (iconURL.host().startsWith(QString::fromLatin1("ftp.")))
- iconURL.setProtocol(QString::fromLatin1("ftp"));
- else if (iconURL.host().startsWith(QString::fromLatin1("www.")))
- iconURL.setProtocol(QString::fromLatin1("http"));
+ if (iconURL.host().startsWith(TQString::fromLatin1("ftp.")))
+ iconURL.setProtocol(TQString::fromLatin1("ftp"));
+ else if (iconURL.host().startsWith(TQString::fromLatin1("www.")))
+ iconURL.setProtocol(TQString::fromLatin1("http"));
else
- iconURL.setProtocol(QString::fromLatin1("file"));
+ iconURL.setProtocol(TQString::fromLatin1("file"));
NewsSourceBase::Data nsd(leName->text(), url.url(), iconURL.url(), subject,
sbMaxArticles->value(), true, cbProgram->isChecked());
@@ -166,7 +166,7 @@ void NewsSourceDlgImpl::slotSuggestClicked()
return;
SuggestProgressDlg dlg(url, this);
- if (dlg.exec() == QDialog::Accepted) {
+ if (dlg.exec() == TQDialog::Accepted) {
pixmapIcon->setPixmap(dlg.icon());
if (NewsIconMgr::self()->isStdIcon(dlg.icon()))
leIcon->clear();
@@ -191,8 +191,8 @@ void NewsSourceDlgImpl::setup(const NewsSourceBase::Data &nsd, bool modify)
comboCategory->setCurrentItem(nsd.subject);
sbMaxArticles->setValue(nsd.maxArticles);
KURL iconURL ( nsd.icon );
- if (iconURL.protocol() == QString::fromLatin1("file"))
- iconURL.setProtocol(QString::null);
+ if (iconURL.protocol() == TQString::fromLatin1("file"))
+ iconURL.setProtocol(TQString::null);
leIcon->setText(iconURL.url());
NewsIconMgr::self()->getIcon(iconURL);
if (modify == true) {
@@ -205,10 +205,10 @@ KURL NewsSourceDlgImpl::polishedURL(const KURL &url) const
KURL newURL = url;
if (url.protocol().isEmpty())
- if (url.url().startsWith(QString::fromLatin1("ftp")))
- newURL = QString::fromLatin1("ftp://") + url.url();
+ if (url.url().startsWith(TQString::fromLatin1("ftp")))
+ newURL = TQString::fromLatin1("ftp://") + url.url();
else
- newURL = QString::fromLatin1("http://") + url.url();
+ newURL = TQString::fromLatin1("http://") + url.url();
return newURL;
}
@@ -222,7 +222,7 @@ bool NewsSourceDlgImpl::validateURL(const KURL &url)
return false;
}
- if (!url.isValid() || !url.hasPath() || url.encodedPathAndQuery() == QString::fromLatin1("/")) {
+ if (!url.isValid() || !url.hasPath() || url.encodedPathAndQuery() == TQString::fromLatin1("/")) {
KMessageBox::error(this, i18n("KNewsTicker needs a valid RDF or RSS file to"
" suggest sensible values. The specified source file is invalid."),
i18n("Invalid Source File"));
@@ -232,7 +232,7 @@ bool NewsSourceDlgImpl::validateURL(const KURL &url)
return true;
}
-void NewsSourceDlgImpl::slotGotIcon(const KURL &, const QPixmap &pixmap)
+void NewsSourceDlgImpl::slotGotIcon(const KURL &, const TQPixmap &pixmap)
{
pixmapIcon->setPixmap(pixmap);
}
diff --git a/knewsticker/newssourcedlgimpl.h b/knewsticker/newssourcedlgimpl.h
index 71bb6964..86ed7c24 100644
--- a/knewsticker/newssourcedlgimpl.h
+++ b/knewsticker/newssourcedlgimpl.h
@@ -16,7 +16,7 @@
#include <kdialogbase.h>
#include <kurl.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
class XMLNewsSource;
class NewsIconMgr;
@@ -28,27 +28,27 @@ class SuggestProgressDlg : public KDialogBase
Q_OBJECT
public:
- SuggestProgressDlg(const KURL &url, QWidget *parent, const char *name = 0);
+ SuggestProgressDlg(const KURL &url, TQWidget *parent, const char *name = 0);
virtual ~SuggestProgressDlg();
XMLNewsSource *xmlSrc() { return m_xmlSrc; }
- QPixmap icon() const { return m_icon; }
+ TQPixmap icon() const { return m_icon; }
const KURL &iconURL() const { return m_iconURL; }
private slots:
void slotTimeoutTick();
void slotLoadComplete(XMLNewsSource *, bool);
- void slotGotIcon(const KURL &, const QPixmap &);
+ void slotGotIcon(const KURL &, const TQPixmap &);
private:
bool m_gotSourceFile;
bool m_gotIcon;
XMLNewsSource *m_xmlSrc;
bool m_succeeded;
- QPixmap m_icon;
+ TQPixmap m_icon;
KURL m_iconURL;
- QProgressBar *m_progressBar;
- QTimer *m_timeoutTimer;
+ TQProgressBar *m_progressBar;
+ TQTimer *m_timeoutTimer;
};
class NewsSourceDlgImpl : public NewsSourceDlg
@@ -56,7 +56,7 @@ class NewsSourceDlgImpl : public NewsSourceDlg
Q_OBJECT
public:
- NewsSourceDlgImpl(QWidget * = 0, const char * = 0, bool = FALSE, WFlags = 0);
+ NewsSourceDlgImpl(TQWidget * = 0, const char * = 0, bool = FALSE, WFlags = 0);
void setup(const NewsSourceBase::Data &, bool);
@@ -73,7 +73,7 @@ class NewsSourceDlgImpl : public NewsSourceDlg
bool validateURL(const KURL &);
private slots:
- void slotGotIcon(const KURL &, const QPixmap &);
+ void slotGotIcon(const KURL &, const TQPixmap &);
private:
bool m_modified;