summaryrefslogtreecommitdiffstats
path: root/konq-plugins/adblock/adblockdialogue.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/adblockdialogue.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/adblockdialogue.cpp')
-rw-r--r--konq-plugins/adblock/adblockdialogue.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/konq-plugins/adblock/adblockdialogue.cpp b/konq-plugins/adblock/adblockdialogue.cpp
index 5de6efa..1aff0f6 100644
--- a/konq-plugins/adblock/adblockdialogue.cpp
+++ b/konq-plugins/adblock/adblockdialogue.cpp
@@ -24,30 +24,30 @@
#include <kpopupmenu.h>
#include <klocale.h>
-#include <qcursor.h>
-#include <qlabel.h>
-#include <qvbox.h>
-#include <qlineedit.h>
-#include <qcolor.h>
-#include <qfont.h>
-#include <qpainter.h>
-
-AdBlockDlg::AdBlockDlg(QWidget *parent, AdElementList &elements) :
+#include <tqcursor.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
+#include <tqlineedit.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqpainter.h>
+
+AdBlockDlg::AdBlockDlg(TQWidget *parent, AdElementList &elements) :
KDialogBase( parent, "Adblock dialogue", true, "Adblock - able Items", Ok|Cancel, Ok, true )
{
- QVBox *page = makeVBoxMainWidget();
- m_label1 = new QLabel( i18n("All blockable items in this page:"), page, "label1" );
+ TQVBox *page = makeVBoxMainWidget();
+ m_label1 = new TQLabel( i18n("All blockable items in this page:"), page, "label1" );
- m_list = new QListView(page);
+ m_list = new TQListView(page);
m_list->setAllColumnsShowFocus( true );
m_list->addColumn( i18n("Source") );
m_list->addColumn( i18n("Category") );
m_list->addColumn( i18n("Node Name") );
- m_list->setColumnWidthMode(0, QListView::Manual);
- m_list->setColumnWidthMode(1, QListView::Manual);
- m_list->setColumnWidthMode(2, QListView::Manual);
+ m_list->setColumnWidthMode(0, TQListView::Manual);
+ m_list->setColumnWidthMode(1, TQListView::Manual);
+ m_list->setColumnWidthMode(2, TQListView::Manual);
m_list->setColumnWidth(0, 600);
m_list->setColumnWidth(1, 90);
@@ -58,30 +58,30 @@ AdBlockDlg::AdBlockDlg(QWidget *parent, AdElementList &elements) :
{
AdElement &element = (*it);
- QString url = element.url();
+ TQString url = element.url();
ListViewItem *item = new ListViewItem( m_list, url, element.category(), element.type() );
item->setBlocked(element.isBlocked());
}
- m_label2 = new QLabel( i18n("New filter (use * as a wildcard):"), page, "label2" );
+ m_label2 = new TQLabel( i18n("New filter (use * as a wildcard):"), page, "label2" );
- m_filter = new QLineEdit( "", page, "lineedit" );
+ m_filter = new TQLineEdit( "", page, "lineedit" );
- connect(this, SIGNAL( okClicked() ), this, SLOT( validateFilter() ));
- connect(m_list, SIGNAL( doubleClicked(QListViewItem *, const QPoint &, int) ), this, SLOT(updateFilter(QListViewItem *)) );
+ connect(this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( validateFilter() ));
+ connect(m_list, TQT_SIGNAL( doubleClicked(TQListViewItem *, const TQPoint &, int) ), this, TQT_SLOT(updateFilter(TQListViewItem *)) );
m_menu = new KPopupMenu(this);
- m_menu->insertItem(i18n("Filter this item"), this, SLOT(filterItem()));
- m_menu->insertItem(i18n("Filter all items at same path"), this, SLOT(filterPath()));
+ m_menu->insertItem(i18n("Filter this item"), this, TQT_SLOT(filterItem()));
+ m_menu->insertItem(i18n("Filter all items at same path"), this, TQT_SLOT(filterPath()));
connect(m_list,
- SIGNAL( contextMenuRequested( QListViewItem *, const QPoint& , int ) ),
+ TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint& , int ) ),
this,
- SLOT( showContextMenu(QListViewItem *, const QPoint &) ) );
+ TQT_SLOT( showContextMenu(TQListViewItem *, const TQPoint &) ) );
}
-void AdBlockDlg::updateFilter(QListViewItem *selected)
+void AdBlockDlg::updateFilter(TQListViewItem *selected)
{
ListViewItem *item = dynamic_cast<ListViewItem *>(selected);
@@ -96,7 +96,7 @@ void AdBlockDlg::updateFilter(QListViewItem *selected)
void AdBlockDlg::validateFilter()
{
- const QString text = m_filter->text().stripWhiteSpace();
+ const TQString text = m_filter->text().stripWhiteSpace();
if (!text.isEmpty())
emit notEmptyFilter(text);
@@ -104,7 +104,7 @@ void AdBlockDlg::validateFilter()
delayedDestruct();
}
-void AdBlockDlg::showContextMenu(QListViewItem *item, const QPoint &point)
+void AdBlockDlg::showContextMenu(TQListViewItem *item, const TQPoint &point)
{
if (!item) return;
m_menu->popup(point);
@@ -112,14 +112,14 @@ void AdBlockDlg::showContextMenu(QListViewItem *item, const QPoint &point)
void AdBlockDlg::filterItem()
{
- QListViewItem* item = m_list->selectedItem();
+ TQListViewItem* item = m_list->selectedItem();
m_filter->setText( item->text(0) );
}
void AdBlockDlg::filterPath()
{
- QListViewItem* item = m_list->selectedItem();
- QString value = item->text(0);
+ TQListViewItem* item = m_list->selectedItem();
+ TQString value = item->text(0);
m_filter->setText( value.section( '/', 0, -2 ).append("/*") );
}
@@ -133,20 +133,20 @@ AdBlockDlg::~AdBlockDlg()
// ----------------------------------------------------------------------------
-void ListViewItem::paintCell(QPainter *p, const QColorGroup & cg, int column, int width, int align)
+void ListViewItem::paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align)
{
p->save();
- QColorGroup g( cg );
+ TQColorGroup g( cg );
if ( isBlocked() )
{
- g.setColor(QColorGroup::Text, red);
- QFont font;
+ g.setColor(TQColorGroup::Text, red);
+ TQFont font;
font.setItalic(true);
p->setFont(font);
}
- QListViewItem::paintCell(p, g, column, width, align);
+ TQListViewItem::paintCell(p, g, column, width, align);
p->restore();
}