summaryrefslogtreecommitdiffstats
path: root/knewsticker/knewsticker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'knewsticker/knewsticker.cpp')
-rw-r--r--knewsticker/knewsticker.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/knewsticker/knewsticker.cpp b/knewsticker/knewsticker.cpp
index 90a05066..a23696d5 100644
--- a/knewsticker/knewsticker.cpp
+++ b/knewsticker/knewsticker.cpp
@@ -28,7 +28,7 @@
#include <kstartupinfo.h>
#include <tqcursor.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqtimer.h>
#include <tqtooltip.h>
@@ -47,7 +47,7 @@ KNewsTicker::KNewsTicker(const TQString &cfgFile, Type t, int actions, TQWidget
I18N_NOOP("A news ticker applet."), KAboutData::License_BSD,
I18N_NOOP("(c) 2000, 2001 The KNewsTicker developers")))
{
- TQHBoxLayout *layout = new TQHBoxLayout(this);
+ TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
m_contextMenu = new KNewsTickerMenu(this);
connect(m_contextMenu, TQT_SIGNAL(aboutToHide()),
@@ -59,10 +59,10 @@ KNewsTicker::KNewsTicker(const TQString &cfgFile, Type t, int actions, TQWidget
connect(m_arrowButton, TQT_SIGNAL(clicked()), TQT_SLOT(slotArrowButtonPressed()));
m_arrowButton->setFocusPolicy(TQ_NoFocus);
setupArrowButton();
- layout->addWidget(m_arrowButton);
+ tqlayout->addWidget(m_arrowButton);
m_scroller = new NewsScroller(this, m_cfg);
- layout->addWidget(m_scroller);
+ tqlayout->addWidget(m_scroller);
m_dcopClient->registerAs("knewsticker", false);
@@ -95,12 +95,12 @@ KNewsTicker::~KNewsTicker()
int KNewsTicker::heightForWidth(int) const
{
- return m_scroller->sizeHint().height() + m_arrowButton->height();
+ return m_scroller->tqsizeHint().height() + m_arrowButton->height();
}
int KNewsTicker::widthForHeight(int) const
{
- return m_scroller->sizeHint().width() + m_arrowButton->width();
+ return m_scroller->tqsizeHint().width() + m_arrowButton->width();
}
void KNewsTicker::preferences()
@@ -119,7 +119,7 @@ void KNewsTicker::about()
void KNewsTicker::help()
{
- kapp->invokeHelp(TQString(), TQString::fromLatin1("knewsticker"));
+ kapp->invokeHelp(TQString(), TQString::tqfromLatin1("knewsticker"));
}
void KNewsTicker::reportBug()
@@ -212,7 +212,7 @@ void KNewsTicker::slotNewsSourceUpdated(const NewsSourceBase::Ptr &ns,
if (m_newNews) {
KNotifyClient::Instance instance(m_instance);
- KNotifyClient::event(winId(), TQString::fromLatin1("NewNews"));
+ KNotifyClient::event(winId(), TQString::tqfromLatin1("NewNews"));
}
}
@@ -242,12 +242,12 @@ void KNewsTicker::slotArrowButtonPressed()
if (position() == KPanelApplet::pTop) {
pos.setY(pos.y() + size.height() + 2);
} else if (position() == KPanelApplet::pBottom) {
- const int y = pos.y() - m_contextMenu->sizeHint().height() - 2;
+ const int y = pos.y() - m_contextMenu->tqsizeHint().height() - 2;
pos.setY(TQMAX(0, y));
} else if (position() == KPanelApplet::pLeft ) {
pos.setX(pos.x() + size.width() + 2);
} else { // position() == KPanelApplet::pRight
- const int x = pos.x() - m_contextMenu->sizeHint().width() - 2;
+ const int x = pos.x() - m_contextMenu->tqsizeHint().width() - 2;
pos.setX(TQMAX(0, x));
}
@@ -257,21 +257,21 @@ void KNewsTicker::slotArrowButtonPressed()
void KNewsTicker::positionChange(Position)
{
- delete layout();
+ delete tqlayout();
- TQBoxLayout *layout;
+ TQBoxLayout *tqlayout;
if (orientation() ==Qt::Horizontal)
- layout = new TQHBoxLayout(this);
+ tqlayout = new TQHBoxLayout(this);
else
- layout = new TQVBoxLayout(this);
+ tqlayout = new TQVBoxLayout(this);
if (m_arrowButton) {
- layout->addWidget(m_arrowButton);
+ tqlayout->addWidget(m_arrowButton);
setupArrowButton();
}
- layout->addWidget(m_scroller);
+ tqlayout->addWidget(m_scroller);
}
void KNewsTicker::slotContextMenuAboutToHide()
@@ -288,20 +288,20 @@ void KNewsTicker::slotNotifyOfFailures()
if (m_failedNewsUpdates.count() == 1)
notification = i18n("<qt>Could not update news site '%1'.<br>"
"The supplied resource file is probably invalid or"
- " broken.</qt>").arg(m_failedNewsUpdates.first());
+ " broken.</qt>").tqarg(m_failedNewsUpdates.first());
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>");
TQStringList::ConstIterator it = m_failedNewsUpdates.begin();
TQStringList::ConstIterator end = m_failedNewsUpdates.end();
for (; it != end; ++it)
- notification += TQString::fromLatin1("<li>%1</li>").arg(*it);
- notification += TQString::fromLatin1("</ul></qt>");
+ notification += TQString::tqfromLatin1("<li>%1</li>").tqarg(*it);
+ notification += TQString::tqfromLatin1("</ul></qt>");
} else
notification = i18n("Failed to update several news"
" sites. The Internet connection might be cut.");
- KNotifyClient::event(winId(), TQString::fromLatin1("InvalidRDF"), notification);
+ KNotifyClient::event(winId(), TQString::tqfromLatin1("InvalidRDF"), notification);
}
void KNewsTicker::setInterval(const uint interval)
@@ -417,10 +417,10 @@ void KNewsTickerMenu::populateMenu()
* Perhaps this hardcoded stuff should be replaced by some kind of
* themeing functionality?
*/
- 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"));
+ const TQPixmap lookIcon = SmallIcon(TQString::tqfromLatin1("viewmag"));
+ const TQPixmap newArticleIcon = SmallIcon(TQString::tqfromLatin1("info"));
+ const TQPixmap oldArticleIcon = SmallIcon(TQString::tqfromLatin1("mime_empty"));
+ const TQPixmap noArticlesIcon = SmallIcon(TQString::tqfromLatin1("remove"));
unsigned int articleIdx = 0;
const NewsSourceBase::List sources = m_parent->m_newsSources;
@@ -467,9 +467,9 @@ void KNewsTickerMenu::populateMenu()
if (m_fullMenu) {
insertSeparator();
- const TQPixmap logoIcon = SmallIcon(TQString::fromLatin1("knewsticker"));
- const TQPixmap helpIcon = SmallIcon(TQString::fromLatin1("help"));
- const TQPixmap confIcon = SmallIcon(TQString::fromLatin1("configure"));
+ const TQPixmap logoIcon = SmallIcon(TQString::tqfromLatin1("knewsticker"));
+ const TQPixmap helpIcon = SmallIcon(TQString::tqfromLatin1("help"));
+ const TQPixmap confIcon = SmallIcon(TQString::tqfromLatin1("configure"));
insertTitle(logoIcon, i18n("KNewsTicker"), 0, 0);
@@ -535,7 +535,7 @@ extern "C"
{
KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString &configFile)
{
- KGlobal::locale()->insertCatalogue(TQString::fromLatin1("knewsticker"));
+ KGlobal::locale()->insertCatalogue(TQString::tqfromLatin1("knewsticker"));
return new KNewsTicker(configFile, KPanelApplet::Stretch,
KPanelApplet::Preferences | KPanelApplet::About |
KPanelApplet::Help | KPanelApplet::ReportBug,