summaryrefslogtreecommitdiffstats
path: root/src/modules/editor/scripteditor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/editor/scripteditor.cpp')
-rw-r--r--src/modules/editor/scripteditor.cpp102
1 files changed, 51 insertions, 51 deletions
diff --git a/src/modules/editor/scripteditor.cpp b/src/modules/editor/scripteditor.cpp
index 6945cd1e..9d704ec7 100644
--- a/src/modules/editor/scripteditor.cpp
+++ b/src/modules/editor/scripteditor.cpp
@@ -107,11 +107,11 @@ void KviCompletionBox::updateContents(TQString buffer)
if(pos>0)
{
szModule=buffer.left(pos);
- if(szModule[0].tqunicode()=='$')
+ if(szModule[0].unicode()=='$')
szModule.remove(0,1);
}
- if(pCur->tqunicode() == '$')
+ if(pCur->unicode() == '$')
{
buffer.remove(0,1);
if(!buffer.isEmpty())
@@ -369,13 +369,13 @@ void KviScriptEditorWidget::keyPressEvent(TQKeyEvent * e)
TQString szPrev=text(para-1);
if(!szPrev.isEmpty())
{
- if(szPrev.at(szPrev.length() - 1).tqunicode() == ' ')
+ if(szPrev.at(szPrev.length() - 1).unicode() == ' ')
szPrev.remove(szPrev.length() - 1,1);
TQString szCur;
const TQChar * pCur = (const TQChar *)szPrev.ucs2();
if(pCur)
{
- while(pCur->tqunicode() && pCur->isSpace())
+ while(pCur->unicode() && pCur->isSpace())
{
szCur.append(*pCur);
pCur++;
@@ -557,9 +557,9 @@ void KviScriptEditorWidget::slotComplete(const TQString &str)
bool bIsFirstWordInLine;
getWordBeforeCursor(buffer,index,&bIsFirstWordInLine);
int len=buffer.length();
-// if (buffer[1].tqunicode() == '$') len --;
+// if (buffer[1].unicode() == '$') len --;
complete.remove(0,len-1);
- if (buffer[1].tqunicode() == '$') complete.append("(");
+ if (buffer[1].unicode() == '$') complete.append("(");
else complete.append(" ");
insert (complete);
completelistbox->hide();
@@ -595,19 +595,19 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS
const TQChar * pBegin;
- while(c->tqunicode())
+ while(c->unicode())
{
if(bInComment)
{
pBegin = c;
- while(c->tqunicode() && (c->tqunicode() != '*'))c++;
- if(!c->tqunicode())
+ while(c->unicode() && (c->unicode() != '*'))c++;
+ if(!c->unicode())
{
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrComment);
return IN_COMMENT;
}
c++;
- if(c->tqunicode() == '/')
+ if(c->unicode() == '/')
{
// end of the comment!
c++;
@@ -620,14 +620,14 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS
if(c->isSpace())
{
- while(c->tqunicode() && c->isSpace())c++;
- if(!c->tqunicode())continue;
+ while(c->unicode() && c->isSpace())c++;
+ if(!c->unicode())continue;
}
pBegin = c;
// this does not break the bNewCommand flag
- if((c->tqunicode() == '{') || (c->tqunicode() == '}'))
+ if((c->unicode() == '{') || (c->unicode() == '}'))
{
c++;
setFormat(pBegin - pBuf,1,g_fntNormal,g_clrBracket);
@@ -639,12 +639,12 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS
{
bNewCommand = false;
- if(c->tqunicode() == '#')
+ if(c->unicode() == '#')
{
if(c > pBuf)
{
const TQChar * prev = c - 1;
- if((prev->tqunicode() == ']') || (prev->tqunicode() == '}'))
+ if((prev->unicode() == ']') || (prev->unicode() == '}'))
{
// array or hash count
c++;
@@ -653,19 +653,19 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS
}
}
// comment until the end of the line
- while(c->tqunicode())c++;
+ while(c->unicode())c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrComment);
continue;
}
- if(c->tqunicode() == '/')
+ if(c->unicode() == '/')
{
c++;
- if(c->tqunicode() == '/')
+ if(c->unicode() == '/')
{
- while(c->tqunicode())c++;
+ while(c->unicode())c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrComment);
continue;
- } else if(c->tqunicode() == '*')
+ } else if(c->unicode() == '*')
{
c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrComment);
@@ -674,13 +674,13 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS
}
c--;
}
- if(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == '_')))
+ if(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == '_')))
{
c++;
- while(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == '.') || (c->tqunicode() == '_') || (c->tqunicode() == ':')))c++;
+ while(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == '.') || (c->unicode() == '_') || (c->unicode() == ':')))c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrKeyword);
// special processing for callbacks and magic commands
- if(pBegin->tqunicode() == 'e')
+ if(pBegin->unicode() == 'e')
{
if(c - pBegin == 4)
{
@@ -691,7 +691,7 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS
}
}
else
- if(pBegin->tqunicode() == 'f')
+ if(pBegin->unicode() == 'f')
{
if(c - pBegin == 8)
{
@@ -702,7 +702,7 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS
}
}
- if(pBegin->tqunicode() == 'i')
+ if(pBegin->unicode() == 'i')
{
if(c - pBegin == 8)
{
@@ -717,28 +717,28 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS
continue;
}
}
- if(c->tqunicode() == '$')
+ if(c->unicode() == '$')
{
c++;
- if(c->tqunicode() == '$')
+ if(c->unicode() == '$')
{
c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrKeyword);
} else {
- while(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == '.') || (c->tqunicode() == '_') || (c->tqunicode() == ':')))c++;
+ while(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == '.') || (c->unicode() == '_') || (c->unicode() == ':')))c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrFunction);
}
continue;
}
- if(c->tqunicode() == '-')
+ if(c->unicode() == '-')
{
TQChar * pTmp =(TQChar *) c;
c++;
- if(c->tqunicode() == '-') c++;
+ if(c->unicode() == '-') c++;
if(c->isLetter())
{
- while(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == '_')))c++;
+ while(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == '_')))c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrKeyword);
continue;
} else {
@@ -746,35 +746,35 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS
}
}
- if(c->tqunicode() == '%')
+ if(c->unicode() == '%')
{
c++;
- if(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == ':') || (c->tqunicode() == '_')))
+ if(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == ':') || (c->unicode() == '_')))
{
- while(c->tqunicode() && (c->isLetterOrNumber() || (c->tqunicode() == ':') || (c->tqunicode() == '_')))c++;
+ while(c->unicode() && (c->isLetterOrNumber() || (c->unicode() == ':') || (c->unicode() == '_')))c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrVariable);
continue;
}
c--;
}
- if(!c->tqunicode())continue;
+ if(!c->unicode())continue;
- if(c->isLetterOrNumber() || c->tqunicode() == '_')
+ if(c->isLetterOrNumber() || c->unicode() == '_')
{
c++;
- while(c->tqunicode() && c->isLetterOrNumber() || (c->tqunicode() == '_'))c++;
+ while(c->unicode() && c->isLetterOrNumber() || (c->unicode() == '_'))c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrNormalText);
continue;
}
- if(c->tqunicode() == '\\')
+ if(c->unicode() == '\\')
{
c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrPunctuation);
// the next char is to be interpreted as normal text
pBegin = c;
- if(c->tqunicode() && (c->tqunicode() != '\n'))
+ if(c->unicode() && (c->unicode() != '\n'))
{
c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrNormalText);
@@ -785,13 +785,13 @@ int KviScriptSyntaxHighlighter::highlightParagraph(const TQString &text,int endS
return IN_LINE;
}
- if(c->tqunicode() == '"')
+ if(c->unicode() == '"')
{
bInString = !bInString;
c++;
setFormat(pBegin - pBuf,c - pBegin,g_fntNormal,g_clrPunctuation);
continue;
- } else if(c->tqunicode() == ';')
+ } else if(c->unicode() == ';')
{
if(!bInString) bNewCommand = true; // the next will be a new command
}
@@ -1124,7 +1124,7 @@ KviScriptEditorReplaceDialog::KviScriptEditorReplaceDialog( TQWidget* parent, co
emit initFind();
setPaletteForegroundColor( TQColor( 0, 0, 0 ) );
setPaletteBackgroundColor( TQColor( 236, 233, 216 ) );
- TQGridLayout *tqlayout = new TQGridLayout( this, 1, 1, 11, 6, "replace tqlayout");
+ TQGridLayout *layout = new TQGridLayout( this, 1, 1, 11, 6, "replace layout");
m_pFindlineedit = new TQLineEdit( this, "findlineedit" );
#ifndef COMPILE_USE_QT4
@@ -1133,14 +1133,14 @@ KviScriptEditorReplaceDialog::KviScriptEditorReplaceDialog( TQWidget* parent, co
m_pFindlineedit->setFrameShadow( TQLineEdit::Sunken );
#endif
- tqlayout->addMultiCellWidget( m_pFindlineedit, 2, 2, 1, 2 );
+ layout->addMultiCellWidget( m_pFindlineedit, 2, 2, 1, 2 );
m_pReplacelineedit = new TQLineEdit( this, "replacelineedit" );
#ifndef COMPILE_USE_QT4
m_pReplacelineedit->setFrameShape( TQLineEdit::LineEditPanel );
m_pReplacelineedit->setFrameShadow( TQLineEdit::Sunken );
#endif
- tqlayout->addMultiCellWidget( m_pReplacelineedit, 3, 3, 1, 2 );
+ layout->addMultiCellWidget( m_pReplacelineedit, 3, 3, 1, 2 );
m_pFindlineedit->setFocus();
@@ -1150,36 +1150,36 @@ KviScriptEditorReplaceDialog::KviScriptEditorReplaceDialog( TQWidget* parent, co
findlabel->setAutoResize(true);
#endif
- tqlayout->addWidget( findlabel, 2, 0 );
+ layout->addWidget( findlabel, 2, 0 );
TQLabel *replacelabel = new TQLabel( this, "replacelabel" );
replacelabel->setText(tr("Replace with"));
#ifndef COMPILE_USE_QT4
replacelabel->setAutoResize(true);
#endif
- tqlayout->addWidget( replacelabel, 3, 0 );
+ layout->addWidget( replacelabel, 3, 0 );
TQPushButton *cancelbutton = new TQPushButton( this, "cancelButton" );
cancelbutton->setText(tr("&Cancel"));
- tqlayout->addWidget( cancelbutton, 5, 2 );
+ layout->addWidget( cancelbutton, 5, 2 );
replacebutton = new TQPushButton( this, "replacebutton" );
replacebutton->setText(tr("&Replace"));
replacebutton->setEnabled( FALSE );
- tqlayout->addWidget( replacebutton, 5, 0 );
+ layout->addWidget( replacebutton, 5, 0 );
checkReplaceAll = new KviStyledCheckBox( this, "replaceAll" );
checkReplaceAll->setText(tr("&Replace in all Aliases"));
- tqlayout->addWidget( checkReplaceAll, 4, 0 );
+ layout->addWidget( checkReplaceAll, 4, 0 );
findNext = new TQPushButton(this, "findNext(WIP)" );
findNext->setText(tr("&Findnext"));
- tqlayout->addWidget( findNext, 2, 3 );
+ layout->addWidget( findNext, 2, 3 );
findNext->setEnabled(false);
replace = new TQPushButton(this, "replace" );
replace->setText(tr("&Replace(WIP)"));
- tqlayout->addWidget( replace, 3, 3 );
+ layout->addWidget( replace, 3, 3 );
replace->setEnabled(false);
#ifndef COMPILE_USE_QT4