summaryrefslogtreecommitdiffstats
path: root/quanta/parts/kafka/kafkahtmlpart.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'quanta/parts/kafka/kafkahtmlpart.cpp')
-rw-r--r--quanta/parts/kafka/kafkahtmlpart.cpp88
1 files changed, 44 insertions, 44 deletions
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())