summaryrefslogtreecommitdiffstats
path: root/konq-plugins/adblock/adblock.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/adblock/adblock.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/adblock/adblock.cpp')
-rw-r--r--konq-plugins/adblock/adblock.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/konq-plugins/adblock/adblock.cpp b/konq-plugins/adblock/adblock.cpp
index 30878fd..c18c061 100644
--- a/konq-plugins/adblock/adblock.cpp
+++ b/konq-plugins/adblock/adblock.cpp
@@ -49,14 +49,14 @@
#include <dom/dom_node.h>
using namespace DOM;
-#include <qpixmap.h>
-#include <qcursor.h>
-#include <qregexp.h>
+#include <tqpixmap.h>
+#include <tqcursor.h>
+#include <tqregexp.h>
typedef KGenericFactory<AdBlock> AdBlockFactory;
K_EXPORT_COMPONENT_FACTORY( libadblock, AdBlockFactory( "adblock" ) )
-AdBlock::AdBlock(QObject *parent, const char *name, const QStringList &) :
+AdBlock::AdBlock(TQObject *parent, const char *name, const TQStringList &) :
KParts::Plugin(parent, name),
m_label(0), m_menu(0)
{
@@ -65,10 +65,10 @@ AdBlock::AdBlock(QObject *parent, const char *name, const QStringList &) :
m_menu = new KPopupMenu(m_part->widget());
m_menu->insertTitle(i18n("Adblock"));
- m_menu->insertItem(i18n("Configure"), this, SLOT(showKCModule()));
- m_menu->insertItem(i18n("Show Elements"), this, SLOT(showDialogue()));
+ m_menu->insertItem(i18n("Configure"), this, TQT_SLOT(showKCModule()));
+ m_menu->insertItem(i18n("Show Elements"), this, TQT_SLOT(showDialogue()));
- connect(m_part, SIGNAL(completed()), this, SLOT(initLabel()));
+ connect(m_part, TQT_SIGNAL(completed()), this, TQT_SLOT(initLabel()));
}
AdBlock::~AdBlock()
@@ -95,14 +95,14 @@ void AdBlock::initLabel()
KIconLoader *loader = instance()->iconLoader();
m_label->setFixedHeight(loader->currentSize(KIcon::Small));
- m_label->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed));
+ m_label->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed));
m_label->setUseCursor(false);
m_label->setPixmap(loader->loadIcon("filter", KIcon::Small));
statusBarEx->addStatusBarItem(m_label, 0, false);
- connect(m_label, SIGNAL(leftClickedURL()), this, SLOT(showDialogue()));
- connect(m_label, SIGNAL(rightClickedURL()), this, SLOT(contextMenu()));
+ connect(m_label, TQT_SIGNAL(leftClickedURL()), this, TQT_SLOT(showDialogue()));
+ connect(m_label, TQT_SIGNAL(rightClickedURL()), this, TQT_SLOT(contextMenu()));
}
void AdBlock::showDialogue()
@@ -120,9 +120,9 @@ void AdBlock::showDialogue()
fillBlockableElements(elements);
AdBlockDlg *dialogue = new AdBlockDlg(m_part->widget(), elements);
- connect(dialogue, SIGNAL( notEmptyFilter(const QString&) ), this, SLOT( addAdFilter(const QString&) ));
- connect(dialogue, SIGNAL( cancelClicked() ), dialogue, SLOT( delayedDestruct() ));
- connect(dialogue, SIGNAL( closeClicked() ), dialogue, SLOT( delayedDestruct() ));
+ connect(dialogue, TQT_SIGNAL( notEmptyFilter(const TQString&) ), this, TQT_SLOT( addAdFilter(const TQString&) ));
+ connect(dialogue, TQT_SIGNAL( cancelClicked() ), dialogue, TQT_SLOT( delayedDestruct() ));
+ connect(dialogue, TQT_SIGNAL( closeClicked() ), dialogue, TQT_SLOT( delayedDestruct() ));
dialogue->show();
}
@@ -130,14 +130,14 @@ void AdBlock::showKCModule()
{
KCMultiDialog* dialogue = new KCMultiDialog(m_part->widget());
dialogue->addModule("khtml_filter");
- connect(dialogue, SIGNAL( cancelClicked() ), dialogue, SLOT( delayedDestruct() ));
- connect(dialogue, SIGNAL( closeClicked() ), dialogue, SLOT( delayedDestruct() ));
+ connect(dialogue, TQT_SIGNAL( cancelClicked() ), dialogue, TQT_SLOT( delayedDestruct() ));
+ connect(dialogue, TQT_SIGNAL( closeClicked() ), dialogue, TQT_SLOT( delayedDestruct() ));
dialogue->show();
}
void AdBlock::contextMenu()
{
- m_menu->popup(QCursor::pos());
+ m_menu->popup(TQCursor::pos());
}
void AdBlock::fillBlockableElements(AdElementList &elements)
@@ -172,7 +172,7 @@ void AdBlock::fillWithImages(AdElementList &elements)
DOMString src = image.src();
- QString url = htmlDoc.completeURL(src).string();
+ TQString url = htmlDoc.completeURL(src).string();
if (!url.isEmpty() && url != m_part->baseURL().url())
{
AdElement element(url, "image", "IMG", false);
@@ -185,7 +185,7 @@ void AdBlock::fillWithImages(AdElementList &elements)
void AdBlock::fillWithHtmlTag(AdElementList &elements,
const DOMString &tagName,
const DOMString &attrName,
- const QString &category)
+ const TQString &category)
{
Document doc = m_part->document();
@@ -199,7 +199,7 @@ void AdBlock::fillWithHtmlTag(AdElementList &elements,
DOMString src = attr.nodeValue();
if (src.isNull()) continue;
- QString url = doc.completeURL(src).string();
+ TQString url = doc.completeURL(src).string();
if (!url.isEmpty() && url != m_part->baseURL().url())
{
AdElement element(url, tagName.string(), category, false);
@@ -209,7 +209,7 @@ void AdBlock::fillWithHtmlTag(AdElementList &elements,
}
}
-void AdBlock::addAdFilter(const QString &url)
+void AdBlock::addAdFilter(const TQString &url)
{
//FIXME hackish
KHTMLSettings *settings = const_cast<KHTMLSettings *>(m_part->settings());
@@ -221,8 +221,8 @@ void AdBlock::addAdFilter(const QString &url)
AdElement::AdElement() :
m_url(0), m_category(0), m_type(0), m_blocked(false) {}
-AdElement::AdElement(const QString &url, const QString &category,
- const QString &type, bool blocked) :
+AdElement::AdElement(const TQString &url, const TQString &category,
+ const TQString &type, bool blocked) :
m_url(url), m_category(category), m_type(type), m_blocked(blocked) {}
AdElement &AdElement::operator=(const AdElement &obj)
@@ -250,17 +250,17 @@ void AdElement::setBlocked(bool blocked)
m_blocked = blocked;
}
-const QString &AdElement::url() const
+const TQString &AdElement::url() const
{
return m_url;
}
-const QString &AdElement::category() const
+const TQString &AdElement::category() const
{
return m_category;
}
-const QString &AdElement::type() const
+const TQString &AdElement::type() const
{
return m_type;
}