summaryrefslogtreecommitdiffstats
path: root/quanta/parts/kafka
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
commite985f7e545f4739493965aad69bbecb136dc9346 (patch)
tree54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /quanta/parts/kafka
parentf7670c198945adc3b95ad69a959fe5f8ae55b493 (diff)
downloadtdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz
tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/parts/kafka')
-rw-r--r--quanta/parts/kafka/domtreeview.cpp8
-rw-r--r--quanta/parts/kafka/domtreeview.h8
-rw-r--r--quanta/parts/kafka/htmldocumentproperties.cpp36
-rw-r--r--quanta/parts/kafka/htmldocumentproperties.h3
-rw-r--r--quanta/parts/kafka/htmldocumentpropertiesui.ui42
-rw-r--r--quanta/parts/kafka/htmlenhancer.cpp24
-rw-r--r--quanta/parts/kafka/htmlenhancer.h4
-rw-r--r--quanta/parts/kafka/kafkacommon.cpp414
-rw-r--r--quanta/parts/kafka/kafkacommon.h148
-rw-r--r--quanta/parts/kafka/kafkadragobject.cpp4
-rw-r--r--quanta/parts/kafka/kafkadragobject.h5
-rw-r--r--quanta/parts/kafka/kafkahtmlpart.cpp64
-rw-r--r--quanta/parts/kafka/kafkahtmlpart.h15
-rw-r--r--quanta/parts/kafka/kafkasyncoptions.cpp4
-rw-r--r--quanta/parts/kafka/kafkasyncoptions.h3
-rw-r--r--quanta/parts/kafka/kafkasyncoptionsui.ui34
-rw-r--r--quanta/parts/kafka/nodeenhancer.h4
-rw-r--r--quanta/parts/kafka/undoredo.cpp52
-rw-r--r--quanta/parts/kafka/undoredo.h14
-rw-r--r--quanta/parts/kafka/wkafkapart.cpp174
-rw-r--r--quanta/parts/kafka/wkafkapart.h21
21 files changed, 544 insertions, 537 deletions
diff --git a/quanta/parts/kafka/domtreeview.cpp b/quanta/parts/kafka/domtreeview.cpp
index 5ed55a1b..33ad81ac 100644
--- a/quanta/parts/kafka/domtreeview.cpp
+++ b/quanta/parts/kafka/domtreeview.cpp
@@ -27,7 +27,7 @@
#include "domtreeview.moc"
-DOMTreeView::DOMTreeView(TQWidget *parent, KHTMLPart *currentpart, const char * name) : KListView(parent, name)
+DOMTreeView::DOMTreeView(TQWidget *tqparent, KHTMLPart *currentpart, const char * name) : KListView(tqparent, name)
{
setCaption(name);
setRootIsDecorated(true);
@@ -137,10 +137,10 @@ void DOMTreeView::slotItemClicked(TQListViewItem *cur_item)
}
}
-KafkaDOMTreeDialog::KafkaDOMTreeDialog(TQWidget *parent, KHTMLPart *part, const char* name, bool modal, WFlags fl )
- : TQDialog(parent, name, modal, fl)
+KafkaDOMTreeDialog::KafkaDOMTreeDialog(TQWidget *tqparent, KHTMLPart *part, const char* name, bool modal, WFlags fl )
+ : TQDialog(tqparent, name, modal, fl)
{
- setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) );
+ tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)5, (TQSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) );
DialogLayout = new TQGridLayout( this, 1, 1, 11, 6, "DialogLayout");
domview = new DOMTreeView(this, part, name);
domview->setTitle(i18n( "Debugging KafkaWidget DOM Tree " ));
diff --git a/quanta/parts/kafka/domtreeview.h b/quanta/parts/kafka/domtreeview.h
index e8899b59..2f3ea65a 100644
--- a/quanta/parts/kafka/domtreeview.h
+++ b/quanta/parts/kafka/domtreeview.h
@@ -38,8 +38,9 @@ class TQGridLayout;
class DOMTreeView : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- DOMTreeView(TQWidget *parent, KHTMLPart *part, const char * name = 0);
+ DOMTreeView(TQWidget *tqparent, KHTMLPart *part, const char * name = 0);
~DOMTreeView();
void setTitle(const TQString &str);
void recursive(const DOM::Node &pNode, const DOM::Node &node);
@@ -63,11 +64,12 @@ class DOMTreeView : public KListView
};
-class KafkaDOMTreeDialog : public QDialog
+class KafkaDOMTreeDialog : public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- KafkaDOMTreeDialog(TQWidget *parent = 0, KHTMLPart *part = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ KafkaDOMTreeDialog(TQWidget *tqparent = 0, KHTMLPart *part = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~KafkaDOMTreeDialog();
DOMTreeView *domview;
TQGridLayout *DialogLayout;
diff --git a/quanta/parts/kafka/htmldocumentproperties.cpp b/quanta/parts/kafka/htmldocumentproperties.cpp
index d8fee439..a6fdd8bb 100644
--- a/quanta/parts/kafka/htmldocumentproperties.cpp
+++ b/quanta/parts/kafka/htmldocumentproperties.cpp
@@ -44,9 +44,9 @@
#include "viewmanager.h"
-htmlDocumentProperties::htmlDocumentProperties( TQWidget* parent, bool forceInsertionOfBasicNodes, const char* name,
+htmlDocumentProperties::htmlDocumentProperties( TQWidget* tqparent, bool forceInsertionOfBasicNodes, const char* name,
bool modal, WFlags fl) :
- htmlDocumentPropertiesui(parent, name, modal, fl), titleNode( 0L ), htmlNode( 0L ),
+ htmlDocumentPropertiesui(tqparent, name, modal, fl), titleNode( 0L ), htmlNode( 0L ),
headNode( 0L ), linkNode( 0L ), bodyNode( 0L), doctypeNode( 0L ), CSSNode ( 0L ),
xmlNode( 0L ), titleDirty(false), linkDirty(false)
{
@@ -69,7 +69,7 @@ htmlDocumentProperties::htmlDocumentProperties( TQWidget* parent, bool forceInse
ok->setAutoDefault(true);
//set the taborder and disable focus for some widgets.
- currentDTD->setFocusPolicy(TQWidget::NoFocus);
+ currentDTD->setFocusPolicy(TQ_NoFocus);
TQWidget::setTabOrder(title, metaItems);
TQWidget::setTabOrder(metaItems, metaItemsAdd);
TQWidget::setTabOrder(metaItemsAdd, metaItemsDelete);
@@ -98,7 +98,7 @@ htmlDocumentProperties::htmlDocumentProperties( TQWidget* parent, bool forceInse
cssRules->addColumn(i18n("Rule"));
cssRules->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
cssRules->setLineWidth( 2 );
- //cssRules->setFocusPolicy(TQWidget::ClickFocus);
+ //cssRules->setFocusPolicy(TQ_ClickFocus);
cssRules->setSorting(-1);
//search for the head, html, title Node
@@ -108,7 +108,7 @@ htmlDocumentProperties::htmlDocumentProperties( TQWidget* parent, bool forceInse
while(node)
{
nodeName = node->tag->name.lower();
- if(nodeName == "?xml" || nodeName.contains("xml pi block"))
+ if(nodeName == "?xml" || nodeName.tqcontains("xml pi block"))
xmlNode = node;
if(nodeName == "html")
htmlNode = node;
@@ -116,7 +116,7 @@ htmlDocumentProperties::htmlDocumentProperties( TQWidget* parent, bool forceInse
headNode = node;
if(nodeName == "body")
bodyNode = node;
- if(nodeName == "!doctype" || nodeName.contains("dtd block"))
+ if(nodeName == "!doctype" || nodeName.tqcontains("dtd block"))
doctypeNode = node;
if(nodeName == "title")
titleNode = node;
@@ -219,7 +219,7 @@ htmlDocumentProperties::htmlDocumentProperties( TQWidget* parent, bool forceInse
cssStylesheet->setMode(KFile::File | KFile::ExistingOnly );
baseURL.setPath(ViewManager::ref()->activeDocument()->url().directory());
QuantaCommon::setUrl(url, linkNode->tag->attributeValue(index));
- url = QExtFileInfo::toAbsolute(url, baseURL);
+ url = TQExtFileInfo::toAbsolute(url, baseURL);
cssStylesheet->setURL(url.url());
}
}
@@ -285,10 +285,10 @@ void htmlDocumentProperties::loadCSS(Node *node)
if(node->tag->type == Tag::ScriptStructureBegin)
{
selector = node->tag->tagStr();
- selector = selector.left((uint)selector.find("{")).stripWhiteSpace();
+ selector = selector.left((uint)selector.tqfind("{")).stripWhiteSpace();
if(node->child)
item = new NodeLinkedViewItem(cssRules, selector,
- node->child->tag->tagStr().replace('\n'," "));
+ node->child->tag->tagStr().tqreplace('\n'," "));
else
item = new NodeLinkedViewItem(cssRules, selector, "");
item->node = node;
@@ -537,7 +537,7 @@ void htmlDocumentProperties::accept()
QuantaCommon::setUrl(url, cssStylesheet->url());
baseURL = view->document()->url();
baseURL.setPath(baseURL.directory());
- url = QExtFileInfo::toRelative(url, baseURL);
+ url = TQExtFileInfo::toRelative(url, baseURL);
finalURL = url.url();
if (url.protocol() == view->document()->url().protocol())
finalURL.remove(0, url.protocol().length() + 1);
@@ -594,7 +594,7 @@ void htmlDocumentProperties::addBasicNodes(NodeModifsSet *modifs)
Node *allTheNodes, *lastHeadChild, *lastBodyChild, *lastHtmlChild;
Node *n, *nextNode;
bool htmlNodeCreated = false, bodyNodeCreated = false;
- QTag *qHead, *qBody;
+ TQTag *qHead, *qBody;
TQString tagName;
if(headNode)
@@ -602,7 +602,7 @@ void htmlDocumentProperties::addBasicNodes(NodeModifsSet *modifs)
QuantaView *view = ViewManager::ref()->activeView();
- if(!xmlNode && view->document()->defaultDTD()->name.contains("XHTML", false))
+ if(!xmlNode && view->document()->defaultDTD()->name.tqcontains("XHTML", false))
{
//if the xml node is not present and the current DTD is a xhtml like, create it.
allTheNodes = baseNode;
@@ -618,7 +618,7 @@ void htmlDocumentProperties::addBasicNodes(NodeModifsSet *modifs)
if(!doctypeNode)
{
//if the !doctype node is not present, create it
- if(!view->document()->defaultDTD()->name.contains("XHTML", false))
+ if(!view->document()->defaultDTD()->name.tqcontains("XHTML", false))
{
allTheNodes = baseNode;
baseNode = 0L;
@@ -645,13 +645,13 @@ void htmlDocumentProperties::addBasicNodes(NodeModifsSet *modifs)
//TODO: hardcoded
//If it is XML, it add the namespace.
- if(view->document()->defaultDTD()->name.contains("XHTML", false))
+ if(view->document()->defaultDTD()->name.tqcontains("XHTML", false))
htmlNode->tag->editAttribute("xmlns", "http://www.w3.org/1999/xhtml");
htmlNode->child = allTheNodes;
while(allTheNodes)
{
- allTheNodes->parent = htmlNode;
+ allTheNodes->tqparent = htmlNode;
allTheNodes = allTheNodes->next;
}
htmlNodeCreated = true;
@@ -685,7 +685,7 @@ void htmlDocumentProperties::addBasicNodes(NodeModifsSet *modifs)
if(qHead->isChild(allTheNodes))
{
/*//TODO:LOG this into the modif!!
- allTheNodes->parent = headNode;
+ allTheNodes->tqparent = headNode;
if(lastHeadChild)
{
lastHeadChild->next = allTheNodes;
@@ -701,7 +701,7 @@ void htmlDocumentProperties::addBasicNodes(NodeModifsSet *modifs)
else if(bodyNodeCreated && htmlNodeCreated && qBody->isChild(allTheNodes))
{
//TODO:log!!
- /**allTheNodes->parent = bodyNode;
+ /**allTheNodes->tqparent = bodyNode;
if(lastBodyChild)
{
lastBodyChild->next = allTheNodes;
@@ -717,7 +717,7 @@ void htmlDocumentProperties::addBasicNodes(NodeModifsSet *modifs)
else
{
//TODO:log? no.
- /**allTheNodes->parent = htmlNode;
+ /**allTheNodes->tqparent = htmlNode;
lastHtmlChild->next = allTheNodes;
allTheNodes->prev = lastHtmlChild;
lastHtmlChild = allTheNodes;*/
diff --git a/quanta/parts/kafka/htmldocumentproperties.h b/quanta/parts/kafka/htmldocumentproperties.h
index 3bcfdcb1..bc0c9423 100644
--- a/quanta/parts/kafka/htmldocumentproperties.h
+++ b/quanta/parts/kafka/htmldocumentproperties.h
@@ -45,12 +45,13 @@ public:
class htmlDocumentProperties : public htmlDocumentPropertiesui
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* @param forceInsertionOfBasicNodes Force the insertion of the basic Nodes (HTML, BODY, HEAD, ...) if pressing OK
* without having made any changes.
*/
- htmlDocumentProperties( TQWidget* parent = 0, bool forceInsertionOfBasicNodes = false,
+ htmlDocumentProperties( TQWidget* tqparent = 0, bool forceInsertionOfBasicNodes = false,
const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~htmlDocumentProperties();
diff --git a/quanta/parts/kafka/htmldocumentpropertiesui.ui b/quanta/parts/kafka/htmldocumentpropertiesui.ui
index 6314ca62..e83d6303 100644
--- a/quanta/parts/kafka/htmldocumentpropertiesui.ui
+++ b/quanta/parts/kafka/htmldocumentpropertiesui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>htmlDocumentPropertiesui</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>htmlDocumentPropertiesui</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QListView" row="0" column="0">
+ <widget class="TQListView" row="0" column="0">
<column>
<property name="text">
<string>Column 1</string>
@@ -42,7 +42,7 @@
<property name="name">
<cstring>listView1</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>0</width>
<height>0</height>
@@ -63,7 +63,7 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -79,7 +79,7 @@
<string>Current DTD: </string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -95,7 +95,7 @@
<string>Title: </string>
</property>
</widget>
- <widget class="QLabel" row="8" column="0">
+ <widget class="TQLabel" row="8" column="0">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -111,7 +111,7 @@
<string>Link CSS stylesheet:</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -137,14 +137,14 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>86</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="5" column="0">
+ <widget class="TQLabel" row="5" column="0">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -170,7 +170,7 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>84</height>
@@ -187,7 +187,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>226</width>
<height>21</height>
@@ -220,7 +220,7 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>41</width>
<height>20</height>
@@ -374,7 +374,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>250</width>
<height>0</height>
@@ -393,7 +393,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>250</width>
<height>0</height>
@@ -441,16 +441,16 @@
<tabstop>ok</tabstop>
<tabstop>cancel</tabstop>
</tabstops>
-<slots>
+<Q_SLOTS>
<slot access="protected" specifier="pure virtual">newMetaItem()</slot>
<slot access="protected" specifier="pure virtual">deleteCurrentMetaItem()</slot>
<slot access="protected" specifier="pure virtual">newCSSRule()</slot>
<slot access="protected" specifier="pure virtual">editCSSRule()</slot>
<slot access="protected" specifier="pure virtual">deleteCurrentCSSRule()</slot>
- <slot access="protected" specifier="pure virtual">titleChanged(const QString &amp;)</slot>
- <slot access="protected" specifier="pure virtual">metaChanged(QListViewItem * )</slot>
- <slot access="protected" specifier="pure virtual">CSSChanged(QListViewItem * )</slot>
- <slot access="protected" specifier="pure virtual">linkChanged( const QString&amp; )</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+ <slot access="protected" specifier="pure virtual">titleChanged(const TQString &amp;)</slot>
+ <slot access="protected" specifier="pure virtual">metaChanged(TQListViewItem * )</slot>
+ <slot access="protected" specifier="pure virtual">CSSChanged(TQListViewItem * )</slot>
+ <slot access="protected" specifier="pure virtual">linkChanged( const TQString&amp; )</slot>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/quanta/parts/kafka/htmlenhancer.cpp b/quanta/parts/kafka/htmlenhancer.cpp
index d900d77d..3f757a48 100644
--- a/quanta/parts/kafka/htmlenhancer.cpp
+++ b/quanta/parts/kafka/htmlenhancer.cpp
@@ -47,7 +47,7 @@ HTMLEnhancer::~HTMLEnhancer()
delete m_stddirs;
}
-bool HTMLEnhancer::enhanceNode(Node *node, DOM::Node parentDNode, DOM::Node nextDNode)
+bool HTMLEnhancer::enhanceNode(Node *node, DOM::Node tqparentDNode, DOM::Node nextDNode)
{
DOM::Node domNode, domNode2, attr, *ptDomNode;
bool tbody, goUp;
@@ -64,7 +64,7 @@ bool HTMLEnhancer::enhanceNode(Node *node, DOM::Node parentDNode, DOM::Node next
{
baseURL.setPath(ViewManager::ref()->activeDocument()->url().directory());
QuantaCommon::setUrl(url, domNode.nodeValue().string());
- url = QExtFileInfo::toAbsolute(url, baseURL);
+ url = TQExtFileInfo::toAbsolute(url, baseURL);
domNode.setNodeValue(url.url());
#ifdef HEAVY_DEBUG
kdDebug(25001)<< "HTMLTranslator::translateNode() - new src : " << url.url() << endl;
@@ -80,7 +80,7 @@ bool HTMLEnhancer::enhanceNode(Node *node, DOM::Node parentDNode, DOM::Node next
{
baseURL.setPath(ViewManager::ref()->activeDocument()->url().directory());
QuantaCommon::setUrl(url, domNode.nodeValue().string());
- url = QExtFileInfo::toAbsolute(url, baseURL);
+ url = TQExtFileInfo::toAbsolute(url, baseURL);
domNode.setNodeValue(url.url());
#ifdef HEAVY_DEBUG
kdDebug(25001)<< "HTMLTranslator::translateNode() - new href : " << url.url() << endl;
@@ -91,7 +91,7 @@ bool HTMLEnhancer::enhanceNode(Node *node, DOM::Node parentDNode, DOM::Node next
//THEN if it is the style element, add a DOM::Node::TEXT_NODE child gathering all the CSS
//by default, the parser parse it as a script, which can't be translated in DOM::Nodes.
if((node->tag->type == Tag::XmlTag && node->tag->name.lower() == "style") ||
- (node->tag->type == Tag::ScriptTag && node->tag->name.lower().contains("style") != 0))
+ (node->tag->type == Tag::ScriptTag && node->tag->name.lower().tqcontains("style") != 0))
{
//If the style Node doesn't exists, create it
if(!node->rootNode())
@@ -126,13 +126,13 @@ bool HTMLEnhancer::enhanceNode(Node *node, DOM::Node parentDNode, DOM::Node next
}
}
- QTag* qTag = QuantaCommon::tagFromDTD(m_wkafkapart->getCurrentDoc()->defaultDTD(),
- parentDNode.nodeName().string());
+ TQTag* qTag = QuantaCommon::tagFromDTD(m_wkafkapart->getCurrentDoc()->defaultDTD(),
+ tqparentDNode.nodeName().string());
- //THEN replace, if asked, scripts by a little icon.
+ //THEN tqreplace, if asked, scripts by a little icon.
if(node->tag->type == Tag::ScriptTag && m_showIconForScripts && qTag->isChild("IMG", false))
{
- script = node->tag->name.left(node->tag->name.find("block", 0, false) - 1).lower();
+ script = node->tag->name.left(node->tag->name.tqfind("block", 0, false) - 1).lower();
#ifdef LIGHT_DEBUG
kdDebug(25001)<< "HTMLTranslator::translateNode() - BLOCK:" << script << ":" << endl;
#endif
@@ -160,7 +160,7 @@ bool HTMLEnhancer::enhanceNode(Node *node, DOM::Node parentDNode, DOM::Node next
kafkaCommon::editDomNodeAttribute(domNode, "img", m_wkafkapart->defaultDTD(),
"title", text, m_wkafkapart->getKafkaWidget()->document());
- if(!kafkaCommon::insertDomNode(domNode, parentDNode, nextDNode))
+ if(!kafkaCommon::insertDomNode(domNode, tqparentDNode, nextDNode))
return false;
m_wkafkapart->connectDomNodeToQuantaNode(domNode, node);
}
@@ -196,7 +196,7 @@ bool HTMLEnhancer::enhanceNode(Node *node, DOM::Node parentDNode, DOM::Node next
kafkaCommon::editDomNodeAttribute(domNode, "img", m_wkafkapart->defaultDTD(),
"title", text, m_wkafkapart->getKafkaWidget()->document());
- if(!kafkaCommon::insertDomNode(domNode, parentDNode, nextDNode))
+ if(!kafkaCommon::insertDomNode(domNode, tqparentDNode, nextDNode))
return false;
m_wkafkapart->connectDomNodeToQuantaNode(domNode, node);
}
@@ -282,13 +282,13 @@ void HTMLEnhancer::postEnhanceNode(DOM::Node domNode)
{
DOM::Node textNode;
kNodeAttrs *props;
- QTag *qTag;
+ TQTag *qTag;
bool isInline;
if(domNode.isNull())
return;
- //If domNode is a Block and there is no text around, and if domNode's parent can handle
+ //If domNode is a Block and there is no text around, and if domNode's tqparent can handle
//text or a P tag, add an empty text DOM::Node
// so that the user can access this area.
qTag = QuantaCommon::tagFromDTD(m_wkafkapart->getCurrentDoc()->defaultDTD(),
diff --git a/quanta/parts/kafka/htmlenhancer.h b/quanta/parts/kafka/htmlenhancer.h
index 29ebe82f..73c62251 100644
--- a/quanta/parts/kafka/htmlenhancer.h
+++ b/quanta/parts/kafka/htmlenhancer.h
@@ -47,10 +47,10 @@ public:
* The DOM::Node must be built before calling this
* function.
* @param node The Node we want to enhance.
- * @param parentDNode the parent DOM::Node of the root DOM::Node of node.
+ * @param tqparentDNode the tqparent DOM::Node of the root DOM::Node of node.
* @param nextDNode the DOM::Node next to the root DOM::Node of node.
*/
- virtual bool enhanceNode(Node *node, DOM::Node parentDNode, DOM::Node nextDNode);
+ virtual bool enhanceNode(Node *node, DOM::Node tqparentDNode, DOM::Node nextDNode);
/**
* This functions is called once the whole DOM::Node tree is built. It will add empty
diff --git a/quanta/parts/kafka/kafkacommon.cpp b/quanta/parts/kafka/kafkacommon.cpp
index 5d4c5714..0d15ca02 100644
--- a/quanta/parts/kafka/kafkacommon.cpp
+++ b/quanta/parts/kafka/kafkacommon.cpp
@@ -52,9 +52,9 @@ Node *kafkaCommon::getNextNode(Node *node, bool &goUp, Node *endNode)
}
else
{
- if(node->parent == endNode)
+ if(node->tqparent == endNode)
return 0L;
- return getNextNode(node->parent, goUp);
+ return getNextNode(node->tqparent, goUp);
}
}
else
@@ -74,9 +74,9 @@ Node *kafkaCommon::getNextNode(Node *node, bool &goUp, Node *endNode)
else
{
goUp = true;
- if(node->parent == endNode)
+ if(node->tqparent == endNode)
return 0L;
- return getNextNode(node->parent, goUp);
+ return getNextNode(node->tqparent, goUp);
}
}
}
@@ -119,7 +119,7 @@ Node* kafkaCommon::getPrevNode(Node *node, Node *endNode)
}
else
{
- n = n->parent;
+ n = n->tqparent;
if(n == endNode)
return 0L;
}
@@ -171,13 +171,13 @@ Node* kafkaCommon::DTDGetCommonParent(Node* startNode, Node* endNode,
if(commonParent && (commonParent->tag->type == Tag::Text || commonParent->tag->type == Tag::Empty))
{
Node* oldCommonParent = commonParent;
- commonParent = commonParent->parent;
+ commonParent = commonParent->tqparent;
commonParentStartChild = oldCommonParent;
commonParentEndChild = oldCommonParent;
}
//startNode or endNode can't be the commonParent.
else if(commonParent && (itStart == startNodeLocation.end() || itEnd == endNodeLocation.end()))
- commonParent = commonParent->parent;
+ commonParent = commonParent->tqparent;
commonParentStartChildLocation = getLocation(commonParentStartChild);
commonParentEndChildLocation = getLocation(commonParentEndChild);
@@ -222,18 +222,18 @@ Node* kafkaCommon::DTDGetNonInlineCommonParent(Node* startNode, Node* endNode,
commonParent->tag->type == Tag::Text || commonParent->tag->type == Tag::Empty))
{
Node* oldCommonParent = commonParent;
- commonParent = commonParent->parent;
+ commonParent = commonParent->tqparent;
while(commonParent && isInline(commonParent->tag->name))
{
oldCommonParent = commonParent;
- commonParent = commonParent->parent;
+ commonParent = commonParent->tqparent;
}
commonParentStartChild = oldCommonParent;
commonParentEndChild = oldCommonParent;
}
//startNode or endNode can't be the commonParent.
else if(commonParent && (itStart == startNodeLocation.end() || itEnd == endNodeLocation.end()))
- commonParent = commonParent->parent;
+ commonParent = commonParent->tqparent;
commonParentStartChildLocation = getLocation(commonParentStartChild);
commonParentEndChildLocation = getLocation(commonParentEndChild);
@@ -365,7 +365,7 @@ void kafkaCommon::applyIndentation(Node *node, int nbOfSpaces, int nbOfTabs, Nod
kdDebug(25001)<< "kafkaCommon::applyIndentation()" << endl;
#endif
- Node *parent, *nextNE, *prevNE, *realPrevNE, *realNextNE, *realPrev, *realNext, *prev, *next;
+ Node *tqparent, *nextNE, *prevNE, *realPrevNE, *realNextNE, *realPrev, *realNext, *prev, *next;
int nonInlineDepth = 0, nonInlineDepth2 = 0, i;
bool b = false;
TQString indentation1, indentation2, text;
@@ -383,12 +383,12 @@ void kafkaCommon::applyIndentation(Node *node, int nbOfSpaces, int nbOfTabs, Nod
realNext = node->next;
if(inlineNodeIndentation &&
- !node->prev && getNodeDisplay(node->parent, true) == kafkaCommon::blockDisplay)
+ !node->prev && getNodeDisplay(node->tqparent, true) == kafkaCommon::blockDisplay)
{
AreaStruct node_area = node->tag->area();
- AreaStruct parent_area = node->parent->tag->area();
+ AreaStruct tqparent_area = node->tqparent->tag->area();
- if(node_area.bLine == parent_area.bLine)
+ if(node_area.bLine == tqparent_area.bLine)
{
node->tag->setIndentationDone(true);
return;
@@ -400,30 +400,30 @@ void kafkaCommon::applyIndentation(Node *node, int nbOfSpaces, int nbOfTabs, Nod
setTagString(node, removeUnnecessaryWhitespaces(node->tag->tagStr()), modifs);
//compute the "non-inline depth" of the Node and of the next NE (not Empty) Node
- // i.e. we count how many non-inline parent they have.
- parent = node->parent;
- while(parent)
+ // i.e. we count how many non-inline tqparent they have.
+ tqparent = node->tqparent;
+ while(tqparent)
{
- if(getNodeDisplay(parent, true) == kafkaCommon::blockDisplay)
+ if(getNodeDisplay(tqparent, true) == kafkaCommon::blockDisplay)
++nonInlineDepth;
- parent = parent->parent;
+ tqparent = tqparent->tqparent;
}
//compute the "non-inline depth" of the next non-empty Node.
if (nextNE)
- parent = nextNE->parent;
+ tqparent = nextNE->tqparent;
else
- parent = 0L;
- while(parent)
+ tqparent = 0L;
+ while(tqparent)
{
- if(getNodeDisplay(parent, true) == kafkaCommon::blockDisplay)
+ if(getNodeDisplay(tqparent, true) == kafkaCommon::blockDisplay)
++nonInlineDepth2;
- parent = parent->parent;
+ tqparent = tqparent->tqparent;
}
- parent = node->parent;
+ tqparent = node->tqparent;
- if(!parent || getNodeDisplay(parent, true) == kafkaCommon::blockDisplay)
+ if(!tqparent || getNodeDisplay(tqparent, true) == kafkaCommon::blockDisplay)
{
//prepare the indentation
indentation1 = "\n";
@@ -507,7 +507,7 @@ void kafkaCommon::applyIndentation(Node *node, int nbOfSpaces, int nbOfTabs, Nod
}
else
{
- //The parent is inline, so no indentation.
+ //The tqparent is inline, so no indentation.
//Nothing to do.
}
node->tag->setIndentationDone(true);
@@ -519,7 +519,7 @@ void kafkaCommon::fitIndentationNodes(Node *n1, Node *n2, NodeModifsSet *modifs)
kdDebug(25001)<< "kafkaCommon::fitIndentationNodes()" << endl;
#endif
- Node *parent, *child, *node, *emptyNode = 0L, *emptyNode2 = 0L;
+ Node *tqparent, *child, *node, *emptyNode = 0L, *emptyNode2 = 0L;
int nbEmptyNodes = 0, n1Depth, n2Depth;
bool lastChild = false, firstChild = false;
@@ -534,16 +534,16 @@ void kafkaCommon::fitIndentationNodes(Node *n1, Node *n2, NodeModifsSet *modifs)
if(n1Depth > n2Depth)
{
child = n1;
- parent = n2;
+ tqparent = n2;
}
else
{
child = n2;
- parent = n1;
+ tqparent = n1;
}
- if(child->parent->firstChildNE() == child)
+ if(child->tqparent->firstChildNE() == child)
firstChild = true;
- if(child->parent->lastChildNE() == child)
+ if(child->tqparent->lastChildNE() == child)
lastChild = true;
//counting the Empty Nodes and deleting them to have only one empty node.
@@ -591,11 +591,11 @@ void kafkaCommon::fitIndentationNodes(Node *n1, Node *n2, NodeModifsSet *modifs)
//adding/deleting a empty node if necessary
if(firstChild)
{
- if(getNodeDisplay(parent, true) == kafkaCommon::blockDisplay)
+ if(getNodeDisplay(tqparent, true) == kafkaCommon::blockDisplay)
{
if(child->tag->type != Tag::Text && !emptyNode)
{
- createAndInsertNode("", "", Tag::Empty, n2->tag->write(), child->parent,
+ createAndInsertNode("", "", Tag::Empty, n2->tag->write(), child->tqparent,
child, child, modifs);
}
}
@@ -610,11 +610,11 @@ void kafkaCommon::fitIndentationNodes(Node *n1, Node *n2, NodeModifsSet *modifs)
if(lastChild)
{
- if(getNodeDisplay(parent, true) == kafkaCommon::blockDisplay)
+ if(getNodeDisplay(tqparent, true) == kafkaCommon::blockDisplay)
{
if(child->tag->type != Tag::Text && !emptyNode2)
{
- createAndInsertNode("", "", Tag::Empty, n2->tag->write(), child->parent,
+ createAndInsertNode("", "", Tag::Empty, n2->tag->write(), child->tqparent,
0L, 0L, modifs);
}
}
@@ -654,8 +654,8 @@ void kafkaCommon::fitIndentationNodes(Node *n1, Node *n2, NodeModifsSet *modifs)
}
//adding/deleting a empty node if necessary
- parent = n1->parent;
- if(!parent || getNodeDisplay(parent, true) == kafkaCommon::blockDisplay)
+ tqparent = n1->tqparent;
+ if(!tqparent || getNodeDisplay(tqparent, true) == kafkaCommon::blockDisplay)
{
if(getNodeDisplay(n1, true) == kafkaCommon::blockDisplay &&
n1->tag->type != Tag::Text)
@@ -672,7 +672,7 @@ void kafkaCommon::fitIndentationNodes(Node *n1, Node *n2, NodeModifsSet *modifs)
}
else
{
- createAndInsertNode("", "", Tag::Empty, n2->tag->write(), parent, n2, n2, modifs);
+ createAndInsertNode("", "", Tag::Empty, n2->tag->write(), tqparent, n2, n2, modifs);
}
}
}
@@ -694,7 +694,7 @@ void kafkaCommon::fitIndentationNodes(Node *n1, Node *n2, NodeModifsSet *modifs)
}
else
{
- createAndInsertNode("", "", Tag::Empty, n2->tag->write(), parent, n2, n2, modifs);
+ createAndInsertNode("", "", Tag::Empty, n2->tag->write(), tqparent, n2, n2, modifs);
}
}
}
@@ -770,7 +770,7 @@ int kafkaCommon::getNodeDisplay(Node *node, bool closingNodeToo)
closingNodeToo))
{
//If we areusing a non (X)HTML DTD, make everything blockDisplay by default
- if(node->tag->dtd() && node->tag->dtd()->name.contains("HTML", false) == 0)
+ if(node->tag->dtd() && node->tag->dtd()->name.tqcontains("HTML", false) == 0)
return kafkaCommon::blockDisplay;
nodeName = node->tag->name.lower();
@@ -948,7 +948,7 @@ Node *kafkaCommon::createXmlDeclarationNode(Document *doc, const TQString &encod
Node* kafkaCommon::createMandatoryNodeSubtree(Node *node, Document *doc)
{
- QTag *nodeQTag, *oldNodeQTag;
+ TQTag *nodeTQTag, *oldNodeTQTag;
bool searchForMandatoryNode;
Node *currentParent;
TQMap<TQString, bool>::iterator it;
@@ -956,28 +956,28 @@ Node* kafkaCommon::createMandatoryNodeSubtree(Node *node, Document *doc)
if(!node)
return 0L;
- nodeQTag = QuantaCommon::tagFromDTD(node);
- if(!nodeQTag)
+ nodeTQTag = QuantaCommon::tagFromDTD(node);
+ if(!nodeTQTag)
return false;
searchForMandatoryNode = true;
currentParent = node;
while(searchForMandatoryNode)
{
- oldNodeQTag = nodeQTag;
- for(it = nodeQTag->childTags.begin(); it != nodeQTag->childTags.end(); ++it)
+ oldNodeTQTag = nodeTQTag;
+ for(it = nodeTQTag->childTags.begin(); it != nodeTQTag->childTags.end(); ++it)
{
if(it.data())
{
- nodeQTag = QuantaCommon::tagFromDTD(nodeQTag->parentDTD, it.key());
- if(!nodeQTag)
+ nodeTQTag = QuantaCommon::tagFromDTD(nodeTQTag->tqparentDTD, it.key());
+ if(!nodeTQTag)
return node;
- currentParent = createAndInsertNode(nodeQTag->name(), "", Tag::XmlTag, doc,
+ currentParent = createAndInsertNode(nodeTQTag->name(), "", Tag::XmlTag, doc,
currentParent, 0L, 0L, (NodeModifsSet*)0L);
break;
}
}
- if(oldNodeQTag == nodeQTag)
+ if(oldNodeTQTag == nodeTQTag)
searchForMandatoryNode = false;
}
@@ -998,7 +998,7 @@ Node* kafkaCommon::insertNode(Node *node, Node* parentNode, Node* nextSibling,
if(!node)
return 0L;
- //Reset the listviews items pointers for node and its children
+ //Reset the listviews items pointers for node and its tqchildren
n = node;
b = false;
while(n)
@@ -1028,7 +1028,7 @@ Node* kafkaCommon::insertNode(Node *node, Node* parentNode, Node* nextSibling,
nodeIsFirstChild = true;
parentNode->child = node;
}
- node->parent = parentNode;
+ node->tqparent = parentNode;
if(nextSibling && nextSibling->prev)
{
@@ -1099,7 +1099,7 @@ Node* kafkaCommon::insertNode(Node *node, Node* parentNode, Node* nextSibling, N
if(!node)
return 0L;
- //Reset the listviews items pointers for node and its children
+ //Reset the listviews items pointers for node and its tqchildren
n = node;
b = false;
while(n)
@@ -1129,7 +1129,7 @@ Node* kafkaCommon::insertNode(Node *node, Node* parentNode, Node* nextSibling, N
nodeIsFirstChild = true;
parentNode->child = node;
}
- node->parent = parentNode;
+ node->tqparent = parentNode;
if(nextSibling && nextSibling->prev)
{
@@ -1186,7 +1186,7 @@ Node* kafkaCommon::insertNode(Node *node, Node* parentNode, Node* nextSibling, N
return node;
}
-Node *kafkaCommon::insertNode(Node *newNode, Node *parent, Node *nextSibling, Node *nextEndSibling,
+Node *kafkaCommon::insertNode(Node *newNode, Node *tqparent, Node *nextSibling, Node *nextEndSibling,
NodeModifsSet *modifs, bool merge)
{
#ifdef LIGHT_DEBUG
@@ -1199,7 +1199,7 @@ Node *kafkaCommon::insertNode(Node *newNode, Node *parent, Node *nextSibling, No
return 0L;
//place the new Node.
- newNode = insertNode(newNode, parent, nextSibling, modifs, merge);
+ newNode = insertNode(newNode, tqparent, nextSibling, modifs, merge);
if(!newNode->tag->single && newNode->tag->type == Tag::XmlTag)
{
@@ -1208,7 +1208,7 @@ Node *kafkaCommon::insertNode(Node *newNode, Node *parent, Node *nextSibling, No
nodeEnd->closesPrevious = true;
//place the new closing Node.
- nodeEnd = insertNode(nodeEnd, parent, nextEndSibling, modifs, merge);
+ nodeEnd = insertNode(nodeEnd, tqparent, nextEndSibling, modifs, merge);
}
//If nextSibling != nextEndSibling, move all Nodes between node and nodeEnd as child of node
@@ -1222,7 +1222,7 @@ Node *kafkaCommon::insertNode(Node *newNode, Node *parent, Node *nextSibling, No
return newNode;
}
-Node* kafkaCommon::insertNode(Node *newNode, Node *parent, Node *startNodeToSurround,
+Node* kafkaCommon::insertNode(Node *newNode, Node *tqparent, Node *startNodeToSurround,
Node *endNodeToSurround, int startOffset, int endOffset, NodeModifsSet *modifs)
{
#ifdef LIGHT_DEBUG
@@ -1246,7 +1246,7 @@ Node* kafkaCommon::insertNode(Node *newNode, Node *parent, Node *startNodeToSurr
endNodeToSurround = endNodeToSurround->next;
//Then create and insert the new Node.
- return insertNode(newNode, parent, startNodeToSurround,
+ return insertNode(newNode, tqparent, startNodeToSurround,
endNodeToSurround, modifs);
}
@@ -1389,13 +1389,13 @@ Node* kafkaCommon::DTDInsertNodeSubtree(Node *newNode, NodeSelectionInd& selecti
{
*cursorNode = newNode;
cursorOffset = newNode->tag->tagStr().length();
- return insertNodeSubtree(newNode, startNode->parent, endNode, modifs);
+ return insertNodeSubtree(newNode, startNode->tqparent, endNode, modifs);
}
//Then we "split" the lastValidStartParent - startNode subtree into two : the first part is untouched
// and the second will be surrounded by the new Node. Same thing for endNode.
Node* node = startNode;
- Node* parentNode = startNode->parent;
+ Node* parentNode = startNode->tqparent;
Node* newParentNode = 0, *child = 0, *next = 0;
while(parentNode && commonParent && parentNode != commonParent)
{
@@ -1404,10 +1404,10 @@ Node* kafkaCommon::DTDInsertNodeSubtree(Node *newNode, NodeSelectionInd& selecti
//node is not the first Child of parentNode, we have to duplicate parentNode, and put node and
//all its next sibling as child of the new parentNode.
/**newParentNode = insertNode(parentNode->tag->name, parentNode->tag->tagStr(),
- parentNode->tag->type, parentNode->tag->write(), parentNode->parentNode(),
+ parentNode->tag->type, parentNode->tag->write(), parentNode->tqparentNode(),
parentNode, parentNode, modifs);*/
newParentNode = duplicateNode(parentNode);
- insertNode(newParentNode, parentNode->parentNode(), parentNode, parentNode, modifs);
+ insertNode(newParentNode, parentNode->tqparentNode(), parentNode, parentNode, modifs);
child = parentNode->firstChild();
if(cursorOffset != 0)
{
@@ -1433,13 +1433,13 @@ Node* kafkaCommon::DTDInsertNodeSubtree(Node *newNode, NodeSelectionInd& selecti
}
//commonParentStartChild = parentNode;
node = parentNode;
- parentNode = parentNode->parent;
+ parentNode = parentNode->tqparent;
}
if(endNode)
{
node = endNode;
- parentNode = endNode->parent;
+ parentNode = endNode->tqparent;
while(parentNode && commonParent && parentNode != commonParent)
{
if(true/*node != parentNode->firstChild()*/)
@@ -1447,10 +1447,10 @@ Node* kafkaCommon::DTDInsertNodeSubtree(Node *newNode, NodeSelectionInd& selecti
//node is not the first Child of parentNode, we have to duplicate parentNode, and put node and
//all its next sibling as child of the new parentNode.
/**newParentNode = insertNode(parentNode->tag->name, parentNode->tag->tagStr(),
- parentNode->tag->type, parentNode->tag->write(), parentNode->parentNode(),
+ parentNode->tag->type, parentNode->tag->write(), parentNode->tqparentNode(),
parentNode, parentNode, modifs);*/
newParentNode = duplicateNode(parentNode);
- insertNode(newParentNode, parentNode->parentNode(), parentNode, parentNode, modifs);
+ insertNode(newParentNode, parentNode->tqparentNode(), parentNode, parentNode, modifs);
child = parentNode->firstChild();
while(child /*&& child == endNode*/ &&
(child == endNode || child->hasForChild(endNode)/* ||
@@ -1464,7 +1464,7 @@ Node* kafkaCommon::DTDInsertNodeSubtree(Node *newNode, NodeSelectionInd& selecti
commonParentStartChild = newParentNode;
node = parentNode;
Node* aux = parentNode;
- parentNode = parentNode->parent;
+ parentNode = parentNode->tqparent;
// Remove node subtree if empty
if(!aux->hasChildNodes())
extractAndDeleteNode(aux, modifs);
@@ -1487,8 +1487,8 @@ Node* kafkaCommon::DTDInsertNodeSubtree(Node *newNode, NodeSelectionInd& selecti
Node* kafkaCommon::DTDInsertNodeSubtree(Node* newNode, Node* parentNode, Node* nextSibling,
NodeSelection& /*cursorHolder*/, NodeModifsSet *modifs)
{
- QTag* nodeQTag = QuantaCommon::tagFromDTD(parentNode);
- if(!nodeQTag || !nodeQTag->isChild(newNode))
+ TQTag* nodeTQTag = QuantaCommon::tagFromDTD(parentNode);
+ if(!nodeTQTag || !nodeTQTag->isChild(newNode))
return 0;
else
return insertNodeSubtree(newNode, parentNode, nextSibling, modifs);
@@ -1506,7 +1506,7 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset,
Node *commonParent = 0L, *commonParentStartChild, *commonParentEndChild, *parentNode, *node;
Node *lastValidStartParent = 0L, *lastValidEndParent = 0L, *newParentNode, *child, *next;
Node *oldCommonParent, *lastNewNode, *oldParentNode;
- QTag *parentNodeQTag = 0, *newNodeQTag, *lastNewNodeQTag;
+ TQTag *parentNodeTQTag = 0, *newNodeTQTag, *lastNewNodeTQTag;
NodeModif modif;
int locOffset = 1;
bool newNodeIsInline, isAfter;
@@ -1519,16 +1519,16 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset,
//FIrst get the mandatory Nodes if necessary, and get the qTag of the first and last Node.
lastNewNode = createMandatoryNodeSubtree(newNode, doc);
- lastNewNodeQTag = QuantaCommon::tagFromDTD(lastNewNode);
- newNodeQTag = QuantaCommon::tagFromDTD(newNode);
- if(!newNodeQTag || !lastNewNodeQTag)
+ lastNewNodeTQTag = QuantaCommon::tagFromDTD(lastNewNode);
+ newNodeTQTag = QuantaCommon::tagFromDTD(newNode);
+ if(!newNodeTQTag || !lastNewNodeTQTag)
{
Node::deleteNode(newNode);
return false;
}
- //Then search for the common parent of startNode and endNode (commonParent)
- //and for the childs of commonParent which are parent of startNode and endNode
+ //Then search for the common tqparent of startNode and endNode (commonParent)
+ //and for the childs of commonParent which are tqparent of startNode and endNode
//(commonParentStartChild && commonParentEndChild)
//CommonParent will be the limit (startNode -- commonNode) where Nodes can
//be splitted in order to insert the newNode.
@@ -1559,51 +1559,51 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset,
commonParent->tag->type == Tag::Text || commonParent->tag->type == Tag::Empty))
{
oldCommonParent = commonParent;
- commonParent = commonParent->parent;
+ commonParent = commonParent->tqparent;
while(commonParent && isInline(commonParent->tag->name))
{
oldCommonParent = commonParent;
- commonParent = commonParent->parent;
+ commonParent = commonParent->tqparent;
}
commonParentStartChild = oldCommonParent;
commonParentEndChild = oldCommonParent;
}
//startNode or endNode can't be the commonParent.
else if(commonParent && (itStart == startNodeLocation.end() || itEnd == endNodeLocation.end()))
- commonParent = commonParent->parent;
+ commonParent = commonParent->tqparent;
- //Now look if at least one of the parent Nodes between startNode and commonParent
+ //Now look if at least one of the tqparent Nodes between startNode and commonParent
//can have nodeName as child. If so for startNode and endNode, let's find the last
- //parent Nodes which can have nodeName as child.
- parentNode = startNode->parent;
+ //tqparent Nodes which can have nodeName as child.
+ parentNode = startNode->tqparent;
oldParentNode = startNode;
- while(parentNode && commonParent && parentNode != commonParent->parent)
+ while(parentNode && commonParent && parentNode != commonParent->tqparent)
{
- parentNodeQTag = QuantaCommon::tagFromDTD(parentNode);
- if(parentNodeQTag && parentNodeQTag->isChild(newNode) &&
- lastNewNodeQTag->isChild(oldParentNode))
+ parentNodeTQTag = QuantaCommon::tagFromDTD(parentNode);
+ if(parentNodeTQTag && parentNodeTQTag->isChild(newNode) &&
+ lastNewNodeTQTag->isChild(oldParentNode))
lastValidStartParent = parentNode;
else if(newNodeIsInline || !isInline(parentNode->tag->name))
break;
//else if(!newNodeIsInline && isInline(parentNode)), we continue : BLOCK element can
//cut some inline tag in order to be inserted.
oldParentNode = parentNode;
- parentNode = parentNode->parent;
+ parentNode = parentNode->tqparent;
}
- parentNode = endNode->parent;
+ parentNode = endNode->tqparent;
oldParentNode = endNode;
- while(parentNode && commonParent && parentNode != commonParent->parent)
+ while(parentNode && commonParent && parentNode != commonParent->tqparent)
{
- parentNodeQTag = QuantaCommon::tagFromDTD(parentNode);
- if(parentNodeQTag && parentNodeQTag->isChild(newNode) &&
- lastNewNodeQTag->isChild(oldParentNode))
+ parentNodeTQTag = QuantaCommon::tagFromDTD(parentNode);
+ if(parentNodeTQTag && parentNodeTQTag->isChild(newNode) &&
+ lastNewNodeTQTag->isChild(oldParentNode))
lastValidEndParent = parentNode;
else if(newNodeIsInline || !isInline(parentNode->tag->name))
break;
//else if(!newNodeIsInline && isInline(parentNode)), we continue : BLOCK element can
//cut some inline tag in order to be inserted.
oldParentNode = parentNode;
- parentNode = parentNode->parent;
+ parentNode = parentNode->tqparent;
}
/**if(!lastValidEndParent || !lastValidStartParent)
@@ -1662,7 +1662,7 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset,
node = startNode;
if (!startNode) //Andras: it can happen.
return false;
- parentNode = startNode->parent;
+ parentNode = startNode->tqparent;
while(lastValidStartParent && parentNode && parentNode != lastValidStartParent)
{
if(node != parentNode->firstChild())
@@ -1670,10 +1670,10 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset,
//node is not the first Child of parentNode, we have to duplicate parentNode, and put node and
//all its next sibling as child of the new parentNode.
/**newParentNode = insertNode(parentNode->tag->name, parentNode->tag->tagStr(),
- parentNode->tag->type, parentNode->tag->write(), parentNode->parentNode(),
+ parentNode->tag->type, parentNode->tag->write(), parentNode->tqparentNode(),
parentNode, parentNode, modifs);*/
newParentNode = duplicateNode(parentNode);
- insertNode(newParentNode, parentNode->parentNode(), parentNode, parentNode, modifs);
+ insertNode(newParentNode, parentNode->tqparentNode(), parentNode, parentNode, modifs);
child = parentNode->firstChild();
while(child && child != startNode && !child->hasForChild(startNode))
{
@@ -1683,10 +1683,10 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset,
}
}
node = parentNode;
- parentNode = parentNode->parent;
+ parentNode = parentNode->tqparent;
}
node = endNode;
- parentNode = endNode->parent;
+ parentNode = endNode->tqparent;
while(lastValidEndParent && parentNode && parentNode != lastValidEndParent)
{
if(node != parentNode->lastChild())
@@ -1694,10 +1694,10 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset,
//node is not the last Child of parentNode, we have to duplicate parentNode, and put all
//the next sibling of node as child of the new parentNode
/**newParentNode = insertNode(parentNode->tag->name, parentNode->tag->tagStr(),
- parentNode->tag->type, parentNode->tag->write(), parentNode->parentNode(),
+ parentNode->tag->type, parentNode->tag->write(), parentNode->tqparentNode(),
parentNode, parentNode, modifs);*/
newParentNode = duplicateNode(parentNode);
- insertNode(newParentNode, parentNode->parentNode(), parentNode, parentNode, modifs);
+ insertNode(newParentNode, parentNode->tqparentNode(), parentNode, parentNode, modifs);
if(parentNode == commonParentStartChild)
commonParentStartChild = newParentNode;
if(parentNode == commonParentEndChild)
@@ -1717,7 +1717,7 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset,
}
}
node = parentNode;
- parentNode = parentNode->parent;
+ parentNode = parentNode->tqparent;
}
//Now if startNode is after endNode, this means that a selectionless insertion is being done.
@@ -1728,19 +1728,19 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset,
(signed)startNode->tag->tagStr().length() == startOffset))
{
if(isAfter)
- parentNodeQTag = QuantaCommon::tagFromDTD(commonParent);
+ parentNodeTQTag = QuantaCommon::tagFromDTD(commonParent);
else if((signed)startNode->tag->tagStr().length() == startOffset && startNode->tag->type == Tag::XmlTag)
- parentNodeQTag = QuantaCommon::tagFromDTD(startNode);
+ parentNodeTQTag = QuantaCommon::tagFromDTD(startNode);
else if((signed)startNode->tag->tagStr().length() == startOffset && startNode->tag->type == Tag::XmlTagEnd)
- parentNodeQTag = QuantaCommon::tagFromDTD(startNode->parent);
- if(!parentNodeQTag || (parentNodeQTag && parentNodeQTag->isChild(newNode)))
+ parentNodeTQTag = QuantaCommon::tagFromDTD(startNode->tqparent);
+ if(!parentNodeTQTag || (parentNodeTQTag && parentNodeTQTag->isChild(newNode)))
{
if(isAfter)
insertNodeSubtree(newNode, commonParent, commonParentStartChild, modifs);
else if((signed)startNode->tag->tagStr().length() == startOffset && startNode->tag->type == Tag::XmlTag)
insertNodeSubtree(newNode, startNode, 0L, modifs);
else if((signed)startNode->tag->tagStr().length() == startOffset && startNode->tag->type == Tag::XmlTagEnd)
- insertNodeSubtree(newNode, startNode->parent, startNode->next, modifs);
+ insertNodeSubtree(newNode, startNode->tqparent, startNode->next, modifs);
//<TEMPORARY>
(*cursorNode) = lastNewNode;
cursorOffset = 0;
@@ -1798,7 +1798,7 @@ bool kafkaCommon::DTDinsertRemoveNode(Node *newNode, Node *startNode, int startO
}
Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString &tagString,
- int nodeType, Document *doc, Node* parent, Node* nextSibling, NodeModifsSet *modifs,
+ int nodeType, Document *doc, Node* tqparent, Node* nextSibling, NodeModifsSet *modifs,
bool merge)
{
#ifdef LIGHT_DEBUG
@@ -1812,13 +1812,13 @@ Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString
node = createNode(nodeName, tagString, nodeType, doc);
//insert the new Node.
- insertNode(node, parent, nextSibling, modifs, merge);
+ insertNode(node, tqparent, nextSibling, modifs, merge);
return node;
}
Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString &tagString,
- int nodeType, Document *doc, Node *parent, Node *nextSibling, Node *nextEndSibling,
+ int nodeType, Document *doc, Node *tqparent, Node *nextSibling, Node *nextEndSibling,
NodeModifsSet *modifs)
{
#ifdef LIGHT_DEBUG
@@ -1832,13 +1832,13 @@ Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString
node = createNode(nodeName, tagString, nodeType, doc);
//insert the new Node.
- insertNode(node, parent, nextSibling, nextEndSibling, modifs);
+ insertNode(node, tqparent, nextSibling, nextEndSibling, modifs);
return node;
}
Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString &tagString,
- int nodeType, Document *doc, Node *parent, Node *startNodeToSurround,
+ int nodeType, Document *doc, Node *tqparent, Node *startNodeToSurround,
Node *endNodeToSurround, int startOffset, int endOffset, NodeModifsSet *modifs)
{
#ifdef LIGHT_DEBUG
@@ -1855,7 +1855,7 @@ Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString
node = createNode(nodeName, tagString, nodeType, doc);
//insert the new Node.
- insertNode(node, parent, startNodeToSurround, endNodeToSurround, startOffset, endOffset,
+ insertNode(node, tqparent, startNodeToSurround, endNodeToSurround, startOffset, endOffset,
modifs);
return node;
@@ -1891,18 +1891,18 @@ bool kafkaCommon::addNodeRecursively(Node *newNode, Node *leafNode,
NodeModifsSet *modifs)
{
- QTag *leafNodeQTag, *currentNodeParentQTag;
+ TQTag *leafNodeTQTag, *currentNodeParentTQTag;
Node *startSelection = 0L, *endSelection = 0L, *oldCurrentNode, *copyNewNode;
bool selectionInProgress = false, validCurNodeParent = false;
- leafNodeQTag = QuantaCommon::tagFromDTD(leafNode);
- if(!leafNodeQTag)
+ leafNodeTQTag = QuantaCommon::tagFromDTD(leafNode);
+ if(!leafNodeTQTag)
return false;
- if(currentNode && currentNode->parent)
+ if(currentNode && currentNode->tqparent)
{
- currentNodeParentQTag = QuantaCommon::tagFromDTD(currentNode->parent);
- if(currentNodeParentQTag && currentNodeParentQTag->isChild(newNode))
+ currentNodeParentTQTag = QuantaCommon::tagFromDTD(currentNode->tqparent);
+ if(currentNodeParentTQTag && currentNodeParentTQTag->isChild(newNode))
validCurNodeParent = true;
}
@@ -1924,7 +1924,7 @@ bool kafkaCommon::addNodeRecursively(Node *newNode, Node *leafNode,
//if the examination has started and currentNode doesn't have endExaminationNode as
//child, let's start/extend the selection over this node.
if((currentNode->tag->type == Tag::XmlTag || currentNode->tag->type == Tag::Text) &&
- leafNodeQTag->isChild(currentNode) && validCurNodeParent && examinationStarted &&
+ leafNodeTQTag->isChild(currentNode) && validCurNodeParent && examinationStarted &&
!currentNode->hasForChild(endExaminationNode))
{
#ifdef HEAVY_DEBUG
@@ -1986,10 +1986,10 @@ bool kafkaCommon::addNodeRecursively(Node *newNode, Node *leafNode,
if (startSelection && endSelection)
{
/**copyNewNode = duplicateNode(newNode);
- insertNode(copyNewNode, startSelection->parentNode(), startSelection,
+ insertNode(copyNewNode, startSelection->tqparentNode(), startSelection,
endSelection->next, modifs);*/
copyNewNode = duplicateNodeSubtree(newNode);
- insertNodeSubtree(copyNewNode, startSelection->parentNode(), startSelection,
+ insertNodeSubtree(copyNewNode, startSelection->tqparentNode(), startSelection,
endSelection->next, modifs);
nodeInserted = true;
}
@@ -2067,10 +2067,10 @@ bool kafkaCommon::addNodeRecursively(Node *newNode, Node *leafNode,
if (startSelection && endSelection)
{
/**copyNewNode = duplicateNode(newNode);
- insertNode(copyNewNode, startSelection->parentNode(), startSelection,
+ insertNode(copyNewNode, startSelection->tqparentNode(), startSelection,
endSelection->next, modifs);*/
copyNewNode = duplicateNodeSubtree(newNode);
- insertNodeSubtree(copyNewNode, startSelection->parentNode(), startSelection,
+ insertNodeSubtree(copyNewNode, startSelection->tqparentNode(), startSelection,
endSelection->next, modifs);
nodeInserted = true;
}
@@ -2097,10 +2097,10 @@ bool kafkaCommon::addNodeRecursively(Node *newNode, Node *leafNode,
while(endSelection && endSelection->tag->type == Tag::Empty)
endSelection = endSelection->prev;
/**copyNewNode = duplicateNode(newNode);
- insertNode(copyNewNode, startSelection->parentNode(), startSelection,
+ insertNode(copyNewNode, startSelection->tqparentNode(), startSelection,
endSelection->next, modifs);*/
copyNewNode = duplicateNodeSubtree(newNode);
- insertNodeSubtree(copyNewNode, startSelection->parentNode(), startSelection,
+ insertNodeSubtree(copyNewNode, startSelection->tqparentNode(), startSelection,
endSelection->next, modifs);
nodeInserted = true;
}
@@ -2184,7 +2184,7 @@ Node *kafkaCommon::duplicateNodeSubtree(Node *node, bool childAndClosingTagOnly)
newPrev = 0L;
for(link = nodeLinkList.first(); link; link = nodeLinkList.next())
{
- if(link->m_n1 == currentNode->parent)
+ if(link->m_n1 == currentNode->tqparent)
newParent = link->m_n2;
else if(link->m_n1 == currentNode->next)
newNext = link->m_n2;
@@ -2217,7 +2217,7 @@ Node* kafkaCommon::extractNode(Node *node, NodeModifsSet *modifs, bool extractCh
{
NodeModif *modif = 0, *modifChild;
Node *lastChild, *curNode;
- Node *parent, *next, *child, *n;
+ Node *tqparent, *next, *child, *n;
//Node *prev;
bool isSingle;
int type;
@@ -2231,7 +2231,7 @@ Node* kafkaCommon::extractNode(Node *node, NodeModifsSet *modifs, bool extractCh
if(!node->child)
extractChildren = true;
- parent = node->parent;
+ tqparent = node->tqparent;
next = node->next;
//prev = node->prev; //Should this be used at all?
child = node->child;
@@ -2252,7 +2252,7 @@ Node* kafkaCommon::extractNode(Node *node, NodeModifsSet *modifs, bool extractCh
modif->setType(NodeModif::NodeRemoved);
modif->setLocation(getLocation(node));
- //log the children move if we don't extract the children
+ //log the tqchildren move if we don't extract the tqchildren
if(!extractChildren)
{
location = getLocation(node);
@@ -2284,18 +2284,18 @@ Node* kafkaCommon::extractNode(Node *node, NodeModifsSet *modifs, bool extractCh
curNode = node->child;
while(curNode)
{
- curNode->parent = node->parent;
+ curNode->tqparent = node->tqparent;
curNode = curNode->next;
}
}
- if(node->parent && node->parent->child == node)
+ if(node->tqparent && node->tqparent->child == node)
{
if(extractChildren)
- node->parent->child = node->next;
+ node->tqparent->child = node->next;
else
- node->parent->child = node->child;
+ node->tqparent->child = node->child;
}
- node->parent = 0L;
+ node->tqparent = 0L;
if(node->prev)
{
if(extractChildren)
@@ -2643,7 +2643,7 @@ int kafkaCommon::DTDExtractNode(const TQString &nodeName, Document *doc, Node *s
int startOffset, Node *endNode, int endOffset, Node **cursorNode, long &cursorOffset,
NodeModifsSet *modifs)
{
- QTag *nodeNameQTag, *parentQTag;
+ TQTag *nodeNameTQTag, *tqparentTQTag;
Node *node, *lastNodeNameStartNode, *lastNodeNameEndNode;
Node *parentNode, *newParentNode, *child, *next;
bool goUp, nodesRemoved = false, DTDError = false, result;
@@ -2653,8 +2653,8 @@ int kafkaCommon::DTDExtractNode(const TQString &nodeName, Document *doc, Node *s
return kafkaCommon::extractionBadParameters;
//First check that nodeName is really inline and that an area is selected.
- nodeNameQTag = QuantaCommon::tagFromDTD(doc->defaultDTD(), nodeName);
- if(!nodeNameQTag)
+ nodeNameTQTag = QuantaCommon::tagFromDTD(doc->defaultDTD(), nodeName);
+ if(!nodeNameTQTag)
return kafkaCommon::extractionBadParameters;
if(!isInline(nodeName))
return kafkaCommon::extractionBadParameters;
@@ -2671,8 +2671,8 @@ int kafkaCommon::DTDExtractNode(const TQString &nodeName, Document *doc, Node *s
if(startNode == endNode && startOffset == endOffset)
return kafkaCommon::extractionBadParameters;
- //Then, process startNode and endNode : look if a nodeName parent is one of
- //startNode/endNode's inline parents and if it is the case, split the necessary Nodes.
+ //Then, process startNode and endNode : look if a nodeName tqparent is one of
+ //startNode/endNode's inline tqparents and if it is the case, split the necessary Nodes.
//The comparaison is made in lowercase, even in xml : it could be strange, for an user, to have
//its nodes not removed because there are in the wrong case.
node = startNode;
@@ -2681,7 +2681,7 @@ int kafkaCommon::DTDExtractNode(const TQString &nodeName, Document *doc, Node *s
{
if(node->tag->name.lower() == nodeName.lower())
lastNodeNameStartNode = node;
- node = node->parent;
+ node = node->tqparent;
}
node = endNode;
lastNodeNameEndNode = 0L;
@@ -2689,7 +2689,7 @@ int kafkaCommon::DTDExtractNode(const TQString &nodeName, Document *doc, Node *s
{
if(node->tag->name.lower() == nodeName.lower())
lastNodeNameEndNode = node;
- node = node->parent;
+ node = node->tqparent;
}
if(startNode->tag->type == Tag::Text)
@@ -2724,13 +2724,13 @@ int kafkaCommon::DTDExtractNode(const TQString &nodeName, Document *doc, Node *s
if(lastNodeNameStartNode)
{
node = startNode;
- parentNode = startNode->parent;
- while(parentNode && parentNode != lastNodeNameStartNode->parent)
+ parentNode = startNode->tqparent;
+ while(parentNode && parentNode != lastNodeNameStartNode->tqparent)
{
if(node != parentNode->firstChild())
{
newParentNode = duplicateNode(parentNode);
- insertNode(newParentNode, parentNode->parentNode(), parentNode, parentNode, modifs);
+ insertNode(newParentNode, parentNode->tqparentNode(), parentNode, parentNode, modifs);
child = parentNode->firstChild();
while(child && child != startNode && !child->hasForChild(startNode))
{
@@ -2740,19 +2740,19 @@ int kafkaCommon::DTDExtractNode(const TQString &nodeName, Document *doc, Node *s
}
}
node = parentNode;
- parentNode = parentNode->parent;
+ parentNode = parentNode->tqparent;
}
}
if(lastNodeNameEndNode)
{
node = endNode;
- parentNode = endNode->parent;
- while(parentNode && parentNode != lastNodeNameEndNode->parent)
+ parentNode = endNode->tqparent;
+ while(parentNode && parentNode != lastNodeNameEndNode->tqparent)
{
if(node != parentNode->SLastChild())
{
newParentNode = duplicateNode(parentNode);
- insertNode(newParentNode, parentNode->parentNode(), parentNode, parentNode, modifs);
+ insertNode(newParentNode, parentNode->tqparentNode(), parentNode, parentNode, modifs);
if(parentNode == lastNodeNameStartNode)
lastNodeNameStartNode = newParentNode;
child = parentNode->firstChild();
@@ -2770,7 +2770,7 @@ int kafkaCommon::DTDExtractNode(const TQString &nodeName, Document *doc, Node *s
}
}
node = parentNode;
- parentNode = parentNode->parent;
+ parentNode = parentNode->tqparent;
}
}
@@ -2782,13 +2782,13 @@ int kafkaCommon::DTDExtractNode(const TQString &nodeName, Document *doc, Node *s
next = getNextNode(node, goUp);
if(node->tag->type == Tag::XmlTag && node->tag->name.lower() == nodeName.lower())
{
- parentQTag = QuantaCommon::tagFromDTD(node->parent);
- if(parentQTag)
+ tqparentTQTag = QuantaCommon::tagFromDTD(node->tqparent);
+ if(tqparentTQTag)
{
child = node->firstChild();
while(child)
{
- if(!parentQTag->isChild(child))
+ if(!tqparentTQTag->isChild(child))
DTDError = true;
child = child->next;
}
@@ -2927,10 +2927,10 @@ bool kafkaCommon::splitNode(Node *n, int offset, NodeModifsSet *modifs)
if(n->tag->type == Tag::Text)
node = createAndInsertNode("#text", tagStr.right(tagStr.length() - offset), Tag::Text, n->tag->write(),
- n->parent, n->next, modifs, false);
+ n->tqparent, n->next, modifs, false);
else
node = createAndInsertNode("", tagStr.right(tagStr.length() - offset), Tag::Empty, n->tag->write(),
- n->parent, n->next, modifs, false);
+ n->tqparent, n->next, modifs, false);
//Node's string is a part of n's clean string
node->tag->setCleanStrBuilt(true);
@@ -2944,14 +2944,14 @@ void kafkaCommon::splitStartNodeSubtree(Node* startNode, Node* commonParent,
//Then we "split" the lastValidStartParent - startNode subtree into two : the first part is untouched
// and the second will be surrounded by the new Node. Same thing for endNode.
Node* node = startNode;
- Node* parentNode = startNode->parent;
+ Node* parentNode = startNode->tqparent;
Node* commonParentStartChild = 0;
while(parentNode && commonParent && parentNode != commonParent)
{
if(node != parentNode->firstChild())
{
Node* newParentNode = duplicateNode(parentNode);
- insertNode(newParentNode, parentNode->parentNode(), parentNode, parentNode, modifs);
+ insertNode(newParentNode, parentNode->tqparentNode(), parentNode, parentNode, modifs);
Node* child = parentNode->firstChild();
while(child && child != startNode && !child->hasForChild(startNode))
{
@@ -2962,7 +2962,7 @@ void kafkaCommon::splitStartNodeSubtree(Node* startNode, Node* commonParent,
}
commonParentStartChild = parentNode;
node = parentNode;
- parentNode = parentNode->parent;
+ parentNode = parentNode->tqparent;
}
if(commonParentStartChild)
@@ -2975,7 +2975,7 @@ void kafkaCommon::splitEndNodeSubtree(Node* endNode, Node* commonParent,
bool subTree, NodeModifsSet* modifs)
{
Node* node = endNode;
- Node* parentNode = endNode->parent;
+ Node* parentNode = endNode->tqparent;
Node* aux = 0;
if(subTree)
@@ -2989,7 +2989,7 @@ void kafkaCommon::splitEndNodeSubtree(Node* endNode, Node* commonParent,
if(node != parentNode->lastChild())
{
Node* newParentNode = duplicateNode(parentNode);
- insertNode(newParentNode, parentNode->parentNode(), parentNode, parentNode, modifs);
+ insertNode(newParentNode, parentNode->tqparentNode(), parentNode, parentNode, modifs);
if(parentNode == commonParentStartChild)
commonParentStartChild = newParentNode;
if(parentNode == commonParentEndChild)
@@ -3009,7 +3009,7 @@ void kafkaCommon::splitEndNodeSubtree(Node* endNode, Node* commonParent,
}
}
node = parentNode;
- parentNode = parentNode->parent;
+ parentNode = parentNode->tqparent;
}
commonParentStartChildLocation = getLocation(commonParentStartChild);
commonParentEndChildLocation = getLocation(commonParentEndChild);
@@ -3029,11 +3029,11 @@ void kafkaCommon::splitStartAndEndNodeSubtree(Node*& startNode, int startOffset,
startNode = getCorrectStartNode(startNode, startOffset);
endNode = getCorrectEndNode(endNode, endOffset);
- // look for common parent
+ // look for common tqparent
if(!commonParent)
{
if(extractInlineParentNodes)
- // get the non inline common parent
+ // get the non inline common tqparent
commonParent =
DTDGetNonInlineCommonParent(startNode, endNode, commonParentStartChildLocation, commonParentEndChildLocation, subTree);
else
@@ -3075,7 +3075,7 @@ void kafkaCommon::splitStartAndEndNodeSubtree(Node*& startNode, int startOffset,
}
splitNode(endNode, endOffset, modifs);
- // split start and end nodes subtree in function of common parent
+ // split start and end nodes subtree in function of common tqparent
commonParentStartChildLocation = kafkaCommon::getLocation(commonParentStartChild);
splitStartNodeSubtree(startNode, commonParent, commonParentStartChildLocation, modifs);
@@ -3208,21 +3208,21 @@ bool kafkaCommon::mergeNodes(Node *n, Node *n2, NodeSelection& cursorHolder, Nod
void kafkaCommon::mergeInlineNode(Node *startNode, Node *endNode, Node **cursorNode,
long &cursorOffset, NodeModifsSet *modifs)
{
- Node *startNodeLastInlineParent, *parent, *node, *next;
+ Node *startNodeLastInlineParent, *tqparent, *node, *next;
bool goUp, success, isCursorNode, isEndNode;
int nodeLength;
if(!startNode || !endNode)
return;
- //first search for the last inline parent of startNode, and then its last prev neighbour
+ //first search for the last inline tqparent of startNode, and then its last prev neighbour
// which is also inline : the merge will start from this Node.
startNodeLastInlineParent = startNode;
- parent = startNode->parent;
- while(parent && isInline(parent->tag->name))
+ tqparent = startNode->tqparent;
+ while(tqparent && isInline(tqparent->tag->name))
{
- startNodeLastInlineParent = parent;
- parent = parent->parent;
+ startNodeLastInlineParent = tqparent;
+ tqparent = tqparent->tqparent;
}
if(startNodeLastInlineParent->prev)
{
@@ -3297,7 +3297,7 @@ void kafkaCommon::getEndPosition(const TQString &tagString, int bLine, int bCol,
{
/**int result, oldResult;
- result = tagString.find("\n", 0);
+ result = tagString.tqfind("\n", 0);
if(result == -1)
{
eLine = bLine;
@@ -3310,7 +3310,7 @@ void kafkaCommon::getEndPosition(const TQString &tagString, int bLine, int bCol,
{
eLine++;
oldResult = result;
- result = tagString.find("\n", result + 1);
+ result = tagString.tqfind("\n", result + 1);
}
eCol = tagString.length() - oldResult - 2;
}*/
@@ -3420,7 +3420,7 @@ TQValueList<int> kafkaCommon::getLocation(Node * node)
node = node->prev;
}
loc.prepend(i);
- node = node->parent;
+ node = node->tqparent;
}
return loc;
}
@@ -3634,11 +3634,11 @@ int kafkaCommon::nodeDepth(Node *node)
if(!node)
return -1;
- node = node->parent;
+ node = node->tqparent;
while(node)
{
depth++;
- node = node->parent;
+ node = node->tqparent;
}
return depth;
@@ -3646,12 +3646,12 @@ int kafkaCommon::nodeDepth(Node *node)
Node* kafkaCommon::hasParent(Node *node, const TQString &name)
{
- node = node->parent;
+ node = node->tqparent;
while(node)
{
if(node->tag->name.lower() == name.lower())
return node;
- node = node->parent;
+ node = node->tqparent;
}
return 0L;
@@ -3673,31 +3673,31 @@ Node* kafkaCommon::hasParent(Node* startNode, Node* endNode, const TQString &nam
{
if(node->tag->name.lower() == name.lower())
return node;
- node = node->parent;
+ node = node->tqparent;
}
return 0;
}
-bool kafkaCommon::insertDomNode(DOM::Node node, DOM::Node parent, DOM::Node nextSibling,
+bool kafkaCommon::insertDomNode(DOM::Node node, DOM::Node tqparent, DOM::Node nextSibling,
DOM::Node rootNode)
{
if(node.isNull())
return false;
- if(parent.isNull())
+ if(tqparent.isNull())
{
if(rootNode.isNull())
return false;
- parent = rootNode;
+ tqparent = rootNode;
}
//Andras: avoid exceptions
- if (!nextSibling.isNull() && nextSibling.parentNode() != parent)
+ if (!nextSibling.isNull() && nextSibling.parentNode() != tqparent)
{
kdDebug(25001)<< "kafkaCommon::insertDomNode() - invalid nextSibling!" << endl;
return false;
}
- if (node.ownerDocument() != parent.ownerDocument())
+ if (node.ownerDocument() != tqparent.ownerDocument())
{
kdDebug(25001)<< "kafkaCommon::insertDomNode() - ownerDocument is different!" << endl;
return false;
@@ -3705,7 +3705,7 @@ bool kafkaCommon::insertDomNode(DOM::Node node, DOM::Node parent, DOM::Node next
try
{
- parent.insertBefore(node, nextSibling);
+ tqparent.insertBefore(node, nextSibling);
}
catch(DOM::DOMException e)
{
@@ -3716,12 +3716,12 @@ bool kafkaCommon::insertDomNode(DOM::Node node, DOM::Node parent, DOM::Node next
bool kafkaCommon::removeDomNode(DOM::Node node)
{
- DOM::Node parent = node.parentNode();
+ DOM::Node tqparent = node.parentNode();
- if(parent.isNull())
+ if(tqparent.isNull())
return false;
- parent.removeChild(node);
+ tqparent.removeChild(node);
return true;
}
@@ -3733,7 +3733,7 @@ DOM::Node kafkaCommon::createDomNode(const TQString &nodeName, const DTDStruct*
//this will change with the futur multi-DTDs support
//It does not use exceptions handling, so everything is checked via the DTEP definitions.
DOM::Node dn;
- QTag *qTag = 0L;
+ TQTag *qTag = 0L;
qTag = QuantaCommon::tagFromDTD(dtd, nodeName);
@@ -3766,7 +3766,7 @@ DOM::Node kafkaCommon::createDomNodeAttribute(const TQString &nodeName, const DT
const TQString &attrName, const TQString &attrValue, DOM::Document rootNode)
{
DOM::Node attr;
- QTag *qTag = 0L;
+ TQTag *qTag = 0L;
qTag = QuantaCommon::tagFromDTD(dtd, nodeName);
if(!qTag)
@@ -3908,24 +3908,24 @@ bool kafkaCommon::isInline(DOM::Node domNode)
return isInline(domNode.nodeName().string());
}
-bool kafkaCommon::parentSupports(DOM::Node parent, DOM::Node startNode, DOM::Node endNode,
+bool kafkaCommon::tqparentSupports(DOM::Node tqparent, DOM::Node startNode, DOM::Node endNode,
const DTDStruct* dtd)
{
- QTag *parentQTag;
+ TQTag *tqparentTQTag;
DOM::Node child;
- if(!dtd || parent.isNull())
+ if(!dtd || tqparent.isNull())
return false;
- parentQTag = QuantaCommon::tagFromDTD(dtd, parent.nodeName().string());
+ tqparentTQTag = QuantaCommon::tagFromDTD(dtd, tqparent.nodeName().string());
- if(!parentQTag)
+ if(!tqparentTQTag)
return false;
child = startNode;
while(!child.isNull())
{
- if(!parentQTag->isChild(child.nodeName().string()))
+ if(!tqparentTQTag->isChild(child.nodeName().string()))
return false;
if(child == endNode)
return true;
@@ -3974,17 +3974,17 @@ void kafkaCommon::coutDomTree(DOM::Node, int)
dots.fill('_', indent);
output = dots;
if (node.nodeType() != DOM::Node::TEXT_NODE)
- output += node.nodeName().string().replace('\n'," ");
+ output += node.nodeName().string().tqreplace('\n'," ");
else
{
output += "\"";
- output+= node.nodeValue().string().replace('\n'," ");
+ output+= node.nodeValue().string().tqreplace('\n'," ");
output += "\"";
}
kdDebug(25001) << output <<" (" << node.nodeType() << ") "<<
node.handle() << endl;
kdDebug(25001)<< dots << " +++ prev " << node.previousSibling().handle() << " next " <<
- node.nextSibling().handle() << " parent " <<
+ node.nextSibling().handle() << " tqparent " <<
node.parentNode().handle() << " child " << node.firstChild().handle() << endl;
for(j = 0; j < (int)node.attributes().length(); ++j)
{
@@ -4016,18 +4016,18 @@ void kafkaCommon::coutTree(Node *node, int indent)
node->tag->endPos(eLine, eCol);
if (node->tag->type == Tag::XmlTag || node->tag->type == Tag::XmlTagEnd ||
node->tag->type == Tag::ScriptTag)
- output += node->tag->name.replace('\n',"<return>");
+ output += node->tag->name.tqreplace('\n',"<return>");
else
{
output += "\"";
- output+= node->tag->tagStr().replace('\n',"<return>");
+ output+= node->tag->tagStr().tqreplace('\n',"<return>");
output += "\"";
}
kdDebug(25001) << output <<" (" << node->tag->type << ", " << node->tag->cleanStrBuilt() << ", " <<
node->tag->indentationDone() << ") "<< node << " at pos " << bLine << ":" << bCol << " - " <<
eLine << ":" << eCol << endl;
- kdDebug(25001)<< dots << " +++ prev " << node->prev << " next " << node->next << " parent " <<
- node->parent << " child " << node->child << endl;
+ kdDebug(25001)<< dots << " +++ prev " << node->prev << " next " << node->next << " tqparent " <<
+ node->tqparent << " child " << node->child << endl;
for(j = 0; j < node->tag->attrCount(); ++j)
{
kdDebug(25001)<< dots << " *** attr" << j << " " <<
@@ -4069,13 +4069,13 @@ int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, TQString const& t
tag_start = hasParent(start_node, tag_name);
if(tag_start)
- return 0; // only start_node has tag_name as parent
+ return 0; // only start_node has tag_name as tqparent
tag_start = hasParent(end_node, tag_name);
if(tag_start)
- return 0; // only end_node has tag_name as parent
+ return 0; // only end_node has tag_name as tqparent
- return -1; // neither the nodes have tag_name as parent
+ return -1; // neither the nodes have tag_name as tqparent
}
int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, TQString const& tag_name,
@@ -4092,13 +4092,13 @@ int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, TQString const& t
tag_start = hasParent(start_node, tag_name);
if(tag_start && tag_start->tag->hasAttribute(attribute_name) && tag_start->tag->attributeValue(attribute_name, true) == attribute_value)
- return 0; // only start_node has tag_name as parent
+ return 0; // only start_node has tag_name as tqparent
tag_start = hasParent(end_node, tag_name);
if(tag_start && tag_start->tag->hasAttribute(attribute_name) && tag_start->tag->attributeValue(attribute_name, true) == attribute_value)
- return 0; // only end_node has tag_name as parent
+ return 0; // only end_node has tag_name as tqparent
- return -1; // neither the nodes have tag_name as parent
+ return -1; // neither the nodes have tag_name as tqparent
}
bool kafkaCommon::isBetweenWords(Node* node, int offset)
diff --git a/quanta/parts/kafka/kafkacommon.h b/quanta/parts/kafka/kafkacommon.h
index 7de7d77e..0a1d25bd 100644
--- a/quanta/parts/kafka/kafkacommon.h
+++ b/quanta/parts/kafka/kafkacommon.h
@@ -58,7 +58,7 @@ public:
/**
* This function returns the next Node after node : the first child of
* node if available, else its next sibling if available, else the next
- * available next sibling of a parent of node.
+ * available next sibling of a tqparent of node.
* @param _node It is the Node from which we want the next Node.
* @param goUp This boolean specifies if we should go up (torwards the root Node)
* i.e. not looking at the childs of node, or make a standart iteration.
@@ -87,20 +87,20 @@ public:
/**
- * Returns the first common parent to startNode and endNode that isn't inline.
+ * Returns the first common tqparent to startNode and endNode that isn't inline.
* @param startNode Start node.
* @param endNode End node.
- * @param commonParentStartChildLocation Is the child of commonParent which is parent of startNode
- * @param commonParentEndChildLocation Is the child of commonParent which is parent of endNode
+ * @param commonParentStartChildLocation Is the child of commonParent which is tqparent of startNode
+ * @param commonParentEndChildLocation Is the child of commonParent which is tqparent of endNode
* @param nodeSubtree When startNode and endNode doesn't belong to the current document tree. Pass 0 if they do.
- * @return The first, non inline, common parent of startNode and endNode.
+ * @return The first, non inline, common tqparent of startNode and endNode.
*/
static Node* DTDGetNonInlineCommonParent(Node* startNode, Node* endNode,
TQValueList<int>& commonParentStartChildLocation,
TQValueList<int>& commonParentEndChildLocation, Node* nodeSubtree);
/**
- * Same as above, only that the common parent can be inline.
+ * Same as above, only that the common tqparent can be inline.
*/
static Node* DTDGetCommonParent(Node* startNode, Node* endNode,
TQValueList<int>& commonParentStartChildLocation,
@@ -109,14 +109,14 @@ public:
/**
* This function returns the next DOM::Node after node : the first child of
* DOM::Node if available, else its next sibling if available, else the next
- * available next sibling of a parent of node.
+ * available next sibling of a tqparent of node.
* @param node The DOM::Node the search starts from.
* @param goUp This boolean specifies if we should go up or down in the tree.
* For a normal use, It must be set to false at the
* beginning and then the same boolean must be used when using
* several times this function.
* @param returnParentNode Specifies if there are no child and next sibling, if
- * we should return the parent.
+ * we should return the tqparent.
* @param endNode Specifies at which DOM::Node the search should end. It is useful
* when setting returnParentNode to false.
* @return the next Node.
@@ -153,7 +153,7 @@ public:
static Node* getCorrectEndNode(Node* endNode, int& endOffset);
/**
- * Get the first child of commonParent which is parent of node
+ * Get the first child of commonParent which is tqparent of node
* @param node
* @param commonParent
* @return
@@ -186,7 +186,7 @@ public:
* generated by the undoRedo system. The undoRedo system can't create itself these Nodes
* because it will create them only during the synchronization, making all the TQValueList<int>
* Nodes location wrong.
- * WARNING n1 and n2 must be siblings or parent-child. If there are sibling and n1 is a XmlTag,
+ * WARNING n1 and n2 must be siblings or tqparent-child. If there are sibling and n1 is a XmlTag,
* n1 should not have non empty childs.
* @param n1 The start node.
* @param n2 The end node.
@@ -290,29 +290,29 @@ public:
* WARNING : baseNode is used as the rootNode.
* It will also try to merge text/Empty Nodes.
* @param node The node to insert.
- * @param parentNode This Node will be the parent of node.
+ * @param tqparentNode This Node will be the tqparent of node.
* @param nextSibling This Node will be the next Sibling of Node. If null, node will be appended at
- * the child list of parentNode.
+ * the child list of tqparentNode.
* TODO: @param rootNode The rootNode of the tree we want to insert the Node (usually &baseNode).
* @param modifs The changes made are logged into modifs. Put 0L if you don't want to log
* and if you know what you're doing!
* @param merge Try to merge with the siblings if possible.
* @return Returns a pointer to the node inserted.
*/
- static Node* insertNode(Node *node, Node* parentNode, Node* nextSibling,
+ static Node* insertNode(Node *node, Node* tqparentNode, Node* nextSibling,
NodeModifsSet *modifs/**, Node **rootNode*/, bool merge = true);
- static Node* insertNode(Node *node, Node* parentNode, Node* nextSibling, NodeSelection& selection,
+ static Node* insertNode(Node *node, Node* tqparentNode, Node* nextSibling, NodeSelection& selection,
NodeModifsSet *modifs, bool merge = true);
/**
* It behaves essentially like the above function except that it can "surround" a set of Nodes with the
* new Node. Thus, the closing Node is created if necessary.
- * nextSibling and nextEndSibling MUST have the same parent. If not, use the
+ * nextSibling and nextEndSibling MUST have the same tqparent. If not, use the
* DTDinsertNode.
* This function does not try to know if the location of the new Node is DTD valid.
* @param newNode The new Node to insert.
- * @param parent The parent of the Node.
+ * @param tqparent The tqparent of the Node.
* @param nextSibling The next sibling of the Node.
* @param nextEndSibling The next sibling of the closing Node if created. If nextEndSibling ==
* nextSibling, the closing Node will be placed at the right of the newly created Node.
@@ -320,13 +320,13 @@ public:
* @param modifs The changes made are logged into modifs.
* @return Returns a pointer to the node inserted.
*/
- static Node *insertNode(Node *newNode, Node *parent, Node *nextSibling, Node *nextEndSibling,
+ static Node *insertNode(Node *newNode, Node *tqparent, Node *nextSibling, Node *nextEndSibling,
NodeModifsSet *modifs, bool merge = true);
/**
* It behaves essentially like the above function except that it can split the endNodeToSurround and
* startNodeToSurround if necessary, according to the offsets.
- * startNodeToSurround et endNodeToSurround MUST have the same parent. If not, use the last
+ * startNodeToSurround et endNodeToSurround MUST have the same tqparent. If not, use the last
* DTDinsertNode.
* This function does not try to know if the location of the new Node is valid.
* @param startNodeToSurround The first Node which will be enclosed by the new Node.
@@ -334,7 +334,7 @@ public:
* @param startOffset The first Node will be splitted at offset startOffset, the right part will be enclosed.
* @param endOffset The last Node will be splitted at offset endOffset, the left part will be enclosed.
*/
- static Node* insertNode(Node *newNode, Node *parent, Node *startNodeToSurround,
+ static Node* insertNode(Node *newNode, Node *tqparent, Node *startNodeToSurround,
Node *endNodeToSurround, int startOffset, int endOffset, NodeModifsSet *modifs);
/**
@@ -353,7 +353,7 @@ public:
* @param cursorNode The cursor is inside cursorNode.
* @param cursorOffset The offset of the cursor inside cursorNode.
* </TEMPORARY>
- * @return Returns false if it wasn't possible to insert the tag because e.g. of an invalid parent.
+ * @return Returns false if it wasn't possible to insert the tag because e.g. of an invalid tqparent.
*/
static bool DTDinsertNode(Node *newNode, Node *startNode, int startOffset, Node *endNode,
int endOffset, Document *doc, Node **cursorNode, long &cursorOffset, NodeModifsSet *modifs);
@@ -373,26 +373,26 @@ public:
* WARNING : baseNode is used as the rootNode.
* It will also try to merge text/Empty Nodes.
* @param node The root node of the Node subtree to insert.
- * @param parentNode This Node will be the parent of node.
+ * @param tqparentNode This Node will be the tqparent of node.
* @param nextSibling This Node will be the next Sibling of Node. If null, node will be appended at
- * the child list of parentNode.
+ * the child list of tqparentNode.
* @param modifs The changes made are logged into modifs. Put 0L if you don't want to log
* and if you know what you're doing!
* @param merge Try to merge with the siblings if possible.
* @return Returns a pointer to the node inserted.
*/
- static Node* insertNodeSubtree(Node *node, Node* parentNode, Node* nextSibling,
+ static Node* insertNodeSubtree(Node *node, Node* tqparentNode, Node* nextSibling,
NodeModifsSet *modifs, bool merge = true);
/**
* It behaves essentially like the above function except that it can "surround" a set of Nodes with the
* new Node. Thus, the closing Node is created if necessary.
- * nextSibling and nextEndSibling MUST have the same parent. If not, use the
+ * nextSibling and nextEndSibling MUST have the same tqparent. If not, use the
* DTDinsertNode.
- * The Node Subtree MUST be a single-Node-per-parent subtree.
+ * The Node Subtree MUST be a single-Node-per-tqparent subtree.
* This function does not try to know if the location of the new Node is DTD valid.
* @param node The root node of the Node subtree to insert.
- * @param parent The parent of the Node.
+ * @param tqparent The tqparent of the Node.
* @param nextSibling The next sibling of the Node.
* @param nextEndSibling The next sibling of the closing Node if created. If nextEndSibling ==
* nextSibling, the closing Node will be placed at the right of the newly created Node.
@@ -401,7 +401,7 @@ public:
* @param modifs The changes made are logged into modifs.
* @return Returns a pointer to the node inserted.
*/
- static Node* insertNodeSubtree(Node *node, Node* parentNode, Node* nextSibling,
+ static Node* insertNodeSubtree(Node *node, Node* tqparentNode, Node* nextSibling,
Node* nextEndSibling, NodeModifsSet *modifs, bool merge = true);
/**
@@ -414,7 +414,7 @@ public:
static Node* DTDInsertNodeSubtree(Node *node, NodeSelectionInd& selection,
Node **cursorNode, long& cursorOffset, NodeModifsSet *modifs);
- static Node* DTDInsertNodeSubtree(Node* newNode, Node* parentNode, Node* nextSibling,
+ static Node* DTDInsertNodeSubtree(Node* newNode, Node* tqparentNode, Node* nextSibling,
NodeSelection& cursorHolder, NodeModifsSet *modifs);
/**
@@ -425,17 +425,17 @@ public:
* @param tagString The string of the tag.
* @param nodeType The type of the Node cf Tag::TokenType.
* @param doc The Node belongs to this Document.
- * @param parent The parent of the Node.
+ * @param tqparent The tqparent of the Node.
* @param nextSibling The next sibling of the Node.
* @return Returns a pointer to the newly created Node.
*/
static Node *createAndInsertNode(const TQString &nodeName, const TQString &tagString, int nodeType,
- Document *doc, Node* parent, Node* nextSibling, NodeModifsSet *modifs, bool merge = true);
+ Document *doc, Node* tqparent, Node* nextSibling, NodeModifsSet *modifs, bool merge = true);
/**
* It behaves essentially like the above function except that it reate its closing Node if necessary
- * and then insert them with parent as Node's parent.
- * nextSibling and nextEndSibling MUST have the same parent. If not, use the
+ * and then insert them with tqparent as Node's tqparent.
+ * nextSibling and nextEndSibling MUST have the same tqparent. If not, use the
* DTDcreateAndInsertNode.
* @param nextEndSibling The next sibling of the closing Node if created. If nextEndSibling ==
* nextSibling, the closing Node will be placed at the right of the newly created Node.
@@ -443,11 +443,11 @@ public:
* @param modifs The changes made are logged into modifs.
*/
static Node *createAndInsertNode(const TQString &nodeName, const TQString &tagString, int nodeType,
- Document *doc, Node *parent, Node *nextSibling, Node *nextEndSibling, NodeModifsSet *modifs);
+ Document *doc, Node *tqparent, Node *nextSibling, Node *nextEndSibling, NodeModifsSet *modifs);
/**
* It behaves essentially like the above function except that if necessary, it will split the Nodes.
- * startNodeToSurround et endNodeToSurround MUST have the same parent. If not, use the
+ * startNodeToSurround et endNodeToSurround MUST have the same tqparent. If not, use the
* DTDcreateAndInsertNode.
* This function does not try to know if the location of the new Node is valid.
* @param startNodeToSurround The first Node which will be enclosed by the new Node.
@@ -456,7 +456,7 @@ public:
* @param endOffset The last Node will be splitted at offset endOffset, the left part will be enclosed.
*/
static Node *createAndInsertNode(const TQString &nodeName, const TQString &tagString,
- int nodeType, Document *doc, Node *parent, Node *startNodeToSurround,
+ int nodeType, Document *doc, Node *tqparent, Node *startNodeToSurround,
Node *endNodeToSurround, int startOffset, int endOffset, NodeModifsSet *modifs);
/**
@@ -470,7 +470,7 @@ public:
* @param startOffset If firstNode is a text, specify at which offset the new Node must begin to surround.
* @param endNode The last Node which must be surrounded by the new Node.
* @param endOffset If endNode is a text, specify at which offset the new Node must stop to surround.
- * @return Returns false if it wasn't possible to insert the tag because e.g. of an invalid parent.
+ * @return Returns false if it wasn't possible to insert the tag because e.g. of an invalid tqparent.
*/
static bool DTDcreateAndInsertNode(const TQString &nodeName, const TQString &tagString, int nodeType,
Document *doc, Node *startNode, int startOffset, Node *endNode, int endOffset,
@@ -522,8 +522,8 @@ public:
* This mean that the undo/redo system will delete it when necessary so don't reuse it!!!!
* @param node The node to delete.
* @param modifs The changes made are logged into modifs.
- * @param extractChilds If we extract or move up the children. WARNING: it don't check
- * if the children of node are legal childs of the parent of node.
+ * @param extractChilds If we extract or move up the tqchildren. WARNING: it don't check
+ * if the tqchildren of node are legal childs of the tqparent of node.
* @param removeClosingTag Extract the closingTag if node isn't single and is Tag::XmlTag.
* TODO: @param removeEmbeddedTags Specifies if we delete the embedded Nodes e.g.
* <a href="<? boo ?>" > : the PHP block is an embedded block.
@@ -544,7 +544,7 @@ public:
/**
* Extract a node subtree in the tree. WARNING This function will log that the nodes were added.
- * This funtion not only extract the start node but also will extract inline parents.
+ * This funtion not only extract the start node but also will extract inline tqparents.
* @param startNode The node from which we start the removal.
* @param startOffset The offset of startNode from which we start the removal.
* @param endNode The node from which we end the removal.
@@ -576,7 +576,7 @@ public:
* Get a node subtree from the tree. It is similar to extractNodeSubtree()
* but it doesn't extract anything.
* It's useful to get a copy of the Node subtree from a selection, for example.
- * This funtion not only extract the start node but also will extract inline parents.
+ * This funtion not only extract the start node but also will extract inline tqparents.
* @param startNode The starting Node.
* @param startOffset If firstNode is a text, specify at which offset the new start Node will be splitted.
* @param endNode The ending Node.
@@ -588,12 +588,12 @@ public:
/**
* An enumeration of all the possible return states of DTDExtractNode
*/
- enum extractNodeStatus
+ enum extractNodetqStatus
{
//The node to extract was not found.
nothingExtracted = 0,
//The extract operation stopped because of a DTD error : if the node was removed, the child
- //weren't able to be childs of the node's parent, according to the DTD. Should not occur
+ //weren't able to be childs of the node's tqparent, according to the DTD. Should not occur
//except really bad HTML.
extractionStoppedDueToBadNodes,
//everything has gone fine
@@ -619,7 +619,7 @@ public:
* @param cursorOffset The offset of the cursor inside cursorNode.
* </TEMPORARY>
* @param modifs The usual modifs to log the modifications made for the undo/redo system.
- * @return Returns a kafkaCommon::extractNodeStatus.
+ * @return Returns a kafkaCommon::extractNodetqStatus.
*/
static int DTDExtractNode(const TQString &nodeName, Document *doc, Node *startNode,
int startOffset, Node *endNode, int endOffset, Node **cursorNode, long &cursorOffset,
@@ -628,9 +628,9 @@ public:
/**
* Moves a Node somewhere else.
* @param nodeToMove The node to move :-)
- * @param newParent The new parent of nodeToMove.
+ * @param newParent The new tqparent of nodeToMove.
* @param newNextSibling The new next Sibling of nodeToMove. If null, node will be appended at
- * the child list of parentNode.
+ * the child list of tqparentNode.
* @param modifs The changes made are logged into modifs.
* @param merge Specifies if it should try to merge the Node at its new location.
*/
@@ -695,10 +695,10 @@ public:
* @param startOffset
* @param endNode The node where a selection ends, for example.
* @param endOffset
- * @param commonParent This is the common parent between start and end node.
+ * @param commonParent This is the common tqparent between start and end node.
* If 0, it tries to find the commonParent, else it uses the passed node.
- * @param commonParentStartChildLocation The first child of commonParent which is parent of startNode is stored here.
- * @param commonParentEndChildLocation The first child of commonParent which is parent of endNode is stored here.
+ * @param commonParentStartChildLocation The first child of commonParent which is tqparent of startNode is stored here.
+ * @param commonParentEndChildLocation The first child of commonParent which is tqparent of endNode is stored here.
* @param cursorNode The cursor node is stored here.
* @param cursorOffset The cursor offset is stored here.
* @param subTree The node corresponding to the start of a subtree that doesn't belong to the current document, or 0.
@@ -809,8 +809,8 @@ public:
/**
* Get the node corresponding to a sublocation.
* @param loc A location of a Node.
- * @locOffset We want the (totalNumberOfParent - locOffset)th parent of Node.
- * @return Returns a parent of the node pointed by loc.
+ * @locOffset We want the (totalNumberOfParent - locOffset)th tqparent of Node.
+ * @return Returns a tqparent of the node pointed by loc.
*/
static Node* getNodeFromSubLocation(TQValueList<int> loc, int locOffset);
@@ -855,19 +855,19 @@ public:
/**
* Get the node's depth in the tree.
* @param node The node we want the depth.
- * @return Returns the depth of node. It is basically the number of parents of node.
- * It will return 0 if node has no parent Nodes, and -1 if node doesn't exists.
+ * @return Returns the depth of node. It is basically the number of tqparents of node.
+ * It will return 0 if node has no tqparent Nodes, and -1 if node doesn't exists.
*/
static int nodeDepth(Node *node);
/**
- * Looks if node has a parent which is named name.
- * @return Returns the first parent which is named name or 0L if not found.
+ * Looks if node has a tqparent which is named name.
+ * @return Returns the first tqparent which is named name or 0L if not found.
*/
static Node* hasParent(Node *node, const TQString &name);
/**
- * Tries to find the common parent to startNode and endNode, in the same conditions as above.
+ * Tries to find the common tqparent to startNode and endNode, in the same conditions as above.
*/
static Node* hasParent(Node* startNode, Node* endNode, const TQString &name);
@@ -879,12 +879,12 @@ public:
* WARNING : The postEnhancement is not done (cf htmlenhancer.h)
* Prefer using KafkaDocument::insertDomNode()
* @param node The node to insert.
- * @param parent The new parent of node. If null, insert node at the top level.
+ * @param tqparent The new tqparent of node. If null, insert node at the top level.
* @param nextSibling The new next sibling of node. If null, append node at the end of the child list.
- * @param rootNode The root DOM::Node of the DOM::Node tree. Useful when no parent is provided.
+ * @param rootNode The root DOM::Node of the DOM::Node tree. Useful when no tqparent is provided.
* @return Returns true if the operation was successfull.
*/
- static bool insertDomNode(DOM::Node node, DOM::Node parent = DOM::Node(),
+ static bool insertDomNode(DOM::Node node, DOM::Node tqparent = DOM::Node(),
DOM::Node nextSibling = DOM::Node(), DOM::Node rootNode = DOM::Node());
@@ -978,25 +978,25 @@ public:
const TQString &attrName, const TQString &attrValue, DOM::Document rootNode);
/**
- * Looks if domNode has a parent which is named name.
- * @return Returns the first parent which is named name or an empty DOM::Node if not found.
+ * Looks if domNode has a tqparent which is named name.
+ * @return Returns the first tqparent which is named name or an empty DOM::Node if not found.
*/
static DOM::Node hasParent(DOM::Node domNode, const TQString &name);
/**
* Returns the position of the child domNode.
* @param domNode This is the DOM::Node we want the position.
- * @return Returns the position of domNode inside domNode's parent's children or -1 if not found.
+ * @return Returns the position of domNode inside domNode's tqparent's tqchildren or -1 if not found.
*/
static int childPosition(DOM::Node domNode);
/**
- * Returns the position'th child of parentNode.
- * @param parentNode The parent Node of the node to return.
+ * Returns the position'th child of tqparentNode.
+ * @param tqparentNode The tqparent Node of the node to return.
* @param position We return the position'th child Node.
* @param fallback If set to true, it will always return a valid Node (except if there is no child!!)
*/
- static DOM::Node getChildNode(DOM::Node parentNode, int position, bool fallback = false);
+ static DOM::Node getChildNode(DOM::Node tqparentNode, int position, bool fallback = false);
/**
* Specify if a DOM::Node is inline (as specified in isInline()) or text.
@@ -1005,10 +1005,10 @@ public:
static bool isInline(DOM::Node domNode);
/**
- * Specify if parent supports the siblings DOM::Nodes starting from startNode to endNode
+ * Specify if tqparent supports the siblings DOM::Nodes starting from startNode to endNode
* according to the DTD dtd.
*/
- static bool parentSupports(DOM::Node parent, DOM::Node startNode, DOM::Node endNode,
+ static bool tqparentSupports(DOM::Node tqparent, DOM::Node startNode, DOM::Node endNode,
const DTDStruct* dtd);
@@ -1030,7 +1030,7 @@ public:
/**
* Prints in stdout the current Node tree.
* @param node The startNode
- * @param indent The number of little dots per parent relationship.
+ * @param indent The number of little dots per tqparent relationship.
*/
static void coutTree(Node *node, int indent);
@@ -1085,7 +1085,7 @@ public:
private:
/**
- * Split the last valid start parent (commonParentStartChild) into two.
+ * Split the last valid start tqparent (commonParentStartChild) into two.
* This and the method above are related and are used in sequence.
* The following tree:
* <body>
@@ -1120,14 +1120,14 @@ private:
* </b>
* </body>
* @param startNode The node where a selection starts, for example.
- * @param commonParent This is the common parent between start and end node.
- * @param commonParentStartChildLocation The first child of commonParent which is parent of startNode
+ * @param commonParent This is the common tqparent between start and end node.
+ * @param commonParentStartChildLocation The first child of commonParent which is tqparent of startNode
* @param modifs The changes made are logged into modifs.
*/
static void splitStartNodeSubtree(Node* startNode, Node* commonParent,
TQValueList<int>& commonParentStartChildLocation, NodeModifsSet* modifs);
/**
- * Split the last valid start parent (commonParentStartChild) into two.
+ * Split the last valid start tqparent (commonParentStartChild) into two.
* The following tree:
* <body>
* <b> --> commonParent
@@ -1162,9 +1162,9 @@ private:
* </b>
* </body>
* @param endNode The node where a selection ends, for example.
- * @param commonParent This is the common parent between start and end node.
- * @param commonParentStartChildLocation The first child of commonParent which is parent of startNode.
- * @param commonParentEndChildLocation The first child of commonParent which is parent of endNode.
+ * @param commonParent This is the common tqparent between start and end node.
+ * @param commonParentStartChildLocation The first child of commonParent which is tqparent of startNode.
+ * @param commonParentEndChildLocation The first child of commonParent which is tqparent of endNode.
* @param subTree True if we are dealing with a tree that doesn't belong to the current document.
* @param modifs The changes made are logged into modifs.
*/
diff --git a/quanta/parts/kafka/kafkadragobject.cpp b/quanta/parts/kafka/kafkadragobject.cpp
index 7d546036..4b609998 100644
--- a/quanta/parts/kafka/kafkadragobject.cpp
+++ b/quanta/parts/kafka/kafkadragobject.cpp
@@ -51,7 +51,7 @@ KafkaDragObject::KafkaDragObject(Node const* item, TQWidget* dragSource, const c
KafkaDragObject::~KafkaDragObject()
{}
-TQByteArray KafkaDragObject::encodedData(const char* mimetype) const
+TQByteArray KafkaDragObject::tqencodedData(const char* mimetype) const
{
if(m_mimetype == mimetype)
return m_array;
@@ -74,7 +74,7 @@ bool KafkaDragObject::decode(TQMimeSource* e, Node* node)
if(!node || !e->provides(m_mimetype))
return false;
- TQByteArray data = e->encodedData(m_mimetype);
+ TQByteArray data = e->tqencodedData(m_mimetype);
//kdDebug(25001) << TQString(data) << endl;
TQDomDocument doc;
doc.setContent(data, false);
diff --git a/quanta/parts/kafka/kafkadragobject.h b/quanta/parts/kafka/kafkadragobject.h
index 8b6c2e6e..f9c0b540 100644
--- a/quanta/parts/kafka/kafkadragobject.h
+++ b/quanta/parts/kafka/kafkadragobject.h
@@ -26,15 +26,16 @@ class Node;
/**
@author Paulo Moura Guedes
*/
-class KafkaDragObject: public QStoredDrag
+class KafkaDragObject: public TQStoredDrag
{
Q_OBJECT
+ TQ_OBJECT
public:
KafkaDragObject(Node const* item, TQWidget* dragSource = 0, const char* name = 0);
~KafkaDragObject();
- TQByteArray encodedData(const char* c) const;
+ TQByteArray tqencodedData(const char* c) const;
Node const* getItem() const;
static bool canDecode(TQMimeSource*);
diff --git a/quanta/parts/kafka/kafkahtmlpart.cpp b/quanta/parts/kafka/kafkahtmlpart.cpp
index bcbc7611..4dfe3f7d 100644
--- a/quanta/parts/kafka/kafkahtmlpart.cpp
+++ b/quanta/parts/kafka/kafkahtmlpart.cpp
@@ -83,9 +83,9 @@ public:
#endif
};
-KafkaWidget::KafkaWidget(TQWidget *parent, TQWidget *widgetParent, KafkaDocument *part,
+KafkaWidget::KafkaWidget(TQWidget *tqparent, TQWidget *widgetParent, KafkaDocument *part,
const char *name)
- : KHTMLPart(widgetParent, name, parent, name),
+ : KHTMLPart(widgetParent, name, TQT_TQOBJECT(tqparent), name),
w(part)
{
m_contextPopupMenu = new TQPopupMenu();
@@ -205,10 +205,10 @@ void KafkaWidget::insertText(DOM::Node node, const TQString &text, int position)
else if(position == 0)
{
DOM::Text textNode = document().createTextNode(text);
- DOM::Node parent = node.parentNode();
-//FIXME: Andras: safety checks, as parent can be null. Maybe it just hides the error...
- if (!parent.isNull())
- parent.insertBefore(textNode, node);
+ DOM::Node tqparent = node.parentNode();
+//FIXME: Andras: safety checks, as tqparent can be null. Maybe it just hides the error...
+ if (!tqparent.isNull())
+ tqparent.insertBefore(textNode, node);
else
node.appendChild(textNode);
m_currentNode = textNode;
@@ -223,15 +223,15 @@ void KafkaWidget::insertText(DOM::Node node, const TQString &text, int position)
else if(position == 3 || (position == 1 && (focus == kNodeAttrs::singleNodeAndItself)))
{
DOM::Text textNode = document().createTextNode(text);
- DOM::Node parent = node.parentNode();
-//FIXME: Andras: safety checks, as parent and node.nextSibling can be null. Maybe it just hides the error...
+ DOM::Node tqparent = node.parentNode();
+//FIXME: Andras: safety checks, as tqparent and node.nextSibling can be null. Maybe it just hides the error...
//Also it seems that position can be 3 and node is "body". See bug 112733.
- if (node.nodeName().string().lower() != "body" && !parent.isNull())
+ if (node.nodeName().string().lower() != "body" && !tqparent.isNull())
{
if (!node.nextSibling().isNull())
- parent.insertBefore(textNode, node.nextSibling());
+ tqparent.insertBefore(textNode, node.nextSibling());
else
- parent.insertBefore(textNode, node);
+ tqparent.insertBefore(textNode, node);
}
else
node.appendChild(textNode);
@@ -308,7 +308,7 @@ void KafkaWidget::keyReturn(bool specialPressed)
//WARNING : HTML-specific function
DOM::Node text, text2, pDomNode, pDomNode2, brDomNode, brDomNode2, tmp, PNode, emptyText;
int focus;
- // QTag *qTag;
+ // TQTag *qTag;
bool childOfP;
//kNodeAttrs *props;
@@ -506,7 +506,7 @@ bool KafkaWidget::eventFilter(TQObject *, TQEvent *event)
if(event->type() == TQEvent::KeyPress)
{
- TQKeyEvent *keyevent = static_cast<TQKeyEvent *>(event);
+ TQKeyEvent *keyevent = TQT_TQKEYEVENT(event);
//Create a new NodeModifsSet where the changes will be logged.
m_modifs = new NodeModifsSet();
@@ -655,7 +655,7 @@ bool KafkaWidget::eventFilter(TQObject *, TQEvent *event)
kdDebug(25001) << "KafkaWidget::eventFilter() Text - " <<
keyevent->text() << endl;
#endif
- //if(( keyevent->state() & Qt::ShiftButton) || ( keyevent->state() == Qt::NoButton))
+ //if(( keyevent->state() & TQt::ShiftButton) || ( keyevent->state() == Qt::NoButton))
if( keyevent->text().length() &&
( !( keyevent->state() & ControlButton ) &&
!( keyevent->state() & AltButton ) &&
@@ -947,7 +947,7 @@ void KafkaWidget::keyDelete()
#endif
_nodeParent = _nodeNext.parentNode();
- //If this empty text contains the cursor, change node to its parent.
+ //If this empty text contains the cursor, change node to its tqparent.
if(_nodeNext == _node && _nodeParent.firstChild() == _nodeNext &&
_nodeNext.nextSibling().isNull())
{
@@ -964,7 +964,7 @@ void KafkaWidget::keyDelete()
//Else if the current Node is a BLOCK which can be entered/leaved e.g. H1
else if(attrs->chCurFoc() == kNodeAttrs::blockNode)
{
- //First look if it is one of _node's parent
+ //First look if it is one of _node's tqparent
isParent = false;
temp = _node;
while(!temp.isNull())
@@ -1034,12 +1034,12 @@ void KafkaWidget::keyDelete()
}
else if(isParent && !nextIsBlock)
{
- if(kafkaCommon::parentSupports(toplevelBlock, startNode2, endNode2,
+ if(kafkaCommon::tqparentSupports(toplevelBlock, startNode2, endNode2,
w->getCurrentDoc()->defaultDTD()))
moveDomNodes(toplevelBlock, startNode2, endNode2, DOM::Node(), false);
else
{
- if(kafkaCommon::parentSupports(commonParent, startNode, endNode,
+ if(kafkaCommon::tqparentSupports(commonParent, startNode, endNode,
w->getCurrentDoc()->defaultDTD()))
moveDomNodes(commonParent, startNode, endNode, childOfCommonParent2,
true);
@@ -1051,13 +1051,13 @@ void KafkaWidget::keyDelete()
}
else if(isParent && nextIsBlock)
{
- if(kafkaCommon::parentSupports(toplevelBlock, startNode2, endNode2,
+ if(kafkaCommon::tqparentSupports(toplevelBlock, startNode2, endNode2,
w->getCurrentDoc()->defaultDTD()))
moveDomNodes(toplevelBlock, startNode2, endNode2, DOM::Node(), false);
else
{
- if(kafkaCommon::parentSupports(commonParent, startNode, endNode,
- w->getCurrentDoc()->defaultDTD()) && kafkaCommon::parentSupports(
+ if(kafkaCommon::tqparentSupports(commonParent, startNode, endNode,
+ w->getCurrentDoc()->defaultDTD()) && kafkaCommon::tqparentSupports(
commonParent, startNode2, endNode2, w->getCurrentDoc()->defaultDTD()))
{
moveDomNodes(commonParent, startNode, endNode, childOfCommonParent,
@@ -1073,7 +1073,7 @@ void KafkaWidget::keyDelete()
}
else if(!isParent && nextIsBlock)
{
- if(kafkaCommon::parentSupports(commonParent, startNode2, endNode2,
+ if(kafkaCommon::tqparentSupports(commonParent, startNode2, endNode2,
w->getCurrentDoc()->defaultDTD()))
moveDomNodes(commonParent, startNode2, endNode2, childOfCommonParent2, true);
else
@@ -1127,7 +1127,7 @@ void KafkaWidget::keyDelete()
#endif
_nodeParent = _nodeNext.parentNode();
- //If this block is used to define the cursor pos, change node to its parent.
+ //If this block is used to define the cursor pos, change node to its tqparent.
if(_nodeNext == _node && _nodeParent.firstChild() == _nodeNext &&
_nodeNext.nextSibling().isNull())
{
@@ -1392,7 +1392,7 @@ void KafkaWidget::keyBackspace()
//Else if the current Node if a BLOCK which can be entered/leaved e.g. H1, P
else if(attrs->chCurFoc() == kNodeAttrs::blockNode)
{
- //First look if it is one of _node's parent
+ //First look if it is one of _node's tqparent
isParent = false;
temp = _node;
while(!temp.isNull())
@@ -1460,13 +1460,13 @@ void KafkaWidget::keyBackspace()
}
else if(isParent && !prevIsBlock)
{
- if(kafkaCommon::parentSupports(toplevelBlock2, startNode, endNode,
+ if(kafkaCommon::tqparentSupports(toplevelBlock2, startNode, endNode,
w->getCurrentDoc()->defaultDTD()))
moveDomNodes(toplevelBlock2, startNode, endNode, toplevelBlock2.firstChild(),
true);
else
{
- if(kafkaCommon::parentSupports(commonParent, startNode2, endNode2,
+ if(kafkaCommon::tqparentSupports(commonParent, startNode2, endNode2,
w->getCurrentDoc()->defaultDTD()))
moveDomNodes(commonParent, startNode2, endNode2,
childOfCommonParent2, true);
@@ -1478,14 +1478,14 @@ void KafkaWidget::keyBackspace()
}
else if(isParent && prevIsBlock)
{
- if(kafkaCommon::parentSupports(toplevelBlock2, startNode, endNode,
+ if(kafkaCommon::tqparentSupports(toplevelBlock2, startNode, endNode,
w->getCurrentDoc()->defaultDTD()))
moveDomNodes(toplevelBlock2, startNode, endNode, toplevelBlock2.firstChild(),
true);
else
{
- if(kafkaCommon::parentSupports(commonParent, startNode, endNode,
- w->getCurrentDoc()->defaultDTD()) && kafkaCommon::parentSupports(
+ if(kafkaCommon::tqparentSupports(commonParent, startNode, endNode,
+ w->getCurrentDoc()->defaultDTD()) && kafkaCommon::tqparentSupports(
commonParent, startNode2, endNode2, w->getCurrentDoc()->defaultDTD()))
{
moveDomNodes(commonParent, startNode, endNode, childOfCommonParent,
@@ -1501,7 +1501,7 @@ void KafkaWidget::keyBackspace()
}
else if(!isParent && prevIsBlock)
{
- if(kafkaCommon::parentSupports(commonParent, startNode, endNode,
+ if(kafkaCommon::tqparentSupports(commonParent, startNode, endNode,
w->getCurrentDoc()->defaultDTD()))
moveDomNodes(commonParent, startNode, endNode, childOfCommonParent, false);
else
@@ -2039,9 +2039,9 @@ void KafkaWidget::khtmlMouseMoveEvent(khtml::MouseMoveEvent *event)
return;
}
if(mouseNode.nodeType() == DOM::Node::TEXT_NODE)
- view()->setCursor(Qt::ibeamCursor);
+ view()->setCursor(TQt::ibeamCursor);
else
- view()->setCursor(Qt::arrowCursor);
+ view()->setCursor(TQt::arrowCursor);
KHTMLPart::khtmlMouseMoveEvent(event);
}
diff --git a/quanta/parts/kafka/kafkahtmlpart.h b/quanta/parts/kafka/kafkahtmlpart.h
index 53a872dc..9365f925 100644
--- a/quanta/parts/kafka/kafkahtmlpart.h
+++ b/quanta/parts/kafka/kafkahtmlpart.h
@@ -46,8 +46,9 @@ class TQPopupMenu;
class KafkaWidget : public KHTMLPart
{
Q_OBJECT
+ TQ_OBJECT
public:
- KafkaWidget(TQWidget *parent, TQWidget *widgetParent, KafkaDocument *part,
+ KafkaWidget(TQWidget *tqparent, TQWidget *widgetParent, KafkaDocument *part,
const char *name = 0);
~KafkaWidget();
@@ -84,7 +85,7 @@ public:
* @param goUp A needed boolean for several consecutive call to
* this function. Setting it to false by default, or to true if we don't want to go through
* the childs of _node.
- * @param skipParentNodes Specifies if we should skip the parent Node when going up :
+ * @param skipParentNodes Specifies if we should skip the tqparent Node when going up :
* this implies that Nodes will not be returned two times.
* @param dontBlock Specifies if the search should or not be blocked by BlockingTags.
* @param _endNode Specifies at which DOM::Node the search should end. It is useful
@@ -112,9 +113,9 @@ public:
/** --------------- DOM::Node modifications -------------------------- */
/**
- * It will move DOM::Nodes from startNode to endNode as children of newParent. It does NOT check
- * if the move is valid, so it may crash. Please check before with kafkaCommon::parentSupports().
- * @param newParent The new parent of the DOM::Nodes.
+ * It will move DOM::Nodes from startNode to endNode as tqchildren of newParent. It does NOT check
+ * if the move is valid, so it may crash. Please check before with kafkaCommon::tqparentSupports().
+ * @param newParent The new tqparent of the DOM::Nodes.
* @param startNode The first node to move.
* @param endNode Starting from endNode, the last sibling to move.
* @param refNode The reference DOM::Node.
@@ -150,7 +151,7 @@ public slots:
* sections, and entity references) separates Text nodes, i.e., there are
* neither adjacent Text nodes nor empty Text nodes.
* Should be used instead of DOM::Node::normalize().
- * @param _node This node is the parent node of the childs normalized
+ * @param _node This node is the tqparent node of the childs normalized
*/
void normalize(DOM::Node _node);
@@ -210,7 +211,7 @@ signals:
/**
* Is emitted whenever a DOM::Node is about to be moved in the tree.
* @param node The DOM::Node which will be moved.
- * @param newParent The new parent of domNode.
+ * @param newParent The new tqparent of domNode.
* @param before domNode will be placed before before.
* @param modifs The changes made are logged into modifs.
*/
diff --git a/quanta/parts/kafka/kafkasyncoptions.cpp b/quanta/parts/kafka/kafkasyncoptions.cpp
index e7066187..45170859 100644
--- a/quanta/parts/kafka/kafkasyncoptions.cpp
+++ b/quanta/parts/kafka/kafkasyncoptions.cpp
@@ -25,8 +25,8 @@
#include "kafkasyncoptions.h"
#include "kafkasyncoptions.moc"
-KafkaSyncOptions::KafkaSyncOptions( KConfig *a_config, TQWidget* parent, const char* name )
- : KafkaSyncOptionsUI( parent, name )
+KafkaSyncOptions::KafkaSyncOptions( KConfig *a_config, TQWidget* tqparent, const char* name )
+ : KafkaSyncOptionsUI( tqparent, name )
{
config = a_config;
diff --git a/quanta/parts/kafka/kafkasyncoptions.h b/quanta/parts/kafka/kafkasyncoptions.h
index daf67117..85a1eb88 100644
--- a/quanta/parts/kafka/kafkasyncoptions.h
+++ b/quanta/parts/kafka/kafkasyncoptions.h
@@ -25,9 +25,10 @@ class KConfig;
class KafkaSyncOptions : public KafkaSyncOptionsUI
{
Q_OBJECT
+ TQ_OBJECT
public:
- KafkaSyncOptions( KConfig *config, TQWidget* parent = 0, const char* name = 0);
+ KafkaSyncOptions( KConfig *config, TQWidget* tqparent = 0, const char* name = 0);
~KafkaSyncOptions();
void updateConfig();
diff --git a/quanta/parts/kafka/kafkasyncoptionsui.ui b/quanta/parts/kafka/kafkasyncoptionsui.ui
index 2fb73661..54d7d5d0 100644
--- a/quanta/parts/kafka/kafkasyncoptionsui.ui
+++ b/quanta/parts/kafka/kafkasyncoptionsui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>KafkaSyncOptionsUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>KafkaSyncOptionsUI</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox" row="1" column="0">
+ <widget class="TQGroupBox" row="1" column="0">
<property name="name">
<cstring>views</cstring>
</property>
@@ -27,7 +27,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QButtonGroup" row="1" column="0">
+ <widget class="TQButtonGroup" row="1" column="0">
<property name="name">
<cstring>kafkaGroup</cstring>
</property>
@@ -51,14 +51,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>120</width>
<height>31</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="1" column="3">
+ <widget class="TQLabel" row="1" column="3">
<property name="name">
<cstring>ms2</cstring>
</property>
@@ -66,7 +66,7 @@
<string>ms</string>
</property>
</widget>
- <widget class="QSpinBox" row="1" column="2">
+ <widget class="TQSpinBox" row="1" column="2">
<property name="name">
<cstring>kafkaDelay</cstring>
</property>
@@ -77,7 +77,7 @@
<number>10</number>
</property>
</widget>
- <widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQRadioButton" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>kafkaFocusRefresh</cstring>
</property>
@@ -85,7 +85,7 @@
<string>Refresh the VPL editor on click</string>
</property>
</widget>
- <widget class="QRadioButton" row="1" column="0">
+ <widget class="TQRadioButton" row="1" column="0">
<property name="name">
<cstring>kafkaDelayRefresh</cstring>
</property>
@@ -95,7 +95,7 @@
</widget>
</grid>
</widget>
- <widget class="QButtonGroup" row="0" column="0">
+ <widget class="TQButtonGroup" row="0" column="0">
<property name="name">
<cstring>sourceGroup</cstring>
</property>
@@ -119,14 +119,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>27</width>
<height>31</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="1" column="3">
+ <widget class="TQLabel" row="1" column="3">
<property name="name">
<cstring>ms</cstring>
</property>
@@ -134,7 +134,7 @@
<string>ms</string>
</property>
</widget>
- <widget class="QSpinBox" row="1" column="2">
+ <widget class="TQSpinBox" row="1" column="2">
<property name="name">
<cstring>sourceDelay</cstring>
</property>
@@ -145,7 +145,7 @@
<number>10</number>
</property>
</widget>
- <widget class="QRadioButton" row="0" column="0" rowspan="1" colspan="4">
+ <widget class="TQRadioButton" row="0" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>sourceFocusRefresh</cstring>
</property>
@@ -153,7 +153,7 @@
<string>Refresh the source editor on click</string>
</property>
</widget>
- <widget class="QRadioButton" row="1" column="0">
+ <widget class="TQRadioButton" row="1" column="0">
<property name="name">
<cstring>sourceDelayRefresh</cstring>
</property>
@@ -175,14 +175,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>167</height>
</size>
</property>
</spacer>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>showScriptsIcon</cstring>
</property>
@@ -192,5 +192,5 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/quanta/parts/kafka/nodeenhancer.h b/quanta/parts/kafka/nodeenhancer.h
index 376379f1..22737082 100644
--- a/quanta/parts/kafka/nodeenhancer.h
+++ b/quanta/parts/kafka/nodeenhancer.h
@@ -45,10 +45,10 @@ public:
* The DOM::Node must be built before calling this
* function.
* @param node The Node we want to enhance.
- * @param parentDNode the parent DOM::Node of the root DOM::Node of node.
+ * @param tqparentDNode the tqparent DOM::Node of the root DOM::Node of node.
* @param nextDNode the DOM::Node next to the root DOM::Node of node.
*/
- virtual bool enhanceNode(Node *node, DOM::Node parentDNode, DOM::Node nextDNode) = 0;
+ virtual bool enhanceNode(Node *node, DOM::Node tqparentDNode, DOM::Node nextDNode) = 0;
/**
* This function apply some modifications once the whole DOM::Node tree is built.
diff --git a/quanta/parts/kafka/undoredo.cpp b/quanta/parts/kafka/undoredo.cpp
index dfe07142..8eb6cfbe 100644
--- a/quanta/parts/kafka/undoredo.cpp
+++ b/quanta/parts/kafka/undoredo.cpp
@@ -51,7 +51,7 @@ NodeModif::NodeModif()
m_type = -1;
m_node = 0L;
m_tag = 0L;
- m_childrenMovedUp = 0;
+ m_tqchildrenMovedUp = 0;
m_neighboursMovedDown = 0;
}
@@ -59,7 +59,7 @@ NodeModif::~NodeModif()
{
if(m_node)
{
- m_node->parent = 0L;
+ m_node->tqparent = 0L;
m_node->next = 0L;
m_node->prev = 0L;
if(m_type == NodeRemoved)
@@ -87,7 +87,7 @@ void NodeModif::setNode(Node *node)
m_node = node;
if(m_node)
{
- m_node->parent = 0L;
+ m_node->tqparent = 0L;
m_node->next = 0L;
m_node->prev = 0L;
if(m_type == NodeRemoved)
@@ -544,14 +544,14 @@ bool undoRedo::undoNodeModif(NodeModif *nodeModif)
node = kafkaCommon::getNodeFromLocation(nodeModif->location());
if(!node)
{
- // No node at this location, getting the parent Node and appending newNode after
- // the last child of the parent.
+ // No node at this location, getting the tqparent Node and appending newNode after
+ // the last child of the tqparent.
ref = nodeModif->location();
TQValueList<int> loc(ref);
loc.remove(loc.fromLast());
if(loc.empty())
{
- // No parent, adding it on top of the tree.
+ // No tqparent, adding it on top of the tree.
kafkaCommon::insertNode(newNode, 0L, 0L, 0L, false);
}
else
@@ -568,7 +568,7 @@ bool undoRedo::undoNodeModif(NodeModif *nodeModif)
else
{
// A node is already here. Moving it to the right and adding newNode here.
- kafkaCommon::insertNode(newNode, node->parent, node, 0L, false);
+ kafkaCommon::insertNode(newNode, node->tqparent, node, 0L, false);
}
}
if(nodeModif->type() == NodeModif::NodeTreeRemoved)
@@ -703,10 +703,10 @@ bool undoRedo::undoNodeModifInKafka(NodeModif */**_nodeModif*/)
{
//try
//{
- dn = n->_rootNode.parentNode().removeChild(n->_rootNode);
+ dn = n->_rootNode.tqparentNode().removeChild(n->_rootNode);
//} catch(DOM::DOMException e) {kafkaSyncError();}
//try{
- domNode.parentNode().insertBefore(dn, domNode);
+ domNode.tqparentNode().insertBefore(dn, domNode);
//} catch(DOM::DOMException e) {}
}
else if(n->tag->type == Tag::XmlTag || n->tag->type == Tag::Text)
@@ -733,7 +733,7 @@ bool undoRedo::undoNodeModifInKafka(NodeModif */**_nodeModif*/)
}
}
//try{
- domNode.parentNode().removeChild(domNode);
+ domNode.tqparentNode().removeChild(domNode);
//} catch(DOM::DOMException e) {kafkaSyncError();}
}
else if(_node->tag->type == Tag::XmlTagEnd && _node->closesPrevious &&
@@ -756,7 +756,7 @@ bool undoRedo::undoNodeModifInKafka(NodeModif */**_nodeModif*/)
while(n->next)
n = n->next;
}
- if(n->parent->_leafNode.isNull())
+ if(n->tqparent->_leafNode.isNull())
{
dm = domNode.nextSibling();
goUp = false;
@@ -764,18 +764,18 @@ bool undoRedo::undoNodeModifInKafka(NodeModif */**_nodeModif*/)
{
kafkaInterface->disconnectDomNodeFromQuantaNode(dm);
//try{
- dm.parentNode().removeChild(dm);
+ dm.tqparentNode().removeChild(dm);
//} catch(DOM::DOMException e) {kafkaSyncError();}
- dm = kafkaCommon::getNextDomNode(dm, goUp, false, domNode.parentNode());
+ dm = kafkaCommon::getNextDomNode(dm, goUp, false, domNode.tqparentNode());
}
}
else
{
- domNode2 = n->parent->_leafNode;
+ domNode2 = n->tqparent->_leafNode;
while(!domNode.nextSibling().isNull())
{
//try{
- dn = domNode.parentNode().removeChild(domNode.nextSibling());
+ dn = domNode.tqparentNode().removeChild(domNode.nextSibling());
//} catch(DOM::DOMException e) {kafkaSyncError();}
//try{
domNode2.appendChild(dn);
@@ -788,7 +788,7 @@ bool undoRedo::undoNodeModifInKafka(NodeModif */**_nodeModif*/)
while(!domNode.nextSibling().isNull())
{
//try{
- dn = domNode.parentNode().removeChild(domNode.nextSibling());
+ dn = domNode.tqparentNode().removeChild(domNode.nextSibling());
//} catch(DOM::DOMException e) {kafkaSyncError();}
//try{
domNode2.appendChild(dn);
@@ -810,7 +810,7 @@ bool undoRedo::undoNodeModifInKafka(NodeModif */**_nodeModif*/)
return true;//no kafka node here, due to an invalid pos.
domNode = _node->_rootNode;
//try{
- domNode.parentNode().removeChild(domNode);
+ domNode.tqparentNode().removeChild(domNode);
//} catch(DOM::DOMException e) {kafkaSyncError();}
kafkaInterface->disconnectDomNodeFromQuantaNode(domNode);
kafkaInterface->buildKafkaNodeFromNode(_node);
@@ -837,7 +837,7 @@ bool undoRedo::undoNodeModifInKafka(NodeModif */**_nodeModif*/)
if(!n->_rootNode.isNull())
{
//try{
- dn = n->_rootNode.parentNode().removeChild(n->_rootNode);
+ dn = n->_rootNode.tqparentNode().removeChild(n->_rootNode);
//} catch(DOM::DOMException e) {kafkaSyncError();}
//try{
domNode.appendChild(dn);
@@ -857,10 +857,10 @@ bool undoRedo::undoNodeModifInKafka(NodeModif */**_nodeModif*/)
if(!n->_rootNode.isNull())
{
//try{
- dn = n->_rootNode.parentNode().removeChild(n->_rootNode);
+ dn = n->_rootNode.tqparentNode().removeChild(n->_rootNode);
//} catch(DOM::DOMException e) {kafkaSyncError();}
//try{
- domNode.parentNode().appendChild(dn);
+ domNode.tqparentNode().appendChild(dn);
//} catch(DOM::DOMException e) {}
}
else if(n->tag->type == Tag::XmlTag || n->tag->type == Tag::Text)
@@ -968,15 +968,15 @@ void undoRedo::reloadQuantaEditor(bool force, bool syncQuantaCursor, bool encode
while(node)
{
//kdDebug(25001)<< "CurNode : " << _node->tag->name << " - " << _node->tag->tagStr() << endl;
- if(node->parent)
+ if(node->tqparent)
{
- node->parent->tag->beginPos(bLine3, bCol3);
- node->parent->tag->endPos(eLine3, eCol3);
+ node->tqparent->tag->beginPos(bLine3, bCol3);
+ node->tqparent->tag->endPos(eLine3, eCol3);
}
node->tag->beginPos(bLine2, bCol2);
//if we are in a Script inside a tag e.g. <a href="<? PHP stuff here ?>">, skip it
- if(node->tag->type == Tag::ScriptTag && node->parent &&
+ if(node->tag->type == Tag::ScriptTag && node->tqparent &&
QuantaCommon::isBetween(bLine2, bCol2, bLine3, bCol3, eLine3,eCol3) == 0)
{
goUp = true;
@@ -990,7 +990,7 @@ void undoRedo::reloadQuantaEditor(bool force, bool syncQuantaCursor, bool encode
allText += node->tag->tagStr();
//If a child is a Script inside this Tag e.g. <a href="<? PHP stuff here ?>">, make
- //its position fits inside the parent
+ //its position fits inside the tqparent
node->tag->beginPos(bLine3, bCol3);
node->tag->endPos(eLine3, eCol3);
child = node->firstChild();
@@ -1477,7 +1477,7 @@ void undoRedo::debugOutput()
" - contents: " << (*it2)->tag()->tagStr() << endl;
if(((*it2)->type() == NodeModif::NodeRemoved && !afterEditorIt) ||
((*it2)->type() == NodeModif::NodeAdded && afterEditorIt))
- kdDebug(24000)<< "==== ChildsNumber1 : " << (*it2)->childrenMovedUp() <<
+ kdDebug(24000)<< "==== ChildsNumber1 : " << (*it2)->tqchildrenMovedUp() <<
" - ChildsNumber2 : " << (*it2)->neighboursMovedDown() << endl;
}
kdDebug(24000)<< "== End Node Modifications set #" << i << endl;
diff --git a/quanta/parts/kafka/undoredo.h b/quanta/parts/kafka/undoredo.h
index 390dc5bb..1bd0cff5 100644
--- a/quanta/parts/kafka/undoredo.h
+++ b/quanta/parts/kafka/undoredo.h
@@ -95,17 +95,17 @@ public:
/**
* TODO:REMOVE
- * For non-XmlEnd Node deletion without its children.
- * @param childrenNumber The number of children which are moved up
+ * For non-XmlEnd Node deletion without its tqchildren.
+ * @param tqchildrenNumber The number of tqchildren which are moved up
* at the location where was the deleted Node.
*/
- void setChildrenMovedUp(int childrenNumber) {m_childrenMovedUp = childrenNumber;}
+ void setChildrenMovedUp(int tqchildrenNumber) {m_tqchildrenMovedUp = tqchildrenNumber;}
/**
* TODO:REMOVE
* @return Returns the number of childs which were moved up.
*/
- int childrenMovedUp() {return m_childrenMovedUp;}
+ int tqchildrenMovedUp() {return m_tqchildrenMovedUp;}
/**
* TODO:REMOVE
@@ -139,7 +139,7 @@ public:
NodeTreeRemoved,
//Moving a Node from one location to another. Implemented.
NodeMoved,
- //Moving a Node and its children from one location to another.
+ //Moving a Node and its tqchildren from one location to another.
NodeAndChildsMoved
};
@@ -148,7 +148,7 @@ private:
TQValueList<int> m_location, m_finalLocation;
Node *m_node;
Tag *m_tag;
- int m_childrenMovedUp;
+ int m_tqchildrenMovedUp;
int m_neighboursMovedDown;
};
@@ -248,7 +248,7 @@ private:
* This class, basically a new undo/redo system, also helps KafkaDocument to synchronize the
* kafka and quanta view.
*/
-class undoRedo : public QObject
+class undoRedo : public TQObject
{
public:
/**
diff --git a/quanta/parts/kafka/wkafkapart.cpp b/quanta/parts/kafka/wkafkapart.cpp
index 73e2a019..6eae1afc 100644
--- a/quanta/parts/kafka/wkafkapart.cpp
+++ b/quanta/parts/kafka/wkafkapart.cpp
@@ -61,7 +61,7 @@
KafkaWidget *kafkaWidget;
KafkaDocument *kafkaDoc;
-KafkaDocument::KafkaDocument(TQWidget *parent, TQWidget *widgetParent, const char *name)
+KafkaDocument::KafkaDocument(TQWidget *tqparent, TQWidget *widgetParent, const char *name)
:domNodeProps(1021), _docLoaded(false)
{
// i18n reserve
@@ -88,7 +88,7 @@ TQString ab = i18n("Ident all");
kafkaDoc = this;
- m_kafkaPart = new KafkaWidget(parent, widgetParent,this, name);
+ m_kafkaPart = new KafkaWidget(tqparent, widgetParent,this, name);
kafkaWidget = m_kafkaPart;
//m_kafkaPart->showDomTree();
m_currentDoc = 0L;
@@ -107,9 +107,9 @@ TQString ab = i18n("Ident all");
{
tmp = t.readLine();
if(tmp.left(2) == "//") continue;//comments
- int begin = tmp.find("(") + 1;
+ int begin = tmp.tqfind("(") + 1;
if(begin == (-1 + 1)) continue;//"(" not found : invalid line
- int length = tmp.find(")") - begin;
+ int length = tmp.tqfind(")") - begin;
decodedChars.insert(tmp.left(1), tmp.mid(begin, length));
encodedChars.insert(tmp.mid(begin, length), tmp.left(1));
}
@@ -428,7 +428,7 @@ kNodeAttrs* KafkaDocument::connectDomNodeToQuantaNode(DOM::Node domNode, Node *n
else
{
kdDebug(25001)<< "KafkaDocument::connectDomNodeToQuantaNode () - " <<
- "No QTag found! Setting default parameters..." << endl;
+ "No TQTag found! Setting default parameters..." << endl;
props->setCHCursorFocus(kNodeAttrs::no);
props->setCCEnter(false);
props->setCBModified(false);
@@ -513,7 +513,7 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode)
DOM::Node newNode, newNode2, attr, nextNode, parentNode, *ptDomNode;
bool removeLeftWhitespaces, removeRightWhitespaces;
TQString str, nodeValue;
- Node *n, *parent;
+ Node *n, *tqparent;
int i;
// Don't create DOM::Nodes from Quanta empty nodes outside the body or inside other not allowed element, or KHTML
@@ -521,14 +521,14 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode)
bool canInsertEmptyNode = false;
if(node->tag->type == Tag::Empty)
{
- if(!m_currentDoc->defaultDTD()->name.contains("HTML", false))
+ if(!m_currentDoc->defaultDTD()->name.tqcontains("HTML", false))
canInsertEmptyNode = true;
else
canInsertEmptyNode = kafkaCommon::hasParent(node, "body");
- Node* parent_node = node->parent;
- QTag* parent_node_description_tag = QuantaCommon::tagFromDTD(parent_node);
- if(parent_node_description_tag && !parent_node_description_tag->isChild(node, false, true))
+ Node* tqparent_node = node->tqparent;
+ TQTag* tqparent_node_description_tag = QuantaCommon::tagFromDTD(tqparent_node);
+ if(tqparent_node_description_tag && !tqparent_node_description_tag->isChild(node, false, true))
canInsertEmptyNode = false;
}
@@ -540,7 +540,7 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode)
//The basics DOM::Nodes HTML, HEAD and BODY are loaded anyway, but we must now
// link the real HTML,... to their Nodes.
//A basic Common tree is !doctype<-html<-(head, body)
- if(!node->parent)
+ if(!node->tqparent)
{//FIXME:html, head and body are HTML-specific tag, for others DTDs it might result to some pbs.
if(str == "html")
{
@@ -575,30 +575,30 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode)
}
}
}
- else if(str == "html" && (!node->parent || (node->parent && !node->parent->parent)))
+ else if(str == "html" && (!node->tqparent || (node->tqparent && !node->tqparent->tqparent)))
{
if(!html.isNull())//delete the empty Node
disconnectDomNodeFromQuantaNode(html);
newNode = html;
insertNode = false;
}
- else if(str == "body" && ((node->parent && !node->parent->parent) || (node->parent &&
- node->parent->parent && !node->parent->parent->parent)))
+ else if(str == "body" && ((node->tqparent && !node->tqparent->tqparent) || (node->tqparent &&
+ node->tqparent->tqparent && !node->tqparent->tqparent->tqparent)))
{
if(!body.isNull())
disconnectDomNodeFromQuantaNode(body);
newNode = body;
insertNode = false;
}
- else if(str == "head" && ((node->parent && !node->parent->parent) || (node->parent &&
- node->parent->parent && !node->parent->parent->parent)))
+ else if(str == "head" && ((node->tqparent && !node->tqparent->tqparent) || (node->tqparent &&
+ node->tqparent->tqparent && !node->tqparent->tqparent->tqparent)))
{
if(!head.isNull())
disconnectDomNodeFromQuantaNode(head);
newNode = head;
insertNode = false;
}
- /** else if(node->parent->tag->str == "html")*/
+ /** else if(node->tqparent->tag->str == "html")*/
else
{
if(node->tag->type == Tag::Text || node->tag->type == Tag::Empty)
@@ -631,16 +631,16 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode)
//- It is the last child of a BLOCK
removeLeftWhitespaces = false;
n = node;
- parent = node->parent;
- while(parent && parent->SFirstChild() == n)
+ tqparent = node->tqparent;
+ while(tqparent && tqparent->SFirstChild() == n)
{
- if(!kafkaCommon::isInline(parent->tag->name))
+ if(!kafkaCommon::isInline(tqparent->tag->name))
{
removeLeftWhitespaces = true;
break;
}
- n = parent;
- parent = parent->parent;
+ n = tqparent;
+ tqparent = tqparent->tqparent;
}
if(!removeLeftWhitespaces)
{
@@ -661,16 +661,16 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode)
removeRightWhitespaces = false;
n = node;
- parent = node->parent;
- while(parent && parent->SLastChild() == n)
+ tqparent = node->tqparent;
+ while(tqparent && tqparent->SLastChild() == n)
{
- if(!kafkaCommon::isInline(parent->tag->name))
+ if(!kafkaCommon::isInline(tqparent->tag->name))
{
removeRightWhitespaces = true;
break;
}
- n = parent;
- parent = parent->parent;
+ n = tqparent;
+ tqparent = tqparent->tqparent;
}
nodeValue = node->tag->tagStr();
@@ -714,11 +714,11 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode)
break;
}
}
- if(node->parent && node->parent->leafNode())
- parentNode = *node->parent->leafNode();
- else if(node->parent && !node->parent->leafNode())
+ if(node->tqparent && node->tqparent->leafNode())
+ parentNode = *node->tqparent->leafNode();
+ else if(node->tqparent && !node->tqparent->leafNode())
{
- //the parent tag was invalid and khtml refuse to insert it
+ //the tqparent tag was invalid and khtml refuse to insert it
//so impossible to inser the current node
disconnectDomNodeFromQuantaNode(newNode);
if(node->rootNode())
@@ -734,7 +734,7 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode)
node->setLeafNode(ptDomNode);
mainEnhancer->enhanceNode(node, parentNode, nextNode);
- QTag* qTag = QuantaCommon::tagFromDTD(getCurrentDoc()->defaultDTD(),
+ TQTag* qTag = QuantaCommon::tagFromDTD(getCurrentDoc()->defaultDTD(),
parentNode.nodeName().string());
if(qTag && qTag->isChild(node, false))
@@ -774,8 +774,8 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode)
}
else
{
- if(node->parent && node->parent->leafNode())
- parentNode = *node->parent->leafNode();
+ if(node->tqparent && node->tqparent->leafNode())
+ parentNode = *node->tqparent->leafNode();
else
parentNode = body;
n = node;
@@ -807,8 +807,8 @@ void KafkaDocument::buildNodeFromKafkaNode(Node *node, DOM::Node domNode)
if(domNode.nodeType() == DOM::Node::TEXT_NODE)
{
TQString text = domNode.nodeValue().string();
- text.replace("<", "&lt;");
- text.replace(">", "&gt;");
+ text.tqreplace("<", "&lt;");
+ text.tqreplace(">", "&gt;");
node->tag->setStr(text);
}
else
@@ -875,7 +875,7 @@ Node * KafkaDocument::buildNodeFromKafkaNode(DOM::Node domNode, Node *nodeParent
TQString KafkaDocument::getDecodedChar(const TQString &encodedChar)
{
- TQMap<TQString, TQString>::Iterator it = encodedChars.find(encodedChar);
+ TQMap<TQString, TQString>::Iterator it = encodedChars.tqfind(encodedChar);
if(it == encodedChars.end())
{
//try this
@@ -950,7 +950,7 @@ TQString KafkaDocument::getEncodedChar(const TQString &decodedChar, const TQStri
else if(decodedChar[0].isSpace())
//FIXME:for an unknown reason, by default it return &iquest; instead of &nbsp;
return "&nbsp;";
- TQMap<TQString, TQString>::Iterator it = decodedChars.find(decodedChar);
+ TQMap<TQString, TQString>::Iterator it = decodedChars.tqfind(decodedChar);
if(it == decodedChars.end())
return decodedChar;
@@ -1074,10 +1074,10 @@ TQString KafkaDocument::generateCodeFromNode(Node *node, int bLine, int bCol, in
openingNode = node->getOpeningNode();
if(openingNode && openingNode->tag->type == Tag::ScriptTag)
{
- if(openingNode->tag->name.contains("XML PI", false) ||
- openingNode->tag->name.contains("PHP", false))
+ if(openingNode->tag->name.tqcontains("XML PI", false) ||
+ openingNode->tag->name.tqcontains("PHP", false))
text = "?>";
- else if(openingNode->tag->name.contains("DTD", false))
+ else if(openingNode->tag->name.tqcontains("DTD", false))
text = ">";
else
text = ">";
@@ -1102,26 +1102,26 @@ TQString KafkaDocument::generateCodeFromNode(Node *node, int bLine, int bCol, in
/** Can't use KGlobal::charsets()->toEntity() :
* It translate all chars into entities! */
else if(!hasPreParent)
- text = node->tag->tagStr().replace(TQRegExp("\\s+"), " ");
+ text = node->tag->tagStr().tqreplace(TQRegExp("\\s+"), " ");
else
text = node->tag->tagStr();
}
else if(node->tag->type == Tag::ScriptTag)
{
//WARNING : HTML SPECIFIC
- if(node->tag->name.contains("style", false))
+ if(node->tag->name.tqcontains("style", false))
{
text = "<" + QuantaCommon::tagCase("style") + ">";
}
- else if(node->tag->name.contains("DTD", false))
+ else if(node->tag->name.tqcontains("DTD", false))
{
text = "<!";
}
- else if(node->tag->name.contains("XML PI", false))
+ else if(node->tag->name.tqcontains("XML PI", false))
{
text = "<?xml";
}
- else if(node->tag->name.contains("PHP", false))
+ else if(node->tag->name.tqcontains("PHP", false))
{
text = "<?php";
}
@@ -1697,13 +1697,13 @@ void KafkaDocument::translateNodeIntoQuantaCursorPosition(Node *node, int offset
}
}
-bool KafkaDocument::insertDomNode(DOM::Node node, DOM::Node parent,
+bool KafkaDocument::insertDomNode(DOM::Node node, DOM::Node tqparent,
DOM::Node nextSibling, DOM::Node rootNode)
{
DOM::Node siblingNSpecial;
//First insert the node
- if(!kafkaCommon::insertDomNode(node, parent, nextSibling, rootNode))
+ if(!kafkaCommon::insertDomNode(node, tqparent, nextSibling, rootNode))
return false;
//Then unEnhance and reEnhance the nearest non special nodes so that everything's fine.
@@ -1728,12 +1728,12 @@ bool KafkaDocument::insertDomNode(DOM::Node node, DOM::Node parent,
bool KafkaDocument::removeDomNode(DOM::Node node)
{
- DOM::Node nextSiblingNSpecial, prevSiblingNSpecial, parent;
+ DOM::Node nextSiblingNSpecial, prevSiblingNSpecial, tqparent;
//First remove the node
prevSiblingNSpecial = getPrevSiblingNSpecial(node);
nextSiblingNSpecial = getNextSiblingNSpecial(node);
- parent = node.parentNode();
+ tqparent = node.parentNode();
if(!kafkaCommon::removeDomNode(node))
return false;
@@ -1748,8 +1748,8 @@ bool KafkaDocument::removeDomNode(DOM::Node node)
mainEnhancer->postUnenhanceNode(nextSiblingNSpecial);
mainEnhancer->postEnhanceNode(nextSiblingNSpecial);
}
- mainEnhancer->postUnenhanceNode(parent);
- mainEnhancer->postEnhanceNode(parent);
+ mainEnhancer->postUnenhanceNode(tqparent);
+ mainEnhancer->postEnhanceNode(tqparent);
return true;
}
@@ -1832,9 +1832,9 @@ void KafkaDocument::coutLinkTree(Node *, int)
dots.fill('*', indent);
output = dots;
if (node->tag->type != Tag::Text)
- output += node->tag->name.replace('\n'," ");
+ output += node->tag->name.tqreplace('\n'," ");
else
- output+= node->tag->tagStr().replace('\n'," ");
+ output+= node->tag->tagStr().tqreplace('\n'," ");
output += " (";
output += node->tag->type;
output += ") ";
@@ -1930,9 +1930,9 @@ void KafkaDocument::slotDomNodeModified(DOM::Node domNode, NodeModifsSet* modifs
Node *node = 0L;
NodeModif *modif;
kNodeAttrs *props, *newProps;
- DOM::Node newDomNode, parentDomNode, nextSiblingDomNode;
+ DOM::Node newDomNode, tqparentDomNode, nextSiblingDomNode;
DOM::Node *ptDomNode;
- QTag *qTag;
+ TQTag *qTag;
#ifdef LIGHT_DEBUG
TQTime t;
@@ -1985,7 +1985,7 @@ void KafkaDocument::slotDomNodeModified(DOM::Node domNode, NodeModifsSet* modifs
//let's create the corresponding Text Node and the P tag only if necessary
modifs = new NodeModifsSet();
modif = new NodeModif();
- parentDomNode = domNode.parentNode();
+ tqparentDomNode = domNode.parentNode();
nextSiblingDomNode = domNode.nextSibling();
if(!qTag->isChild("#text", false))
@@ -1993,7 +1993,7 @@ void KafkaDocument::slotDomNodeModified(DOM::Node domNode, NodeModifsSet* modifs
newDomNode = kafkaCommon::createDomNode("p",
getNode(domNode.parentNode())->tag->dtd(), m_kafkaPart->document());
kafkaCommon::removeDomNode(domNode);
- kafkaCommon::insertDomNode(newDomNode, parentDomNode, nextSiblingDomNode);
+ kafkaCommon::insertDomNode(newDomNode, tqparentDomNode, nextSiblingDomNode);
kafkaCommon::insertDomNode(domNode, newDomNode);
node = kafkaCommon::createNode("p", "", Tag::XmlTag, m_currentDoc);
@@ -2002,12 +2002,12 @@ void KafkaDocument::slotDomNodeModified(DOM::Node domNode, NodeModifsSet* modifs
node->setRootNode(ptDomNode);
ptDomNode = new DOM::Node(newDomNode);
node->setLeafNode(ptDomNode);
- node = kafkaCommon::insertNode(node, getNode(parentDomNode),
+ node = kafkaCommon::insertNode(node, getNode(tqparentDomNode),
getNode(nextSiblingDomNode), getNode(nextSiblingDomNode), modifs);
newProps->setNode(node);
modifs->addNodeModif(modif);
- parentDomNode = newDomNode;
+ tqparentDomNode = newDomNode;
nextSiblingDomNode = DOM::Node();
modif = new NodeModif();
}
@@ -2019,7 +2019,7 @@ void KafkaDocument::slotDomNodeModified(DOM::Node domNode, NodeModifsSet* modifs
ptDomNode = new DOM::Node(domNode);
node->setLeafNode(ptDomNode);
//avoid the merging of Text Nodes
- node = kafkaCommon::insertNode(node, getNode(parentDomNode),
+ node = kafkaCommon::insertNode(node, getNode(tqparentDomNode),
getNode(nextSiblingDomNode), modifs, false);
props->setNode(node);
modifs->addNodeModif(modif);
@@ -2080,13 +2080,13 @@ void KafkaDocument::slotDomNodeAboutToBeRemoved(DOM::Node _domNode, bool deleteC
//If we are deleting a PHP Node which is embedded into a tag e.g. <a <? echo boo; ?> >
//We must regenerate the <a> tag string.
- if(_node->tag->type == Tag::ScriptTag && _node->parent)
+ if(_node->tag->type == Tag::ScriptTag && _node->tqparent)
{
- _node->parent->tag->beginPos(bLine, bCol);
- _node->parent->tag->endPos(eLine, eCol);
+ _node->tqparent->tag->beginPos(bLine, bCol);
+ _node->tqparent->tag->endPos(eLine, eCol);
_node->tag->beginPos(bLine2, bCol2);
if(QuantaCommon::isBetween(bLine2, bCol2, bLine, bCol, eLine,eCol) == 0)
- _node->parent->tag->setCleanStrBuilt(false);
+ _node->tqparent->tag->setCleanStrBuilt(false);
}
if(_node->prev)
@@ -2099,15 +2099,15 @@ void KafkaDocument::slotDomNodeAboutToBeRemoved(DOM::Node _domNode, bool deleteC
modif = new NodeModif();
modif->setType(NodeModif::NodeRemoved);
modif->setLocation(kafkaCommon::getLocation(_node));
- if(_node->parent && _node->parent->child == _node)
- _node->parent->child = _node->next;
+ if(_node->tqparent && _node->tqparent->child == _node)
+ _node->tqparent->child = _node->next;
if(_node->prev)
_node->prev->next = _node->next;
if(_node->next)
_node->next->prev = _node->prev;
if(_node == baseNode)
baseNode = _node->next;
- _node->parent = 0L;
+ _node->tqparent = 0L;
_node->prev = 0L;
_node->next = 0L;
_node->child = 0L;
@@ -2131,8 +2131,8 @@ void KafkaDocument::slotDomNodeAboutToBeRemoved(DOM::Node _domNode, bool deleteC
hasClosingNode = false;
//_node->removeAll = false;
- if(_node->parent && _node->parent->child == _node)
- _node->parent->child = _node->next;
+ if(_node->tqparent && _node->tqparent->child == _node)
+ _node->tqparent->child = _node->next;
if(_node->next)
_node->next->prev = _node->prev;
if(_node->prev)
@@ -2155,15 +2155,15 @@ void KafkaDocument::slotDomNodeAboutToBeRemoved(DOM::Node _domNode, bool deleteC
}
else if(_node->child)// && !deleteChilds
{
- if(_node->parent && !_node->parent->child)
- _node->parent->child = _node->child;
+ if(_node->tqparent && !_node->tqparent->child)
+ _node->tqparent->child = _node->child;
if(_node->prev)
_node->prev->next = _node->child;
_tmpNode = _node->child;
while(_tmpNode)
{
i++;
- _tmpNode->parent = _node->parent;
+ _tmpNode->tqparent = _node->tqparent;
n = _tmpNode;
_tmpNode = _tmpNode->next;
if(!_tmpNode)
@@ -2181,7 +2181,7 @@ void KafkaDocument::slotDomNodeAboutToBeRemoved(DOM::Node _domNode, bool deleteC
disconnectDomNodeFromQuantaNode(*_node->rootNode());
if(_node->leafNode())
disconnectDomNodeFromQuantaNode(*_node->leafNode());
- _node->parent = 0L;
+ _node->tqparent = 0L;
_nodeNext = _node->next;
_node->next = 0L;
_node->prev = 0L;
@@ -2195,13 +2195,13 @@ void KafkaDocument::slotDomNodeAboutToBeRemoved(DOM::Node _domNode, bool deleteC
if(hasClosingNode)
{
//delete the closing Node if present
- if(_node->parent && _node->parent->child == _node)
- _node->parent->child = _node->next;
+ if(_node->tqparent && _node->tqparent->child == _node)
+ _node->tqparent->child = _node->next;
if(_node->prev)
_node->prev->next = _node->next;
if(_node->next)
_node->next->prev = _node->prev;
- _node->parent = 0L;
+ _node->tqparent = 0L;
_nodeNext = _node->next;
_node->next = 0L;
_node->prev = 0L;
@@ -2221,13 +2221,13 @@ void KafkaDocument::slotDomNodeAboutToBeRemoved(DOM::Node _domNode, bool deleteC
modif = new NodeModif();
modif->setType(NodeModif::NodeRemoved);
modif->setLocation(kafkaCommon::getLocation(_node));
- if(_node->parent && _node->parent->child == _node)
- _node->parent->child = _node->next;
+ if(_node->tqparent && _node->tqparent->child == _node)
+ _node->tqparent->child = _node->next;
if(_node->prev)
_node->prev->next = _node->next;
if(_node->next)
_node->next->prev = _node->prev;
- _node->parent = 0L;
+ _node->tqparent = 0L;
_nodeNext = _node->next;
_node->prev = 0L;
_node->next = 0L;
@@ -2251,13 +2251,13 @@ void KafkaDocument::slotDomNodeAboutToBeRemoved(DOM::Node _domNode, bool deleteC
void KafkaDocument::slotDomNodeIsAboutToBeMoved(DOM::Node domNode, DOM::Node newParent, DOM::Node before, NodeModifsSet* modifs)
{
- Node *node, *parent, *nextSibling, *closingNode;
+ Node *node, *tqparent, *nextSibling, *closingNode;
if(domNode.isNull())
return;
node = getNode(domNode);
- parent = getNode(newParent);
+ tqparent = getNode(newParent);
nextSibling = getNode(before);
if(!node)
@@ -2265,10 +2265,10 @@ void KafkaDocument::slotDomNodeIsAboutToBeMoved(DOM::Node domNode, DOM::Node new
closingNode = node->getClosingNode();
- kafkaCommon::moveNode(node, parent, nextSibling, modifs, false);
+ kafkaCommon::moveNode(node, tqparent, nextSibling, modifs, false);
if(closingNode)
- kafkaCommon::moveNode(closingNode, parent, nextSibling, modifs, false);
+ kafkaCommon::moveNode(closingNode, tqparent, nextSibling, modifs, false);
}
@@ -2328,7 +2328,7 @@ void KafkaDocument::slotCut(Node* startNode, int startOffset, Node* endNode, int
drag_object->addDragObject(node_drag);
drag_object->addDragObject(text_drag);
- TQApplication::clipboard()->setData(drag_object);
+ TQApplication::tqclipboard()->setData(drag_object);
#ifdef LIGHT_DEBUG
kafkaCommon::coutTree(subtree_root, 3);
#endif
@@ -2365,7 +2365,7 @@ void KafkaDocument::slotCopy(Node* startNode, int startOffset, Node* endNode, in
drag_object->addDragObject(node_drag);
drag_object->addDragObject(text_drag);
- TQApplication::clipboard()->setData(drag_object);
+ TQApplication::tqclipboard()->setData(drag_object);
// FIXME delete the subtree
#ifdef LIGHT_DEBUG
kafkaCommon::coutTree(subtree_root, 3);
@@ -2375,7 +2375,7 @@ void KafkaDocument::slotCopy(Node* startNode, int startOffset, Node* endNode, in
void KafkaDocument::slotPaste()
{
- QClipboard *cb = TQApplication::clipboard();
+ TQClipboard *cb = TQApplication::tqclipboard();
TQMimeSource* e = cb->data();
Node* node = new Node(0);
diff --git a/quanta/parts/kafka/wkafkapart.h b/quanta/parts/kafka/wkafkapart.h
index 712dc2e2..3c0ca23c 100644
--- a/quanta/parts/kafka/wkafkapart.h
+++ b/quanta/parts/kafka/wkafkapart.h
@@ -47,15 +47,16 @@ class NodeModifsSet;
* By Kafka Node, i mean DOM::Node (cf <dom/dom_node.h>)
* It is a singleton class.
*/
-class KafkaDocument : public QObject
+class KafkaDocument : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/** Returns a reference to the KafkaDocument object */
- static KafkaDocument* const ref(TQWidget *parent = 0L, TQWidget *widgetParent = 0L, const char *name = 0L)
+ static KafkaDocument* const ref(TQWidget *tqparent = 0L, TQWidget *widgetParent = 0L, const char *name = 0L)
{
static KafkaDocument *m_ref;
- if (!m_ref) m_ref = new KafkaDocument(parent, widgetParent, name);
+ if (!m_ref) m_ref = new KafkaDocument(tqparent, widgetParent, name);
return m_ref;
}
@@ -160,7 +161,7 @@ public:
* and thus make them its childs. Usefull when adding a Node on a selected range of Nodes.
* It also create empty Nodes between Nodes.
* @param domNode The Node returned is synchronized from this DOM::Node.
- * @param nodeParent The parent Node of the Node returned.
+ * @param nodeParent The tqparent Node of the Node returned.
* @param beginNode The new Node will be placed before or within _beginNode.
* @param beginOffset NOT IMLEMENTED If set to 0 or -1, the new Node will be placed before _beginNode,
* else _beginNode will be splitted at offset #beginOffset and the new Node will be placed
@@ -308,12 +309,12 @@ public:
* Insert a DOM::Node in the DOM::Node tree. It takes care to handle the exceptions and
* to postEnhance (cf htmlenhancer.h)
* @param node The node to insert.
- * @param parent The new parent of node. If null, insert node at the top level.
+ * @param tqparent The new tqparent of node. If null, insert node at the top level.
* @param nextSibling The new next sibling of node. If null, append node at the end of the child list.
- * @param rootNode The root DOM::Node of the DOM::Node tree. Useful when no parent is provided.
+ * @param rootNode The root DOM::Node of the DOM::Node tree. Useful when no tqparent is provided.
* @return Returns true if the operation was successfull.
*/
- bool insertDomNode(DOM::Node node, DOM::Node parent = DOM::Node(),
+ bool insertDomNode(DOM::Node node, DOM::Node tqparent = DOM::Node(),
DOM::Node nextSibling = DOM::Node(), DOM::Node rootNode = DOM::Node());
@@ -368,7 +369,7 @@ public:
/**
* Prints in stdout the current Node tree + Node->DOM::Node->Node relationship.
* @node The startNode
- * @indent The number of little dots per parent relationship.
+ * @indent The number of little dots per tqparent relationship.
*/
void coutLinkTree(Node *node, int indent);
@@ -432,7 +433,7 @@ public slots:
/**
* Called whenever a DOM::Node is moved.
* @param domNode The DOM::Node to move.
- * @param newParent The new parent DOM::Node of domNode.
+ * @param newParent The new tqparent DOM::Node of domNode.
* @param before domNode will be inserted before before.
* @param modifs The changes made are logged into modifs.
*/
@@ -459,7 +460,7 @@ private:
/**
* Create a KafkaWidget.
*/
- KafkaDocument(TQWidget *parent, TQWidget *widgetParent, const char *name);
+ KafkaDocument(TQWidget *tqparent, TQWidget *widgetParent, const char *name);
TQMap<TQString, TQString> decodedChars;
TQMap<TQString, TQString> encodedChars;