summaryrefslogtreecommitdiffstats
path: root/knewsticker/knewsticker.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:49:40 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:49:40 -0600
commit808e453c56036211f57482ed847d54aca01bba68 (patch)
tree75515d5768dea10d4fbe4cd772e0a89c1c4b3aa9 /knewsticker/knewsticker.cpp
parentcd9b9ed7fd0ac8a75106148254aa58e2e5c04863 (diff)
downloadtdenetwork-808e453c56036211f57482ed847d54aca01bba68.tar.gz
tdenetwork-808e453c56036211f57482ed847d54aca01bba68.zip
Rename a number of old tq methods that are no longer tq specific
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 a23696d5..90a05066 100644
--- a/knewsticker/knewsticker.cpp
+++ b/knewsticker/knewsticker.cpp
@@ -28,7 +28,7 @@
#include <kstartupinfo.h>
#include <tqcursor.h>
-#include <tqlayout.h>
+#include <layout.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 *tqlayout = new TQHBoxLayout(this);
+ TQHBoxLayout *layout = 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();
- tqlayout->addWidget(m_arrowButton);
+ layout->addWidget(m_arrowButton);
m_scroller = new NewsScroller(this, m_cfg);
- tqlayout->addWidget(m_scroller);
+ layout->addWidget(m_scroller);
m_dcopClient->registerAs("knewsticker", false);
@@ -95,12 +95,12 @@ KNewsTicker::~KNewsTicker()
int KNewsTicker::heightForWidth(int) const
{
- return m_scroller->tqsizeHint().height() + m_arrowButton->height();
+ return m_scroller->sizeHint().height() + m_arrowButton->height();
}
int KNewsTicker::widthForHeight(int) const
{
- return m_scroller->tqsizeHint().width() + m_arrowButton->width();
+ return m_scroller->sizeHint().width() + m_arrowButton->width();
}
void KNewsTicker::preferences()
@@ -119,7 +119,7 @@ void KNewsTicker::about()
void KNewsTicker::help()
{
- kapp->invokeHelp(TQString(), TQString::tqfromLatin1("knewsticker"));
+ kapp->invokeHelp(TQString(), TQString::fromLatin1("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::tqfromLatin1("NewNews"));
+ KNotifyClient::event(winId(), TQString::fromLatin1("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->tqsizeHint().height() - 2;
+ const int y = pos.y() - m_contextMenu->sizeHint().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->tqsizeHint().width() - 2;
+ const int x = pos.x() - m_contextMenu->sizeHint().width() - 2;
pos.setX(TQMAX(0, x));
}
@@ -257,21 +257,21 @@ void KNewsTicker::slotArrowButtonPressed()
void KNewsTicker::positionChange(Position)
{
- delete tqlayout();
+ delete layout();
- TQBoxLayout *tqlayout;
+ TQBoxLayout *layout;
if (orientation() ==Qt::Horizontal)
- tqlayout = new TQHBoxLayout(this);
+ layout = new TQHBoxLayout(this);
else
- tqlayout = new TQVBoxLayout(this);
+ layout = new TQVBoxLayout(this);
if (m_arrowButton) {
- tqlayout->addWidget(m_arrowButton);
+ layout->addWidget(m_arrowButton);
setupArrowButton();
}
- tqlayout->addWidget(m_scroller);
+ layout->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>").tqarg(m_failedNewsUpdates.first());
+ " broken.</qt>").arg(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::tqfromLatin1("<li>%1</li>").tqarg(*it);
- notification += TQString::tqfromLatin1("</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(), TQString::tqfromLatin1("InvalidRDF"), notification);
+ KNotifyClient::event(winId(), TQString::fromLatin1("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::tqfromLatin1("viewmag"));
- const TQPixmap newArticleIcon = SmallIcon(TQString::tqfromLatin1("info"));
- const TQPixmap oldArticleIcon = SmallIcon(TQString::tqfromLatin1("mime_empty"));
- const TQPixmap noArticlesIcon = SmallIcon(TQString::tqfromLatin1("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;
@@ -467,9 +467,9 @@ void KNewsTickerMenu::populateMenu()
if (m_fullMenu) {
insertSeparator();
- const TQPixmap logoIcon = SmallIcon(TQString::tqfromLatin1("knewsticker"));
- const TQPixmap helpIcon = SmallIcon(TQString::tqfromLatin1("help"));
- const TQPixmap confIcon = SmallIcon(TQString::tqfromLatin1("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);
@@ -535,7 +535,7 @@ extern "C"
{
KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString &configFile)
{
- KGlobal::locale()->insertCatalogue(TQString::tqfromLatin1("knewsticker"));
+ KGlobal::locale()->insertCatalogue(TQString::fromLatin1("knewsticker"));
return new KNewsTicker(configFile, KPanelApplet::Stretch,
KPanelApplet::Preferences | KPanelApplet::About |
KPanelApplet::Help | KPanelApplet::ReportBug,