summaryrefslogtreecommitdiffstats
path: root/konq-plugins/sidebar/newsticker/sidebar_news.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:22:56 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:22:56 +0000
commit7346aee26bf190a7e70333c40fab4caca847cd27 (patch)
tree4b019b434f88dcc3eeaafe1d3f26240b4c4718e8 /konq-plugins/sidebar/newsticker/sidebar_news.cpp
parent23a3d3aa5b44cbdf305495919866d9dbf4f6da54 (diff)
downloadtdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.tar.gz
tdeaddons-7346aee26bf190a7e70333c40fab4caca847cd27.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1157634 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'konq-plugins/sidebar/newsticker/sidebar_news.cpp')
-rw-r--r--konq-plugins/sidebar/newsticker/sidebar_news.cpp80
1 files changed, 40 insertions, 40 deletions
diff --git a/konq-plugins/sidebar/newsticker/sidebar_news.cpp b/konq-plugins/sidebar/newsticker/sidebar_news.cpp
index f96bcd6..ae9c51b 100644
--- a/konq-plugins/sidebar/newsticker/sidebar_news.cpp
+++ b/konq-plugins/sidebar/newsticker/sidebar_news.cpp
@@ -28,9 +28,9 @@
*/
#include <dcopclient.h>
-#include <qtimer.h>
-#include <qbuffer.h>
-#include <qwidgetstack.h>
+#include <tqtimer.h>
+#include <tqbuffer.h>
+#include <tqwidgetstack.h>
#include <kdebug.h>
#include <kapplication.h>
#include <klocale.h>
@@ -46,9 +46,9 @@
namespace KSB_News {
- KonqSidebar_News::KonqSidebar_News(KInstance *inst, QObject *parent,
- QWidget *widgetParent,
- QString &desktopName, const char* name)
+ KonqSidebar_News::KonqSidebar_News(KInstance *inst, TQObject *parent,
+ TQWidget *widgetParent,
+ TQString &desktopName, const char* name)
: KonqSidebarPlugin(inst, parent, widgetParent, desktopName, name),
DCOPObject("sidebar-newsticker")
{
@@ -56,12 +56,12 @@ namespace KSB_News {
// FIXME: as konqueror knows the icon there might be a possibility to
// access the already present QPixmap
KDesktopFile desktopFile(desktopName, true);
- QString iconName = desktopFile.readIcon();
+ TQString iconName = desktopFile.readIcon();
KIconLoader iconLoader;
m_appIcon = iconLoader.loadIcon(iconName, KIcon::Small);
// create all sidebar widgets
- widgets = new QWidgetStack(widgetParent, "main_widgetstack");
+ widgets = new TQWidgetStack(widgetParent, "main_widgetstack");
newswidget = new NSStackTabWidget(widgets, "feedbrowser_stackchld",
m_appIcon);
noRSSwidget = new NoRSSWidget(widgets, "nofeed_stackchld");
@@ -82,17 +82,17 @@ namespace KSB_News {
} else {
m_rssservice = DCOPRef("rssservice", "RSSService");
- QStringList reslist = SidebarSettings::sources();
- QStringList::iterator it;
+ TQStringList reslist = SidebarSettings::sources();
+ TQStringList::iterator it;
for (it = reslist.begin(); it != reslist.end(); ++it) {
addedRSSSource(*it);
}
// fetch added and removed RSS sources
- connectDCOPSignal("rssservice", m_rssservice.obj(), "added(QString)",
- "addedRSSSource(QString)", false);
- connectDCOPSignal("rssservice", m_rssservice.obj(), "removed(QString)",
- "removedRSSSource(QString)", false);
+ connectDCOPSignal("rssservice", m_rssservice.obj(), "added(TQString)",
+ "addedRSSSource(TQString)", false);
+ connectDCOPSignal("rssservice", m_rssservice.obj(), "removed(TQString)",
+ "removedRSSSource(TQString)", false);
// show special widget if there are no RSS sources available
if (newswidget->isEmpty()) {
@@ -110,11 +110,11 @@ namespace KSB_News {
- void *KonqSidebar_News::provides(const QString &) {return 0;}
+ void *KonqSidebar_News::provides(const TQString &) {return 0;}
- void KonqSidebar_News::emitStatusBarText (const QString &) {;}
+ void KonqSidebar_News::emitStatusBarText (const TQString &) {;}
- QWidget *KonqSidebar_News::getWidget(){return widgets;}
+ TQWidget *KonqSidebar_News::getWidget(){return widgets;}
void KonqSidebar_News::handleURL(const KURL &/*url*/) {;}
@@ -122,11 +122,11 @@ namespace KSB_News {
///////// startup of the DCOP servce ///////////////////////////////////////
int KonqSidebar_News::checkDcopService() {
- QString rdfservice_error;
+ TQString rdfservice_error;
int err = 0;
if (! kapp->dcopClient()->isApplicationRegistered("rssservice"))
- if (KApplication::startServiceByDesktopName("rssservice", QString(),
+ if (KApplication::startServiceByDesktopName("rssservice", TQString(),
&rdfservice_error) > 0)
err = 1;
@@ -137,7 +137,7 @@ namespace KSB_News {
///////// helper methods ///////////////////////////////////////////////////
- NSPanel *KonqSidebar_News::getNSPanelByKey(QString key) {
+ NSPanel *KonqSidebar_News::getNSPanelByKey(TQString key) {
NSPanel *nsp = NULL, *current_nsp;
for (current_nsp = nspanelptrlist.first(); current_nsp;
@@ -150,14 +150,14 @@ namespace KSB_News {
}
- void KonqSidebar_News::addedRSSSource(QString key) {
+ void KonqSidebar_News::addedRSSSource(TQString key) {
kdDebug(90140) << "KonqSidebar_News::addedRSSSource: " << key << endl;
// Only add RSS source if we have registered the URI before in
// NSStackTabWidget.
if (newswidget->isRegistered(key)) {
NSPanel *nspanel = new NSPanel(this,
- QString(QString("sidebar-newsticker-")+key).latin1(),
+ TQString(TQString("sidebar-newsticker-")+key).latin1(),
key, &m_rssservice);
nspanel->setTitle(key);
nspanelptrlist.append(nspanel);
@@ -166,19 +166,19 @@ namespace KSB_News {
if (! nspanel->listbox()) {
TTListBox *listbox = new TTListBox(newswidget, "article_lb");
newswidget->addStackTab(nspanel, listbox);
- connect(listbox, SIGNAL(executed(QListBoxItem *)),
- this, SLOT(slotArticleItemExecuted(QListBoxItem *)));
+ connect(listbox, TQT_SIGNAL(executed(TQListBoxItem *)),
+ this, TQT_SLOT(slotArticleItemExecuted(TQListBoxItem *)));
listbox->insertItem(i18n("Connecting..." ));
nspanel->setListbox(listbox);
}
// listen to updates
- connect(nspanel, SIGNAL(documentUpdated(NSPanel *)),
- this, SLOT(updateArticles(NSPanel *)));
- connect(nspanel, SIGNAL(documentUpdated(NSPanel *)),
- this, SLOT(updateTitle(NSPanel *)));
- connect(nspanel, SIGNAL(pixmapUpdated(NSPanel *)),
- this, SLOT(updatePixmap(NSPanel *)));
+ connect(nspanel, TQT_SIGNAL(documentUpdated(NSPanel *)),
+ this, TQT_SLOT(updateArticles(NSPanel *)));
+ connect(nspanel, TQT_SIGNAL(documentUpdated(NSPanel *)),
+ this, TQT_SLOT(updateTitle(NSPanel *)));
+ connect(nspanel, TQT_SIGNAL(pixmapUpdated(NSPanel *)),
+ this, TQT_SLOT(updatePixmap(NSPanel *)));
if (widgets->visibleWidget() != newswidget)
widgets->raiseWidget(newswidget);
@@ -186,7 +186,7 @@ namespace KSB_News {
}
- void KonqSidebar_News::removedRSSSource(QString key) {
+ void KonqSidebar_News::removedRSSSource(TQString key) {
kdDebug(90140) << "inside KonqSidebar_News::removedSource " << key << endl;
if (NSPanel *nsp = getNSPanelByKey(key)) {
@@ -202,7 +202,7 @@ namespace KSB_News {
/////////////////////////////////////////////////////////////////////
- void KonqSidebar_News::slotArticleItemExecuted(QListBoxItem *item) {
+ void KonqSidebar_News::slotArticleItemExecuted(TQListBoxItem *item) {
if (!item) return;
NSPanel *current_nspanel, *nspanel = NULL;
@@ -213,7 +213,7 @@ namespace KSB_News {
}
int subid = nspanel->listbox()->index(item);
- QString link = nspanel->articleLinks()[subid];
+ TQString link = nspanel->articleLinks()[subid];
emit openURLRequest(KURL(link));
@@ -226,8 +226,8 @@ namespace KSB_News {
void KonqSidebar_News::updateArticles(NSPanel *nsp) {
nsp->listbox()->clear();
- QStringList articleList = nsp->articles();
- QStringList::iterator it;
+ TQStringList articleList = nsp->articles();
+ TQStringList::iterator it;
for (it = articleList.begin(); it != articleList.end(); ++it)
nsp->listbox()->insertItem((*it));
}
@@ -252,9 +252,9 @@ namespace KSB_News {
extern "C" {
- KDE_EXPORT void* create_konq_sidebarnews(KInstance *instance, QObject *par,
- QWidget *widp,
- QString &desktopname,
+ KDE_EXPORT void* create_konq_sidebarnews(KInstance *instance, TQObject *par,
+ TQWidget *widp,
+ TQString &desktopname,
const char *name) {
KGlobal::locale()->insertCatalogue("konqsidebar_news");
return new KonqSidebar_News(instance, par, widp, desktopname, name);
@@ -262,8 +262,8 @@ namespace KSB_News {
}
extern "C" {
- KDE_EXPORT bool add_konq_sidebarnews(QString* fn, QString*,
- QMap<QString,QString> *map) {
+ KDE_EXPORT bool add_konq_sidebarnews(TQString* fn, TQString*,
+ TQMap<TQString,TQString> *map) {
map->insert("Type", "Link");
map->insert("Icon", "konqsidebar_news");
map->insert("Name", i18n("Newsticker"));