summaryrefslogtreecommitdiffstats
path: root/quanta/parts/kafka
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:54:04 +0000
commitdc6b8e72fed2586239e3514819238c520636c9d9 (patch)
tree88b200df0a0b7fab9d6f147596173556f1ed9a13 /quanta/parts/kafka
parent6927d4436e54551917f600b706a8d6109e49de1c (diff)
downloadtdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.tar.gz
tdewebdev-dc6b8e72fed2586239e3514819238c520636c9d9.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1157656 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/parts/kafka')
-rw-r--r--quanta/parts/kafka/cursors.h10
-rw-r--r--quanta/parts/kafka/domtreeview.cpp40
-rw-r--r--quanta/parts/kafka/domtreeview.h24
-rw-r--r--quanta/parts/kafka/htmldocumentproperties.cpp82
-rw-r--r--quanta/parts/kafka/htmldocumentproperties.h16
-rw-r--r--quanta/parts/kafka/htmlenhancer.cpp4
-rw-r--r--quanta/parts/kafka/kafkacommon.cpp216
-rw-r--r--quanta/parts/kafka/kafkacommon.h94
-rw-r--r--quanta/parts/kafka/kafkadragobject.cpp34
-rw-r--r--quanta/parts/kafka/kafkadragobject.h14
-rw-r--r--quanta/parts/kafka/kafkahtmlpart.cpp88
-rw-r--r--quanta/parts/kafka/kafkahtmlpart.h22
-rw-r--r--quanta/parts/kafka/kafkasyncoptions.cpp12
-rw-r--r--quanta/parts/kafka/kafkasyncoptions.h2
-rw-r--r--quanta/parts/kafka/undoredo.cpp46
-rw-r--r--quanta/parts/kafka/undoredo.h36
-rw-r--r--quanta/parts/kafka/wkafkapart.cpp178
-rw-r--r--quanta/parts/kafka/wkafkapart.h36
18 files changed, 477 insertions, 477 deletions
diff --git a/quanta/parts/kafka/cursors.h b/quanta/parts/kafka/cursors.h
index 22eea7b1..6ff94439 100644
--- a/quanta/parts/kafka/cursors.h
+++ b/quanta/parts/kafka/cursors.h
@@ -85,13 +85,13 @@ public:
* @return Returns the location of the Node where the selection begin (and where the cursor is if
* m_cursorAtSelectionStart).
*/
- QValueList<int>& cursorNode() {return m_cursorNode;}
+ TQValueList<int>& cursorNode() {return m_cursorNode;}
/**
* @param cursorNode Set the location of the Node where the selection begin (and where the cursor is if
* m_cursorAtSelectionStart)
*/
- void setCursorNode(QValueList<int> cursorNode) {m_cursorNode = cursorNode;}
+ void setCursorNode(TQValueList<int> cursorNode) {m_cursorNode = cursorNode;}
/**
* @return Returns the offset of the cursor where the selection begin (and where the cursor is if
@@ -121,13 +121,13 @@ public:
* selection ends.
* Empty if this instance only carry the cursor coordinates.
*/
- QValueList<int>& cursorNodeEndSel() {return m_cursorNodeEndSel;}
+ TQValueList<int>& cursorNodeEndSel() {return m_cursorNodeEndSel;}
/**
* @param cursorNodeEndSel Set the location of the end selection Node where the
* selection ends.
*/
- void setCursorNodeEndSel(QValueList<int> cursorNodeEndSel)
+ void setCursorNodeEndSel(TQValueList<int> cursorNodeEndSel)
{m_cursorNodeEndSel = cursorNodeEndSel;}
/**
@@ -142,7 +142,7 @@ public:
{m_cursorOffsetEndSel = cursorOffsetEndSel;}
private:
- QValueList<int> m_cursorNode, m_cursorNodeEndSel;
+ TQValueList<int> m_cursorNode, m_cursorNodeEndSel;
int m_cursorOffset, m_cursorOffsetEndSel;
bool m_cursorAtSelectionStart;
};
diff --git a/quanta/parts/kafka/domtreeview.cpp b/quanta/parts/kafka/domtreeview.cpp
index 14fe17d2..5ed55a1b 100644
--- a/quanta/parts/kafka/domtreeview.cpp
+++ b/quanta/parts/kafka/domtreeview.cpp
@@ -21,13 +21,13 @@
#include <kdebug.h>
#include <khtml_part.h>
#include <klocale.h>
-#include <qstring.h>
-#include <qlayout.h>
+#include <tqstring.h>
+#include <tqlayout.h>
#include <dom/dom_text.h>
#include "domtreeview.moc"
-DOMTreeView::DOMTreeView(QWidget *parent, KHTMLPart *currentpart, const char * name) : KListView(parent, name)
+DOMTreeView::DOMTreeView(TQWidget *parent, KHTMLPart *currentpart, const char * name) : KListView(parent, name)
{
setCaption(name);
setRootIsDecorated(true);
@@ -38,11 +38,11 @@ DOMTreeView::DOMTreeView(QWidget *parent, KHTMLPart *currentpart, const char * n
addColumn("");
setSorting(-1);
part = currentpart;
- connect(part, SIGNAL(nodeActivated(const DOM::Node &)), this, SLOT(showTree(const DOM::Node &)));
- connect(this, SIGNAL(clicked(QListViewItem *)), this, SLOT(slotItemClicked(QListViewItem *)));
+ connect(part, TQT_SIGNAL(nodeActivated(const DOM::Node &)), this, TQT_SLOT(showTree(const DOM::Node &)));
+ connect(this, TQT_SIGNAL(clicked(TQListViewItem *)), this, TQT_SLOT(slotItemClicked(TQListViewItem *)));
m_nodedict.setAutoDelete(true);
title = "";
- titleItem = new QListViewItem(static_cast<QListView *>(this), title, "");
+ titleItem = new TQListViewItem(static_cast<TQListView *>(this), title, "");
}
DOMTreeView::~DOMTreeView()
@@ -50,7 +50,7 @@ DOMTreeView::~DOMTreeView()
disconnect(part);
}
-void DOMTreeView::setTitle(const QString &str)
+void DOMTreeView::setTitle(const TQString &str)
{
title = str;
titleItem->setText(1, title);
@@ -78,7 +78,7 @@ void DOMTreeView::showTree(const DOM::Node &pNode)
document = pNode.ownerDocument();
recursive(0, pNode.ownerDocument());
}
- titleItem = new QListViewItem(static_cast<QListView *>(this), title, "");
+ titleItem = new TQListViewItem(static_cast<TQListView *>(this), title, "");
// }
setCurrentItem(m_itemdict[pNode.handle()]);
ensureItemVisible(m_itemdict[pNode.handle()]);
@@ -86,30 +86,30 @@ void DOMTreeView::showTree(const DOM::Node &pNode)
void DOMTreeView::recursive(const DOM::Node &pNode, const DOM::Node &node)
{
- QListViewItem *cur_item;
+ TQListViewItem *cur_item;
int len;
if(pNode.ownerDocument() != document)
{
- QString val = node.nodeValue().string();
+ TQString val = node.nodeValue().string();
if ( val.length() > 20 )
val.truncate( 20 );
- cur_item = new QListViewItem(static_cast<QListView *>(this), node.nodeName().string(), val);
+ cur_item = new TQListViewItem(static_cast<TQListView *>(this), node.nodeName().string(), val);
document = pNode.ownerDocument();
}
else {
- QString val = node.nodeValue().string();
+ TQString val = node.nodeValue().string();
if ( val.length() > 20 )
val.truncate( 20 );
if(node.nodeType() == DOM::Node::TEXT_NODE)
len = (static_cast<DOM::CharacterData>(node)).length();
else
len = 0;
- cur_item = new QListViewItem(m_itemdict[pNode.handle()], node.nodeName().string(), val, QString::number(len), QString::number(node.elementId()) );
+ cur_item = new TQListViewItem(m_itemdict[pNode.handle()], node.nodeName().string(), val, TQString::number(len), TQString::number(node.elementId()) );
unsigned long i;
- QListViewItem *tmp = new QListViewItem(cur_item, "properties");
+ TQListViewItem *tmp = new TQListViewItem(cur_item, "properties");
for(i = 0; i < node.attributes().length(); i++)
{
- new QListViewItem(tmp, node.attributes().item(i).nodeName().string(),
+ new TQListViewItem(tmp, node.attributes().item(i).nodeName().string(),
node.attributes().item(i).nodeValue().string());
}
}
@@ -128,7 +128,7 @@ void DOMTreeView::recursive(const DOM::Node &pNode, const DOM::Node &node)
}
}
-void DOMTreeView::slotItemClicked(QListViewItem *cur_item)
+void DOMTreeView::slotItemClicked(TQListViewItem *cur_item)
{
DOM::Node *handle = m_nodedict[cur_item];
if(handle) {
@@ -137,11 +137,11 @@ void DOMTreeView::slotItemClicked(QListViewItem *cur_item)
}
}
-KafkaDOMTreeDialog::KafkaDOMTreeDialog(QWidget *parent, KHTMLPart *part, const char* name, bool modal, WFlags fl )
- : QDialog(parent, name, modal, fl)
+KafkaDOMTreeDialog::KafkaDOMTreeDialog(TQWidget *parent, KHTMLPart *part, const char* name, bool modal, WFlags fl )
+ : TQDialog(parent, name, modal, fl)
{
- setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, 0, 0, sizePolicy().hasHeightForWidth() ) );
- DialogLayout = new QGridLayout( this, 1, 1, 11, 6, "DialogLayout");
+ setSizePolicy( 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 " ));
DialogLayout->addWidget(domview, 1,1);
diff --git a/quanta/parts/kafka/domtreeview.h b/quanta/parts/kafka/domtreeview.h
index 4e2a560f..60c6fed3 100644
--- a/quanta/parts/kafka/domtreeview.h
+++ b/quanta/parts/kafka/domtreeview.h
@@ -23,10 +23,10 @@
#ifdef HEAVY_DEBUG
#include <klistview.h>
#include <kdebug.h>
-#include <qlistview.h>
-#include <qptrdict.h>
+#include <tqlistview.h>
+#include <tqptrdict.h>
#include <dom/dom_core.h>
-#include <qdialog.h>
+#include <tqdialog.h>
class QString;
class QGridLayout;
@@ -39,9 +39,9 @@ class DOMTreeView : public KListView
{
Q_OBJECT
public:
- DOMTreeView(QWidget *parent, KHTMLPart *part, const char * name = 0);
+ DOMTreeView(TQWidget *parent, KHTMLPart *part, const char * name = 0);
~DOMTreeView();
- void setTitle(const QString &str);
+ void setTitle(const TQString &str);
void recursive(const DOM::Node &pNode, const DOM::Node &node);
signals:
@@ -51,13 +51,13 @@ class DOMTreeView : public KListView
void showTree(const DOM::Node &pNode);
protected slots:
- void slotItemClicked(QListViewItem *);
+ void slotItemClicked(TQListViewItem *);
private:
- QString title;
- QListViewItem *titleItem;
- QPtrDict<QListViewItem> m_itemdict;
- QPtrDict<DOM::Node> m_nodedict;
+ TQString title;
+ TQListViewItem *titleItem;
+ TQPtrDict<TQListViewItem> m_itemdict;
+ TQPtrDict<DOM::Node> m_nodedict;
DOM::Node document;
KHTMLPart *part;
@@ -67,10 +67,10 @@ class KafkaDOMTreeDialog : public QDialog
{
Q_OBJECT
public:
- KafkaDOMTreeDialog(QWidget *parent = 0, KHTMLPart *part = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ KafkaDOMTreeDialog(TQWidget *parent = 0, KHTMLPart *part = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~KafkaDOMTreeDialog();
DOMTreeView *domview;
- QGridLayout *DialogLayout;
+ TQGridLayout *DialogLayout;
};
#endif
diff --git a/quanta/parts/kafka/htmldocumentproperties.cpp b/quanta/parts/kafka/htmldocumentproperties.cpp
index 0099f313..d8fee439 100644
--- a/quanta/parts/kafka/htmldocumentproperties.cpp
+++ b/quanta/parts/kafka/htmldocumentproperties.cpp
@@ -44,14 +44,14 @@
#include "viewmanager.h"
-htmlDocumentProperties::htmlDocumentProperties( QWidget* parent, bool forceInsertionOfBasicNodes, const char* name,
+htmlDocumentProperties::htmlDocumentProperties( TQWidget* parent, bool forceInsertionOfBasicNodes, const char* name,
bool modal, WFlags fl) :
htmlDocumentPropertiesui(parent, name, modal, fl), titleNode( 0L ), htmlNode( 0L ),
headNode( 0L ), linkNode( 0L ), bodyNode( 0L), doctypeNode( 0L ), CSSNode ( 0L ),
xmlNode( 0L ), titleDirty(false), linkDirty(false)
{
Node *node;
- QString text, nodeName;
+ TQString text, nodeName;
bool b;
int index;
KURL url, baseURL;
@@ -69,17 +69,17 @@ htmlDocumentProperties::htmlDocumentProperties( QWidget* parent, bool forceInser
ok->setAutoDefault(true);
//set the taborder and disable focus for some widgets.
- currentDTD->setFocusPolicy(QWidget::NoFocus);
- QWidget::setTabOrder(title, metaItems);
- QWidget::setTabOrder(metaItems, metaItemsAdd);
- QWidget::setTabOrder(metaItemsAdd, metaItemsDelete);
- QWidget::setTabOrder(metaItemsDelete, cssRules);
- QWidget::setTabOrder(cssRules, cssRulesAdd);
- QWidget::setTabOrder(cssRulesAdd, cssRulesEdit);
- QWidget::setTabOrder(cssRulesEdit, cssRulesDelete);
- QWidget::setTabOrder(cssRulesDelete, cssStylesheet);
- QWidget::setTabOrder(cssStylesheet, ok);
- QWidget::setTabOrder(ok, cancel);
+ currentDTD->setFocusPolicy(TQWidget::NoFocus);
+ TQWidget::setTabOrder(title, metaItems);
+ TQWidget::setTabOrder(metaItems, metaItemsAdd);
+ TQWidget::setTabOrder(metaItemsAdd, metaItemsDelete);
+ TQWidget::setTabOrder(metaItemsDelete, cssRules);
+ TQWidget::setTabOrder(cssRules, cssRulesAdd);
+ TQWidget::setTabOrder(cssRulesAdd, cssRulesEdit);
+ TQWidget::setTabOrder(cssRulesEdit, cssRulesDelete);
+ TQWidget::setTabOrder(cssRulesDelete, cssStylesheet);
+ TQWidget::setTabOrder(cssStylesheet, ok);
+ TQWidget::setTabOrder(ok, cancel);
//set the current DTD name
currentDTD->setText(ViewManager::ref()->activeDocument()->defaultDTD()->nickName);
@@ -87,7 +87,7 @@ htmlDocumentProperties::htmlDocumentProperties( QWidget* parent, bool forceInser
//set the metaItems DualEditableTree
metaItems->addColumn(i18n("Name"));
metaItems->addColumn(i18n("Content"));
- metaItems->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ metaItems->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
metaItems->setLineWidth( 2 );
metaItems->setSorting(0, true);
@@ -96,9 +96,9 @@ htmlDocumentProperties::htmlDocumentProperties( QWidget* parent, bool forceInser
//cssRules->setEditable(false);
cssRules->addColumn(i18n("Selector"));
cssRules->addColumn(i18n("Rule"));
- cssRules->setFrameStyle( QFrame::Panel | QFrame::Sunken );
+ cssRules->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
cssRules->setLineWidth( 2 );
- //cssRules->setFocusPolicy(QWidget::ClickFocus);
+ //cssRules->setFocusPolicy(TQWidget::ClickFocus);
cssRules->setSorting(-1);
//search for the head, html, title Node
@@ -230,20 +230,20 @@ htmlDocumentProperties::htmlDocumentProperties( QWidget* parent, bool forceInser
cancel->setIconSet(SmallIconSet("button_cancel"));
//connect buttons
- connect(ok, SIGNAL(clicked()), this, SLOT(accept()));
- connect(cancel, SIGNAL(clicked()), this, SLOT(reject()));
- connect(cssRulesAdd, SIGNAL(clicked()), this, SLOT(newCSSRule()));
- connect(cssRulesEdit, SIGNAL(clicked()), this, SLOT(editCSSRule()));
- connect (cssRulesDelete, SIGNAL(clicked()), this, SLOT(deleteCurrentCSSRule()));
- connect(metaItemsAdd, SIGNAL(clicked()), this, SLOT(newMetaItem()));
- connect(metaItemsDelete, SIGNAL(clicked()), this, SLOT(deleteCurrentMetaItem()));
- connect(title, SIGNAL(textChanged(const QString &)), this, SLOT(titleChanged(const QString &)));
- connect(metaItems, SIGNAL(itemModified( QListViewItem * )),
- this, SLOT(metaChanged(QListViewItem * )));
- connect(cssRules, SIGNAL(itemModified( QListViewItem * )),
- this, SLOT(CSSChanged(QListViewItem * )));
- connect(cssStylesheet, SIGNAL(textChanged(const QString &)),
- this, SLOT(linkChanged( const QString& )));
+ connect(ok, TQT_SIGNAL(clicked()), this, TQT_SLOT(accept()));
+ connect(cancel, TQT_SIGNAL(clicked()), this, TQT_SLOT(reject()));
+ connect(cssRulesAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(newCSSRule()));
+ connect(cssRulesEdit, TQT_SIGNAL(clicked()), this, TQT_SLOT(editCSSRule()));
+ connect (cssRulesDelete, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteCurrentCSSRule()));
+ connect(metaItemsAdd, TQT_SIGNAL(clicked()), this, TQT_SLOT(newMetaItem()));
+ connect(metaItemsDelete, TQT_SIGNAL(clicked()), this, TQT_SLOT(deleteCurrentMetaItem()));
+ connect(title, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(titleChanged(const TQString &)));
+ connect(metaItems, TQT_SIGNAL(itemModified( TQListViewItem * )),
+ this, TQT_SLOT(metaChanged(TQListViewItem * )));
+ connect(cssRules, TQT_SIGNAL(itemModified( TQListViewItem * )),
+ this, TQT_SLOT(CSSChanged(TQListViewItem * )));
+ connect(cssStylesheet, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(linkChanged( const TQString& )));
}
htmlDocumentProperties::~htmlDocumentProperties()
@@ -254,7 +254,7 @@ htmlDocumentProperties::~htmlDocumentProperties()
void htmlDocumentProperties::loadMetaNode(Node *node)
{
int index;
- QString name, content;
+ TQString name, content;
NodeLinkedViewItem *item;
index = node->tag->attributeIndex("name");
@@ -276,7 +276,7 @@ void htmlDocumentProperties::loadMetaNode(Node *node)
void htmlDocumentProperties::loadCSS(Node *node)
{
NodeLinkedViewItem *item;
- QString selector;
+ TQString selector;
CSSNode = node;
node = node->child;
@@ -314,7 +314,7 @@ void htmlDocumentProperties::deleteCurrentMetaItem()
{
if(metaItems->currentItem())
{
- QListViewItem *item = metaItems->currentItem();
+ TQListViewItem *item = metaItems->currentItem();
(static_cast<NodeLinkedViewItem *>(item))->deleted = true;
(static_cast<NodeLinkedViewItem *>(item))->dirty = true;
(static_cast<AttributeItem *>(item))->hideEditor(0);
@@ -344,7 +344,7 @@ void htmlDocumentProperties::deleteCurrentCSSRule()
{
if(cssRules->currentItem())
{
- QListViewItem *item = cssRules->currentItem();
+ TQListViewItem *item = cssRules->currentItem();
(static_cast<NodeLinkedViewItem *>(item))->deleted = true;
(static_cast<NodeLinkedViewItem *>(item))->dirty = true;
(static_cast<AttributeItem *>(item))->hideEditor(0);
@@ -354,24 +354,24 @@ void htmlDocumentProperties::deleteCurrentCSSRule()
}
-void htmlDocumentProperties::titleChanged(const QString &)
+void htmlDocumentProperties::titleChanged(const TQString &)
{
titleDirty = true;
}
-void htmlDocumentProperties::metaChanged(QListViewItem * item)
+void htmlDocumentProperties::metaChanged(TQListViewItem * item)
{
if(item)
(static_cast<NodeLinkedViewItem *>(item))->dirty = true;
}
-void htmlDocumentProperties::CSSChanged(QListViewItem * item)
+void htmlDocumentProperties::CSSChanged(TQListViewItem * item)
{
if(item)
(static_cast<NodeLinkedViewItem *>(item))->dirty = true;
}
-void htmlDocumentProperties::linkChanged( const QString& )
+void htmlDocumentProperties::linkChanged( const TQString& )
{
linkDirty = true;
}
@@ -384,7 +384,7 @@ void htmlDocumentProperties::accept()
TagAttr attr;
NodeModifsSet *modifs = new NodeModifsSet();
KURL url, baseURL;
- QString finalURL;
+ TQString finalURL;
NodeSelection *cursorPos;
bool goUp;
//TODO:see for !doctype
@@ -595,7 +595,7 @@ void htmlDocumentProperties::addBasicNodes(NodeModifsSet *modifs)
Node *n, *nextNode;
bool htmlNodeCreated = false, bodyNodeCreated = false;
QTag *qHead, *qBody;
- QString tagName;
+ TQString tagName;
if(headNode)
return;
@@ -732,7 +732,7 @@ void htmlDocumentProperties::addBasicNodes(NodeModifsSet *modifs)
}
}
-NodeLinkedViewItem::NodeLinkedViewItem(EditableTree *listView, const QString& title, const QString& title2)
+NodeLinkedViewItem::NodeLinkedViewItem(EditableTree *listView, const TQString& title, const TQString& title2)
: AttributeItem(listView, title, title2, 0L)
{
node = 0L;
diff --git a/quanta/parts/kafka/htmldocumentproperties.h b/quanta/parts/kafka/htmldocumentproperties.h
index 62a64659..3bcfdcb1 100644
--- a/quanta/parts/kafka/htmldocumentproperties.h
+++ b/quanta/parts/kafka/htmldocumentproperties.h
@@ -23,7 +23,7 @@ class NodeModifsSet;
class AttributeItem;
class EditableTree;
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "tagattributeitems.h"
#include "htmldocumentpropertiesui.h"
@@ -31,7 +31,7 @@ class EditableTree;
class NodeLinkedViewItem : public AttributeItem
{
public:
- NodeLinkedViewItem(EditableTree *listView, const QString& title, const QString& title2);
+ NodeLinkedViewItem(EditableTree *listView, const TQString& title, const TQString& title2);
virtual ~NodeLinkedViewItem();
Node *node;
@@ -50,7 +50,7 @@ public:
* @param forceInsertionOfBasicNodes Force the insertion of the basic Nodes (HTML, BODY, HEAD, ...) if pressing OK
* without having made any changes.
*/
- htmlDocumentProperties( QWidget* parent = 0, bool forceInsertionOfBasicNodes = false,
+ htmlDocumentProperties( TQWidget* parent = 0, bool forceInsertionOfBasicNodes = false,
const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~htmlDocumentProperties();
@@ -66,10 +66,10 @@ private slots:
virtual void editCSSRule();
virtual void deleteCurrentCSSRule();
- virtual void titleChanged(const QString &);
- virtual void metaChanged(QListViewItem * );
- virtual void CSSChanged(QListViewItem * );
- virtual void linkChanged( const QString& );
+ virtual void titleChanged(const TQString &);
+ virtual void metaChanged(TQListViewItem * );
+ virtual void CSSChanged(TQListViewItem * );
+ virtual void linkChanged( const TQString& );
private:
/**
@@ -83,7 +83,7 @@ private:
void loadMetaNode(Node *node);
void loadCSS(Node *node);
- QPtrList<NodeLinkedViewItem> CSSList, metaList;
+ TQPtrList<NodeLinkedViewItem> CSSList, metaList;
Node *titleNode, *htmlNode, *headNode, *linkNode, *bodyNode, *doctypeNode, *CSSNode, *xmlNode;
bool titleDirty, linkDirty, m_forceInsertionOfBasicNodes;
};
diff --git a/quanta/parts/kafka/htmlenhancer.cpp b/quanta/parts/kafka/htmlenhancer.cpp
index 257ad239..d900d77d 100644
--- a/quanta/parts/kafka/htmlenhancer.cpp
+++ b/quanta/parts/kafka/htmlenhancer.cpp
@@ -52,7 +52,7 @@ bool HTMLEnhancer::enhanceNode(Node *node, DOM::Node parentDNode, DOM::Node next
DOM::Node domNode, domNode2, attr, *ptDomNode;
bool tbody, goUp;
Node *n;
- QString script, filename, text, oldName;
+ TQString script, filename, text, oldName;
KURL url, baseURL;
int oldType;
@@ -236,7 +236,7 @@ bool HTMLEnhancer::enhanceNode(Node *node, DOM::Node parentDNode, DOM::Node next
if(node->rootNode() && node->rootNode()->nodeName().string().lower() == "input")
{
domNode = *(node->rootNode());
- QString text = node->tag->attributeValue("name");
+ TQString text = node->tag->attributeValue("name");
kafkaCommon::editDomNodeAttribute(domNode, "input", m_wkafkapart->defaultDTD(),
"title", text, m_wkafkapart->getKafkaWidget()->document());
}
diff --git a/quanta/parts/kafka/kafkacommon.cpp b/quanta/parts/kafka/kafkacommon.cpp
index fe147bc7..0220646d 100644
--- a/quanta/parts/kafka/kafkacommon.cpp
+++ b/quanta/parts/kafka/kafkacommon.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-#include <qptrdict.h>
+#include <tqptrdict.h>
#include <kdebug.h>
#include <dom/dom_exception.h>
@@ -136,17 +136,17 @@ Node* kafkaCommon::getPrevNodeNE(Node *node, Node *endNode)
}
Node* kafkaCommon::DTDGetCommonParent(Node* startNode, Node* endNode,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation, Node* nodeSubtree)
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation, Node* nodeSubtree)
{
// look for commonParent
Node* commonParent = 0;
Node* commonParentStartChild = 0, *commonParentEndChild = 0;
int locOffset = 1;
- QValueList<int> startNodeLocation = getLocation(startNode);
- QValueList<int> endNodeLocation = getLocation(endNode);
- QValueList<int>::iterator itStart = startNodeLocation.begin();
- QValueList<int>::iterator itEnd = endNodeLocation.begin();
+ TQValueList<int> startNodeLocation = getLocation(startNode);
+ TQValueList<int> endNodeLocation = getLocation(endNode);
+ TQValueList<int>::iterator itStart = startNodeLocation.begin();
+ TQValueList<int>::iterator itEnd = endNodeLocation.begin();
while(itStart != startNodeLocation.end() && itEnd != endNodeLocation.end() &&
(*itStart) == (*itEnd))
{
@@ -186,17 +186,17 @@ Node* kafkaCommon::DTDGetCommonParent(Node* startNode, Node* endNode,
}
Node* kafkaCommon::DTDGetNonInlineCommonParent(Node* startNode, Node* endNode,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation, Node* nodeSubtree)
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation, Node* nodeSubtree)
{
// look for commonParent
Node* commonParent = 0;
Node* commonParentStartChild = 0, *commonParentEndChild = 0;
int locOffset = 1;
- QValueList<int> startNodeLocation = getLocation(startNode);
- QValueList<int> endNodeLocation = getLocation(endNode);
- QValueList<int>::iterator itStart = startNodeLocation.begin();
- QValueList<int>::iterator itEnd = endNodeLocation.begin();
+ TQValueList<int> startNodeLocation = getLocation(startNode);
+ TQValueList<int> endNodeLocation = getLocation(endNode);
+ TQValueList<int>::iterator itStart = startNodeLocation.begin();
+ TQValueList<int>::iterator itEnd = endNodeLocation.begin();
while(itStart != startNodeLocation.end() && itEnd != endNodeLocation.end() &&
(*itStart) == (*itEnd))
{
@@ -368,7 +368,7 @@ void kafkaCommon::applyIndentation(Node *node, int nbOfSpaces, int nbOfTabs, Nod
Node *parent, *nextNE, *prevNE, *realPrevNE, *realNextNE, *realPrev, *realNext, *prev, *next;
int nonInlineDepth = 0, nonInlineDepth2 = 0, i;
bool b = false;
- QString indentation1, indentation2, text;
+ TQString indentation1, indentation2, text;
if(!node)
return;
@@ -431,13 +431,13 @@ void kafkaCommon::applyIndentation(Node *node, int nbOfSpaces, int nbOfTabs, Nod
if(nbOfSpaces == 0) // tabs are used
{
- indentation1 += QString().fill('\t', nbOfTabs * nonInlineDepth);
- indentation2 += QString().fill('\t', nbOfTabs * nonInlineDepth2);
+ indentation1 += TQString().fill('\t', nbOfTabs * nonInlineDepth);
+ indentation2 += TQString().fill('\t', nbOfTabs * nonInlineDepth2);
}
else // spaces are used
{
- indentation1 += QString().fill(' ', nbOfSpaces * nonInlineDepth);
- indentation2 += QString().fill(' ', nbOfSpaces * nonInlineDepth2);
+ indentation1 += TQString().fill(' ', nbOfSpaces * nonInlineDepth);
+ indentation2 += TQString().fill(' ', nbOfSpaces * nonInlineDepth2);
}
//test and add indentations if necessary
@@ -759,7 +759,7 @@ void kafkaCommon::fitsNodesPosition(Node* startNode, int colMovement, int lineMo
int kafkaCommon::getNodeDisplay(Node *node, bool closingNodeToo)
{
- QString nodeName;
+ TQString nodeName;
if(!node)
return kafkaCommon::errorDisplay;
@@ -822,10 +822,10 @@ int kafkaCommon::getNodeDisplay(Node *node, bool closingNodeToo)
return kafkaCommon::errorDisplay;
}
-QString kafkaCommon::removeUnnecessaryWhitespaces(const QString &string,
+TQString kafkaCommon::removeUnnecessaryWhitespaces(const TQString &string,
bool removeAllSpacesAtTheLeft, bool removeAllSpacesAtTheRight)
{
- /**QString newString;
+ /**TQString newString;
int i;
if(string.length() == 0)
@@ -845,11 +845,11 @@ QString kafkaCommon::removeUnnecessaryWhitespaces(const QString &string,
newString = newString.mid(0, newString.length() - 1);
return newString;*/
- QString newString;
+ TQString newString;
bool hasLeftWhiteSpaces, hasRightWhiteSpaces;
if(string.length() == 0)
- return QString();
+ return TQString();
hasLeftWhiteSpaces = (string[0].isSpace());
hasRightWhiteSpaces = (string[string.length() - 1].isSpace());
@@ -863,7 +863,7 @@ QString kafkaCommon::removeUnnecessaryWhitespaces(const QString &string,
return newString;
}
-Node* kafkaCommon::createNode(const QString &nodeName, const QString &tagString, int nodeType, Document *doc)
+Node* kafkaCommon::createNode(const TQString &nodeName, const TQString &tagString, int nodeType, Document *doc)
{
Node *node;
@@ -922,10 +922,10 @@ Node *kafkaCommon::createDoctypeNode(Document *doc)
return node;
}
-Node *kafkaCommon::createXmlDeclarationNode(Document *doc, const QString &encoding)
+Node *kafkaCommon::createXmlDeclarationNode(Document *doc, const TQString &encoding)
{
Node *node, *child, *closingNode;
- QString text;
+ TQString text;
if(!doc)
return 0L;
@@ -951,7 +951,7 @@ Node* kafkaCommon::createMandatoryNodeSubtree(Node *node, Document *doc)
QTag *nodeQTag, *oldNodeQTag;
bool searchForMandatoryNode;
Node *currentParent;
- QMap<QString, bool>::iterator it;
+ TQMap<TQString, bool>::iterator it;
if(!node)
return 0L;
@@ -1353,8 +1353,8 @@ Node* kafkaCommon::DTDInsertNodeSubtree(Node *newNode, NodeSelectionInd& selecti
}
// look for commonParent
- QValueList<int> commonParentStartChildLocation;
- QValueList<int> commonParentEndChildLocation;
+ TQValueList<int> commonParentStartChildLocation;
+ TQValueList<int> commonParentEndChildLocation;
Node* commonParent = DTDGetNonInlineCommonParent(startNode, startNode,
commonParentStartChildLocation, commonParentEndChildLocation, 0);
@@ -1501,8 +1501,8 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset,
kdDebug(25001)<< "kafkaCommon::DTDinsertNode()" << endl;
#endif
- QValueList<int> startNodeLocation, endNodeLocation;
- QValueList<int>::iterator itStart, itEnd;
+ TQValueList<int> startNodeLocation, endNodeLocation;
+ TQValueList<int>::iterator itStart, itEnd;
Node *commonParent = 0L, *commonParentStartChild, *commonParentEndChild, *parentNode, *node;
Node *lastValidStartParent = 0L, *lastValidEndParent = 0L, *newParentNode, *child, *next;
Node *oldCommonParent, *lastNewNode, *oldParentNode;
@@ -1797,7 +1797,7 @@ bool kafkaCommon::DTDinsertRemoveNode(Node *newNode, Node *startNode, int startO
//what should we do?
}
-Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &tagString,
+Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString &tagString,
int nodeType, Document *doc, Node* parent, Node* nextSibling, NodeModifsSet *modifs,
bool merge)
{
@@ -1817,7 +1817,7 @@ Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &t
return node;
}
-Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &tagString,
+Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString &tagString,
int nodeType, Document *doc, Node *parent, Node *nextSibling, Node *nextEndSibling,
NodeModifsSet *modifs)
{
@@ -1837,7 +1837,7 @@ Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &t
return node;
}
-Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &tagString,
+Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString &tagString,
int nodeType, Document *doc, Node *parent, Node *startNodeToSurround,
Node *endNodeToSurround, int startOffset, int endOffset, NodeModifsSet *modifs)
{
@@ -1862,7 +1862,7 @@ Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &t
}
-bool kafkaCommon::DTDcreateAndInsertNode(const QString &nodeName, const QString &tagString,
+bool kafkaCommon::DTDcreateAndInsertNode(const TQString &nodeName, const TQString &tagString,
int nodeType, Document *doc, Node *startNode, int startOffset, Node *endNode, int endOffset,
Node **cursorNode, long &cursorOffset, NodeModifsSet *modifs)
{
@@ -2160,7 +2160,7 @@ Node* kafkaCommon::getLastChild(Node* node)
Node *kafkaCommon::duplicateNodeSubtree(Node *node, bool childAndClosingTagOnly)
{
- QPtrList<NodeLink> nodeLinkList;
+ TQPtrList<NodeLink> nodeLinkList;
bool goUp = false;
Node *currentNode, *currentNewNode, *newRootNode = 0, *newNext, *newParent, *newPrev;
NodeLink *link;
@@ -2221,9 +2221,9 @@ Node* kafkaCommon::extractNode(Node *node, NodeModifsSet *modifs, bool extractCh
//Node *prev;
bool isSingle;
int type;
- QString namespaceName, nodeName, caseSensitive;
- QString closingNamespaceName, closingNodeName, closingCaseSensitive;
- QValueList<int> location;
+ TQString namespaceName, nodeName, caseSensitive;
+ TQString closingNamespaceName, closingNodeName, closingCaseSensitive;
+ TQValueList<int> location;
if(!node)
return 0L;
@@ -2363,8 +2363,8 @@ Node* kafkaCommon::DTDExtractNodeSubtree(Node *startNode, int startOffset, Node
if(!startNode || !endNode)
return 0;
- QValueList<int> commonParentStartChildLocation;
- QValueList<int> commonParentEndChildLocation;
+ TQValueList<int> commonParentStartChildLocation;
+ TQValueList<int> commonParentEndChildLocation;
Node* commonParent = 0;
@@ -2423,8 +2423,8 @@ Node* kafkaCommon::DTDExtractNodeSubtree(Node *startNode, int startOffset, Node
if(!startNode || !endNode)
return 0;
- QValueList<int> commonParentStartChildLocation;
- QValueList<int> commonParentEndChildLocation;
+ TQValueList<int> commonParentStartChildLocation;
+ TQValueList<int> commonParentEndChildLocation;
Node* commonParent = 0;
if(extractInlineParentNodes)
@@ -2519,8 +2519,8 @@ Node* kafkaCommon::getNodeSubtree(Node *startNode, int startOffset, Node *endNod
if(!startNode || !endNode)
return 0;
- QValueList<int> commonParentStartChildLocation;
- QValueList<int> commonParentEndChildLocation;
+ TQValueList<int> commonParentStartChildLocation;
+ TQValueList<int> commonParentEndChildLocation;
Node* commonParent = 0;
if(extractInlineParentNodes)
@@ -2536,20 +2536,20 @@ Node* kafkaCommon::getNodeSubtree(Node *startNode, int startOffset, Node *endNod
Node* newCommonParent = duplicateNodeSubtree(commonParent, true);
- QValueList<int> const startNodeLocation = getLocation(startNode);
- QValueList<int> const commonParentLocation = getLocation(commonParent);
+ TQValueList<int> const startNodeLocation = getLocation(startNode);
+ TQValueList<int> const commonParentLocation = getLocation(commonParent);
uint const commonParentDepth = commonParentLocation.size();
uint const newStartNodeDepth = startNodeLocation.size() - commonParentDepth + 1;
uint const newEndNodeDepth = startNodeLocation.size() - commonParentDepth + 1;
- QValueList<int> newStartNodeLocation, newEndNodeLocation;
+ TQValueList<int> newStartNodeLocation, newEndNodeLocation;
newStartNodeLocation.push_back(1);
newEndNodeLocation.push_back(1);
for(uint i = 1; i != newStartNodeDepth; ++i)
newStartNodeLocation.push_back(startNodeLocation[i + commonParentDepth - 1]);
- QValueList<int> const endNodeLocation = getLocation(endNode);
+ TQValueList<int> const endNodeLocation = getLocation(endNode);
for(uint i = 1; i != newEndNodeDepth; ++i)
newEndNodeLocation.push_back(endNodeLocation[i + commonParentDepth - 1]);
@@ -2577,7 +2577,7 @@ void kafkaCommon::extractAndDeleteNode(Node *node, NodeModifsSet *modifs, bool d
{
NodeModif modif;
Node *curNode, *nodePrev, *nodeNext, *nodeNext2, *n, *n2;
- QString nodeName, closingNodeName, namespaceName, namespaceName2;
+ TQString nodeName, closingNodeName, namespaceName, namespaceName2;
bool isSingle, caseSensitive, caseSensitive2;
if(!node)
@@ -2639,7 +2639,7 @@ void kafkaCommon::extractAndDeleteNode(Node *node, NodeModifsSet *modifs, bool d
}
}
-int kafkaCommon::DTDExtractNode(const QString &nodeName, Document *doc, Node *startNode,
+int kafkaCommon::DTDExtractNode(const TQString &nodeName, Document *doc, Node *startNode,
int startOffset, Node *endNode, int endOffset, Node **cursorNode, long &cursorOffset,
NodeModifsSet *modifs)
{
@@ -2904,7 +2904,7 @@ bool kafkaCommon::splitNode(Node *n, int offset, NodeModifsSet *modifs)
{
NodeModif *modif;
Tag *tag;
- QString tagStr;
+ TQString tagStr;
Node *node;
if(!n || (n->tag->type != Tag::Text && n->tag->type != Tag::Empty) || offset <= 0 || offset >=
@@ -2939,7 +2939,7 @@ bool kafkaCommon::splitNode(Node *n, int offset, NodeModifsSet *modifs)
}
void kafkaCommon::splitStartNodeSubtree(Node* startNode, Node* commonParent,
- QValueList<int>& commonParentStartChildLocation, NodeModifsSet* modifs)
+ TQValueList<int>& commonParentStartChildLocation, NodeModifsSet* 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.
@@ -2970,8 +2970,8 @@ void kafkaCommon::splitStartNodeSubtree(Node* startNode, Node* commonParent,
}
void kafkaCommon::splitEndNodeSubtree(Node* endNode, Node* commonParent,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation,
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation,
bool subTree, NodeModifsSet* modifs)
{
Node* node = endNode;
@@ -3016,8 +3016,8 @@ void kafkaCommon::splitEndNodeSubtree(Node* endNode, Node* commonParent,
}
void kafkaCommon::splitStartAndEndNodeSubtree(Node*& startNode, int startOffset, Node*& endNode, int endOffset, Node*& commonParent,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation,
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation,
NodeSelection& cursorHolder,
Node* subTree, NodeModifsSet* modifs, bool extractInlineParentNodes)
{
@@ -3109,8 +3109,8 @@ bool kafkaCommon::mergeNodes(Node *n, Node *n2, NodeModifsSet *modifs, bool merg
}
// have in consideration two spaces in a row
- QString nStr(n->tag->tagStr());
- QString n2Str(n2->tag->tagStr());
+ TQString nStr(n->tag->tagStr());
+ TQString n2Str(n2->tag->tagStr());
if(nStr[nStr.length() - 1] == ' ' && n2Str[0] == ' ')
{
nStr = nStr.left(nStr.length() - 1);
@@ -3165,8 +3165,8 @@ bool kafkaCommon::mergeNodes(Node *n, Node *n2, NodeSelection& cursorHolder, Nod
}
// have in consideration two spaces in a row
- QString nStr(n->tag->tagStr());
- QString n2Str(n2->tag->tagStr());
+ TQString nStr(n->tag->tagStr());
+ TQString n2Str(n2->tag->tagStr());
if(nStr[nStr.length() - 1] == ' ' && n2Str[0] == ' ')
{
nStr = nStr.left(nStr.length() - 1);
@@ -3293,7 +3293,7 @@ void kafkaCommon::mergeInlineNode(Node *startNode, Node *endNode, Node **cursorN
}
}
-void kafkaCommon::getEndPosition(const QString &tagString, int bLine, int bCol, int &eLine, int &eCol)
+void kafkaCommon::getEndPosition(const TQString &tagString, int bLine, int bCol, int &eLine, int &eCol)
{
/**int result, oldResult;
@@ -3342,7 +3342,7 @@ void kafkaCommon::getEndPosition(Node *node, int bLine, int bCol, int &eLine, in
getEndPosition(node->tag->tagStr(), bLine, bCol, eLine, eCol);
}
-void kafkaCommon::setTagString(Node *node, const QString &newTagString, NodeModifsSet* modifs)
+void kafkaCommon::setTagString(Node *node, const TQString &newTagString, NodeModifsSet* modifs)
{
int eLine, eCol, bLine, bCol;
Tag *tag;
@@ -3368,7 +3368,7 @@ void kafkaCommon::setTagString(Node *node, const QString &newTagString, NodeModi
node->tag->setTagPosition(bLine, bCol, eLine, eCol);
}
-void kafkaCommon::setTagStringAndFitsNodes(Node *node, const QString &newTagString, NodeModifsSet* modifs)
+void kafkaCommon::setTagStringAndFitsNodes(Node *node, const TQString &newTagString, NodeModifsSet* modifs)
{
int eLine, eCol, oldELine, oldECol;
bool b = false;
@@ -3383,7 +3383,7 @@ void kafkaCommon::setTagStringAndFitsNodes(Node *node, const QString &newTagStri
fitsNodesPosition(getNextNode(node, b), eCol - oldECol, eLine - oldELine);
}
-void kafkaCommon::editNodeAttribute(Node* node, const QString& name, const QString& value, NodeModifsSet* modifs)
+void kafkaCommon::editNodeAttribute(Node* node, const TQString& name, const TQString& value, NodeModifsSet* modifs)
{
NodeModif *modif = 0;
@@ -3406,9 +3406,9 @@ void kafkaCommon::editNodeAttribute(Node* node, const QString& name, const QStri
}
}
-QValueList<int> kafkaCommon::getLocation(Node * node)
+TQValueList<int> kafkaCommon::getLocation(Node * node)
{
- QValueList<int> loc;
+ TQValueList<int> loc;
int i = 0;
while(node)
@@ -3425,9 +3425,9 @@ QValueList<int> kafkaCommon::getLocation(Node * node)
return loc;
}
-QValueList<int> kafkaCommon::getLocation(DOM::Node domNode)
+TQValueList<int> kafkaCommon::getLocation(DOM::Node domNode)
{
- QValueList<int> loc;
+ TQValueList<int> loc;
int i = 0;
while(!domNode.isNull())
@@ -3444,9 +3444,9 @@ QValueList<int> kafkaCommon::getLocation(DOM::Node domNode)
return loc;
}
-Node* kafkaCommon::getNodeFromLocation(QValueList<int> loc)
+Node* kafkaCommon::getNodeFromLocation(TQValueList<int> loc)
{
- QValueList<int>::iterator it;
+ TQValueList<int>::iterator it;
Node *node = baseNode;
Node *m = 0L;
int i;
@@ -3469,9 +3469,9 @@ Node* kafkaCommon::getNodeFromLocation(QValueList<int> loc)
return m;
}
-Node* kafkaCommon::getNodeFromLocation(QValueList<int> loc, Node* nodeTree)
+Node* kafkaCommon::getNodeFromLocation(TQValueList<int> loc, Node* nodeTree)
{
- QValueList<int>::iterator it;
+ TQValueList<int>::iterator it;
Node *node = nodeTree;
if(!node)
node = baseNode;
@@ -3496,9 +3496,9 @@ Node* kafkaCommon::getNodeFromLocation(QValueList<int> loc, Node* nodeTree)
return m;
}
-DOM::Node kafkaCommon::getNodeFromLocation(QValueList<int> loc, DOM::Node rootNode)
+DOM::Node kafkaCommon::getNodeFromLocation(TQValueList<int> loc, DOM::Node rootNode)
{
- QValueList<int>::iterator it;
+ TQValueList<int>::iterator it;
DOM::Node node = rootNode;
DOM::Node m = rootNode;
int i;
@@ -3522,10 +3522,10 @@ DOM::Node kafkaCommon::getNodeFromLocation(QValueList<int> loc, DOM::Node rootNo
return m;
}
-Node* kafkaCommon::getNodeFromSubLocation(QValueList<int> loc, int locOffset)
+Node* kafkaCommon::getNodeFromSubLocation(TQValueList<int> loc, int locOffset)
{
- QValueList<int>::iterator it = loc.begin();
- QValueList<int> list;
+ TQValueList<int>::iterator it = loc.begin();
+ TQValueList<int> list;
int i;
for(i = 0; i < locOffset; ++i)
@@ -3537,10 +3537,10 @@ Node* kafkaCommon::getNodeFromSubLocation(QValueList<int> loc, int locOffset)
return getNodeFromLocation(list);
}
-Node* kafkaCommon::getNodeFromSubLocation(QValueList<int> loc, int locOffset, Node* nodeTree)
+Node* kafkaCommon::getNodeFromSubLocation(TQValueList<int> loc, int locOffset, Node* nodeTree)
{
- QValueList<int>::iterator it = loc.begin();
- QValueList<int> list;
+ TQValueList<int>::iterator it = loc.begin();
+ TQValueList<int> list;
int i;
for(i = 0; i != locOffset; ++i)
@@ -3552,9 +3552,9 @@ Node* kafkaCommon::getNodeFromSubLocation(QValueList<int> loc, int locOffset, No
return getNodeFromLocation(list, nodeTree);
}
-int kafkaCommon::compareNodePosition(QValueList<int> pos1, QValueList<int> pos2)
+int kafkaCommon::compareNodePosition(TQValueList<int> pos1, TQValueList<int> pos2)
{
- QValueList<int>::iterator it1, it2;
+ TQValueList<int>::iterator it1, it2;
it1 = pos1.begin();
it2 = pos2.begin();
@@ -3578,7 +3578,7 @@ int kafkaCommon::compareNodePosition(QValueList<int> pos1, QValueList<int> pos2)
int kafkaCommon::compareNodePosition(Node *n1, Node *n2)
{
- QValueList<int> pos1, pos2;
+ TQValueList<int> pos1, pos2;
if(!n1 || !n2)
return kafkaCommon::positionError;
@@ -3644,7 +3644,7 @@ int kafkaCommon::nodeDepth(Node *node)
return depth;
}
-Node* kafkaCommon::hasParent(Node *node, const QString &name)
+Node* kafkaCommon::hasParent(Node *node, const TQString &name)
{
node = node->parent;
while(node)
@@ -3657,15 +3657,15 @@ Node* kafkaCommon::hasParent(Node *node, const QString &name)
return 0L;
}
-Node* kafkaCommon::hasParent(Node* startNode, Node* endNode, const QString &name)
+Node* kafkaCommon::hasParent(Node* startNode, Node* endNode, const TQString &name)
{
Q_ASSERT(startNode && endNode);
//Andras: don't crash
if (!startNode || !endNode)
return 0;
- QValueList<int> commonParentStartChildLocation;
- QValueList<int> commonParentEndChildLocation;
+ TQValueList<int> commonParentStartChildLocation;
+ TQValueList<int> commonParentEndChildLocation;
Node* node = DTDGetCommonParent(startNode, endNode, commonParentStartChildLocation, commonParentEndChildLocation, 0);
@@ -3726,7 +3726,7 @@ bool kafkaCommon::removeDomNode(DOM::Node node)
return true;
}
-DOM::Node kafkaCommon::createDomNode(const QString &nodeName, const DTDStruct* dtd,
+DOM::Node kafkaCommon::createDomNode(const TQString &nodeName, const DTDStruct* dtd,
DOM::Document rootNode)
{
// FIXME
@@ -3757,13 +3757,13 @@ DOM::Node kafkaCommon::createDomNode(Node *node, DOM::Document rootNode)
return createDomNode(node->tag->name, node->tag->dtd(), rootNode);
}
-DOM::Node kafkaCommon::createTextDomNode(const QString &textString, DOM::Document rootNode)
+DOM::Node kafkaCommon::createTextDomNode(const TQString &textString, DOM::Document rootNode)
{
return rootNode.createTextNode(textString);
}
-DOM::Node kafkaCommon::createDomNodeAttribute(const QString &nodeName, const DTDStruct* dtd,
- const QString &attrName, const QString &attrValue, DOM::Document rootNode)
+DOM::Node kafkaCommon::createDomNodeAttribute(const TQString &nodeName, const DTDStruct* dtd,
+ const TQString &attrName, const TQString &attrValue, DOM::Document rootNode)
{
DOM::Node attr;
QTag *qTag = 0L;
@@ -3786,7 +3786,7 @@ DOM::Node kafkaCommon::createDomNodeAttribute(const QString &nodeName, const DTD
return attr;
}
-DOM::Node kafkaCommon::createDomNodeAttribute(Node* node, const QString &attrName,
+DOM::Node kafkaCommon::createDomNodeAttribute(Node* node, const TQString &attrName,
DOM::Document rootNode)
{
if(!node)
@@ -3795,7 +3795,7 @@ DOM::Node kafkaCommon::createDomNodeAttribute(Node* node, const QString &attrNam
return createDomNodeAttribute(node->tag->name, node->tag->dtd(), attrName, "", rootNode);
}
-//DOM::node kafkaCommon::createDomNodeAttribute(DOM::Node node, const QString &attrName,
+//DOM::node kafkaCommon::createDomNodeAttribute(DOM::Node node, const TQString &attrName,
// DOM::Document rootNode)
//{
/**if(node.isNull())
@@ -3815,8 +3815,8 @@ bool kafkaCommon::insertDomNodeAttribute(DOM::Node node, DOM::Node attr)
return true;
}
-bool kafkaCommon::editDomNodeAttribute(DOM::Node node, const QString &nodeName, const DTDStruct* dtd,
- const QString &attrName, const QString &attrValue, DOM::Document rootNode)
+bool kafkaCommon::editDomNodeAttribute(DOM::Node node, const TQString &nodeName, const DTDStruct* dtd,
+ const TQString &attrName, const TQString &attrValue, DOM::Document rootNode)
{
DOM::Node attr;
@@ -3837,7 +3837,7 @@ bool kafkaCommon::editDomNodeAttribute(DOM::Node node, const QString &nodeName,
}
bool kafkaCommon::editDomNodeAttribute(DOM::Node domNode, Node* node,
- const QString &attrName, const QString &attrValue, DOM::Document rootNode)
+ const TQString &attrName, const TQString &attrValue, DOM::Document rootNode)
{
if(!node)
return false;
@@ -3846,7 +3846,7 @@ bool kafkaCommon::editDomNodeAttribute(DOM::Node domNode, Node* node,
attrName, attrValue, rootNode);
}
-DOM::Node kafkaCommon::hasParent(DOM::Node domNode, const QString &name)
+DOM::Node kafkaCommon::hasParent(DOM::Node domNode, const TQString &name)
{
while(!domNode.isNull())
{
@@ -3935,9 +3935,9 @@ bool kafkaCommon::parentSupports(DOM::Node parent, DOM::Node startNode, DOM::Nod
return true;
}
-bool kafkaCommon::isInline(const QString &nodeNam)
+bool kafkaCommon::isInline(const TQString &nodeNam)
{
- QString nodeName = nodeNam.lower();
+ TQString nodeName = nodeNam.lower();
if(nodeName == "q" || nodeName == "u" || nodeName == "i" || nodeName == "b" ||
nodeName == "cite" || nodeName == "em" || nodeName == "var" || nodeName == "em" ||
nodeName == "tt" || nodeName == "code" || nodeName == "kbd" || nodeName == "samp" ||
@@ -3961,7 +3961,7 @@ void kafkaCommon::coutDomTree(DOM::Node, int)
#endif
{
#ifdef HEAVY_DEBUG
- QString output, dots;
+ TQString output, dots;
int j;
DOM::Node node;
if(rootNode.isNull())
@@ -4002,7 +4002,7 @@ void kafkaCommon::coutDomTree(DOM::Node, int)
void kafkaCommon::coutTree(Node *node, int indent)
{
- QString output, dots;
+ TQString output, dots;
int bLine, bCol, eLine, eCol, j;
if(!node)
kdDebug(25001)<< "kafkaCommon::coutTree() - bad node!" << endl;
@@ -4056,7 +4056,7 @@ void kafkaCommon::coutTree(Node *node, int indent)
}
}
-int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, QString const& tag_name)
+int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, TQString const& tag_name)
{
Q_ASSERT(start_node && end_node);
//Andras: don't crash
@@ -4078,8 +4078,8 @@ int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, QString const& ta
return -1; // neither the nodes have tag_name as parent
}
-int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, QString const& tag_name,
- QString const& attribute_name, QString const& attribute_value)
+int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, TQString const& tag_name,
+ TQString const& attribute_name, TQString const& attribute_value)
{
Q_ASSERT(start_node && end_node);
//Andras: don't crash
@@ -4109,7 +4109,7 @@ bool kafkaCommon::isBetweenWords(Node* node, int offset)
if (!node)
return false; //FIXME: Andras: don't crash
- QString tag_str = node->tag->tagStr();
+ TQString tag_str = node->tag->tagStr();
return !
(tag_str[offset].isSpace() || tag_str[offset].isPunct() ||
@@ -4129,7 +4129,7 @@ void kafkaCommon::getStartOfWord(Node*& node, int& offset)
kdDebug(23100) << "getStartOfWord node length: " << node->tag->tagStr().length() << endl;
kdDebug(23100) << "getStartOfWord offset BEGIN: " << offset << endl;
- QString tag_str = node->tag->tagStr();
+ TQString tag_str = node->tag->tagStr();
while(offset >= 0 && !tag_str[offset].isSpace() && !tag_str[offset].isPunct())
--offset;
@@ -4173,7 +4173,7 @@ void kafkaCommon::getEndOfWord(Node*& node, int& offset)
return;
- QString tag_str = node->tag->tagStr();
+ TQString tag_str = node->tag->tagStr();
while((uint)offset != tag_str.length() && !tag_str[offset].isSpace() && !tag_str[offset].isPunct())
++offset;
diff --git a/quanta/parts/kafka/kafkacommon.h b/quanta/parts/kafka/kafkacommon.h
index d71783aa..7de7d77e 100644
--- a/quanta/parts/kafka/kafkacommon.h
+++ b/quanta/parts/kafka/kafkacommon.h
@@ -18,7 +18,7 @@
#ifndef KAFKACOMMON_H
#define KAFKACOMMON_H
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <dom/dom_node.h>
namespace DOM
@@ -96,15 +96,15 @@ public:
* @return The first, non inline, common parent of startNode and endNode.
*/
static Node* DTDGetNonInlineCommonParent(Node* startNode, Node* endNode,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation, Node* nodeSubtree);
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation, Node* nodeSubtree);
/**
* Same as above, only that the common parent can be inline.
*/
static Node* DTDGetCommonParent(Node* startNode, Node* endNode,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation, Node* nodeSubtree);
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation, Node* nodeSubtree);
/**
* This function returns the next DOM::Node after node : the first child of
@@ -184,7 +184,7 @@ public:
/**
* Create/Delete the necessary Empty Nodes between n1 and n2 so that a nice indentation can be
* 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 QValueList<int>
+ * 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,
* n1 should not have non empty childs.
@@ -237,7 +237,7 @@ public:
* unlike the above example.
* @return Returns the modified string.
*/
- static QString removeUnnecessaryWhitespaces(const QString &string,
+ static TQString removeUnnecessaryWhitespaces(const TQString &string,
bool removeAllSpacesAtTheLeft = false, bool removeAllSpacesAtTheRight = false);
@@ -251,7 +251,7 @@ public:
* @param doc The document the Node will belong to.
* @return Returns the newly created node.
*/
- static Node* createNode(const QString &nodeName, const QString &tagString, int nodeType,
+ static Node* createNode(const TQString &nodeName, const TQString &tagString, int nodeType,
Document *doc);
/**
@@ -273,7 +273,7 @@ public:
* @param doc It needs the document where the xml node will be inserted.
* @param encoding The encoding to use (usually get it with quantaApp->defaultEncoding())
*/
- static Node *createXmlDeclarationNode(Document *doc, const QString &encoding);
+ static Node *createXmlDeclarationNode(Document *doc, const TQString &encoding);
/**
* Create a node subtree which contains the mandatory Nodes in order to be DTD compliant.
@@ -429,7 +429,7 @@ public:
* @param nextSibling The next sibling of the Node.
* @return Returns a pointer to the newly created Node.
*/
- static Node *createAndInsertNode(const QString &nodeName, const QString &tagString, int nodeType,
+ static Node *createAndInsertNode(const TQString &nodeName, const TQString &tagString, int nodeType,
Document *doc, Node* parent, Node* nextSibling, NodeModifsSet *modifs, bool merge = true);
/**
@@ -442,7 +442,7 @@ public:
* All the Nodes between the new Node and its closing Tag will be moved as childs of the new Node.
* @param modifs The changes made are logged into modifs.
*/
- static Node *createAndInsertNode(const QString &nodeName, const QString &tagString, int nodeType,
+ static Node *createAndInsertNode(const TQString &nodeName, const TQString &tagString, int nodeType,
Document *doc, Node *parent, Node *nextSibling, Node *nextEndSibling, NodeModifsSet *modifs);
/**
@@ -455,7 +455,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 *createAndInsertNode(const QString &nodeName, const QString &tagString,
+ static Node *createAndInsertNode(const TQString &nodeName, const TQString &tagString,
int nodeType, Document *doc, Node *parent, Node *startNodeToSurround,
Node *endNodeToSurround, int startOffset, int endOffset, NodeModifsSet *modifs);
@@ -472,7 +472,7 @@ public:
* @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.
*/
- static bool DTDcreateAndInsertNode(const QString &nodeName, const QString &tagString, int nodeType,
+ static bool DTDcreateAndInsertNode(const TQString &nodeName, const TQString &tagString, int nodeType,
Document *doc, Node *startNode, int startOffset, Node *endNode, int endOffset,
Node **cursorNode, long &cursorOffset, NodeModifsSet *modifs);
@@ -621,7 +621,7 @@ public:
* @param modifs The usual modifs to log the modifications made for the undo/redo system.
* @return Returns a kafkaCommon::extractNodeStatus.
*/
- static int DTDExtractNode(const QString &nodeName, Document *doc, Node *startNode,
+ static int DTDExtractNode(const TQString &nodeName, Document *doc, Node *startNode,
int startOffset, Node *endNode, int endOffset, Node **cursorNode, long &cursorOffset,
NodeModifsSet *modifs);
@@ -705,8 +705,8 @@ public:
* @param modifs The changes made are logged into modifs.
*/
static void splitStartAndEndNodeSubtree(Node*& startNode, int startOffset, Node*& endNode, int endOffset, Node*& commonParent,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation,
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation,
NodeSelection& cursorHolder,
Node* subTree, NodeModifsSet* modifs, bool extractInlineParentNodes = true);
@@ -746,7 +746,7 @@ public:
* @param eLine Returns the line of the last letter of tagString.
* @param eCol Returns the col of the last letter of tagString.
*/
- static void getEndPosition(const QString & tagString, int bLine, int bCol, int &eLine, int &eCol);
+ static void getEndPosition(const TQString & tagString, int bLine, int bCol, int &eLine, int &eCol);
/**
* It behaves essentially like the above function except that the string is the Tag String of Node.
@@ -760,18 +760,18 @@ public:
* @param newTagString The new tag String :-)
* @param modifs The changes made are logged into modifs.
*/
- static void setTagString(Node *node, const QString &newTagString, NodeModifsSet* modifs);
+ static void setTagString(Node *node, const TQString &newTagString, NodeModifsSet* modifs);
/**
* This function behaves essentially like the above function except that all the others Nodes' position
* are updated too.
*/
- static void setTagStringAndFitsNodes(Node *node, const QString &newTagString, NodeModifsSet* modifs);
+ static void setTagStringAndFitsNodes(Node *node, const TQString &newTagString, NodeModifsSet* modifs);
/**
* This function behaves exactly like Node::editAttribute except that the change is logged inside a NodeModifsSet.
*/
- static void editNodeAttribute(Node* node, const QString& name, const QString& value, NodeModifsSet* modifs);
+ static void editNodeAttribute(Node* node, const TQString& name, const TQString& value, NodeModifsSet* modifs);
/**
* Gets the location of a Node in a pointer-independant suit of ints e.g. 1,3,5 means
@@ -780,31 +780,31 @@ public:
* @param node The Node we want the location.
* @return Returns the location.
*/
- static QValueList<int> getLocation(Node* node);
+ static TQValueList<int> getLocation(Node* node);
/**
* It behaves essentially like the above function except that it operate on DOM::Nodes.
*/
- static QValueList<int> getLocation(DOM::Node domNode);
+ static TQValueList<int> getLocation(DOM::Node domNode);
/**
* Get the node corresponding to a location. See the above function.
* @param loc We want the Node from this location.
* @return Returns the Node at location loc.
*/
- static Node* getNodeFromLocation(QValueList<int> loc);
+ static Node* getNodeFromLocation(TQValueList<int> loc);
/**
* Similar to the above function but instead of using baseNode it uses the passes Node tree.
* @param nodeTree Node tree where to get the location.
*/
- static Node* getNodeFromLocation(QValueList<int> loc, Node* nodeTree);
+ static Node* getNodeFromLocation(TQValueList<int> loc, Node* nodeTree);
/**
* It behaves essentially like the above function except that it operate on DOM::Nodes.
* @rootNode It needs the root Node of the DOM::Node Tree i.e. the document() Node.
*/
- static DOM::Node getNodeFromLocation(QValueList<int> loc, DOM::Node rootNode);
+ static DOM::Node getNodeFromLocation(TQValueList<int> loc, DOM::Node rootNode);
/**
* Get the node corresponding to a sublocation.
@@ -812,9 +812,9 @@ public:
* @locOffset We want the (totalNumberOfParent - locOffset)th parent of Node.
* @return Returns a parent of the node pointed by loc.
*/
- static Node* getNodeFromSubLocation(QValueList<int> loc, int locOffset);
+ static Node* getNodeFromSubLocation(TQValueList<int> loc, int locOffset);
- static Node* getNodeFromSubLocation(QValueList<int> loc, int locOffset, Node* nodeTree);
+ static Node* getNodeFromSubLocation(TQValueList<int> loc, int locOffset, Node* nodeTree);
/**
* A enumeration for kafkaCommon::compareNodePosition().
@@ -839,7 +839,7 @@ public:
* @param pos2 The location of the Node to be compared to.
* @return Return a kafkaCommon::position flag.
*/
- static int compareNodePosition(QValueList<int> pos1, QValueList<int> pos2);
+ static int compareNodePosition(TQValueList<int> pos1, TQValueList<int> pos2);
/**
* It behave essentially like the above function except that it is based on Nodes.
@@ -864,12 +864,12 @@ public:
* Looks if node has a parent which is named name.
* @return Returns the first parent which is named name or 0L if not found.
*/
- static Node* hasParent(Node *node, const QString &name);
+ static Node* hasParent(Node *node, const TQString &name);
/**
* Tries to find the common parent to startNode and endNode, in the same conditions as above.
*/
- static Node* hasParent(Node* startNode, Node* endNode, const QString &name);
+ static Node* hasParent(Node* startNode, Node* endNode, const TQString &name);
/** ----------------- DOM::NODE TREE MODIFICATIONS --------------------*/
@@ -907,7 +907,7 @@ public:
* @param rootNode The rootNode is needed in order to create a new DOM::Node.
* @return Returns the DOM::Node created or a null DOM::Node if nodeName is invalid.
*/
- static DOM::Node createDomNode(const QString &nodeName, const DTDStruct* dtd, DOM::Document rootNode);
+ static DOM::Node createDomNode(const TQString &nodeName, const DTDStruct* dtd, DOM::Document rootNode);
/**
* It behaves essentially like the above function.
@@ -921,7 +921,7 @@ public:
* @param rootNode The rootNode is needed in order to create a new Text DOM::Node.
* @return a new text DOM::Node.
*/
- static DOM::Node createTextDomNode(const QString &textString, DOM::Document rootNode);
+ static DOM::Node createTextDomNode(const TQString &textString, DOM::Document rootNode);
/**
* Create a new attribute and check if the attrName can have this attribute.
@@ -932,21 +932,21 @@ public:
* @param rootNode The rootNode is needed in order to create a new Attribute.
* @return Returns the new Attribute or a null DOM::Node if attrName is invalid.
*/
- static DOM::Node createDomNodeAttribute(const QString &nodeName, const DTDStruct* dtd,
- const QString &attrName, const QString &attrValue, DOM::Document rootNode);
+ static DOM::Node createDomNodeAttribute(const TQString &nodeName, const DTDStruct* dtd,
+ const TQString &attrName, const TQString &attrValue, DOM::Document rootNode);
/**
* It behaves essentially like the above function.
* @param node The corresponding DOM::Node of node will get the attribute. It don't add the attribute.
*/
- static DOM::Node createDomNodeAttribute(Node* node, const QString &attrName, DOM::Document rootNode);
+ static DOM::Node createDomNodeAttribute(Node* node, const TQString &attrName, DOM::Document rootNode);
/**
* It behaves essentially like the above function except that it use the DOM::Node->Node* link to get the
* corresponding Node. So be sure that the link is set.
* @param node The node which will get the attribute. It don't add the attribute.
*/
- //static DOM::node createDomNodeAttribute(DOM::Node node, const QString &attrName,
+ //static DOM::node createDomNodeAttribute(DOM::Node node, const TQString &attrName,
// DOM::Document rootNode);
/**
@@ -967,21 +967,21 @@ public:
* @param rootNode The rootNode is needed in order to create a new Attribute.
* @return Returns if the operation was successfull.
*/
- static bool editDomNodeAttribute(DOM::Node node, const QString &nodeName, const DTDStruct* dtd,
- const QString &attrName, const QString &attrValue, DOM::Document rootNode);
+ static bool editDomNodeAttribute(DOM::Node node, const TQString &nodeName, const DTDStruct* dtd,
+ const TQString &attrName, const TQString &attrValue, DOM::Document rootNode);
/**
* It behaves essentially like the above function.
* @param node The DOM::Node comes from this node.
*/
static bool editDomNodeAttribute(DOM::Node domNode, Node* node,
- const QString &attrName, const QString &attrValue, DOM::Document rootNode);
+ 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.
*/
- static DOM::Node hasParent(DOM::Node domNode, const QString &name);
+ static DOM::Node hasParent(DOM::Node domNode, const TQString &name);
/**
* Returns the position of the child domNode.
@@ -1018,7 +1018,7 @@ public:
* TEMPORARY, HTML specific
* @return Returns true if it is a inline Node. Official DTD List, unlike getNodeDisplay().
*/
- static bool isInline(const QString &nodename);
+ static bool isInline(const TQString &nodename);
/**
* Prints in stdout the current DOM::Node tree.
@@ -1043,10 +1043,10 @@ public:
* 1 is inside tag_name
* 0 mixed
*/
- static int isInsideTag(Node* start_node, Node* end_node, QString const& tag_name);
+ static int isInsideTag(Node* start_node, Node* end_node, TQString const& tag_name);
- static int isInsideTag(Node* start_node, Node* end_node, QString const& tag_name,
- QString const& attribute_name, QString const& attribute_value);
+ static int isInsideTag(Node* start_node, Node* end_node, TQString const& tag_name,
+ TQString const& attribute_name, TQString const& attribute_value);
/**
* Return whether the offset is placed between two words in a text node.
@@ -1125,7 +1125,7 @@ private:
* @param modifs The changes made are logged into modifs.
*/
static void splitStartNodeSubtree(Node* startNode, Node* commonParent,
- QValueList<int>& commonParentStartChildLocation, NodeModifsSet* modifs);
+ TQValueList<int>& commonParentStartChildLocation, NodeModifsSet* modifs);
/**
* Split the last valid start parent (commonParentStartChild) into two.
* The following tree:
@@ -1169,8 +1169,8 @@ private:
* @param modifs The changes made are logged into modifs.
*/
static void splitEndNodeSubtree(Node* endNode, Node* commonParent,
- QValueList<int>& commonParentStartChildLocation,
- QValueList<int>& commonParentEndChildLocation,
+ TQValueList<int>& commonParentStartChildLocation,
+ TQValueList<int>& commonParentEndChildLocation,
bool subTree, NodeModifsSet* modifs);
};
diff --git a/quanta/parts/kafka/kafkadragobject.cpp b/quanta/parts/kafka/kafkadragobject.cpp
index 652ea6f2..7d546036 100644
--- a/quanta/parts/kafka/kafkadragobject.cpp
+++ b/quanta/parts/kafka/kafkadragobject.cpp
@@ -17,8 +17,8 @@
#include <kdebug.h>
-#include <qdom.h>
-#include <qtextstream.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
#include "kafkadragobject.h"
#include "node.h"
@@ -26,24 +26,24 @@
char const* KafkaDragObject::m_mimetype = "application/kafka-nodeselection";
-KafkaDragObject::KafkaDragObject(Node const* item, QWidget* dragSource, const char* name)
- : QStoredDrag(m_mimetype, dragSource, name), m_item(item)
+KafkaDragObject::KafkaDragObject(Node const* item, TQWidget* dragSource, const char* name)
+ : TQStoredDrag(m_mimetype, dragSource, name), m_item(item)
{
- QDomDocument doc("KafkaSelection");
- QString docstart = "<KafkaSelection/>";
+ TQDomDocument doc("KafkaSelection");
+ TQString docstart = "<KafkaSelection/>";
doc.setContent(docstart);
- QDomElement itemsElement = doc.createElement("Items");
+ TQDomElement itemsElement = doc.createElement("Items");
doc.documentElement().appendChild(itemsElement);
//kdDebug(25001) << doc.toString() << endl;
item->save(itemsElement);
- //QDataStream s(m_array, IO_WriteOnly);
- QTextStream s(m_array, IO_WriteOnly);
+ //TQDataStream s(m_array, IO_WriteOnly);
+ TQTextStream s(m_array, IO_WriteOnly);
s << doc.toString();
//s << "biltre";
/*
kdDebug(25001) << m_array.size() << endl;
kdDebug(25001) << doc.toString() << endl;
- kdDebug(25001) << QString(m_array) << endl;
+ kdDebug(25001) << TQString(m_array) << endl;
*/
//setEncodedData(m_array);
}
@@ -51,12 +51,12 @@ KafkaDragObject::KafkaDragObject(Node const* item, QWidget* dragSource, const ch
KafkaDragObject::~KafkaDragObject()
{}
-QByteArray KafkaDragObject::encodedData(const char* mimetype) const
+TQByteArray KafkaDragObject::encodedData(const char* mimetype) const
{
if(m_mimetype == mimetype)
return m_array;
- return QByteArray();
+ return TQByteArray();
}
Node const* KafkaDragObject::getItem() const
@@ -64,19 +64,19 @@ Node const* KafkaDragObject::getItem() const
return m_item;
}
-bool KafkaDragObject::canDecode(QMimeSource *e)
+bool KafkaDragObject::canDecode(TQMimeSource *e)
{
return e->provides(m_mimetype);
}
-bool KafkaDragObject::decode(QMimeSource* e, Node* node)
+bool KafkaDragObject::decode(TQMimeSource* e, Node* node)
{
if(!node || !e->provides(m_mimetype))
return false;
- QByteArray data = e->encodedData(m_mimetype);
- //kdDebug(25001) << QString(data) << endl;
- QDomDocument doc;
+ TQByteArray data = e->encodedData(m_mimetype);
+ //kdDebug(25001) << TQString(data) << endl;
+ TQDomDocument doc;
doc.setContent(data, false);
//kdDebug(25001) << doc.toString() << endl;
node->load(doc.documentElement().firstChild().toElement());
diff --git a/quanta/parts/kafka/kafkadragobject.h b/quanta/parts/kafka/kafkadragobject.h
index 3325812c..8b6c2e6e 100644
--- a/quanta/parts/kafka/kafkadragobject.h
+++ b/quanta/parts/kafka/kafkadragobject.h
@@ -18,8 +18,8 @@
#ifndef KAFKADRAGOBJECT_H
#define KAFKADRAGOBJECT_H
-#include <qcstring.h>
-#include <qdragobject.h>
+#include <tqcstring.h>
+#include <tqdragobject.h>
class Node;
@@ -31,17 +31,17 @@ class KafkaDragObject: public QStoredDrag
Q_OBJECT
public:
- KafkaDragObject(Node const* item, QWidget* dragSource = 0, const char* name = 0);
+ KafkaDragObject(Node const* item, TQWidget* dragSource = 0, const char* name = 0);
~KafkaDragObject();
- QByteArray encodedData(const char* c) const;
+ TQByteArray encodedData(const char* c) const;
Node const* getItem() const;
- static bool canDecode(QMimeSource*);
- static bool decode(QMimeSource*, Node* node);
+ static bool canDecode(TQMimeSource*);
+ static bool decode(TQMimeSource*, Node* node);
private:
- QByteArray m_array;
+ TQByteArray m_array;
Node const* m_item;
static char const* m_mimetype;
diff --git a/quanta/parts/kafka/kafkahtmlpart.cpp b/quanta/parts/kafka/kafkahtmlpart.cpp
index 493a9a3f..bcbc7611 100644
--- a/quanta/parts/kafka/kafkahtmlpart.cpp
+++ b/quanta/parts/kafka/kafkahtmlpart.cpp
@@ -16,15 +16,15 @@
* *
***************************************************************************/
-#include <qfile.h>
-#include <qpainter.h>
-#include <qtextstream.h>
-#include <qstringlist.h>
-#include <qlayout.h>
-#include <qmainwindow.h>
-#include <qtimer.h>
-#include <qtooltip.h>
-#include <qpopupmenu.h>
+#include <tqfile.h>
+#include <tqpainter.h>
+#include <tqtextstream.h>
+#include <tqstringlist.h>
+#include <tqlayout.h>
+#include <tqmainwindow.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
+#include <tqpopupmenu.h>
#include <kdebug.h>
#include <klocale.h>
@@ -44,7 +44,7 @@
#include "kafkacommon.h"
#ifdef HEAVY_DEBUG
#include "domtreeview.h"
-#include <qdialog.h>
+#include <tqdialog.h>
#endif
#include "wkafkapart.h"
#include "undoredo.h"
@@ -83,12 +83,12 @@ public:
#endif
};
-KafkaWidget::KafkaWidget(QWidget *parent, QWidget *widgetParent, KafkaDocument *part,
+KafkaWidget::KafkaWidget(TQWidget *parent, TQWidget *widgetParent, KafkaDocument *part,
const char *name)
: KHTMLPart(widgetParent, name, parent, name),
w(part)
{
- m_contextPopupMenu = new QPopupMenu();
+ m_contextPopupMenu = new TQPopupMenu();
d = new KafkaWidgetPrivate();
@@ -102,12 +102,12 @@ KafkaWidget::KafkaWidget(QWidget *parent, QWidget *widgetParent, KafkaDocument *
// With the mix of Leo Savernik's caret Mode and the current editing
// functions, it will be kind of VERY messy
setCaretMode(true);
- connect(this, SIGNAL(caretPositionChanged(const DOM::Node &, long)),
- this, SLOT(slotNewCursorPos(const DOM::Node &, long)));
+ connect(this, TQT_SIGNAL(caretPositionChanged(const DOM::Node &, long)),
+ this, TQT_SLOT(slotNewCursorPos(const DOM::Node &, long)));
setCaretDisplayPolicyNonFocused(KHTMLPart::CaretVisible);
- connect(this, SIGNAL(popupMenu(const QString&, const QPoint&)),
- this, SLOT(slotContextMenuRequested(const QString&, const QPoint&)));
+ connect(this, TQT_SIGNAL(popupMenu(const TQString&, const TQPoint&)),
+ this, TQT_SLOT(slotContextMenuRequested(const TQString&, const TQPoint&)));
view()->setMouseTracking(true);
view()->installEventFilter(this);
@@ -130,7 +130,7 @@ void KafkaWidget::newDocument()
{
//FIXME: Somehow we should get it from Quanta settings: qConfig.attrValueQuotation
//-->No need for that: Quotations aren't stored in the DOM::Nodes
- QString newPageHTMLCode = "<html>\n"
+ TQString newPageHTMLCode = "<html>\n"
"<head>\n"
"</head>\n"
"<body>\n"
@@ -143,7 +143,7 @@ void KafkaWidget::newDocument()
}
-void KafkaWidget::insertText(DOM::Node node, const QString &text, int position)
+void KafkaWidget::insertText(DOM::Node node, const TQString &text, int position)
{
#ifdef LIGHT_DEBUG
kdDebug(25001)<< "KafkaWidget::insertText text " << text << " pos " << position << endl;
@@ -184,7 +184,7 @@ void KafkaWidget::insertText(DOM::Node node, const QString &text, int position)
kdDebug(25001) << "KafkaWidget::insertText() - added text - 1" << endl;
#endif
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
return;
}
}
@@ -261,7 +261,7 @@ void KafkaWidget::insertText(DOM::Node node, const QString &text, int position)
}
//document().updateRendering();
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
}
void KafkaWidget::slotDelayedSetCaretPosition()
@@ -270,7 +270,7 @@ void KafkaWidget::slotDelayedSetCaretPosition()
emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset);
}
-void KafkaWidget::insertText(const QString &text, int position)
+void KafkaWidget::insertText(const TQString &text, int position)
{
insertText(m_currentNode, text, (position == -1 ? d->m_cursorOffset : position));
}
@@ -465,7 +465,7 @@ void KafkaWidget::keyReturn(bool specialPressed)
kdDebug(25001)<< "CURNODE : " << m_currentNode.nodeName().string() << ":"
<< m_currentNode.nodeValue().string() << " : " << d->m_cursorOffset << endl;
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
kdDebug(25001)<< "CURNODE : " << m_currentNode.nodeName().string() << ":"
<< m_currentNode.nodeValue().string() << " : " << d->m_cursorOffset << endl;
//emit domNodeNewCursorPos(m_currentNode, d->m_cursorOffset);
@@ -476,17 +476,17 @@ void KafkaWidget::keyReturn(bool specialPressed)
<< m_currentNode.nodeValue().string() << " : " << d->m_cursorOffset << endl;
#endif
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
}
-bool KafkaWidget::eventFilter(QObject *, QEvent *event)
+bool KafkaWidget::eventFilter(TQObject *, TQEvent *event)
{
bool forgetEvent = false;
//tmp
//DOM::Node attr, tmpNode;
//end tmp
- if(event->type() == QEvent::FocusIn)
+ if(event->type() == TQEvent::FocusIn)
{
#ifdef LIGHT_DEBUG
kdDebug(25001) << "KafkaWidget::eventFilter() FocusIn" << endl;
@@ -495,7 +495,7 @@ bool KafkaWidget::eventFilter(QObject *, QEvent *event)
emit hasFocus(true);
}
- if(event->type() == QEvent::FocusOut)
+ if(event->type() == TQEvent::FocusOut)
{
#ifdef LIGHT_DEBUG
kdDebug(25001) << "KafkaWidget::eventFilter() FocusOut" << endl;
@@ -504,9 +504,9 @@ bool KafkaWidget::eventFilter(QObject *, QEvent *event)
emit hasFocus(false);
}
- if(event->type() == QEvent::KeyPress)
+ if(event->type() == TQEvent::KeyPress)
{
- QKeyEvent *keyevent = static_cast<QKeyEvent *>(event);
+ TQKeyEvent *keyevent = static_cast<TQKeyEvent *>(event);
//Create a new NodeModifsSet where the changes will be logged.
m_modifs = new NodeModifsSet();
@@ -694,7 +694,7 @@ bool KafkaWidget::eventFilter(QObject *, QEvent *event)
return forgetEvent;
}
-void KafkaWidget::slotContextMenuRequested(const QString& /*url*/, const QPoint& point)
+void KafkaWidget::slotContextMenuRequested(const TQString& /*url*/, const TQPoint& point)
{
TagActionManager::self()->fillWithTagActions(m_contextPopupMenu, nodeUnderMouse());
@@ -1204,7 +1204,7 @@ void KafkaWidget::keyBackspace()
DOM::Node toplevelBlock, toplevelBlock2, startNode, endNode, startNode2, endNode2;
DOM::Node childOfCommonParent, childOfCommonParent2, commonParent;
bool _goingTowardsRootNode, singleNodeDeleted, isParent, prevIsBlock, endNodeIsNotInline, boolTmp;
- QString text;
+ TQString text;
if(hasSelection())
{
@@ -1531,7 +1531,7 @@ void KafkaWidget::keyBackspace()
emit domNodeModified(temp, m_modifs);
if(boolTmp)
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
}
}
@@ -1597,7 +1597,7 @@ void KafkaWidget::keyBackspace()
{
m_currentNode = _nodePrev;
d->m_cursorOffset += (static_cast<DOM::CharacterData>(_nodePrev)).length();
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
}
_nodePrev.setNodeValue(_nodePrev.nodeValue() + _node.nodeValue());
emit domNodeModified(_nodePrev, m_modifs);
@@ -1618,7 +1618,7 @@ void KafkaWidget::keyBackspace()
m_currentNode = m_currentNode.previousSibling();
d->m_cursorOffset = 0;
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
}
else if(!m_currentNode.nextSibling().isNull())
{
@@ -1839,18 +1839,18 @@ return;
// Iterate all toggable toolbar actions and toggle them on or off
// Look if there is a selection
TagAction* tag_action = 0;
- QPtrList<TagAction> tag_actions = quantaApp->tagActions();
+ TQPtrList<TagAction> tag_actions = quantaApp->tagActions();
for (tag_action = tag_actions.first(); tag_action; tag_action = tag_actions.next())
{
if(tag_action->toggable())
{
- QString tag_name = tag_action->XMLTagName();
+ TQString tag_name = tag_action->XMLTagName();
if(tag_name.isEmpty())
break;
- QDomElement data(tag_action->data());
- QString attribute_name(data.attribute("attribute_name", QString()));
- QString attribute_value(data.attribute("attribute_value", QString()));
+ TQDomElement data(tag_action->data());
+ TQString attribute_name(data.attribute("attribute_name", TQString()));
+ TQString attribute_value(data.attribute("attribute_value", TQString()));
int inside_tag;
if(!attribute_name.isEmpty() && !attribute_value.isEmpty())
@@ -2088,7 +2088,7 @@ void KafkaWidget::setCurrentNode(DOM::Node node, int offset)
d->m_cursorOffset = offset;
makeCursorVisible();
if(!m_currentNode.isNull() && m_currentNode.nodeName().string() != "#document")
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
//setCaretPosition(m_currentNode, (long)d->m_cursorOffset);
}
@@ -2139,7 +2139,7 @@ void KafkaWidget::putCursorAtFirstAvailableLocation()
}
m_currentNode = node;
d->m_cursorOffset = 0;
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
#ifdef LIGHT_DEBUG
@@ -2236,7 +2236,7 @@ void KafkaWidget::removeSelection()
setCurrentNode(m_currentNode, domNodeCursorOffset);
- QTimer::singleShot(0, this, SLOT(slotDelayedSetCaretPosition()));
+ TQTimer::singleShot(0, this, TQT_SLOT(slotDelayedSetCaretPosition()));
NodeSelection* cursorPos = new NodeSelection();
cursorPos->setCursorNode(cursorNode);
@@ -2252,9 +2252,9 @@ void KafkaWidget::removeSelection()
void KafkaWidget::applyQueuedToggableTagActions()
{
- QStringList queued_actions = quantaApp->tagActionPool();
- QPtrList<TagAction> action_list = quantaApp->tagActions();
- for(QStringList::Iterator it = queued_actions.begin(); it != queued_actions.end(); ++it)
+ TQStringList queued_actions = quantaApp->tagActionPool();
+ TQPtrList<TagAction> action_list = quantaApp->tagActions();
+ for(TQStringList::Iterator it = queued_actions.begin(); it != queued_actions.end(); ++it)
{
TagAction* tag_action = 0;
for (tag_action = action_list.first(); tag_action; tag_action = action_list.next())
diff --git a/quanta/parts/kafka/kafkahtmlpart.h b/quanta/parts/kafka/kafkahtmlpart.h
index f1dc79c1..52a7b031 100644
--- a/quanta/parts/kafka/kafkahtmlpart.h
+++ b/quanta/parts/kafka/kafkahtmlpart.h
@@ -24,10 +24,10 @@
#include <khtml_events.h>
#include <kparts/event.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qdockwindow.h>
-#include <qevent.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqdockwindow.h>
+#include <tqevent.h>
#include <dom/dom_node.h>
#include <dom/dom_element.h>
@@ -47,7 +47,7 @@ class KafkaWidget : public KHTMLPart
{
Q_OBJECT
public:
- KafkaWidget(QWidget *parent, QWidget *widgetParent, KafkaDocument *part,
+ KafkaWidget(TQWidget *parent, TQWidget *widgetParent, KafkaDocument *part,
const char *name = 0);
~KafkaWidget();
@@ -133,7 +133,7 @@ public slots:
* @param text The text to be added
* @param position Specifies the position where to add text
*/
- void insertText(DOM::Node node, const QString &text, int position);
+ void insertText(DOM::Node node, const TQString &text, int position);
/**
* Category: HTML Editing Functions
@@ -142,7 +142,7 @@ public slots:
* @param position Specifies the position where to add text, if it's -1
* the text will be appended after the last position
*/
- void insertText(const QString &text, int position);
+ void insertText(const TQString &text, int position);
/**
* Puts all the child Text DOM::Node into a "normal" form where only
@@ -168,7 +168,7 @@ public slots:
void slotNewCursorPos(const DOM::Node &domNode, long offset);
/**
- * Called to set the cursor Position with a QTimer::singleShot() after calling
+ * Called to set the cursor Position with a TQTimer::singleShot() after calling
* document->updateRendering()
*/
void slotDelayedSetCaretPosition();
@@ -232,7 +232,7 @@ signals:
void hasFocus(bool focus);
protected:
- bool eventFilter(QObject *object, QEvent *event);
+ bool eventFilter(TQObject *object, TQEvent *event);
virtual void khtmlMouseMoveEvent(khtml::MouseMoveEvent *event);
virtual void khtmlMousePressEvent(khtml::MousePressEvent *event);
@@ -241,7 +241,7 @@ protected:
private slots:
- void slotContextMenuRequested(const QString& url, const QPoint& point);
+ void slotContextMenuRequested(const TQString& url, const TQPoint& point);
private:
#if 0
@@ -309,7 +309,7 @@ private:
KafkaDocument *w;
friend class KafkaWidgetPrivate;
- QPopupMenu* m_contextPopupMenu;
+ TQPopupMenu* m_contextPopupMenu;
};
#endif
diff --git a/quanta/parts/kafka/kafkasyncoptions.cpp b/quanta/parts/kafka/kafkasyncoptions.cpp
index a355b99a..e7066187 100644
--- a/quanta/parts/kafka/kafkasyncoptions.cpp
+++ b/quanta/parts/kafka/kafkasyncoptions.cpp
@@ -15,9 +15,9 @@
* *
***************************************************************************/
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -25,7 +25,7 @@
#include "kafkasyncoptions.h"
#include "kafkasyncoptions.moc"
-KafkaSyncOptions::KafkaSyncOptions( KConfig *a_config, QWidget* parent, const char* name )
+KafkaSyncOptions::KafkaSyncOptions( KConfig *a_config, TQWidget* parent, const char* name )
: KafkaSyncOptionsUI( parent, name )
{
config = a_config;
@@ -34,9 +34,9 @@ KafkaSyncOptions::KafkaSyncOptions( KConfig *a_config, QWidget* parent, const c
bool showIcons = config->readBoolEntry("Show Scripts Icons", true);
config->setGroup("Kafka Synchronization options");
- QString sourceRefresh = config->readEntry("Source refresh", "delay");
+ TQString sourceRefresh = config->readEntry("Source refresh", "delay");
int sourceRefreshDelay = config->readNumEntry("Source refresh delay", 500);
- QString kafkaRefresh = config->readEntry("Kafka refresh", "focus");
+ TQString kafkaRefresh = config->readEntry("Kafka refresh", "focus");
int kafkaRefreshDelay = config->readNumEntry("Kafka refresh delay", 4000);
if ( !name )
diff --git a/quanta/parts/kafka/kafkasyncoptions.h b/quanta/parts/kafka/kafkasyncoptions.h
index 25b200d7..daf67117 100644
--- a/quanta/parts/kafka/kafkasyncoptions.h
+++ b/quanta/parts/kafka/kafkasyncoptions.h
@@ -27,7 +27,7 @@ class KafkaSyncOptions : public KafkaSyncOptionsUI
Q_OBJECT
public:
- KafkaSyncOptions( KConfig *config, QWidget* parent = 0, const char* name = 0);
+ KafkaSyncOptions( KConfig *config, TQWidget* parent = 0, const char* name = 0);
~KafkaSyncOptions();
void updateConfig();
diff --git a/quanta/parts/kafka/undoredo.cpp b/quanta/parts/kafka/undoredo.cpp
index 7ca12718..dfe07142 100644
--- a/quanta/parts/kafka/undoredo.cpp
+++ b/quanta/parts/kafka/undoredo.cpp
@@ -16,9 +16,9 @@
***************************************************************************/
//debug only
-#include <qdatetime.h>
+#include <tqdatetime.h>
//end debug only
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -174,9 +174,9 @@ void undoRedo::addNewModifsSet(NodeModifsSet *modifs, int modifLocation, NodeSel
kdDebug(25001)<< "undoRedo::addNewModifsSet() - NodeModifsSet type: " << modifLocation << endl;
#endif
- QValueList<NodeModif>::iterator it2;
+ TQValueList<NodeModif>::iterator it2;
NodeModifsSet *NMSet;
- QValueList<int> loc;
+ TQValueList<int> loc;
int curFocus, foo, foo2;
int diff, diff2;
NodeSelectionInd *nodeSelection;
@@ -233,7 +233,7 @@ void undoRedo::addNewModifsSet(NodeModifsSet *modifs, int modifLocation, NodeSel
if(modifs->nodeModifList().count() >= 1 && modifs->indentationStartOffset() == 1 &&
modifs->nodeModifList().at(0)->type() == NodeModif::NodeModified)
{
- QPtrListIterator<NodeModifsSet> it(m_undoList);
+ TQPtrListIterator<NodeModifsSet> it(m_undoList);
it = documentIterator;
if((*it) && (*it)->nodeModifList().count() >= 1 && (*it)->indentationStartOffset() == 1 &&
(*it)->nodeModifList().at(0)->type() == NodeModif::NodeModified &&
@@ -354,12 +354,12 @@ bool undoRedo::undo()
#ifdef LIGHT_DEBUG
kdDebug(25001)<< "undoRedo::undo()"<< endl;
- QTime t;
+ TQTime t;
t.start();
#endif
if(documentIterator.isEmpty() || !(*documentIterator))
return false;
- QPtrListIterator<NodeModif> it((*documentIterator)->nodeModifList());
+ TQPtrListIterator<NodeModif> it((*documentIterator)->nodeModifList());
it.toLast();
while(*it)
@@ -393,7 +393,7 @@ bool undoRedo::undo()
//Update the modified flag
m_doc->setModified((*documentIterator)->isModifiedBefore());
- QPtrListIterator<NodeModifsSet> currentIt(documentIterator);
+ TQPtrListIterator<NodeModifsSet> currentIt(documentIterator);
--documentIterator;
//TEMP: Reload the kafka editor TODO: update only the modified Nodes
@@ -420,7 +420,7 @@ bool undoRedo::redo()
bool success = true;
#ifdef LIGHT_DEBUG
- QTime t;
+ TQTime t;
t.start();
kdDebug(25001)<< "undoRedo::redo()" << endl;
#endif
@@ -432,7 +432,7 @@ bool undoRedo::redo()
else
++documentIterator;
- QPtrListIterator<NodeModif> it((*documentIterator)->nodeModifList());
+ TQPtrListIterator<NodeModif> it((*documentIterator)->nodeModifList());
it.toFirst();
while(*it)
@@ -486,7 +486,7 @@ bool undoRedo::redo()
bool undoRedo::undoNodeModif(NodeModif *nodeModif)
{
Node *node, *newNode;
- QValueList<int> ref;
+ TQValueList<int> ref;
Tag *tag;
bool b;
@@ -547,7 +547,7 @@ bool undoRedo::undoNodeModif(NodeModif *nodeModif)
// No node at this location, getting the parent Node and appending newNode after
// the last child of the parent.
ref = nodeModif->location();
- QValueList<int> loc(ref);
+ TQValueList<int> loc(ref);
loc.remove(loc.fromLast());
if(loc.empty())
{
@@ -584,7 +584,7 @@ bool undoRedo::undoNodeModif(NodeModif *nodeModif)
bool undoRedo::redoNodeModif(NodeModif *nodeModif)
{
bool success;
- QValueList<int> tmp;
+ TQValueList<int> tmp;
//To do the opposite action of undoNodeModif(), we simply have
//to change the type of nodeModif
@@ -907,7 +907,7 @@ void undoRedo::reloadKafkaEditor(bool force, NodeSelection *selection)
void undoRedo::reloadQuantaEditor(bool force, bool syncQuantaCursor, bool encodeText)
{
- QString text, allText;
+ TQString text, allText;
Node *node = baseNode, *child;
int bCol, bLine, eCol, eLine, bCol2, bLine2, bCol3, bLine3, eCol3, eLine3, i;
KafkaDocument *kafkaInterface = KafkaDocument::ref();
@@ -1096,8 +1096,8 @@ bool undoRedo::syncKafkaView()
#ifdef LIGHT_DEBUG
kdDebug(25001)<< "undoRedo::syncKafkaView()" << endl;
#endif
- /** QValueList<NodeModifsSet>::iterator it;
- QValueList<NodeModif>::iterator it2;
+ /** TQValueList<NodeModifsSet>::iterator it;
+ TQValueList<NodeModif>::iterator it2;
bool undoKafkaView = true;
if(kafkaIterator == sourceIterator)
@@ -1250,8 +1250,8 @@ bool undoRedo::syncQuantaView()
#ifdef LIGHT_DEBUG
kdDebug(25001)<< "undoRedo::syncQuantaView()" << endl;
#endif
- /**QValueList<NodeModifsSet>::iterator it;
- QValueList<NodeModif>::iterator it2;
+ /**TQValueList<NodeModifsSet>::iterator it;
+ TQValueList<NodeModif>::iterator it2;
bool undoQuantaView = true;
if(kafkaIterator == sourceIterator)
@@ -1431,7 +1431,7 @@ void undoRedo::debugOutput()
kdDebug(24000)<< "Empty!" << endl;
return;
}
- QPtrListIterator<NodeModifsSet> it(m_undoList);
+ TQPtrListIterator<NodeModifsSet> it(m_undoList);
for(it.toFirst(); it ; ++it )
{
kdDebug(24000)<< "== Node Modifications set #" << i << "(" << (*it)->isModifiedBefore() << "," <<
@@ -1445,12 +1445,12 @@ void undoRedo::debugOutput()
}
//kdDebug(24000)<< "== Cursor Pos: " << (*it).cursorY << ":" << (*it).cursorX << endl;
//kdDebug(24000)<< "== Cursor Pos2:" << (*it).cursorY2 << ":" << (*it).cursorX2 << endl;
- QPtrListIterator<NodeModif> it2((*it)->nodeModifList());
+ TQPtrListIterator<NodeModif> it2((*it)->nodeModifList());
for(it2.toFirst(); it2; ++it2)
{
kdDebug(24000)<< "==== NodeModif type:" << (*it2)->type() << endl;
kdDebug(24000)<< "==== Location1: " << endl;
- QValueList<int>::iterator it3;
+ TQValueList<int>::iterator it3;
if((*it2)->location().empty())
{
kdDebug(24000)<< "==== Empty location!!" << endl;
@@ -1492,7 +1492,7 @@ void undoRedo::debugOutput()
void undoRedo::fileSaved()
{
- QPtrListIterator<NodeModifsSet> it(m_undoList);
+ TQPtrListIterator<NodeModifsSet> it(m_undoList);
bool previousWasDocIt = false;
for(it.toFirst(); it ; ++it )
{
@@ -1515,7 +1515,7 @@ void undoRedo::fileSaved()
}
}
/**
- QValueList<NodeModifsSet>::iterator it = sourceIterator;
+ TQValueList<NodeModifsSet>::iterator it = sourceIterator;
(*sourceIterator).isModified = false;
//seting isModified = true to all others
while(it != begin())
diff --git a/quanta/parts/kafka/undoredo.h b/quanta/parts/kafka/undoredo.h
index f9ec09cf..390dc5bb 100644
--- a/quanta/parts/kafka/undoredo.h
+++ b/quanta/parts/kafka/undoredo.h
@@ -18,9 +18,9 @@
#ifndef UNDOREDO_H
#define UNDOREDO_H
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qobject.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqobject.h>
#include "node.h"
class Document;
@@ -53,23 +53,23 @@ public:
* For all type : Location of the Node added/modified/removed/moved.
* @param location The location of the Node, cf kafkaCommon::getNodeLocation()
*/
- void setLocation(QValueList<int> location) {m_location = location;}
+ void setLocation(TQValueList<int> location) {m_location = location;}
/**
* @return Returns the location of the Node which have been modified.
*/
- QValueList<int>& location() {return m_location;}
+ TQValueList<int>& location() {return m_location;}
/**
* For Node move : Final location of the Node moved.
* @param location The final location of the Node moved, cf kafkaCommon::getNodeLocation()
*/
- void setFinalLocation(QValueList<int> location) {m_finalLocation = location;}
+ void setFinalLocation(TQValueList<int> location) {m_finalLocation = location;}
/**
* @return Returns the final location of the Node which was moved.
*/
- QValueList<int>& finalLocation() {return m_finalLocation;}
+ TQValueList<int>& finalLocation() {return m_finalLocation;}
/**
* For Node deletion: Store the deleted Node.
@@ -145,7 +145,7 @@ public:
private:
int m_type;
- QValueList<int> m_location, m_finalLocation;
+ TQValueList<int> m_location, m_finalLocation;
Node *m_node;
Tag *m_tag;
int m_childrenMovedUp;
@@ -170,7 +170,7 @@ public:
/**
* Returns the list of NodeModifs.
*/
- QPtrList<NodeModif> & nodeModifList() {return m_nodeModifList;}
+ TQPtrList<NodeModif> & nodeModifList() {return m_nodeModifList;}
/**
* Set the Modified flag BEFORE the user input.
@@ -195,12 +195,12 @@ public:
/**
* Set a description to the user input.
*/
- void setDescription(const QString &description) {m_description = description;}
+ void setDescription(const TQString &description) {m_description = description;}
/**
* @return Returns the description of the user input.
*/
- QString description() {return m_description;}
+ TQString description() {return m_description;}
/**
* Set the coordinates of the selection before the user input.
@@ -237,9 +237,9 @@ public:
private:
- QPtrList<NodeModif> m_nodeModifList;
+ TQPtrList<NodeModif> m_nodeModifList;
bool m_isModifiedBefore, m_isModifiedAfter;
- QString m_description;
+ TQString m_description;
NodeSelectionInd *m_selectionBefore, *m_selectionAfter;
int m_indentationStartOffset, m_type;
};
@@ -429,7 +429,7 @@ private:
/**
* The main undoRedo list which contains the NodeModifsSet.
*/
- QPtrList<NodeModifsSet> m_undoList;
+ TQPtrList<NodeModifsSet> m_undoList;
/**
* The undoRedo list iterators which point the current location of each component in
* the undoRedo list.
@@ -437,13 +437,13 @@ private:
* sourceIterator point the current location of the source view (kate).
* kafkaIterator point the current location of the VPL view (kafka).
*/
- QPtrListIterator<NodeModifsSet> documentIterator;
- QPtrListIterator<NodeModifsSet> sourceIterator;
- QPtrListIterator<NodeModifsSet> kafkaIterator;
+ TQPtrListIterator<NodeModifsSet> documentIterator;
+ TQPtrListIterator<NodeModifsSet> sourceIterator;
+ TQPtrListIterator<NodeModifsSet> kafkaIterator;
int m_listLimit;
bool m_merging;
bool addingText;
- QValueList<int> m_currentLoc;
+ TQValueList<int> m_currentLoc;
Document *m_doc;
bool m_mergeNext;
int m_dontAddModifSet;
diff --git a/quanta/parts/kafka/wkafkapart.cpp b/quanta/parts/kafka/wkafkapart.cpp
index 5641bb36..73e2a019 100644
--- a/quanta/parts/kafka/wkafkapart.cpp
+++ b/quanta/parts/kafka/wkafkapart.cpp
@@ -32,12 +32,12 @@
#include <kglobal.h>
#include <kcharsets.h>
-#include <qregexp.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdatetime.h>
-#include <qclipboard.h>
-#include <qptrvector.h>
+#include <tqregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdatetime.h>
+#include <tqclipboard.h>
+#include <tqptrvector.h>
#include "document.h"
#include "viewmanager.h"
@@ -61,25 +61,25 @@
KafkaWidget *kafkaWidget;
KafkaDocument *kafkaDoc;
-KafkaDocument::KafkaDocument(QWidget *parent, QWidget *widgetParent, const char *name)
+KafkaDocument::KafkaDocument(TQWidget *parent, TQWidget *widgetParent, const char *name)
:domNodeProps(1021), _docLoaded(false)
{
// i18n reserve
-QString a = i18n("Selector");QString b = i18n("Attribute");QString c = i18n("Class");
-QString d = i18n("Pseudo-class");QString e = i18n("CSS rules");QString f = i18n("Universal selector");
-QString g = i18n("Linked stylesheets");QString h = i18n("Embedded stylesheets");QString i = i18n("Inline style attribute");
-QString j = i18n("Link");QString k = i18n("Priority");QString l = i18n("ID");
-QString m = i18n("Browser support");QString n = i18n("Pseudo-element");QString o = i18n("Imported");
-QString p = i18n("Inheritance");QString q = i18n("Inherited");QString r = "";
-
-QString s = i18n("Name");QString tt = i18n("Undo");QString u = i18n("Redo");
-QString v = i18n("Undo/Redo history");QString w = i18n("CSS styles");
-
-QString x = i18n("Sorry, VPL does not support this functionality yet.");
-QString y = i18n("Merge cells");
-QString z = i18n("Split cells");
-QString aa = i18n("Edit CSS style of this Tag");
-QString ab = i18n("Ident all");
+TQString a = i18n("Selector");TQString b = i18n("Attribute");TQString c = i18n("Class");
+TQString d = i18n("Pseudo-class");TQString e = i18n("CSS rules");TQString f = i18n("Universal selector");
+TQString g = i18n("Linked stylesheets");TQString h = i18n("Embedded stylesheets");TQString i = i18n("Inline style attribute");
+TQString j = i18n("Link");TQString k = i18n("Priority");TQString l = i18n("ID");
+TQString m = i18n("Browser support");TQString n = i18n("Pseudo-element");TQString o = i18n("Imported");
+TQString p = i18n("Inheritance");TQString q = i18n("Inherited");TQString r = "";
+
+TQString s = i18n("Name");TQString tt = i18n("Undo");TQString u = i18n("Redo");
+TQString v = i18n("Undo/Redo history");TQString w = i18n("CSS styles");
+
+TQString x = i18n("Sorry, VPL does not support this functionality yet.");
+TQString y = i18n("Merge cells");
+TQString z = i18n("Split cells");
+TQString aa = i18n("Edit CSS style of this Tag");
+TQString ab = i18n("Ident all");
//end
#ifdef LIGHT_DEBUG
@@ -96,13 +96,13 @@ QString ab = i18n("Ident all");
domNodeProps.setAutoDelete(false);
KStandardDirs *m_stddirs = new KStandardDirs();
- QFile file( m_stddirs->findResource("data", "kafkapart/entities" )/**locate("appdata","chars") */);
+ TQFile file( m_stddirs->findResource("data", "kafkapart/entities" )/**locate("appdata","chars") */);
delete m_stddirs;
- QString tmp;
+ TQString tmp;
if ( file.open(IO_ReadOnly) )
{
- QTextStream t( &file ); // use a text stream
- t.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream t( &file ); // use a text stream
+ t.setEncoding(TQTextStream::UnicodeUTF8);
while ( !t.eof() )
{
tmp = t.readLine();
@@ -116,17 +116,17 @@ QString ab = i18n("Ident all");
file.close();
}
- connect(m_kafkaPart, SIGNAL(domNodeInserted(DOM::Node, bool, NodeModifsSet*)),
- this, SLOT(slotDomNodeInserted(DOM::Node, bool, NodeModifsSet*)));
- connect(m_kafkaPart, SIGNAL(domNodeModified(DOM::Node, NodeModifsSet*)),
- this, SLOT(slotDomNodeModified(DOM::Node, NodeModifsSet*)));
- connect(m_kafkaPart, SIGNAL(domNodeIsAboutToBeRemoved(DOM::Node, bool, NodeModifsSet*)),
- this, SLOT(slotDomNodeAboutToBeRemoved(DOM::Node, bool, NodeModifsSet*)));
- connect(m_kafkaPart, SIGNAL(domNodeIsAboutToBeMoved(DOM::Node, DOM::Node, DOM::Node, NodeModifsSet*)),
- this, SLOT(slotDomNodeIsAboutToBeMoved(DOM::Node, DOM::Node, DOM::Node, NodeModifsSet*)));
+ connect(m_kafkaPart, TQT_SIGNAL(domNodeInserted(DOM::Node, bool, NodeModifsSet*)),
+ this, TQT_SLOT(slotDomNodeInserted(DOM::Node, bool, NodeModifsSet*)));
+ connect(m_kafkaPart, TQT_SIGNAL(domNodeModified(DOM::Node, NodeModifsSet*)),
+ this, TQT_SLOT(slotDomNodeModified(DOM::Node, NodeModifsSet*)));
+ connect(m_kafkaPart, TQT_SIGNAL(domNodeIsAboutToBeRemoved(DOM::Node, bool, NodeModifsSet*)),
+ this, TQT_SLOT(slotDomNodeAboutToBeRemoved(DOM::Node, bool, NodeModifsSet*)));
+ connect(m_kafkaPart, TQT_SIGNAL(domNodeIsAboutToBeMoved(DOM::Node, DOM::Node, DOM::Node, NodeModifsSet*)),
+ this, TQT_SLOT(slotDomNodeIsAboutToBeMoved(DOM::Node, DOM::Node, DOM::Node, NodeModifsSet*)));
- connect(m_kafkaPart, SIGNAL(domNodeNewCursorPos(DOM::Node, int)),
- this, SLOT(slotdomNodeNewCursorPos(DOM::Node, int)));
+ connect(m_kafkaPart, TQT_SIGNAL(domNodeNewCursorPos(DOM::Node, int)),
+ this, TQT_SLOT(slotdomNodeNewCursorPos(DOM::Node, int)));
}
@@ -152,7 +152,7 @@ void KafkaDocument::loadDocument(Document *doc)
if(!m_kafkaPart) return;
if(!doc) return;
#ifdef LIGHT_DEBUG
- QTime t;
+ TQTime t;
t.start();
#endif
m_currentDoc = doc;
@@ -336,7 +336,7 @@ Node *KafkaDocument::getNode(DOM::Node _domNode)
kNodeAttrs* KafkaDocument::connectDomNodeToQuantaNode(DOM::Node domNode, Node *node)
{
- QString name;
+ TQString name;
kNodeAttrs *props;
if(domNode.isNull())
@@ -512,7 +512,7 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode)
#endif
DOM::Node newNode, newNode2, attr, nextNode, parentNode, *ptDomNode;
bool removeLeftWhitespaces, removeRightWhitespaces;
- QString str, nodeValue;
+ TQString str, nodeValue;
Node *n, *parent;
int i;
@@ -686,7 +686,7 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode)
if(!attr.isNull())
{
//TODO: create a createAttr function and add this (setNodeValue sometimes
- //don't like null QString)
+ //don't like null TQString)
if(!node->tag->attributeValue(i).isNull())
attr.setNodeValue(node->tag->attributeValue(i));
kafkaCommon::insertDomNodeAttribute(newNode, attr);
@@ -806,7 +806,7 @@ void KafkaDocument::buildNodeFromKafkaNode(Node *node, DOM::Node domNode)
node->tag->setIndentationDone(false);
if(domNode.nodeType() == DOM::Node::TEXT_NODE)
{
- QString text = domNode.nodeValue().string();
+ TQString text = domNode.nodeValue().string();
text.replace("<", "&lt;");
text.replace(">", "&gt;");
node->tag->setStr(text);
@@ -873,9 +873,9 @@ Node * KafkaDocument::buildNodeFromKafkaNode(DOM::Node domNode, Node *nodeParent
return node;
}
-QString KafkaDocument::getDecodedChar(const QString &encodedChar)
+TQString KafkaDocument::getDecodedChar(const TQString &encodedChar)
{
- QMap<QString, QString>::Iterator it = encodedChars.find(encodedChar);
+ TQMap<TQString, TQString>::Iterator it = encodedChars.find(encodedChar);
if(it == encodedChars.end())
{
//try this
@@ -884,16 +884,16 @@ QString KafkaDocument::getDecodedChar(const QString &encodedChar)
return it.data();
}
-QString KafkaDocument::getDecodedText(const QString &a_encodedText, bool translateWhiteSpacesAndLineBreaks,
+TQString KafkaDocument::getDecodedText(const TQString &a_encodedText, bool translateWhiteSpacesAndLineBreaks,
bool removeLeftWhitespaces, bool removeRightWhitespaces)
{
- QString encodedText = a_encodedText;
+ TQString encodedText = a_encodedText;
if (encodedText.isEmpty())
encodedText = " ";
- QString decodedChar;
+ TQString decodedChar;
int i, j;
#ifdef LIGHT_DEBUG
- QString oldEncodedText = encodedText;
+ TQString oldEncodedText = encodedText;
#endif
i = -1;
@@ -913,11 +913,11 @@ QString KafkaDocument::getDecodedText(const QString &a_encodedText, bool transla
i = -1;
while((unsigned)++i < encodedText.length())
{
- if(QString(encodedText[i]) == "&")
+ if(TQString(encodedText[i]) == "&")
{
j = i;
while((unsigned)++i < encodedText.length() &&
- QString(encodedText[i]) != ";")
+ TQString(encodedText[i]) != ";")
{}
decodedChar = getDecodedChar(encodedText.mid(j, i - j + 1));
encodedText.remove(j, i - j + 1);
@@ -943,28 +943,28 @@ QString KafkaDocument::getDecodedText(const QString &a_encodedText, bool transla
//return KGlobal::charsets()->resolveEntities(encodedText); =>nice but not sufficient
}
-QString KafkaDocument::getEncodedChar(const QString &decodedChar, const QString &previousDecodedChar)
+TQString KafkaDocument::getEncodedChar(const TQString &decodedChar, const TQString &previousDecodedChar)
{
if(decodedChar[0].isSpace() && !previousDecodedChar[0].isSpace())
return " ";
else if(decodedChar[0].isSpace())
//FIXME:for an unknown reason, by default it return &iquest; instead of &nbsp;
return "&nbsp;";
- QMap<QString, QString>::Iterator it = decodedChars.find(decodedChar);
+ TQMap<TQString, TQString>::Iterator it = decodedChars.find(decodedChar);
if(it == decodedChars.end())
return decodedChar;
return it.data();
}
-QString KafkaDocument::getEncodedText(const QString &a_decodedText, int bLine, int bCol, int &eLine, int &eCol,
+TQString KafkaDocument::getEncodedText(const TQString &a_decodedText, int bLine, int bCol, int &eLine, int &eCol,
bool translateWhiteSpaces)
{
- QString decodedText = a_decodedText;
- QString Encodedchar;
- QString decodedChar, previousDecodedChar;
+ TQString decodedText = a_decodedText;
+ TQString Encodedchar;
+ TQString decodedChar, previousDecodedChar;
#ifdef LIGHT_DEBUG
- QString oldDecodedText = decodedText;
+ TQString oldDecodedText = decodedText;
#endif
int i;
#ifdef LIGHT_DEBUG
@@ -975,11 +975,11 @@ QString KafkaDocument::getEncodedText(const QString &a_decodedText, int bLine, i
while((unsigned)++i < decodedText.length())
{
previousDecodedChar = decodedChar;
- decodedChar = QString(decodedText[i]);
+ decodedChar = TQString(decodedText[i]);
if(translateWhiteSpaces || !decodedText[i].isSpace())
- Encodedchar = getEncodedChar(QString(decodedText[i]),
- (i>=1)?previousDecodedChar:QString(""));
+ Encodedchar = getEncodedChar(TQString(decodedText[i]),
+ (i>=1)?previousDecodedChar:TQString(""));
else
Encodedchar = decodedChar;
bCol += Encodedchar.length();
@@ -997,15 +997,15 @@ QString KafkaDocument::getEncodedText(const QString &a_decodedText, int bLine, i
return decodedText;
}
-QString KafkaDocument::getEncodedText(const QString& decodedText)
+TQString KafkaDocument::getEncodedText(const TQString& decodedText)
{
int a = 0, b = 0, c, d;
return getEncodedText(decodedText, a, b, c, d);
}
-QString KafkaDocument::generateCodeFromNode(Node *node, int bLine, int bCol, int &eLine, int &eCol, bool encodeText)
+TQString KafkaDocument::generateCodeFromNode(Node *node, int bLine, int bCol, int &eLine, int &eCol, bool encodeText)
{
- QString text, _char;
+ TQString text, _char;
Node *openingNode;
int bLineAttr, bColAttr;
int j = 0;
@@ -1102,7 +1102,7 @@ QString KafkaDocument::generateCodeFromNode(Node *node, int bLine, int bCol, int
/** Can't use KGlobal::charsets()->toEntity() :
* It translate all chars into entities! */
else if(!hasPreParent)
- text = node->tag->tagStr().replace(QRegExp("\\s+"), " ");
+ text = node->tag->tagStr().replace(TQRegExp("\\s+"), " ");
else
text = node->tag->tagStr();
}
@@ -1142,7 +1142,7 @@ void KafkaDocument::translateQuantaIntoKafkaCursorPosition(uint curLine, uint cu
{
Node *node;
int bCol, bLine, eCol, eLine, col, line;
- QString curChar, decodedChar, currentLine;
+ TQString curChar, decodedChar, currentLine;
bool lookForEntity, lookForSpaces, found;
node = baseNode;
@@ -1248,7 +1248,7 @@ void KafkaDocument::translateQuantaIntoKafkaCursorPosition(uint curLine, uint cu
void KafkaDocument::translateQuantaIntoNodeCursorPosition(uint line, uint col, Node **node, long &offset)
{
int curCol, curLine, beginCol, beginLine;
- QString currentLine;
+ TQString currentLine;
*node = parser->nodeAt(line, col, false);
@@ -1288,8 +1288,8 @@ void KafkaDocument::translateQuantaIntoNodeCursorPosition(uint line, uint col, N
void KafkaDocument::translateKafkaIntoNodeCursorPosition(DOM::Node domNode, long domNodeOffset, Node **node, long &offset)
{
- QString decodedText, encodedChar, encodedText, currentChar;
- QChar curChar, oldChar;
+ TQString decodedText, encodedChar, encodedText, currentChar;
+ TQChar curChar, oldChar;
long currentOffset;
bool waitForSpace = false, found = false;
int curNodeOffset, bLine = 0, bCol = 0, eLine, eCol;
@@ -1356,10 +1356,10 @@ void KafkaDocument::translateKafkaIntoNodeCursorPosition(DOM::Node domNode, long
{
curChar = decodedText.at(domNodeOffset - currentOffset);
#ifdef HEAVY_DEBUG
- //kdDebug(24000)<< "CurChar:" << QString(curChar) << ": oldChar:" <<
- // QString(oldChar) << endl;
+ //kdDebug(24000)<< "CurChar:" << TQString(curChar) << ": oldChar:" <<
+ // TQString(oldChar) << endl;
#endif
- encodedChar = getEncodedChar(QString(curChar), QString(oldChar));
+ encodedChar = getEncodedChar(TQString(curChar), TQString(oldChar));
if(encodedChar == "&nbsp;")
encodedChar = " ";
found = false;
@@ -1409,8 +1409,8 @@ void KafkaDocument::translateKafkaIntoQuantaCursorPosition(DOM::Node _currentDom
{
Node *_currentNode, *closingNode, *node;
kNodeAttrs *attrs;
- QString decodedText, encodedChar, currentLine, currentChar;
- QChar curChar, oldChar;
+ TQString decodedText, encodedChar, currentLine, currentChar;
+ TQChar curChar, oldChar;
int currentOffset;
int curLine, curCol, endLine, endCol;
int i;
@@ -1504,9 +1504,9 @@ void KafkaDocument::translateKafkaIntoQuantaCursorPosition(DOM::Node _currentDom
{
curChar = decodedText[offset - currentOffset];
#ifdef HEAVY_DEBUG
-// kdDebug(24000)<< "CurChar:" << QString(curChar) << ": oldChar:" << QString(oldChar) << endl;
+// kdDebug(24000)<< "CurChar:" << TQString(curChar) << ": oldChar:" << TQString(oldChar) << endl;
#endif
- encodedChar = getEncodedChar(QString(curChar), QString(oldChar));
+ encodedChar = getEncodedChar(TQString(curChar), TQString(oldChar));
if(encodedChar == "&nbsp;")
encodedChar = " ";
found = false;
@@ -1631,7 +1631,7 @@ void KafkaDocument::translateKafkaIntoQuantaCursorPosition(DOM::Node _currentDom
void KafkaDocument::translateNodeIntoKafkaCursorPosition(Node *node, int offset, DOM::Node &domNode,
long &domNodeOffset)
{
- QString textNode, curChar;
+ TQString textNode, curChar;
int col;
bool lookForEntity, lookForSpaces, found;
@@ -1820,7 +1820,7 @@ void KafkaDocument::coutLinkTree(Node *, int)
#endif
{
#ifdef HEAVY_DEBUG
- QString output, dots;
+ TQString output, dots;
DOM::Node domNode;
Node *n = 0L;
if(!node)
@@ -1869,7 +1869,7 @@ void KafkaDocument::slotDomNodeInserted(DOM::Node domNode, bool insertChilds, No
bool b = false;
#ifdef LIGHT_DEBUG
- QTime t;
+ TQTime t;
t.start();
#endif
@@ -1935,7 +1935,7 @@ void KafkaDocument::slotDomNodeModified(DOM::Node domNode, NodeModifsSet* modifs
QTag *qTag;
#ifdef LIGHT_DEBUG
- QTime t;
+ TQTime t;
t.start();
#endif
@@ -2065,7 +2065,7 @@ void KafkaDocument::slotDomNodeAboutToBeRemoved(DOM::Node _domNode, bool deleteC
NodeModif *modif;
#ifdef LIGHT_DEBUG
- QTime t;
+ TQTime t;
t.start();
#endif
@@ -2285,7 +2285,7 @@ void KafkaDocument::slotdomNodeNewCursorPos(DOM::Node, int)
void KafkaDocument::slotCut()
{
- QString text = m_kafkaPart->selectedText();
+ TQString text = m_kafkaPart->selectedText();
NodeSelectionInd selection_ind;
selection_ind.fillWithVPLCursorSelection();
@@ -2305,7 +2305,7 @@ void KafkaDocument::slotCut()
}
void KafkaDocument::slotCut(Node* startNode, int startOffset, Node* endNode, int endOffset,
- Node** cursorNode, long cursorOffset, QString const& text)
+ Node** cursorNode, long cursorOffset, TQString const& text)
{
if(!startNode || !endNode)
return;
@@ -2323,12 +2323,12 @@ void KafkaDocument::slotCut(Node* startNode, int startOffset, Node* endNode, int
if(subtree_root)
{
KafkaDragObject* node_drag = new KafkaDragObject(subtree_root);
- QTextDrag* text_drag = new QTextDrag(text);
+ TQTextDrag* text_drag = new TQTextDrag(text);
KMultipleDrag* drag_object = new KMultipleDrag();
drag_object->addDragObject(node_drag);
drag_object->addDragObject(text_drag);
- QApplication::clipboard()->setData(drag_object);
+ TQApplication::clipboard()->setData(drag_object);
#ifdef LIGHT_DEBUG
kafkaCommon::coutTree(subtree_root, 3);
#endif
@@ -2337,7 +2337,7 @@ void KafkaDocument::slotCut(Node* startNode, int startOffset, Node* endNode, int
void KafkaDocument::slotCopy()
{
- QString text = m_kafkaPart->selectedText();
+ TQString text = m_kafkaPart->selectedText();
NodeSelectionInd selection_ind;
selection_ind.fillWithVPLCursorSelection();
@@ -2350,7 +2350,7 @@ void KafkaDocument::slotCopy()
slotCopy(startNode, startOffset, endNode, endOffset, text);
}
-void KafkaDocument::slotCopy(Node* startNode, int startOffset, Node* endNode, int endOffset, QString const& text)
+void KafkaDocument::slotCopy(Node* startNode, int startOffset, Node* endNode, int endOffset, TQString const& text)
{
if(!startNode || !endNode)
return;
@@ -2360,12 +2360,12 @@ void KafkaDocument::slotCopy(Node* startNode, int startOffset, Node* endNode, in
if(subtree_root)
{
KafkaDragObject* node_drag = new KafkaDragObject(subtree_root);
- QTextDrag* text_drag = new QTextDrag(text);
+ TQTextDrag* text_drag = new TQTextDrag(text);
KMultipleDrag* drag_object = new KMultipleDrag();
drag_object->addDragObject(node_drag);
drag_object->addDragObject(text_drag);
- QApplication::clipboard()->setData(drag_object);
+ TQApplication::clipboard()->setData(drag_object);
// FIXME delete the subtree
#ifdef LIGHT_DEBUG
kafkaCommon::coutTree(subtree_root, 3);
@@ -2375,8 +2375,8 @@ void KafkaDocument::slotCopy(Node* startNode, int startOffset, Node* endNode, in
void KafkaDocument::slotPaste()
{
- QClipboard *cb = QApplication::clipboard();
- QMimeSource* e = cb->data();
+ QClipboard *cb = TQApplication::clipboard();
+ TQMimeSource* e = cb->data();
Node* node = new Node(0);
if(KafkaDragObject::decode(e, node))
diff --git a/quanta/parts/kafka/wkafkapart.h b/quanta/parts/kafka/wkafkapart.h
index 6b045150..712dc2e2 100644
--- a/quanta/parts/kafka/wkafkapart.h
+++ b/quanta/parts/kafka/wkafkapart.h
@@ -34,9 +34,9 @@ struct DTDStruct;
class NodeSelectionInd;
class NodeModifsSet;
-#include <qmap.h>
-#include <qobject.h>
-#include <qptrdict.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqptrdict.h>
#include "kafkahtmlpart.h"
@@ -52,7 +52,7 @@ class KafkaDocument : public QObject
Q_OBJECT
public:
/** Returns a reference to the KafkaDocument object */
- static KafkaDocument* const ref(QWidget *parent = 0L, QWidget *widgetParent = 0L, const char *name = 0L)
+ static KafkaDocument* const ref(TQWidget *parent = 0L, TQWidget *widgetParent = 0L, const char *name = 0L)
{
static KafkaDocument *m_ref;
if (!m_ref) m_ref = new KafkaDocument(parent, widgetParent, name);
@@ -184,7 +184,7 @@ public:
* from its encoded form (e.g. &nbsp;)
* @return Returns the special character.
*/
- QString getDecodedChar(const QString &encodedChar);
+ TQString getDecodedChar(const TQString &encodedChar);
/**
* This function returns the text decoded from its XML-encoded form.
@@ -197,7 +197,7 @@ public:
* e.g. if the current text is the last child of a BLOCK Node (e.g. P)
* @return Returns the text decoded.
*/
- QString getDecodedText(const QString &encodedText, bool translateWhiteSpacesAndLineBreaks = true,
+ TQString getDecodedText(const TQString &encodedText, bool translateWhiteSpacesAndLineBreaks = true,
bool removeLeftWhitespaces = false, bool removeRightWhitespaces = false);
/**
@@ -207,7 +207,7 @@ public:
* @param previousDecodedchar The previous decoded character.
* @return Returns the XML-encoded character.
*/
- QString getEncodedChar(const QString &decodedChar, const QString &previousDecodedChar);
+ TQString getEncodedChar(const TQString &decodedChar, const TQString &previousDecodedChar);
/**
* This function returns the text with all the special XML characters encoded.
@@ -220,14 +220,14 @@ public:
* into &nbsp; Set it to false for PRE Tag.
* @return Return the XML-encoded text.
*/
- QString getEncodedText(const QString &decodedText, int bLine, int bCol, int &eLine, int &eCol,
+ TQString getEncodedText(const TQString &decodedText, int bLine, int bCol, int &eLine, int &eCol,
bool translateWhiteSpaces = true);
/**
* This function behaves essentially like the above function except that it doesn't
* return the position of the encoded text.
*/
- QString getEncodedText(const QString &decodedText);
+ TQString getEncodedText(const TQString &decodedText);
/**
* This function generates the code corresponding to the XML node.
@@ -240,7 +240,7 @@ public:
* (e.g. whitespace => &nbsp;)
* @return Returns the code.
*/
- QString generateCodeFromNode(Node *node, int bLine, int bCol, int &eLine, int &eCol,
+ TQString generateCodeFromNode(Node *node, int bLine, int bCol, int &eLine, int &eCol,
bool encodeText = true);
@@ -448,23 +448,23 @@ public slots:
void slotPaste();
void slotCut(Node* startNode, int startOffset, Node* endNode, int endOffset,
- Node** cursorNode, long cursorOffset, QString const& plainText);
- void slotCopy(Node* startNode, int startOffset, Node* endNode, int endOffset, QString const& plainText);
+ Node** cursorNode, long cursorOffset, TQString const& plainText);
+ void slotCopy(Node* startNode, int startOffset, Node* endNode, int endOffset, TQString const& plainText);
public:
- //use a QPtrList aferwards
+ //use a TQPtrList aferwards
NodeEnhancer *mainEnhancer;
private:
/**
* Create a KafkaWidget.
*/
- KafkaDocument(QWidget *parent, QWidget *widgetParent, const char *name);
+ KafkaDocument(TQWidget *parent, TQWidget *widgetParent, const char *name);
- QMap<QString, QString> decodedChars;
- QMap<QString, QString> encodedChars;
- QPtrDict<kNodeAttrs> domNodeProps;
- QGuardedPtr<KafkaWidget> m_kafkaPart;
+ TQMap<TQString, TQString> decodedChars;
+ TQMap<TQString, TQString> encodedChars;
+ TQPtrDict<kNodeAttrs> domNodeProps;
+ TQGuardedPtr<KafkaWidget> m_kafkaPart;
Document *m_currentDoc;
bool _docLoaded;