diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-22 00:30:31 +0000 |
commit | 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 (patch) | |
tree | 073fde0496ea90eb5bf5cffe66a8da43a9f55fbc /knewsticker/knewstickerconfig.cpp | |
parent | 3467e6464beac3a162839bf7078e22e3a74d73e7 (diff) | |
download | tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.tar.gz tdenetwork-69cac65817d949cda2672ec4f0aa73d5e66a0ba1.zip |
TQt4 port kdenetwork
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'knewsticker/knewstickerconfig.cpp')
-rw-r--r-- | knewsticker/knewstickerconfig.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/knewsticker/knewstickerconfig.cpp b/knewsticker/knewstickerconfig.cpp index 4aa04851..9f868beb 100644 --- a/knewsticker/knewstickerconfig.cpp +++ b/knewsticker/knewstickerconfig.cpp @@ -33,8 +33,8 @@ #include <tqslider.h> #include <tqregexp.h> -CategoryItem::CategoryItem(TQListView *parent, const TQString &text) - : TQListViewItem(parent, text) +CategoryItem::CategoryItem(TQListView *tqparent, const TQString &text) + : TQListViewItem(tqparent, text) { setOpen(true); } @@ -42,17 +42,17 @@ CategoryItem::CategoryItem(TQListView *parent, const TQString &text) void CategoryItem::setOpen(bool open) { if (open) - setPixmap(0, SmallIcon(TQString::fromLatin1("folder_open"))); + setPixmap(0, SmallIcon(TQString::tqfromLatin1("folder_open"))); else - setPixmap(0, SmallIcon(TQString::fromLatin1("folder"))); + setPixmap(0, SmallIcon(TQString::tqfromLatin1("folder"))); TQListViewItem::setOpen(open); } -NewsSourceItem::NewsSourceItem(KNewsTickerConfig *kcm, CategoryItem *parent, +NewsSourceItem::NewsSourceItem(KNewsTickerConfig *kcm, CategoryItem *tqparent, const NewsSourceBase::Data &nsd) - : TQCheckListItem(parent, TQString::null, TQCheckListItem::CheckBox), - m_parent(parent), + : TQCheckListItem(tqparent, TQString(), TQCheckListItem::CheckBox), + m_parent(tqparent), m_kcm(kcm) { setData(nsd); @@ -89,15 +89,15 @@ void NewsSourceItem::setIcon(const TQPixmap &pixmap) setPixmap(0, pixmap); } -KNewsTickerConfig::KNewsTickerConfig(ConfigAccess *cfg, TQWidget *parent, const char *name) - : KDialogBase(parent, name, true, i18n("Configuration"), Ok|Close), +KNewsTickerConfig::KNewsTickerConfig(ConfigAccess *cfg, TQWidget *tqparent, const char *name) + : KDialogBase(tqparent, name, true, i18n("Configuration"), Ok|Close), m_cfg(cfg), m_child(new KNewsTickerConfigWidget(this)), m_newsIconMgr(NewsIconMgr::self()) { setMainWidget(m_child); - // Change various properties of the view which the Qt Designer cannot + // Change various properties of the view which the TQt Designer cannot // set at design time yet. m_child->niInterval->setLabel(i18n("News query interval:")); m_child->niInterval->setRange(4, 180); @@ -234,7 +234,7 @@ bool KNewsTickerConfig::eventFilter(TQObject *o, TQEvent *e) if ( TQTextDrag::decode(d, newSourceUrl) ) { // <HACK> // This is just for http://www.webreference.com/services/news/ - newSourceUrl = newSourceUrl.replace( TQRegExp("^view-source:http%3A//"), "http://" ); + newSourceUrl = newSourceUrl.tqreplace( TQRegExp("^view-source:http%3A//"), "http://" ); // </HACK> newSourceUrl = newSourceUrl.stripWhiteSpace(); @@ -251,7 +251,7 @@ bool KNewsTickerConfig::eventFilter(TQObject *o, TQEvent *e) } int i = 0; while (validName == false) { - name = i18n("Unknown %1").arg(i); + name = i18n("Unknown %1").tqarg(i); for (TQListViewItemIterator it(m_child->lvNewsSources); it.current(); it++) { if (it.current()->text(0) == name) { i++; @@ -320,7 +320,7 @@ void KNewsTickerConfig::removeNewsSource() " source?</p>", "<p>Do you really want to remove these %n news" " sources?</p>", - m_child->lvNewsSources->selectedItems().count()), TQString::null, KStdGuiItem::del()) == KMessageBox::Continue) { + m_child->lvNewsSources->selectedItems().count()), TQString(), KStdGuiItem::del()) == KMessageBox::Continue) { int itemCount = m_child->lvNewsSources->selectedItems().count(); for (int j = 0; j < itemCount; j++) { if (m_child->lvNewsSources->selectedItems().isEmpty()) { break; } @@ -330,8 +330,8 @@ void KNewsTickerConfig::removeNewsSource() m_child->comboFilterNewsSource->removeItem(i); break; } - if (dynamic_cast<NewsSourceItem *>(item) && item->parent()->childCount() == 1) - delete item->parent(); + if (dynamic_cast<NewsSourceItem *>(item) && item->tqparent()->childCount() == 1) + delete item->tqparent(); else delete item; } @@ -343,7 +343,7 @@ void KNewsTickerConfig::removeNewsSource() void KNewsTickerConfig::removeFilter(TQListViewItem *item) { if (KMessageBox::warningContinueCancel(this, i18n("<p>Do you really want to remove the selected" - " filter?</p>"), TQString::null, KStdGuiItem::del()) == KMessageBox::Continue) { + " filter?</p>"), TQString(), KStdGuiItem::del()) == KMessageBox::Continue) { delete item; m_child->bRemoveFilter->setEnabled(false); } @@ -356,17 +356,17 @@ void KNewsTickerConfig::slotNewsSourceContextMenu(KListView *, TQListViewItem *i KPopupMenu *menu = new KPopupMenu(); - TQPixmap addIcon = SmallIcon(TQString::fromLatin1("news_subscribe")); - TQPixmap modifyIcon = SmallIcon(TQString::fromLatin1("edit")); - TQPixmap removeIcon = SmallIcon(TQString::fromLatin1("news_unsubscribe")); - TQPixmap logoIcon = SmallIcon(TQString::fromLatin1("knewsticker")); + TQPixmap addIcon = SmallIcon(TQString::tqfromLatin1("news_subscribe")); + TQPixmap modifyIcon = SmallIcon(TQString::tqfromLatin1("edit")); + TQPixmap removeIcon = SmallIcon(TQString::tqfromLatin1("news_unsubscribe")); + TQPixmap logoIcon = SmallIcon(TQString::tqfromLatin1("knewsticker")); menu->insertTitle(logoIcon, i18n("Edit News Source")); menu->insertItem(addIcon, i18n("&Add News Source"), 0); if (item) { - menu->insertItem(modifyIcon, i18n("&Modify '%1'").arg(item->text(0)), 1); + menu->insertItem(modifyIcon, i18n("&Modify '%1'").tqarg(item->text(0)), 1); if (m_child->lvNewsSources->selectedItems().count() == 1) { - menu->insertItem(removeIcon, i18n("&Remove '%1'").arg(item->text(0)), 2); + menu->insertItem(removeIcon, i18n("&Remove '%1'").tqarg(item->text(0)), 2); } else { menu->insertItem(removeIcon, i18n("&Remove News Sources"), 2); } @@ -421,10 +421,10 @@ void KNewsTickerConfig::slotModifyNewsSource() void KNewsTickerConfig::slotModifyNewsSource(const NewsSourceBase::Data &nsd) { if (m_modifyItem->data().subject != nsd.subject) { - TQListViewItem *parentItem = m_modifyItem->parentItem(); - parentItem->takeItem(m_modifyItem); - if (parentItem->childCount() == 0) - delete parentItem; + TQListViewItem *tqparentItem = m_modifyItem->tqparentItem(); + tqparentItem->takeItem(m_modifyItem); + if (tqparentItem->childCount() == 0) + delete tqparentItem; CategoryItem *catItem = 0L; @@ -565,7 +565,7 @@ void KNewsTickerConfig::getNewsIcon(NewsSourceItem *item, const KURL &url) void KNewsTickerConfig::slotGotNewsIcon(const KURL &url, const TQPixmap &pixmap) { - if (m_itemIconMap.find(url.url()) == m_itemIconMap.end()) { + if (m_itemIconMap.tqfind(url.url()) == m_itemIconMap.end()) { kdDebug(5005) << "Got unknown icon for URL " << url << endl; return; } |