summaryrefslogtreecommitdiffstats
path: root/konq-plugins/microformat/konqmficon.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:22:56 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:22:56 +0000
commit7346aee26bf190a7e70333c40fab4caca847cd27 (patch)
tree4b019b434f88dcc3eeaafe1d3f26240b4c4718e8 /konq-plugins/microformat/konqmficon.cpp
parent23a3d3aa5b44cbdf305495919866d9dbf4f6da54 (diff)
downloadtdeaddons-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/konqmficon.cpp')
-rw-r--r--konq-plugins/microformat/konqmficon.cpp64
1 files changed, 32 insertions, 32 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()));
}