diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:22:56 +0000 |
commit | 7346aee26bf190a7e70333c40fab4caca847cd27 (patch) | |
tree | 4b019b434f88dcc3eeaafe1d3f26240b4c4718e8 /konq-plugins/microformat | |
parent | 23a3d3aa5b44cbdf305495919866d9dbf4f6da54 (diff) | |
download | tdeaddons-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/microformat')
-rw-r--r-- | konq-plugins/microformat/konqmficon.cpp | 64 | ||||
-rw-r--r-- | konq-plugins/microformat/konqmficon.h | 8 | ||||
-rw-r--r-- | konq-plugins/microformat/pluginbase.cpp | 2 | ||||
-rw-r--r-- | konq-plugins/microformat/pluginbase.h | 2 |
4 files changed, 38 insertions, 38 deletions
diff --git a/konq-plugins/microformat/konqmficon.cpp b/konq-plugins/microformat/konqmficon.cpp index 51fdd97..9dfa53c 100644 --- a/konq-plugins/microformat/konqmficon.cpp +++ b/konq-plugins/microformat/konqmficon.cpp @@ -32,16 +32,16 @@ #include <kstatusbar.h> #include <kurllabel.h> -#include <qcursor.h> -#include <qstylesheet.h> -#include <qtimer.h> -#include <qtooltip.h> +#include <tqcursor.h> +#include <tqstylesheet.h> +#include <tqtimer.h> +#include <tqtooltip.h> typedef KGenericFactory<KonqMFIcon> KonqMFIconFactory; K_EXPORT_COMPONENT_FACTORY(libmfkonqmficon, KonqMFIconFactory("mfkonqmficon")) -KonqMFIcon::KonqMFIcon(QObject *parent, const char *name, const QStringList &) +KonqMFIcon::KonqMFIcon(TQObject *parent, const char *name, const TQStringList &) : KParts::Plugin(parent, name), PluginBase(), m_part(0), m_mfIcon(0), m_statusBarEx(0), m_menu(0) { KGlobal::locale()->insertCatalogue("mf_konqplugin"); @@ -50,14 +50,14 @@ KonqMFIcon::KonqMFIcon(QObject *parent, const char *name, const QStringList &) kdDebug() << "couldn't get part" << endl; return; } - QTimer::singleShot(0, this, SLOT(waitPartToLoad())); + TQTimer::singleShot(0, this, TQT_SLOT(waitPartToLoad())); } void KonqMFIcon::waitPartToLoad() { - connect(m_part, SIGNAL(completed()), this, SLOT(addMFIcon())); - connect(m_part, SIGNAL(completed(bool)), this, SLOT(addMFIcon())); // to make pages with metarefresh to work - connect(m_part, SIGNAL(started(KIO::Job *)), this, SLOT(removeMFIcon())); + connect(m_part, TQT_SIGNAL(completed()), this, TQT_SLOT(addMFIcon())); + connect(m_part, TQT_SIGNAL(completed(bool)), this, TQT_SLOT(addMFIcon())); // to make pages with metarefresh to work + connect(m_part, TQT_SIGNAL(started(KIO::Job *)), this, TQT_SLOT(removeMFIcon())); } @@ -68,8 +68,8 @@ KonqMFIcon::~KonqMFIcon() { } -static QString textForNode(DOM::Node node) { - QString rc; +static TQString textForNode(DOM::Node node) { + TQString rc; DOM::NodeList nl = node.childNodes(); for (unsigned int i = 0; i < nl.length(); ++i) { DOM::Node n = nl.item(i); @@ -82,9 +82,9 @@ static QString textForNode(DOM::Node node) { } -static QString extractAddress(DOM::Node node) { - QString rc = ";;"; - QMap<QString,QString> entry; +static TQString extractAddress(DOM::Node node) { + TQString rc = ";;"; + TQMap<TQString,TQString> entry; DOM::NodeList nodes = node.childNodes(); unsigned int n = nodes.length(); for (unsigned int i = 0; i < n; ++i) { @@ -94,7 +94,7 @@ static QString extractAddress(DOM::Node node) { if (map.item(j).nodeName().string() != "class") { continue; } - QString a = map.item(j).nodeValue().string(); + TQString a = map.item(j).nodeValue().string(); if (a == "street-address") { entry["street-address"] = textForNode(node); } else if (a == "locality") { @@ -113,7 +113,7 @@ static QString extractAddress(DOM::Node node) { void KonqMFIcon::extractCard(DOM::Node node) { - QString name, value; + TQString name, value; DOM::NodeList nodes = node.childNodes(); unsigned int n = nodes.length(); value += "BEGIN:VCARD\nVERSION:3.0\n"; @@ -124,8 +124,8 @@ void KonqMFIcon::extractCard(DOM::Node node) { if (map.item(j).nodeName().string() != "class") { continue; } - QStringList l = QStringList::split(' ', map.item(j).nodeValue().string()); - for (QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { + TQStringList l = TQStringList::split(' ', map.item(j).nodeValue().string()); + for (TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { if (*it == "photo") { } else if (*it == "adr") { value += "ADR:" + extractAddress(node) + "\n"; @@ -142,7 +142,7 @@ void KonqMFIcon::extractCard(DOM::Node node) { } else if (*it == "email") { DOM::Node at = node.attributes().getNamedItem("href"); if (!at.isNull()) { - QString v = at.nodeValue().string(); + TQString v = at.nodeValue().string(); if (v.startsWith("mailto:")) { v = v.mid(7); } @@ -163,7 +163,7 @@ void KonqMFIcon::extractCard(DOM::Node node) { void KonqMFIcon::extractEvent(DOM::Node node) { - QString name, value = "BEGIN:VCALENDAR\nPRODID:-//Konqueror//EN\nVERSION:2.0\nBEGIN:VEVENT\n"; + TQString name, value = "BEGIN:VCALENDAR\nPRODID:-//Konqueror//EN\nVERSION:2.0\nBEGIN:VEVENT\n"; DOM::NodeList nodes = node.childNodes(); unsigned int n = nodes.length(); for (unsigned int i = 0; i < n; ++i) { @@ -173,8 +173,8 @@ void KonqMFIcon::extractEvent(DOM::Node node) { if (map.item(j).nodeName().string() != "class") { continue; } - QStringList l = QStringList::split(' ', map.item(j).nodeValue().string()); - for (QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { + TQStringList l = TQStringList::split(' ', map.item(j).nodeValue().string()); + for (TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it) { if (*it == "url") { DOM::Node at = node.attributes().getNamedItem("href"); if (!at.isNull()) { @@ -247,19 +247,19 @@ void KonqMFIcon::contextMenu() { delete m_menu; m_menu = new KPopupMenu(m_part->widget()); m_menu->insertTitle(i18n("Microformats")); - connect(m_menu, SIGNAL(activated(int)), this, SLOT(addMF(int))); + connect(m_menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(addMF(int))); int id = 0; - for (QValueList<QPair<QString, QString> >::ConstIterator it = _events.begin(); it != _events.end(); ++it) { + for (TQValueList<QPair<TQString, TQString> >::ConstIterator it = _events.begin(); it != _events.end(); ++it) { m_menu->insertItem(SmallIcon("bookmark_add"), (*it).first, id); id++; } - for (QValueList<QPair<QString, QString> >::ConstIterator it = _cards.begin(); it != _cards.end(); ++it) { + for (TQValueList<QPair<TQString, TQString> >::ConstIterator it = _cards.begin(); it != _cards.end(); ++it) { m_menu->insertItem(SmallIcon("bookmark_add"), (*it).first, id); id++; } m_menu->insertSeparator(); - m_menu->insertItem(SmallIcon("bookmark_add"), i18n("Import All Microformats"), this, SLOT(addMFs()), 0, 50000 ); - m_menu->popup(QCursor::pos()); + m_menu->insertItem(SmallIcon("bookmark_add"), i18n("Import All Microformats"), this, TQT_SLOT(addMFs()), 0, 50000 ); + m_menu->popup(TQCursor::pos()); } @@ -275,17 +275,17 @@ void KonqMFIcon::addMFIcon() { m_mfIcon = new KURLLabel(m_statusBarEx->statusBar()); m_mfIcon->setFixedHeight(instance()->iconLoader()->currentSize(KIcon::Small)); - m_mfIcon->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed)); + m_mfIcon->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed)); m_mfIcon->setUseCursor(false); //FIXME hackish - m_mfIcon->setPixmap(QPixmap(locate("data", "microformat/pics/microformat.png"))); + m_mfIcon->setPixmap(TQPixmap(locate("data", "microformat/pics/microformat.png"))); - QToolTip::remove(m_mfIcon); - QToolTip::add(m_mfIcon, i18n("This site has a microformat entry", "This site has %n microformat entries", _events.count() + _cards.count())); + TQToolTip::remove(m_mfIcon); + TQToolTip::add(m_mfIcon, i18n("This site has a microformat entry", "This site has %n microformat entries", _events.count() + _cards.count())); m_statusBarEx->addStatusBarItem(m_mfIcon, 0, true); - connect(m_mfIcon, SIGNAL(leftClickedURL()), this, SLOT(contextMenu())); + connect(m_mfIcon, TQT_SIGNAL(leftClickedURL()), this, TQT_SLOT(contextMenu())); } diff --git a/konq-plugins/microformat/konqmficon.h b/konq-plugins/microformat/konqmficon.h index 819bb2e..3b928c6 100644 --- a/konq-plugins/microformat/konqmficon.h +++ b/konq-plugins/microformat/konqmficon.h @@ -42,7 +42,7 @@ namespace KParts { class KonqMFIcon : public KParts::Plugin, PluginBase { Q_OBJECT public: - KonqMFIcon(QObject *parent, const char *name, const QStringList &); + KonqMFIcon(TQObject *parent, const char *name, const TQStringList &); ~KonqMFIcon(); @@ -52,11 +52,11 @@ class KonqMFIcon : public KParts::Plugin, PluginBase { void extractCard(DOM::Node node); void extractEvent(DOM::Node node); - QGuardedPtr<KHTMLPart> m_part; + TQGuardedPtr<KHTMLPart> m_part; KURLLabel *m_mfIcon; KParts::StatusBarExtension *m_statusBarEx; - QGuardedPtr<KPopupMenu> m_menu; - QValueList<QPair<QString, QString> > _events, _cards; + TQGuardedPtr<KPopupMenu> m_menu; + TQValueList<QPair<TQString, TQString> > _events, _cards; private slots: void waitPartToLoad(); diff --git a/konq-plugins/microformat/pluginbase.cpp b/konq-plugins/microformat/pluginbase.cpp index 9f73dd6..486721a 100644 --- a/konq-plugins/microformat/pluginbase.cpp +++ b/konq-plugins/microformat/pluginbase.cpp @@ -37,7 +37,7 @@ PluginBase::~PluginBase() { } -void PluginBase::addVCardViaDCOP(const QString& card) { +void PluginBase::addVCardViaDCOP(const TQString& card) { DCOPRef("kaddressbook", "AddressBookServiceIface").send("importVCard", card); } diff --git a/konq-plugins/microformat/pluginbase.h b/konq-plugins/microformat/pluginbase.h index e37ea36..7cfd26b 100644 --- a/konq-plugins/microformat/pluginbase.h +++ b/konq-plugins/microformat/pluginbase.h @@ -32,7 +32,7 @@ class PluginBase { ~PluginBase(); public: - void addVCardViaDCOP(const QString& vcard); + void addVCardViaDCOP(const TQString& vcard); }; #endif |