diff options
Diffstat (limited to 'konq-plugins/domtreeviewer')
-rw-r--r-- | konq-plugins/domtreeviewer/domlistviewitem.cpp | 36 | ||||
-rw-r--r-- | konq-plugins/domtreeviewer/domlistviewitem.h | 24 | ||||
-rw-r--r-- | konq-plugins/domtreeviewer/domtreecommands.cpp | 50 | ||||
-rw-r--r-- | konq-plugins/domtreeviewer/domtreecommands.h | 44 | ||||
-rw-r--r-- | konq-plugins/domtreeviewer/domtreeview.cpp | 242 | ||||
-rw-r--r-- | konq-plugins/domtreeviewer/domtreeview.h | 36 | ||||
-rw-r--r-- | konq-plugins/domtreeviewer/domtreewindow.cpp | 92 | ||||
-rw-r--r-- | konq-plugins/domtreeviewer/domtreewindow.h | 26 | ||||
-rw-r--r-- | konq-plugins/domtreeviewer/messagedialog.ui.h | 4 | ||||
-rw-r--r-- | konq-plugins/domtreeviewer/plugin_domtreeviewer.cpp | 8 | ||||
-rw-r--r-- | konq-plugins/domtreeviewer/plugin_domtreeviewer.h | 4 | ||||
-rw-r--r-- | konq-plugins/domtreeviewer/signalreceiver.cpp | 4 | ||||
-rw-r--r-- | konq-plugins/domtreeviewer/signalreceiver.h | 6 |
13 files changed, 288 insertions, 288 deletions
diff --git a/konq-plugins/domtreeviewer/domlistviewitem.cpp b/konq-plugins/domtreeviewer/domlistviewitem.cpp index c24df96..7ab20b4 100644 --- a/konq-plugins/domtreeviewer/domlistviewitem.cpp +++ b/konq-plugins/domtreeviewer/domlistviewitem.cpp @@ -17,32 +17,32 @@ #include "domlistviewitem.h" -#include <qpainter.h> -#include <qlistview.h> -#include <qapplication.h> +#include <tqpainter.h> +#include <tqlistview.h> +#include <tqapplication.h> #include <kglobalsettings.h> -DOMListViewItem::DOMListViewItem( const DOM::Node &node, QListView *parent ) - : QListViewItem( parent ), m_node(node) +DOMListViewItem::DOMListViewItem( const DOM::Node &node, TQListView *parent ) + : TQListViewItem( parent ), m_node(node) { init(); } -DOMListViewItem::DOMListViewItem( const DOM::Node &node, QListView *parent, QListViewItem *after) - : QListViewItem( parent, after ), m_node(node) +DOMListViewItem::DOMListViewItem( const DOM::Node &node, TQListView *parent, TQListViewItem *after) + : TQListViewItem( parent, after ), m_node(node) { init(); } -DOMListViewItem::DOMListViewItem( const DOM::Node &node, QListViewItem *parent ) - : QListViewItem( parent ), m_node(node) +DOMListViewItem::DOMListViewItem( const DOM::Node &node, TQListViewItem *parent ) + : TQListViewItem( parent ), m_node(node) { init(); } -DOMListViewItem::DOMListViewItem( const DOM::Node &node, QListViewItem *parent, QListViewItem *after) - : QListViewItem( parent, after ), m_node(node) +DOMListViewItem::DOMListViewItem( const DOM::Node &node, TQListViewItem *parent, TQListViewItem *after) + : TQListViewItem( parent, after ), m_node(node) { init(); } @@ -54,20 +54,20 @@ DOMListViewItem::~DOMListViewItem() void DOMListViewItem::init() { - m_color = QApplication::palette().color( QPalette::Active, QColorGroup::Text ); + m_color = TQApplication::palette().color( TQPalette::Active, TQColorGroup::Text ); m_font = KGlobalSettings::generalFont(); clos = false; } -void DOMListViewItem::paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment ) +void DOMListViewItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment ) { - QColorGroup _cg( cg ); - QColor c = _cg.text(); + TQColorGroup _cg( cg ); + TQColor c = _cg.text(); p->setFont(m_font); - _cg.setColor( QColorGroup::Text, m_color ); - QListViewItem::paintCell( p, _cg, column, width, alignment ); - _cg.setColor( QColorGroup::Text, c ); + _cg.setColor( TQColorGroup::Text, m_color ); + TQListViewItem::paintCell( p, _cg, column, width, alignment ); + _cg.setColor( TQColorGroup::Text, c ); } diff --git a/konq-plugins/domtreeviewer/domlistviewitem.h b/konq-plugins/domtreeviewer/domlistviewitem.h index 22f34b2..9a85fbf 100644 --- a/konq-plugins/domtreeviewer/domlistviewitem.h +++ b/konq-plugins/domtreeviewer/domlistviewitem.h @@ -18,26 +18,26 @@ #include <dom/dom_node.h> -#include <qlistview.h> -#include <qcolor.h> -#include <qfont.h> +#include <tqlistview.h> +#include <tqcolor.h> +#include <tqfont.h> class DOMListViewItem : public QListViewItem { public: - DOMListViewItem( const DOM::Node &, QListView *parent ); - DOMListViewItem( const DOM::Node &, QListView *parent, QListViewItem *after ); - DOMListViewItem( const DOM::Node &, QListViewItem *parent ); - DOMListViewItem( const DOM::Node &, QListViewItem *parent, QListViewItem *after ); + DOMListViewItem( const DOM::Node &, TQListView *parent ); + DOMListViewItem( const DOM::Node &, TQListView *parent, TQListViewItem *after ); + DOMListViewItem( const DOM::Node &, TQListViewItem *parent ); + DOMListViewItem( const DOM::Node &, TQListViewItem *parent, TQListViewItem *after ); virtual ~DOMListViewItem(); - virtual void paintCell( QPainter *p, const QColorGroup &cg, + virtual void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment ); - void setColor( const QColor &color) { m_color = color; } + void setColor( const TQColor &color) { m_color = color; } - void setFont( const QFont &font) { m_font = font;} + void setFont( const TQFont &font) { m_font = font;} void setItalic( bool b) {m_font.setItalic(b);} void setBold( bool b) {m_font.setBold(b);} void setUnderline(bool b) {m_font.setUnderline(b);} @@ -49,8 +49,8 @@ class DOMListViewItem : public QListViewItem private: void init(); - QColor m_color; - QFont m_font; + TQColor m_color; + TQFont m_font; DOM::Node m_node; bool clos; }; diff --git a/konq-plugins/domtreeviewer/domtreecommands.cpp b/konq-plugins/domtreeviewer/domtreecommands.cpp index 1f91cf1..0bbb918 100644 --- a/konq-plugins/domtreeviewer/domtreecommands.cpp +++ b/konq-plugins/domtreeviewer/domtreecommands.cpp @@ -25,7 +25,7 @@ #include <klocale.h> -#include <qmap.h> +#include <tqmap.h> using namespace domtreeviewer; @@ -50,7 +50,7 @@ static const char * const dom_error_msgs[] = { // == global functions ============================================== -QString domtreeviewer::domErrorMessage(int dom_err) +TQString domtreeviewer::domErrorMessage(int dom_err) { if ((unsigned)dom_err > sizeof dom_error_msgs/sizeof dom_error_msgs[0]) return i18n("Unknown Exception %1").arg(dom_err); @@ -87,7 +87,7 @@ inline static bool operator <(const DOM::Node &n1, const DOM::Node &n2) return (long)n1.handle() - (long)n2.handle() < 0; } -class ChangedNodeSet : public QMap<DOM::Node, bool> +class ChangedNodeSet : public TQMap<DOM::Node, bool> { }; @@ -104,15 +104,15 @@ ManipulationCommand::~ManipulationCommand() { } -void ManipulationCommand::connect(const char *signal, QObject *recv, const char *slot) +void ManipulationCommand::connect(const char *signal, TQObject *recv, const char *slot) { - QObject::connect(mcse(), signal, recv, slot); + TQObject::connect(mcse(), signal, recv, slot); } void ManipulationCommand::handleException(DOM::DOMException &ex) { _exception = ex; - QString msg = name() + ": " + domErrorMessage(ex.code); + TQString msg = name() + ": " + domErrorMessage(ex.code); emit mcse()->error(ex.code, msg); } @@ -178,7 +178,7 @@ void ManipulationCommand::reapply() // == MultiCommand =========================================== -MultiCommand::MultiCommand(const QString &desc) +MultiCommand::MultiCommand(const TQString &desc) : _name(desc) { cmds.setAutoDelete(true); @@ -197,7 +197,7 @@ void MultiCommand::addCommand(ManipulationCommand *cmd) void MultiCommand::apply() { // apply in forward order - for (QPtrListIterator<ManipulationCommand> it = cmds; *it; ++it) { + for (TQPtrListIterator<ManipulationCommand> it = cmds; *it; ++it) { try { if (shouldReapply()) (*it)->reapply(); else (*it)->apply(); @@ -223,7 +223,7 @@ void MultiCommand::apply() void MultiCommand::unapply() { // unapply in reverse order - QPtrListIterator<ManipulationCommand> it = cmds; + TQPtrListIterator<ManipulationCommand> it = cmds; for (it.toLast(); *it; --it) { try { (*it)->unapply(); @@ -258,14 +258,14 @@ void MultiCommand::mergeChangedNodesFrom(ManipulationCommand *cmd) cmd->changedNodes->clear(); } -QString MultiCommand::name() const +TQString MultiCommand::name() const { return _name; } // == AddAttributeCommand =========================================== -AddAttributeCommand::AddAttributeCommand(const DOM::Element &element, const QString &attrName, const QString &attrValue) +AddAttributeCommand::AddAttributeCommand(const DOM::Element &element, const TQString &attrName, const TQString &attrValue) : _element(element), attrName(attrName), attrValue(attrValue) { if (attrValue.isEmpty()) this->attrValue = "<dummy>"; @@ -287,7 +287,7 @@ void AddAttributeCommand::unapply() addChangedNode(_element); } -QString AddAttributeCommand::name() const +TQString AddAttributeCommand::name() const { return i18n("Add attribute"); } @@ -295,7 +295,7 @@ QString AddAttributeCommand::name() const // == ChangeAttributeValueCommand ==================================== ChangeAttributeValueCommand::ChangeAttributeValueCommand( -const DOM::Element &element, const QString &attr, const QString &value) +const DOM::Element &element, const TQString &attr, const TQString &value) : _element(element), _attr(attr), new_value(value) { } @@ -317,14 +317,14 @@ void ChangeAttributeValueCommand::unapply() addChangedNode(_element); } -QString ChangeAttributeValueCommand::name() const +TQString ChangeAttributeValueCommand::name() const { return i18n("Change attribute value"); } // == RemoveAttributeCommand ======================================== -RemoveAttributeCommand::RemoveAttributeCommand(const DOM::Element &element, const QString &attrName) +RemoveAttributeCommand::RemoveAttributeCommand(const DOM::Element &element, const TQString &attrName) : _element(element), attrName(attrName) { } @@ -348,14 +348,14 @@ void RemoveAttributeCommand::unapply() addChangedNode(_element); } -QString RemoveAttributeCommand::name() const +TQString RemoveAttributeCommand::name() const { return i18n("Remove attribute"); } // == RenameAttributeCommand ======================================== -RenameAttributeCommand::RenameAttributeCommand(const DOM::Element &element, const QString &attrOldName, const QString &attrNewName) +RenameAttributeCommand::RenameAttributeCommand(const DOM::Element &element, const TQString &attrOldName, const TQString &attrNewName) : _element(element), attrOldName(attrOldName), attrNewName(attrNewName) { } @@ -380,14 +380,14 @@ void RenameAttributeCommand::unapply() addChangedNode(_element); } -QString RenameAttributeCommand::name() const +TQString RenameAttributeCommand::name() const { return i18n("Rename attribute"); } // == ChangeCDataCommand ======================================== -ChangeCDataCommand::ChangeCDataCommand(const DOM::CharacterData &cdata, const QString &value) +ChangeCDataCommand::ChangeCDataCommand(const DOM::CharacterData &cdata, const TQString &value) : cdata(cdata), value(value), has_newlines(false) { } @@ -401,8 +401,8 @@ void ChangeCDataCommand::apply() if (!shouldReapply()) { oldValue = cdata.data(); has_newlines = - QConstString(value.unicode(), value.length()).string().contains('\n') - || QConstString(oldValue.unicode(), oldValue.length()).string().contains('\n'); + TQConstString(value.unicode(), value.length()).string().contains('\n') + || TQConstString(oldValue.unicode(), oldValue.length()).string().contains('\n'); } cdata.setData(value); addChangedNode(cdata); @@ -416,7 +416,7 @@ void ChangeCDataCommand::unapply() struc_changed = has_newlines; } -QString ChangeCDataCommand::name() const +TQString ChangeCDataCommand::name() const { return i18n("Change textual content"); } @@ -478,7 +478,7 @@ void InsertNodeCommand::unapply() struc_changed = true; } -QString InsertNodeCommand::name() const +TQString InsertNodeCommand::name() const { return i18n("Insert node"); } @@ -506,7 +506,7 @@ void RemoveNodeCommand::unapply() struc_changed = true; } -QString RemoveNodeCommand::name() const +TQString RemoveNodeCommand::name() const { return i18n("Remove node"); } @@ -552,7 +552,7 @@ void MoveNodeCommand::unapply() struc_changed = true; } -QString MoveNodeCommand::name() const +TQString MoveNodeCommand::name() const { return i18n("Move node"); } diff --git a/konq-plugins/domtreeviewer/domtreecommands.h b/konq-plugins/domtreeviewer/domtreecommands.h index bf893dc..f068426 100644 --- a/konq-plugins/domtreeviewer/domtreecommands.h +++ b/konq-plugins/domtreeviewer/domtreecommands.h @@ -32,8 +32,8 @@ #include <kcommand.h> -#include <qobject.h> -#include <qptrlist.h> +#include <tqobject.h> +#include <tqptrlist.h> class DOMTreeView; class KPrinter; @@ -45,7 +45,7 @@ class ManipulationCommandSignalEmitter; class ChangedNodeSet; /** returns a localized string for the given dom exception code */ -QString domErrorMessage(int exception_code); +TQString domErrorMessage(int exception_code); /** * Internal class for emitting signals. @@ -71,7 +71,7 @@ signals: * @param err_id DOM error id * @param msg error message */ - void error(int err_id, const QString &msg); + void error(int err_id, const TQString &msg); private: // make moc not complain friend class ManipulationCommand; @@ -97,7 +97,7 @@ public: bool allowSignals() const { return allow_signals; } /** connects the given signal to a slot */ - static void connect(const char *signal, QObject *recv, const char *slot); + static void connect(const char *signal, TQObject *recv, const char *slot); /** does grunt work and calls apply()/reapply() */ virtual void execute(); @@ -136,13 +136,13 @@ private: class MultiCommand : public ManipulationCommand { public: - MultiCommand(const QString &name); + MultiCommand(const TQString &name); virtual ~MultiCommand(); /** Adds a new command. Will take ownership of \c cmd */ void addCommand(ManipulationCommand *cmd); - virtual QString name() const; + virtual TQString name() const; protected: virtual void apply(); @@ -151,8 +151,8 @@ protected: void mergeChangedNodesFrom(ManipulationCommand *cmd); protected: - QPtrList<ManipulationCommand> cmds; - QString _name; + TQPtrList<ManipulationCommand> cmds; + TQString _name; }; /** @@ -162,10 +162,10 @@ protected: class AddAttributeCommand : public ManipulationCommand { public: - AddAttributeCommand(const DOM::Element &element, const QString &attrName, const QString &attrValue); + AddAttributeCommand(const DOM::Element &element, const TQString &attrName, const TQString &attrValue); virtual ~AddAttributeCommand(); - virtual QString name() const; + virtual TQString name() const; protected: virtual void apply(); @@ -184,10 +184,10 @@ protected: class ChangeAttributeValueCommand : public ManipulationCommand { public: - ChangeAttributeValueCommand(const DOM::Element &element, const QString &attr, const QString &value); + ChangeAttributeValueCommand(const DOM::Element &element, const TQString &attr, const TQString &value); virtual ~ChangeAttributeValueCommand(); - virtual QString name() const; + virtual TQString name() const; protected: virtual void apply(); @@ -207,10 +207,10 @@ protected: class RemoveAttributeCommand : public ManipulationCommand { public: - RemoveAttributeCommand(const DOM::Element &element, const QString &attrName); + RemoveAttributeCommand(const DOM::Element &element, const TQString &attrName); virtual ~RemoveAttributeCommand(); - virtual QString name() const; + virtual TQString name() const; protected: virtual void apply(); @@ -229,10 +229,10 @@ protected: class RenameAttributeCommand : public ManipulationCommand { public: - RenameAttributeCommand(const DOM::Element &element, const QString &attrOldName, const QString &attrNewName); + RenameAttributeCommand(const DOM::Element &element, const TQString &attrOldName, const TQString &attrNewName); virtual ~RenameAttributeCommand(); - virtual QString name() const; + virtual TQString name() const; protected: virtual void apply(); @@ -252,10 +252,10 @@ protected: class ChangeCDataCommand : public ManipulationCommand { public: - ChangeCDataCommand(const DOM::CharacterData &, const QString &value); + ChangeCDataCommand(const DOM::CharacterData &, const TQString &value); virtual ~ChangeCDataCommand(); - virtual QString name() const; + virtual TQString name() const; protected: virtual void apply(); @@ -309,7 +309,7 @@ public: InsertNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after); virtual ~InsertNodeCommand(); - virtual QString name() const; + virtual TQString name() const; protected: virtual void apply(); @@ -335,7 +335,7 @@ public: RemoveNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after); virtual ~RemoveNodeCommand(); - virtual QString name() const; + virtual TQString name() const; protected: virtual void apply(); @@ -358,7 +358,7 @@ public: MoveNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after); virtual ~MoveNodeCommand(); - virtual QString name() const; + virtual TQString name() const; protected: virtual void apply(); 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; diff --git a/konq-plugins/domtreeviewer/domtreeview.h b/konq-plugins/domtreeviewer/domtreeview.h index 0e9977d..80c4c10 100644 --- a/konq-plugins/domtreeviewer/domtreeview.h +++ b/konq-plugins/domtreeviewer/domtreeview.h @@ -22,8 +22,8 @@ #ifndef DOMTREEVIEW_H #define DOMTREEVIEW_H -#include <qptrdict.h> -#include <qptrlist.h> +#include <tqptrdict.h> +#include <tqptrlist.h> #include <dom/css_stylesheet.h> #include <dom/css_rule.h> #include <dom/dom_node.h> @@ -49,7 +49,7 @@ class DOMTreeView : public DOMTreeViewBase Q_OBJECT public: - DOMTreeView(QWidget *parent, const char* name, bool allowSaving = true); + DOMTreeView(TQWidget *parent, const char* name, bool allowSaving = true); ~DOMTreeView(); KHTMLPart *htmlPart() const { return part; } @@ -62,7 +62,7 @@ class DOMTreeView : public DOMTreeViewBase /* void saveTreeAsHTML(const DOM::Node &pNode); */ - virtual bool eventFilter(QObject *o, QEvent *e); + virtual bool eventFilter(TQObject *o, TQEvent *e); signals: /** emitted when the part has been changed. */ @@ -72,7 +72,7 @@ class DOMTreeView : public DOMTreeViewBase void refresh(); void increaseExpansionDepth(); void decreaseExpansionDepth(); - void setMessage(const QString &msg); + void setMessage(const TQString &msg); void hideMessageLine(); void moveToParent(); @@ -104,9 +104,9 @@ class DOMTreeView : public DOMTreeViewBase protected slots: void slotShowNode(const DOM::Node &pNode); void slotShowTree(const DOM::Node &pNode); - void slotItemClicked(QListViewItem *); + void slotItemClicked(TQListViewItem *); void slotRefreshNode(const DOM::Node &pNode); - void slotMovedItems(QPtrList<QListViewItem> &items, QPtrList<QListViewItem> &afterFirst, QPtrList<QListViewItem> &afterNow); + void slotMovedItems(TQPtrList<TQListViewItem> &items, TQPtrList<TQListViewItem> &afterFirst, TQPtrList<TQListViewItem> &afterNow); void slotPrepareMove(); void slotSearch(); @@ -116,13 +116,13 @@ class DOMTreeView : public DOMTreeViewBase void slotShowAttributesToggled(bool); void slotHighlightHTMLToggled(bool); - void showDOMTreeContextMenu(QListViewItem *, const QPoint &, int); + void showDOMTreeContextMenu(TQListViewItem *, const TQPoint &, int); void slotSetHtmlPartDelayed(); void slotRestoreScrollOffset(); private: - QPtrDict<DOMListViewItem> m_itemdict; + TQPtrDict<DOMListViewItem> m_itemdict; DOM::Node m_document; uint m_expansionDepth, m_maxDepth; @@ -135,13 +135,13 @@ class DOMTreeView : public DOMTreeViewBase // void saveRecursive(const DOM::Node &node, int ident); void searchRecursive(DOMListViewItem *cur_item, - const QString &searchText, + const TQString &searchText, bool caseSensitive); void adjustDepth(); - void adjustDepthRecursively(QListViewItem *cur_item, uint currDepth); + void adjustDepthRecursively(TQListViewItem *cur_item, uint currDepth); void highlightHTML(DOMListViewItem *cur_item, - const QString &nodeName); + const TQString &nodeName); void addElement(const DOM::Node &node, DOMListViewItem *cur_item, bool isLast); @@ -151,12 +151,12 @@ class DOMTreeView : public DOMTreeViewBase KEdFind* m_findDialog; KHTMLPart *part; - QTextStream* m_textStream; + TQTextStream* m_textStream; const KListView* m_rootListView; KPushButton* m_saveButton; - QObject *focused_child; + TQObject *focused_child; DOM::Node current_node; DOM::CSSStyleSheet stylesheet; DOM::CSSRule active_node_rule; @@ -173,7 +173,7 @@ class DOMTreeView : public DOMTreeViewBase public slots: void initializeOptionsFromNode(const DOM::Node &); - void initializeOptionsFromListItem(QListViewItem *); + void initializeOptionsFromListItem(TQListViewItem *); void copyAttributes(); void cutAttributes(); @@ -187,11 +187,11 @@ class DOMTreeView : public DOMTreeViewBase void initializeOptionsFromCData(const DOM::CharacterData &); private slots: - void slotItemRenamed(QListViewItem *, const QString &str, int col); - void slotEditAttribute(QListViewItem *, const QPoint &, int col); + void slotItemRenamed(TQListViewItem *, const TQString &str, int col); + void slotEditAttribute(TQListViewItem *, const TQPoint &, int col); void slotApplyContent(); - void showInfoPanelContextMenu(QListViewItem *, const QPoint &, int); + void showInfoPanelContextMenu(TQListViewItem *, const TQPoint &, int); private: DOM::Node infoNode; // node these infos apply to diff --git a/konq-plugins/domtreeviewer/domtreewindow.cpp b/konq-plugins/domtreeviewer/domtreewindow.cpp index f8b9ed5..0dd6d7f 100644 --- a/konq-plugins/domtreeviewer/domtreewindow.cpp +++ b/konq-plugins/domtreeviewer/domtreewindow.cpp @@ -50,8 +50,8 @@ #include <kaction.h> #include <kstdaction.h> -#include <qdatetime.h> -#include <qtimer.h> +#include <tqdatetime.h> +#include <tqtimer.h> using domtreeviewer::ManipulationCommand; @@ -84,16 +84,16 @@ DOMTreeWindow::DOMTreeWindow(PluginDomtreeviewer *plugin) // allow the view to change the statusbar and caption #if 0 - connect(m_view, SIGNAL(signalChangeStatusbar(const QString&)), - this, SLOT(changeStatusbar(const QString&))); - connect(m_view, SIGNAL(signalChangeCaption(const QString&)), - this, SLOT(changeCaption(const QString&))); + connect(m_view, TQT_SIGNAL(signalChangeStatusbar(const TQString&)), + this, TQT_SLOT(changeStatusbar(const TQString&))); + connect(m_view, TQT_SIGNAL(signalChangeCaption(const TQString&)), + this, TQT_SLOT(changeCaption(const TQString&))); #endif - connect(view(), SIGNAL(htmlPartChanged(KHTMLPart *)), - SLOT(slotHtmlPartChanged(KHTMLPart *))); + connect(view(), TQT_SIGNAL(htmlPartChanged(KHTMLPart *)), + TQT_SLOT(slotHtmlPartChanged(KHTMLPart *))); - ManipulationCommand::connect(SIGNAL(error(int, const QString &)), - this, SLOT(addMessage(int, const QString &))); + ManipulationCommand::connect(TQT_SIGNAL(error(int, const TQString &)), + this, TQT_SLOT(addMessage(int, const TQString &))); infopanel_ctx = createInfoPanelAttrContextMenu(); domtree_ctx = createDOMTreeViewContextMenu(); @@ -119,74 +119,74 @@ void DOMTreeWindow::executeAndAddCommand(ManipulationCommand *cmd) void DOMTreeWindow::setupActions() { - KStdAction::close(this, SLOT(close()), actionCollection()); + KStdAction::close(this, TQT_SLOT(close()), actionCollection()); - KStdAction::cut(this, SLOT(slotCut()), actionCollection())->setEnabled(false); - KStdAction::copy(this, SLOT(slotCopy()), actionCollection())->setEnabled(false); - KStdAction::paste(this, SLOT(slotPaste()), actionCollection())->setEnabled(false); + KStdAction::cut(this, TQT_SLOT(slotCut()), actionCollection())->setEnabled(false); + KStdAction::copy(this, TQT_SLOT(slotCopy()), actionCollection())->setEnabled(false); + KStdAction::paste(this, TQT_SLOT(slotPaste()), actionCollection())->setEnabled(false); m_commandHistory = new KCommandHistory(actionCollection()); - KStdAction::find(this, SLOT(slotFind()), actionCollection()); + KStdAction::find(this, TQT_SLOT(slotFind()), actionCollection()); - KStdAction::redisplay(m_view, SLOT(refresh()), actionCollection()); + KStdAction::redisplay(m_view, TQT_SLOT(refresh()), actionCollection()); // toggle manipulation dialog KAction *showMsgDlg = new KAction(i18n("Show Message Log"), CTRL+Key_E, actionCollection(), "show_msg_dlg"); - connect(showMsgDlg, SIGNAL(activated()), SLOT(showMessageLog())); + connect(showMsgDlg, TQT_SIGNAL(activated()), TQT_SLOT(showMessageLog())); // KAction *custom = new KAction(i18n("Cus&tom Menuitem"), 0, -// this, SLOT(optionsPreferences()), +// this, TQT_SLOT(optionsPreferences()), // actionCollection(), "custom_action"); // actions for the dom tree list view toolbar - KStdAction::up(view(), SLOT(moveToParent()), actionCollection(), "tree_up"); + KStdAction::up(view(), TQT_SLOT(moveToParent()), actionCollection(), "tree_up"); KAction *tree_inc_level = new KAction(i18n("Expand"), "1rightarrow", CTRL+Key_Greater, view(), - SLOT(increaseExpansionDepth()), actionCollection(), + TQT_SLOT(increaseExpansionDepth()), actionCollection(), "tree_inc_level"); tree_inc_level->setToolTip(i18n("Increase expansion level")); KAction *tree_dec_level = new KAction(i18n("Collapse"), "1leftarrow", CTRL+Key_Less, view(), - SLOT(decreaseExpansionDepth()), actionCollection(), + TQT_SLOT(decreaseExpansionDepth()), actionCollection(), "tree_dec_level"); tree_dec_level->setToolTip(i18n("Decrease expansion level")); // actions for the dom tree list view context menu del_tree = new KAction(i18n("&Delete"), "editdelete", - Key_Delete, view(), SLOT(deleteNodes()), + Key_Delete, view(), TQT_SLOT(deleteNodes()), actionCollection(), "tree_delete"); del_tree->setToolTip(i18n("Delete nodes")); /*KAction *new_elem = */new KAction(i18n("New &Element ..."), "bookmark", KShortcut(), view(), - SLOT(slotAddElementDlg()), actionCollection(), + TQT_SLOT(slotAddElementDlg()), actionCollection(), "tree_add_element"); /*KAction *new_text = */new KAction(i18n("New &Text Node ..."), - "text", KShortcut(), view(), SLOT(slotAddTextDlg()), + "text", KShortcut(), view(), TQT_SLOT(slotAddTextDlg()), actionCollection(), "tree_add_text"); // actions for the info panel attribute list context menu del_attr = new KAction(i18n("&Delete"), "editdelete", - Key_Delete, view(), SLOT(deleteAttributes()), + Key_Delete, view(), TQT_SLOT(deleteAttributes()), actionCollection(), "attr_delete"); del_attr->setToolTip(i18n("Delete attributes")); } -QPopupMenu *DOMTreeWindow::createInfoPanelAttrContextMenu() +TQPopupMenu *DOMTreeWindow::createInfoPanelAttrContextMenu() { - QWidget *w = factory()->container("infopanelattr_context", this); + TQWidget *w = factory()->container("infopanelattr_context", this); Q_ASSERT(w); - return static_cast<QPopupMenu *>(w); + return static_cast<TQPopupMenu *>(w); } -QPopupMenu *DOMTreeWindow::createDOMTreeViewContextMenu() +TQPopupMenu *DOMTreeWindow::createDOMTreeViewContextMenu() { - QWidget *w = factory()->container("domtree_context", this); + TQWidget *w = factory()->container("domtree_context", this); Q_ASSERT(w); - return static_cast<QPopupMenu *>(w); + return static_cast<TQPopupMenu *>(w); } void DOMTreeWindow::saveProperties(KConfig *config) @@ -214,20 +214,20 @@ void DOMTreeWindow::readProperties(KConfig *config) // in 'saveProperties' #if 0 - QString url = config->readPathEntry("lastURL"); + TQString url = config->readPathEntry("lastURL"); if (!url.isEmpty()) m_view->openURL(KURL::fromPathOrURL(url)); #endif } -void DOMTreeWindow::dragEnterEvent(QDragEnterEvent *event) +void DOMTreeWindow::dragEnterEvent(TQDragEnterEvent *event) { // accept uri drops only event->accept(KURLDrag::canDecode(event)); } -void DOMTreeWindow::dropEvent(QDropEvent *event) +void DOMTreeWindow::dropEvent(TQDropEvent *event) { // this is a very simplistic implementation of a drop event. we // will only accept a dropped URL. the Qt dnd code can do *much* @@ -246,14 +246,14 @@ void DOMTreeWindow::dropEvent(QDropEvent *event) } } -void DOMTreeWindow::addMessage(int msg_id, const QString &msg) +void DOMTreeWindow::addMessage(int msg_id, const TQString &msg) { - QDateTime t(QDateTime::currentDateTime()); - QString fullmsg = t.toString(); + TQDateTime t(TQDateTime::currentDateTime()); + TQString fullmsg = t.toString(); fullmsg += ":"; if (msg_id != 0) - fullmsg += " (" + QString::number(msg_id) + ") "; + fullmsg += " (" + TQString::number(msg_id) + ") "; fullmsg += msg; if (msgdlg) msgdlg->addMessage(fullmsg); @@ -292,7 +292,7 @@ void DOMTreeWindow::optionsConfigureToolbars() // use the standard toolbar editor saveMainWindowSettings( config(), autoSaveGroup() ); KEditToolbar dlg(actionCollection()); - connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(newToolbarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(newToolbarConfig())); dlg.exec(); } @@ -316,13 +316,13 @@ void DOMTreeWindow::optionsPreferences() #endif } -void DOMTreeWindow::changeStatusbar(const QString& text) +void DOMTreeWindow::changeStatusbar(const TQString& text) { // display the text on the statusbar statusBar()->message(text); } -void DOMTreeWindow::changeCaption(const QString& text) +void DOMTreeWindow::changeCaption(const TQString& text) { // display the text on the caption setCaption(text); @@ -339,13 +339,13 @@ void DOMTreeWindow::slotHtmlPartChanged(KHTMLPart *p) part_manager = p->manager(); - connect(part_manager, SIGNAL(activePartChanged(KParts::Part *)), - SLOT(slotActivePartChanged(KParts::Part *))); - connect(part_manager, SIGNAL(partRemoved(KParts::Part *)), - SLOT(slotPartRemoved(KParts::Part *))); + connect(part_manager, TQT_SIGNAL(activePartChanged(KParts::Part *)), + TQT_SLOT(slotActivePartChanged(KParts::Part *))); + connect(part_manager, TQT_SIGNAL(partRemoved(KParts::Part *)), + TQT_SLOT(slotPartRemoved(KParts::Part *))); // set up browser extension connections - connect(p, SIGNAL(docCreated()), SLOT(slotClosePart())); + connect(p, TQT_SIGNAL(docCreated()), TQT_SLOT(slotClosePart())); } } diff --git a/konq-plugins/domtreeviewer/domtreewindow.h b/konq-plugins/domtreeviewer/domtreewindow.h index f942798..e71a3c7 100644 --- a/konq-plugins/domtreeviewer/domtreewindow.h +++ b/konq-plugins/domtreeviewer/domtreewindow.h @@ -27,7 +27,7 @@ #include <kmainwindow.h> -#include <qguardedptr.h> +#include <tqguardedptr.h> namespace domtreeviewer { class ManipulationCommand; @@ -85,22 +85,22 @@ public: /** * creates and returns the context menu for the list info panel */ - QPopupMenu *createInfoPanelAttrContextMenu(); + TQPopupMenu *createInfoPanelAttrContextMenu(); /** * returns the context menu for the list info panel */ - QPopupMenu *infoPanelAttrContextMenu() { return infopanel_ctx; } + TQPopupMenu *infoPanelAttrContextMenu() { return infopanel_ctx; } /** * creates and returns the context menu for the DOM tree view */ - QPopupMenu *createDOMTreeViewContextMenu(); + TQPopupMenu *createDOMTreeViewContextMenu(); /** * returns the context menu for the DOM tree view */ - QPopupMenu *domTreeViewContextMenu() { return domtree_ctx; } + TQPopupMenu *domTreeViewContextMenu() { return domtree_ctx; } /** * Executes the given command and adds it to the history. @@ -125,7 +125,7 @@ public slots: * @param id message id * @param msg message text */ - void addMessage(int id, const QString &msg); + void addMessage(int id, const TQString &msg); /** * Displays the message log window. @@ -136,8 +136,8 @@ protected: /** * Overridden virtuals for Qt drag 'n drop (XDND) */ - virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event); + virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event); protected: /** * This function is called when it is time for the app to save its @@ -164,8 +164,8 @@ private slots: void optionsPreferences(); void newToolbarConfig(); - void changeStatusbar(const QString& text); - void changeCaption(const QString& text); + void changeStatusbar(const TQString& text); + void changeCaption(const TQString& text); void slotHtmlPartChanged(KHTMLPart *); void slotActivePartChanged(KParts::Part *); @@ -182,13 +182,13 @@ private: MessageDialog *msgdlg; KCommandHistory *m_commandHistory; - QPopupMenu *infopanel_ctx; - QPopupMenu *domtree_ctx; + TQPopupMenu *infopanel_ctx; + TQPopupMenu *domtree_ctx; KConfig *_config; KAction *del_tree, *del_attr; - QGuardedPtr<KParts::PartManager> part_manager; + TQGuardedPtr<KParts::PartManager> part_manager; }; #endif // domtreewindow_H diff --git a/konq-plugins/domtreeviewer/messagedialog.ui.h b/konq-plugins/domtreeviewer/messagedialog.ui.h index dcb6609..33a2951 100644 --- a/konq-plugins/domtreeviewer/messagedialog.ui.h +++ b/konq-plugins/domtreeviewer/messagedialog.ui.h @@ -12,9 +12,9 @@ #include <kdebug.h> -#include <qdatetime.h> +#include <tqdatetime.h> -void MessageDialog::addMessage( const QString &msg ) +void MessageDialog::addMessage( const TQString &msg ) { messagePane->append(msg); } diff --git a/konq-plugins/domtreeviewer/plugin_domtreeviewer.cpp b/konq-plugins/domtreeviewer/plugin_domtreeviewer.cpp index 3555a84..c33f132 100644 --- a/konq-plugins/domtreeviewer/plugin_domtreeviewer.cpp +++ b/konq-plugins/domtreeviewer/plugin_domtreeviewer.cpp @@ -15,13 +15,13 @@ typedef KGenericFactory<PluginDomtreeviewer> DomtreeviewerFactory; K_EXPORT_COMPONENT_FACTORY( libdomtreeviewerplugin, DomtreeviewerFactory( "domtreeviewer" ) ) -PluginDomtreeviewer::PluginDomtreeviewer( QObject* parent, const char* name, - const QStringList & ) +PluginDomtreeviewer::PluginDomtreeviewer( TQObject* parent, const char* name, + const TQStringList & ) : Plugin( parent, name ), m_dialog( 0 ) { (void) new KAction( i18n("Show &DOM Tree"), "domtreeviewer", 0, - this, SLOT(slotShowDOMTree()), + this, TQT_SLOT(slotShowDOMTree()), actionCollection(), "viewdomtree" ); } @@ -41,7 +41,7 @@ void PluginDomtreeviewer::slotShowDOMTree() if (KHTMLPart *part = ::qt_cast<KHTMLPart *>(parent())) { m_dialog = new DOMTreeWindow(this); - connect( m_dialog, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) ); + connect( m_dialog, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); m_dialog->view()->setHtmlPart(part); m_dialog->show(); } diff --git a/konq-plugins/domtreeviewer/plugin_domtreeviewer.h b/konq-plugins/domtreeviewer/plugin_domtreeviewer.h index ba380a9..c6d7320 100644 --- a/konq-plugins/domtreeviewer/plugin_domtreeviewer.h +++ b/konq-plugins/domtreeviewer/plugin_domtreeviewer.h @@ -13,8 +13,8 @@ class PluginDomtreeviewer : public KParts::Plugin { Q_OBJECT public: - PluginDomtreeviewer( QObject* parent, const char* name, - const QStringList & ); + PluginDomtreeviewer( TQObject* parent, const char* name, + const TQStringList & ); virtual ~PluginDomtreeviewer(); public slots: diff --git a/konq-plugins/domtreeviewer/signalreceiver.cpp b/konq-plugins/domtreeviewer/signalreceiver.cpp index f928036..a0c0b1b 100644 --- a/konq-plugins/domtreeviewer/signalreceiver.cpp +++ b/konq-plugins/domtreeviewer/signalreceiver.cpp @@ -20,8 +20,8 @@ #include "signalreceiver.h" -SignalReceiver::SignalReceiver(QObject *parent, const char *name) -: QObject(parent, name), rcvd(false) +SignalReceiver::SignalReceiver(TQObject *parent, const char *name) +: TQObject(parent, name), rcvd(false) { } diff --git a/konq-plugins/domtreeviewer/signalreceiver.h b/konq-plugins/domtreeviewer/signalreceiver.h index 8c0f5d9..cf67495 100644 --- a/konq-plugins/domtreeviewer/signalreceiver.h +++ b/konq-plugins/domtreeviewer/signalreceiver.h @@ -21,7 +21,7 @@ #ifndef SIGNALCATCHER_H #define SIGNALCATCHER_H -#include <qobject.h> +#include <tqobject.h> /** * \brief Class for receiving signals. @@ -32,7 +32,7 @@ * Use as follows: * \code * SignalReceiver sr; - * sr.connect(some_obj, SIGNAL(someSignal()), SLOT(slot())); + * sr.connect(some_obj, TQT_SIGNAL(someSignal()), TQT_SLOT(slot())); * <do something with some_obj> ... * if (sr.receivedSignal()) { // yes, signal was received * } @@ -47,7 +47,7 @@ class SignalReceiver : public QObject Q_OBJECT public: - SignalReceiver(QObject *parent = 0, const char *name = 0); + SignalReceiver(TQObject *parent = 0, const char *name = 0); virtual ~SignalReceiver(); /** returns true if any signal has been received */ |