summaryrefslogtreecommitdiffstats
path: root/umbrello/umbrello/dialogs/codeeditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'umbrello/umbrello/dialogs/codeeditor.cpp')
-rw-r--r--umbrello/umbrello/dialogs/codeeditor.cpp190
1 files changed, 95 insertions, 95 deletions
diff --git a/umbrello/umbrello/dialogs/codeeditor.cpp b/umbrello/umbrello/dialogs/codeeditor.cpp
index c05b80bb..9fe17afc 100644
--- a/umbrello/umbrello/dialogs/codeeditor.cpp
+++ b/umbrello/umbrello/dialogs/codeeditor.cpp
@@ -22,13 +22,13 @@
#include "codeeditor.h"
// qt/kde includes
-#include <qkeysequence.h>
-#include <qcursor.h>
-#include <qcolor.h>
-#include <qlabel.h>
-#include <qbrush.h>
-#include <qlayout.h>
-#include <qregexp.h>
+#include <tqkeysequence.h>
+#include <tqcursor.h>
+#include <tqcolor.h>
+#include <tqlabel.h>
+#include <tqbrush.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <klocale.h>
@@ -55,14 +55,14 @@
#include "umlroledialog.h"
#include "umloperationdialog.h"
-CodeEditor::CodeEditor ( const QString & text, const QString & context, CodeViewerDialog * parent, const char * name , CodeDocument * doc)
- : QTextEdit ( text, context, parent, name)
+CodeEditor::CodeEditor ( const TQString & text, const TQString & context, CodeViewerDialog * parent, const char * name , CodeDocument * doc)
+ : TQTextEdit ( text, context, parent, name)
{
init(parent, doc);
}
CodeEditor::CodeEditor ( CodeViewerDialog * parent, const char* name, CodeDocument * doc )
- : QTextEdit ( parent, name )
+ : TQTextEdit ( parent, name )
{
init(parent, doc);
}
@@ -90,7 +90,7 @@ Settings::CodeViewerState CodeEditor::getState()
return m_parentDlg->getState();
}
-QLabel * CodeEditor::getComponentLabel() {
+TQLabel * CodeEditor::getComponentLabel() {
return m_parentDlg->componentLabel;
}
@@ -98,7 +98,7 @@ QLabel * CodeEditor::getComponentLabel() {
// FIX: used only for debugging right now.. eliminate eventually -b.t.
void CodeEditor::clicked(int para, int pos)
{
- getComponentLabel()->setText("para:"+QString::number(para)+" pos:"+QString::number(pos));
+ getComponentLabel()->setText("para:"+TQString::number(para)+" pos:"+TQString::number(pos));
}
@@ -112,7 +112,7 @@ bool CodeEditor::close ( bool alsoDelete )
m_lastTextBlockToBeEdited = 0;
}
- return QTextEdit::close(alsoDelete);
+ return TQTextEdit::close(alsoDelete);
}
@@ -177,14 +177,14 @@ void CodeEditor::editTextBlock(TextBlock * tBlock, int para) {
}
// return whether is empty or just whitespace
-bool CodeEditor::StringIsBlank(const QString &str)
+bool CodeEditor::StringIsBlank(const TQString &str)
{
if(str.isEmpty() || str.stripWhiteSpace().isEmpty())
return true;
return false;
}
-void CodeEditor::keyPressEvent ( QKeyEvent * e ) {
+void CodeEditor::keyPressEvent ( TQKeyEvent * e ) {
// kDebug() <<"KEY PRESS EVENT:["<<e->text().latin1()<<"] ascii CODE:"<<e->ascii();
@@ -195,7 +195,7 @@ void CodeEditor::keyPressEvent ( QKeyEvent * e ) {
if((e->ascii() == 10) || (e->ascii() == 13) || (e->text() == "\r\n"))
m_newLinePressed = true;
- QTextEdit::keyPressEvent(e);
+ TQTextEdit::keyPressEvent(e);
}
void CodeEditor::loadFromDocument ()
@@ -205,12 +205,12 @@ void CodeEditor::loadFromDocument ()
clearText();
// set caption on tool
- QString caption = m_parentDoc->getFileName() + m_parentDoc->getFileExtension();
+ TQString caption = m_parentDoc->getFileName() + m_parentDoc->getFileExtension();
setCaption( tr2i18n( caption.latin1() ) );
// header for document
- QString header = m_parentDoc->getHeader()->toString();
- QString componentName = QString("header for file ") +caption;
+ TQString header = m_parentDoc->getHeader()->toString();
+ TQString componentName = TQString("header for file ") +caption;
if(!StringIsBlank(header))
insert(header,m_parentDoc->getHeader(),false,getState().fontColor,
getState().nonEditBlockColor,0,componentName);
@@ -223,7 +223,7 @@ void CodeEditor::loadFromDocument ()
}
-void CodeEditor::insert (const QString & text, TextBlock * parent, bool editable, const QColor & fgcolor, const QColor & bgcolor, UMLObject * umlobj, const QString & displayName, int startLine)
+void CodeEditor::insert (const TQString & text, TextBlock * parent, bool editable, const TQColor & fgcolor, const TQColor & bgcolor, UMLObject * umlobj, const TQString & displayName, int startLine)
{
// set some params
@@ -235,19 +235,19 @@ void CodeEditor::insert (const QString & text, TextBlock * parent, bool editable
if(startLine == -1)
{
startLine = paragraphs()-1;
- QTextEdit::append(text); // put actual text in. Use insert instead of append so history is preserved?
+ TQTextEdit::append(text); // put actual text in. Use insert instead of append so history is preserved?
}
else
{
isInsert = true;
- QTextEdit::insertAt(text, startLine, 0);
+ TQTextEdit::insertAt(text, startLine, 0);
}
// actual put in text
// now do 'paragraph' background highlighting
// int endLine = paragraphs()-2;
- int endLine = text.contains(QRegExp("\n")) + startLine -1;
+ int endLine = text.contains(TQRegExp("\n")) + startLine -1;
if(m_isHighlighted)
for(int para=startLine;para<=endLine;para++)
setParagraphBackgroundColor(para,bgcolor);
@@ -297,7 +297,7 @@ void CodeEditor::insert (const QString & text, TextBlock * parent, bool editable
// that are greater than zero in that type of textblock
int increase = size + 1;
- QMap<TextBlock*,TextBlockInfo*>::Iterator it;
+ TQMap<TextBlock*,TextBlockInfo*>::Iterator it;
for ( it = m_tbInfoMap->begin(); it != m_tbInfoMap->end(); ++it )
{
TextBlock * tblock = it.key();
@@ -363,18 +363,18 @@ void CodeEditor::appendText(TextBlockList * items)
}
-void CodeEditor::appendText (CodeComment * comment, TextBlock * parent, UMLObject * umlObj , const QString & componentName)
+void CodeEditor::appendText (CodeComment * comment, TextBlock * parent, UMLObject * umlObj , const TQString & componentName)
{
if(!comment->getWriteOutText() && !m_showHiddenBlocks)
return;
- QColor bgcolor = getState().nonEditBlockColor;
+ TQColor bgcolor = getState().nonEditBlockColor;
if(!comment->getWriteOutText() && m_showHiddenBlocks)
bgcolor = getState().hiddenColor;
- QString indent = comment->getIndentationString();
- QString text = comment->toString(); // use comment formatting, NOT formatMultiLineText(comment->toString(), indent, "\n");
+ TQString indent = comment->getIndentationString();
+ TQString text = comment->toString(); // use comment formatting, NOT formatMultiLineText(comment->toString(), indent, "\n");
if(!StringIsBlank(text))
insert(text,parent,true,getState().fontColor, bgcolor, umlObj, componentName);
@@ -385,11 +385,11 @@ void CodeEditor::appendText (CodeBlockWithComments * cb ) {
if(!cb->getWriteOutText() && !m_showHiddenBlocks)
return;
- QString indent = cb->getIndentationString();
- QString body = cb->formatMultiLineText (cb->getText(), indent, "\n");
+ TQString indent = cb->getIndentationString();
+ TQString body = cb->formatMultiLineText (cb->getText(), indent, "\n");
- QColor bgcolor = getState().editBlockColor;
- QString componentName = QString("CodeBlock");
+ TQColor bgcolor = getState().editBlockColor;
+ TQString componentName = TQString("CodeBlock");
appendText(cb->getComment(), cb, 0, componentName);
@@ -406,13 +406,13 @@ void CodeEditor::appendText (CodeClassFieldDeclarationBlock * db ) {
if(!db->getWriteOutText() && !m_showHiddenBlocks)
return;
- QString indent = db->getIndentationString();
- QString body = db->formatMultiLineText (db->getText(), indent, "\n");
+ TQString indent = db->getIndentationString();
+ TQString body = db->formatMultiLineText (db->getText(), indent, "\n");
UMLObject * parentObj = db->getParentClassField()->getParentObject();
- QColor bgcolor = getState().editBlockColor;
- QString componentName = QString("");
+ TQColor bgcolor = getState().editBlockColor;
+ TQString componentName = TQString("");
if(parentObj)
{
if(db->getParentClassField()->parentIsAttribute()) {
@@ -443,13 +443,13 @@ void CodeEditor::appendText (CodeMethodBlock * mb) {
if(!mb->getWriteOutText() && (!m_showHiddenBlocks || dynamic_cast<CodeAccessorMethod*>(mb)))
return;
- QColor bgcolor = getState().umlObjectColor;
- QString indent = mb->getIndentationString();
- QString bodyIndent = mb->getIndentationString(mb->getIndentationLevel()+1);
+ TQColor bgcolor = getState().umlObjectColor;
+ TQString indent = mb->getIndentationString();
+ TQString bodyIndent = mb->getIndentationString(mb->getIndentationLevel()+1);
- QString startText = mb->formatMultiLineText ( mb->getStartMethodText(), indent, "\n");
- QString body = mb->formatMultiLineText (mb->getText(), bodyIndent, "\n");
- QString endText = mb->formatMultiLineText( mb->getEndMethodText(), indent, "\n");
+ TQString startText = mb->formatMultiLineText ( mb->getStartMethodText(), indent, "\n");
+ TQString body = mb->formatMultiLineText (mb->getText(), bodyIndent, "\n");
+ TQString endText = mb->formatMultiLineText( mb->getEndMethodText(), indent, "\n");
if(body.isEmpty())
body = " \n";
@@ -460,7 +460,7 @@ void CodeEditor::appendText (CodeMethodBlock * mb) {
bgcolor = getState().hiddenColor;
}
- QString componentName = QString("<b>parentless method\?</b>");
+ TQString componentName = TQString("<b>parentless method\?</b>");
// ugly, but we need to know if there is a parent object here.
CodeOperation * op = dynamic_cast<CodeOperation*>(mb);
@@ -504,11 +504,11 @@ void CodeEditor::appendText (TextBlock * tb) {
if(!tb->getWriteOutText() && !m_showHiddenBlocks)
return;
- QColor bgcolor = getState().nonEditBlockColor;
+ TQColor bgcolor = getState().nonEditBlockColor;
if(!tb->getWriteOutText() && m_showHiddenBlocks)
bgcolor = getState().hiddenColor;
- QString str = tb->toString();
+ TQString str = tb->toString();
insert(str,tb,false,getState().fontColor,bgcolor);
}
@@ -521,14 +521,14 @@ void CodeEditor::appendText(HierarchicalCodeBlock * hblock)
OwnedHierarchicalCodeBlock * test = dynamic_cast<OwnedHierarchicalCodeBlock *>(hblock);
UMLObject * parentObj = 0;
- QString componentName = QString("");
- QColor paperColor = getState().nonEditBlockColor;
+ TQString componentName = TQString("");
+ TQColor paperColor = getState().nonEditBlockColor;
if(test)
{
parentObj = test->getParentObject();
UMLClassifier *c = dynamic_cast<UMLClassifier*>(parentObj);
if (c) {
- QString typeStr;
+ TQString typeStr;
if (c->isInterface())
typeStr = "Interface";
else
@@ -545,9 +545,9 @@ void CodeEditor::appendText(HierarchicalCodeBlock * hblock)
paperColor = getState().hiddenColor;
TextBlockList * items = hblock->getTextBlockList();
- QString indent = hblock->getIndentationString();
- QString startText = hblock->formatMultiLineText ( hblock->getStartText(), indent, "\n");
- QString endText = hblock->formatMultiLineText( hblock->getEndText(), indent, "\n");
+ TQString indent = hblock->getIndentationString();
+ TQString startText = hblock->formatMultiLineText ( hblock->getStartText(), indent, "\n");
+ TQString endText = hblock->formatMultiLineText( hblock->getEndText(), indent, "\n");
appendText(hblock->getComment(), hblock, parentObj, componentName);
@@ -559,14 +559,14 @@ void CodeEditor::appendText(HierarchicalCodeBlock * hblock)
}
-void CodeEditor::insertParagraph ( const QString & text, int para )
+void CodeEditor::insertParagraph ( const TQString & text, int para )
{
- QTextEdit::insertParagraph(text,para);
+ TQTextEdit::insertParagraph(text,para);
}
void CodeEditor::removeParagraph ( int para )
{
- QTextEdit::removeParagraph(para);
+ TQTextEdit::removeParagraph(para);
}
// All umlobjects which may have pop-up boxes should return true here
@@ -623,10 +623,10 @@ void CodeEditor::slotInsertCodeBlockBeforeSelected()
int location = m_textBlockList.findRef(m_selectedTextBlock); // find first para of selected block
- QString body = newBlock->formatMultiLineText (newBlock->getText(), newBlock->getIndentationString(), "\n");
+ TQString body = newBlock->formatMultiLineText (newBlock->getText(), newBlock->getIndentationString(), "\n");
insert(body,newBlock,true,getState().fontColor,
- getState().editBlockColor,0,QString("CodeBlock"),location);
+ getState().editBlockColor,0,TQString("CodeBlock"),location);
}
@@ -645,21 +645,21 @@ void CodeEditor::slotInsertCodeBlockAfterSelected()
ParaInfo * lastpi = tbinfo->m_paraList.last();
int location = m_textBlockList.findRef(m_selectedTextBlock) + lastpi->start + lastpi->size + 1;
- QString body = newBlock->formatMultiLineText (newBlock->getText(), newBlock->getIndentationString(), "\n");
+ TQString body = newBlock->formatMultiLineText (newBlock->getText(), newBlock->getIndentationString(), "\n");
insert(body,newBlock,true,getState().fontColor,
- getState().editBlockColor,0,QString("CodeBlock"),location);
+ getState().editBlockColor,0,TQString("CodeBlock"),location);
}
-QPopupMenu * CodeEditor::createPopupMenu ( const QPoint & pos )
+TQPopupMenu * CodeEditor::createPopupMenu ( const TQPoint & pos )
{
TextBlock * tb = m_selectedTextBlock;
m_lastPara = paragraphAt(pos);
- QPopupMenu * menu = new QPopupMenu(this);
- // ugh. A bug in the Qt interaction between QTextEdit and Menu
+ TQPopupMenu * menu = new TQPopupMenu(this);
+ // ugh. A bug in the Qt interaction between TQTextEdit and Menu
// can sometimes trigger a clear() call of the text area after
// the popup menu is destroyed. The workaround is to disable
// the behavior by blocking the destroy signal from the menu.
@@ -668,26 +668,26 @@ QPopupMenu * CodeEditor::createPopupMenu ( const QPoint & pos )
if (m_selectedTextBlock)
{
if(tb->getWriteOutText())
- menu->insertItem("Hide",this,SLOT(slotChangeSelectedBlockView()), Key_H, 0);
+ menu->insertItem("Hide",this,TQT_SLOT(slotChangeSelectedBlockView()), Key_H, 0);
else
- menu->insertItem("Show",this,SLOT(slotChangeSelectedBlockView()), Key_S, 0);
+ menu->insertItem("Show",this,TQT_SLOT(slotChangeSelectedBlockView()), Key_S, 0);
CodeBlockWithComments * cb = dynamic_cast<CodeBlockWithComments*>(tb);
if(cb)
if(cb->getComment()->getWriteOutText())
- menu->insertItem("Hide Comment",this,SLOT(slotChangeSelectedBlockCommentView()), CTRL+Key_H, 1);
+ menu->insertItem("Hide Comment",this,TQT_SLOT(slotChangeSelectedBlockCommentView()), CTRL+Key_H, 1);
else
- menu->insertItem("Show Comment",this,SLOT(slotChangeSelectedBlockCommentView()), CTRL+Key_S, 1);
+ menu->insertItem("Show Comment",this,TQT_SLOT(slotChangeSelectedBlockCommentView()), CTRL+Key_S, 1);
menu->insertSeparator();
- menu->insertItem("Insert Code Block Before",this,SLOT(slotInsertCodeBlockBeforeSelected()), CTRL+Key_B, 2);
- menu->insertItem("Insert Code Block After",this,SLOT(slotInsertCodeBlockAfterSelected()), CTRL+Key_A, 3);
+ menu->insertItem("Insert Code Block Before",this,TQT_SLOT(slotInsertCodeBlockBeforeSelected()), CTRL+Key_B, 2);
+ menu->insertItem("Insert Code Block After",this,TQT_SLOT(slotInsertCodeBlockAfterSelected()), CTRL+Key_A, 3);
menu->insertSeparator();
- menu->insertItem("Copy",this,SLOT(slotCopyTextBlock()), CTRL+Key_C, 4);
- menu->insertItem("Paste",this,SLOT(slotPasteTextBlock()), CTRL+Key_V, 5);
- menu->insertItem("Cut",this,SLOT(slotCutTextBlock()), CTRL+Key_X, 6);
+ menu->insertItem("Copy",this,TQT_SLOT(slotCopyTextBlock()), CTRL+Key_C, 4);
+ menu->insertItem("Paste",this,TQT_SLOT(slotPasteTextBlock()), CTRL+Key_V, 5);
+ menu->insertItem("Cut",this,TQT_SLOT(slotCutTextBlock()), CTRL+Key_X, 6);
// enable/disable based on conditions
if(m_selectedTextBlock == m_parentDoc->getHeader())
@@ -783,7 +783,7 @@ void CodeEditor::init ( CodeViewerDialog * parentDlg, CodeDocument * parentDoc )
m_parentDoc = parentDoc;
setUndoRedoEnabled( false );
- setCursor( QCursor( 0 ) );
+ setCursor( TQCursor( 0 ) );
setMouseTracking( true );
setReadOnly (true);
m_isHighlighted = getState().blocksAreHighlighted;
@@ -794,7 +794,7 @@ void CodeEditor::init ( CodeViewerDialog * parentDlg, CodeDocument * parentDoc )
m_textBlockToPaste = 0;
m_selectedTextBlock = 0;
m_lastTextBlockToBeEdited = 0;
- m_tbInfoMap = new QMap<TextBlock *, TextBlockInfo*>;
+ m_tbInfoMap = new TQMap<TextBlock *, TextBlockInfo*>;
setFont( getState().font );
@@ -808,15 +808,15 @@ void CodeEditor::init ( CodeViewerDialog * parentDlg, CodeDocument * parentDoc )
// set some viewability parameters
//int margin = fontMetrics().height();
- QBrush pbrush = QBrush ( getState().paperColor);
+ TQBrush pbrush = TQBrush ( getState().paperColor);
setPaper(pbrush);
// setMargin(margin);
- // connect(this,SIGNAL(newLinePressed()),this,SLOT(newLinePressed()));
- // connect(this,SIGNAL(backspacePressed()),this,SLOT(backspacePressed()));
- connect(this,SIGNAL(doubleClicked(int,int)),this,SLOT(doubleClicked(int,int)));
- connect(this,SIGNAL(cursorPositionChanged(int,int)),this,SLOT(cursorPositionChanged(int,int)));
+ // connect(this,TQT_SIGNAL(newLinePressed()),this,TQT_SLOT(newLinePressed()));
+ // connect(this,TQT_SIGNAL(backspacePressed()),this,TQT_SLOT(backspacePressed()));
+ connect(this,TQT_SIGNAL(doubleClicked(int,int)),this,TQT_SLOT(doubleClicked(int,int)));
+ connect(this,TQT_SIGNAL(cursorPositionChanged(int,int)),this,TQT_SLOT(cursorPositionChanged(int,int)));
// do this last
loadFromDocument();
@@ -828,16 +828,16 @@ void CodeEditor::updateTextBlockFromText (TextBlock * block) {
if (block) {
CodeMethodBlock * cmb = dynamic_cast<CodeMethodBlock*>(block);
- //QString baseIndent = block->getNewEditorLine(block->getIndentationLevel()+(cmb ? 1 : 0));
- QString baseIndent = block->getIndentationString(block->getIndentationLevel()+(cmb ? 1 : 0));
+ //TQString baseIndent = block->getNewEditorLine(block->getIndentationLevel()+(cmb ? 1 : 0));
+ TQString baseIndent = block->getIndentationString(block->getIndentationLevel()+(cmb ? 1 : 0));
TextBlockInfo *info = (*m_tbInfoMap)[block];
UMLObject * parentObj = info->getParent();
int pstart = m_textBlockList.findRef(block);
- QString content = "";
+ TQString content = "";
// Assemble content from editiable paras
- QPtrList<ParaInfo> list = info->m_paraList;
+ TQPtrList<ParaInfo> list = info->m_paraList;
for(ParaInfo * item = list.first(); item; item=list.next())
{
if(item->isEditable)
@@ -847,7 +847,7 @@ void CodeEditor::updateTextBlockFromText (TextBlock * block) {
int lastLineToAddNewLine = lastpara + endEdit;
for(int para=(item->start+pstart);para<=lastpara;para++)
{
- QString line = block->unformatText(text(para), baseIndent);
+ TQString line = block->unformatText(text(para), baseIndent);
content += line;
// \n are implicit in the editor (!) so we should put them
// back in, if there is any content from the line
@@ -907,13 +907,13 @@ void CodeEditor::cursorPositionChanged(int para, int pos)
CodeMethodBlock * cmb = dynamic_cast<CodeMethodBlock*>(tBlock);
// auto-indent new lines
- QString currentParaText = text(para);
- QString baseIndent = tBlock->getNewEditorLine(tBlock->getIndentationLevel()+(cmb ? 1 : 0));
+ TQString currentParaText = text(para);
+ TQString baseIndent = tBlock->getNewEditorLine(tBlock->getIndentationLevel()+(cmb ? 1 : 0));
// cerr<<"AUTO INDENT:["<<baseIndent.latin1()<<"] isMethod?"<<(cmb?"true":"false")<<endl;
int minPos = baseIndent.length();
// add indent chars to the current line, if missing
- if(!m_backspacePressed && !currentParaText.contains(QRegExp('^'+baseIndent)))
+ if(!m_backspacePressed && !currentParaText.contains(TQRegExp('^'+baseIndent)))
{
insertAt(baseIndent,para,0);
setCursorPosition(para,pos+minPos);
@@ -929,7 +929,7 @@ void CodeEditor::cursorPositionChanged(int para, int pos)
int endOfPriorLine = paragraphLength(para-1);
// IN this case, we remove old (para) line, and tack its
// contents on the line we are going to.
- QString contents = text(para);
+ TQString contents = text(para);
contents = contents.right(contents.length()-m_lastPos+1);
// this next thing happens when we arent deleting last line
@@ -949,7 +949,7 @@ void CodeEditor::cursorPositionChanged(int para, int pos)
// the indentation
if(m_backspacePressed && !priorParaIsEditable)
{
- QString contents = text(para);
+ TQString contents = text(para);
contents = contents.right(contents.length()-m_lastPos+1);
contents = baseIndent + contents.left(contents.length()-1); // left is to remove trailing space
insertParagraph(contents,para+1);
@@ -957,7 +957,7 @@ void CodeEditor::cursorPositionChanged(int para, int pos)
// furthermore, IF its nothing but indentation + whitespace
// we switch this back to Auto-Generated.
- if(cmb && contents.contains(QRegExp('^'+baseIndent+"\\s$")))
+ if(cmb && contents.contains(TQRegExp('^'+baseIndent+"\\s$")))
{
cmb->setContentType(CodeBlock::AutoGenerated);
cmb->syncToParent();
@@ -1008,7 +1008,7 @@ bool CodeEditor::paraIsNotSingleLine (int para)
{
int pstart = m_textBlockList.findRef(tBlock);
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
- QPtrList<ParaInfo> list = info->m_paraList;
+ TQPtrList<ParaInfo> list = info->m_paraList;
for(ParaInfo * item = list.first(); item; item=list.next())
if((pstart+item->start) <= para && (item->start+pstart+item->size) >= para )
@@ -1032,7 +1032,7 @@ bool CodeEditor::isParaEditable (int para) {
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
int pstart = m_textBlockList.findRef(tBlock);
int relativeLine = para - pstart;
- QPtrList<ParaInfo> list = info->m_paraList;
+ TQPtrList<ParaInfo> list = info->m_paraList;
for(ParaInfo * item = list.first(); item; item=list.next())
{
if((item->start+pstart) <= para && (item->start+pstart+item->size) >= para)
@@ -1054,7 +1054,7 @@ void CodeEditor::changeTextBlockHighlighting(TextBlock * tBlock, bool selected)
if(tBlock)
{
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
- QPtrList<ParaInfo> list = info->m_paraList;
+ TQPtrList<ParaInfo> list = info->m_paraList;
int pstart = m_textBlockList.findRef(tBlock);
for(ParaInfo * item = list.first(); item; item=list.next())
for(int p=(item->start+pstart);p<=(item->start+pstart+item->size);p++)
@@ -1115,7 +1115,7 @@ void CodeEditor::contractSelectedParagraph( int paraToRemove ) {
{
int pstart = m_textBlockList.findRef(tBlock);
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
- QPtrList<ParaInfo> list = info->m_paraList;
+ TQPtrList<ParaInfo> list = info->m_paraList;
bool lowerStartPosition = false;
for(ParaInfo * item = list.first(); item; item=list.next())
@@ -1148,7 +1148,7 @@ void CodeEditor::expandSelectedParagraph( int priorPara ) {
// add this tBlock in
m_textBlockList.insert(priorPara,tBlock);
TextBlockInfo *info = (*m_tbInfoMap)[tBlock];
- QPtrList<ParaInfo> list = info->m_paraList;
+ TQPtrList<ParaInfo> list = info->m_paraList;
int pstart = m_textBlockList.findRef(tBlock);
// now update the paragraph information
@@ -1170,7 +1170,7 @@ void CodeEditor::expandSelectedParagraph( int priorPara ) {
}
-void CodeEditor::contentsMouseMoveEvent ( QMouseEvent * e )
+void CodeEditor::contentsMouseMoveEvent ( TQMouseEvent * e )
{
int para = paragraphAt(e->pos());
@@ -1212,7 +1212,7 @@ void CodeEditor::contentsMouseMoveEvent ( QMouseEvent * e )
// If connections are right, then the UMLObject will send out the modified()
// signal which will trigger a call to re-generate the appropriate code within
// the code document. Our burden is to appropriately prepare the tool: we clear
-// out ALL the textblocks in the QTextEdit widget and then re-show them
+// out ALL the textblocks in the TQTextEdit widget and then re-show them
// after the dialog disappears
void CodeEditor::rebuildView( int startCursorPos ) {