diff options
Diffstat (limited to 'konq-plugins/sidebar/newsticker/nsstacktabwidget.cpp')
-rw-r--r-- | konq-plugins/sidebar/newsticker/nsstacktabwidget.cpp | 110 |
1 files changed, 55 insertions, 55 deletions
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; |