From 395a904bff7b4d6ead445c342f7ac0c5fbf29121 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 18 Jun 2011 17:00:31 +0000 Subject: TQt4 port kdeaddons This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1237404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- konq-plugins/domtreeviewer/attributeeditdialog.ui | 22 +++--- konq-plugins/domtreeviewer/domlistviewitem.cpp | 20 ++--- konq-plugins/domtreeviewer/domlistviewitem.h | 12 +-- konq-plugins/domtreeviewer/domtreecommands.cpp | 22 +++--- konq-plugins/domtreeviewer/domtreecommands.h | 25 +++--- konq-plugins/domtreeviewer/domtreeview.cpp | 92 +++++++++++----------- konq-plugins/domtreeviewer/domtreeview.h | 5 +- konq-plugins/domtreeviewer/domtreeviewbase.ui | 54 ++++++------- konq-plugins/domtreeviewer/domtreewindow.cpp | 36 ++++----- konq-plugins/domtreeviewer/domtreewindow.h | 3 +- konq-plugins/domtreeviewer/elementeditdialog.ui | 28 +++---- konq-plugins/domtreeviewer/messagedialog.ui | 20 ++--- konq-plugins/domtreeviewer/messagedialog.ui.h | 2 +- .../domtreeviewer/plugin_domtreeviewer.cpp | 6 +- konq-plugins/domtreeviewer/plugin_domtreeviewer.h | 3 +- konq-plugins/domtreeviewer/signalreceiver.cpp | 4 +- konq-plugins/domtreeviewer/signalreceiver.h | 5 +- konq-plugins/domtreeviewer/texteditdialog.ui | 18 ++--- 18 files changed, 191 insertions(+), 186 deletions(-) (limited to 'konq-plugins/domtreeviewer') diff --git a/konq-plugins/domtreeviewer/attributeeditdialog.ui b/konq-plugins/domtreeviewer/attributeeditdialog.ui index c77f92d..c98bb3d 100644 --- a/konq-plugins/domtreeviewer/attributeeditdialog.ui +++ b/konq-plugins/domtreeviewer/attributeeditdialog.ui @@ -1,6 +1,6 @@ AttributeEditDialog - + AttributeEditDialog @@ -19,15 +19,15 @@ unnamed - + - layout7 + tqlayout7 unnamed - + textLabel1 @@ -45,7 +45,7 @@ - + textLabel2 @@ -87,15 +87,15 @@ Horizontal - + - layout8 + tqlayout8 unnamed - + okBtn @@ -119,14 +119,14 @@ Expanding - + 121 20 - + cancelBtn @@ -166,7 +166,7 @@ accept() - + klineedit.h ktextedit.h diff --git a/konq-plugins/domtreeviewer/domlistviewitem.cpp b/konq-plugins/domtreeviewer/domlistviewitem.cpp index 7ab20b4..4203765 100644 --- a/konq-plugins/domtreeviewer/domlistviewitem.cpp +++ b/konq-plugins/domtreeviewer/domlistviewitem.cpp @@ -23,26 +23,26 @@ #include -DOMListViewItem::DOMListViewItem( const DOM::Node &node, TQListView *parent ) - : TQListViewItem( parent ), m_node(node) +DOMListViewItem::DOMListViewItem( const DOM::Node &node, TQListView *tqparent ) + : TQListViewItem( tqparent ), m_node(node) { init(); } -DOMListViewItem::DOMListViewItem( const DOM::Node &node, TQListView *parent, TQListViewItem *after) - : TQListViewItem( parent, after ), m_node(node) +DOMListViewItem::DOMListViewItem( const DOM::Node &node, TQListView *tqparent, TQListViewItem *after) + : TQListViewItem( tqparent, after ), m_node(node) { init(); } -DOMListViewItem::DOMListViewItem( const DOM::Node &node, TQListViewItem *parent ) - : TQListViewItem( parent ), m_node(node) +DOMListViewItem::DOMListViewItem( const DOM::Node &node, TQListViewItem *tqparent ) + : TQListViewItem( tqparent ), m_node(node) { init(); } -DOMListViewItem::DOMListViewItem( const DOM::Node &node, TQListViewItem *parent, TQListViewItem *after) - : TQListViewItem( parent, after ), m_node(node) +DOMListViewItem::DOMListViewItem( const DOM::Node &node, TQListViewItem *tqparent, TQListViewItem *after) + : TQListViewItem( tqparent, after ), m_node(node) { init(); } @@ -59,14 +59,14 @@ void DOMListViewItem::init() clos = false; } -void DOMListViewItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment ) +void DOMListViewItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int tqalignment ) { TQColorGroup _cg( cg ); TQColor c = _cg.text(); p->setFont(m_font); _cg.setColor( TQColorGroup::Text, m_color ); - TQListViewItem::paintCell( p, _cg, column, width, alignment ); + TQListViewItem::paintCell( p, _cg, column, width, tqalignment ); _cg.setColor( TQColorGroup::Text, c ); } diff --git a/konq-plugins/domtreeviewer/domlistviewitem.h b/konq-plugins/domtreeviewer/domlistviewitem.h index 9a85fbf..14cf5ec 100644 --- a/konq-plugins/domtreeviewer/domlistviewitem.h +++ b/konq-plugins/domtreeviewer/domlistviewitem.h @@ -22,18 +22,18 @@ #include #include -class DOMListViewItem : public QListViewItem +class DOMListViewItem : public TQListViewItem { public: - 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 ); + DOMListViewItem( const DOM::Node &, TQListView *tqparent ); + DOMListViewItem( const DOM::Node &, TQListView *tqparent, TQListViewItem *after ); + DOMListViewItem( const DOM::Node &, TQListViewItem *tqparent ); + DOMListViewItem( const DOM::Node &, TQListViewItem *tqparent, TQListViewItem *after ); virtual ~DOMListViewItem(); virtual void paintCell( TQPainter *p, const TQColorGroup &cg, - int column, int width, int alignment ); + int column, int width, int tqalignment ); void setColor( const TQColor &color) { m_color = color; } diff --git a/konq-plugins/domtreeviewer/domtreecommands.cpp b/konq-plugins/domtreeviewer/domtreecommands.cpp index 0bbb918..e8f8f05 100644 --- a/konq-plugins/domtreeviewer/domtreecommands.cpp +++ b/konq-plugins/domtreeviewer/domtreecommands.cpp @@ -53,7 +53,7 @@ static const char * const dom_error_msgs[] = { 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); + return i18n("Unknown Exception %1").tqarg(dom_err); else return i18n(dom_error_msgs[dom_err]); } @@ -401,8 +401,8 @@ void ChangeCDataCommand::apply() if (!shouldReapply()) { oldValue = cdata.data(); has_newlines = - TQConstString(value.unicode(), value.length()).string().contains('\n') - || TQConstString(oldValue.unicode(), oldValue.length()).string().contains('\n'); + TQConstString(value.tqunicode(), value.length()).string().tqcontains('\n') + || TQConstString(oldValue.tqunicode(), oldValue.length()).string().tqcontains('\n'); } cdata.setData(value); addChangedNode(cdata); @@ -423,8 +423,8 @@ TQString ChangeCDataCommand::name() const // == ManipulateNodeCommand =========================================== -ManipulateNodeCommand::ManipulateNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after) -: _node(node), _parent(parent), _after(after) +ManipulateNodeCommand::ManipulateNodeCommand(const DOM::Node &node, const DOM::Node &tqparent, const DOM::Node &after) +: _node(node), _parent(tqparent), _after(after) { } @@ -457,8 +457,8 @@ void ManipulateNodeCommand::remove() // == InsertNodeCommand =========================================== -InsertNodeCommand::InsertNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after) -: ManipulateNodeCommand(node, parent, after) +InsertNodeCommand::InsertNodeCommand(const DOM::Node &node, const DOM::Node &tqparent, const DOM::Node &after) +: ManipulateNodeCommand(node, tqparent, after) { } @@ -485,8 +485,8 @@ TQString InsertNodeCommand::name() const // == RemoveNodeCommand =========================================== -RemoveNodeCommand::RemoveNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after) -: ManipulateNodeCommand(node, parent, after) +RemoveNodeCommand::RemoveNodeCommand(const DOM::Node &node, const DOM::Node &tqparent, const DOM::Node &after) +: ManipulateNodeCommand(node, tqparent, after) { } @@ -513,8 +513,8 @@ TQString RemoveNodeCommand::name() const // == MoveNodeCommand =========================================== -MoveNodeCommand::MoveNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after) -: _node(node), new_parent(parent), new_after(after) +MoveNodeCommand::MoveNodeCommand(const DOM::Node &node, const DOM::Node &tqparent, const DOM::Node &after) +: _node(node), new_parent(tqparent), new_after(after) { old_parent = node.parentNode(); old_after = node.nextSibling(); diff --git a/konq-plugins/domtreeviewer/domtreecommands.h b/konq-plugins/domtreeviewer/domtreecommands.h index f068426..43af96b 100644 --- a/konq-plugins/domtreeviewer/domtreecommands.h +++ b/konq-plugins/domtreeviewer/domtreecommands.h @@ -51,9 +51,10 @@ TQString domErrorMessage(int exception_code); * Internal class for emitting signals. * @internal */ -class ManipulationCommandSignalEmitter : public QObject +class ManipulationCommandSignalEmitter : public TQObject { Q_OBJECT + TQ_OBJECT ManipulationCommandSignalEmitter(); virtual ~ManipulationCommandSignalEmitter(); @@ -73,7 +74,7 @@ signals: */ void error(int err_id, const TQString &msg); -private: // make moc not complain +private: // make tqmoc not complain friend class ManipulationCommand; }; @@ -276,10 +277,10 @@ class ManipulateNodeCommand : public ManipulationCommand { public: /** - * Prepare command, where \c node is to be contained in \c parent, just + * Prepare command, where \c node is to be contained in \c tqparent, just * before \c after. If \c after is 0, it is appended at the end. */ - ManipulateNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after); + ManipulateNodeCommand(const DOM::Node &node, const DOM::Node &tqparent, const DOM::Node &after); virtual ~ManipulateNodeCommand(); protected: @@ -303,10 +304,10 @@ class InsertNodeCommand : public ManipulateNodeCommand { public: /** - * Prepare insertion command, inserting \c node into \c parent, just - * before \c after. If \c after is 0, append it to the list of children. + * Prepare insertion command, inserting \c node into \c tqparent, just + * before \c after. If \c after is 0, append it to the list of tqchildren. */ - InsertNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after); + InsertNodeCommand(const DOM::Node &node, const DOM::Node &tqparent, const DOM::Node &after); virtual ~InsertNodeCommand(); virtual TQString name() const; @@ -329,10 +330,10 @@ class RemoveNodeCommand : public ManipulateNodeCommand { public: /** - * Prepare insertion command, inserting \c node into \c parent, just - * before \c after. If \c after is 0, append it to the list of children. + * Prepare insertion command, inserting \c node into \c tqparent, just + * before \c after. If \c after is 0, append it to the list of tqchildren. */ - RemoveNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after); + RemoveNodeCommand(const DOM::Node &node, const DOM::Node &tqparent, const DOM::Node &after); virtual ~RemoveNodeCommand(); virtual TQString name() const; @@ -352,10 +353,10 @@ class MoveNodeCommand : public ManipulationCommand { public: /** - * Move \c node from current position into \c parent, just before \c after. + * Move \c node from current position into \c tqparent, just before \c after. * Appends if \c after is 0. */ - MoveNodeCommand(const DOM::Node &node, const DOM::Node &parent, const DOM::Node &after); + MoveNodeCommand(const DOM::Node &node, const DOM::Node &tqparent, const DOM::Node &after); virtual ~MoveNodeCommand(); virtual TQString name() const; diff --git a/konq-plugins/domtreeviewer/domtreeview.cpp b/konq-plugins/domtreeviewer/domtreeview.cpp index d26dbfc..812cb5b 100644 --- a/konq-plugins/domtreeviewer/domtreeview.cpp +++ b/konq-plugins/domtreeviewer/domtreeview.cpp @@ -64,8 +64,8 @@ using namespace domtreeviewer; -DOMTreeView::DOMTreeView(TQWidget *parent, const char* name, bool /*allowSaving*/) - : DOMTreeViewBase(parent, name), m_expansionDepth(5), m_maxDepth(0), +DOMTreeView::DOMTreeView(TQWidget *tqparent, const char* name, bool /*allowSaving*/) + : DOMTreeViewBase(tqparent, name), m_expansionDepth(5), m_maxDepth(0), m_bPure(true), m_bShowAttributes(true), m_bHighlightHTML(true), m_findDialog(0), focused_child(0) { @@ -101,8 +101,8 @@ DOMTreeView::DOMTreeView(TQWidget *parent, const char* name, bool /*allowSaving* installEventFilter(m_listView); - ManipulationCommand::connect(TQT_SIGNAL(nodeChanged(const DOM::Node &)), this, TQT_SLOT(slotRefreshNode(const DOM::Node &))); - ManipulationCommand::connect(TQT_SIGNAL(structureChanged()), this, TQT_SLOT(refresh())); + ManipulationCommand::connect(TQT_SIGNAL(nodeChanged(const DOM::Node &)), TQT_TQOBJECT(this), TQT_SLOT(slotRefreshNode(const DOM::Node &))); + ManipulationCommand::connect(TQT_SIGNAL(structureChanged()), TQT_TQOBJECT(this), TQT_SLOT(refresh())); initDOMNodeInfo(); @@ -124,28 +124,28 @@ void DOMTreeView::setHtmlPart(KHTMLPart *_part) // nothing here yet } - parentWidget()->setCaption( part ? i18n( "DOM Tree for %1" ).arg(part->url().prettyURL()) : i18n("DOM Tree") ); + tqparentWidget()->setCaption( part ? i18n( "DOM Tree for %1" ).tqarg(part->url().prettyURL()) : i18n("DOM Tree") ); TQTimer::singleShot(0, this, TQT_SLOT(slotSetHtmlPartDelayed())); } DOMTreeWindow *DOMTreeView::mainWindow() const { - return static_cast(parentWidget()); + return static_cast(tqparentWidget()); } bool DOMTreeView::eventFilter(TQObject *o, TQEvent *e) { if (e->type() == TQEvent::AccelOverride) { - TQKeyEvent *ke = static_cast(e); + TQKeyEvent *ke = TQT_TQKEYEVENT(e); kdDebug(90180) << " acceloverride " << ke->key() << " o " << o->name() << endl; - if (o == m_listView) { // DOM tree + if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(m_listView)) { // DOM tree KKey ks = mainWindow()->deleteNodeAction()->shortcut().seq(0).key(0); if (ke->key() == ks.keyCodeQt()) return true; - } else if (o == nodeAttributes) { + } else if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(nodeAttributes)) { KKey ks = mainWindow()->deleteAttributeAction()->shortcut().seq(0).key(0); if (ke->key() == ks.keyCodeQt()) return true; @@ -155,14 +155,14 @@ bool DOMTreeView::eventFilter(TQObject *o, TQEvent *e) } else if (e->type() == TQEvent::FocusIn) { kdDebug(90180) << " focusin o " << o->name() << endl; - if (o != this) { + if (TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this)) { focused_child = o; } } else if (e->type() == TQEvent::FocusOut) { kdDebug(90180) << " focusout o " << o->name() << endl; - if (o != this) { + if (TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this)) { focused_child = 0; } @@ -214,7 +214,7 @@ void DOMTreeView::slotShowTree(const DOM::Node &pNode) void DOMTreeView::showRecursive(const DOM::Node &pNode, const DOM::Node &node, uint depth) { DOMListViewItem *cur_item; - DOMListViewItem *parent_item = m_itemdict[pNode.handle()]; + DOMListViewItem *tqparent_item = m_itemdict[pNode.handle()]; if (depth > m_maxDepth) { m_maxDepth = depth; @@ -224,7 +224,7 @@ void DOMTreeView::showRecursive(const DOM::Node &pNode, const DOM::Node &node, u cur_item = new DOMListViewItem(node, m_listView); m_document = pNode.ownerDocument(); } else { - cur_item = new DOMListViewItem(node, parent_item); + cur_item = new DOMListViewItem(node, tqparent_item); } //kdDebug(90180) << node.nodeName().string() << " [" << depth << "]" << endl; @@ -252,7 +252,7 @@ void DOMTreeView::showRecursive(const DOM::Node &pNode, const DOM::Node &node, u cur_item = new DOMListViewItem(node, m_listView, cur_item); m_document = pNode.ownerDocument(); } else { - cur_item = new DOMListViewItem(node, parent_item, cur_item); + cur_item = new DOMListViewItem(node, tqparent_item, cur_item); } //kdDebug(90180) << "" << endl; addElement(element, cur_item, true); @@ -318,13 +318,13 @@ void DOMTreeView::addElement ( const DOM::Node &node, DOMListViewItem *cur_item m_itemdict.insert(node.handle(), cur_item); } - DOMListViewItem *parent; - if (cur_item->parent()) { - parent = static_cast(cur_item->parent()); + DOMListViewItem *tqparent; + if (cur_item->tqparent()) { + tqparent = static_cast(cur_item->tqparent()); } else { - parent = cur_item; + tqparent = cur_item; } - cur_item = new DOMListViewItem(node, parent, cur_item); + cur_item = new DOMListViewItem(node, tqparent, cur_item); } // This is one is too much DOMListViewItem *notLastItem = static_cast(cur_item->itemAbove()); @@ -343,7 +343,7 @@ void DOMTreeView::highlightHTML(DOMListViewItem *cur_item, const TQString &nodeN * think it's worth it. */ - TQColor namedColor(palette().active().text()); + TQColor namedColor(tqpalette().active().text()); TQString tagName = nodeName.upper(); if ( tagName == "HTML" ) { namedColor = "#0000ff"; @@ -469,13 +469,13 @@ void DOMTreeView::slotMovedItems(TQPtrList &items, TQPtrList(*it); DOMListViewItem *anitem = static_cast(*anit); - DOM::Node parent = static_cast(item->parent())->node(); - Q_ASSERT(!parent.isNull()); + DOM::Node tqparent = static_cast(item->tqparent())->node(); + Q_ASSERT(!tqparent.isNull()); // 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()) + cmd->addCommand(new MoveNodeCommand(item->node(), tqparent, + anitem ? anitem->node().nextSibling() : tqparent.firstChild()) ); } @@ -503,7 +503,7 @@ void DOMTreeView::searchRecursive(DOMListViewItem* cur_item, const TQString& sea bool caseSensitive) { const TQString text(cur_item->text(0)); - if (text.contains(searchText, caseSensitive) > 0) { + if (text.tqcontains(searchText, caseSensitive) > 0) { cur_item->setUnderline(true); cur_item->setItalic(true); m_listView->setCurrentItem(cur_item); @@ -530,7 +530,7 @@ void DOMTreeView::slotSaveClicked() if (file.exists()) { const TQString title = i18n( "File Exists" ); - const TQString text = i18n( "Do you really want to overwrite: \n%1?" ).arg(url.url()); + const TQString text = i18n( "Do you really want to overwrite: \n%1?" ).tqarg(url.url()); if (KMessageBox::Continue != KMessageBox::warningContinueCancel(this, text, title, i18n("Overwrite") ) ) { return; } @@ -545,12 +545,12 @@ void DOMTreeView::slotSaveClicked() delete m_textStream; } else { const TQString title = i18n( "Unable to Open File" ); - const TQString text = i18n( "Unable to open \n %1 \n for writing" ).arg(url.path()); + const TQString text = i18n( "Unable to open \n %1 \n for writing" ).tqarg(url.path()); KMessageBox::sorry( this, text, title ); } } else { const TQString title = i18n( "Invalid URL" ); - const TQString text = i18n( "This URL \n %1 \n is not valid." ).arg(url.url()); + const TQString text = i18n( "This URL \n %1 \n is not valid." ).tqarg(url.url()); KMessageBox::sorry( this, text, title ); } } @@ -720,8 +720,8 @@ void DOMTreeView::hideMessageLine() void DOMTreeView::moveToParent() { // This is a hypersmart algorithm. - // If infoNode is defined, go to the parent of infoNode, otherwise, go - // to the parent of the tree view's current item. + // If infoNode is defined, go to the tqparent of infoNode, otherwise, go + // to the tqparent of the tree view's current item. // Hope this isn't too smart. DOM::Node cur = infoNode; @@ -773,15 +773,15 @@ void DOMTreeView::deleteNodes() // don't regard node more than once if (item->node() == last) continue; - // check for selected parent + // check for selected tqparent bool has_selected_parent = false; - for (TQListViewItem *p = item->parent(); p; p = p->parent()) { + for (TQListViewItem *p = item->tqparent(); p; p = p->tqparent()) { if (p->isSelected()) { has_selected_parent = true; break; } } if (has_selected_parent) continue; // kdDebug(90180) << " item->node " << item->node().nodeName().string() << ": schedule for removal" << endl; - // remove this node if it isn't already recursively removed by its parent + // remove this node if it isn't already recursively removed by its tqparent cmd->addCommand(new RemoveNodeCommand(item->node(), item->node().parentNode(), item->node().nextSibling())); last = item->node(); } @@ -885,13 +885,13 @@ void DOMTreeView::slotAddElementDlg() DOM::Node curNode = item->node(); try { - DOM::Node parent = addBefore() ? curNode.parentNode() : curNode; + DOM::Node tqparent = addBefore() ? curNode.parentNode() : curNode; DOM::Node after = addBefore() ? curNode : 0; // ### take namespace into account DOM::Node newNode = curNode.ownerDocument().createElement(qname); - ManipulationCommand *cmd = new InsertNodeCommand(newNode, parent, after); + ManipulationCommand *cmd = new InsertNodeCommand(newNode, tqparent, after); mainWindow()->executeAndAddCommand(cmd); if (cmd->isValid()) activateNode(newNode); @@ -921,12 +921,12 @@ void DOMTreeView::slotAddTextDlg() DOM::Node curNode = item->node(); try { - DOM::Node parent = addBefore() ? curNode.parentNode() : curNode; + DOM::Node tqparent = addBefore() ? curNode.parentNode() : curNode; DOM::Node after = addBefore() ? curNode : 0; DOM::Node newNode = curNode.ownerDocument().createTextNode(text); - ManipulationCommand *cmd = new InsertNodeCommand(newNode, parent, after); + ManipulationCommand *cmd = new InsertNodeCommand(newNode, tqparent, after); mainWindow()->executeAndAddCommand(cmd); if (cmd->isValid()) activateNode(newNode); @@ -943,21 +943,21 @@ static TQString *clickToAdd; /** * List view item for attribute list. */ -class AttributeListItem : public QListViewItem +class AttributeListItem : public TQListViewItem { typedef TQListViewItem super; bool _new; public: - AttributeListItem(TQListView *parent, TQListViewItem *prev) - : super(parent, prev), _new(true) + AttributeListItem(TQListView *tqparent, TQListViewItem *prev) + : super(tqparent, prev), _new(true) { } AttributeListItem(const TQString &attrName, const TQString &attrValue, - TQListView *parent, TQListViewItem *prev) - : super(parent, prev), _new(false) + TQListView *tqparent, TQListViewItem *prev) + : super(tqparent, prev), _new(false) { setText(0, attrName); setText(1, attrValue); @@ -973,7 +973,7 @@ public: protected: virtual void paintCell( TQPainter *p, const TQColorGroup &cg, - int column, int width, int alignment ) + int column, int width, int tqalignment ) { bool updates_enabled = listView()->isUpdatesEnabled(); listView()->setUpdatesEnabled(false); @@ -993,7 +993,7 @@ protected: TQColorGroup _cg( cg ); _cg.setColor( TQColorGroup::Text, c ); - super::paintCell( p, _cg, column, width, alignment ); + super::paintCell( p, _cg, column, width, tqalignment ); if (text_changed) setText(column, oldText); listView()->setUpdatesEnabled(updates_enabled); @@ -1015,7 +1015,7 @@ void DOMTreeView::initDOMNodeInfo() connect(applyContent, TQT_SIGNAL(clicked()), TQT_SLOT(slotApplyContent())); - ManipulationCommand::connect(TQT_SIGNAL(nodeChanged(const DOM::Node &)), this, TQT_SLOT(initializeOptionsFromNode(const DOM::Node &))); + ManipulationCommand::connect(TQT_SIGNAL(nodeChanged(const DOM::Node &)), TQT_TQOBJECT(this), TQT_SLOT(initializeOptionsFromNode(const DOM::Node &))); nodeAttributes->setRenameable(0, true); nodeAttributes->setRenameable(1, true); @@ -1168,7 +1168,7 @@ void DOMTreeView::slotEditAttribute(TQListViewItem *lvi, const TQPoint &, int co slotItemRenamed(lvi, attrName, 0); // Reget, item may have been changed - lvi = nodeAttributes->findItem(attrName, 0); + lvi = nodeAttributes->tqfindItem(attrName, 0); } if (lvi && lvi->text(1) != attrValue) diff --git a/konq-plugins/domtreeviewer/domtreeview.h b/konq-plugins/domtreeviewer/domtreeview.h index 8589805..499a545 100644 --- a/konq-plugins/domtreeviewer/domtreeview.h +++ b/konq-plugins/domtreeviewer/domtreeview.h @@ -47,9 +47,10 @@ class KHTMLPart; class DOMTreeView : public DOMTreeViewBase { Q_OBJECT + TQ_OBJECT public: - DOMTreeView(TQWidget *parent, const char* name, bool allowSaving = true); + DOMTreeView(TQWidget *tqparent, const char* name, bool allowSaving = true); ~DOMTreeView(); KHTMLPart *htmlPart() const { return part; } @@ -168,7 +169,7 @@ class DOMTreeView : public DOMTreeViewBase // == DOM Node Info panel ====================================== public: - // Keep in sync with the widget stack children + // Keep in sync with the widget stack tqchildren enum InfoPanel { ElementPanel, CDataPanel, EmptyPanel }; public slots: diff --git a/konq-plugins/domtreeviewer/domtreeviewbase.ui b/konq-plugins/domtreeviewer/domtreeviewbase.ui index 984e435..025c623 100644 --- a/konq-plugins/domtreeviewer/domtreeviewbase.ui +++ b/konq-plugins/domtreeviewer/domtreeviewbase.ui @@ -1,6 +1,6 @@ DOMTreeViewBase - + DOMTreeViewBase @@ -12,7 +12,7 @@ 508 - + 600 380 @@ -25,7 +25,7 @@ unnamed - + messageLinePane @@ -108,7 +108,7 @@ Fixed - + 10 20 @@ -133,9 +133,9 @@ - + - layout7 + tqlayout7 @@ -169,11 +169,11 @@ true - + groupBox1 - + 300 400 @@ -186,15 +186,15 @@ unnamed - + - layout4 + tqlayout4 unnamed - + textLabel1_2_3 @@ -205,7 +205,7 @@ nodeValue - + textLabel1_2_2 @@ -216,7 +216,7 @@ nodeType - + textLabel1_2 @@ -227,7 +227,7 @@ nodeNamespace - + textLabel1 @@ -308,11 +308,11 @@ - + nodeInfoStack - + ElementInfo @@ -370,7 +370,7 @@ - + CharacterData @@ -398,15 +398,15 @@ false - + - layout3 + tqlayout3 unnamed - + applyContent @@ -424,7 +424,7 @@ Expanding - + 81 20 @@ -435,7 +435,7 @@ - + Empty @@ -448,7 +448,7 @@ - + groupBox2 @@ -459,7 +459,7 @@ unnamed - + m_pureCheckBox @@ -470,7 +470,7 @@ true - + m_showAttributesCheckBox @@ -481,7 +481,7 @@ true - + m_highlightHTMLCheckBox @@ -509,7 +509,7 @@ m_highlightHTMLCheckBox nodeAttributes - + klineedit.h kpushbutton.h diff --git a/konq-plugins/domtreeviewer/domtreewindow.cpp b/konq-plugins/domtreeviewer/domtreewindow.cpp index 0dd6d7f..6790e5a 100644 --- a/konq-plugins/domtreeviewer/domtreewindow.cpp +++ b/konq-plugins/domtreeviewer/domtreewindow.cpp @@ -72,7 +72,7 @@ DOMTreeWindow::DOMTreeWindow(PluginDomtreeviewer *plugin) // message window dialog msgdlg = new MessageDialog(0, "MessageDialog"); - msgdlg->messagePane->setPaletteBackgroundColor(palette().active().base()); + msgdlg->messagePane->setPaletteBackgroundColor(tqpalette().active().base()); // msgdlg->show(); // then, setup our actions @@ -93,7 +93,7 @@ DOMTreeWindow::DOMTreeWindow(PluginDomtreeviewer *plugin) TQT_SLOT(slotHtmlPartChanged(KHTMLPart *))); ManipulationCommand::connect(TQT_SIGNAL(error(int, const TQString &)), - this, TQT_SLOT(addMessage(int, const TQString &))); + TQT_TQOBJECT(this), TQT_SLOT(addMessage(int, const TQString &))); infopanel_ctx = createInfoPanelAttrContextMenu(); domtree_ctx = createDOMTreeViewContextMenu(); @@ -119,17 +119,17 @@ void DOMTreeWindow::executeAndAddCommand(ManipulationCommand *cmd) void DOMTreeWindow::setupActions() { - KStdAction::close(this, TQT_SLOT(close()), actionCollection()); + KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); - 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); + KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(slotCut()), actionCollection())->setEnabled(false); + KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(slotCopy()), actionCollection())->setEnabled(false); + KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(slotPaste()), actionCollection())->setEnabled(false); m_commandHistory = new KCommandHistory(actionCollection()); - KStdAction::find(this, TQT_SLOT(slotFind()), actionCollection()); + KStdAction::find(TQT_TQOBJECT(this), TQT_SLOT(slotFind()), actionCollection()); - KStdAction::redisplay(m_view, TQT_SLOT(refresh()), actionCollection()); + KStdAction::redisplay(TQT_TQOBJECT(m_view), TQT_SLOT(refresh()), actionCollection()); // toggle manipulation dialog KAction *showMsgDlg = new KAction(i18n("Show Message Log"), @@ -141,14 +141,14 @@ void DOMTreeWindow::setupActions() // actionCollection(), "custom_action"); // actions for the dom tree list view toolbar - KStdAction::up(view(), TQT_SLOT(moveToParent()), actionCollection(), "tree_up"); + KStdAction::up(TQT_TQOBJECT(view()), TQT_SLOT(moveToParent()), actionCollection(), "tree_up"); KAction *tree_inc_level = new KAction(i18n("Expand"), - "1rightarrow", CTRL+Key_Greater, view(), + "1rightarrow", CTRL+Key_Greater, TQT_TQOBJECT(view()), 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(), + "1leftarrow", CTRL+Key_Less, TQT_TQOBJECT(view()), TQT_SLOT(decreaseExpansionDepth()), actionCollection(), "tree_dec_level"); tree_dec_level->setToolTip(i18n("Decrease expansion level")); @@ -156,20 +156,20 @@ void DOMTreeWindow::setupActions() // actions for the dom tree list view context menu del_tree = new KAction(i18n("&Delete"), "editdelete", - Key_Delete, view(), TQT_SLOT(deleteNodes()), + Key_Delete, TQT_TQOBJECT(view()), TQT_SLOT(deleteNodes()), actionCollection(), "tree_delete"); del_tree->setToolTip(i18n("Delete nodes")); /*KAction *new_elem = */new KAction(i18n("New &Element ..."), - "bookmark", KShortcut(), view(), + "bookmark", KShortcut(), TQT_TQOBJECT(view()), TQT_SLOT(slotAddElementDlg()), actionCollection(), "tree_add_element"); /*KAction *new_text = */new KAction(i18n("New &Text Node ..."), - "text", KShortcut(), view(), TQT_SLOT(slotAddTextDlg()), + "text", KShortcut(), TQT_TQOBJECT(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(), TQT_SLOT(deleteAttributes()), + Key_Delete, TQT_TQOBJECT(view()), TQT_SLOT(deleteAttributes()), actionCollection(), "attr_delete"); del_attr->setToolTip(i18n("Delete attributes")); @@ -230,7 +230,7 @@ void DOMTreeWindow::dragEnterEvent(TQDragEnterEvent *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* + // will only accept a dropped URL. the TQt dnd code can do *much* // much more, so please read the docs there KURL::List urls; @@ -248,7 +248,7 @@ void DOMTreeWindow::dropEvent(TQDropEvent *event) void DOMTreeWindow::addMessage(int msg_id, const TQString &msg) { - TQDateTime t(TQDateTime::currentDateTime()); + TQDateTime t(TQDateTime::tqcurrentDateTime()); TQString fullmsg = t.toString(); fullmsg += ":"; @@ -356,7 +356,7 @@ void DOMTreeWindow::slotActivePartChanged(KParts::Part *p) m_commandHistory->clear(); view()->disconnectFromTornDownPart(); - view()->setHtmlPart(::qt_cast(p)); + view()->setHtmlPart(::tqqt_cast(p)); } void DOMTreeWindow::slotPartRemoved(KParts::Part *p) diff --git a/konq-plugins/domtreeviewer/domtreewindow.h b/konq-plugins/domtreeviewer/domtreewindow.h index cbd1310..c7e134b 100644 --- a/konq-plugins/domtreeviewer/domtreewindow.h +++ b/konq-plugins/domtreeviewer/domtreewindow.h @@ -61,6 +61,7 @@ class TQPopupMenu; class DOMTreeWindow : public KMainWindow { Q_OBJECT + TQ_OBJECT public: /** * Default Constructor @@ -134,7 +135,7 @@ public slots: protected: /** - * Overridden virtuals for Qt drag 'n drop (XDND) + * Overridden virtuals for TQt drag 'n drop (XDND) */ virtual void dragEnterEvent(TQDragEnterEvent *event); virtual void dropEvent(TQDropEvent *event); diff --git a/konq-plugins/domtreeviewer/elementeditdialog.ui b/konq-plugins/domtreeviewer/elementeditdialog.ui index 8705250..f91f717 100644 --- a/konq-plugins/domtreeviewer/elementeditdialog.ui +++ b/konq-plugins/domtreeviewer/elementeditdialog.ui @@ -1,6 +1,6 @@ ElementEditDialog - + ElementEditDialog @@ -19,15 +19,15 @@ unnamed - + - layout7 + tqlayout7 unnamed - + textLabel1 @@ -45,15 +45,15 @@ - + - layout3 + tqlayout3 unnamed - + textLabel2 @@ -102,15 +102,15 @@ Horizontal - + - layout6 + tqlayout6 unnamed - + insChildBtn @@ -124,7 +124,7 @@ false - + insBeforeBtn @@ -145,14 +145,14 @@ Expanding - + 60 20 - + cancelBtn @@ -192,7 +192,7 @@ accept() - + klineedit.h kcombobox.h diff --git a/konq-plugins/domtreeviewer/messagedialog.ui b/konq-plugins/domtreeviewer/messagedialog.ui index 3ef4a75..73223a5 100644 --- a/konq-plugins/domtreeviewer/messagedialog.ui +++ b/konq-plugins/domtreeviewer/messagedialog.ui @@ -1,6 +1,6 @@ MessageDialog - + MessageDialog @@ -39,15 +39,15 @@ false - + - layout2 + tqlayout2 unnamed - + btnClear @@ -68,14 +68,14 @@ Expanding - + 300 20 - + btnClose @@ -107,10 +107,10 @@ messagedialog.ui.h - - addMessage( const QString & msg ) - - + + addMessage( const TQString & msg ) + + ktextedit.h diff --git a/konq-plugins/domtreeviewer/messagedialog.ui.h b/konq-plugins/domtreeviewer/messagedialog.ui.h index 33a2951..0c660d0 100644 --- a/konq-plugins/domtreeviewer/messagedialog.ui.h +++ b/konq-plugins/domtreeviewer/messagedialog.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you want to add, delete, or rename functions or slots, use -** Qt Designer to update this file, preserving your code. +** TQt Designer to update this file, preserving your code. ** ** You should not define a constructor or destructor in this file. ** Instead, write your code in functions called init() and destroy(). diff --git a/konq-plugins/domtreeviewer/plugin_domtreeviewer.cpp b/konq-plugins/domtreeviewer/plugin_domtreeviewer.cpp index c33f132..2615263 100644 --- a/konq-plugins/domtreeviewer/plugin_domtreeviewer.cpp +++ b/konq-plugins/domtreeviewer/plugin_domtreeviewer.cpp @@ -15,9 +15,9 @@ typedef KGenericFactory DomtreeviewerFactory; K_EXPORT_COMPONENT_FACTORY( libdomtreeviewerplugin, DomtreeviewerFactory( "domtreeviewer" ) ) -PluginDomtreeviewer::PluginDomtreeviewer( TQObject* parent, const char* name, +PluginDomtreeviewer::PluginDomtreeviewer( TQObject* tqparent, const char* name, const TQStringList & ) - : Plugin( parent, name ), m_dialog( 0 ) + : Plugin( tqparent, name ), m_dialog( 0 ) { (void) new KAction( i18n("Show &DOM Tree"), "domtreeviewer", 0, @@ -38,7 +38,7 @@ void PluginDomtreeviewer::slotShowDOMTree() delete m_dialog; Q_ASSERT((DOMTreeWindow *)m_dialog == (DOMTreeWindow *)0); } - if (KHTMLPart *part = ::qt_cast(parent())) + if (KHTMLPart *part = ::tqqt_cast(tqparent())) { m_dialog = new DOMTreeWindow(this); connect( m_dialog, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); diff --git a/konq-plugins/domtreeviewer/plugin_domtreeviewer.h b/konq-plugins/domtreeviewer/plugin_domtreeviewer.h index c6d7320..75ec607 100644 --- a/konq-plugins/domtreeviewer/plugin_domtreeviewer.h +++ b/konq-plugins/domtreeviewer/plugin_domtreeviewer.h @@ -12,8 +12,9 @@ class KURL; class PluginDomtreeviewer : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - PluginDomtreeviewer( TQObject* parent, const char* name, + PluginDomtreeviewer( TQObject* tqparent, const char* name, const TQStringList & ); virtual ~PluginDomtreeviewer(); diff --git a/konq-plugins/domtreeviewer/signalreceiver.cpp b/konq-plugins/domtreeviewer/signalreceiver.cpp index a0c0b1b..fb67abf 100644 --- a/konq-plugins/domtreeviewer/signalreceiver.cpp +++ b/konq-plugins/domtreeviewer/signalreceiver.cpp @@ -20,8 +20,8 @@ #include "signalreceiver.h" -SignalReceiver::SignalReceiver(TQObject *parent, const char *name) -: TQObject(parent, name), rcvd(false) +SignalReceiver::SignalReceiver(TQObject *tqparent, const char *name) +: TQObject(tqparent, name), rcvd(false) { } diff --git a/konq-plugins/domtreeviewer/signalreceiver.h b/konq-plugins/domtreeviewer/signalreceiver.h index cf67495..9652310 100644 --- a/konq-plugins/domtreeviewer/signalreceiver.h +++ b/konq-plugins/domtreeviewer/signalreceiver.h @@ -42,12 +42,13 @@ * use different signal receiver instances for different signals. * @autor Leo Savernik */ -class SignalReceiver : public QObject +class SignalReceiver : public TQObject { Q_OBJECT + TQ_OBJECT public: - SignalReceiver(TQObject *parent = 0, const char *name = 0); + SignalReceiver(TQObject *tqparent = 0, const char *name = 0); virtual ~SignalReceiver(); /** returns true if any signal has been received */ diff --git a/konq-plugins/domtreeviewer/texteditdialog.ui b/konq-plugins/domtreeviewer/texteditdialog.ui index 96980e2..8563032 100644 --- a/konq-plugins/domtreeviewer/texteditdialog.ui +++ b/konq-plugins/domtreeviewer/texteditdialog.ui @@ -1,6 +1,6 @@ TextEditDialog - + TextEditDialog @@ -19,7 +19,7 @@ unnamed - + textLabel1 @@ -58,15 +58,15 @@ Horizontal - + - layout6 + tqlayout6 unnamed - + insChildBtn @@ -80,7 +80,7 @@ false - + insBeforeBtn @@ -101,14 +101,14 @@ Expanding - + 60 20 - + cancelBtn @@ -142,7 +142,7 @@ accept() - + ktextedit.h -- cgit v1.2.1