summaryrefslogtreecommitdiffstats
path: root/konq-plugins/domtreeviewer/domtreeview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'konq-plugins/domtreeviewer/domtreeview.cpp')
-rw-r--r--konq-plugins/domtreeviewer/domtreeview.cpp242
1 files changed, 121 insertions, 121 deletions
diff --git a/konq-plugins/domtreeviewer/domtreeview.cpp b/konq-plugins/domtreeviewer/domtreeview.cpp
index 167d85a..d26dbfc 100644
--- a/konq-plugins/domtreeviewer/domtreeview.cpp
+++ b/konq-plugins/domtreeviewer/domtreeview.cpp
@@ -30,17 +30,17 @@
#include <assert.h>
-#include <qapplication.h>
-#include <qcheckbox.h>
-#include <qevent.h>
-#include <qfont.h>
-#include <qfile.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
-#include <qtextstream.h>
-#include <qtimer.h>
-#include <qwidgetstack.h>
+#include <tqapplication.h>
+#include <tqcheckbox.h>
+#include <tqevent.h>
+#include <tqfont.h>
+#include <tqfile.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
+#include <tqwidgetstack.h>
#include <dom/dom_core.h>
#include <dom/html_base.h>
@@ -64,45 +64,45 @@
using namespace domtreeviewer;
-DOMTreeView::DOMTreeView(QWidget *parent, const char* name, bool /*allowSaving*/)
+DOMTreeView::DOMTreeView(TQWidget *parent, const char* name, bool /*allowSaving*/)
: DOMTreeViewBase(parent, name), m_expansionDepth(5), m_maxDepth(0),
m_bPure(true), m_bShowAttributes(true), m_bHighlightHTML(true),
m_findDialog(0), focused_child(0)
{
part = 0;
- const QFont font(KGlobalSettings::generalFont());
+ const TQFont font(KGlobalSettings::generalFont());
m_listView->setFont( font );
m_listView->setSorting(-1);
m_rootListView = m_listView;
m_pureCheckBox->setChecked(m_bPure);
- connect(m_pureCheckBox, SIGNAL(toggled(bool)), this, SLOT(slotPureToggled(bool)));
+ connect(m_pureCheckBox, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotPureToggled(bool)));
m_showAttributesCheckBox->setChecked(m_bShowAttributes);
- connect(m_showAttributesCheckBox, SIGNAL(toggled(bool)), this,
- SLOT(slotShowAttributesToggled(bool)));
+ connect(m_showAttributesCheckBox, TQT_SIGNAL(toggled(bool)), this,
+ TQT_SLOT(slotShowAttributesToggled(bool)));
m_highlightHTMLCheckBox->setChecked(m_bHighlightHTML);
- connect(m_highlightHTMLCheckBox, SIGNAL(toggled(bool)), this,
- SLOT(slotHighlightHTMLToggled(bool)));
+ connect(m_highlightHTMLCheckBox, TQT_SIGNAL(toggled(bool)), this,
+ TQT_SLOT(slotHighlightHTMLToggled(bool)));
- connect(m_listView, SIGNAL(clicked(QListViewItem *)), this,
- SLOT(slotItemClicked(QListViewItem *)));
- connect(m_listView, SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)),
- SLOT(showDOMTreeContextMenu(QListViewItem *, const QPoint &, int)));
- connect(m_listView, SIGNAL(moved(QPtrList<QListViewItem> &, QPtrList<QListViewItem> &, QPtrList<QListViewItem> &)),
- SLOT(slotMovedItems(QPtrList<QListViewItem> &, QPtrList<QListViewItem> &, QPtrList<QListViewItem> &)));
+ connect(m_listView, TQT_SIGNAL(clicked(TQListViewItem *)), this,
+ TQT_SLOT(slotItemClicked(TQListViewItem *)));
+ connect(m_listView, TQT_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)),
+ TQT_SLOT(showDOMTreeContextMenu(TQListViewItem *, const TQPoint &, int)));
+ connect(m_listView, TQT_SIGNAL(moved(TQPtrList<TQListViewItem> &, TQPtrList<TQListViewItem> &, TQPtrList<TQListViewItem> &)),
+ TQT_SLOT(slotMovedItems(TQPtrList<TQListViewItem> &, TQPtrList<TQListViewItem> &, TQPtrList<TQListViewItem> &)));
// set up message line
messageLinePane->hide();
- connect(messageHideBtn, SIGNAL(clicked()), SLOT(hideMessageLine()));
- connect(messageListBtn, SIGNAL(clicked()), mainWindow(), SLOT(showMessageLog()));
+ connect(messageHideBtn, TQT_SIGNAL(clicked()), TQT_SLOT(hideMessageLine()));
+ connect(messageListBtn, TQT_SIGNAL(clicked()), mainWindow(), TQT_SLOT(showMessageLog()));
installEventFilter(m_listView);
- ManipulationCommand::connect(SIGNAL(nodeChanged(const DOM::Node &)), this, SLOT(slotRefreshNode(const DOM::Node &)));
- ManipulationCommand::connect(SIGNAL(structureChanged()), this, SLOT(refresh()));
+ ManipulationCommand::connect(TQT_SIGNAL(nodeChanged(const DOM::Node &)), this, TQT_SLOT(slotRefreshNode(const DOM::Node &)));
+ ManipulationCommand::connect(TQT_SIGNAL(structureChanged()), this, TQT_SLOT(refresh()));
initDOMNodeInfo();
@@ -126,7 +126,7 @@ void DOMTreeView::setHtmlPart(KHTMLPart *_part)
parentWidget()->setCaption( part ? i18n( "DOM Tree for %1" ).arg(part->url().prettyURL()) : i18n("DOM Tree") );
- QTimer::singleShot(0, this, SLOT(slotSetHtmlPartDelayed()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotSetHtmlPartDelayed()));
}
DOMTreeWindow *DOMTreeView::mainWindow() const
@@ -134,10 +134,10 @@ DOMTreeWindow *DOMTreeView::mainWindow() const
return static_cast<DOMTreeWindow *>(parentWidget());
}
-bool DOMTreeView::eventFilter(QObject *o, QEvent *e)
+bool DOMTreeView::eventFilter(TQObject *o, TQEvent *e)
{
- if (e->type() == QEvent::AccelOverride) {
- QKeyEvent *ke = static_cast<QKeyEvent *>(e);
+ if (e->type() == TQEvent::AccelOverride) {
+ TQKeyEvent *ke = static_cast<TQKeyEvent *>(e);
kdDebug(90180) << " acceloverride " << ke->key() << " o " << o->name() << endl;
if (o == m_listView) { // DOM tree
@@ -152,14 +152,14 @@ bool DOMTreeView::eventFilter(QObject *o, QEvent *e)
}
- } else if (e->type() == QEvent::FocusIn) {
+ } else if (e->type() == TQEvent::FocusIn) {
kdDebug(90180) << " focusin o " << o->name() << endl;
if (o != this) {
focused_child = o;
}
- } else if (e->type() == QEvent::FocusOut) {
+ } else if (e->type() == TQEvent::FocusOut) {
kdDebug(90180) << " focusout o " << o->name() << endl;
if (o != this) {
@@ -180,7 +180,7 @@ void DOMTreeView::activateNode(const DOM::Node &node)
void DOMTreeView::slotShowNode(const DOM::Node &pNode)
{
- if (QListViewItem *item = m_itemdict[pNode.handle()]) {
+ if (TQListViewItem *item = m_itemdict[pNode.handle()]) {
m_listView->setCurrentItem(item);
m_listView->ensureItemVisible(item);
}
@@ -265,8 +265,8 @@ void DOMTreeView::addElement ( const DOM::Node &node, DOMListViewItem *cur_item
{
cur_item->setClosing(isLast);
- const QString nodeName(node.nodeName().string());
- QString text;
+ const TQString nodeName(node.nodeName().string());
+ TQString text;
const DOM::Element element = node;
if (!element.isNull()) {
if (!m_bPure) {
@@ -281,7 +281,7 @@ void DOMTreeView::addElement ( const DOM::Node &node, DOMListViewItem *cur_item
}
if (m_bShowAttributes && !isLast) {
- QString attributes;
+ TQString attributes;
DOM::Attr attr;
DOM::NamedNodeMap attrs = element.attributes();
unsigned long lmap = attrs.length();
@@ -307,10 +307,10 @@ void DOMTreeView::addElement ( const DOM::Node &node, DOMListViewItem *cur_item
text = "`" + node.nodeValue().string() + "'";
// Hacks to deal with PRE
- QTextStream ts( text, IO_ReadOnly );
+ TQTextStream ts( text, IO_ReadOnly );
while (!ts.eof()) {
- const QString txt(ts.readLine());
- const QFont font(KGlobalSettings::fixedFont());
+ const TQString txt(ts.readLine());
+ const TQFont font(KGlobalSettings::fixedFont());
cur_item->setFont( font );
cur_item->setText(0, txt);
@@ -337,14 +337,14 @@ void DOMTreeView::addElement ( const DOM::Node &node, DOMListViewItem *cur_item
}
}
-void DOMTreeView::highlightHTML(DOMListViewItem *cur_item, const QString &nodeName)
+void DOMTreeView::highlightHTML(DOMListViewItem *cur_item, const TQString &nodeName)
{
/* This is slow. I could make it O(1) be using the tokenizer of khtml but I don't
* think it's worth it.
*/
- QColor namedColor(palette().active().text());
- QString tagName = nodeName.upper();
+ TQColor namedColor(palette().active().text());
+ TQString tagName = nodeName.upper();
if ( tagName == "HTML" ) {
namedColor = "#0000ff";
cur_item->setBold(true);
@@ -421,7 +421,7 @@ void DOMTreeView::highlightHTML(DOMListViewItem *cur_item, const QString &nodeNa
cur_item->setColor(namedColor);
}
-void DOMTreeView::slotItemClicked(QListViewItem *cur_item)
+void DOMTreeView::slotItemClicked(TQListViewItem *cur_item)
{
DOMListViewItem *cur = static_cast<DOMListViewItem *>(cur_item);
if (!cur) return;
@@ -436,7 +436,7 @@ void DOMTreeView::slotFindClicked()
{
if (m_findDialog == 0) {
m_findDialog = new KEdFind(this);
- connect(m_findDialog, SIGNAL(search()), this, SLOT(slotSearch()));
+ connect(m_findDialog, TQT_SIGNAL(search()), this, TQT_SLOT(slotSearch()));
}
m_findDialog->show();
}
@@ -459,20 +459,20 @@ void DOMTreeView::slotPrepareMove()
current_node = item->node();
}
-void DOMTreeView::slotMovedItems(QPtrList<QListViewItem> &items, QPtrList<QListViewItem> &/*afterFirst*/, QPtrList<QListViewItem> &afterNow)
+void DOMTreeView::slotMovedItems(TQPtrList<TQListViewItem> &items, TQPtrList<TQListViewItem> &/*afterFirst*/, TQPtrList<TQListViewItem> &afterNow)
{
MultiCommand *cmd = new MultiCommand(i18n("Move Nodes"));
_refreshed = false;
- QPtrList<QListViewItem>::Iterator it = items.begin();
- QPtrList<QListViewItem>::Iterator anit = afterNow.begin();
+ TQPtrList<TQListViewItem>::Iterator it = items.begin();
+ TQPtrList<TQListViewItem>::Iterator anit = afterNow.begin();
for (; it != items.end(); ++it, ++anit) {
DOMListViewItem *item = static_cast<DOMListViewItem *>(*it);
DOMListViewItem *anitem = static_cast<DOMListViewItem *>(*anit);
DOM::Node parent = static_cast<DOMListViewItem *>(item->parent())->node();
Q_ASSERT(!parent.isNull());
-// kdDebug(90180) << " afternow " << anitem << " node " << (anitem ? anitem->node().nodeName().string() : QString()) << "=" << (anitem ? anitem->node().nodeValue().string() : QString()) << endl;
+// kdDebug(90180) << " afternow " << anitem << " node " << (anitem ? anitem->node().nodeName().string() : TQString()) << "=" << (anitem ? anitem->node().nodeValue().string() : TQString()) << endl;
cmd->addCommand(new MoveNodeCommand(item->node(), parent,
anitem ? anitem->node().nextSibling() : parent.firstChild())
@@ -490,7 +490,7 @@ void DOMTreeView::slotMovedItems(QPtrList<QListViewItem> &items, QPtrList<QListV
void DOMTreeView::slotSearch()
{
assert(m_findDialog);
- const QString& searchText = m_findDialog->getText();
+ const TQString& searchText = m_findDialog->getText();
bool caseSensitive = m_findDialog->case_sensitive();
searchRecursive(static_cast<DOMListViewItem*>(m_rootListView->firstChild()),
@@ -499,10 +499,10 @@ void DOMTreeView::slotSearch()
m_findDialog->hide();
}
-void DOMTreeView::searchRecursive(DOMListViewItem* cur_item, const QString& searchText,
+void DOMTreeView::searchRecursive(DOMListViewItem* cur_item, const TQString& searchText,
bool caseSensitive)
{
- const QString text(cur_item->text(0));
+ const TQString text(cur_item->text(0));
if (text.contains(searchText, caseSensitive) > 0) {
cur_item->setUnderline(true);
cur_item->setItalic(true);
@@ -526,11 +526,11 @@ void DOMTreeView::slotSaveClicked()
KURL url = KFileDialog::getSaveFileName( part->url().url(), "*.html",
this, i18n("Save DOM Tree as HTML") );
if (!(url.isEmpty()) && url.isValid()) {
- QFile file(url.path());
+ TQFile file(url.path());
if (file.exists()) {
- const QString title = i18n( "File Exists" );
- const QString text = i18n( "Do you really want to overwrite: \n%1?" ).arg(url.url());
+ const TQString title = i18n( "File Exists" );
+ const TQString text = i18n( "Do you really want to overwrite: \n%1?" ).arg(url.url());
if (KMessageBox::Continue != KMessageBox::warningContinueCancel(this, text, title, i18n("Overwrite") ) ) {
return;
}
@@ -538,19 +538,19 @@ void DOMTreeView::slotSaveClicked()
if (file.open(IO_WriteOnly) ) {
kdDebug(90180) << "Opened File: " << url.url() << endl;
- m_textStream = new QTextStream(&file); //(stdOut)
+ m_textStream = new TQTextStream(&file); //(stdOut)
saveTreeAsHTML(part->document());
file.close();
kdDebug(90180) << "File closed " << endl;
delete m_textStream;
} else {
- const QString title = i18n( "Unable to Open File" );
- const QString text = i18n( "Unable to open \n %1 \n for writing" ).arg(url.path());
+ const TQString title = i18n( "Unable to Open File" );
+ const TQString text = i18n( "Unable to open \n %1 \n for writing" ).arg(url.path());
KMessageBox::sorry( this, text, title );
}
} else {
- const QString title = i18n( "Invalid URL" );
- const QString text = i18n( "This URL \n %1 \n is not valid." ).arg(url.url());
+ const TQString title = i18n( "Invalid URL" );
+ const TQString text = i18n( "This URL \n %1 \n is not valid." ).arg(url.url());
KMessageBox::sorry( this, text, title );
}
}
@@ -571,9 +571,9 @@ void DOMTreeView::saveTreeAsHTML(const DOM::Node &pNode)
void DOMTreeView::saveRecursive(const DOM::Node &pNode, int indent)
{
- const QString nodeName(pNode.nodeName().string());
- QString text;
- QString strIndent;
+ const TQString nodeName(pNode.nodeName().string());
+ TQString text;
+ TQString strIndent;
strIndent.fill(' ', indent);
const DOM::Element element = static_cast<const DOM::Element>(pNode);
@@ -588,7 +588,7 @@ void DOMTreeView::saveRecursive(const DOM::Node &pNode, int indent)
} else {
text += "<" + nodeName;
- QString attributes;
+ TQString attributes;
DOM::Attr attr;
const DOM::NamedNodeMap attrs = element.attributes();
unsigned long lmap = attrs.length();
@@ -652,7 +652,7 @@ void DOMTreeView::refresh()
m_listView->setUpdatesEnabled(false);
slotShowTree(part->document());
- QTimer::singleShot(0, this, SLOT(slotRestoreScrollOffset()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotRestoreScrollOffset()));
_refreshed = true;
}
@@ -664,7 +664,7 @@ void DOMTreeView::increaseExpansionDepth()
adjustDepth();
updateIncrDecreaseButton();
} else {
- QApplication::beep();
+ TQApplication::beep();
}
}
@@ -676,7 +676,7 @@ void DOMTreeView::decreaseExpansionDepth()
adjustDepth();
updateIncrDecreaseButton();
} else {
- QApplication::beep();
+ TQApplication::beep();
}
}
@@ -695,7 +695,7 @@ void DOMTreeView::adjustDepth()
}
-void DOMTreeView::adjustDepthRecursively(QListViewItem *cur_item, uint currDepth)
+void DOMTreeView::adjustDepthRecursively(TQListViewItem *cur_item, uint currDepth)
{
if (!(cur_item == 0)) {
while( cur_item ) {
@@ -706,7 +706,7 @@ void DOMTreeView::adjustDepthRecursively(QListViewItem *cur_item, uint currDept
}
}
-void DOMTreeView::setMessage(const QString &msg)
+void DOMTreeView::setMessage(const TQString &msg)
{
messageLine->setText(msg);
messageLinePane->show();
@@ -733,9 +733,9 @@ void DOMTreeView::moveToParent()
activateNode(cur);
}
-void DOMTreeView::showDOMTreeContextMenu(QListViewItem */*lvi*/, const QPoint &pos, int /*col*/)
+void DOMTreeView::showDOMTreeContextMenu(TQListViewItem */*lvi*/, const TQPoint &pos, int /*col*/)
{
- QPopupMenu *ctx = mainWindow()->domTreeViewContextMenu();
+ TQPopupMenu *ctx = mainWindow()->domTreeViewContextMenu();
Q_ASSERT(ctx);
ctx->popup(pos);
}
@@ -764,7 +764,7 @@ void DOMTreeView::deleteNodes()
DOM::Node last;
MultiCommand *cmd = new MultiCommand(i18n("Delete Nodes"));
- QListViewItemIterator it(m_listView, QListViewItemIterator::Selected);
+ TQListViewItemIterator it(m_listView, TQListViewItemIterator::Selected);
for (; *it; ++it) {
DOMListViewItem *item = static_cast<DOMListViewItem *>(*it);
// kdDebug(90180) << " item->node " << item->node().nodeName().string() << " clos " << item->isClosing() << endl;
@@ -775,7 +775,7 @@ void DOMTreeView::deleteNodes()
// check for selected parent
bool has_selected_parent = false;
- for (QListViewItem *p = item->parent(); p; p = p->parent()) {
+ for (TQListViewItem *p = item->parent(); p; p = p->parent()) {
if (p->isSelected()) { has_selected_parent = true; break; }
}
if (has_selected_parent) continue;
@@ -805,9 +805,9 @@ void DOMTreeView::disconnectFromTornDownPart()
void DOMTreeView::connectToPart()
{
if (part) {
- connect(part, SIGNAL(nodeActivated(const DOM::Node &)), this,
- SLOT(activateNode(const DOM::Node &)));
- connect(part, SIGNAL(completed()), this, SLOT(refresh()));
+ connect(part, TQT_SIGNAL(nodeActivated(const DOM::Node &)), this,
+ TQT_SLOT(activateNode(const DOM::Node &)));
+ connect(part, TQT_SIGNAL(completed()), this, TQT_SLOT(refresh()));
// insert a style rule to indicate activated nodes
try {
@@ -865,18 +865,18 @@ void DOMTreeView::slotAddElementDlg()
DOMListViewItem *item = static_cast<DOMListViewItem *>(m_listView->currentItem());
if (!item) return;
- QString qname;
- QString namespc;
+ TQString qname;
+ TQString namespc;
SignalReceiver addBefore;
{
ElementEditDialog dlg(this, "ElementEditDialog", true);
- connect(dlg.insBeforeBtn, SIGNAL(clicked()), &addBefore, SLOT(slot()));
+ connect(dlg.insBeforeBtn, TQT_SIGNAL(clicked()), &addBefore, TQT_SLOT(slot()));
// ### activate when namespaces are supported
dlg.elemNamespace->setEnabled(false);
- if (dlg.exec() != QDialog::Accepted) return;
+ if (dlg.exec() != TQDialog::Accepted) return;
qname = dlg.elemName->text();
namespc = dlg.elemNamespace->currentText();
@@ -906,14 +906,14 @@ void DOMTreeView::slotAddTextDlg()
DOMListViewItem *item = static_cast<DOMListViewItem *>(m_listView->currentItem());
if (!item) return;
- QString text;
+ TQString text;
SignalReceiver addBefore;
{
TextEditDialog dlg(this, "TextEditDialog", true);
- connect(dlg.insBeforeBtn, SIGNAL(clicked()), &addBefore, SLOT(slot()));
+ connect(dlg.insBeforeBtn, TQT_SIGNAL(clicked()), &addBefore, TQT_SLOT(slot()));
- if (dlg.exec() != QDialog::Accepted) return;
+ if (dlg.exec() != TQDialog::Accepted) return;
text = dlg.textPane->text();
}
@@ -938,25 +938,25 @@ void DOMTreeView::slotAddTextDlg()
// == DOM Node info panel =============================================
-static QString *clickToAdd;
+static TQString *clickToAdd;
/**
* List view item for attribute list.
*/
class AttributeListItem : public QListViewItem
{
- typedef QListViewItem super;
+ typedef TQListViewItem super;
bool _new;
public:
- AttributeListItem(QListView *parent, QListViewItem *prev)
+ AttributeListItem(TQListView *parent, TQListViewItem *prev)
: super(parent, prev), _new(true)
{
}
- AttributeListItem(const QString &attrName, const QString &attrValue,
- QListView *parent, QListViewItem *prev)
+ AttributeListItem(const TQString &attrName, const TQString &attrValue,
+ TQListView *parent, TQListViewItem *prev)
: super(parent, prev), _new(false)
{
setText(0, attrName);
@@ -966,33 +966,33 @@ public:
bool isNew() const { return _new; }
void setNew(bool s) { _new = s; }
- virtual int compare(QListViewItem *item, int column, bool ascend) const
+ virtual int compare(TQListViewItem *item, int column, bool ascend) const
{
return _new ? 1 : super::compare(item, column, ascend);
}
protected:
- virtual void paintCell( QPainter *p, const QColorGroup &cg,
+ virtual void paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment )
{
bool updates_enabled = listView()->isUpdatesEnabled();
listView()->setUpdatesEnabled(false);
- QColor c = cg.text();
+ TQColor c = cg.text();
bool text_changed = false;
- QString oldText;
+ TQString oldText;
if (_new) {
- c = QApplication::palette().color( QPalette::Disabled, QColorGroup::Text );
+ c = TQApplication::palette().color( TQPalette::Disabled, TQColorGroup::Text );
- if (!clickToAdd) clickToAdd = new QString(i18n("<Click to add>"));
+ if (!clickToAdd) clickToAdd = new TQString(i18n("<Click to add>"));
oldText = text(column);
text_changed = true;
- if (column == 0) setText(0, *clickToAdd); else setText(1, QString());
+ if (column == 0) setText(0, *clickToAdd); else setText(1, TQString());
}
- QColorGroup _cg( cg );
- _cg.setColor( QColorGroup::Text, c );
+ TQColorGroup _cg( cg );
+ _cg.setColor( TQColorGroup::Text, c );
super::paintCell( p, _cg, column, width, alignment );
if (text_changed) setText(column, oldText);
@@ -1003,19 +1003,19 @@ protected:
void DOMTreeView::initDOMNodeInfo()
{
- connect(m_listView, SIGNAL(clicked(QListViewItem *)),
- SLOT(initializeOptionsFromListItem(QListViewItem *)));
+ connect(m_listView, TQT_SIGNAL(clicked(TQListViewItem *)),
+ TQT_SLOT(initializeOptionsFromListItem(TQListViewItem *)));
- connect(nodeAttributes, SIGNAL(itemRenamed(QListViewItem *, const QString &, int)),
- SLOT(slotItemRenamed(QListViewItem *, const QString &, int)));
- connect(nodeAttributes, SIGNAL(executed(QListViewItem *, const QPoint &, int)),
- SLOT(slotEditAttribute(QListViewItem *, const QPoint &, int)));
- connect(nodeAttributes, SIGNAL(contextMenuRequested(QListViewItem *, const QPoint &, int)),
- SLOT(showInfoPanelContextMenu(QListViewItem *, const QPoint &, int)));
+ connect(nodeAttributes, TQT_SIGNAL(itemRenamed(TQListViewItem *, const TQString &, int)),
+ TQT_SLOT(slotItemRenamed(TQListViewItem *, const TQString &, int)));
+ connect(nodeAttributes, TQT_SIGNAL(executed(TQListViewItem *, const TQPoint &, int)),
+ TQT_SLOT(slotEditAttribute(TQListViewItem *, const TQPoint &, int)));
+ connect(nodeAttributes, TQT_SIGNAL(contextMenuRequested(TQListViewItem *, const TQPoint &, int)),
+ TQT_SLOT(showInfoPanelContextMenu(TQListViewItem *, const TQPoint &, int)));
- connect(applyContent, SIGNAL(clicked()), SLOT(slotApplyContent()));
+ connect(applyContent, TQT_SIGNAL(clicked()), TQT_SLOT(slotApplyContent()));
- ManipulationCommand::connect(SIGNAL(nodeChanged(const DOM::Node &)), this, SLOT(initializeOptionsFromNode(const DOM::Node &)));
+ ManipulationCommand::connect(TQT_SIGNAL(nodeChanged(const DOM::Node &)), this, TQT_SLOT(initializeOptionsFromNode(const DOM::Node &)));
nodeAttributes->setRenameable(0, true);
nodeAttributes->setRenameable(1, true);
@@ -1040,7 +1040,7 @@ void DOMTreeView::initializeOptionsFromNode(const DOM::Node &node)
}
nodeName->setText(node.nodeName().string());
- nodeType->setText(QString::number(node.nodeType()));
+ nodeType->setText(TQString::number(node.nodeType()));
nodeNamespace->setText(node.namespaceURI().string());
// nodeValue->setText(node.value().string());
@@ -1060,7 +1060,7 @@ void DOMTreeView::initializeOptionsFromNode(const DOM::Node &node)
nodeInfoStack->raiseWidget(EmptyPanel);
}
-void DOMTreeView::initializeOptionsFromListItem(QListViewItem *item)
+void DOMTreeView::initializeOptionsFromListItem(TQListViewItem *item)
{
const DOMListViewItem *cur_item = static_cast<const DOMListViewItem *>(item);
@@ -1070,7 +1070,7 @@ void DOMTreeView::initializeOptionsFromListItem(QListViewItem *item)
void DOMTreeView::initializeOptionsFromElement(const DOM::Element &element)
{
- QListViewItem *last = 0;
+ TQListViewItem *last = 0;
nodeAttributes->clear();
DOM::NamedNodeMap attrs = element.attributes();
@@ -1078,7 +1078,7 @@ void DOMTreeView::initializeOptionsFromElement(const DOM::Element &element)
for (unsigned int j = 0; j < lmap; j++) {
DOM::Attr attr = attrs.item(j);
// kdDebug(90180) << attr.name().string() << "=" << attr.value().string() << endl;
- QListViewItem *item = new AttributeListItem(attr.name().string(),
+ TQListViewItem *item = new AttributeListItem(attr.name().string(),
attr.value().string(), nodeAttributes, last);
last = item;
}
@@ -1099,7 +1099,7 @@ void DOMTreeView::initializeOptionsFromCData(const DOM::CharacterData &cdata)
nodeInfoStack->raiseWidget(CDataPanel);
}
-void DOMTreeView::slotItemRenamed(QListViewItem *lvi, const QString &str, int col)
+void DOMTreeView::slotItemRenamed(TQListViewItem *lvi, const TQString &str, int col)
{
AttributeListItem *item = static_cast<AttributeListItem *>(lvi);
@@ -1120,7 +1120,7 @@ void DOMTreeView::slotItemRenamed(QListViewItem *lvi, const QString &str, int co
break;
}
case 1: {
- if (item->isNew()) { lvi->setText(1, QString()); break; }
+ if (item->isNew()) { lvi->setText(1, TQString()); break; }
ChangeAttributeValueCommand *cmd = new ChangeAttributeValueCommand(
element, item->text(0), str);
@@ -1130,12 +1130,12 @@ void DOMTreeView::slotItemRenamed(QListViewItem *lvi, const QString &str, int co
}
}
-void DOMTreeView::slotEditAttribute(QListViewItem *lvi, const QPoint &, int col)
+void DOMTreeView::slotEditAttribute(TQListViewItem *lvi, const TQPoint &, int col)
{
if (!lvi) return;
- QString attrName = lvi->text(0);
- QString attrValue = lvi->text(1);
+ TQString attrName = lvi->text(0);
+ TQString attrValue = lvi->text(1);
int res = 0;
{
@@ -1159,7 +1159,7 @@ void DOMTreeView::slotEditAttribute(QListViewItem *lvi, const QPoint &, int col)
// kdDebug(90180) << "name=" << attrName << " value=" << attrValue << endl;
- if (res == QDialog::Accepted) do {
+ if (res == TQDialog::Accepted) do {
if (attrName.isEmpty()) break;
if (lvi->text(0) != attrName) {
@@ -1188,9 +1188,9 @@ void DOMTreeView::slotApplyContent()
mainWindow()->executeAndAddCommand(cmd);
}
-void DOMTreeView::showInfoPanelContextMenu(QListViewItem */*lvi*/, const QPoint &pos, int /*col*/)
+void DOMTreeView::showInfoPanelContextMenu(TQListViewItem */*lvi*/, const TQPoint &pos, int /*col*/)
{
- QPopupMenu *ctx = mainWindow()->infoPanelAttrContextMenu();
+ TQPopupMenu *ctx = mainWindow()->infoPanelAttrContextMenu();
Q_ASSERT(ctx);
ctx->popup(pos);
}
@@ -1213,7 +1213,7 @@ void DOMTreeView::pasteAttributes()
void DOMTreeView::deleteAttributes()
{
MultiCommand *cmd = new MultiCommand(i18n("Delete Attributes"));
- QListViewItemIterator it(nodeAttributes, QListViewItemIterator::Selected);
+ TQListViewItemIterator it(nodeAttributes, TQListViewItemIterator::Selected);
for (; *it; ++it) {
AttributeListItem *item = static_cast<AttributeListItem *>(*it);
if (item->isNew()) continue;