summaryrefslogtreecommitdiffstats
path: root/konq-plugins/sidebar/newsticker
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
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')
-rw-r--r--konq-plugins/sidebar/newsticker/configfeeds.cpp2
-rw-r--r--konq-plugins/sidebar/newsticker/configfeeds.h2
-rw-r--r--konq-plugins/sidebar/newsticker/norsswidget.cpp22
-rw-r--r--konq-plugins/sidebar/newsticker/norsswidget.h4
-rw-r--r--konq-plugins/sidebar/newsticker/nspanel.cpp48
-rw-r--r--konq-plugins/sidebar/newsticker/nspanel.h44
-rw-r--r--konq-plugins/sidebar/newsticker/nsstacktabwidget.cpp110
-rw-r--r--konq-plugins/sidebar/newsticker/nsstacktabwidget.h26
-rw-r--r--konq-plugins/sidebar/newsticker/sidebar_news.cpp80
-rw-r--r--konq-plugins/sidebar/newsticker/sidebar_news.h24
10 files changed, 181 insertions, 181 deletions
diff --git a/konq-plugins/sidebar/newsticker/configfeeds.cpp b/konq-plugins/sidebar/newsticker/configfeeds.cpp
index c682ab3..dd038b6 100644
--- a/konq-plugins/sidebar/newsticker/configfeeds.cpp
+++ b/konq-plugins/sidebar/newsticker/configfeeds.cpp
@@ -29,7 +29,7 @@
namespace KSB_News {
-ConfigFeeds::ConfigFeeds(QWidget* parent, const char* name) : ConfigFeedsBase(parent, name)
+ConfigFeeds::ConfigFeeds(TQWidget* parent, const char* name) : ConfigFeedsBase(parent, name)
{
}
diff --git a/konq-plugins/sidebar/newsticker/configfeeds.h b/konq-plugins/sidebar/newsticker/configfeeds.h
index 555b4f5..127ba27 100644
--- a/konq-plugins/sidebar/newsticker/configfeeds.h
+++ b/konq-plugins/sidebar/newsticker/configfeeds.h
@@ -43,7 +43,7 @@ namespace KSB_News {
Q_OBJECT
public:
- ConfigFeeds(QWidget* parent, const char* name = 0);
+ ConfigFeeds(TQWidget* parent, const char* name = 0);
};
diff --git a/konq-plugins/sidebar/newsticker/norsswidget.cpp b/konq-plugins/sidebar/newsticker/norsswidget.cpp
index d4c803a..db793bd 100644
--- a/konq-plugins/sidebar/newsticker/norsswidget.cpp
+++ b/konq-plugins/sidebar/newsticker/norsswidget.cpp
@@ -22,8 +22,8 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlayout.h>
-#include <qsizepolicy.h>
+#include <tqlayout.h>
+#include <tqsizepolicy.h>
#include <dcopref.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -37,16 +37,16 @@
namespace KSB_News {
- NoRSSWidget::NoRSSWidget(QWidget *parent, const char *name)
- : QWidget(parent, name) {
+ NoRSSWidget::NoRSSWidget(TQWidget *parent, const char *name)
+ : TQWidget(parent, name) {
- QVBoxLayout *topLayout = new QVBoxLayout(this);
+ TQVBoxLayout *topLayout = new TQVBoxLayout(this);
topLayout->addStretch();
KPushButton *btn = new KPushButton(i18n("&Configure"), this);
- btn->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
- connect(btn, SIGNAL(clicked()), this, SLOT(slotBtnClicked()));
+ btn->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Minimum);
+ connect(btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotBtnClicked()));
topLayout->addWidget(btn, 0, Qt::AlignHCenter);
topLayout->addStretch();
@@ -71,8 +71,8 @@ namespace KSB_News {
// User edited the configuration - update your local copies of the
// configuration data
- connect(m_confdlg, SIGNAL(settingsChanged()), this,
- SLOT(slotConfigure_okClicked()));
+ connect(m_confdlg, TQT_SIGNAL(settingsChanged()), this,
+ TQT_SLOT(slotConfigure_okClicked()));
m_confdlg->show();
}
@@ -82,10 +82,10 @@ namespace KSB_News {
DCOPRef rss_document("rssservice", "RSSService");
// read list of sources
- QStringList m_our_rsssources = SidebarSettings::sources();
+ TQStringList m_our_rsssources = SidebarSettings::sources();
// add new sources
- QStringList::iterator it;
+ TQStringList::iterator it;
for (it = m_our_rsssources.begin(); it != m_our_rsssources.end(); ++it) {
rss_document.call("add", ( *it ));
}
diff --git a/konq-plugins/sidebar/newsticker/norsswidget.h b/konq-plugins/sidebar/newsticker/norsswidget.h
index cebac3b..91a8c61 100644
--- a/konq-plugins/sidebar/newsticker/norsswidget.h
+++ b/konq-plugins/sidebar/newsticker/norsswidget.h
@@ -31,11 +31,11 @@ class KConfigDialog;
namespace KSB_News {
- class NoRSSWidget : public QWidget {
+ class NoRSSWidget : public TQWidget {
Q_OBJECT
public:
- NoRSSWidget(QWidget *parent = 0, const char *name = 0);
+ NoRSSWidget(TQWidget *parent = 0, const char *name = 0);
private slots:
void slotBtnClicked();
diff --git a/konq-plugins/sidebar/newsticker/nspanel.cpp b/konq-plugins/sidebar/newsticker/nspanel.cpp
index 8086b35..a5c1261 100644
--- a/konq-plugins/sidebar/newsticker/nspanel.cpp
+++ b/konq-plugins/sidebar/newsticker/nspanel.cpp
@@ -22,9 +22,9 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlistview.h>
-#include <qfontmetrics.h>
-#include <qtimer.h>
+#include <tqlistview.h>
+#include <tqfontmetrics.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include <klistbox.h>
#include "nspanel.h"
@@ -35,22 +35,22 @@ namespace KSB_News {
////////////////////////////////////////////////////////////////
// ListBox including ToolTip for item
////////////////////////////////////////////////////////////////
- TTListBox::TTListBox(QWidget *parent, const char *name, WFlags f)
+ TTListBox::TTListBox(TQWidget *parent, const char *name, WFlags f)
: KListBox(parent, name, f),
- QToolTip(this) {
+ TQToolTip(this) {
}
void TTListBox::clear() {
KListBox::clear();
}
- void TTListBox::maybeTip(const QPoint &point) {
- QListBoxItem *item = itemAt(point);
+ void TTListBox::maybeTip(const TQPoint &point) {
+ TQListBoxItem *item = itemAt(point);
if (item) {
- QString text = item->text();
+ TQString text = item->text();
if (!text.isEmpty()) {
// Show ToolTip only if necessary
- QFontMetrics fm(fontMetrics());
+ TQFontMetrics fm(fontMetrics());
int textWidth = fm.width(text);
int widgetSpace = visibleWidth();
if ((textWidth > widgetSpace) || (contentsX() > 0))
@@ -61,10 +61,10 @@ namespace KSB_News {
- NSPanel::NSPanel(QObject *parent, const char *name, const QString &key,
+ NSPanel::NSPanel(TQObject *parent, const char *name, const TQString &key,
DCOPRef *rssservice)
- :QObject(parent, name)
- ,DCOPObject(QString(QString("sidebar-newsticker-")+key).latin1())
+ :TQObject(parent, name)
+ ,DCOPObject(TQString(TQString("sidebar-newsticker-")+key).latin1())
,m_listbox()
,m_pixmap()
{
@@ -72,7 +72,7 @@ namespace KSB_News {
m_rssservice = rssservice;
m_key = key;
- m_rssdocument = m_rssservice->call("document(QString)", m_key);
+ m_rssdocument = m_rssservice->call("document(TQString)", m_key);
m_isValid = false;
connectDCOPSignal("rssservice", m_rssdocument.obj(),
@@ -87,8 +87,8 @@ namespace KSB_News {
// updating of RSS documents
m_timeoutinterval = 10 * 60 * 1000; // 10 mins
- m_timer = new QTimer(this);
- connect(m_timer, SIGNAL(timeout()), this, SLOT(refresh()));
+ m_timer = new TQTimer(this);
+ connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(refresh()));
m_timer->start(m_timeoutinterval);
refresh();
}
@@ -103,7 +103,7 @@ namespace KSB_News {
}
- void NSPanel::setTitle(const QString &tit) {
+ void NSPanel::setTitle(const TQString &tit) {
m_title = tit;
}
@@ -113,7 +113,7 @@ namespace KSB_News {
}
- void NSPanel::setPixmap(const QPixmap &pm) {
+ void NSPanel::setPixmap(const TQPixmap &pm) {
m_pixmap = pm;
}
@@ -123,24 +123,24 @@ namespace KSB_News {
}
- QPixmap NSPanel::pixmap() {
+ TQPixmap NSPanel::pixmap() {
return m_pixmap;
}
- QString NSPanel::key() const {
+ TQString NSPanel::key() const {
return m_key;
}
- QString NSPanel::title() const {
+ TQString NSPanel::title() const {
return m_title;
}
- QStringList NSPanel::articles() {
+ TQStringList NSPanel::articles() {
return m_articles;
}
- QStringList NSPanel::articleLinks() {
+ TQStringList NSPanel::articleLinks() {
return m_articlelinks;
}
@@ -155,7 +155,7 @@ namespace KSB_News {
m_articles.clear();
m_articlelinks.clear();
m_count = m_rssdocument.call("count()");
- QString temp = m_rssdocument.call("title()");
+ TQString temp = m_rssdocument.call("title()");
m_title = temp;
m_isValid = true;
for (int idx = 0; idx < m_count; ++idx) {
@@ -169,7 +169,7 @@ namespace KSB_News {
void NSPanel::emitPixmapUpdated(DCOPRef /*dcopref*/) {
if (m_rssdocument.call("pixmapValid()")) {
- QPixmap tmp = m_rssdocument.call("pixmap()");
+ TQPixmap tmp = m_rssdocument.call("pixmap()");
m_pixmap = tmp;
emit pixmapUpdated(this);
diff --git a/konq-plugins/sidebar/newsticker/nspanel.h b/konq-plugins/sidebar/newsticker/nspanel.h
index 0f30152..1f60947 100644
--- a/konq-plugins/sidebar/newsticker/nspanel.h
+++ b/konq-plugins/sidebar/newsticker/nspanel.h
@@ -25,9 +25,9 @@
#ifndef _konq_sidebar_news_nspanelh_
#define _konq_sidebar_news_nspanelh_
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qtooltip.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
+#include <tqtooltip.h>
#include <dcopref.h>
#include <dcopobject.h>
#include <kio/job.h>
@@ -42,38 +42,38 @@ namespace KSB_News {
////////////////////////////////////////////////////////////////
// ListBox including ToolTip for item
////////////////////////////////////////////////////////////////
- class TTListBox : public KListBox, QToolTip {
+ class TTListBox : public KListBox, TQToolTip {
public:
- TTListBox (QWidget *parent = 0, const char *name = 0, WFlags f = 0);
+ TTListBox (TQWidget *parent = 0, const char *name = 0, WFlags f = 0);
void clear();
protected:
- virtual void maybeTip(const QPoint &);
+ virtual void maybeTip(const TQPoint &);
};
- class NSPanel : public QObject, public DCOPObject {
+ class NSPanel : public TQObject, public DCOPObject {
Q_OBJECT
K_DCOP
public:
- NSPanel(QObject *parent, const char *name, const QString &key,
+ NSPanel(TQObject *parent, const char *name, const TQString &key,
DCOPRef *rssservice);
~NSPanel();
- void setTitle(const QString &tit);
+ void setTitle(const TQString &tit);
void setListbox(TTListBox *lb);
- void setPixmap(const QPixmap &pm);
- void setPixmapBuffer(QBuffer *buf);
+ void setPixmap(const TQPixmap &pm);
+ void setPixmapBuffer(TQBuffer *buf);
void setJob(KIO::Job *kio_job);
TTListBox *listbox() const;
- QPixmap pixmap();
- QString key() const;
- QString title() const;
- QStringList articles();
- QStringList articleLinks();
+ TQPixmap pixmap();
+ TQString key() const;
+ TQString title() const;
+ TQStringList articles();
+ TQStringList articleLinks();
bool isValid() const;
k_dcop:
@@ -83,15 +83,15 @@ namespace KSB_News {
private:
DCOPRef *m_rssservice;
DCOPRef m_rssdocument;
- QString m_key;
- QString m_title;
+ TQString m_key;
+ TQString m_title;
TTListBox *m_listbox;
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
int m_count;
- QStringList m_articles; // TODO: use proper container
- QStringList m_articlelinks; // TODO: use proper container
+ TQStringList m_articles; // TODO: use proper container
+ TQStringList m_articlelinks; // TODO: use proper container
int m_timeoutinterval;
- QTimer *m_timer;
+ TQTimer *m_timer;
bool m_isValid;
signals:
diff --git a/konq-plugins/sidebar/newsticker/nsstacktabwidget.cpp b/konq-plugins/sidebar/newsticker/nsstacktabwidget.cpp
index 74aa07e..6c7e44b 100644
--- a/konq-plugins/sidebar/newsticker/nsstacktabwidget.cpp
+++ b/konq-plugins/sidebar/newsticker/nsstacktabwidget.cpp
@@ -25,14 +25,14 @@
Boston, MA 02110-1301, USA.
*/
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qscrollview.h>
-#include <qptrdict.h>
-#include <qsizepolicy.h>
-#include <qtooltip.h>
-#include <qcursor.h>
-#include <qimage.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqscrollview.h>
+#include <tqptrdict.h>
+#include <tqsizepolicy.h>
+#include <tqtooltip.h>
+#include <tqcursor.h>
+#include <tqimage.h>
#include <kdebug.h>
#include <kaboutdata.h>
#include <kaboutapplication.h>
@@ -50,10 +50,10 @@
namespace KSB_News {
- NSStackTabWidget::NSStackTabWidget(QWidget *parent, const char *name,
- QPixmap appIcon) : QWidget(parent, name) {
+ NSStackTabWidget::NSStackTabWidget(TQWidget *parent, const char *name,
+ TQPixmap appIcon) : TQWidget(parent, name) {
currentPage = 0;
- layout = new QVBoxLayout(this);
+ layout = new TQVBoxLayout(this);
pagesheader.setAutoDelete(TRUE);
pages.setAutoDelete(TRUE);
@@ -86,19 +86,19 @@ namespace KSB_News {
popup = new KPopupMenu(this);
popup->insertItem(KStdGuiItem::configure().iconSet(),
i18n("&Configure Newsticker..."), this,
- SLOT(slotConfigure()));
+ TQT_SLOT(slotConfigure()));
popup->insertItem(SmallIconSet("reload"), i18n("&Reload"), this,
- SLOT(slotRefresh()));
+ TQT_SLOT(slotRefresh()));
popup->insertItem(KStdGuiItem::close().iconSet(),
- KStdGuiItem::close().text(), this, SLOT(slotClose()));
+ KStdGuiItem::close().text(), this, TQT_SLOT(slotClose()));
popup->insertSeparator();
// help menu
helpmenu = new KPopupMenu(this);
helpmenu->insertItem(appIcon, i18n("&About Newsticker"), this,
- SLOT(slotShowAbout()));
+ TQT_SLOT(slotShowAbout()));
helpmenu->insertItem(i18n("&Report Bug..."), this,
- SLOT(slotShowBugreport()));
+ TQT_SLOT(slotShowBugreport()));
popup->insertItem(KStdGuiItem::help().iconSet(),
KStdGuiItem::help().text(), helpmenu);
@@ -109,24 +109,24 @@ namespace KSB_News {
}
- void NSStackTabWidget::addStackTab(NSPanel *nsp, QWidget *page) {
- QPushButton *button = new QPushButton(this);
+ void NSStackTabWidget::addStackTab(NSPanel *nsp, TQWidget *page) {
+ TQPushButton *button = new TQPushButton(this);
button->setText(KStringHandler::rPixelSqueeze(nsp->title(),
button->fontMetrics(),
button->width() - 4 ));
- button->setSizePolicy(QSizePolicy(QSizePolicy::Preferred,
- QSizePolicy::Preferred));
- connect(button, SIGNAL(clicked()), this, SLOT(buttonClicked()));
- QToolTip::add(button, nsp->title());
+ button->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred,
+ TQSizePolicy::Preferred));
+ connect(button, TQT_SIGNAL(clicked()), this, TQT_SLOT(buttonClicked()));
+ TQToolTip::add(button, nsp->title());
// eventFiler for the title button
button->installEventFilter(this);
- QScrollView *sv = new QScrollView(this);
- sv->setResizePolicy(QScrollView::AutoOneFit);
+ TQScrollView *sv = new TQScrollView(this);
+ sv->setResizePolicy(TQScrollView::AutoOneFit);
sv->addChild(page);
- sv->setFrameStyle(QFrame::NoFrame);
+ sv->setFrameStyle(TQFrame::NoFrame);
page->show();
pagesheader.insert(nsp, button);
@@ -150,8 +150,8 @@ namespace KSB_News {
pagesheader.remove(nsp);
if (pages.count() >= 1) {
- QPtrDictIterator<QWidget> it(pages);
- QWidget *previousPage = currentPage;
+ TQPtrDictIterator<TQWidget> it(pages);
+ TQWidget *previousPage = currentPage;
currentPage = it.current();
if (currentPage != previousPage)
currentPage->show();
@@ -161,7 +161,7 @@ namespace KSB_News {
void NSStackTabWidget::updateTitle(NSPanel *nsp) {
- QPushButton *pb = (QPushButton *)pagesheader.find(nsp);
+ TQPushButton *pb = (TQPushButton *)pagesheader.find(nsp);
if (! pb->pixmap())
pb->setText(nsp->title());
}
@@ -169,11 +169,11 @@ namespace KSB_News {
void NSStackTabWidget::updatePixmap(NSPanel *nsp) {
- QPushButton *pb = (QPushButton *)pagesheader.find(nsp);
- QPixmap pixmap = nsp->pixmap();
+ TQPushButton *pb = (TQPushButton *)pagesheader.find(nsp);
+ TQPixmap pixmap = nsp->pixmap();
if ((pixmap.width() > 88) || (pixmap.height() > 31)) {
- QImage image = pixmap.convertToImage();
- pixmap.convertFromImage(image.smoothScale(88, 31, QImage::ScaleMin));
+ TQImage image = pixmap.convertToImage();
+ pixmap.convertFromImage(image.smoothScale(88, 31, TQImage::ScaleMin));
}
pb->setPixmap(pixmap);
}
@@ -182,13 +182,13 @@ namespace KSB_News {
void NSStackTabWidget::buttonClicked() {
- QPushButton *pb = (QPushButton*)sender();
+ TQPushButton *pb = (TQPushButton*)sender();
NSPanel *nsp = NULL;
// Which NSPanel belongs to pb
- QPtrDictIterator<QWidget> it(pagesheader);
+ TQPtrDictIterator<TQWidget> it(pagesheader);
for (; it.current(); ++it) {
- QPushButton *currentWidget = (QPushButton *)it.current();
+ TQPushButton *currentWidget = (TQPushButton *)it.current();
if (currentWidget == pb)
nsp = (NSPanel *)it.currentKey();
}
@@ -197,7 +197,7 @@ namespace KSB_News {
return;
// Find current ScrollView
- QWidget *sv = pages.find(nsp);
+ TQWidget *sv = pages.find(nsp);
// Change visible page
if (currentPage != sv) {
@@ -211,22 +211,22 @@ namespace KSB_News {
- bool NSStackTabWidget::eventFilter(QObject *obj, QEvent *ev) {
- if (ev->type() == QEvent::MouseButtonPress
- && ((QMouseEvent *)ev)->button() == QMouseEvent::RightButton) {
- m_last_button_rightclicked = (QPushButton *)obj;
- popup->exec(QCursor::pos());
+ bool NSStackTabWidget::eventFilter(TQObject *obj, TQEvent *ev) {
+ if (ev->type() == TQEvent::MouseButtonPress
+ && ((TQMouseEvent *)ev)->button() == TQMouseEvent::RightButton) {
+ m_last_button_rightclicked = (TQPushButton *)obj;
+ popup->exec(TQCursor::pos());
return true;
- } else if (ev->type() == QEvent::Resize) {
- QPushButton *pb = (QPushButton *)obj;
+ } else if (ev->type() == TQEvent::Resize) {
+ TQPushButton *pb = (TQPushButton *)obj;
- const QPixmap *pm = pb->pixmap();
+ const TQPixmap *pm = pb->pixmap();
if ( ! pm ) {
// Which NSPanel belongs to pb
NSPanel *nsp = NULL;
- QPtrDictIterator<QWidget> it(pagesheader);
+ TQPtrDictIterator<TQWidget> it(pagesheader);
for (; it.current(); ++it) {
- QPushButton *currentWidget = (QPushButton *)it.current();
+ TQPushButton *currentWidget = (TQPushButton *)it.current();
if (currentWidget == pb)
nsp = (NSPanel *)it.currentKey();
}
@@ -256,12 +256,12 @@ namespace KSB_News {
KDialogBase::Ok,
true);
ConfigFeeds *conf_widget = new ConfigFeeds(0, "feedcfgdlg");
- m_confdlg->addPage(conf_widget, i18n("RSS Settings"), QString());
+ m_confdlg->addPage(conf_widget, i18n("RSS Settings"), TQString());
// User edited the configuration - update your local copies of the
// configuration data
- connect(m_confdlg, SIGNAL(settingsChanged()), this,
- SLOT(slotConfigure_okClicked()));
+ connect(m_confdlg, TQT_SIGNAL(settingsChanged()), this,
+ TQT_SLOT(slotConfigure_okClicked()));
m_confdlg->show();
}
@@ -271,7 +271,7 @@ namespace KSB_News {
DCOPRef rss_document("rssservice", "RSSService");
// remove old sources and old stack tabs
- QStringList::iterator it;
+ TQStringList::iterator it;
for (it = m_our_rsssources.begin(); it != m_our_rsssources.end(); ++it) {
rss_document.call("remove", (*it));
}
@@ -304,9 +304,9 @@ namespace KSB_News {
NSPanel *nsp = NULL;
// find appendant NSPanel
- QPtrDictIterator<QWidget> it(pagesheader);
+ TQPtrDictIterator<TQWidget> it(pagesheader);
for (; it.current(); ++it) {
- QPushButton *currentWidget = (QPushButton *)it.current();
+ TQPushButton *currentWidget = (TQPushButton *)it.current();
if (currentWidget == m_last_button_rightclicked)
nsp = (NSPanel *)it.currentKey();
}
@@ -322,9 +322,9 @@ namespace KSB_News {
void NSStackTabWidget::slotClose() {
NSPanel *nsp = NULL;
// find appendant NSPanel
- QPtrDictIterator<QWidget> it(pagesheader);
+ TQPtrDictIterator<TQWidget> it(pagesheader);
for (; it.current(); ++it) {
- QPushButton *currentWidget = (QPushButton *)it.current();
+ TQPushButton *currentWidget = (TQPushButton *)it.current();
if (currentWidget == m_last_button_rightclicked)
nsp = (NSPanel *)it.currentKey();
}
@@ -350,7 +350,7 @@ namespace KSB_News {
}
- bool NSStackTabWidget::isRegistered(const QString &key) {
+ bool NSStackTabWidget::isRegistered(const TQString &key) {
m_our_rsssources = SidebarSettings::sources();
if (m_our_rsssources.findIndex(key) == -1)
return false;
diff --git a/konq-plugins/sidebar/newsticker/nsstacktabwidget.h b/konq-plugins/sidebar/newsticker/nsstacktabwidget.h
index 7b84289..fb0da4d 100644
--- a/konq-plugins/sidebar/newsticker/nsstacktabwidget.h
+++ b/konq-plugins/sidebar/newsticker/nsstacktabwidget.h
@@ -28,7 +28,7 @@
#ifndef _NSSTACKTABWIDGET_H_
#define _NSSTACKTABWIDGET_H_
-#include <qptrdict.h>
+#include <tqptrdict.h>
#include "nspanel.h"
@@ -45,21 +45,21 @@ namespace KSB_News {
class NewRssSourceDlg;
- class NSStackTabWidget : public QWidget {
+ class NSStackTabWidget : public TQWidget {
Q_OBJECT
public:
- NSStackTabWidget(QWidget *parent = 0, const char *name = 0,
- QPixmap appIcon = QPixmap());
- void addStackTab(NSPanel *nsp, QWidget *page);
+ NSStackTabWidget(TQWidget *parent = 0, const char *name = 0,
+ TQPixmap appIcon = TQPixmap());
+ void addStackTab(NSPanel *nsp, TQWidget *page);
void delStackTab(NSPanel *nsp);
void updateTitle(NSPanel *nsp);
void updatePixmap(NSPanel *nsp);
bool isEmpty() const;
- bool isRegistered(const QString &key);
+ bool isRegistered(const TQString &key);
protected:
- bool eventFilter(QObject *obj, QEvent *ev);
+ bool eventFilter(TQObject *obj, TQEvent *ev);
private slots:
void buttonClicked();
@@ -71,17 +71,17 @@ namespace KSB_News {
void slotConfigure_okClicked();
private:
- QPtrDict<QWidget> pages;
- QPtrDict<QWidget> pagesheader;
- QVBoxLayout *layout;
- QWidget *currentPage;
+ TQPtrDict<TQWidget> pages;
+ TQPtrDict<TQWidget> pagesheader;
+ TQVBoxLayout *layout;
+ TQWidget *currentPage;
KPopupMenu *popup, *helpmenu;
KAboutData *m_aboutdata;
KAboutApplication *m_about;
KBugReport *m_bugreport;
- QPushButton *m_last_button_rightclicked;
+ TQPushButton *m_last_button_rightclicked;
KConfigDialog *m_confdlg;
- QStringList m_our_rsssources;
+ TQStringList m_our_rsssources;
};
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"));
diff --git a/konq-plugins/sidebar/newsticker/sidebar_news.h b/konq-plugins/sidebar/newsticker/sidebar_news.h
index e6da786..d09862f 100644
--- a/konq-plugins/sidebar/newsticker/sidebar_news.h
+++ b/konq-plugins/sidebar/newsticker/sidebar_news.h
@@ -47,30 +47,30 @@ namespace KSB_News {
K_DCOP
public:
- KonqSidebar_News(KInstance *instance, QObject *parent,
- QWidget *widgetParent, QString &desktopName_,
+ KonqSidebar_News(KInstance *instance, TQObject *parent,
+ TQWidget *widgetParent, TQString &desktopName_,
const char* name=0);
~KonqSidebar_News();
- virtual void *provides(const QString &);
- void emitStatusBarText (const QString &);
- virtual QWidget *getWidget();
+ virtual void *provides(const TQString &);
+ void emitStatusBarText (const TQString &);
+ virtual TQWidget *getWidget();
k_dcop:
- virtual void addedRSSSource(QString);
- virtual void removedRSSSource(QString);
+ virtual void addedRSSSource(TQString);
+ virtual void removedRSSSource(TQString);
protected:
virtual void handleURL(const KURL &url);
private:
int checkDcopService();
- QWidgetStack *widgets;
+ TQWidgetStack *widgets;
NSStackTabWidget *newswidget;
NoRSSWidget *noRSSwidget;
- QPtrList<NSPanel> nspanelptrlist;
- NSPanel *getNSPanelByKey(QString key);
+ TQPtrList<NSPanel> nspanelptrlist;
+ NSPanel *getNSPanelByKey(TQString key);
DCOPRef m_rssservice;
- QPixmap m_appIcon;
+ TQPixmap m_appIcon;
signals:
// see <konqsidebarplugin.h>
@@ -78,7 +78,7 @@ namespace KSB_News {
const KParts::URLArgs &args = KParts::URLArgs());
private slots:
- void slotArticleItemExecuted(QListBoxItem *item);
+ void slotArticleItemExecuted(TQListBoxItem *item);
void updateArticles(NSPanel *nsp);
void updateTitle(NSPanel *nsp);
void updatePixmap(NSPanel *nsp);