diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-30 12:33:18 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-11-30 12:33:18 -0600 |
commit | 03bc485016127d419bbbbc3cfb09e21e8754b383 (patch) | |
tree | cad8234bcf26063239ac7a565298b897ffdeef57 /qt/qextscintilla.cpp | |
parent | 664e37abfe5c796c1279b8295fb030f126b0a7d8 (diff) | |
download | tqscintilla-03bc485016127d419bbbbc3cfb09e21e8754b383.tar.gz tqscintilla-03bc485016127d419bbbbc3cfb09e21e8754b383.zip |
Initial automated TQt conversion
Diffstat (limited to 'qt/qextscintilla.cpp')
-rw-r--r-- | qt/qextscintilla.cpp | 248 |
1 files changed, 124 insertions, 124 deletions
diff --git a/qt/qextscintilla.cpp b/qt/qextscintilla.cpp index 7d3290c..e784750 100644 --- a/qt/qextscintilla.cpp +++ b/qt/qextscintilla.cpp @@ -1,35 +1,35 @@ -// This module implements the "official" high-level API of the Qt port of -// Scintilla. It is modelled on QTextEdit - a method of the same name should +// This module implements the "official" high-level API of the TQt port of +// Scintilla. It is modelled on TQTextEdit - a method of the same name should // behave in the same way. // // Copyright (c) 2006 // Riverbank Computing Limited <info@riverbankcomputing.co.uk> // -// This file is part of QScintilla. +// This file is part of TQScintilla. // -// This copy of QScintilla is free software; you can redistribute it and/or +// This copy of TQScintilla is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2, or (at your option) any // later version. // -// QScintilla is supplied in the hope that it will be useful, but WITHOUT ANY +// TQScintilla is supplied in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more // details. // // You should have received a copy of the GNU General Public License along with -// QScintilla; see the file LICENSE. If not, write to the Free Software +// TQScintilla; see the file LICENSE. If not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <string.h> -#include <qapplication.h> -#include <qcolor.h> +#include <tqapplication.h> +#include <tqcolor.h> -#include "qextscintilla.h" -#include "qextscintillalexer.h" -#include "qextscintillaapis.h" -#include "qextscintillacommandset.h" +#include "tqextscintilla.h" +#include "tqextscintillalexer.h" +#include "tqextscintillaapis.h" +#include "tqextscintillacommandset.h" // Make sure these match the values in Scintilla.h. We don't #include that @@ -42,11 +42,11 @@ static const int defaultFoldMarginWidth = 14; // The default set of characters that make up a word. -static const char *defaultWordChars = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; +static const char *defaultWordChars = "_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPTQRSTUVWXYZ0123456789"; // The ctor. -QextScintilla::QextScintilla(QWidget *parent,const char *name,WFlags f) +QextScintilla::QextScintilla(TQWidget *parent,const char *name,WFlags f) : QextScintillaBase(parent,name,f), allocatedMarkers(0), oldPos(-1), selText(FALSE), fold(NoFoldStyle), autoInd(FALSE), braceMode(NoBraceMatch), acSource(AcsDocument), acThresh(-1), @@ -54,33 +54,33 @@ QextScintilla::QextScintilla(QWidget *parent,const char *name,WFlags f) showSingle(FALSE), modified(FALSE), explicit_fillups(FALSE), fillups_enabled(FALSE), saved_fillups("") { - connect(this,SIGNAL(SCN_MODIFYATTEMPTRO()), - SIGNAL(modificationAttempted())); - - connect(this,SIGNAL(SCN_MODIFIED(int,int,const char *,int,int,int,int,int)), - SLOT(handleModified(int,int,const char *,int,int,int,int,int))); - connect(this,SIGNAL(SCN_CALLTIPCLICK(int)), - SLOT(handleCallTipClick(int))); - connect(this,SIGNAL(SCN_CHARADDED(int)), - SLOT(handleCharAdded(int))); - connect(this,SIGNAL(SCN_MARGINCLICK(int,int,int)), - SLOT(handleMarginClick(int,int,int))); - connect(this,SIGNAL(SCN_SAVEPOINTREACHED()), - SLOT(handleSavePointReached())); - connect(this,SIGNAL(SCN_SAVEPOINTLEFT()), - SLOT(handleSavePointLeft())); - connect(this,SIGNAL(SCN_UPDATEUI()), - SLOT(handleUpdateUI())); - connect(this,SIGNAL(QSCN_SELCHANGED(bool)), - SLOT(handleSelectionChanged(bool))); - connect(this,SIGNAL(SCN_USERLISTSELECTION(const char *,int)), - SLOT(handleUserListSelection(const char *,int))); + connect(this,TQT_SIGNAL(SCN_MODIFYATTEMPTRO()), + TQT_SIGNAL(modificationAttempted())); + + connect(this,TQT_SIGNAL(SCN_MODIFIED(int,int,const char *,int,int,int,int,int)), + TQT_SLOT(handleModified(int,int,const char *,int,int,int,int,int))); + connect(this,TQT_SIGNAL(SCN_CALLTIPCLICK(int)), + TQT_SLOT(handleCallTipClick(int))); + connect(this,TQT_SIGNAL(SCN_CHARADDED(int)), + TQT_SLOT(handleCharAdded(int))); + connect(this,TQT_SIGNAL(SCN_MARGINCLICK(int,int,int)), + TQT_SLOT(handleMarginClick(int,int,int))); + connect(this,TQT_SIGNAL(SCN_SAVEPOINTREACHED()), + TQT_SLOT(handleSavePointReached())); + connect(this,TQT_SIGNAL(SCN_SAVEPOINTLEFT()), + TQT_SLOT(handleSavePointLeft())); + connect(this,TQT_SIGNAL(SCN_UPDATEUI()), + TQT_SLOT(handleUpdateUI())); + connect(this,TQT_SIGNAL(TQSCN_SELCHANGED(bool)), + TQT_SLOT(handleSelectionChanged(bool))); + connect(this,TQT_SIGNAL(SCN_USERLISTSELECTION(const char *,int)), + TQT_SLOT(handleUserListSelection(const char *,int))); // Set the default font. - setFont(QApplication::font()); + setFont(TQApplication::font()); // Set the default fore and background colours. - QColorGroup cg = QApplication::palette().active(); + TQColorGroup cg = TQApplication::palette().active(); setColor(cg.text()); setPaper(cg.base()); @@ -93,7 +93,7 @@ QextScintilla::QextScintilla(QWidget *parent,const char *name,WFlags f) #endif // Capturing the mouse seems to cause problems on multi-head systems. - // Qt should do the right thing anyway. + // TQt should do the right thing anyway. SendScintilla(SCI_SETMOUSEDOWNCAPTURES,0UL); SendScintilla(SCI_SETPROPERTY,"fold","1"); @@ -123,14 +123,14 @@ QextScintilla::~QextScintilla() // Return the current text colour. -QColor QextScintilla::color() const +TQColor QextScintilla::color() const { return nl_text_colour; } // Set the text colour. -void QextScintilla::setColor(const QColor &c) +void QextScintilla::setColor(const TQColor &c) { if (lex.isNull()) { @@ -143,14 +143,14 @@ void QextScintilla::setColor(const QColor &c) // Return the current paper colour. -QColor QextScintilla::paper() const +TQColor QextScintilla::paper() const { return nl_paper_colour; } // Set the paper colour. -void QextScintilla::setPaper(const QColor &c) +void QextScintilla::setPaper(const TQColor &c) { if (lex.isNull()) { @@ -165,7 +165,7 @@ void QextScintilla::setPaper(const QColor &c) // Set the default font. -void QextScintilla::setFont(const QFont &f) +void QextScintilla::setFont(const TQFont &f) { if (lex.isNull()) { @@ -318,7 +318,7 @@ void QextScintilla::callTip() return; } - QString ct = ctAPIs -> callTips(&lbuf[start],maxCallTips,commas); + TQString ct = ctAPIs -> callTips(&lbuf[start],maxCallTips,commas); delete []lbuf; @@ -358,7 +358,7 @@ void QextScintilla::callTip() for (aend = astart; aend < len; ++aend) { - QChar ch = ct.at(aend); + TQChar ch = ct.at(aend); if (ch == ',' && depth == 0) break; @@ -384,7 +384,7 @@ void QextScintilla::handleCallTipClick(int dir) if (!ctAPIs) return; - QString ct = ctAPIs -> callTipsNextPrev(dir); + TQString ct = ctAPIs -> callTipsNextPrev(dir); if (ct.isNull()) return; @@ -432,7 +432,7 @@ void QextScintilla::startAutoCompletion(AutoCompletionSource acs, line[wend] = '\0'; // Generate the string representing the valid words to select from. - QStringList wlist; + TQStringList wlist; bool cs = !SendScintilla(SCI_AUTOCGETIGNORECASE); if (acs == AcsAll || acs == AcsDocument) @@ -442,7 +442,7 @@ void QextScintilla::startAutoCompletion(AutoCompletionSource acs, long pos = 0; long dlen = SendScintilla(SCI_GETLENGTH); long caret = SendScintilla(SCI_GETCURRENTPOS); - QString root(word); + TQString root(word); for (;;) { @@ -462,7 +462,7 @@ void QextScintilla::startAutoCompletion(AutoCompletionSource acs, continue; // Get the rest of this word. - QString w(root); + TQString w(root); while (pos < dlen) { @@ -496,7 +496,7 @@ void QextScintilla::startAutoCompletion(AutoCompletionSource acs, SendScintilla(SCI_AUTOCSETCHOOSESINGLE,single); SendScintilla(SCI_AUTOCSETSEPARATOR, sep); - SendScintilla(SCI_AUTOCSHOW, wlen, wlist.join(QChar(sep)).latin1()); + SendScintilla(SCI_AUTOCSHOW, wlen, wlist.join(TQChar(sep)).latin1()); } @@ -689,7 +689,7 @@ QextScintilla::IndentState QextScintilla::getIndentState(int line) // ie. assume Python-like blocking. if (bstart_off >= 0 && !bend_words) for (int i = bstart_off * 2; text[i] != '\0'; i += 2) - if (!QChar(text[i]).isSpace()) + if (!TQChar(text[i]).isSpace()) return isNone; if (bstart_off > bend_off) @@ -810,16 +810,16 @@ void QextScintilla::convertEols(EolMode mode) // Return the edge colour. -QColor QextScintilla::edgeColor() +TQColor QextScintilla::edgeColor() { long res = SendScintilla(SCI_GETEDGECOLOUR); - return QColor((int)res, ((int)(res >> 8)) & 0x00ff, ((int)(res >> 16)) & 0x00ff); + return TQColor((int)res, ((int)(res >> 8)) & 0x00ff, ((int)(res >> 16)) & 0x00ff); } // Set the edge colour. -void QextScintilla::setEdgeColor(const QColor &col) +void QextScintilla::setEdgeColor(const TQColor &col) { SendScintilla(SCI_SETEDGECOLOUR,col); } @@ -1036,7 +1036,7 @@ void QextScintilla::foldClick(int lineClick,int bstate) { if (bstate & ShiftButton) { - // Ensure all children are visible. + // Ensure all tqchildren are visible. SendScintilla(SCI_SETFOLDEXPANDED,lineClick,1); foldExpand(lineClick,TRUE,TRUE,100,levelClick); } @@ -1044,13 +1044,13 @@ void QextScintilla::foldClick(int lineClick,int bstate) { if (SendScintilla(SCI_GETFOLDEXPANDED,lineClick)) { - // Contract this line and all its children. + // Contract this line and all its tqchildren. SendScintilla(SCI_SETFOLDEXPANDED,lineClick,0L); foldExpand(lineClick,FALSE,TRUE,0,levelClick); } else { - // Expand this line and all its children. + // Expand this line and all its tqchildren. SendScintilla(SCI_SETFOLDEXPANDED,lineClick,1); foldExpand(lineClick,TRUE,TRUE,100,levelClick); } @@ -1119,7 +1119,7 @@ void QextScintilla::foldExpand(int &line,bool doExpand,bool force, // Fully expand (if there is any line currently folded) all text. Otherwise, // fold all text. This is mostly taken from SciTE. -void QextScintilla::foldAll(bool children) +void QextScintilla::foldAll(bool tqchildren) { recolor(); @@ -1142,7 +1142,7 @@ void QextScintilla::foldAll(bool children) if (!(level & SC_FOLDLEVELHEADERFLAG)) continue; - if (children || + if (tqchildren || (SC_FOLDLEVELBASE == (level & SC_FOLDLEVELNUMBERMASK))) { if (expanding) @@ -1248,7 +1248,7 @@ void QextScintilla::zoomTo(int size) // Find the first occurrence of a string. -bool QextScintilla::findFirst(const QString &expr,bool re,bool cs,bool wo, +bool QextScintilla::findFirst(const TQString &expr,bool re,bool cs,bool wo, bool wrap,bool forward,int line,int index, bool show) { @@ -1363,7 +1363,7 @@ long QextScintilla::simpleFind() if (isUtf8()) { - QCString s = findState.expr.utf8(); + TQCString s = findState.expr.utf8(); pos = SendScintilla(SCI_SEARCHINTARGET,s.length(),s.data()); } @@ -1379,7 +1379,7 @@ long QextScintilla::simpleFind() // Replace the text found with the previous findFirst() or findNext(). -void QextScintilla::replace(const QString &replaceStr) +void QextScintilla::replace(const TQString &replaceStr) { if (!findState.inProgress) return; @@ -1467,7 +1467,7 @@ void QextScintilla::handleSavePointLeft() } -// Handle the QSCN_SELCHANGED signal. +// Handle the TQSCN_SELCHANGED signal. void QextScintilla::handleSelectionChanged(bool yes) { selText = yes; @@ -1503,11 +1503,11 @@ void QextScintilla::setSelection(int lineFrom,int indexFrom, // Set the background colour of selected text. -void QextScintilla::setSelectionBackgroundColor(const QColor &col) +void QextScintilla::setSelectionBackgroundColor(const TQColor &col) { SendScintilla(SCI_SETSELBACK,1,col); - int alpha = qAlpha(col.rgb()); + int alpha = tqAlpha(col.rgb()); if (alpha < 255) SendScintilla(SCI_SETSELALPHA, alpha); @@ -1515,7 +1515,7 @@ void QextScintilla::setSelectionBackgroundColor(const QColor &col) // Set the foreground colour of selected text. -void QextScintilla::setSelectionForegroundColor(const QColor &col) +void QextScintilla::setSelectionForegroundColor(const TQColor &col) { SendScintilla(SCI_SETSELFORE,1,col); } @@ -1544,18 +1544,18 @@ void QextScintilla::setCaretWidth(int width) // Set the foreground colour of the caret. -void QextScintilla::setCaretForegroundColor(const QColor &col) +void QextScintilla::setCaretForegroundColor(const TQColor &col) { SendScintilla(SCI_SETCARETFORE,col); } // Set the background colour of the line containing the caret. -void QextScintilla::setCaretLineBackgroundColor(const QColor &col) +void QextScintilla::setCaretLineBackgroundColor(const TQColor &col) { SendScintilla(SCI_SETCARETLINEBACK,col); - int alpha = qAlpha(col.rgb()); + int alpha = tqAlpha(col.rgb()); if (alpha < 255) SendScintilla(SCI_SETCARETLINEBACKALPHA, alpha); @@ -1584,13 +1584,13 @@ void QextScintilla::setReadOnly(bool ro) // Append the given text. -void QextScintilla::append(const QString &text) +void QextScintilla::append(const TQString &text) { bool ro = ensureRW(); if (isUtf8()) { - QCString s = text.utf8(); + TQCString s = text.utf8(); SendScintilla(SCI_APPENDTEXT,s.length(),s.data()); } @@ -1608,7 +1608,7 @@ void QextScintilla::append(const QString &text) // Insert the given text at the current position. -void QextScintilla::insert(const QString &text) +void QextScintilla::insert(const TQString &text) { bool ro = ensureRW(); @@ -1626,7 +1626,7 @@ void QextScintilla::insert(const QString &text) // Insert the given text at the given position. -void QextScintilla::insertAt(const QString &text,int line,int index) +void QextScintilla::insertAt(const TQString &text,int line,int index) { bool ro = ensureRW(); long position = posFromLineIndex(line,index); @@ -1694,7 +1694,7 @@ int QextScintilla::lines() // Return the line at a position. -int QextScintilla::lineAt(const QPoint &pos) +int QextScintilla::lineAt(const TQPoint &pos) { long chpos = SendScintilla(SCI_POSITIONFROMPOINTCLOSE,pos.x(),pos.y()); @@ -1730,10 +1730,10 @@ void QextScintilla::removeSelectedText() // Return the current selected text. -QString QextScintilla::selectedText() +TQString QextScintilla::selectedText() { if (!selText) - return QString(); + return TQString(); // Scintilla doesn't tell us the length of the selected text so we use // the length of the whole document. @@ -1741,7 +1741,7 @@ QString QextScintilla::selectedText() SendScintilla(SCI_GETSELTEXT,buf); - QString qs = convertText(buf); + TQString qs = convertText(buf); delete[] buf; return qs; @@ -1749,14 +1749,14 @@ QString QextScintilla::selectedText() // Return the current text. -QString QextScintilla::text() +TQString QextScintilla::text() { int buflen = length() + 1; char *buf = new char[buflen]; SendScintilla(SCI_GETTEXT,buflen,buf); - QString qs = convertText(buf); + TQString qs = convertText(buf); delete[] buf; return qs; @@ -1764,19 +1764,19 @@ QString QextScintilla::text() // Return the text of a line. -QString QextScintilla::text(int line) +TQString QextScintilla::text(int line) { int line_len = lineLength(line); if (line_len < 1) - return QString(); + return TQString(); char *buf = new char[line_len + 1]; SendScintilla(SCI_GETLINE,line,buf); buf[line_len] = '\0'; - QString qs = convertText(buf); + TQString qs = convertText(buf); delete[] buf; return qs; @@ -1784,7 +1784,7 @@ QString QextScintilla::text(int line) // Set the given text. -void QextScintilla::setText(const QString &text) +void QextScintilla::setText(const TQString &text) { bool ro = ensureRW(); @@ -1945,14 +1945,14 @@ void QextScintilla::setIndentationGuides(bool enable) // Set the background colour of indentation guides. -void QextScintilla::setIndentationGuidesBackgroundColor(const QColor &col) +void QextScintilla::setIndentationGuidesBackgroundColor(const TQColor &col) { SendScintilla(SCI_STYLESETBACK,STYLE_INDENTGUIDE,col); } // Set the foreground colour of indentation guides. -void QextScintilla::setIndentationGuidesForegroundColor(const QColor &col) +void QextScintilla::setIndentationGuidesForegroundColor(const TQColor &col) { SendScintilla(SCI_STYLESETFORE,STYLE_INDENTGUIDE,col); } @@ -2085,7 +2085,7 @@ void QextScintilla::setMarginWidth(int margin,int width) // Set the width of a margin to the width of some text. -void QextScintilla::setMarginWidth(int margin,const QString &s) +void QextScintilla::setMarginWidth(int margin,const TQString &s) { int width; @@ -2099,21 +2099,21 @@ void QextScintilla::setMarginWidth(int margin,const QString &s) // Set the background colour of all margins. -void QextScintilla::setMarginsBackgroundColor(const QColor &col) +void QextScintilla::setMarginsBackgroundColor(const TQColor &col) { handleStylePaperChange(col,STYLE_LINENUMBER); } // Set the foreground colour of all margins. -void QextScintilla::setMarginsForegroundColor(const QColor &col) +void QextScintilla::setMarginsForegroundColor(const TQColor &col) { handleStyleColorChange(col,STYLE_LINENUMBER); } // Set the font of all margins. -void QextScintilla::setMarginsFont(const QFont &f) +void QextScintilla::setMarginsFont(const TQFont &f) { setStylesFont(f,STYLE_LINENUMBER); } @@ -2143,8 +2143,8 @@ int QextScintilla::markerDefine(char ch,int mnr) } -// Define a marker based on a QPixmap. -int QextScintilla::markerDefine(const QPixmap *pm,int mnr) +// Define a marker based on a TQPixmap. +int QextScintilla::markerDefine(const TQPixmap *pm,int mnr) { checkMarker(mnr); @@ -2237,11 +2237,11 @@ int QextScintilla::markerFindPrevious(int linenr,unsigned mask) // Set the marker background colour. -void QextScintilla::setMarkerBackgroundColor(const QColor &col,int mnr) +void QextScintilla::setMarkerBackgroundColor(const TQColor &col,int mnr) { if (mnr <= MARKER_MAX) { - int alpha = qAlpha(col.rgb()); + int alpha = tqAlpha(col.rgb()); if (mnr < 0) { @@ -2272,7 +2272,7 @@ void QextScintilla::setMarkerBackgroundColor(const QColor &col,int mnr) // Set the marker foreground colour. -void QextScintilla::setMarkerForegroundColor(const QColor &col,int mnr) +void QextScintilla::setMarkerForegroundColor(const TQColor &col,int mnr) { if (mnr <= MARKER_MAX) { @@ -2332,7 +2332,7 @@ void QextScintilla::resetFoldMarginColors() // Set the fold margin colours. -void QextScintilla::setFoldMarginColors(const QColor &fore,const QColor &back) +void QextScintilla::setFoldMarginColors(const TQColor &fore,const TQColor &back) { SendScintilla(SCI_SETFOLDMARGINHICOLOUR,1,fore); SendScintilla(SCI_SETFOLDMARGINCOLOUR,1,back); @@ -2340,49 +2340,49 @@ void QextScintilla::setFoldMarginColors(const QColor &fore,const QColor &back) // Set the call tips background colour. -void QextScintilla::setCallTipsBackgroundColor(const QColor &col) +void QextScintilla::setCallTipsBackgroundColor(const TQColor &col) { SendScintilla(SCI_CALLTIPSETBACK,col); } // Set the call tips foreground colour. -void QextScintilla::setCallTipsForegroundColor(const QColor &col) +void QextScintilla::setCallTipsForegroundColor(const TQColor &col) { SendScintilla(SCI_CALLTIPSETFORE,col); } // Set the call tips highlight colour. -void QextScintilla::setCallTipsHighlightColor(const QColor &col) +void QextScintilla::setCallTipsHighlightColor(const TQColor &col) { SendScintilla(SCI_CALLTIPSETFOREHLT,col); } // Set the matched brace background colour. -void QextScintilla::setMatchedBraceBackgroundColor(const QColor &col) +void QextScintilla::setMatchedBraceBackgroundColor(const TQColor &col) { SendScintilla(SCI_STYLESETBACK,STYLE_BRACELIGHT,col); } // Set the matched brace foreground colour. -void QextScintilla::setMatchedBraceForegroundColor(const QColor &col) +void QextScintilla::setMatchedBraceForegroundColor(const TQColor &col) { SendScintilla(SCI_STYLESETFORE,STYLE_BRACELIGHT,col); } // Set the unmatched brace background colour. -void QextScintilla::setUnmatchedBraceBackgroundColor(const QColor &col) +void QextScintilla::setUnmatchedBraceBackgroundColor(const TQColor &col) { SendScintilla(SCI_STYLESETBACK,STYLE_BRACEBAD,col); } // Set the unmatched brace foreground colour. -void QextScintilla::setUnmatchedBraceForegroundColor(const QColor &col) +void QextScintilla::setUnmatchedBraceForegroundColor(const TQColor &col) { SendScintilla(SCI_STYLESETFORE,STYLE_BRACEBAD,col); } @@ -2409,16 +2409,16 @@ void QextScintilla::setLexer(QextScintillaLexer *lexer) SendScintilla(SCI_SETSTYLEBITS,bits); - connect(lex,SIGNAL(colorChanged(const QColor &,int)), - SLOT(handleStyleColorChange(const QColor &,int))); - connect(lex,SIGNAL(eolFillChanged(bool,int)), - SLOT(handleStyleEolFillChange(bool,int))); - connect(lex,SIGNAL(fontChanged(const QFont &,int)), - SLOT(handleStyleFontChange(const QFont &,int))); - connect(lex,SIGNAL(paperChanged(const QColor &,int)), - SLOT(handleStylePaperChange(const QColor &,int))); - connect(lex,SIGNAL(propertyChanged(const char *,const char *)), - SLOT(handlePropertyChange(const char *,const char *))); + connect(lex,TQT_SIGNAL(colorChanged(const TQColor &,int)), + TQT_SLOT(handleStyleColorChange(const TQColor &,int))); + connect(lex,TQT_SIGNAL(eolFillChanged(bool,int)), + TQT_SLOT(handleStyleEolFillChange(bool,int))); + connect(lex,TQT_SIGNAL(fontChanged(const TQFont &,int)), + TQT_SLOT(handleStyleFontChange(const TQFont &,int))); + connect(lex,TQT_SIGNAL(paperChanged(const TQColor &,int)), + TQT_SLOT(handleStylePaperChange(const TQColor &,int))); + connect(lex,TQT_SIGNAL(propertyChanged(const char *,const char *)), + TQT_SLOT(handlePropertyChange(const char *,const char *))); SendScintilla(SCI_SETLEXERLANGUAGE,lex -> lexer()); @@ -2473,7 +2473,7 @@ QextScintillaLexer *QextScintilla::lexer() const // Handle a change in lexer style foreground colour. -void QextScintilla::handleStyleColorChange(const QColor &c,int style) +void QextScintilla::handleStyleColorChange(const TQColor &c,int style) { SendScintilla(SCI_STYLESETFORE,style,c); } @@ -2487,7 +2487,7 @@ void QextScintilla::handleStyleEolFillChange(bool eolfill,int style) // Handle a change in lexer style font. -void QextScintilla::handleStyleFontChange(const QFont &f,int style) +void QextScintilla::handleStyleFontChange(const TQFont &f,int style) { setStylesFont(f,style); @@ -2503,7 +2503,7 @@ void QextScintilla::handleStyleFontChange(const QFont &f,int style) // Set the font for a style. -void QextScintilla::setStylesFont(const QFont &f,int style) +void QextScintilla::setStylesFont(const TQFont &f,int style) { SendScintilla(SCI_STYLESETFONT,style,f.family().latin1()); SendScintilla(SCI_STYLESETSIZE,style,f.pointSize()); @@ -2514,7 +2514,7 @@ void QextScintilla::setStylesFont(const QFont &f,int style) // Handle a change in lexer style background colour. -void QextScintilla::handleStylePaperChange(const QColor &c,int style) +void QextScintilla::handleStylePaperChange(const TQColor &c,int style) { SendScintilla(SCI_STYLESETBACK,style,c); } @@ -2750,13 +2750,13 @@ void QextScintilla::lineIndexFromPos(long pos,int *line,int *index) } -// Convert a Scintilla string to a Qt Unicode string. -QString QextScintilla::convertText(const char *s) +// Convert a Scintilla string to a TQt Unicode string. +TQString QextScintilla::convertText(const char *s) { if (isUtf8()) - return QString::fromUtf8(s); + return TQString::fromUtf8(s); - QString qs; + TQString qs; qs.setLatin1(s); @@ -2851,7 +2851,7 @@ void QextScintilla::recolor(int start,int end) // Registered an image. -void QextScintilla::registerImage(int id,const QPixmap *pm) +void QextScintilla::registerImage(int id,const TQPixmap *pm) { SendScintilla(SCI_REGISTERIMAGE,id,pm); } @@ -3011,7 +3011,7 @@ void QextScintilla::cancelList() // Display a user list. -void QextScintilla::showUserList(int id, const QStringList &list) +void QextScintilla::showUserList(int id, const TQStringList &list) { // Sanity check to make sure auto-completion doesn't get confused. if (id <= 0) @@ -3020,12 +3020,12 @@ void QextScintilla::showUserList(int id, const QStringList &list) const char sep = '\x03'; SendScintilla(SCI_AUTOCSETSEPARATOR, sep); - SendScintilla(SCI_USERLISTSHOW, id, list.join(QChar(sep)).latin1()); + SendScintilla(SCI_USERLISTSHOW, id, list.join(TQChar(sep)).latin1()); } // Translate the SCN_USERLISTSELECTION notification into something more useful. void QextScintilla::handleUserListSelection(const char *text, int id) { - emit userListActivated(id, QString(text)); + emit userListActivated(id, TQString(text)); } |