diff options
Diffstat (limited to 'qt')
62 files changed, 1978 insertions, 1954 deletions
diff --git a/qt/PlatQt.cpp b/qt/PlatQt.cpp index 160ef70..4f63082 100644 --- a/qt/PlatQt.cpp +++ b/qt/PlatQt.cpp @@ -1,22 +1,22 @@ -// This module implements the portability layer for the Qt port of Scintilla. +// This module implements the portability layer for the TQt port of Scintilla. // // 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. @@ -24,44 +24,44 @@ #include <stdarg.h> #include <string.h> -#include <qapplication.h> -#include <qwidget.h> -#include <qfont.h> -#include <qpixmap.h> -#include <qimage.h> -#include <qstring.h> -#include <qlistbox.h> -#include <qpopupmenu.h> -#include <qdatetime.h> -#include <qpainter.h> -#include <qcursor.h> -#include <qlibrary.h> +#include <tqapplication.h> +#include <tqwidget.h> +#include <tqfont.h> +#include <tqpixmap.h> +#include <tqimage.h> +#include <tqstring.h> +#include <tqlistbox.h> +#include <tqpopupmenu.h> +#include <tqdatetime.h> +#include <tqpainter.h> +#include <tqcursor.h> +#include <tqlibrary.h> #include "Platform.h" #include "XPM.h" -#include "qextscintillabase.h" +#include "tqextscintillabase.h" // Type convertors. -static QFont *PFont(FontID id) +static TQFont *PFont(FontID id) { - return reinterpret_cast<QFont *>(id); + return reinterpret_cast<TQFont *>(id); } -static QPainter *PSurface(SurfaceID id) +static TQPainter *PSurface(SurfaceID id) { - return reinterpret_cast<QPainter *>(id); + return reinterpret_cast<TQPainter *>(id); } -static QWidget *PWindow(WindowID id) +static TQWidget *PWindow(WindowID id) { - return reinterpret_cast<QWidget *>(id); + return reinterpret_cast<TQWidget *>(id); } -static QPopupMenu *PMenu(MenuID id) +static TQPopupMenu *PMenu(MenuID id) { - return reinterpret_cast<QPopupMenu *>(id); + return reinterpret_cast<TQPopupMenu *>(id); } @@ -73,7 +73,7 @@ Point Point::FromLong(long lpoint) } -// Colour palette management. The Qt interface to colours means this class +// Colour palette management. The TQt interface to colours means this class // doesn't have to do anything. Palette::Palette() { @@ -115,7 +115,7 @@ void Font::Create(const char *faceName,int,int size,bool bold,bool italic,bool) { Release(); - QFont *f = new QFont(); + TQFont *f = new TQFont(); // If name of the font begins with a '-', assume, that it is an XLFD. if (faceName[0] == '-') @@ -194,22 +194,22 @@ public: void SetClip(PRectangle rc); void FlushCachedState() {painter -> flush();} - void SetUnicodeMode(bool unicodeMode_) {unicodeMode = unicodeMode_;} + void SetUnicodeMode(bool tqunicodeMode_) {tqunicodeMode = tqunicodeMode_;} void SetDBCSMode(int codePage) {} void DrawXPM(PRectangle rc,const XPM *xpm); private: - void commonInit(QPainter *painter_,bool mypainter_); + void commonInit(TQPainter *painter_,bool mypainter_); bool setFont(Font &font_); - QString convertText(const char *s,int len); - static QRgb convertQRgb(const ColourAllocated &col, unsigned alpha); - static QColor convertQColor(const ColourAllocated &col, + TQString convertText(const char *s,int len); + static TQRgb convertTQRgb(const ColourAllocated &col, unsigned alpha); + static TQColor convertTQColor(const ColourAllocated &col, unsigned alpha = 0xff); - bool unicodeMode; + bool tqunicodeMode; bool mypainter; - QPainter *painter; + TQPainter *painter; }; Surface *Surface::Allocate() @@ -217,7 +217,7 @@ Surface *Surface::Allocate() return new SurfaceImpl; } -SurfaceImpl::SurfaceImpl() : unicodeMode(false), mypainter(false), painter(0) +SurfaceImpl::SurfaceImpl() : tqunicodeMode(false), mypainter(false), painter(0) { } @@ -226,7 +226,7 @@ SurfaceImpl::~SurfaceImpl() Release(); } -void SurfaceImpl::commonInit(QPainter *painter_,bool mypainter_) +void SurfaceImpl::commonInit(TQPainter *painter_,bool mypainter_) { Release(); @@ -236,7 +236,7 @@ void SurfaceImpl::commonInit(QPainter *painter_,bool mypainter_) void SurfaceImpl::Init(WindowID) { - commonInit(new QPainter(new QWidget()),true); + commonInit(new TQPainter(new TQWidget()),true); } void SurfaceImpl::Init(SurfaceID sid,WindowID) @@ -246,14 +246,14 @@ void SurfaceImpl::Init(SurfaceID sid,WindowID) void SurfaceImpl::InitPixMap(int width,int height,Surface *,WindowID) { - commonInit(new QPainter(new QPixmap(width,height)),true); + commonInit(new TQPainter(new TQPixmap(width,height)),true); } void SurfaceImpl::Release() { if (painter && mypainter) { - QPaintDevice *pd = painter -> device(); + TQPaintDevice *pd = painter -> device(); delete painter; @@ -265,35 +265,35 @@ void SurfaceImpl::Release() void SurfaceImpl::PenColour(ColourAllocated fore) { - painter -> setPen(convertQColor(fore)); + painter -> setPen(convertTQColor(fore)); } void SurfaceImpl::Polygon(Point *pts,int npts,ColourAllocated fore, ColourAllocated back) { - QPointArray qpts(npts); + TQPointArray qpts(npts); for (int i = 0; i < npts; ++i) qpts.setPoint(i,pts[i].x,pts[i].y); - painter -> setPen(convertQColor(fore)); - painter -> setBrush(convertQColor(back)); + painter -> setPen(convertTQColor(fore)); + painter -> setBrush(convertTQColor(back)); painter -> drawPolygon(qpts); } void SurfaceImpl::RectangleDraw(PRectangle rc,ColourAllocated fore, ColourAllocated back) { - painter -> setPen(convertQColor(fore)); - painter -> setBrush(convertQColor(back)); + painter -> setPen(convertTQColor(fore)); + painter -> setBrush(convertTQColor(back)); painter -> drawRect(rc.left,rc.top, rc.right - rc.left,rc.bottom - rc.top); } void SurfaceImpl::FillRectangle(PRectangle rc,ColourAllocated back) { - painter -> setPen(Qt::NoPen); - painter -> setBrush(convertQColor(back)); + painter -> setPen(TQt::NoPen); + painter -> setBrush(convertTQColor(back)); painter -> drawRect(rc.left,rc.top, rc.right - rc.left,rc.bottom - rc.top); } @@ -301,13 +301,13 @@ void SurfaceImpl::FillRectangle(PRectangle rc,ColourAllocated back) void SurfaceImpl::FillRectangle(PRectangle rc,Surface &surfacePattern) { SurfaceImpl &si = static_cast<SurfaceImpl &>(surfacePattern); - QPixmap *pm = static_cast<QPixmap *>(si.painter -> device()); + TQPixmap *pm = static_cast<TQPixmap *>(si.painter -> device()); if (pm) { - QBrush brsh(Qt::black,*pm); + TQBrush brsh(TQt::black,*pm); - painter -> setPen(Qt::NoPen); + painter -> setPen(TQt::NoPen); painter -> setBrush(brsh); painter -> drawRect(rc.left,rc.top, rc.right - rc.left,rc.bottom - rc.top); @@ -319,8 +319,8 @@ void SurfaceImpl::FillRectangle(PRectangle rc,Surface &surfacePattern) void SurfaceImpl::RoundedRectangle(PRectangle rc,ColourAllocated fore, ColourAllocated back) { - painter -> setPen(convertQColor(fore)); - painter -> setBrush(convertQColor(back)); + painter -> setPen(convertTQColor(fore)); + painter -> setBrush(convertTQColor(back)); painter -> drawRoundRect(rc.left,rc.top, rc.right - rc.left,rc.bottom - rc.top); } @@ -332,15 +332,15 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, int w = rc.right - rc.left; int h = rc.bottom - rc.top; - QImage img(w, h, 32); + TQImage img(w, h, 32); - img.fill(convertQRgb(fill, alphaFill)); + img.fill(convertTQRgb(fill, alphaFill)); img.setAlphaBuffer(TRUE); // Assume that "cornerSize" means outline width. if (cornerSize > 0) { - QRgb oline = convertQRgb(outline, alphaOutline); + TQRgb oline = convertTQRgb(outline, alphaOutline); int linew = cornerSize; @@ -371,8 +371,8 @@ void SurfaceImpl::AlphaRectangle(PRectangle rc, int cornerSize, void SurfaceImpl::Ellipse(PRectangle rc,ColourAllocated fore, ColourAllocated back) { - painter -> setPen(convertQColor(fore)); - painter -> setBrush(convertQColor(back)); + painter -> setPen(convertTQColor(fore)); + painter -> setBrush(convertTQColor(back)); painter -> drawEllipse(rc.left,rc.top, rc.right - rc.left,rc.bottom - rc.top); } @@ -380,8 +380,8 @@ void SurfaceImpl::Ellipse(PRectangle rc,ColourAllocated fore, void SurfaceImpl::Copy(PRectangle rc,Point from,Surface &surfaceSource) { SurfaceImpl &si = static_cast<SurfaceImpl &>(surfaceSource); - QPaintDevice *spd = si.painter -> device(); - QPaintDevice *dpd = painter -> device(); + TQPaintDevice *spd = si.painter -> device(); + TQPaintDevice *dpd = painter -> device(); if (spd && dpd) { @@ -417,17 +417,17 @@ void SurfaceImpl::DrawTextTransparent(PRectangle rc,Font &font_,int ybase, const char *s,int len, ColourAllocated fore) { - QString qs = convertText(s,len); + TQString qs = convertText(s,len); setFont(font_); - painter -> setPen(convertQColor(fore)); + painter -> setPen(convertTQColor(fore)); painter -> drawText(rc.left,ybase,qs); } void SurfaceImpl::DrawXPM(PRectangle rc,const XPM *xpm) { int x, y; - const QPixmap &qpm = xpm -> Pixmap(); + const TQPixmap &qpm = xpm -> Pixmap(); x = rc.left + (rc.Width() - qpm.width()) / 2; y = rc.top + (rc.Height() - qpm.height()) / 2; @@ -441,14 +441,14 @@ void SurfaceImpl::MeasureWidths(Font &font_,const char *s,int len, if (setFont(font_)) { int totalWidth = 0, ui = 0; - QString qs = convertText(s,len); - QFontMetrics fm = painter -> fontMetrics(); + TQString qs = convertText(s,len); + TQFontMetrics fm = painter -> fontMetrics(); for (int i = 0; i < qs.length(); ++i) { totalWidth += fm.width(qs[i]); - int l = (unicodeMode ? QString(qs[i]).utf8().length() : 1); + int l = (tqunicodeMode ? TQString(qs[i]).utf8().length() : 1); while (l--) positions[ui++] = totalWidth; @@ -463,7 +463,7 @@ int SurfaceImpl::WidthText(Font &font_,const char *s,int len) { if (setFont(font_)) { - QString qs = convertText(s,len); + TQString qs = convertText(s,len); return painter -> fontMetrics().width(qs,qs.length()); } @@ -489,7 +489,7 @@ int SurfaceImpl::Ascent(Font &font_) int SurfaceImpl::Descent(Font &font_) { - // Qt doesn't include the baseline in the descent, so add it. + // TQt doesn't include the baseline in the descent, so add it. if (setFont(font_)) return painter -> fontMetrics().descent() + 1; @@ -522,7 +522,7 @@ void SurfaceImpl::SetClip(PRectangle rc) // Set the painter font if there is one. Return true if it was set. bool SurfaceImpl::setFont(Font &font_) { - QFont *f = PFont(font_.GetID()); + TQFont *f = PFont(font_.GetID()); if (f) painter -> setFont(*f); @@ -530,21 +530,21 @@ bool SurfaceImpl::setFont(Font &font_) return f; } -// Convert a Scintilla string to a Qt Unicode string. -QString SurfaceImpl::convertText(const char *s,int len) +// Convert a Scintilla string to a TQt Unicode string. +TQString SurfaceImpl::convertText(const char *s,int len) { - if (unicodeMode) - return QString::fromUtf8(s,len); + if (tqunicodeMode) + return TQString::fromUtf8(s,len); - QString qs; + TQString qs; qs.setLatin1(s,len); return qs; } -// Convert a Scintilla colour and alpha component to a Qt QRgb. -QRgb SurfaceImpl::convertQRgb(const ColourAllocated &col, unsigned alpha) +// Convert a Scintilla colour and alpha component to a TQt TQRgb. +TQRgb SurfaceImpl::convertTQRgb(const ColourAllocated &col, unsigned alpha) { long c = col.AsLong(); @@ -552,15 +552,15 @@ QRgb SurfaceImpl::convertQRgb(const ColourAllocated &col, unsigned alpha) unsigned g = (c >> 8) & 0xff; unsigned b = (c >> 16) & 0xff; - QRgb rgba = (alpha << 24) | (r << 16) | (g << 8) | b; + TQRgb rgba = (alpha << 24) | (r << 16) | (g << 8) | b; return rgba; } -// Convert a Scintilla colour, and optional alpha component, to a Qt QColor. -QColor SurfaceImpl::convertQColor(const ColourAllocated &col, unsigned alpha) +// Convert a Scintilla colour, and optional alpha component, to a TQt TQColor. +TQColor SurfaceImpl::convertTQColor(const ColourAllocated &col, unsigned alpha) { - return QColor(convertQRgb(col, alpha)); + return TQColor(convertTQRgb(col, alpha)); } @@ -571,7 +571,7 @@ Window::~Window() void Window::Destroy() { - QWidget *w = PWindow(id); + TQWidget *w = PWindow(id); if (w) { @@ -587,14 +587,14 @@ bool Window::HasFocus() PRectangle Window::GetPosition() { - QWidget *w = PWindow(id); + TQWidget *w = PWindow(id); // Before any size allocated pretend its big enough not to be scrolled. PRectangle rc(0,0,5000,5000); if (w) { - const QRect &r = w -> geometry(); + const TQRect &r = w -> tqgeometry(); rc.left = r.left(); rc.top = r.top(); @@ -613,8 +613,8 @@ void Window::SetPosition(PRectangle rc) void Window::SetPositionRelative(PRectangle rc,Window relativeTo) { - QWidget *rel = PWindow(relativeTo.id); - QPoint pos = rel -> mapToGlobal(rel -> pos()); + TQWidget *rel = PWindow(relativeTo.id); + TQPoint pos = rel -> mapToGlobal(rel -> pos()); int x = pos.x() + rc.left; int y = pos.y() + rc.top; @@ -629,7 +629,7 @@ PRectangle Window::GetClientPosition() void Window::Show(bool show) { - QWidget *w = PWindow(id); + TQWidget *w = PWindow(id); if (show) w -> show(); @@ -639,7 +639,7 @@ void Window::Show(bool show) void Window::InvalidateAll() { - QWidget *w = PWindow(id); + TQWidget *w = PWindow(id); if (w) w -> update(); @@ -647,7 +647,7 @@ void Window::InvalidateAll() void Window::InvalidateRectangle(PRectangle rc) { - QWidget *w = PWindow(id); + TQWidget *w = PWindow(id); if (w) w -> update(rc.left,rc.top, @@ -661,36 +661,36 @@ void Window::SetFont(Font &font) void Window::SetCursor(Cursor curs) { - Qt::CursorShape qc; + TQt::tqCursorShape qc; switch (curs) { case cursorText: - qc = Qt::IbeamCursor; + qc = TQt::IbeamCursor; break; case cursorUp: - qc = Qt::UpArrowCursor; + qc = TQt::UpArrowCursor; break; case cursorWait: - qc = Qt::WaitCursor; + qc = TQt::WaitCursor; break; case cursorHoriz: - qc = Qt::SizeHorCursor; + qc = TQt::SizeHorCursor; break; case cursorVert: - qc = Qt::SizeVerCursor; + qc = TQt::SizeVerCursor; break; case cursorHand: - qc = Qt::PointingHandCursor; + qc = TQt::PointingHandCursor; break; default: - qc = Qt::ArrowCursor; + qc = TQt::ArrowCursor; } PWindow(id) -> setCursor(qc); @@ -710,12 +710,12 @@ Menu::Menu() : id(0) void Menu::CreatePopUp() { Destroy(); - id = new QPopupMenu(); + id = new TQPopupMenu(); } void Menu::Destroy() { - QPopupMenu *m = PMenu(id); + TQPopupMenu *m = PMenu(id); if (m) { @@ -726,7 +726,7 @@ void Menu::Destroy() void Menu::Show(Point pt,Window &) { - PMenu(id) -> popup(QPoint(pt.x,pt.y)); + PMenu(id) -> popup(TQPoint(pt.x,pt.y)); } @@ -735,7 +735,7 @@ class DynamicLibraryImpl : public DynamicLibrary public: DynamicLibraryImpl(const char *modulePath) { - m = new QLibrary(modulePath); + m = new TQLibrary(modulePath); m -> load(); } @@ -759,7 +759,7 @@ public: } private: - QLibrary* m; + TQLibrary* m; }; DynamicLibrary *DynamicLibrary::Load(const char *modulePath) @@ -772,7 +772,7 @@ DynamicLibrary *DynamicLibrary::Load(const char *modulePath) // less than 48 hours. ElapsedTime::ElapsedTime() { - QTime now = QTime::currentTime(); + TQTime now = TQTime::currentTime(); bigBit = now.hour() * 60 * 60 + now.minute() * 60 + now.second(); littleBit = now.msec(); @@ -781,7 +781,7 @@ ElapsedTime::ElapsedTime() double ElapsedTime::Duration(bool reset) { long endBigBit, endLittleBit; - QTime now = QTime::currentTime(); + TQTime now = TQTime::currentTime(); endBigBit = now.hour() * 60 * 60 + now.minute() * 60 + now.second(); endLittleBit = now.msec(); @@ -816,17 +816,17 @@ ColourDesired Platform::ChromeHighlight() const char *Platform::DefaultFont() { - return QApplication::font().family(); + return TQApplication::font().family(); } int Platform::DefaultFontSize() { - return QApplication::font().pointSize(); + return TQApplication::font().pointSize(); } unsigned int Platform::DoubleClickTime() { - return QApplication::doubleClickInterval(); + return TQApplication::doubleClickInterval(); } bool Platform::MouseButtonBounce() diff --git a/qt/SciListBox.cpp b/qt/SciListBox.cpp index 4808ffa..ef2475b 100644 --- a/qt/SciListBox.cpp +++ b/qt/SciListBox.cpp @@ -1,32 +1,32 @@ -// This module implements the specialisation of QListBox that handles the +// This module implements the specialisation of TQListBox that handles the // Scintilla double-click callback. // // 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 <stdlib.h> #include <string.h> -#include <qapplication.h> -#include <qmap.h> -#include <qpixmap.h> +#include <tqapplication.h> +#include <tqmap.h> +#include <tqpixmap.h> #include "SciListBox.h" @@ -65,7 +65,7 @@ public: private: SciListBox *slb; - typedef QMap<int,QPixmap> xpmMap; + typedef TQMap<int,TQPixmap> xpmMap; xpmMap xset; }; @@ -82,7 +82,7 @@ ListBoxX::~ListBoxX() void ListBoxX::SetFont(Font &font) { - QFont *f = reinterpret_cast<QFont *>(font.GetID()); + TQFont *f = reinterpret_cast<TQFont *>(font.GetID()); if (f) slb -> setFont(*f); @@ -92,13 +92,13 @@ void ListBoxX::SetFont(Font &font) void ListBoxX::Create(Window &parent,int,Point,int,bool) { // The parent we want is the QextScintillaBase, not the text area. - id = slb = new SciListBox(reinterpret_cast<QWidget *>(parent.GetID()) -> parentWidget(),this); + id = slb = new SciListBox(reinterpret_cast<TQWidget *>(parent.GetID()) -> parentWidget(),this); } void ListBoxX::SetAverageCharWidth(int) { - // We rely on QListBox::sizeHint() for the size of the list box rather + // We rely on TQListBox::tqsizeHint() for the size of the list box rather // than make calculations based on the average character width and the // number of visible rows. } @@ -121,7 +121,7 @@ PRectangle ListBoxX::GetDesiredRect() if (slb) { - QSize sh = slb -> sizeHint(); + TQSize sh = slb -> tqsizeHint(); rc.right = sh.width(); rc.bottom = sh.height(); @@ -191,13 +191,13 @@ int ListBoxX::GetSelection() int ListBoxX::Find(const char *prefix) { - return slb -> index(slb -> findItem(prefix,Qt::CaseSensitive|Qt::BeginsWith)); + return slb -> index(slb -> findItem(prefix,TQt::CaseSensitive|TQt::BeginsWith)); } void ListBoxX::GetValue(int n,char *value,int len) { - QString s = slb -> text(n); + TQString s = slb -> text(n); if (s.isNull() || len <= 0) value[0] = '\0'; @@ -217,7 +217,7 @@ void ListBoxX::Sort() void ListBoxX::RegisterImage(int type,const char *xpm_data) { - xset.insert(type,*reinterpret_cast<const QPixmap *>(xpm_data)); + xset.insert(type,*reinterpret_cast<const TQPixmap *>(xpm_data)); } @@ -296,8 +296,8 @@ ListBox *ListBox::Allocate() } -SciListBox::SciListBox(QWidget *parent,ListBoxX *lbx_) - : QListBox(parent,0,WType_Popup|WStyle_Customize|WStyle_NoBorder|WStaticContents), lbx(lbx_) +SciListBox::SciListBox(TQWidget *parent,ListBoxX *lbx_) + : TQListBox(parent,0,WType_Popup|WStyle_Customize|WStyle_NoBorder|WStaticContents), lbx(lbx_) { setFocusProxy(parent); @@ -305,11 +305,11 @@ SciListBox::SciListBox(QWidget *parent,ListBoxX *lbx_) setFrameShadow(Plain); setHScrollBarMode(AlwaysOff); - connect(this,SIGNAL(doubleClicked(QListBoxItem *)), - SLOT(handleDoubleClick(QListBoxItem *))); + connect(this,TQT_SIGNAL(doubleClicked(TQListBoxItem *)), + TQT_SLOT(handleDoubleClick(TQListBoxItem *))); - connect(this,SIGNAL(highlighted(QListBoxItem *)), - SLOT(ensureCurrentVisible())); + connect(this,TQT_SIGNAL(highlighted(TQListBoxItem *)), + TQT_SLOT(ensureCurrentVisible())); } @@ -321,7 +321,7 @@ SciListBox::~SciListBox() } -void SciListBox::handleDoubleClick(QListBoxItem *) +void SciListBox::handleDoubleClick(TQListBoxItem *) { if (lbx && lbx -> cb_action) lbx -> cb_action(lbx -> cb_data); diff --git a/qt/SciListBox.h b/qt/SciListBox.h index 2bbcf7d..5541dea 100644 --- a/qt/SciListBox.h +++ b/qt/SciListBox.h @@ -1,23 +1,23 @@ -// This sub-class of QListBox is needed to provide slots from which we can call +// This sub-class of TQListBox is needed to provide slots from which we can call // ListBox's double-click callback. (And you thought this was a C++ program.) // // 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. @@ -25,7 +25,7 @@ #define SCILISTBOX_H -#include <qlistbox.h> +#include <tqlistbox.h> #include "Platform.h" @@ -33,16 +33,17 @@ class ListBoxX; -class SciListBox : public QListBox +class SciListBox : public TQListBox { Q_OBJECT + TQ_OBJECT public: - SciListBox(QWidget *parent,ListBoxX *lbx_); + SciListBox(TQWidget *parent,ListBoxX *lbx_); ~SciListBox(); private slots: - void handleDoubleClick(QListBoxItem *); + void handleDoubleClick(TQListBoxItem *); private: ListBoxX *lbx; diff --git a/qt/ScintillaQt.cpp b/qt/ScintillaQt.cpp index 4753785..2fde58f 100644 --- a/qt/ScintillaQt.cpp +++ b/qt/ScintillaQt.cpp @@ -1,39 +1,39 @@ -// The implementation of the Qt specific subclass of ScintillaBase. +// The implementation of the TQt specific subclass of ScintillaBase. // // 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 <qapplication.h> -#include <qscrollbar.h> -#include <qpopupmenu.h> -#include <qstring.h> -#include <qtimer.h> -#include <qclipboard.h> -#include <qdragobject.h> -#include <qpainter.h> +#include <tqapplication.h> +#include <tqscrollbar.h> +#include <tqpopupmenu.h> +#include <tqstring.h> +#include <tqtimer.h> +#include <tqclipboard.h> +#include <tqdragobject.h> +#include <tqpainter.h> -#include "qextscintillabase.h" -#include "ScintillaQt.h" +#include "tqextscintillabase.h" +#include "ScintillaTQt.h" -// We want to use the Scintilla notification names as Qt signal names. +// We want to use the Scintilla notification names as TQt signal names. #undef SCEN_CHANGE #undef SCN_AUTOCSELECTION #undef SCN_CALLTIPCLICK @@ -83,35 +83,35 @@ enum // The ctor. -ScintillaQt::ScintillaQt(QextScintillaBase *qsb_) : +ScintillaTQt::ScintillaTQt(QextScintillaBase *qsb_) : capturedMouse(false), qsb(qsb_) { wMain = qsb -> txtarea; - // We aren't a QObject so we use the API class to do QObject related + // We aren't a TQObject so we use the API class to do TQObject related // things for us. - qsb -> connect(&qtimer,SIGNAL(timeout()),SLOT(handleTimer())); + qsb -> connect(&qtimer,TQT_SIGNAL(timeout()),TQT_SLOT(handleTimer())); Initialise(); } // The dtor. -ScintillaQt::~ScintillaQt() +ScintillaTQt::~ScintillaTQt() { Finalise(); } // Initialise the instance. -void ScintillaQt::Initialise() +void ScintillaTQt::Initialise() { SetTicking(true); } // Tidy up the instance. -void ScintillaQt::Finalise() +void ScintillaTQt::Finalise() { SetTicking(false); ScintillaBase::Finalise(); @@ -119,7 +119,7 @@ void ScintillaQt::Finalise() // Start a drag. -void ScintillaQt::StartDrag() +void ScintillaTQt::StartDrag() { // Allow applications to re-implement the drag start. qsb -> startDrag(); @@ -127,9 +127,9 @@ void ScintillaQt::StartDrag() // Do the real drag start. -void ScintillaQt::StartDragImpl() +void ScintillaTQt::StartDragImpl() { - QDragObject *dobj = new QTextDrag(textRange(&drag),qsb -> txtarea); + TQDragObject *dobj = new TQTextDrag(textRange(&drag),qsb -> txtarea); // Remove the dragged text if it was a move to another widget or // application. @@ -142,40 +142,40 @@ void ScintillaQt::StartDragImpl() // Handle a drag enter event. -void ScintillaQt::dragEnterEvent(QDragEnterEvent *dee) +void ScintillaTQt::dragEnterEvent(TQDragEnterEvent *dee) { dragMoveEvent(dee); } // Handle a drag move event. -void ScintillaQt::dragMoveEvent(QDragMoveEvent *dme) +void ScintillaTQt::dragMoveEvent(TQDragMoveEvent *dme) { - dme -> acceptAction(QTextDrag::canDecode(dme)); + dme -> acceptAction(TQTextDrag::canDecode(dme)); SetDragPosition(PositionFromLocation(Point(dme -> pos().x(),dme -> pos().y()))); } // Handle a drag leave event. -void ScintillaQt::dragLeaveEvent(QDragLeaveEvent *dle) +void ScintillaTQt::dragLeaveEvent(TQDragLeaveEvent *dle) { SetDragPosition(invalidPosition); } // Handle a drop event. -void ScintillaQt::dropEvent(QDropEvent *de) +void ScintillaTQt::dropEvent(TQDropEvent *de) { - QString text; + TQString text; - if (QTextDrag::decode(de,text)) + if (TQTextDrag::decode(de,text)) { - bool moving = (de -> source() == qsb -> txtarea && de -> action() == QDropEvent::Move); + bool moving = (de -> source() == qsb -> txtarea && de -> action() == TQDropEvent::Move); de -> acceptAction(); const char *s; - QCString us; + TQCString us; if (IsUnicodeMode()) { @@ -193,7 +193,7 @@ void ScintillaQt::dropEvent(QDropEvent *de) // Re-implement to trap certain messages. -sptr_t ScintillaQt::WndProc(unsigned int iMessage,uptr_t wParam,sptr_t lParam) +sptr_t ScintillaTQt::WndProc(unsigned int iMessage,uptr_t wParam,sptr_t lParam) { switch (iMessage) { @@ -213,14 +213,14 @@ sptr_t ScintillaQt::WndProc(unsigned int iMessage,uptr_t wParam,sptr_t lParam) // Windows nonsense. -sptr_t ScintillaQt::DefWndProc(unsigned int,uptr_t,sptr_t) +sptr_t ScintillaTQt::DefWndProc(unsigned int,uptr_t,sptr_t) { return 0; } // Manage the timer. -void ScintillaQt::SetTicking(bool on) +void ScintillaTQt::SetTicking(bool on) { if (timer.ticking != on) { @@ -237,7 +237,7 @@ void ScintillaQt::SetTicking(bool on) // Grab or release the mouse (and keyboard). -void ScintillaQt::SetMouseCapture(bool on) +void ScintillaTQt::SetMouseCapture(bool on) { if (mouseDownCaptures) if (on) @@ -250,21 +250,21 @@ void ScintillaQt::SetMouseCapture(bool on) // Return true if the mouse/keyboard are currently grabbed. -bool ScintillaQt::HaveMouseCapture() +bool ScintillaTQt::HaveMouseCapture() { return capturedMouse; } // Set the position of the vertical scrollbar. -void ScintillaQt::SetVerticalScrollPos() +void ScintillaTQt::SetVerticalScrollPos() { qsb -> vsb -> setValue(topLine); } // Set the position of the horizontal scrollbar. -void ScintillaQt::SetHorizontalScrollPos() +void ScintillaTQt::SetHorizontalScrollPos() { qsb -> hsb -> setValue(xOffset); } @@ -272,7 +272,7 @@ void ScintillaQt::SetHorizontalScrollPos() // Set the extent of the vertical and horizontal scrollbars and return true if // the view needs re-drawing. -bool ScintillaQt::ModifyScrollBars(int nMax,int nPage) +bool ScintillaTQt::ModifyScrollBars(int nMax,int nPage) { qsb -> vsb -> setMinValue(0); qsb -> vsb -> setMaxValue(nMax - nPage + 1); @@ -288,7 +288,7 @@ bool ScintillaQt::ModifyScrollBars(int nMax,int nPage) // Called after SCI_SETWRAPMODE and SCI_SETHSCROLLBAR. -void ScintillaQt::ReconfigureScrollBars() +void ScintillaTQt::ReconfigureScrollBars() { // Hide or show the scrollbars if needed. if (horizontalScrollBarVisible && wrapState == eWrapNone) @@ -304,15 +304,15 @@ void ScintillaQt::ReconfigureScrollBars() // Notify interested parties of any change in the document. -void ScintillaQt::NotifyChange() +void ScintillaTQt::NotifyChange() { emit qsb -> SCEN_CHANGE(); } // Notify interested parties of various events. This is the main mapping -// between Scintilla notifications and Qt signals. -void ScintillaQt::NotifyParent(SCNotification scn) +// between Scintilla notifications and TQt signals. +void ScintillaTQt::NotifyParent(SCNotification scn) { switch (scn.nmhdr.code) { @@ -408,7 +408,7 @@ void ScintillaQt::NotifyParent(SCNotification scn) // Handle a key that hasn't been filtered out as a command key. Return 0 if we // haven't handled it. -int ScintillaQt::KeyDefault(int key,int modifiers) +int ScintillaTQt::KeyDefault(int key,int modifiers) { // On Windows Alt Gr is returned as Ctrl-Alt (on X11 it seems to be the // Meta key). We therefore ignore that combination. @@ -428,14 +428,14 @@ int ScintillaQt::KeyDefault(int key,int modifiers) } -// Convert a text range to a QString. -QString ScintillaQt::textRange(const SelectionText *text) +// Convert a text range to a TQString. +TQString ScintillaTQt::textRange(const SelectionText *text) { - QString qs; + TQString qs; if (text -> s) if (IsUnicodeMode()) - qs = QString::fromUtf8(text -> s); + qs = TQString::fromUtf8(text -> s); else qs.setLatin1(text -> s); @@ -444,14 +444,14 @@ QString ScintillaQt::textRange(const SelectionText *text) // Copy the selected text to the clipboard. -void ScintillaQt::CopyToClipboard(const SelectionText &selectedText) +void ScintillaTQt::CopyToClipboard(const SelectionText &selectedText) { - QApplication::clipboard() -> setText(textRange(&selectedText)); + TQApplication::tqclipboard() -> setText(textRange(&selectedText)); } // Implement copy. -void ScintillaQt::Copy() +void ScintillaTQt::Copy() { if (currentPos != anchor) { @@ -464,9 +464,9 @@ void ScintillaQt::Copy() // Implement paste. -void ScintillaQt::Paste() +void ScintillaTQt::Paste() { - QString str = QApplication::clipboard() -> text(); + TQString str = TQApplication::tqclipboard() -> text(); if (str.isEmpty()) return; @@ -479,7 +479,7 @@ void ScintillaQt::Paste() if (IsUnicodeMode()) { - QCString s = str.utf8(); + TQCString s = str.utf8(); len = s.length(); @@ -505,26 +505,26 @@ void ScintillaQt::Paste() } -// A simple QWidget sub-class to implement a call tip. No need to bother with -// all the moc stuff. -class QtCallTip : public QWidget +// A simple TQWidget sub-class to implement a call tip. No need to bother with +// all the tqmoc stuff. +class TQtCallTip : public TQWidget { public: - QtCallTip(QWidget *parent,ScintillaQt *sci_); - ~QtCallTip(); + TQtCallTip(TQWidget *parent,ScintillaTQt *sci_); + ~TQtCallTip(); protected: - void paintEvent(QPaintEvent *); - void mousePressEvent(QMouseEvent *me); + void paintEvent(TQPaintEvent *); + void mousePressEvent(TQMouseEvent *me); private: - ScintillaQt *sci; + ScintillaTQt *sci; }; // Create a call tip. -QtCallTip::QtCallTip(QWidget *parent,ScintillaQt *sci_) : - QWidget(parent,0,WType_Popup|WStyle_Customize|WStyle_NoBorder), sci(sci_) +TQtCallTip::TQtCallTip(TQWidget *parent,ScintillaTQt *sci_) : + TQWidget(parent,0,WType_Popup|WStyle_Customize|WStyle_NoBorder), sci(sci_) { // Ensure that the main window keeps the focus (and the caret flashing) // when this is displayed. @@ -533,7 +533,7 @@ QtCallTip::QtCallTip(QWidget *parent,ScintillaQt *sci_) : // Destroy a call tip. -QtCallTip::~QtCallTip() +TQtCallTip::~TQtCallTip() { // Ensure that the main window doesn't receive a focus out event when // this is destroyed. @@ -542,13 +542,13 @@ QtCallTip::~QtCallTip() // Paint a call tip. -void QtCallTip::paintEvent(QPaintEvent *) +void TQtCallTip::paintEvent(TQPaintEvent *) { Surface *surfaceWindow = Surface::Allocate(); if (surfaceWindow) { - QPainter p(this); + TQPainter p(this); surfaceWindow -> Init(&p,0); sci -> ct.PaintCT(surfaceWindow); @@ -560,7 +560,7 @@ void QtCallTip::paintEvent(QPaintEvent *) // Handle a mouse press in a call tip. -void QtCallTip::mousePressEvent(QMouseEvent *me) +void TQtCallTip::mousePressEvent(TQMouseEvent *me) { Point pt; @@ -573,10 +573,10 @@ void QtCallTip::mousePressEvent(QMouseEvent *me) // Create a call tip window. -void ScintillaQt::CreateCallTipWindow(PRectangle rc) +void ScintillaTQt::CreateCallTipWindow(PRectangle rc) { if (!ct.wCallTip.Created()) - ct.wCallTip = ct.wDraw = new QtCallTip(qsb,this); + ct.wCallTip = ct.wDraw = new TQtCallTip(qsb,this); PWindow(ct.wCallTip) -> resize(rc.right - rc.left,rc.bottom - rc.top); ct.wCallTip.Show(); @@ -584,15 +584,15 @@ void ScintillaQt::CreateCallTipWindow(PRectangle rc) // Add an item to the right button menu. -void ScintillaQt::AddToPopUp(const char *label,int cmd,bool enabled) +void ScintillaTQt::AddToPopUp(const char *label,int cmd,bool enabled) { - QPopupMenu *pm = static_cast<QPopupMenu *>(popup.GetID()); + TQPopupMenu *pm = static_cast<TQPopupMenu *>(popup.GetID()); if (label[0] != '\0') { - QString tr_label = qApp -> translate("ContextMenu",label); + TQString tr_label = tqApp -> translate("ContextMenu",label); - pm -> insertItem(tr_label,qsb,SLOT(handlePopUp(int)),0,cmd); + pm -> insertItem(tr_label,qsb,TQT_SLOT(handlePopUp(int)),0,cmd); pm -> setItemEnabled(cmd,enabled); } else @@ -601,13 +601,13 @@ void ScintillaQt::AddToPopUp(const char *label,int cmd,bool enabled) // Claim the selection. -void ScintillaQt::ClaimSelection() +void ScintillaTQt::ClaimSelection() { bool isSel = (currentPos != anchor); if (isSel) { - QClipboard *cb = QApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); // If we support X11 style selection then make it available // now. @@ -630,12 +630,12 @@ void ScintillaQt::ClaimSelection() else primarySelection = false; - emit qsb -> QSCN_SELCHANGED(isSel); + emit qsb -> TQSCN_SELCHANGED(isSel); } // Unclaim the selection. -void ScintillaQt::UnclaimSelection() +void ScintillaTQt::UnclaimSelection() { if (primarySelection) { @@ -646,7 +646,7 @@ void ScintillaQt::UnclaimSelection() // Implemented to provide compatibility with the Windows version. -sptr_t ScintillaQt::DirectFunction(ScintillaQt *sciThis,unsigned int iMessage, +sptr_t ScintillaTQt::DirectFunction(ScintillaTQt *sciThis,unsigned int iMessage, uptr_t wParam,sptr_t lParam) { return sciThis -> WndProc(iMessage,wParam,lParam); @@ -654,13 +654,13 @@ sptr_t ScintillaQt::DirectFunction(ScintillaQt *sciThis,unsigned int iMessage, // Draw the contents of the widget. -void ScintillaQt::paintEvent(QPaintEvent *pe) +void ScintillaTQt::paintEvent(TQPaintEvent *pe) { bool isUnicodeMode = (pdoc && pdoc -> dbcsCodePage == SC_CP_UTF8); paintState = painting; - const QRect &qr = pe -> rect(); + const TQRect &qr = pe -> rect(); rcPaint.left = qr.left(); rcPaint.top = qr.top(); @@ -674,7 +674,7 @@ void ScintillaQt::paintEvent(QPaintEvent *pe) if (sw) { - QPainter painter(PWindow(wMain)); + TQPainter painter(PWindow(wMain)); sw -> Init(&painter,0); sw -> SetUnicodeMode(isUnicodeMode); @@ -683,7 +683,7 @@ void ScintillaQt::paintEvent(QPaintEvent *pe) delete sw; // If the painting area was insufficient to cover the new style - // or brace highlight positions then repaint the whole thing. + // or brace highlight positions then tqrepaint the whole thing. if (paintState == paintAbandoned) PWindow(wMain) -> update(); } diff --git a/qt/ScintillaQt.h b/qt/ScintillaQt.h index 3190b71..08074b3 100644 --- a/qt/ScintillaQt.h +++ b/qt/ScintillaQt.h @@ -1,30 +1,30 @@ -// The definition of the Qt specific subclass of ScintillaBase. +// The definition of the TQt specific subclass of ScintillaBase. // // 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. -#ifndef SCINTILLAQT_H -#define SCINTILLAQT_H +#ifndef SCINTILLATQT_H +#define SCINTILLATQT_H -#include <qtimer.h> +#include <tqtimer.h> // These are needed because scintilla class header files don't seem to manage // their own dependencies properly. @@ -54,27 +54,27 @@ #include "ScintillaBase.h" -class QPaintEvent; +class TQPaintEvent; class QextScintillaBase; -class QtCallTip; +class TQtCallTip; -class ScintillaQt : public ScintillaBase +class ScintillaTQt : public ScintillaBase { friend class QextScintillaBase; - friend class QtCallTip; + friend class TQtCallTip; public: - ScintillaQt(QextScintillaBase *qsb_); - virtual ~ScintillaQt(); + ScintillaTQt(QextScintillaBase *qsb_); + virtual ~ScintillaTQt(); virtual sptr_t WndProc(unsigned int iMessage,uptr_t wParam, sptr_t lParam); private: - QWidget *PWindow(Window &w) + TQWidget *PWindow(Window &w) { - return reinterpret_cast<QWidget *>(w.GetID()); + return reinterpret_cast<TQWidget *>(w.GetID()); } void Initialise(); @@ -99,19 +99,19 @@ private: void AddToPopUp(const char *label,int cmd = 0,bool enabled = true); void ClaimSelection(); void UnclaimSelection(); - static sptr_t DirectFunction(ScintillaQt *sci,unsigned int iMessage, + static sptr_t DirectFunction(ScintillaTQt *sci,unsigned int iMessage, uptr_t wParam,sptr_t lParam); - QString textRange(const SelectionText *text); - void paintEvent(QPaintEvent *pe); - void dragEnterEvent(QDragEnterEvent *dee); - void dragMoveEvent(QDragMoveEvent *dme); - void dragLeaveEvent(QDragLeaveEvent *dle); - void dropEvent(QDropEvent *de); + TQString textRange(const SelectionText *text); + void paintEvent(TQPaintEvent *pe); + void dragEnterEvent(TQDragEnterEvent *dee); + void dragMoveEvent(TQDragMoveEvent *dme); + void dragLeaveEvent(TQDragLeaveEvent *dle); + void dropEvent(TQDropEvent *de); bool capturedMouse; QextScintillaBase *qsb; - QTimer qtimer; + TQTimer qtimer; }; #endif 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)); } diff --git a/qt/qextscintilla.h b/qt/qextscintilla.h index ec64f4f..471032f 100644 --- a/qt/qextscintilla.h +++ b/qt/qextscintilla.h @@ -1,36 +1,36 @@ -// This module defines the "official" high-level API of the Qt port of +// This module defines the "official" high-level API of the TQt port of // Scintilla. // // 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. -#ifndef QEXTSCINTILLA_H -#define QEXTSCINTILLA_H +#ifndef TQEXTSCINTILLA_H +#define TQEXTSCINTILLA_H -#include <qobject.h> -#include <qguardedptr.h> +#include <tqobject.h> +#include <tqguardedptr.h> -#include <qextscintillaglobal.h> -#include <qextscintillabase.h> -#include <qextscintilladocument.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillabase.h> +#include <tqextscintilladocument.h> class QextScintillaLexer; @@ -38,19 +38,20 @@ class QextScintillaAPIs; class QextScintillaCommandSet; -//! \brief The QextScintilla class implements a higher level, more Qt-like, +//! \brief The QextScintilla class implements a higher level, more TQt-like, //! API to the Scintilla editor widget. //! //! QextScintilla implements methods, signals and slots similar to those found -//! in other Qt editor classes. It also provides a higher level interface to +//! in other TQt editor classes. It also provides a higher level interface to //! features specific to Scintilla such as syntax styling, call tips, //! auto-indenting and auto-completion than that provided by QextScintillaBase. //! -//! The API is modelled on QTextEdit - a method of the same name should behave +//! The API is modelled on TQTextEdit - a method of the same name should behave //! in the same way. -class QEXTSCINTILLA_EXPORT QextScintilla : public QextScintillaBase +class TQEXTSCINTILLA_EXPORT QextScintilla : public QextScintillaBase { Q_OBJECT + TQ_OBJECT public: //! This enum defines the different auto-indentation styles. @@ -277,7 +278,7 @@ public: //! Construct an empty QextScintilla with parent \a parent, name \a //! name, and widget flags \a f. - QextScintilla(QWidget *parent = 0,const char *name = 0,WFlags f = 0); + QextScintilla(TQWidget *parent = 0,const char *name = 0,WFlags f = 0); //! Destroys the QextScintilla instance. virtual ~QextScintilla(); @@ -361,7 +362,7 @@ public: //! Returns the widget's text (ie. foreground) colour. //! //! \sa setColor() - QColor color() const; + TQColor color() const; //! Returns the attached document. //! @@ -378,7 +379,7 @@ public: //! exceeded the length set by setEdgeColumn(). //! //! \sa setEdgeColor(), \sa setEdgeColumn - QColor edgeColor(); + TQColor edgeColor(); //! Returns the number of the column after which lines are considered //! to be long. @@ -428,7 +429,7 @@ public: //! visible (ie. it is unfolded). //! //! \sa findNext(), replace() - virtual bool findFirst(const QString &expr,bool re,bool cs,bool wo, + virtual bool findFirst(const TQString &expr,bool re,bool cs,bool wo, bool wrap,bool forward = TRUE,int line = -1, int index = -1,bool show = TRUE); @@ -525,7 +526,7 @@ public: //! Returns the line which is at position \a pos or -1 if there is no //! line at that position. - int lineAt(const QPoint &pos); + int lineAt(const TQPoint &pos); //! Returns the length of line \a line or -1 if there is no such line. int lineLength(int line); @@ -597,7 +598,7 @@ public: //! automatically allocated. The marker number is returned or -1 if //! the marker number was already allocated or too many markers have //! been defined. - int markerDefine(const QPixmap *pm,int mnr = -1); + int markerDefine(const TQPixmap *pm,int mnr = -1); //! Add a marker number \a mnr to line number \a linenr. A handle for //! the marker is returned which can be used to track the marker's @@ -652,7 +653,7 @@ public: //! Returns the widget's paper (ie. background) colour. //! //! \sa setPaper() - QColor paper() const; + TQColor paper() const; //! Recolours the document between the \a start and \a end positions. //! \a start defaults to the start of the document and \a end defaults @@ -663,13 +664,13 @@ public: //! displayed in auto-completion lists. //! //! \sa clearRegisteredImages(), QextScintillaAPIs - void registerImage(int id,const QPixmap *pm); + void registerImage(int id,const TQPixmap *pm); //! Replace the current selection, set by a previous call to //! findFirst() or findNext(), with \a replaceStr. //! //! \sa findFirst(), findNext() - virtual void replace(const QString &replaceStr); + virtual void replace(const TQString &replaceStr); //! Reset the fold margin colours to their defaults. //! @@ -680,7 +681,7 @@ public: //! pattern of two colours, \a fore and \a back. //! //! \sa resetFoldMarginColors() - void setFoldMarginColors(const QColor &fore,const QColor &back); + void setFoldMarginColors(const TQColor &fore,const TQColor &back); //! Sets the APIs used for auto-completion to \a apis. If \a apis is 0 //! then any existing APIs are removed. @@ -721,15 +722,15 @@ public: //! Set the background colour of call tips to \a col. The default is //! white. - void setCallTipsBackgroundColor(const QColor &col); + void setCallTipsBackgroundColor(const TQColor &col); //! Set the foreground colour of call tips to \a col. The default is //! mid-gray. - void setCallTipsForegroundColor(const QColor &col); + void setCallTipsForegroundColor(const TQColor &col); //! Set the highlighted colour of call tip text to \a col. The default //! is dark blue. - void setCallTipsHighlightColor(const QColor &col); + void setCallTipsHighlightColor(const TQColor &col); //! Set the maximum number of call tips that are displayed to \a nr. //! If the maximum number is 0 then all applicable call tips are @@ -750,7 +751,7 @@ public: //! the length set by setEdgeColumn(). //! //! \sa edgeColor(), \sa setEdgeColumn - void setEdgeColor(const QColor &col); + void setEdgeColor(const TQColor &col); //! Set the number of the column after which lines are considered to be //! long. @@ -765,44 +766,44 @@ public: //! Set the default font. This has no effect if a language lexer has been //! set. - virtual void setFont(const QFont &f); + virtual void setFont(const TQFont &f); //! Set the background colour, including the alpha component, of marker //! \a mnr to \a col. If \a mnr is -1 then the colour of all markers //! is set. The default is white. //! //! \sa setMarkerForegroundColor() - void setMarkerBackgroundColor(const QColor &col,int mnr = -1); + void setMarkerBackgroundColor(const TQColor &col,int mnr = -1); //! Set the foreground colour of marker \a mnr to \a col. If \a mnr is //! -1 then the colour of all markers is set. The default is black. //! //! \sa setMarkerBackgroundColor() - void setMarkerForegroundColor(const QColor &col,int mnr = -1); + void setMarkerForegroundColor(const TQColor &col,int mnr = -1); //! Set the background colour used to display matched braces to \a col. //! The default is white. //! //! \sa setMatchedBraceForegroundColor() - void setMatchedBraceBackgroundColor(const QColor &col); + void setMatchedBraceBackgroundColor(const TQColor &col); //! Set the foreground colour used to display matched braces to \a col. //! The default is red. //! //! \sa setMatchedBraceBackgroundColor() - void setMatchedBraceForegroundColor(const QColor &col); + void setMatchedBraceForegroundColor(const TQColor &col); //! Set the background colour used to display unmatched braces to //! \a col. The default is white. //! //! \sa setUnmatchedBraceForegroundColor() - void setUnmatchedBraceBackgroundColor(const QColor &col); + void setUnmatchedBraceBackgroundColor(const TQColor &col); //! Set the foreground colour used to display unmatched braces to //! \a col. The default is blue. //! //! \sa setUnmatchedBraceBackgroundColor() - void setUnmatchedBraceForegroundColor(const QColor &col); + void setUnmatchedBraceForegroundColor(const TQColor &col); //! Set the visual flags displayed when a line is wrapped. \a eflag //! determines if and where the flag at the end of a line is displayed. @@ -816,7 +817,7 @@ public: //! currently selected text. //! //! \sa hasSelectedText() - QString selectedText(); + TQString selectedText(); //! Displays a user defined list which can be interacted with like an //! auto-completion list. \a id is an identifier for the list which @@ -825,7 +826,7 @@ public: //! populated. //! //! \sa cancelList(), isListActive(), userListActivated() - void showUserList(int id, const QStringList &list); + void showUserList(int id, const TQStringList &list); //! The standard command set is returned. QextScintillaCommandSet *standardCommands() const {return stdCmds;} @@ -844,14 +845,14 @@ public: //! Returns the text edit's text. //! //! \sa setText() - QString text(); + TQString text(); //! \overload //! //! Returns the text of line \a line. //! //! \sa setText() - QString text(int line); + TQString text(int line); //! Returns the height in pixels of the text in line number \a linenr. int textHeight(int linenr); @@ -869,7 +870,7 @@ public: public slots: //! Appends the text \a text to the end of the text edit. Note that //! the undo/redo history is cleared by this function. - virtual void append(const QString &text); + virtual void append(const TQString &text); //! Display an auto-completion list based on any installed APIs, the //! current contents of the document and the characters immediately to @@ -919,10 +920,10 @@ public slots: //! If any lines are currently folded then they are all unfolded. //! Otherwise all lines are folded. This has the same effect as //! clicking in the fold margin with the shift and control keys - //! pressed. If \a children is not set (the default) then only the top + //! pressed. If \a tqchildren is not set (the default) then only the top //! level fold points are affected, otherwise the state of all fold //! points are changed. - virtual void foldAll(bool children = FALSE); + virtual void foldAll(bool tqchildren = FALSE); //! If the line \a line is folded then it is unfolded. Otherwise it is //! folded. This has the same effect as clicking in the fold margin. @@ -934,11 +935,11 @@ public slots: virtual void indent(int line); //! Insert the text \a text at the current position. - virtual void insert(const QString &text); + virtual void insert(const TQString &text); //! Insert the text \a text in the line \a line at the position //! \a index. - virtual void insertAt(const QString &text,int line,int index); + virtual void insertAt(const TQString &text,int line,int index); //! If the cursor is either side of a brace character then move it to //! the position of the corresponding brace. @@ -1036,13 +1037,13 @@ public slots: virtual void setBackspaceUnindents(bool unindent); //! Sets the foreground colour of the caret to \a col. - virtual void setCaretForegroundColor(const QColor &col); + virtual void setCaretForegroundColor(const TQColor &col); //! Sets the background colour, including the alpha component, of the //! line containing the caret to \a col. //! //! \sa setCaretLineVisible() - virtual void setCaretLineBackgroundColor(const QColor &col); + virtual void setCaretLineBackgroundColor(const TQColor &col); //! Enables or disables, according to \a enable, the background color //! of the line containing the caret. @@ -1058,7 +1059,7 @@ public slots: //! effect if a language lexer has been set. //! //! \sa color() - virtual void setColor(const QColor &c); + virtual void setColor(const TQColor &c); //! Sets the cursor to the line \a line at the position \a index. //! @@ -1097,12 +1098,12 @@ public slots: //! Set the background colour of indentation guides to \a col. //! //! \sa setIndentationGuidesForegroundColor() - virtual void setIndentationGuidesBackgroundColor(const QColor &col); + virtual void setIndentationGuidesBackgroundColor(const TQColor &col); //! Set the foreground colour of indentation guides to \a col. //! //! \sa setIndentationGuidesBackgroundColor() - virtual void setIndentationGuidesForegroundColor(const QColor &col); + virtual void setIndentationGuidesForegroundColor(const TQColor &col); //! If \a tabs is TRUE then indentations are created using tabs and //! spaces, rather than just spaces. @@ -1126,16 +1127,16 @@ public slots: //! a gray. //! //! \sa setMarginsForegroundColor() - virtual void setMarginsBackgroundColor(const QColor &col); + virtual void setMarginsBackgroundColor(const TQColor &col); //! Set the font used in all margins to \a f. - virtual void setMarginsFont(const QFont &f); + virtual void setMarginsFont(const TQFont &f); //! Set the foreground colour of all margins to \a col. The default is //! black. //! //! \sa setMarginsBackgroundColor() - virtual void setMarginsForegroundColor(const QColor &col); + virtual void setMarginsForegroundColor(const TQColor &col); //! Enables or disables, according to \a lnrs, the display of line //! numbers in margin \a margin. @@ -1168,7 +1169,7 @@ public slots: //! display \a s in the current margin font. //! //! \sa marginWidth(), QextScintillaBase::SCI_SETMARGINWIDTHN - virtual void setMarginWidth(int margin,const QString &s); + virtual void setMarginWidth(int margin,const TQString &s); //! Sets the modified state of the text edit to \a m. Note that it is //! only possible to clear the modified state (where \a m is FALSE). @@ -1182,7 +1183,7 @@ public slots: //! effect if a language lexer has been set. //! //! \sa paper() - virtual void setPaper(const QColor &c); + virtual void setPaper(const TQColor &c); //! Sets the read-only state of the text edit to \a ro. //! @@ -1201,12 +1202,12 @@ public slots: //! selected text to \a col. //! //! \sa resetSelectionBackgroundColor(), setSelectionForegroundColor() - virtual void setSelectionBackgroundColor(const QColor &col); + virtual void setSelectionBackgroundColor(const TQColor &col); //! Sets the foreground colour of selected text to \a col. //! //! \sa resetSelectionForegroundColor(), setSelectionBackgroundColor() - virtual void setSelectionForegroundColor(const QColor &col); + virtual void setSelectionForegroundColor(const TQColor &col); //! If \a indent is TRUE then the tab key will indent a line rather //! then insert a tab character. @@ -1223,7 +1224,7 @@ public slots: //! undo/redo history is cleared by this function. //! //! \sa text() - virtual void setText(const QString &text); + virtual void setText(const TQString &text); //! Sets the current text encoding. If \a cp is TRUE then UTF8 is //! used, otherwise Latin1 is used. @@ -1314,7 +1315,7 @@ signals: //! clicked. //! //! \sa marginSensitivity(), setMarginSensitivity() - void marginClicked(int margin,int line,Qt::ButtonState state); + void marginClicked(int margin,int line,TQt::ButtonState state); //! This signal is emitted whenever the user attempts to modify //! read-only text. @@ -1341,7 +1342,7 @@ signals: //! the text of the item. //! //! \sa showUserList() - void userListActivated(int id, const QString &string); + void userListActivated(int id, const TQString &string); private slots: void handleCallTipClick(int dir); @@ -1355,10 +1356,10 @@ private slots: void handleSelectionChanged(bool yes); void handleUserListSelection(const char *text, int id); - void handleStyleColorChange(const QColor &c,int style); + void handleStyleColorChange(const TQColor &c,int style); void handleStyleEolFillChange(bool eolfill,int style); - void handleStyleFontChange(const QFont &f,int style); - void handleStylePaperChange(const QColor &c,int style); + void handleStyleFontChange(const TQFont &f,int style); + void handleStylePaperChange(const TQColor &c,int style); void handleUpdateUI(); @@ -1390,8 +1391,8 @@ private: void foldExpand(int &line,bool doExpand,bool force = FALSE, int visLevels = 0,int level = -1); void setFoldMarker(int marknr,int mark = SC_MARK_EMPTY); - QString convertText(const char *s); - void setStylesFont(const QFont &f,int style); + TQString convertText(const char *s); + void setStylesFont(const TQFont &f,int style); void braceMatch(); bool findMatchingBrace(long &brace,long &other,BraceMatch mode); @@ -1412,7 +1413,7 @@ private: FindState() : inProgress(0) {} bool inProgress; - QString expr; + TQString expr; bool wrap; bool forward; int flags; @@ -1437,18 +1438,18 @@ private: int maxCallTips; bool showSingle; long ctpos; - QGuardedPtr<QextScintillaLexer> lex; + TQGuardedPtr<QextScintillaLexer> lex; QextScintillaCommandSet *stdCmds; QextScintillaDocument doc; bool modified; - QColor nl_text_colour; - QColor nl_paper_colour; - QFont nl_font; + TQColor nl_text_colour; + TQColor nl_paper_colour; + TQFont nl_font; bool explicit_fillups; bool fillups_enabled; - QCString saved_fillups; + TQCString saved_fillups; -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintilla(const QextScintilla &); QextScintilla &operator=(const QextScintilla &); #endif diff --git a/qt/qextscintillaapis.cpp b/qt/qextscintillaapis.cpp index 2ab7397..d6b0dda 100644 --- a/qt/qextscintillaapis.cpp +++ b/qt/qextscintillaapis.cpp @@ -3,27 +3,27 @@ // 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 <qfile.h> -#include <qregexp.h> +#include <tqfile.h> +#include <tqregexp.h> -#include "qextscintillaapis.h" +#include "tqextscintillaapis.h" // The ctor. @@ -39,18 +39,18 @@ QextScintillaAPIs::~QextScintillaAPIs() // Clear out all API information. -bool QextScintillaAPIs::load(const QString &fname) +bool QextScintillaAPIs::load(const TQString &fname) { - QFile f(fname); + TQFile f(fname); if (!f.open(IO_ReadOnly)) return FALSE; - QTextStream ts(&f); + TQTextStream ts(&f); for (;;) { - QString line = ts.readLine(); + TQString line = ts.readLine(); if (line.isNull()) break; @@ -65,7 +65,7 @@ bool QextScintillaAPIs::load(const QString &fname) // Add a single API entry. -void QextScintillaAPIs::add(const QString &entry) +void QextScintillaAPIs::add(const TQString &entry) { apis.append(entry); sorted = FALSE; @@ -81,12 +81,12 @@ void QextScintillaAPIs::clear() // Add auto-completion words to an existing list. -void QextScintillaAPIs::autoCompletionList(const QString &starts, bool cs, - QStringList &wlist) +void QextScintillaAPIs::autoCompletionList(const TQString &starts, bool cs, + TQStringList &wlist) { ensureSorted(); - QStringList::ConstIterator it = apis.begin(); + TQStringList::ConstIterator it = apis.begin(); // Find the first match in the sorted list. while (it != apis.end()) @@ -97,14 +97,14 @@ void QextScintillaAPIs::autoCompletionList(const QString &starts, bool cs, ++it; } - QString prev; + TQString prev; while (it != apis.end()) { if ((*it).find(starts, 0, cs) != 0) break; - QString w = (*it).section('(', 0, 0); + TQString w = (*it).section('(', 0, 0); if (w != prev) { @@ -120,30 +120,30 @@ void QextScintillaAPIs::autoCompletionList(const QString &starts, bool cs, // Return the call tip for a function. -QString QextScintillaAPIs::callTips(const QString &function,int maxnr, +TQString QextScintillaAPIs::callTips(const TQString &function,int maxnr, int commas) { ensureSorted(); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; // Find the first match in the sorted list. for (it = apis.begin(); it != apis.end(); ++it) if ((*it).startsWith(function)) break; - QStringList cts; - QString prev; + TQStringList cts; + TQString prev; while (it != apis.end() && (*it).startsWith(function)) { if (maxnr > 0 && maxnr == cts.count()) break; - QString w = *it; + TQString w = *it; // Remove any image ID used by auto-completion. - w.replace(QRegExp("\\?[^(]*"),""); + w.replace(TQRegExp("\\?[^(]*"),""); if (w.find('(') == function.length() && w.contains(',') >= commas && w != prev) { @@ -161,7 +161,7 @@ QString QextScintillaAPIs::callTips(const QString &function,int maxnr, ctlist = cts; ctcursor = 0; - QString ct = cts[0]; + TQString ct = cts[0]; ct.prepend('\002'); @@ -175,9 +175,9 @@ QString QextScintillaAPIs::callTips(const QString &function,int maxnr, // Return the next or previous call tip. -QString QextScintillaAPIs::callTipsNextPrev(int dir) +TQString QextScintillaAPIs::callTipsNextPrev(int dir) { - QString ct; + TQString ct; // Get the call tip. if (dir == 1 && ctcursor > 0) diff --git a/qt/qextscintillaapis.h b/qt/qextscintillaapis.h index e112e41..79d8e41 100644 --- a/qt/qextscintillaapis.h +++ b/qt/qextscintillaapis.h @@ -3,30 +3,30 @@ // 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. -#ifndef QEXTSCINTILLAAPIS_H -#define QEXTSCINTILLAAPIS_H +#ifndef TQEXTSCINTILLAAPIS_H +#define TQEXTSCINTILLAAPIS_H -#include <qstringlist.h> +#include <tqstringlist.h> -#include <qextscintillaglobal.h> +#include <tqextscintillaglobal.h> //! \brief The QextScintillaAPIs class represents the textual API information @@ -38,11 +38,11 @@ //! parenthesis, and finally followed by optional explanatory text. //! //! A function name may be followed by a `?' and a number. The number is used -//! by auto-completion to display a registered QPixmap with the function name. +//! by auto-completion to display a registered TQPixmap with the function name. //! //! All function names are used by auto-completion, but only those that include //! function parameters are used in call tips. -class QEXTSCINTILLA_EXPORT QextScintillaAPIs +class TQEXTSCINTILLA_EXPORT QextScintillaAPIs { public: //! Constructs a QextScintillaAPIs instance. @@ -52,11 +52,11 @@ public: ~QextScintillaAPIs(); //! Add the single API entry \a entry to the current set. - void add(const QString &entry); + void add(const TQString &entry); //! Load the API information from the file named \a fname, adding it to //! the current set. Returns TRUE if successful, otherwise FALSE. - bool load(const QString &fname); + bool load(const TQString &fname); //! Deletes all API information. void clear(); @@ -64,18 +64,18 @@ public: private: friend class QextScintilla; - void autoCompletionList(const QString &starts, bool cs, - QStringList &wlist); - QString callTips(const QString &function,int maxnr,int commas); - QString callTipsNextPrev(int dir); + void autoCompletionList(const TQString &starts, bool cs, + TQStringList &wlist); + TQString callTips(const TQString &function,int maxnr,int commas); + TQString callTipsNextPrev(int dir); void ensureSorted(); bool sorted; int ctcursor; - QStringList apis; - QStringList ctlist; + TQStringList apis; + TQStringList ctlist; -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaAPIs(const QextScintillaAPIs &); QextScintillaAPIs &operator=(const QextScintillaAPIs &); #endif diff --git a/qt/qextscintillabase.cpp b/qt/qextscintillabase.cpp index 63330d4..86c4857 100644 --- a/qt/qextscintillabase.cpp +++ b/qt/qextscintillabase.cpp @@ -3,35 +3,35 @@ // 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 <qapplication.h> -#include <qclipboard.h> -#include <qscrollbar.h> -#include <qlayout.h> -#include <qcolor.h> -#include <qevent.h> -#include <qdragobject.h> -#include <qpainter.h> -#include <qptrlist.h> +#include <tqapplication.h> +#include <tqclipboard.h> +#include <tqscrollbar.h> +#include <tqlayout.h> +#include <tqcolor.h> +#include <tqevent.h> +#include <tqdragobject.h> +#include <tqpainter.h> +#include <tqptrlist.h> -#include "qextscintillabase.h" -#include "ScintillaQt.h" +#include "tqextscintillabase.h" +#include "ScintillaTQt.h" // The #defines in Scintilla.h and the enums in qextscintillabase.h conflict @@ -61,40 +61,40 @@ static bool lexersLinked = FALSE; // The list of instances. -static QPtrList<QextScintillaBase> poolList; +static TQPtrList<QextScintillaBase> poolList; // The ctor. -QextScintillaBase::QextScintillaBase(QWidget *parent,const char *name,WFlags f) - : QWidget(parent,name,f) +QextScintillaBase::QextScintillaBase(TQWidget *parent,const char *name,WFlags f) + : TQWidget(parent,name,f) { sci = 0; - QGridLayout *layout = new QGridLayout(this,2,2); + TQGridLayout *tqlayout = new TQGridLayout(this,2,2); - txtarea = new QWidget(this,0,WRepaintNoErase|WResizeNoErase); - txtarea -> setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding)); + txtarea = new TQWidget(this,0,WRepaintNoErase|WResizeNoErase); + txtarea -> tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Expanding)); txtarea -> setMouseTracking(TRUE); txtarea -> setAcceptDrops(TRUE); txtarea -> setFocusPolicy(WheelFocus); txtarea -> setFocusProxy(this); - layout -> addWidget(txtarea,0,0); + tqlayout -> addWidget(txtarea,0,0); - vsb = new QScrollBar(Vertical,this); - layout -> addWidget(vsb,0,1); - connect(vsb,SIGNAL(valueChanged(int)),SLOT(handleVSb(int))); + vsb = new TQScrollBarQt::Vertical,this); + tqlayout -> addWidget(vsb,0,1); + connect(vsb,TQT_SIGNAL(valueChanged(int)),TQT_SLOT(handleVSb(int))); - hsb = new QScrollBar(Horizontal,this); - layout -> addWidget(hsb,1,0); - connect(hsb,SIGNAL(valueChanged(int)),SLOT(handleHSb(int))); + hsb = new TQScrollBarQt::Horizontal,this); + tqlayout -> addWidget(hsb,1,0); + connect(hsb,TQT_SIGNAL(valueChanged(int)),TQT_SLOT(handleHSb(int))); txtarea -> installEventFilter(this); setFocusPolicy(WheelFocus); - sci = new ScintillaQt(this); + sci = new ScintillaTQt(this); - SendScintilla(SCI_SETCARETPERIOD,QApplication::cursorFlashTime() / 2); + SendScintilla(SCI_SETCARETPERIOD,TQApplication::cursorFlashTime() / 2); // Make sure the lexers are linked in. if (!lexersLinked) @@ -104,10 +104,10 @@ QextScintillaBase::QextScintillaBase(QWidget *parent,const char *name,WFlags f) lexersLinked = TRUE; } - QClipboard *cb = QApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); if (cb -> supportsSelection()) - connect(cb,SIGNAL(selectionChanged()),SLOT(handleSelection())); + connect(cb,TQT_SIGNAL(selectionChanged()),TQT_SLOT(handleSelection())); // Add it to the pool. poolList.append(this); @@ -125,7 +125,7 @@ QextScintillaBase::~QextScintillaBase() // Return the viewport widget. -QWidget *QextScintillaBase::viewport() const +TQWidget *QextScintillaBase::viewport() const { return txtarea; } @@ -165,7 +165,7 @@ long QextScintillaBase::SendScintilla(unsigned int msg,long cpMin,long cpMax, // Send a message to the real Scintilla widget that needs a RangeToFormat // structure. long QextScintillaBase::SendScintilla(unsigned int msg,unsigned long wParam, - QPainter *hdc,const QRect &rc, + TQPainter *hdc,const TQRect &rc, long cpMin,long cpMax) { RangeToFormat rf; @@ -186,7 +186,7 @@ long QextScintillaBase::SendScintilla(unsigned int msg,unsigned long wParam, // Send a message to the real Scintilla widget that needs a colour. long QextScintillaBase::SendScintilla(unsigned int msg,unsigned long wParam, - const QColor &col) + const TQColor &col) { long lParam = (col.blue() << 16) | (col.green() << 8) | col.red(); @@ -195,7 +195,7 @@ long QextScintillaBase::SendScintilla(unsigned int msg,unsigned long wParam, // Send a message to the real Scintilla widget that needs a colour. -long QextScintillaBase::SendScintilla(unsigned int msg,const QColor &col) +long QextScintillaBase::SendScintilla(unsigned int msg,const TQColor &col) { unsigned long wParam = (col.blue() << 16) | (col.green() << 8) | col.red(); @@ -204,61 +204,61 @@ long QextScintillaBase::SendScintilla(unsigned int msg,const QColor &col) // Handle events on behalf of the text area. -bool QextScintillaBase::eventFilter(QObject *o,QEvent *e) +bool QextScintillaBase::eventFilter(TQObject *o,TQEvent *e) { if (o != txtarea) - return QWidget::eventFilter(o,e); + return TQWidget::eventFilter(o,e); bool used = TRUE; switch (e -> type()) { - case QEvent::Paint: - sci -> paintEvent(static_cast<QPaintEvent *>(e)); + case TQEvent::Paint: + sci -> paintEvent(static_cast<TQPaintEvent *>(e)); break; - case QEvent::Resize: + case TQEvent::Resize: sci -> ChangeSize(); break; - case QEvent::MouseButtonPress: - mousePress(static_cast<QMouseEvent *>(e)); + case TQEvent::MouseButtonPress: + mousePress(static_cast<TQMouseEvent *>(e)); break; - case QEvent::MouseButtonRelease: - mouseRelease(static_cast<QMouseEvent *>(e)); + case TQEvent::MouseButtonRelease: + mouseRelease(static_cast<TQMouseEvent *>(e)); break; - case QEvent::MouseButtonDblClick: - mouseDoubleClick(static_cast<QMouseEvent *>(e)); + case TQEvent::MouseButtonDblClick: + mouseDoubleClick(static_cast<TQMouseEvent *>(e)); break; - case QEvent::MouseMove: - mouseMove(static_cast<QMouseEvent *>(e)); + case TQEvent::MouseMove: + mouseMove(static_cast<TQMouseEvent *>(e)); break; - case QEvent::Wheel: - mouseWheel(static_cast<QWheelEvent *>(e)); + case TQEvent::Wheel: + mouseWheel(static_cast<TQWheelEvent *>(e)); break; - case QEvent::ContextMenu: - contextMenu(static_cast<QContextMenuEvent *>(e)); + case TQEvent::ContextMenu: + contextMenu(static_cast<TQContextMenuEvent *>(e)); break; - case QEvent::DragEnter: - sci -> dragEnterEvent(static_cast<QDragEnterEvent *>(e)); + case TQEvent::DragEnter: + sci -> dragEnterEvent(static_cast<TQDragEnterEvent *>(e)); break; - case QEvent::DragMove: - sci -> dragMoveEvent(static_cast<QDragMoveEvent *>(e)); + case TQEvent::DragMove: + sci -> dragMoveEvent(static_cast<TQDragMoveEvent *>(e)); break; - case QEvent::DragLeave: - sci -> dragLeaveEvent(static_cast<QDragLeaveEvent *>(e)); + case TQEvent::DragLeave: + sci -> dragLeaveEvent(static_cast<TQDragLeaveEvent *>(e)); break; - case QEvent::Drop: - sci -> dropEvent(static_cast<QDropEvent *>(e)); + case TQEvent::Drop: + sci -> dropEvent(static_cast<TQDropEvent *>(e)); break; default: @@ -269,14 +269,14 @@ bool QextScintillaBase::eventFilter(QObject *o,QEvent *e) } -// Handle the timer on behalf of the ScintillaQt instance. +// Handle the timer on behalf of the ScintillaTQt instance. void QextScintillaBase::handleTimer() { sci -> Tick(); } -// Handle the context menu on behalf of the ScintillaQt instance. +// Handle the context menu on behalf of the ScintillaTQt instance. void QextScintillaBase::handlePopUp(int cmd) { sci -> Command(cmd); @@ -284,21 +284,21 @@ void QextScintillaBase::handlePopUp(int cmd) // Re-implemented to tell the widget it has the focus. -void QextScintillaBase::focusInEvent(QFocusEvent *) +void QextScintillaBase::focusInEvent(TQFocusEvent *) { sci -> SetFocusState(true); } // Re-implemented to tell the widget it has lost the focus. -void QextScintillaBase::focusOutEvent(QFocusEvent *) +void QextScintillaBase::focusOutEvent(TQFocusEvent *) { sci -> SetFocusState(false); } // Handle a mouse button press. -void QextScintillaBase::mousePress(QMouseEvent *me) +void QextScintillaBase::mousePress(TQMouseEvent *me) { setFocus(); @@ -312,7 +312,7 @@ void QextScintillaBase::mousePress(QMouseEvent *me) // It is a triple click if the timer is running and the // mouse hasn't moved too much. - if (triple_click.isActive() && (me -> globalPos() - triple_click_at).manhattanLength() < QApplication::startDragDistance()) + if (triple_click.isActive() && (me -> globalPos() - triple_click_at).manhattanLength() < TQApplication::startDragDistance()) clickTime = sci -> lastClickTime + Platform::DoubleClickTime() - 1; else clickTime = sci -> lastClickTime + Platform::DoubleClickTime() + 1; @@ -329,7 +329,7 @@ void QextScintillaBase::mousePress(QMouseEvent *me) case MidButton: { - QClipboard *cb = QApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); if (cb -> supportsSelection()) { @@ -353,9 +353,9 @@ void QextScintillaBase::mousePress(QMouseEvent *me) // Handle a context menu event. -void QextScintillaBase::contextMenu(QContextMenuEvent *cme) +void QextScintillaBase::contextMenu(TQContextMenuEvent *cme) { - QApplication::sendEvent(this,cme); + TQApplication::sendEvent(this,cme); if (!cme -> isConsumed()) sci -> ContextMenu(Point(cme -> globalX(),cme -> globalY())); @@ -363,7 +363,7 @@ void QextScintillaBase::contextMenu(QContextMenuEvent *cme) // Handle a mouse button releases. -void QextScintillaBase::mouseRelease(QMouseEvent *me) +void QextScintillaBase::mouseRelease(TQMouseEvent *me) { if (sci -> HaveMouseCapture() && me -> button() == LeftButton) { @@ -375,26 +375,26 @@ void QextScintillaBase::mouseRelease(QMouseEvent *me) // Handle a mouse move. -void QextScintillaBase::mouseMove(QMouseEvent *me) +void QextScintillaBase::mouseMove(TQMouseEvent *me) { sci -> ButtonMove(Point(me -> x(),me -> y())); } // Handle a mouse wheel event. -void QextScintillaBase::mouseWheel(QWheelEvent *we) +void QextScintillaBase::mouseWheel(TQWheelEvent *we) { setFocus(); - if (we -> orientation() == Horizontal || we -> state() & ShiftButton) - QApplication::sendEvent(hsb,we); - else if (we -> orientation() == Vertical) - QApplication::sendEvent(vsb,we); + if (we -> orientation() ==Qt::Horizontal || we -> state() & ShiftButton) + TQApplication::sendEvent(hsb,we); + else if (we -> orientation() ==Qt::Vertical) + TQApplication::sendEvent(vsb,we); } // Handle a mouse button double click. -void QextScintillaBase::mouseDoubleClick(QMouseEvent *me) +void QextScintillaBase::mouseDoubleClick(TQMouseEvent *me) { setFocus(); @@ -412,13 +412,13 @@ void QextScintillaBase::mouseDoubleClick(QMouseEvent *me) // Remember the current position and time in case it turns into a // triple click. triple_click_at = me -> globalPos(); - triple_click.start(QApplication::doubleClickInterval()); + triple_click.start(TQApplication::doubleClickInterval()); } } // Re-implemented to handle key press events. -void QextScintillaBase::keyPressEvent(QKeyEvent *ke) +void QextScintillaBase::keyPressEvent(TQKeyEvent *ke) { unsigned key; @@ -488,7 +488,7 @@ void QextScintillaBase::keyPressEvent(QKeyEvent *ke) // key. if (ke -> text().length() == 1) { - if ((key = ke -> text()[0].unicode()) >= 0x80) + if ((key = ke -> text()[0].tqunicode()) >= 0x80) key = 0; } else @@ -521,7 +521,7 @@ void QextScintillaBase::keyPressEvent(QKeyEvent *ke) { if (ke -> text().length() > 0 && !ke -> text()[0].isNull()) { - QCString s = ke -> text().utf8(); + TQCString s = ke -> text().utf8(); sci -> AddCharUTF(s.data(),s.length()); @@ -558,25 +558,25 @@ void QextScintillaBase::handleVSb(int val) // Handle the horizontal scrollbar. void QextScintillaBase::handleHSb(int val) { - sci -> HorizontalScrollTo(val); + sci ->Qt::HorizontalScrollTo(val); } // Return the current prefered size. -QSize QextScintillaBase::sizeHint() const +TQSize QextScintillaBase::tqsizeHint() const { int height = sci -> vs.lineHeight * sci -> pdoc -> LinesTotal(); if (sci -> horizontalScrollBarVisible) - height += hsb -> sizeHint().height(); + height += hsb -> tqsizeHint().height(); - return QSize(sci -> scrollWidth,height); + return TQSize(sci -> scrollWidth,height); } // Handle the selection changing. void QextScintillaBase::handleSelection() { - if (!QApplication::clipboard() -> ownsSelection()) + if (!TQApplication::tqclipboard() -> ownsSelection()) sci -> UnclaimSelection(); } diff --git a/qt/qextscintillabase.h b/qt/qextscintillabase.h index 80222e5..2bf2092 100644 --- a/qt/qextscintillabase.h +++ b/qt/qextscintillabase.h @@ -3,40 +3,40 @@ // 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. -#ifndef QEXTSCINTILLABASE_H -#define QEXTSCINTILLABASE_H +#ifndef TQEXTSCINTILLABASE_H +#define TQEXTSCINTILLABASE_H -#include <qobject.h> -#include <qpoint.h> -#include <qtimer.h> -#include <qwidget.h> +#include <tqobject.h> +#include <tqpoint.h> +#include <tqtimer.h> +#include <tqwidget.h> -#include <qextscintillaglobal.h> +#include <tqextscintillaglobal.h> -class ScintillaQt; -class QScrollBar; -class QColor; -class QPainter; -class QPixmap; +class ScintillaTQt; +class TQScrollBar; +class TQColor; +class TQPainter; +class TQPixmap; //! \brief The QextScintillaBase class implements the Scintilla editor widget @@ -47,15 +47,16 @@ class QPixmap; //! completion and call tips. It is particularly useful as a programmer's //! editor. //! -//! QextScintillaBase is a port to Qt of Scintilla. It implements the standard +//! QextScintillaBase is a port to TQt of Scintilla. It implements the standard //! Scintilla API which consists of a number of messages each taking up to //! two arguments. //! //! See QextScintilla for the implementation of a higher level API that is more -//! consistent with the rest of the Qt toolkit. -class QEXTSCINTILLA_EXPORT QextScintillaBase : public QWidget +//! consistent with the rest of the TQt toolkit. +class TQEXTSCINTILLA_EXPORT QextScintillaBase : public TQWidget { Q_OBJECT + TQ_OBJECT public: //! The low-level Scintilla API is implemented as a set of messages @@ -301,7 +302,7 @@ public: //! markers to a pixmap. Pixmaps use the SC_MARK_PIXMAP marker //! symbol. //! \a wParam is the number of the marker. - //! \a lParam is a pointer to a QPixmap instance. Note that in + //! \a lParam is a pointer to a TQPixmap instance. Note that in //! other ports of Scintilla this is a pointer to either raw or //! textual XPM image data. //! @@ -1290,7 +1291,7 @@ public: //! This message takes a copy of an image and registers it so //! that it can be refered to by a unique integer identifier. //! \a wParam is the image's identifier. - //! \a lParam is a pointer to a QPixmap instance. Note that in + //! \a lParam is a pointer to a TQPixmap instance. Note that in //! other ports of Scintilla this is a pointer to either raw or //! textual XPM image data. //! @@ -1772,7 +1773,7 @@ public: { INDIC_MAX = 7, INDIC_PLAIN = 0, - INDIC_SQUIGGLE = 1, + INDIC_STQUIGGLE = 1, INDIC_TT = 2, INDIC_DIAGONAL = 3, INDIC_STRIKE = 4, @@ -2171,7 +2172,7 @@ public: //! Construct an empty QextScintillaBase with parent \a parent, name //! \a name, and widget flags \a f. - QextScintillaBase(QWidget *parent = 0,const char *name = 0, + QextScintillaBase(TQWidget *parent = 0,const char *name = 0, WFlags f = 0); //! Destroys the QextScintillaBase instance. @@ -2225,34 +2226,34 @@ public: //! \overload long SendScintilla(unsigned int msg,unsigned long wParam, - const QColor &col); + const TQColor &col); //! \overload - long SendScintilla(unsigned int msg,const QColor &col); + long SendScintilla(unsigned int msg,const TQColor &col); //! \overload - long SendScintilla(unsigned int msg,unsigned long wParam,QPainter *hdc, - const QRect &rc,long cpMin,long cpMax); + long SendScintilla(unsigned int msg,unsigned long wParam,TQPainter *hdc, + const TQRect &rc,long cpMin,long cpMax); //! \overload long SendScintilla(unsigned int msg,unsigned long wParam, - const QPixmap *lParam) + const TQPixmap *lParam) { return SendScintilla(msg,wParam,reinterpret_cast<long>(lParam)); } //! Returns the recommended size of the widget. - virtual QSize sizeHint() const; + virtual TQSize tqsizeHint() const; //! Returns the viewport widget. This is the widget that actually //! contains the text. - QWidget *viewport() const; + TQWidget *viewport() const; signals: //! This signal is emitted when text is selected or de-selected. //! \a yes is TRUE if text has been selected and FALSE if text has been //! deselected. - void QSCN_SELCHANGED(bool yes); + void TQSCN_SELCHANGED(bool yes); //! This signal is emitted when the user selects an item in an //! auto-completion list. It is emitted before the selection is @@ -2363,16 +2364,16 @@ signals: protected: //! Re-implemented to filter certain events. - bool eventFilter(QObject *o,QEvent *e); + bool eventFilter(TQObject *o,TQEvent *e); //! Re-implemented to handle the key presses for the widget. - virtual void keyPressEvent(QKeyEvent *ke); + virtual void keyPressEvent(TQKeyEvent *ke); //! Re-implemented to tell Scintilla it has the focus. - virtual void focusInEvent(QFocusEvent *); + virtual void focusInEvent(TQFocusEvent *); //! Re-implemented to tell Scintilla it has lost the focus. - virtual void focusOutEvent(QFocusEvent *); + virtual void focusOutEvent(TQFocusEvent *); //! Re-implemented to allow tabs to be entered as text. virtual bool focusNextPrevChild(bool); @@ -2388,23 +2389,23 @@ private slots: void handleSelection(); private: - friend class ScintillaQt; - - void mousePress(QMouseEvent *me); - void mouseRelease(QMouseEvent *me); - void mouseDoubleClick(QMouseEvent *me); - void mouseMove(QMouseEvent *me); - void mouseWheel(QWheelEvent *we); - void contextMenu(QContextMenuEvent *cme); - - ScintillaQt *sci; - QPoint triple_click_at; - QTimer triple_click; - QScrollBar *vsb; - QScrollBar *hsb; - QWidget *txtarea; - -#if defined(Q_DISABLE_COPY) + friend class ScintillaTQt; + + void mousePress(TQMouseEvent *me); + void mouseRelease(TQMouseEvent *me); + void mouseDoubleClick(TQMouseEvent *me); + void mouseMove(TQMouseEvent *me); + void mouseWheel(TQWheelEvent *we); + void contextMenu(TQContextMenuEvent *cme); + + ScintillaTQt *sci; + TQPoint triple_click_at; + TQTimer triple_click; + TQScrollBar *vsb; + TQScrollBar *hsb; + TQWidget *txtarea; + +#if defined(TQ_DISABLE_COPY) QextScintillaBase(const QextScintillaBase &); QextScintillaBase &operator=(const QextScintillaBase &); #endif diff --git a/qt/qextscintillacommand.cpp b/qt/qextscintillacommand.cpp index 57f9ee1..ab37b92 100644 --- a/qt/qextscintillacommand.cpp +++ b/qt/qextscintillacommand.cpp @@ -3,29 +3,29 @@ // 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 <qnamespace.h> -#include <qapplication.h> +#include <tqnamespace.h> +#include <tqapplication.h> -#include "qextscintillacommand.h" -#include "qextscintilla.h" -#include "qextscintillabase.h" +#include "tqextscintillacommand.h" +#include "tqextscintilla.h" +#include "tqextscintillabase.h" static int convert(int key); @@ -99,23 +99,23 @@ bool QextScintillaCommand::validKey(int key) } -// Convert a Qt character to the Scintilla equivalent. Return zero if it is +// Convert a TQt character to the Scintilla equivalent. Return zero if it is // invalid. static int convert(int key) { // Convert the modifiers. int sci_mod = 0; - if (key & Qt::SHIFT) + if (key & TQt::SHIFT) sci_mod |= QextScintillaBase::SCMOD_SHIFT; - if (key & Qt::CTRL) + if (key & TQt::CTRL) sci_mod |= QextScintillaBase::SCMOD_CTRL; - if (key & Qt::ALT) + if (key & TQt::ALT) sci_mod |= QextScintillaBase::SCMOD_ALT; - key &= ~Qt::MODIFIER_MASK; + key &= ~TQt::MODIFIER_MASK; // Convert the key. int sci_key; @@ -123,59 +123,59 @@ static int convert(int key) if (key > 0x7f) switch (key) { - case Qt::Key_Down: + case TQt::Key_Down: sci_key = QextScintillaBase::SCK_DOWN; break; - case Qt::Key_Up: + case TQt::Key_Up: sci_key = QextScintillaBase::SCK_UP; break; - case Qt::Key_Left: + case TQt::Key_Left: sci_key = QextScintillaBase::SCK_LEFT; break; - case Qt::Key_Right: + case TQt::Key_Right: sci_key = QextScintillaBase::SCK_RIGHT; break; - case Qt::Key_Home: + case TQt::Key_Home: sci_key = QextScintillaBase::SCK_HOME; break; - case Qt::Key_End: + case TQt::Key_End: sci_key = QextScintillaBase::SCK_END; break; - case Qt::Key_Prior: + case TQt::Key_Prior: sci_key = QextScintillaBase::SCK_PRIOR; break; - case Qt::Key_Next: + case TQt::Key_Next: sci_key = QextScintillaBase::SCK_NEXT; break; - case Qt::Key_Delete: + case TQt::Key_Delete: sci_key = QextScintillaBase::SCK_DELETE; break; - case Qt::Key_Insert: + case TQt::Key_Insert: sci_key = QextScintillaBase::SCK_INSERT; break; - case Qt::Key_Escape: + case TQt::Key_Escape: sci_key = QextScintillaBase::SCK_ESCAPE; break; - case Qt::Key_Backspace: + case TQt::Key_Backspace: sci_key = QextScintillaBase::SCK_BACK; break; - case Qt::Key_Tab: + case TQt::Key_Tab: sci_key = QextScintillaBase::SCK_TAB; break; - case Qt::Key_Return: + case TQt::Key_Return: sci_key = QextScintillaBase::SCK_RETURN; break; @@ -193,7 +193,7 @@ static int convert(int key) // Return the translated user friendly description. -QString QextScintillaCommand::description() const +TQString QextScintillaCommand::description() const { - return qApp -> translate("QextScintillaCommand",descCmd); + return tqApp -> translate("QextScintillaCommand",descCmd); } diff --git a/qt/qextscintillacommand.h b/qt/qextscintillacommand.h index 0e4557c..0cd365e 100644 --- a/qt/qextscintillacommand.h +++ b/qt/qextscintillacommand.h @@ -3,30 +3,30 @@ // 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. -#ifndef QEXTSCINTILLACOMMAND_H -#define QEXTSCINTILLACOMMAND_H +#ifndef TQEXTSCINTILLACOMMAND_H +#define TQEXTSCINTILLACOMMAND_H -#include <qstring.h> +#include <tqstring.h> -#include <qextscintillaglobal.h> +#include <tqextscintillaglobal.h> class QextScintilla; @@ -38,7 +38,7 @@ class QextScintilla; //! Methods are provided to change the keys bound to the command and to remove //! a key binding. Each command has a user friendly description of the command //! for use in key mapping dialogs. -class QEXTSCINTILLA_EXPORT QextScintillaCommand +class TQEXTSCINTILLA_EXPORT QextScintillaCommand { public: //! Binds the key \a key to the command. If \a key is 0 then the key @@ -74,7 +74,7 @@ public: static bool validKey(int key); //! The user friendly description of the command is returned. - QString description() const; + TQString description() const; private: friend class QextScintillaCommandSet; @@ -90,7 +90,7 @@ private: int qkey, scikey, qaltkey, scialtkey; const char *descCmd; -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaCommand(const QextScintillaCommand &); QextScintillaCommand &operator=(const QextScintillaCommand &); #endif diff --git a/qt/qextscintillacommandset.cpp b/qt/qextscintillacommandset.cpp index 9c7fa59..b9c126c 100644 --- a/qt/qextscintillacommandset.cpp +++ b/qt/qextscintillacommandset.cpp @@ -3,28 +3,28 @@ // 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 <qsettings.h> +#include <tqsettings.h> -#include "qextscintillacommandset.h" -#include "qextscintillacommand.h" -#include "qextscintilla.h" +#include "tqextscintillacommandset.h" +#include "tqextscintillacommand.h" +#include "tqextscintilla.h" // The ctor. @@ -41,527 +41,527 @@ QextScintillaCommandSet::QextScintillaCommandSet(QextScintilla *qs) : qsci(qs) static struct sci_cmd cmd_table[] = { { QextScintillaBase::SCI_LINEDOWN, - Qt::Key_Down, + TQt::Key_Down, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Move down one line") }, { QextScintillaBase::SCI_LINEDOWNEXTEND, - Qt::Key_Down | Qt::SHIFT, + TQt::Key_Down | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend selection down one line") }, { QextScintillaBase::SCI_LINESCROLLDOWN, - Qt::Key_Down | Qt::CTRL, + TQt::Key_Down | TQt::CTRL, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Scroll view down one line") }, { QextScintillaBase::SCI_LINEDOWNRECTEXTEND, - Qt::Key_Down | Qt::ALT | Qt::SHIFT, + TQt::Key_Down | TQt::ALT | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend rectangular selection down one line") }, { QextScintillaBase::SCI_LINEUP, - Qt::Key_Up, + TQt::Key_Up, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Move up one line") }, { QextScintillaBase::SCI_LINEUPEXTEND, - Qt::Key_Up | Qt::SHIFT, + TQt::Key_Up | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend selection up one line") }, { QextScintillaBase::SCI_LINESCROLLUP, - Qt::Key_Up | Qt::CTRL, + TQt::Key_Up | TQt::CTRL, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Scroll view up one line") }, { QextScintillaBase::SCI_LINEUPRECTEXTEND, - Qt::Key_Up | Qt::ALT | Qt::SHIFT, + TQt::Key_Up | TQt::ALT | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend rectangular selection up one line") }, { QextScintillaBase::SCI_PARAUP, - Qt::Key_BracketLeft | Qt::CTRL, + TQt::Key_BracketLeft | TQt::CTRL, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Move up one paragraph") }, { QextScintillaBase::SCI_PARAUPEXTEND, - Qt::Key_BracketLeft | Qt::CTRL | Qt::SHIFT, + TQt::Key_BracketLeft | TQt::CTRL | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend selection up one paragraph") }, { QextScintillaBase::SCI_PARADOWN, - Qt::Key_BracketRight | Qt::CTRL, + TQt::Key_BracketRight | TQt::CTRL, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Move down one paragraph") }, { QextScintillaBase::SCI_PARADOWNEXTEND, - Qt::Key_BracketRight | Qt::CTRL | Qt::SHIFT, + TQt::Key_BracketRight | TQt::CTRL | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend selection down one paragraph") }, { QextScintillaBase::SCI_CHARLEFT, - Qt::Key_Left, + TQt::Key_Left, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Move left one character") }, { QextScintillaBase::SCI_CHARLEFTEXTEND, - Qt::Key_Left | Qt::SHIFT, + TQt::Key_Left | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend selection left one character") }, { QextScintillaBase::SCI_WORDLEFT, - Qt::Key_Left | Qt::CTRL, + TQt::Key_Left | TQt::CTRL, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Move left one word") }, { QextScintillaBase::SCI_WORDLEFTEXTEND, - Qt::Key_Left | Qt::SHIFT | Qt::CTRL, + TQt::Key_Left | TQt::SHIFT | TQt::CTRL, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend selection left one word") }, { QextScintillaBase::SCI_CHARLEFTRECTEXTEND, - Qt::Key_Left | Qt::ALT | Qt::SHIFT, + TQt::Key_Left | TQt::ALT | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend rectangular selection left one character") }, { QextScintillaBase::SCI_CHARRIGHT, - Qt::Key_Right, + TQt::Key_Right, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Move right one character") }, { QextScintillaBase::SCI_CHARRIGHTEXTEND, - Qt::Key_Right | Qt::SHIFT, + TQt::Key_Right | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend selection right one character") }, { QextScintillaBase::SCI_WORDRIGHT, - Qt::Key_Right | Qt::CTRL, + TQt::Key_Right | TQt::CTRL, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Move right one word") }, { QextScintillaBase::SCI_WORDRIGHTEXTEND, - Qt::Key_Right | Qt::CTRL | Qt::SHIFT, + TQt::Key_Right | TQt::CTRL | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend selection right one word") }, { QextScintillaBase::SCI_CHARRIGHTRECTEXTEND, - Qt::Key_Right | Qt::ALT | Qt::SHIFT, + TQt::Key_Right | TQt::ALT | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend rectangular selection right one character") }, { QextScintillaBase::SCI_WORDPARTLEFT, - Qt::Key_Slash | Qt::CTRL, + TQt::Key_Slash | TQt::CTRL, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Move left one word part") }, { QextScintillaBase::SCI_WORDPARTLEFTEXTEND, - Qt::Key_Slash | Qt::CTRL | Qt::SHIFT, + TQt::Key_Slash | TQt::CTRL | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend selection left one word part") }, { QextScintillaBase::SCI_WORDPARTRIGHT, - Qt::Key_Backslash | Qt::CTRL, + TQt::Key_Backslash | TQt::CTRL, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Move right one word part") }, { QextScintillaBase::SCI_WORDPARTRIGHTEXTEND, - Qt::Key_Backslash | Qt::CTRL | Qt::SHIFT, + TQt::Key_Backslash | TQt::CTRL | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend selection right one word part") }, { QextScintillaBase::SCI_VCHOME, - Qt::Key_Home, + TQt::Key_Home, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Move to first visible character in line") }, { QextScintillaBase::SCI_VCHOMEEXTEND, - Qt::Key_Home | Qt::SHIFT, + TQt::Key_Home | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend selection to first visible character in line") }, { QextScintillaBase::SCI_DOCUMENTSTART, - Qt::Key_Home | Qt::CTRL, + TQt::Key_Home | TQt::CTRL, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Move to start of text") }, { QextScintillaBase::SCI_DOCUMENTSTARTEXTEND, - Qt::Key_Home | Qt::CTRL | Qt::SHIFT, + TQt::Key_Home | TQt::CTRL | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend selection to start of text") }, { QextScintillaBase::SCI_HOMEDISPLAY, - Qt::Key_Home | Qt::ALT, + TQt::Key_Home | TQt::ALT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Move to start of displayed line") }, { QextScintillaBase::SCI_HOMEDISPLAYEXTEND, 0, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend selection to start of line") }, { QextScintillaBase::SCI_VCHOMERECTEXTEND, - Qt::Key_Home | Qt::ALT | Qt::SHIFT, + TQt::Key_Home | TQt::ALT | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend rectangular selection to first visible character in line") }, { QextScintillaBase::SCI_LINEEND, - Qt::Key_End, + TQt::Key_End, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Move to end of line") }, { QextScintillaBase::SCI_LINEENDEXTEND, - Qt::Key_End | Qt::SHIFT, + TQt::Key_End | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend selection to end of line") }, { QextScintillaBase::SCI_DOCUMENTEND, - Qt::Key_End | Qt::CTRL, + TQt::Key_End | TQt::CTRL, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Move to end of text") }, { QextScintillaBase::SCI_DOCUMENTENDEXTEND, - Qt::Key_End | Qt::CTRL | Qt::SHIFT, + TQt::Key_End | TQt::CTRL | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend selection to end of text") }, { QextScintillaBase::SCI_LINEENDDISPLAY, - Qt::Key_End | Qt::ALT, + TQt::Key_End | TQt::ALT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Move to end of displayed line") }, { QextScintillaBase::SCI_LINEENDDISPLAYEXTEND, 0, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend selection to end of displayed line") }, { QextScintillaBase::SCI_LINEENDRECTEXTEND, - Qt::Key_End | Qt::ALT | Qt::SHIFT, + TQt::Key_End | TQt::ALT | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend rectangular selection to end of line") }, { QextScintillaBase::SCI_PAGEUP, - Qt::Key_Prior, + TQt::Key_Prior, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Move up one page") }, { QextScintillaBase::SCI_PAGEUPEXTEND, - Qt::Key_Prior | Qt::SHIFT, + TQt::Key_Prior | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend selection up one page") }, { QextScintillaBase::SCI_PAGEUPRECTEXTEND, - Qt::Key_Prior | Qt::ALT | Qt::SHIFT, + TQt::Key_Prior | TQt::ALT | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend rectangular selection up one page") }, { QextScintillaBase::SCI_PAGEDOWN, - Qt::Key_Next, + TQt::Key_Next, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Move down one page") }, { QextScintillaBase::SCI_PAGEDOWNEXTEND, - Qt::Key_Next | Qt::SHIFT, + TQt::Key_Next | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend selection down one page") }, { QextScintillaBase::SCI_PAGEDOWNRECTEXTEND, - Qt::Key_Next | Qt::ALT | Qt::SHIFT, + TQt::Key_Next | TQt::ALT | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Extend rectangular selection down one page") }, { QextScintillaBase::SCI_CLEAR, - Qt::Key_Delete, + TQt::Key_Delete, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Delete current character") }, { QextScintillaBase::SCI_CUT, - Qt::Key_X | Qt::CTRL, - Qt::Key_Delete | Qt::SHIFT, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQt::Key_X | TQt::CTRL, + TQt::Key_Delete | TQt::SHIFT, + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Cut selection") }, { QextScintillaBase::SCI_DELWORDRIGHT, - Qt::Key_Delete | Qt::CTRL, + TQt::Key_Delete | TQt::CTRL, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Delete word to right") }, { QextScintillaBase::SCI_DELLINERIGHT, - Qt::Key_Delete | Qt::CTRL | Qt::SHIFT, + TQt::Key_Delete | TQt::CTRL | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Delete line to right") }, { QextScintillaBase::SCI_EDITTOGGLEOVERTYPE, - Qt::Key_Insert, + TQt::Key_Insert, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Toggle insert/overtype") }, { QextScintillaBase::SCI_PASTE, - Qt::Key_V | Qt::CTRL, - Qt::Key_Insert | Qt::SHIFT, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQt::Key_V | TQt::CTRL, + TQt::Key_Insert | TQt::SHIFT, + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Paste") }, { QextScintillaBase::SCI_COPY, - Qt::Key_C | Qt::CTRL, - Qt::Key_Insert | Qt::CTRL, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQt::Key_C | TQt::CTRL, + TQt::Key_Insert | TQt::CTRL, + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Copy selection") }, { QextScintillaBase::SCI_CANCEL, - Qt::Key_Escape, + TQt::Key_Escape, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Cancel") }, { QextScintillaBase::SCI_DELETEBACK, - Qt::Key_Backspace, - Qt::Key_Backspace | Qt::SHIFT, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQt::Key_Backspace, + TQt::Key_Backspace | TQt::SHIFT, + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Delete previous character") }, { QextScintillaBase::SCI_DELWORDLEFT, - Qt::Key_Backspace | Qt::CTRL, + TQt::Key_Backspace | TQt::CTRL, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Delete word to left") }, { QextScintillaBase::SCI_UNDO, - Qt::Key_Z | Qt::CTRL, - Qt::Key_Backspace | Qt::ALT, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQt::Key_Z | TQt::CTRL, + TQt::Key_Backspace | TQt::ALT, + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Undo the last command") }, { QextScintillaBase::SCI_DELLINELEFT, - Qt::Key_Backspace | Qt::CTRL | Qt::SHIFT, + TQt::Key_Backspace | TQt::CTRL | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Delete line to left") }, { QextScintillaBase::SCI_REDO, - Qt::Key_Y | Qt::CTRL, + TQt::Key_Y | TQt::CTRL, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Redo last command") }, { QextScintillaBase::SCI_SELECTALL, - Qt::Key_A | Qt::CTRL, + TQt::Key_A | TQt::CTRL, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Select all text") }, { QextScintillaBase::SCI_TAB, - Qt::Key_Tab, + TQt::Key_Tab, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Indent one level") }, { QextScintillaBase::SCI_BACKTAB, - Qt::Key_Tab | Qt::SHIFT, + TQt::Key_Tab | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Move back one indentation level") }, { QextScintillaBase::SCI_NEWLINE, - Qt::Key_Return, - Qt::Key_Return | Qt::SHIFT, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQt::Key_Return, + TQt::Key_Return | TQt::SHIFT, + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Insert new line") }, { QextScintillaBase::SCI_ZOOMIN, - Qt::Key_Plus | Qt::CTRL, + TQt::Key_Plus | TQt::CTRL, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Zoom in") }, { QextScintillaBase::SCI_ZOOMOUT, - Qt::Key_Minus | Qt::CTRL, + TQt::Key_Minus | TQt::CTRL, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Zoom out") }, { QextScintillaBase::SCI_SETZOOM, 0, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Set zoom") }, { QextScintillaBase::SCI_FORMFEED, 0, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Formfeed") }, { QextScintillaBase::SCI_LINECUT, - Qt::Key_L | Qt::CTRL, + TQt::Key_L | TQt::CTRL, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Cut current line") }, { QextScintillaBase::SCI_LINEDELETE, - Qt::Key_L | Qt::CTRL | Qt::SHIFT, + TQt::Key_L | TQt::CTRL | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Delete current line") }, { QextScintillaBase::SCI_LINECOPY, - Qt::Key_T | Qt::CTRL | Qt::SHIFT, + TQt::Key_T | TQt::CTRL | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Copy current line") }, { QextScintillaBase::SCI_LINETRANSPOSE, - Qt::Key_T | Qt::CTRL, + TQt::Key_T | TQt::CTRL, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Swap current and previous lines") }, { QextScintillaBase::SCI_SELECTIONDUPLICATE, - Qt::Key_D | Qt::CTRL, + TQt::Key_D | TQt::CTRL, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Duplicate selection") }, { QextScintillaBase::SCI_LOWERCASE, - Qt::Key_U | Qt::CTRL, + TQt::Key_U | TQt::CTRL, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Convert selection to lower case") }, { QextScintillaBase::SCI_UPPERCASE, - Qt::Key_U | Qt::CTRL | Qt::SHIFT, + TQt::Key_U | TQt::CTRL | TQt::SHIFT, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Convert selection to upper case") }, { QextScintillaBase::SCI_DELETEBACKNOTLINE, 0, 0, - QT_TRANSLATE_NOOP("QextScintillaCommand", + TQT_TRANSLATE_NOOP("QextScintillaCommand", "Delete previous character if not at line start") }, }; @@ -577,10 +577,10 @@ QextScintillaCommandSet::QextScintillaCommandSet(QextScintilla *qs) : qsci(qs) // Read the command set from settings. -bool QextScintillaCommandSet::readSettings(QSettings &qs,const char *prefix) +bool QextScintillaCommandSet::readSettings(TQSettings &qs,const char *prefix) { bool rc = TRUE; - QString skey; + TQString skey; for (QextScintillaCommand *cmd = cmds.first(); cmd; cmd = cmds.next()) { @@ -611,10 +611,10 @@ bool QextScintillaCommandSet::readSettings(QSettings &qs,const char *prefix) // Write the command set to settings. -bool QextScintillaCommandSet::writeSettings(QSettings &qs,const char *prefix) +bool QextScintillaCommandSet::writeSettings(TQSettings &qs,const char *prefix) { bool rc = TRUE; - QString skey; + TQString skey; for (const QextScintillaCommand *cmd = cmds.first(); cmd; cmd = cmds.next()) { @@ -636,7 +636,7 @@ bool QextScintillaCommandSet::writeSettings(QSettings &qs,const char *prefix) // Clear the key bindings. void QextScintillaCommandSet::clearKeys() { - QPtrList<QextScintillaCommand> &set = commands(); + TQPtrList<QextScintillaCommand> &set = commands(); for (QextScintillaCommand *cmd = set.first(); cmd; cmd = set.next()) cmd -> setKey(0); @@ -646,7 +646,7 @@ void QextScintillaCommandSet::clearKeys() // Clear the alternate key bindings. void QextScintillaCommandSet::clearAlternateKeys() { - QPtrList<QextScintillaCommand> &set = commands(); + TQPtrList<QextScintillaCommand> &set = commands(); for (QextScintillaCommand *cmd = set.first(); cmd; cmd = set.next()) cmd -> setAlternateKey(0); diff --git a/qt/qextscintillacommandset.h b/qt/qextscintillacommandset.h index d242bfa..eb02e0d 100644 --- a/qt/qextscintillacommandset.h +++ b/qt/qextscintillacommandset.h @@ -3,34 +3,34 @@ // 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. -#ifndef QEXTSCINTILLACOMMANDSET_H -#define QEXTSCINTILLACOMMANDSET_H +#ifndef TQEXTSCINTILLACOMMANDSET_H +#define TQEXTSCINTILLACOMMANDSET_H -#include <qptrlist.h> +#include <tqptrlist.h> -#include <qextscintillaglobal.h> -#include <qextscintillacommand.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillacommand.h> -class QSettings; +class TQSettings; class QextScintilla; @@ -39,7 +39,7 @@ class QextScintilla; //! //! Methods are provided to access the individual commands and to read and //! write the current bindings from and to settings files. -class QEXTSCINTILLA_EXPORT QextScintillaCommandSet +class TQEXTSCINTILLA_EXPORT QextScintillaCommandSet { public: //! The key bindings for each command in the set are read from the @@ -47,17 +47,17 @@ public: //! TRUE is returned if there was no error. //! //! \sa writeSettings() - bool readSettings(QSettings &qs,const char *prefix = "/Scintilla"); + bool readSettings(TQSettings &qs,const char *prefix = "/Scintilla"); //! The key bindings for each command in the set are written to the //! settings \a qs. \a prefix is prepended to the key of each entry. //! TRUE is returned if there was no error. //! //! \sa readSettings() - bool writeSettings(QSettings &qs,const char *prefix = "/Scintilla"); + bool writeSettings(TQSettings &qs,const char *prefix = "/Scintilla"); //! The commands in the set are returned as a list. - QPtrList<QextScintillaCommand> &commands() {return cmds;} + TQPtrList<QextScintillaCommand> &commands() {return cmds;} //! The primary keys bindings for all commands are removed. void clearKeys(); @@ -71,9 +71,9 @@ private: QextScintillaCommandSet(QextScintilla *qs); QextScintilla *qsci; - QPtrList<QextScintillaCommand> cmds; + TQPtrList<QextScintillaCommand> cmds; -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaCommandSet(const QextScintillaCommandSet &); QextScintillaCommandSet &operator=(const QextScintillaCommandSet &); #endif diff --git a/qt/qextscintilladocument.cpp b/qt/qextscintilladocument.cpp index 9fc6887..a3e8540 100644 --- a/qt/qextscintilladocument.cpp +++ b/qt/qextscintilladocument.cpp @@ -3,25 +3,25 @@ // 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 "qextscintilladocument.h" -#include "qextscintillabase.h" +#include "tqextscintilladocument.h" +#include "tqextscintillabase.h" // This internal class encapsulates the underlying document and is shared by diff --git a/qt/qextscintilladocument.h b/qt/qextscintilladocument.h index 4dd846c..fe0be6e 100644 --- a/qt/qextscintilladocument.h +++ b/qt/qextscintilladocument.h @@ -3,28 +3,28 @@ // 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. -#ifndef QEXTSCINTILLADOCUMENT_H -#define QEXTSCINTILLADOCUMENT_H +#ifndef TQEXTSCINTILLADOCUMENT_H +#define TQEXTSCINTILLADOCUMENT_H -#include <qextscintillaglobal.h> +#include <tqextscintillaglobal.h> class QextScintillaBase; @@ -37,7 +37,7 @@ class QextScintillaDocumentP; //! QextScintilla to create different simultaneous views of the same document. //! QextScintillaDocument uses implicit sharing so that copying class instances //! is a cheap operation. -class QEXTSCINTILLA_EXPORT QextScintillaDocument +class TQEXTSCINTILLA_EXPORT QextScintillaDocument { public: //! Create a new unattached document. diff --git a/qt/qextscintillaglobal.h b/qt/qextscintillaglobal.h index f16286a..38335f0 100644 --- a/qt/qextscintillaglobal.h +++ b/qt/qextscintillaglobal.h @@ -1,53 +1,53 @@ -// This module defines various things common to all of the Qt port to +// This module defines various things common to all of the TQt port to // Scintilla. // // 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. -#ifndef QEXTSCINTILLAGLOBAL_H -#define QEXTSCINTILLAGLOBAL_H +#ifndef TQEXTSCINTILLAGLOBAL_H +#define TQEXTSCINTILLAGLOBAL_H -#include <qglobal.h> +#include <tqglobal.h> -#define QSCINTILLA_VERSION 0x010701 -#define QSCINTILLA_VERSION_STR "1.7.1" -#define QSCINTILLA_BUILD "@RM_BUILD@" +#define TQSCINTILLA_VERSION 0x010701 +#define TQSCINTILLA_VERSION_STR "1.7.1" +#define TQSCINTILLA_BUILD "@RM_BUILD@" -// Under Windows, define QEXTSCINTILLA_MAKE_DLL to create a Scintilla DLL, or -// define QEXTSCINTILLA_DLL to link against a Scintilla DLL, or define neither +// Under Windows, define TQEXTSCINTILLA_MAKE_DLL to create a Scintilla DLL, or +// define TQEXTSCINTILLA_DLL to link against a Scintilla DLL, or define neither // to either build or link against a static Scintilla library. -#if defined(Q_WS_WIN) +#if defined(TQ_WS_WIN) -#if defined(QEXTSCINTILLA_DLL) -#define QEXTSCINTILLA_EXPORT __declspec(dllimport) -#elif defined(QEXTSCINTILLA_MAKE_DLL) -#define QEXTSCINTILLA_EXPORT __declspec(dllexport) +#if defined(TQEXTSCINTILLA_DLL) +#define TQEXTSCINTILLA_EXPORT __declspec(dllimport) +#elif defined(TQEXTSCINTILLA_MAKE_DLL) +#define TQEXTSCINTILLA_EXPORT __declspec(dllexport) #endif #endif -#if !defined(QEXTSCINTILLA_EXPORT) -#define QEXTSCINTILLA_EXPORT +#if !defined(TQEXTSCINTILLA_EXPORT) +#define TQEXTSCINTILLA_EXPORT #endif diff --git a/qt/qextscintillalexer.cpp b/qt/qextscintillalexer.cpp index 9302180..6ecfee5 100644 --- a/qt/qextscintillalexer.cpp +++ b/qt/qextscintillalexer.cpp @@ -3,45 +3,45 @@ // 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 <qapplication.h> -#include <qcolor.h> -#include <qfont.h> -#include <qsettings.h> +#include <tqapplication.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqsettings.h> -#include "qextscintillalexer.h" -#include "qextscintilla.h" -#include "qextscintillabase.h" +#include "tqextscintillalexer.h" +#include "tqextscintilla.h" +#include "tqextscintillabase.h" // The ctor. -QextScintillaLexer::QextScintillaLexer(QObject *parent,const char *name) - : QObject(parent,name), autoIndStyle(-1) +QextScintillaLexer::QextScintillaLexer(TQObject *parent,const char *name) + : TQObject(parent,name), autoIndStyle(-1) { #if defined(Q_OS_WIN) - defFont = QFont("Verdana",10); + defFont = TQFont("Verdana",10); #else - defFont = QFont("Bitstream Vera Sans",9); + defFont = TQFont("Bitstream Vera Sans",9); #endif // Set the default fore and background colours. - QColorGroup cg = QApplication::palette().active(); + TQColorGroup cg = TQApplication::palette().active(); defColor = cg.text(); defPaper = cg.base(); } @@ -123,7 +123,7 @@ int QextScintillaLexer::defaultStyle() const // Returns the foreground colour of the text for a style. -QColor QextScintillaLexer::color(int) const +TQColor QextScintillaLexer::color(int) const { return defaultColor(); } @@ -137,7 +137,7 @@ bool QextScintillaLexer::eolFill(int) const // Returns the font for a style. -QFont QextScintillaLexer::font(int) const +TQFont QextScintillaLexer::font(int) const { return defaultFont(); } @@ -151,56 +151,56 @@ const char *QextScintillaLexer::keywords(int) const // Returns the background colour of the text for a style. -QColor QextScintillaLexer::paper(int) const +TQColor QextScintillaLexer::paper(int) const { return defaultPaper(); } // Returns the default font for all styles. -QFont QextScintillaLexer::defaultFont() const +TQFont QextScintillaLexer::defaultFont() const { return defFont; } // Sets the default font for all styles. -void QextScintillaLexer::setDefaultFont(const QFont &f) +void QextScintillaLexer::setDefaultFont(const TQFont &f) { defFont = f; } // Returns the default text colour for all styles. -QColor QextScintillaLexer::defaultColor() const +TQColor QextScintillaLexer::defaultColor() const { return defColor; } // Sets the default text colour for all styles. -void QextScintillaLexer::setDefaultColor(const QColor &c) +void QextScintillaLexer::setDefaultColor(const TQColor &c) { defColor = c; } // Returns the default paper colour for all styles. -QColor QextScintillaLexer::defaultPaper() const +TQColor QextScintillaLexer::defaultPaper() const { return defPaper; } // Sets the default paper colour for all styles. -void QextScintillaLexer::setDefaultPaper(const QColor &c) +void QextScintillaLexer::setDefaultPaper(const TQColor &c) { defPaper = c; } // Read properties from the settings. -bool QextScintillaLexer::readProperties(QSettings &,const QString &) +bool QextScintillaLexer::readProperties(TQSettings &,const TQString &) { return TRUE; } @@ -213,18 +213,18 @@ void QextScintillaLexer::refreshProperties() // Write properties to the settings. -bool QextScintillaLexer::writeProperties(QSettings &,const QString &) const +bool QextScintillaLexer::writeProperties(TQSettings &,const TQString &) const { return TRUE; } // Restore the user settings. -bool QextScintillaLexer::readSettings(QSettings &qs,const char *prefix) +bool QextScintillaLexer::readSettings(TQSettings &qs,const char *prefix) { bool ok, flag, rc = TRUE; int num; - QString key; + TQString key; // Read the styles. for (int i = 0; i < 128; ++i) @@ -239,7 +239,7 @@ bool QextScintillaLexer::readSettings(QSettings &qs,const char *prefix) num = qs.readNumEntry(key + "color",0,&ok); if (ok) - emit colorChanged(QColor((num >> 16) & 0xff,(num >> 8) & 0xff,num & 0xff),i); + emit colorChanged(TQColor((num >> 16) & 0xff,(num >> 8) & 0xff,num & 0xff),i); else rc = FALSE; @@ -252,13 +252,13 @@ bool QextScintillaLexer::readSettings(QSettings &qs,const char *prefix) rc = FALSE; // Read the font - QStringList fdesc; + TQStringList fdesc; fdesc = qs.readListEntry(key + "font",',',&ok); if (ok && fdesc.count() == 5) { - QFont f; + TQFont f; f.setFamily(fdesc[0]); f.setPointSize(fdesc[1].toInt()); @@ -275,7 +275,7 @@ bool QextScintillaLexer::readSettings(QSettings &qs,const char *prefix) num = qs.readNumEntry(key + "paper",0,&ok); if (ok) - emit paperChanged(QColor((num >> 16) & 0xff,(num >> 8) & 0xff,num & 0xff),i); + emit paperChanged(TQColor((num >> 16) & 0xff,(num >> 8) & 0xff,num & 0xff),i); else rc = FALSE; } @@ -303,10 +303,10 @@ bool QextScintillaLexer::readSettings(QSettings &qs,const char *prefix) // Save the user settings. -bool QextScintillaLexer::writeSettings(QSettings &qs,const char *prefix) const +bool QextScintillaLexer::writeSettings(TQSettings &qs,const char *prefix) const { bool rc = TRUE; - QString key; + TQString key; // Write the styles. for (int i = 0; i < 128; ++i) @@ -316,7 +316,7 @@ bool QextScintillaLexer::writeSettings(QSettings &qs,const char *prefix) const continue; int num; - QColor c; + TQColor c; key.sprintf("%s/%s/style%d/",prefix,language(),i); @@ -332,19 +332,19 @@ bool QextScintillaLexer::writeSettings(QSettings &qs,const char *prefix) const rc = FALSE; // Write the font - QStringList fdesc; - QString fmt("%1"); - QFont f; + TQStringList fdesc; + TQString fmt("%1"); + TQFont f; f = font(i); fdesc += f.family(); - fdesc += fmt.arg(f.pointSize()); + fdesc += fmt.tqarg(f.pointSize()); // The casts are for Borland. - fdesc += fmt.arg((int)f.bold()); - fdesc += fmt.arg((int)f.italic()); - fdesc += fmt.arg((int)f.underline()); + fdesc += fmt.tqarg((int)f.bold()); + fdesc += fmt.tqarg((int)f.italic()); + fdesc += fmt.tqarg((int)f.underline()); if (!qs.writeEntry(key + "font",fdesc,',')) rc = FALSE; @@ -393,7 +393,7 @@ void QextScintillaLexer::setAutoIndentStyle(int autoindentstyle) // Set the foreground colour for a style. -void QextScintillaLexer::setColor(const QColor &c,int style) +void QextScintillaLexer::setColor(const TQColor &c,int style) { if (style >= 0) emit colorChanged(c,style); @@ -417,7 +417,7 @@ void QextScintillaLexer::setEolFill(bool eolfill,int style) // Set the font for a style. -void QextScintillaLexer::setFont(const QFont &f,int style) +void QextScintillaLexer::setFont(const TQFont &f,int style) { if (style >= 0) emit fontChanged(f,style); @@ -429,7 +429,7 @@ void QextScintillaLexer::setFont(const QFont &f,int style) // Set the background colour for a style. -void QextScintillaLexer::setPaper(const QColor &c,int style) +void QextScintillaLexer::setPaper(const TQColor &c,int style) { if (style >= 0) emit paperChanged(c,style); diff --git a/qt/qextscintillalexer.h b/qt/qextscintillalexer.h index 2c4aad6..9e46fdb 100644 --- a/qt/qextscintillalexer.h +++ b/qt/qextscintillalexer.h @@ -3,36 +3,36 @@ // 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. -#ifndef QEXTSCINTILLALEXER_H -#define QEXTSCINTILLALEXER_H +#ifndef TQEXTSCINTILLALEXER_H +#define TQEXTSCINTILLALEXER_H -#include <qobject.h> -#include <qstring.h> -#include <qcolor.h> -#include <qfont.h> +#include <tqobject.h> +#include <tqstring.h> +#include <tqcolor.h> +#include <tqfont.h> -#include <qextscintillaglobal.h> +#include <tqextscintillaglobal.h> -class QSettings; +class TQSettings; //! \brief The QextScintillaLexer class is an abstract class used as a base for @@ -52,14 +52,15 @@ class QSettings; //! //! QextScintillaLexer provides convenience methods for saving and restoring //! user preferences for fonts and colours. -class QEXTSCINTILLA_EXPORT QextScintillaLexer : public QObject +class TQEXTSCINTILLA_EXPORT QextScintillaLexer : public TQObject { Q_OBJECT + TQ_OBJECT public: //! Construct a QextScintillaLexer with parent \a parent and name //! \a name. \a parent is typically the QextScintilla instance. - QextScintillaLexer(QObject *parent = 0,const char *name = 0); + QextScintillaLexer(TQObject *parent = 0,const char *name = 0); //! Destroys the QextScintillaLexer instance. virtual ~QextScintillaLexer(); @@ -118,7 +119,7 @@ public: //! \a style. The default colour is black. //! //! \sa paper() - virtual QColor color(int style) const; + virtual TQColor color(int style) const; //! Returns the end-of-line for style number \a style. The default is //! FALSE. @@ -128,7 +129,7 @@ public: //! that returned by defaultFont(). //! //! \sa defaultFont() - virtual QFont font(int style) const; + virtual TQFont font(int style) const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. 0 is returned if there @@ -141,30 +142,30 @@ public: virtual int defaultStyle() const; //! Returns the descriptive name for style number \a style. If the - //! style is invalid for this language then QString::null is returned. + //! style is invalid for this language then TQString() is returned. //! This is intended to be used in user preference dialogs. - virtual QString description(int style) const = 0; + virtual TQString description(int style) const = 0; //! Returns the background colour of the text for style number //! \a style. //! //! \sa defaultPaper(), color() - virtual QColor paper(int style) const; + virtual TQColor paper(int style) const; //! Returns the default font for all styles. //! //! \sa setDefaultFont() - virtual QFont defaultFont() const; + virtual TQFont defaultFont() const; //! Returns the default text colour for all styles. //! //! \sa setDefaultColor() - virtual QColor defaultColor() const; + virtual TQColor defaultColor() const; //! Returns the default paper colour for all styles. //! //! \sa setDefaultPaper() - virtual QColor defaultPaper() const; + virtual TQColor defaultPaper() const; //! Causes all properties to be refreshed by emitting the //! propertyChanged() signal as required. @@ -176,7 +177,7 @@ public: //! if there was no error. //! //! \sa writeSettings(), QextScintilla::setLexer() - bool readSettings(QSettings &qs,const char *prefix = "/Scintilla"); + bool readSettings(TQSettings &qs,const char *prefix = "/Scintilla"); //! The colour, paper, font and end-of-line for each style number, and //! all lexer specific properties are written to the settings \a qs. @@ -184,7 +185,7 @@ public: //! if there was no error. //! //! \sa readSettings() - bool writeSettings(QSettings &qs, + bool writeSettings(TQSettings &qs, const char *prefix = "/Scintilla") const; public slots: @@ -196,22 +197,22 @@ public slots: //! The foreground colour for style number \a style is set to \a c. If //! \a style is -1 then the colour is set for all styles. - virtual void setColor(const QColor &c,int style = -1); + virtual void setColor(const TQColor &c,int style = -1); //! The default font for all styles is set to \a f. //! //! \sa defaultFont() - virtual void setDefaultFont(const QFont &f); + virtual void setDefaultFont(const TQFont &f); //! The default text colour for all styles is set to \a c. //! //! \sa defaultColor(), color() - virtual void setDefaultColor(const QColor &c); + virtual void setDefaultColor(const TQColor &c); //! The default paper colour for all styles is set to \a c. //! //! \sa defaultPaper(), paper() - virtual void setDefaultPaper(const QColor &c); + virtual void setDefaultPaper(const TQColor &c); //! The end-of-line fill for style number \a style is set to //! \a eoffill. If \a style is -1 then the fill is set for all styles. @@ -219,16 +220,16 @@ public slots: //! The font for style number \a style is set to \a f. If \a style is //! -1 then the font is set for all styles. - virtual void setFont(const QFont &f,int style = -1); + virtual void setFont(const TQFont &f,int style = -1); //! The background colour for style number \a style is set to \a c. If //! \a style is -1 then the colour is set for all styles. - virtual void setPaper(const QColor &c,int style = -1); + virtual void setPaper(const TQColor &c,int style = -1); signals: //! This signal is emitted when the foreground colour of style number //! \a style has changed. The new colour is \a c. - void colorChanged(const QColor &c,int style); + void colorChanged(const TQColor &c,int style); //! This signal is emitted when the end-of-file fill of style number //! \a style has changed. The new fill is \a eoffilled. @@ -236,11 +237,11 @@ signals: //! This signal is emitted when the font of style number \a style has //! changed. The new font is \a f. - void fontChanged(const QFont &f,int style); + void fontChanged(const TQFont &f,int style); //! This signal is emitted when the background colour of style number //! \a style has changed. The new colour is \a c. - void paperChanged(const QColor &c,int style); + void paperChanged(const TQColor &c,int style); //! This signal is emitted when the value of the lexer property \a prop //! needs to be changed. The new value is \a val. @@ -251,21 +252,21 @@ protected: //! (which has a trailing '/') should be used as a prefix to the key of //! each setting. TRUE is returned if there is no error. //! - virtual bool readProperties(QSettings &qs,const QString &prefix); + virtual bool readProperties(TQSettings &qs,const TQString &prefix); //! The lexer's properties are written to the settings \a qs. //! \a prefix (which has a trailing '/') should be used as a prefix to //! the key of each setting. TRUE is returned if there is no error. //! - virtual bool writeProperties(QSettings &qs,const QString &prefix) const; + virtual bool writeProperties(TQSettings &qs,const TQString &prefix) const; private: int autoIndStyle; - QFont defFont; - QColor defColor; - QColor defPaper; + TQFont defFont; + TQColor defColor; + TQColor defPaper; -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaLexer(const QextScintillaLexer &); QextScintillaLexer &operator=(const QextScintillaLexer &); #endif diff --git a/qt/qextscintillalexerbash.cpp b/qt/qextscintillalexerbash.cpp index b5d172b..8edb55f 100644 --- a/qt/qextscintillalexerbash.cpp +++ b/qt/qextscintillalexerbash.cpp @@ -3,32 +3,32 @@ // 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 <qcolor.h> -#include <qfont.h> -#include <qsettings.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqsettings.h> -#include "qextscintillalexerbash.h" +#include "tqextscintillalexerbash.h" // The ctor. -QextScintillaLexerBash::QextScintillaLexerBash(QObject *parent, +QextScintillaLexerBash::QextScintillaLexerBash(TQObject *parent, const char *name) : QextScintillaLexer(parent,name), fold_comments(FALSE), fold_compact(TRUE) @@ -66,42 +66,42 @@ int QextScintillaLexerBash::braceStyle() const // Return the string of characters that comprise a word. const char *QextScintillaLexerBash::wordCharacters() const { - return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$@%&"; + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPTQRSTUVWXYZ0123456789_$@%&"; } // Returns the foreground colour of the text for a style. -QColor QextScintillaLexerBash::color(int style) const +TQColor QextScintillaLexerBash::color(int style) const { switch (style) { case Default: - return QColor(0x80,0x80,0x80); + return TQColor(0x80,0x80,0x80); case Error: case Backticks: - return QColor(0xff,0xff,0x00); + return TQColor(0xff,0xff,0x00); case Comment: - return QColor(0x00,0x7f,0x00); + return TQColor(0x00,0x7f,0x00); case Number: - return QColor(0x00,0x7f,0x7f); + return TQColor(0x00,0x7f,0x7f); case Keyword: - return QColor(0x00,0x00,0x7f); + return TQColor(0x00,0x00,0x7f); case DoubleQuotedString: case SingleQuotedString: case SingleQuotedHereDocument: - return QColor(0x7f,0x00,0x7f); + return TQColor(0x7f,0x00,0x7f); case Operator: case Identifier: case Scalar: case ParameterExpansion: case HereDocumentDelimiter: - return QColor(0x00,0x00,0x00); + return TQColor(0x00,0x00,0x00); } return QextScintillaLexer::color(style); @@ -122,17 +122,17 @@ bool QextScintillaLexerBash::eolFill(int style) const // Returns the font of the text for a style. -QFont QextScintillaLexerBash::font(int style) const +TQFont QextScintillaLexerBash::font(int style) const { - QFont f; + TQFont f; switch (style) { case Comment: #if defined(Q_OS_WIN) - f = QFont("Comic Sans MS",9); + f = TQFont("Comic Sans MS",9); #else - f = QFont("Bitstream Vera Serif",9); + f = TQFont("Bitstream Vera Serif",9); #endif break; @@ -145,9 +145,9 @@ QFont QextScintillaLexerBash::font(int style) const case DoubleQuotedString: case SingleQuotedString: #if defined(Q_OS_WIN) - f = QFont("Courier New",10); + f = TQFont("Courier New",10); #else - f = QFont("Bitstream Vera Sans Mono",9); + f = TQFont("Bitstream Vera Sans Mono",9); #endif break; @@ -195,7 +195,7 @@ const char *QextScintillaLexerBash::keywords(int set) const // Returns the user name of a style. -QString QextScintillaLexerBash::description(int style) const +TQString QextScintillaLexerBash::description(int style) const { switch (style) { @@ -242,30 +242,30 @@ QString QextScintillaLexerBash::description(int style) const return tr("Single-quoted here document"); } - return QString::null; + return TQString(); } // Returns the background colour of the text for a style. -QColor QextScintillaLexerBash::paper(int style) const +TQColor QextScintillaLexerBash::paper(int style) const { switch (style) { case Error: - return QColor(0xff,0x00,0x00); + return TQColor(0xff,0x00,0x00); case Scalar: - return QColor(0xff,0xe0,0xe0); + return TQColor(0xff,0xe0,0xe0); case ParameterExpansion: - return QColor(0xff,0xff,0xe0); + return TQColor(0xff,0xff,0xe0); case Backticks: - return QColor(0xa0,0x80,0x80); + return TQColor(0xa0,0x80,0x80); case HereDocumentDelimiter: case SingleQuotedHereDocument: - return QColor(0xdd,0xd0,0xdd); + return TQColor(0xdd,0xd0,0xdd); } return QextScintillaLexer::paper(style); @@ -281,7 +281,7 @@ void QextScintillaLexerBash::refreshProperties() // Read properties from the settings. -bool QextScintillaLexerBash::readProperties(QSettings &qs,const QString &prefix) +bool QextScintillaLexerBash::readProperties(TQSettings &qs,const TQString &prefix) { int rc = TRUE; bool ok, flag; @@ -307,7 +307,7 @@ bool QextScintillaLexerBash::readProperties(QSettings &qs,const QString &prefix) // Write properties to the settings. -bool QextScintillaLexerBash::writeProperties(QSettings &qs,const QString &prefix) const +bool QextScintillaLexerBash::writeProperties(TQSettings &qs,const TQString &prefix) const { int rc = TRUE; diff --git a/qt/qextscintillalexerbash.h b/qt/qextscintillalexerbash.h index 344aac7..a52cf0e 100644 --- a/qt/qextscintillalexerbash.h +++ b/qt/qextscintillalexerbash.h @@ -3,38 +3,39 @@ // 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. -#ifndef QEXTSCINTILLALEXERBASH_H -#define QEXTSCINTILLALEXERBASH_H +#ifndef TQEXTSCINTILLALEXERBASH_H +#define TQEXTSCINTILLALEXERBASH_H -#include <qobject.h> +#include <tqobject.h> -#include <qextscintillaglobal.h> -#include <qextscintillalexer.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillalexer.h> //! \brief The QextScintillaLexerBash class encapsulates the Scintilla Bash //! lexer. -class QEXTSCINTILLA_EXPORT QextScintillaLexerBash : public QextScintillaLexer +class TQEXTSCINTILLA_EXPORT QextScintillaLexerBash : public QextScintillaLexer { Q_OBJECT + TQ_OBJECT public: //! This enum defines the meanings of the different styles used by the @@ -88,7 +89,7 @@ public: //! Construct a QextScintillaLexerBash with parent \a parent and name //! \a name. \a parent is typically the QextScintilla instance. - QextScintillaLexerBash(QObject *parent = 0,const char *name = 0); + QextScintillaLexerBash(TQObject *parent = 0,const char *name = 0); //! Destroys the QextScintillaLexerBash instance. virtual ~QextScintillaLexerBash(); @@ -110,28 +111,28 @@ public: //! \a style. //! //! \sa paper() - QColor color(int style) const; + TQColor color(int style) const; //! Returns the end-of-line fill for style number \a style. bool eolFill(int style) const; //! Returns the font for style number \a style. - QFont font(int style) const; + TQFont font(int style) const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. const char *keywords(int set) const; //! Returns the descriptive name for style number \a style. If the - //! style is invalid for this language then QString::null is returned. + //! style is invalid for this language then TQString() is returned. //! This is intended to be used in user preference dialogs. - QString description(int style) const; + TQString description(int style) const; //! Returns the background colour of the text for style number //! \a style. //! //! \sa color() - QColor paper(int style) const; + TQColor paper(int style) const; //! Causes all properties to be refreshed by emitting the //! propertyChanged() signal as required. @@ -165,13 +166,13 @@ protected: //! (which has a trailing '/') should be used as a prefix to the key of //! each setting. TRUE is returned if there is no error. //! - bool readProperties(QSettings &qs,const QString &prefix); + bool readProperties(TQSettings &qs,const TQString &prefix); //! The lexer's properties are written to the settings \a qs. //! \a prefix (which has a trailing '/') should be used as a prefix to //! the key of each setting. TRUE is returned if there is no error. //! - bool writeProperties(QSettings &qs,const QString &prefix) const; + bool writeProperties(TQSettings &qs,const TQString &prefix) const; private: void setCommentProp(); @@ -180,7 +181,7 @@ private: bool fold_comments; bool fold_compact; -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaLexerBash(const QextScintillaLexerBash &); QextScintillaLexerBash &operator=(const QextScintillaLexerBash &); #endif diff --git a/qt/qextscintillalexerbatch.cpp b/qt/qextscintillalexerbatch.cpp index 57a9418..076a378 100644 --- a/qt/qextscintillalexerbatch.cpp +++ b/qt/qextscintillalexerbatch.cpp @@ -3,32 +3,32 @@ // 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 <qcolor.h> -#include <qfont.h> -#include <qsettings.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqsettings.h> -#include "qextscintillalexerbatch.h" +#include "tqextscintillalexerbatch.h" // The ctor. -QextScintillaLexerBatch::QextScintillaLexerBatch(QObject *parent, +QextScintillaLexerBatch::QextScintillaLexerBatch(TQObject *parent, const char *name) : QextScintillaLexer(parent,name) { @@ -58,34 +58,34 @@ const char *QextScintillaLexerBatch::lexer() const // Return the string of characters that comprise a word. const char *QextScintillaLexerBatch::wordCharacters() const { - return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-"; + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPTQRSTUVWXYZ-"; } // Returns the foreground colour of the text for a style. -QColor QextScintillaLexerBatch::color(int style) const +TQColor QextScintillaLexerBatch::color(int style) const { switch (style) { case Default: case Operator: - return QColor(0x00,0x00,0x00); + return TQColor(0x00,0x00,0x00); case Comment: - return QColor(0x00,0x7f,0x00); + return TQColor(0x00,0x7f,0x00); case Keyword: case ExternalCommand: - return QColor(0x00,0x00,0x7f); + return TQColor(0x00,0x00,0x7f); case Label: - return QColor(0x7f,0x00,0x7f); + return TQColor(0x7f,0x00,0x7f); case HideCommandChar: - return QColor(0x7f,0x7f,0x00); + return TQColor(0x7f,0x7f,0x00); case Variable: - return QColor(0x80,0x00,0x80); + return TQColor(0x80,0x00,0x80); } return QextScintillaLexer::color(style); @@ -100,17 +100,17 @@ bool QextScintillaLexerBatch::eolFill(int style) const // Returns the font of the text for a style. -QFont QextScintillaLexerBatch::font(int style) const +TQFont QextScintillaLexerBatch::font(int style) const { - QFont f; + TQFont f; switch (style) { case Comment: #if defined(Q_OS_WIN) - f = QFont("Comic Sans MS",9); + f = TQFont("Comic Sans MS",9); #else - f = QFont("Bitstream Vera Serif",9); + f = TQFont("Bitstream Vera Serif",9); #endif break; @@ -121,9 +121,9 @@ QFont QextScintillaLexerBatch::font(int style) const case ExternalCommand: #if defined(Q_OS_WIN) - f = QFont("Courier New",10); + f = TQFont("Courier New",10); #else - f = QFont("Bitstream Vera Sans Mono",9); + f = TQFont("Bitstream Vera Sans Mono",9); #endif f.setBold(TRUE); break; @@ -152,7 +152,7 @@ const char *QextScintillaLexerBatch::keywords(int set) const // Returns the user name of a style. -QString QextScintillaLexerBatch::description(int style) const +TQString QextScintillaLexerBatch::description(int style) const { switch (style) { @@ -181,17 +181,17 @@ QString QextScintillaLexerBatch::description(int style) const return tr("Operator"); } - return QString::null; + return TQString(); } // Returns the background colour of the text for a style. -QColor QextScintillaLexerBatch::paper(int style) const +TQColor QextScintillaLexerBatch::paper(int style) const { switch (style) { case Label: - return QColor(0x60,0x60,0x60); + return TQColor(0x60,0x60,0x60); } return QextScintillaLexer::paper(style); diff --git a/qt/qextscintillalexerbatch.h b/qt/qextscintillalexerbatch.h index 517edfb..e20e831 100644 --- a/qt/qextscintillalexerbatch.h +++ b/qt/qextscintillalexerbatch.h @@ -3,38 +3,39 @@ // 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. -#ifndef QEXTSCINTILLALEXERBATCH_H -#define QEXTSCINTILLALEXERBATCH_H +#ifndef TQEXTSCINTILLALEXERBATCH_H +#define TQEXTSCINTILLALEXERBATCH_H -#include <qobject.h> +#include <tqobject.h> -#include <qextscintillaglobal.h> -#include <qextscintillalexer.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillalexer.h> //! \brief The QextScintillaLexerBatch class encapsulates the Scintilla batch //! file lexer. -class QEXTSCINTILLA_EXPORT QextScintillaLexerBatch : public QextScintillaLexer +class TQEXTSCINTILLA_EXPORT QextScintillaLexerBatch : public QextScintillaLexer { Q_OBJECT + TQ_OBJECT public: //! This enum defines the meanings of the different styles used by the @@ -67,7 +68,7 @@ public: //! Construct a QextScintillaLexerBatch with parent \a parent and name //! \a name. \a parent is typically the QextScintilla instance. - QextScintillaLexerBatch(QObject *parent = 0,const char *name = 0); + QextScintillaLexerBatch(TQObject *parent = 0,const char *name = 0); //! Destroys the QextScintillaLexerBatch instance. virtual ~QextScintillaLexerBatch(); @@ -86,31 +87,31 @@ public: //! \a style. //! //! \sa paper() - QColor color(int style) const; + TQColor color(int style) const; //! Returns the end-of-line fill for style number \a style. bool eolFill(int style) const; //! Returns the font for style number \a style. - QFont font(int style) const; + TQFont font(int style) const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. const char *keywords(int set) const; //! Returns the descriptive name for style number \a style. If the - //! style is invalid for this language then QString::null is returned. + //! style is invalid for this language then TQString() is returned. //! This is intended to be used in user preference dialogs. - QString description(int style) const; + TQString description(int style) const; //! Returns the background colour of the text for style number //! \a style. //! //! \sa color() - QColor paper(int style) const; + TQColor paper(int style) const; private: -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaLexerBatch(const QextScintillaLexerBatch &); QextScintillaLexerBatch &operator=(const QextScintillaLexerBatch &); #endif diff --git a/qt/qextscintillalexercpp.cpp b/qt/qextscintillalexercpp.cpp index 706d86b..2f94bc1 100644 --- a/qt/qextscintillalexercpp.cpp +++ b/qt/qextscintillalexercpp.cpp @@ -3,32 +3,32 @@ // 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 <qcolor.h> -#include <qfont.h> -#include <qsettings.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqsettings.h> -#include "qextscintillalexercpp.h" +#include "tqextscintillalexercpp.h" // The ctor. -QextScintillaLexerCPP::QextScintillaLexerCPP(QObject *parent,const char *name, +QextScintillaLexerCPP::QextScintillaLexerCPP(TQObject *parent,const char *name, bool caseInsensitiveKeywords) : QextScintillaLexer(parent,name), fold_atelse(FALSE), fold_comments(FALSE), fold_compact(TRUE), fold_preproc(TRUE), @@ -98,54 +98,54 @@ int QextScintillaLexerCPP::braceStyle() const // Return the string of characters that comprise a word. const char *QextScintillaLexerCPP::wordCharacters() const { - return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_#"; + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPTQRSTUVWXYZ0123456789_#"; } // Returns the foreground colour of the text for a style. -QColor QextScintillaLexerCPP::color(int style) const +TQColor QextScintillaLexerCPP::color(int style) const { switch (style) { case Default: - return QColor(0x80,0x80,0x80); + return TQColor(0x80,0x80,0x80); case Comment: case CommentLine: - return QColor(0x00,0x7f,0x00); + return TQColor(0x00,0x7f,0x00); case CommentDoc: case CommentLineDoc: - return QColor(0x3f,0x70,0x3f); + return TQColor(0x3f,0x70,0x3f); case Number: - return QColor(0x00,0x7f,0x7f); + return TQColor(0x00,0x7f,0x7f); case Keyword: - return QColor(0x00,0x00,0x7f); + return TQColor(0x00,0x00,0x7f); case DoubleQuotedString: case SingleQuotedString: - return QColor(0x7f,0x00,0x7f); + return TQColor(0x7f,0x00,0x7f); case PreProcessor: - return QColor(0x7f,0x7f,0x00); + return TQColor(0x7f,0x7f,0x00); case Operator: case UnclosedString: - return QColor(0x00,0x00,0x00); + return TQColor(0x00,0x00,0x00); case Identifier: break; case Regex: - return QColor(0x3f,0x7f,0x3f); + return TQColor(0x3f,0x7f,0x3f); case CommentDocKeyword: - return QColor(0x30,0x60,0xa0); + return TQColor(0x30,0x60,0xa0); case CommentDocKeywordError: - return QColor(0x80,0x40,0x20); + return TQColor(0x80,0x40,0x20); } return QextScintillaLexer::color(style); @@ -160,9 +160,9 @@ bool QextScintillaLexerCPP::eolFill(int style) const // Returns the font of the text for a style. -QFont QextScintillaLexerCPP::font(int style) const +TQFont QextScintillaLexerCPP::font(int style) const { - QFont f; + TQFont f; switch (style) { @@ -173,9 +173,9 @@ QFont QextScintillaLexerCPP::font(int style) const case CommentDocKeyword: case CommentDocKeywordError: #if defined(Q_OS_WIN) - f = QFont("Comic Sans MS",9); + f = TQFont("Comic Sans MS",9); #else - f = QFont("Bitstream Vera Serif",9); + f = TQFont("Bitstream Vera Serif",9); #endif break; @@ -189,9 +189,9 @@ QFont QextScintillaLexerCPP::font(int style) const case SingleQuotedString: case UnclosedString: #if defined(Q_OS_WIN) - f = QFont("Courier New",10); + f = TQFont("Courier New",10); #else - f = QFont("Bitstream Vera Sans Mono",9); + f = TQFont("Bitstream Vera Sans Mono",9); #endif break; @@ -240,7 +240,7 @@ const char *QextScintillaLexerCPP::keywords(int set) const // Returns the user name of a style. -QString QextScintillaLexerCPP::description(int style) const +TQString QextScintillaLexerCPP::description(int style) const { switch (style) { @@ -296,15 +296,15 @@ QString QextScintillaLexerCPP::description(int style) const return tr("Global classes and typedefs"); } - return QString::null; + return TQString(); } // Returns the background colour of the text for a style. -QColor QextScintillaLexerCPP::paper(int style) const +TQColor QextScintillaLexerCPP::paper(int style) const { if (style == UnclosedString) - return QColor(0xe0,0xc0,0xe0); + return TQColor(0xe0,0xc0,0xe0); return QextScintillaLexer::paper(style); } @@ -322,7 +322,7 @@ void QextScintillaLexerCPP::refreshProperties() // Read properties from the settings. -bool QextScintillaLexerCPP::readProperties(QSettings &qs,const QString &prefix) +bool QextScintillaLexerCPP::readProperties(TQSettings &qs,const TQString &prefix) { int rc = TRUE; bool ok, flag; @@ -372,7 +372,7 @@ bool QextScintillaLexerCPP::readProperties(QSettings &qs,const QString &prefix) // Write properties to the settings. -bool QextScintillaLexerCPP::writeProperties(QSettings &qs,const QString &prefix) const +bool QextScintillaLexerCPP::writeProperties(TQSettings &qs,const TQString &prefix) const { int rc = TRUE; diff --git a/qt/qextscintillalexercpp.h b/qt/qextscintillalexercpp.h index 01c7157..420c473 100644 --- a/qt/qextscintillalexercpp.h +++ b/qt/qextscintillalexercpp.h @@ -3,38 +3,39 @@ // 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. -#ifndef QEXTSCINTILLALEXERCPP_H -#define QEXTSCINTILLALEXERCPP_H +#ifndef TQEXTSCINTILLALEXERCPP_H +#define TQEXTSCINTILLALEXERCPP_H -#include <qobject.h> +#include <tqobject.h> -#include <qextscintillaglobal.h> -#include <qextscintillalexer.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillalexer.h> //! \brief The QextScintillaLexerCPP class encapsulates the Scintilla C++ //! lexer. -class QEXTSCINTILLA_EXPORT QextScintillaLexerCPP : public QextScintillaLexer +class TQEXTSCINTILLA_EXPORT QextScintillaLexerCPP : public QextScintillaLexer { Q_OBJECT + TQ_OBJECT public: //! This enum defines the meanings of the different styles used by the @@ -112,7 +113,7 @@ public: //! \a name. \a parent is typically the QextScintilla instance. //! \a caseInsensitiveKeywords is TRUE if the lexer ignores the case of //! keywords. - QextScintillaLexerCPP(QObject *parent = 0,const char *name = 0, + QextScintillaLexerCPP(TQObject *parent = 0,const char *name = 0, bool caseInsensitiveKeywords = FALSE); //! Destroys the QextScintillaLexerCPP instance. @@ -150,28 +151,28 @@ public: //! \a style. //! //! \sa paper() - QColor color(int style) const; + TQColor color(int style) const; //! Returns the end-of-line fill for style number \a style. bool eolFill(int style) const; //! Returns the font for style number \a style. - QFont font(int style) const; + TQFont font(int style) const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. const char *keywords(int set) const; //! Returns the descriptive name for style number \a style. If the - //! style is invalid for this language then QString::null is returned. + //! style is invalid for this language then TQString() is returned. //! This is intended to be used in user preference dialogs. - QString description(int style) const; + TQString description(int style) const; //! Returns the background colour of the text for style number //! \a style. //! //! \sa color() - QColor paper(int style) const; + TQColor paper(int style) const; //! Causes all properties to be refreshed by emitting the //! propertyChanged() signal as required. @@ -240,14 +241,14 @@ protected: //! each setting. TRUE is returned if there is no error. //! //! \sa writeProperties() - bool readProperties(QSettings &qs,const QString &prefix); + bool readProperties(TQSettings &qs,const TQString &prefix); //! The lexer's properties are written to the settings \a qs. //! \a prefix (which has a trailing '/') should be used as a prefix to //! the key of each setting. TRUE is returned if there is no error. //! //! \sa readProperties() - bool writeProperties(QSettings &qs,const QString &prefix) const; + bool writeProperties(TQSettings &qs,const TQString &prefix) const; private: void setAtElseProp(); @@ -264,7 +265,7 @@ private: bool nocase; -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaLexerCPP(const QextScintillaLexerCPP &); QextScintillaLexerCPP &operator=(const QextScintillaLexerCPP &); #endif diff --git a/qt/qextscintillalexercsharp.cpp b/qt/qextscintillalexercsharp.cpp index 7a8a21c..2497b46 100644 --- a/qt/qextscintillalexercsharp.cpp +++ b/qt/qextscintillalexercsharp.cpp @@ -3,31 +3,31 @@ // 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 <qcolor.h> -#include <qfont.h> +#include <tqcolor.h> +#include <tqfont.h> -#include "qextscintillalexercsharp.h" +#include "tqextscintillalexercsharp.h" // The ctor. -QextScintillaLexerCSharp::QextScintillaLexerCSharp(QObject *parent,const char *name) +QextScintillaLexerCSharp::QextScintillaLexerCSharp(TQObject *parent,const char *name) : QextScintillaLexerCPP(parent,name) { } @@ -47,10 +47,10 @@ const char *QextScintillaLexerCSharp::language() const // Returns the foreground colour of the text for a style. -QColor QextScintillaLexerCSharp::color(int style) const +TQColor QextScintillaLexerCSharp::color(int style) const { if (style == VerbatimString) - return QColor(0x00,0x7f,0x00); + return TQColor(0x00,0x7f,0x00); return QextScintillaLexerCPP::color(style); } @@ -67,13 +67,13 @@ bool QextScintillaLexerCSharp::eolFill(int style) const // Returns the font of the text for a style. -QFont QextScintillaLexerCSharp::font(int style) const +TQFont QextScintillaLexerCSharp::font(int style) const { if (style == VerbatimString) #if defined(Q_OS_WIN) - return QFont("Courier New",10); + return TQFont("Courier New",10); #else - return QFont("Bitstream Vera Sans Mono",9); + return TQFont("Bitstream Vera Sans Mono",9); #endif return QextScintillaLexerCPP::font(style); @@ -99,7 +99,7 @@ const char *QextScintillaLexerCSharp::keywords(int set) const // Returns the user name of a style. -QString QextScintillaLexerCSharp::description(int style) const +TQString QextScintillaLexerCSharp::description(int style) const { if (style == VerbatimString) return tr("Verbatim string"); @@ -109,10 +109,10 @@ QString QextScintillaLexerCSharp::description(int style) const // Returns the background colour of the text for a style. -QColor QextScintillaLexerCSharp::paper(int style) const +TQColor QextScintillaLexerCSharp::paper(int style) const { if (style == VerbatimString) - return QColor(0xe0,0xff,0xe0); + return TQColor(0xe0,0xff,0xe0); return QextScintillaLexer::paper(style); } diff --git a/qt/qextscintillalexercsharp.h b/qt/qextscintillalexercsharp.h index 97224e1..77971d0 100644 --- a/qt/qextscintillalexercsharp.h +++ b/qt/qextscintillalexercsharp.h @@ -3,43 +3,44 @@ // 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. -#ifndef QEXTSCINTILLALEXERCSHARP_H -#define QEXTSCINTILLALEXERCSHARP_H +#ifndef TQEXTSCINTILLALEXERCSHARP_H +#define TQEXTSCINTILLALEXERCSHARP_H -#include <qobject.h> +#include <tqobject.h> -#include <qextscintillaglobal.h> -#include <qextscintillalexercpp.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillalexercpp.h> //! \brief The QextScintillaLexerCSharp class encapsulates the Scintilla C# //! lexer. -class QEXTSCINTILLA_EXPORT QextScintillaLexerCSharp : public QextScintillaLexerCPP +class TQEXTSCINTILLA_EXPORT QextScintillaLexerCSharp : public QextScintillaLexerCPP { Q_OBJECT + TQ_OBJECT public: //! Construct a QextScintillaLexerCSharp with parent \a parent and name //! \a name. \a parent is typically the QextScintilla instance. - QextScintillaLexerCSharp(QObject *parent = 0,const char *name = 0); + QextScintillaLexerCSharp(TQObject *parent = 0,const char *name = 0); //! Destroys the QextScintillaLexerCSharp instance. virtual ~QextScintillaLexerCSharp(); @@ -51,31 +52,31 @@ public: //! \a style. //! //! \sa paper() - QColor color(int style) const; + TQColor color(int style) const; //! Returns the end-of-line fill for style number \a style. bool eolFill(int style) const; //! Returns the font for style number \a style. - QFont font(int style) const; + TQFont font(int style) const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. const char *keywords(int set) const; //! Returns the descriptive name for style number \a style. If the - //! style is invalid for this language then QString::null is returned. + //! style is invalid for this language then TQString() is returned. //! This is intended to be used in user preference dialogs. - QString description(int style) const; + TQString description(int style) const; //! Returns the background colour of the text for style number //! \a style. //! //! \sa color() - QColor paper(int style) const; + TQColor paper(int style) const; private: -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaLexerCSharp(const QextScintillaLexerCSharp &); QextScintillaLexerCSharp &operator=(const QextScintillaLexerCSharp &); #endif diff --git a/qt/qextscintillalexercss.cpp b/qt/qextscintillalexercss.cpp index f2e57d9..c32371d 100644 --- a/qt/qextscintillalexercss.cpp +++ b/qt/qextscintillalexercss.cpp @@ -3,32 +3,32 @@ // 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 <qcolor.h> -#include <qfont.h> -#include <qsettings.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqsettings.h> -#include "qextscintillalexercss.h" +#include "tqextscintillalexercss.h" // The ctor. -QextScintillaLexerCSS::QextScintillaLexerCSS(QObject *parent,const char *name) +QextScintillaLexerCSS::QextScintillaLexerCSS(TQObject *parent,const char *name) : QextScintillaLexer(parent,name), fold_comments(FALSE), fold_compact(TRUE) { @@ -78,54 +78,54 @@ const char *QextScintillaLexerCSS::blockEnd(int *style) const // Return the string of characters that comprise a word. const char *QextScintillaLexerCSS::wordCharacters() const { - return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-"; + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPTQRSTUVWXYZ0123456789-"; } // Returns the foreground colour of the text for a style. -QColor QextScintillaLexerCSS::color(int style) const +TQColor QextScintillaLexerCSS::color(int style) const { switch (style) { case Default: - return QColor(0xff,0x00,0x80); + return TQColor(0xff,0x00,0x80); case Tag: - return QColor(0x00,0x00,0x7f); + return TQColor(0x00,0x00,0x7f); case PseudoClass: case Attribute: - return QColor(0x80,0x00,0x00); + return TQColor(0x80,0x00,0x00); case UnknownPseudoClass: case UnknownProperty: - return QColor(0xff,0x00,0x00); + return TQColor(0xff,0x00,0x00); case Operator: - return QColor(0x00,0x00,0x00); + return TQColor(0x00,0x00,0x00); case CSS1Property: - return QColor(0x00,0x40,0xe0); + return TQColor(0x00,0x40,0xe0); case Value: case DoubleQuotedString: case SingleQuotedString: - return QColor(0x7f,0x00,0x7f); + return TQColor(0x7f,0x00,0x7f); case Comment: - return QColor(0x00,0x7f,0x00); + return TQColor(0x00,0x7f,0x00); case IDSelector: - return QColor(0x00,0x7f,0x7f); + return TQColor(0x00,0x7f,0x7f); case Important: - return QColor(0xff,0x80,0x00); + return TQColor(0xff,0x80,0x00); case AtRule: - return QColor(0x7f,0x7f,0x00); + return TQColor(0x7f,0x7f,0x00); case CSS2Property: - return QColor(0x00,0xa0,0xe0); + return TQColor(0x00,0xa0,0xe0); } return QextScintillaLexer::color(style); @@ -133,15 +133,15 @@ QColor QextScintillaLexerCSS::color(int style) const // Returns the font of the text for a style. -QFont QextScintillaLexerCSS::font(int style) const +TQFont QextScintillaLexerCSS::font(int style) const { - QFont f; + TQFont f; if (style == Comment) #if defined(Q_OS_WIN) - f = QFont("Comic Sans MS",9); + f = TQFont("Comic Sans MS",9); #else - f = QFont("Bitstream Vera Serif",9); + f = TQFont("Bitstream Vera Serif",9); #endif else { @@ -199,16 +199,16 @@ const char *QextScintillaLexerCSS::keywords(int set) const "border-top-style border-right-style " "border-bottom-style border-left-style border-style " "top right bottom left position z-index direction " - "unicode-bidi min-width max-width min-height " + "tqunicode-bidi min-width max-width min-height " "max-height overflow clip visibility content quotes " "counter-reset counter-increment marker-offset size " "marks page-break-before page-break-after " "page-break-inside page orphans widows font-stretch " - "font-size-adjust unicode-range units-per-em src " + "font-size-adjust tqunicode-range units-per-em src " "panose-1 stemv stemh slope cap-height x-height " "ascent descent widths bbox definition-src baseline " "centerline mathline topline text-shadow " - "caption-side table-layout border-collapse " + "caption-side table-tqlayout border-collapse " "border-spacing empty-cells speak-header cursor " "outline outline-width outline-style outline-color " "volume speak pause-before pause-after pause " @@ -222,7 +222,7 @@ const char *QextScintillaLexerCSS::keywords(int set) const // Returns the user name of a style. -QString QextScintillaLexerCSS::description(int style) const +TQString QextScintillaLexerCSS::description(int style) const { switch (style) { @@ -275,7 +275,7 @@ QString QextScintillaLexerCSS::description(int style) const return tr("Attribute"); } - return QString::null; + return TQString(); } @@ -288,7 +288,7 @@ void QextScintillaLexerCSS::refreshProperties() // Read properties from the settings. -bool QextScintillaLexerCSS::readProperties(QSettings &qs,const QString &prefix) +bool QextScintillaLexerCSS::readProperties(TQSettings &qs,const TQString &prefix) { int rc = TRUE; bool ok, flag; @@ -314,7 +314,7 @@ bool QextScintillaLexerCSS::readProperties(QSettings &qs,const QString &prefix) // Write properties to the settings. -bool QextScintillaLexerCSS::writeProperties(QSettings &qs,const QString &prefix) const +bool QextScintillaLexerCSS::writeProperties(TQSettings &qs,const TQString &prefix) const { int rc = TRUE; diff --git a/qt/qextscintillalexercss.h b/qt/qextscintillalexercss.h index ff91cce..d8344a2 100644 --- a/qt/qextscintillalexercss.h +++ b/qt/qextscintillalexercss.h @@ -3,38 +3,39 @@ // 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. -#ifndef QEXTSCINTILLALEXERCSS_H -#define QEXTSCINTILLALEXERCSS_H +#ifndef TQEXTSCINTILLALEXERCSS_H +#define TQEXTSCINTILLALEXERCSS_H -#include <qobject.h> +#include <tqobject.h> -#include <qextscintillaglobal.h> -#include <qextscintillalexer.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillalexer.h> //! \brief The QextScintillaLexerCSS class encapsulates the Scintilla CSS //! lexer. -class QEXTSCINTILLA_EXPORT QextScintillaLexerCSS : public QextScintillaLexer +class TQEXTSCINTILLA_EXPORT QextScintillaLexerCSS : public QextScintillaLexer { Q_OBJECT + TQ_OBJECT public: //! This enum defines the meanings of the different styles used by the @@ -94,7 +95,7 @@ public: //! Construct a QextScintillaLexerCSS with parent \a parent and name //! \a name. \a parent is typically the QextScintilla instance. - QextScintillaLexerCSS(QObject *parent = 0,const char *name = 0); + QextScintillaLexerCSS(TQObject *parent = 0,const char *name = 0); //! Destroys the QextScintillaLexerCSS instance. virtual ~QextScintillaLexerCSS(); @@ -123,19 +124,19 @@ public: //! \a style. //! //! \sa paper() - QColor color(int style) const; + TQColor color(int style) const; //! Returns the font for style number \a style. - QFont font(int style) const; + TQFont font(int style) const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. const char *keywords(int set) const; //! Returns the descriptive name for style number \a style. If the - //! style is invalid for this language then QString::null is returned. + //! style is invalid for this language then TQString() is returned. //! This is intended to be used in user preference dialogs. - QString description(int style) const; + TQString description(int style) const; //! Causes all properties to be refreshed by emitting the //! propertyChanged() signal as required. @@ -169,13 +170,13 @@ protected: //! (which has a trailing '/') should be used as a prefix to the key of //! each setting. TRUE is returned if there is no error. //! - bool readProperties(QSettings &qs,const QString &prefix); + bool readProperties(TQSettings &qs,const TQString &prefix); //! The lexer's properties are written to the settings \a qs. //! \a prefix (which has a trailing '/') should be used as a prefix to //! the key of each setting. TRUE is returned if there is no error. //! - bool writeProperties(QSettings &qs,const QString &prefix) const; + bool writeProperties(TQSettings &qs,const TQString &prefix) const; private: void setCommentProp(); @@ -184,7 +185,7 @@ private: bool fold_comments; bool fold_compact; -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaLexerCSS(const QextScintillaLexerCSS &); QextScintillaLexerCSS &operator=(const QextScintillaLexerCSS &); #endif diff --git a/qt/qextscintillalexerdiff.cpp b/qt/qextscintillalexerdiff.cpp index ea0e457..8b8c4b4 100644 --- a/qt/qextscintillalexerdiff.cpp +++ b/qt/qextscintillalexerdiff.cpp @@ -3,32 +3,32 @@ // 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 <qcolor.h> -#include <qfont.h> -#include <qsettings.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqsettings.h> -#include "qextscintillalexerdiff.h" +#include "tqextscintillalexerdiff.h" // The ctor. -QextScintillaLexerDiff::QextScintillaLexerDiff(QObject *parent,const char *name) +QextScintillaLexerDiff::QextScintillaLexerDiff(TQObject *parent,const char *name) : QextScintillaLexer(parent,name) { } @@ -57,35 +57,35 @@ const char *QextScintillaLexerDiff::lexer() const // Return the string of characters that comprise a word. const char *QextScintillaLexerDiff::wordCharacters() const { - return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-"; + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPTQRSTUVWXYZ-"; } // Returns the foreground colour of the text for a style. -QColor QextScintillaLexerDiff::color(int style) const +TQColor QextScintillaLexerDiff::color(int style) const { switch (style) { case Default: - return QColor(0x00,0x00,0x00); + return TQColor(0x00,0x00,0x00); case Comment: - return QColor(0x00,0x7f,0x00); + return TQColor(0x00,0x7f,0x00); case Command: - return QColor(0x7f,0x7f,0x00); + return TQColor(0x7f,0x7f,0x00); case Header: - return QColor(0x7f,0x00,0x00); + return TQColor(0x7f,0x00,0x00); case Position: - return QColor(0x7f,0x00,0x7f); + return TQColor(0x7f,0x00,0x7f); case LineRemoved: - return QColor(0x00,0x7f,0x7f); + return TQColor(0x00,0x7f,0x7f); case LineAdded: - return QColor(0x00,0x00,0x7f); + return TQColor(0x00,0x00,0x7f); } return QextScintillaLexer::color(style); @@ -93,7 +93,7 @@ QColor QextScintillaLexerDiff::color(int style) const // Returns the user name of a style. -QString QextScintillaLexerDiff::description(int style) const +TQString QextScintillaLexerDiff::description(int style) const { switch (style) { @@ -119,5 +119,5 @@ QString QextScintillaLexerDiff::description(int style) const return tr("Added line"); } - return QString::null; + return TQString(); } diff --git a/qt/qextscintillalexerdiff.h b/qt/qextscintillalexerdiff.h index 9287a04..e80bd6e 100644 --- a/qt/qextscintillalexerdiff.h +++ b/qt/qextscintillalexerdiff.h @@ -3,38 +3,39 @@ // 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. -#ifndef QEXTSCINTILLALEXERDIFF_H -#define QEXTSCINTILLALEXERDIFF_H +#ifndef TQEXTSCINTILLALEXERDIFF_H +#define TQEXTSCINTILLALEXERDIFF_H -#include <qobject.h> +#include <tqobject.h> -#include <qextscintillaglobal.h> -#include <qextscintillalexer.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillalexer.h> //! \brief The QextScintillaLexerDiff class encapsulates the Scintilla Diff //! lexer. -class QEXTSCINTILLA_EXPORT QextScintillaLexerDiff : public QextScintillaLexer +class TQEXTSCINTILLA_EXPORT QextScintillaLexerDiff : public QextScintillaLexer { Q_OBJECT + TQ_OBJECT public: //! This enum defines the meanings of the different styles used by the @@ -64,7 +65,7 @@ public: //! Construct a QextScintillaLexerDiff with parent \a parent and name //! \a name. \a parent is typically the QextScintilla instance. - QextScintillaLexerDiff(QObject *parent = 0,const char *name = 0); + QextScintillaLexerDiff(TQObject *parent = 0,const char *name = 0); //! Destroys the QextScintillaLexerDiff instance. virtual ~QextScintillaLexerDiff(); @@ -83,15 +84,15 @@ public: //! \a style. //! //! \sa paper() - QColor color(int style) const; + TQColor color(int style) const; //! Returns the descriptive name for style number \a style. If the - //! style is invalid for this language then QString::null is returned. + //! style is invalid for this language then TQString() is returned. //! This is intended to be used in user preference dialogs. - QString description(int style) const; + TQString description(int style) const; private: -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaLexerDiff(const QextScintillaLexerDiff &); QextScintillaLexerDiff &operator=(const QextScintillaLexerDiff &); #endif diff --git a/qt/qextscintillalexerhtml.cpp b/qt/qextscintillalexerhtml.cpp index 100d47c..cc76a9f 100644 --- a/qt/qextscintillalexerhtml.cpp +++ b/qt/qextscintillalexerhtml.cpp @@ -3,34 +3,34 @@ // 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 <qcolor.h> -#include <qfont.h> -#include <qsettings.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqsettings.h> -#include "qextscintillalexerhtml.h" -#include "qextscintillalexerjavascript.h" -#include "qextscintillalexerpython.h" +#include "tqextscintillalexerhtml.h" +#include "tqextscintillalexerjavascript.h" +#include "tqextscintillalexerpython.h" // The ctor. -QextScintillaLexerHTML::QextScintillaLexerHTML(QObject *parent, +QextScintillaLexerHTML::QextScintillaLexerHTML(TQObject *parent, const char *name) : QextScintillaLexer(parent,name), fold_compact(TRUE), fold_preproc(TRUE), case_sens_tags(FALSE) @@ -61,12 +61,12 @@ const char *QextScintillaLexerHTML::lexer() const // Return the string of characters that comprise a word. const char *QextScintillaLexerHTML::wordCharacters() const { - return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-"; + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPTQRSTUVWXYZ0123456789_-"; } // Returns the foreground colour of the text for a style. -QColor QextScintillaLexerHTML::color(int style) const +TQColor QextScintillaLexerHTML::color(int style) const { switch (style) { @@ -80,7 +80,7 @@ QColor QextScintillaLexerHTML::color(int style) const case VBScriptDefault: case ASPVBScriptDefault: case PHPOperator: - return QColor(0x00,0x00,0x00); + return TQColor(0x00,0x00,0x00); case Tag: case XMLTagEnd: @@ -93,16 +93,16 @@ QColor QextScintillaLexerHTML::color(int style) const case ASPVBScriptKeyword: case ASPVBScriptIdentifier: case ASPVBScriptUnclosedString: - return QColor(0x00,0x00,0x80); + return TQColor(0x00,0x00,0x80); case UnknownTag: case UnknownAttribute: - return QColor(0xff,0x00,0x00); + return TQColor(0xff,0x00,0x00); case Attribute: case VBScriptNumber: case ASPVBScriptNumber: - return QColor(0x00,0x80,0x80); + return TQColor(0x00,0x80,0x80); case HTMLNumber: case JavaScriptNumber: @@ -111,7 +111,7 @@ QColor QextScintillaLexerHTML::color(int style) const case PythonFunctionMethodName: case ASPPythonNumber: case ASPPythonFunctionMethodName: - return QColor(0x00,0x7f,0x7f); + return TQColor(0x00,0x7f,0x7f); case HTMLDoubleQuotedString: case HTMLSingleQuotedString: @@ -124,50 +124,50 @@ QColor QextScintillaLexerHTML::color(int style) const case ASPPythonDoubleQuotedString: case ASPPythonSingleQuotedString: case PHPKeyword: - return QColor(0x7f,0x00,0x7f); + return TQColor(0x7f,0x00,0x7f); case OtherInTag: case Entity: case VBScriptString: case ASPVBScriptString: - return QColor(0x80,0x00,0x80); + return TQColor(0x80,0x00,0x80); case HTMLComment: case SGMLComment: - return QColor(0x80,0x80,0x00); + return TQColor(0x80,0x80,0x00); case XMLStart: case XMLEnd: case PHPStart: case PythonClassName: case ASPPythonClassName: - return QColor(0x00,0x00,0xff); + return TQColor(0x00,0x00,0xff); case HTMLValue: - return QColor(0xff,0x00,0xff); + return TQColor(0xff,0x00,0xff); case SGMLParameter: - return QColor(0x00,0x66,0x00); + return TQColor(0x00,0x66,0x00); case SGMLDoubleQuotedString: case SGMLError: - return QColor(0x80,0x00,0x00); + return TQColor(0x80,0x00,0x00); case SGMLSingleQuotedString: - return QColor(0x99,0x33,0x00); + return TQColor(0x99,0x33,0x00); case SGMLSpecial: - return QColor(0x33,0x66,0xff); + return TQColor(0x33,0x66,0xff); case SGMLEntity: - return QColor(0x33,0x33,0x33); + return TQColor(0x33,0x33,0x33); case SGMLBlockDefault: - return QColor(0x00,0x00,0x66); + return TQColor(0x00,0x00,0x66); case JavaScriptStart: case ASPJavaScriptStart: - return QColor(0x7f,0x7f,0x00); + return TQColor(0x7f,0x7f,0x00); case JavaScriptComment: case JavaScriptCommentLine: @@ -176,10 +176,10 @@ QColor QextScintillaLexerHTML::color(int style) const case PythonComment: case ASPPythonComment: case PHPDoubleQuotedString: - return QColor(0x00,0x7f,0x00); + return TQColor(0x00,0x7f,0x00); case JavaScriptCommentDoc: - return QColor(0x3f,0x70,0x3f); + return TQColor(0x3f,0x70,0x3f); case JavaScriptKeyword: case ASPJavaScriptKeyword: @@ -187,41 +187,41 @@ QColor QextScintillaLexerHTML::color(int style) const case ASPPythonKeyword: case PHPVariable: case PHPDoubleQuotedVariable: - return QColor(0x00,0x00,0x7f); + return TQColor(0x00,0x00,0x7f); case ASPJavaScriptCommentDoc: - return QColor(0x7f,0x7f,0x7f); + return TQColor(0x7f,0x7f,0x7f); case VBScriptComment: case ASPVBScriptComment: - return QColor(0x00,0x80,0x00); + return TQColor(0x00,0x80,0x00); case PythonStart: case PythonDefault: case ASPPythonStart: case ASPPythonDefault: - return QColor(0x80,0x80,0x80); + return TQColor(0x80,0x80,0x80); case PythonTripleSingleQuotedString: case PythonTripleDoubleQuotedString: case ASPPythonTripleSingleQuotedString: case ASPPythonTripleDoubleQuotedString: - return QColor(0x7f,0x00,0x00); + return TQColor(0x7f,0x00,0x00); case PHPDefault: - return QColor(0x00,0x00,0x33); + return TQColor(0x00,0x00,0x33); case PHPSingleQuotedString: - return QColor(0x00,0x9f,0x00); + return TQColor(0x00,0x9f,0x00); case PHPNumber: - return QColor(0xcc,0x99,0x00); + return TQColor(0xcc,0x99,0x00); case PHPComment: - return QColor(0x99,0x99,0x99); + return TQColor(0x99,0x99,0x99); case PHPCommentLine: - return QColor(0x66,0x66,0x66); + return TQColor(0x66,0x66,0x66); } return QextScintillaLexer::color(style); @@ -288,26 +288,26 @@ bool QextScintillaLexerHTML::eolFill(int style) const // Returns the font of the text for a style. -QFont QextScintillaLexerHTML::font(int style) const +TQFont QextScintillaLexerHTML::font(int style) const { - QFont f; + TQFont f; switch (style) { case Default: case Entity: #if defined(Q_OS_WIN) - f = QFont("Times New Roman",11); + f = TQFont("Times New Roman",11); #else - f = QFont("Bitstream Charter",10); + f = TQFont("Bitstream Charter",10); #endif break; case HTMLComment: #if defined(Q_OS_WIN) - f = QFont("Verdana",9); + f = TQFont("Verdana",9); #else - f = QFont("Bitstream Vera Sans",8); + f = TQFont("Bitstream Vera Sans",8); #endif break; @@ -333,9 +333,9 @@ QFont QextScintillaLexerHTML::font(int style) const case ASPJavaScriptKeyword: case ASPJavaScriptSymbol: #if defined(Q_OS_WIN) - f = QFont("Comic Sans MS",9); + f = TQFont("Comic Sans MS",9); #else - f = QFont("Bitstream Vera Serif",9); + f = TQFont("Bitstream Vera Serif",9); #endif f.setBold(TRUE); break; @@ -358,9 +358,9 @@ QFont QextScintillaLexerHTML::font(int style) const case ASPPythonComment: case PHPComment: #if defined(Q_OS_WIN) - f = QFont("Comic Sans MS",9); + f = TQFont("Comic Sans MS",9); #else - f = QFont("Bitstream Vera Serif",9); + f = TQFont("Bitstream Vera Serif",9); #endif break; @@ -375,18 +375,18 @@ QFont QextScintillaLexerHTML::font(int style) const case ASPVBScriptIdentifier: case ASPVBScriptUnclosedString: #if defined(Q_OS_WIN) - f = QFont("Lucida Sans Unicode",9); + f = TQFont("Lucida Sans Unicode",9); #else - f = QFont("Bitstream Vera Serif",9); + f = TQFont("Bitstream Vera Serif",9); #endif break; case VBScriptKeyword: case ASPVBScriptKeyword: #if defined(Q_OS_WIN) - f = QFont("Lucida Sans Unicode",9); + f = TQFont("Lucida Sans Unicode",9); #else - f = QFont("Bitstream Vera Serif",9); + f = TQFont("Bitstream Vera Serif",9); #endif f.setBold(TRUE); break; @@ -396,9 +396,9 @@ QFont QextScintillaLexerHTML::font(int style) const case ASPPythonDoubleQuotedString: case ASPPythonSingleQuotedString: #if defined(Q_OS_WIN) - f = QFont("Courier New",10); + f = TQFont("Courier New",10); #else - f = QFont("Bitstream Vera Sans Mono",9); + f = TQFont("Bitstream Vera Sans Mono",9); #endif break; @@ -411,9 +411,9 @@ QFont QextScintillaLexerHTML::font(int style) const case PHPCommentLine: #if defined(Q_OS_WIN) - f = QFont("Comic Sans MS",9); + f = TQFont("Comic Sans MS",9); #else - f = QFont("Bitstream Vera Serif",9); + f = TQFont("Bitstream Vera Serif",9); #endif f.setItalic(TRUE); break; @@ -474,7 +474,7 @@ const char *QextScintillaLexerHTML::keywords(int set) const "onselect onsubmit onunload " "profile prompt " "readonly rel rev rows rowspan rules " - "scheme scope selected shape size span src standby " + "scheme scope selected tqshape size span src standby " "start style summary " "tabindex target text title topmargin type " "usemap " @@ -532,7 +532,7 @@ const char *QextScintillaLexerHTML::keywords(int set) const // Returns the user name of a style. -QString QextScintillaLexerHTML::description(int style) const +TQString QextScintillaLexerHTML::description(int style) const { switch (style) { @@ -864,27 +864,27 @@ QString QextScintillaLexerHTML::description(int style) const return tr("PHP operator"); } - return QString::null; + return TQString(); } // Returns the background colour of the text for a style. -QColor QextScintillaLexerHTML::paper(int style) const +TQColor QextScintillaLexerHTML::paper(int style) const { switch (style) { case ASPAtStart: - return QColor(0xff,0xff,0x00); + return TQColor(0xff,0xff,0x00); case ASPStart: case CDATA: - return QColor(0xff,0xdf,0x00); + return TQColor(0xff,0xdf,0x00); case PHPStart: - return QColor(0xff,0xef,0xbf); + return TQColor(0xff,0xef,0xbf); case HTMLValue: - return QColor(0xff,0xef,0xff); + return TQColor(0xff,0xef,0xff); case SGMLDefault: case SGMLCommand: @@ -894,13 +894,13 @@ QColor QextScintillaLexerHTML::paper(int style) const case SGMLSpecial: case SGMLEntity: case SGMLComment: - return QColor(0xef,0xef,0xff); + return TQColor(0xef,0xef,0xff); case SGMLError: - return QColor(0xff,0x66,0x66); + return TQColor(0xff,0x66,0x66); case SGMLBlockDefault: - return QColor(0xcc,0xcc,0xe0); + return TQColor(0xcc,0xcc,0xe0); case JavaScriptDefault: case JavaScriptComment: @@ -912,15 +912,15 @@ QColor QextScintillaLexerHTML::paper(int style) const case JavaScriptDoubleQuotedString: case JavaScriptSingleQuotedString: case JavaScriptSymbol: - return QColor(0xf0,0xf0,0xff); + return TQColor(0xf0,0xf0,0xff); case JavaScriptUnclosedString: case ASPJavaScriptUnclosedString: - return QColor(0xbf,0xbb,0xb0); + return TQColor(0xbf,0xbb,0xb0); case JavaScriptRegex: case ASPJavaScriptRegex: - return QColor(0xff,0xbb,0xb0); + return TQColor(0xff,0xbb,0xb0); case ASPJavaScriptDefault: case ASPJavaScriptComment: @@ -932,7 +932,7 @@ QColor QextScintillaLexerHTML::paper(int style) const case ASPJavaScriptDoubleQuotedString: case ASPJavaScriptSingleQuotedString: case ASPJavaScriptSymbol: - return QColor(0xdf,0xdf,0x7f); + return TQColor(0xdf,0xdf,0x7f); case VBScriptDefault: case VBScriptComment: @@ -940,11 +940,11 @@ QColor QextScintillaLexerHTML::paper(int style) const case VBScriptKeyword: case VBScriptString: case VBScriptIdentifier: - return QColor(0xef,0xef,0xff); + return TQColor(0xef,0xef,0xff); case VBScriptUnclosedString: case ASPVBScriptUnclosedString: - return QColor(0x7f,0x7f,0xff); + return TQColor(0x7f,0x7f,0xff); case ASPVBScriptDefault: case ASPVBScriptComment: @@ -952,7 +952,7 @@ QColor QextScintillaLexerHTML::paper(int style) const case ASPVBScriptKeyword: case ASPVBScriptString: case ASPVBScriptIdentifier: - return QColor(0xcf,0xcf,0xef); + return TQColor(0xcf,0xcf,0xef); case PythonDefault: case PythonComment: @@ -966,7 +966,7 @@ QColor QextScintillaLexerHTML::paper(int style) const case PythonFunctionMethodName: case PythonOperator: case PythonIdentifier: - return QColor(0xef,0xff,0xef); + return TQColor(0xef,0xff,0xef); case ASPPythonDefault: case ASPPythonComment: @@ -980,7 +980,7 @@ QColor QextScintillaLexerHTML::paper(int style) const case ASPPythonFunctionMethodName: case ASPPythonOperator: case ASPPythonIdentifier: - return QColor(0xcf,0xef,0xcf); + return TQColor(0xcf,0xef,0xcf); case PHPDefault: case PHPDoubleQuotedString: @@ -992,7 +992,7 @@ QColor QextScintillaLexerHTML::paper(int style) const case PHPCommentLine: case PHPDoubleQuotedVariable: case PHPOperator: - return QColor(0xff,0xf8,0xf8); + return TQColor(0xff,0xf8,0xf8); } return QextScintillaLexer::paper(style); @@ -1009,7 +1009,7 @@ void QextScintillaLexerHTML::refreshProperties() // Read properties from the settings. -bool QextScintillaLexerHTML::readProperties(QSettings &qs,const QString &prefix) +bool QextScintillaLexerHTML::readProperties(TQSettings &qs,const TQString &prefix) { int rc = TRUE; bool ok, flag; @@ -1043,7 +1043,7 @@ bool QextScintillaLexerHTML::readProperties(QSettings &qs,const QString &prefix) // Write properties to the settings. -bool QextScintillaLexerHTML::writeProperties(QSettings &qs,const QString &prefix) const +bool QextScintillaLexerHTML::writeProperties(TQSettings &qs,const TQString &prefix) const { int rc = TRUE; diff --git a/qt/qextscintillalexerhtml.h b/qt/qextscintillalexerhtml.h index 1a71fe9..a5fac6e 100644 --- a/qt/qextscintillalexerhtml.h +++ b/qt/qextscintillalexerhtml.h @@ -3,38 +3,39 @@ // 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. -#ifndef QEXTSCINTILLALEXERHTML_H -#define QEXTSCINTILLALEXERHTML_H +#ifndef TQEXTSCINTILLALEXERHTML_H +#define TQEXTSCINTILLALEXERHTML_H -#include <qobject.h> +#include <tqobject.h> -#include <qextscintillaglobal.h> -#include <qextscintillalexer.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillalexer.h> //! \brief The QextScintillaLexerHTML class encapsulates the Scintilla HTML //! lexer. -class QEXTSCINTILLA_EXPORT QextScintillaLexerHTML : public QextScintillaLexer +class TQEXTSCINTILLA_EXPORT QextScintillaLexerHTML : public QextScintillaLexer { Q_OBJECT + TQ_OBJECT public: //! This enum defines the meanings of the different styles used by the @@ -375,7 +376,7 @@ public: //! Construct a QextScintillaLexerHTML with parent \a parent and name //! \a name. \a parent is typically the QextScintilla instance. - QextScintillaLexerHTML(QObject *parent = 0,const char *name = 0); + QextScintillaLexerHTML(TQObject *parent = 0,const char *name = 0); //! Destroys the QextScintillaLexerHTML instance. virtual ~QextScintillaLexerHTML(); @@ -394,28 +395,28 @@ public: //! \a style. //! //! \sa paper() - QColor color(int style) const; + TQColor color(int style) const; //! Returns the end-of-line fill for style number \a style. bool eolFill(int style) const; //! Returns the font for style number \a style. - QFont font(int style) const; + TQFont font(int style) const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. const char *keywords(int set) const; //! Returns the descriptive name for style number \a style. If the - //! style is invalid for this language then QString::null is returned. + //! style is invalid for this language then TQString() is returned. //! This is intended to be used in user preference dialogs. - QString description(int style) const; + TQString description(int style) const; //! Returns the background colour of the text for style number //! \a style. //! //! \sa color() - QColor paper(int style) const; + TQColor paper(int style) const; //! Causes all properties to be refreshed by emitting the //! propertyChanged() signal as required. @@ -460,13 +461,13 @@ protected: //! (which has a trailing '/') should be used as a prefix to the key of //! each setting. TRUE is returned if there is no error. //! - bool readProperties(QSettings &qs,const QString &prefix); + bool readProperties(TQSettings &qs,const TQString &prefix); //! The lexer's properties are written to the settings \a qs. //! \a prefix (which has a trailing '/') should be used as a prefix to //! the key of each setting. TRUE is returned if there is no error. //! - bool writeProperties(QSettings &qs,const QString &prefix) const; + bool writeProperties(TQSettings &qs,const TQString &prefix) const; private: void setCompactProp(); @@ -477,7 +478,7 @@ private: bool fold_preproc; bool case_sens_tags; -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaLexerHTML(const QextScintillaLexerHTML &); QextScintillaLexerHTML &operator=(const QextScintillaLexerHTML &); #endif diff --git a/qt/qextscintillalexeridl.cpp b/qt/qextscintillalexeridl.cpp index 96ea5eb..ecf7773 100644 --- a/qt/qextscintillalexeridl.cpp +++ b/qt/qextscintillalexeridl.cpp @@ -3,31 +3,31 @@ // 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 <qcolor.h> -#include <qfont.h> +#include <tqcolor.h> +#include <tqfont.h> -#include "qextscintillalexeridl.h" +#include "tqextscintillalexeridl.h" // The ctor. -QextScintillaLexerIDL::QextScintillaLexerIDL(QObject *parent,const char *name) +QextScintillaLexerIDL::QextScintillaLexerIDL(TQObject *parent,const char *name) : QextScintillaLexerCPP(parent,name) { } @@ -47,10 +47,10 @@ const char *QextScintillaLexerIDL::language() const // Returns the foreground colour of the text for a style. -QColor QextScintillaLexerIDL::color(int style) const +TQColor QextScintillaLexerIDL::color(int style) const { if (style == UUID) - return QColor(0x80,0x40,0x80); + return TQColor(0x80,0x40,0x80); return QextScintillaLexerCPP::color(style); } @@ -84,7 +84,7 @@ const char *QextScintillaLexerIDL::keywords(int set) const "object odl oleautomation optimize optional out out_of_line " "pipe pointer_default pragma properties propget propput " "propputref ptr public range readonly ref represent_as " - "requestedit restricted retval shape short signed size_is " + "requestedit restricted retval tqshape short signed size_is " "small source strict_context_handle string struct switch " "switch_is switch_type transmit_as typedef uidefault union " "unique unsigned user_marshal usesgetlasterror uuid v1_enum " @@ -93,7 +93,7 @@ const char *QextScintillaLexerIDL::keywords(int set) const // Returns the user name of a style. -QString QextScintillaLexerIDL::description(int style) const +TQString QextScintillaLexerIDL::description(int style) const { if (style == UUID) return tr("UUID"); diff --git a/qt/qextscintillalexeridl.h b/qt/qextscintillalexeridl.h index 1a5c2ee..e4e601c 100644 --- a/qt/qextscintillalexeridl.h +++ b/qt/qextscintillalexeridl.h @@ -3,43 +3,44 @@ // 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. -#ifndef QEXTSCINTILLALEXERIDL_H -#define QEXTSCINTILLALEXERIDL_H +#ifndef TQEXTSCINTILLALEXERIDL_H +#define TQEXTSCINTILLALEXERIDL_H -#include <qobject.h> +#include <tqobject.h> -#include <qextscintillaglobal.h> -#include <qextscintillalexercpp.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillalexercpp.h> //! \brief The QextScintillaLexerIDL class encapsulates the Scintilla IDL //! lexer. -class QEXTSCINTILLA_EXPORT QextScintillaLexerIDL : public QextScintillaLexerCPP +class TQEXTSCINTILLA_EXPORT QextScintillaLexerIDL : public QextScintillaLexerCPP { Q_OBJECT + TQ_OBJECT public: //! Construct a QextScintillaLexerIDL with parent \a parent and name //! \a name. \a parent is typically the QextScintilla instance. - QextScintillaLexerIDL(QObject *parent = 0,const char *name = 0); + QextScintillaLexerIDL(TQObject *parent = 0,const char *name = 0); //! Destroys the QextScintillaLexerIDL instance. virtual ~QextScintillaLexerIDL(); @@ -51,19 +52,19 @@ public: //! \a style. //! //! \sa paper() - QColor color(int style) const; + TQColor color(int style) const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. const char *keywords(int set) const; //! Returns the descriptive name for style number \a style. If the - //! style is invalid for this language then QString::null is returned. + //! style is invalid for this language then TQString() is returned. //! This is intended to be used in user preference dialogs. - QString description(int style) const; + TQString description(int style) const; private: -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaLexerIDL(const QextScintillaLexerIDL &); QextScintillaLexerIDL &operator=(const QextScintillaLexerIDL &); #endif diff --git a/qt/qextscintillalexerjava.cpp b/qt/qextscintillalexerjava.cpp index 71e2cd3..5026b9a 100644 --- a/qt/qextscintillalexerjava.cpp +++ b/qt/qextscintillalexerjava.cpp @@ -3,28 +3,28 @@ // 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 "qextscintillalexerjava.h" +#include "tqextscintillalexerjava.h" // The ctor. -QextScintillaLexerJava::QextScintillaLexerJava(QObject *parent,const char *name) +QextScintillaLexerJava::QextScintillaLexerJava(TQObject *parent,const char *name) : QextScintillaLexerCPP(parent,name) { } diff --git a/qt/qextscintillalexerjava.h b/qt/qextscintillalexerjava.h index 1aa59d3..a0d5ad1 100644 --- a/qt/qextscintillalexerjava.h +++ b/qt/qextscintillalexerjava.h @@ -3,43 +3,44 @@ // 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. -#ifndef QEXTSCINTILLALEXERJAVA_H -#define QEXTSCINTILLALEXERJAVA_H +#ifndef TQEXTSCINTILLALEXERJAVA_H +#define TQEXTSCINTILLALEXERJAVA_H -#include <qobject.h> +#include <tqobject.h> -#include <qextscintillaglobal.h> -#include <qextscintillalexercpp.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillalexercpp.h> //! \brief The QextScintillaLexerJava class encapsulates the Scintilla Java //! lexer. -class QEXTSCINTILLA_EXPORT QextScintillaLexerJava : public QextScintillaLexerCPP +class TQEXTSCINTILLA_EXPORT QextScintillaLexerJava : public QextScintillaLexerCPP { Q_OBJECT + TQ_OBJECT public: //! Construct a QextScintillaLexerJava with parent \a parent and name //! \a name. \a parent is typically the QextScintilla instance. - QextScintillaLexerJava(QObject *parent = 0,const char *name = 0); + QextScintillaLexerJava(TQObject *parent = 0,const char *name = 0); //! Destroys the QextScintillaLexerJava instance. virtual ~QextScintillaLexerJava(); @@ -52,7 +53,7 @@ public: const char *keywords(int set) const; private: -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaLexerJava(const QextScintillaLexerJava &); QextScintillaLexerJava &operator=(const QextScintillaLexerJava &); #endif diff --git a/qt/qextscintillalexerjavascript.cpp b/qt/qextscintillalexerjavascript.cpp index ee46092..2969d14 100644 --- a/qt/qextscintillalexerjavascript.cpp +++ b/qt/qextscintillalexerjavascript.cpp @@ -3,27 +3,27 @@ // 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 <qcolor.h> -#include <qfont.h> +#include <tqcolor.h> +#include <tqfont.h> -#include "qextscintillalexerjavascript.h" +#include "tqextscintillalexerjavascript.h" // The list of JavaScript keywords that can be used by other friendly lexers. @@ -37,7 +37,7 @@ const char *QextScintillaLexerJavaScript::keywordClass = // The ctor. -QextScintillaLexerJavaScript::QextScintillaLexerJavaScript(QObject *parent,const char *name) +QextScintillaLexerJavaScript::QextScintillaLexerJavaScript(TQObject *parent,const char *name) : QextScintillaLexerCPP(parent,name) { } @@ -57,10 +57,10 @@ const char *QextScintillaLexerJavaScript::language() const // Returns the foreground colour of the text for a style. -QColor QextScintillaLexerJavaScript::color(int style) const +TQColor QextScintillaLexerJavaScript::color(int style) const { if (style == Regex) - return QColor(0x3f,0x7f,0x3f); + return TQColor(0x3f,0x7f,0x3f); return QextScintillaLexerCPP::color(style); } @@ -77,13 +77,13 @@ bool QextScintillaLexerJavaScript::eolFill(int style) const // Returns the font of the text for a style. -QFont QextScintillaLexerJavaScript::font(int style) const +TQFont QextScintillaLexerJavaScript::font(int style) const { if (style == Regex) #if defined(Q_OS_WIN) - return QFont("Courier New",10); + return TQFont("Courier New",10); #else - return QFont("Bitstream Vera Sans Mono",9); + return TQFont("Bitstream Vera Sans Mono",9); #endif return QextScintillaLexerCPP::font(style); @@ -101,7 +101,7 @@ const char *QextScintillaLexerJavaScript::keywords(int set) const // Returns the user name of a style. -QString QextScintillaLexerJavaScript::description(int style) const +TQString QextScintillaLexerJavaScript::description(int style) const { if (style == Regex) return tr("Regular expression"); @@ -111,10 +111,10 @@ QString QextScintillaLexerJavaScript::description(int style) const // Returns the background colour of the text for a style. -QColor QextScintillaLexerJavaScript::paper(int style) const +TQColor QextScintillaLexerJavaScript::paper(int style) const { if (style == Regex) - return QColor(0xe0,0xf0,0xff); + return TQColor(0xe0,0xf0,0xff); return QextScintillaLexer::paper(style); } diff --git a/qt/qextscintillalexerjavascript.h b/qt/qextscintillalexerjavascript.h index b166524..c94f772 100644 --- a/qt/qextscintillalexerjavascript.h +++ b/qt/qextscintillalexerjavascript.h @@ -3,43 +3,44 @@ // 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. -#ifndef QEXTSCINTILLALEXERJSCRIPT_H -#define QEXTSCINTILLALEXERJSCRIPT_H +#ifndef TQEXTSCINTILLALEXERJSCRIPT_H +#define TQEXTSCINTILLALEXERJSCRIPT_H -#include <qobject.h> +#include <tqobject.h> -#include <qextscintillaglobal.h> -#include <qextscintillalexercpp.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillalexercpp.h> //! \brief The QextScintillaLexerJavaScript class encapsulates the Scintilla //! JavaScript lexer. -class QEXTSCINTILLA_EXPORT QextScintillaLexerJavaScript : public QextScintillaLexerCPP +class TQEXTSCINTILLA_EXPORT QextScintillaLexerJavaScript : public QextScintillaLexerCPP { Q_OBJECT + TQ_OBJECT public: //! Construct a QextScintillaLexerJavaScript with parent \a parent and //! name \a name. \a parent is typically the QextScintilla instance. - QextScintillaLexerJavaScript(QObject *parent = 0,const char *name = 0); + QextScintillaLexerJavaScript(TQObject *parent = 0,const char *name = 0); //! Destroys the QextScintillaLexerJavaScript instance. virtual ~QextScintillaLexerJavaScript(); @@ -51,35 +52,35 @@ public: //! \a style. //! //! \sa paper() - QColor color(int style) const; + TQColor color(int style) const; //! Returns the end-of-line fill for style number \a style. bool eolFill(int style) const; //! Returns the font for style number \a style. - QFont font(int style) const; + TQFont font(int style) const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. const char *keywords(int set) const; //! Returns the descriptive name for style number \a style. If the - //! style is invalid for this language then QString::null is returned. + //! style is invalid for this language then TQString() is returned. //! This is intended to be used in user preference dialogs. - QString description(int style) const; + TQString description(int style) const; //! Returns the background colour of the text for style number //! \a style. //! //! \sa color() - QColor paper(int style) const; + TQColor paper(int style) const; private: friend class QextScintillaLexerHTML; static const char *keywordClass; -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaLexerJavaScript(const QextScintillaLexerJavaScript &); QextScintillaLexerJavaScript &operator=(const QextScintillaLexerJavaScript &); #endif diff --git a/qt/qextscintillalexerlua.cpp b/qt/qextscintillalexerlua.cpp index 05090bf..2025068 100644 --- a/qt/qextscintillalexerlua.cpp +++ b/qt/qextscintillalexerlua.cpp @@ -3,32 +3,32 @@ // 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 <qcolor.h> -#include <qfont.h> -#include <qsettings.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqsettings.h> -#include "qextscintillalexerlua.h" +#include "tqextscintillalexerlua.h" // The ctor. -QextScintillaLexerLua::QextScintillaLexerLua(QObject *parent, const char *name) +QextScintillaLexerLua::QextScintillaLexerLua(TQObject *parent, const char *name) : QextScintillaLexer(parent,name), fold_compact(TRUE) { } @@ -72,33 +72,33 @@ int QextScintillaLexerLua::braceStyle() const // Returns the foreground colour of the text for a style. -QColor QextScintillaLexerLua::color(int style) const +TQColor QextScintillaLexerLua::color(int style) const { switch (style) { case Default: - return QColor(0x00,0x00,0x00); + return TQColor(0x00,0x00,0x00); case Comment: case LineComment: - return QColor(0x00,0x7f,0x00); + return TQColor(0x00,0x7f,0x00); case Number: - return QColor(0x00,0x7f,0x7f); + return TQColor(0x00,0x7f,0x7f); case Keyword: case BasicFunctions: case StringTableMathsFunctions: case CoroutinesIOSystemFacilities: - return QColor(0x00,0x00,0x7f); + return TQColor(0x00,0x00,0x7f); case String: case Character: case LiteralString: - return QColor(0x7f,0x00,0x7f); + return TQColor(0x7f,0x00,0x7f); case Preprocessor: - return QColor(0x7f,0x7f,0x00); + return TQColor(0x7f,0x7f,0x00); case Operator: case Identifier: @@ -117,9 +117,9 @@ bool QextScintillaLexerLua::eolFill(int style) const // Returns the font of the text for a style. -QFont QextScintillaLexerLua::font(int style) const +TQFont QextScintillaLexerLua::font(int style) const { - QFont f; + TQFont f; switch (style) { @@ -127,9 +127,9 @@ QFont QextScintillaLexerLua::font(int style) const case LineComment: case LiteralString: #if defined(Q_OS_WIN) - f = QFont("Comic Sans MS",9); + f = TQFont("Comic Sans MS",9); #else - f = QFont("Bitstream Vera Serif",9); + f = TQFont("Bitstream Vera Serif",9); #endif break; @@ -203,7 +203,7 @@ const char *QextScintillaLexerLua::keywords(int set) const // Returns the user name of a style. -QString QextScintillaLexerLua::description(int style) const +TQString QextScintillaLexerLua::description(int style) const { switch (style) { @@ -253,32 +253,32 @@ QString QextScintillaLexerLua::description(int style) const return tr("Coroutines, i/o and system facilities"); } - return QString::null; + return TQString(); } // Returns the background colour of the text for a style. -QColor QextScintillaLexerLua::paper(int style) const +TQColor QextScintillaLexerLua::paper(int style) const { switch (style) { case Comment: - return QColor(0xd0,0xf0,0xf0); + return TQColor(0xd0,0xf0,0xf0); case LiteralString: - return QColor(0xe0,0xff,0xff); + return TQColor(0xe0,0xff,0xff); case UnclosedString: - return QColor(0xe0,0xc0,0xe0); + return TQColor(0xe0,0xc0,0xe0); case BasicFunctions: - return QColor(0xd0,0xff,0xd0); + return TQColor(0xd0,0xff,0xd0); case StringTableMathsFunctions: - return QColor(0xd0,0xd0,0xff); + return TQColor(0xd0,0xd0,0xff); case CoroutinesIOSystemFacilities: - return QColor(0xff,0xd0,0xd0); + return TQColor(0xff,0xd0,0xd0); } return QextScintillaLexer::paper(style); @@ -293,7 +293,7 @@ void QextScintillaLexerLua::refreshProperties() // Read properties from the settings. -bool QextScintillaLexerLua::readProperties(QSettings &qs,const QString &prefix) +bool QextScintillaLexerLua::readProperties(TQSettings &qs,const TQString &prefix) { int rc = TRUE; bool ok, flag; @@ -311,7 +311,7 @@ bool QextScintillaLexerLua::readProperties(QSettings &qs,const QString &prefix) // Write properties to the settings. -bool QextScintillaLexerLua::writeProperties(QSettings &qs,const QString &prefix) const +bool QextScintillaLexerLua::writeProperties(TQSettings &qs,const TQString &prefix) const { int rc = TRUE; diff --git a/qt/qextscintillalexerlua.h b/qt/qextscintillalexerlua.h index 73016e6..d82b0b2 100644 --- a/qt/qextscintillalexerlua.h +++ b/qt/qextscintillalexerlua.h @@ -3,38 +3,39 @@ // 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. -#ifndef QEXTSCINTILLALEXERLUA_H -#define QEXTSCINTILLALEXERLUA_H +#ifndef TQEXTSCINTILLALEXERLUA_H +#define TQEXTSCINTILLALEXERLUA_H -#include <qobject.h> +#include <tqobject.h> -#include <qextscintillaglobal.h> -#include <qextscintillalexer.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillalexer.h> //! \brief The QextScintillaLexerLua class encapsulates the Scintilla Lua //! lexer. -class QEXTSCINTILLA_EXPORT QextScintillaLexerLua : public QextScintillaLexer +class TQEXTSCINTILLA_EXPORT QextScintillaLexerLua : public QextScintillaLexer { Q_OBJECT + TQ_OBJECT public: //! This enum defines the meanings of the different styles used by the @@ -88,7 +89,7 @@ public: //! Construct a QextScintillaLexerLua with parent \a parent and name //! \a name. \a parent is typically the QextScintilla instance. - QextScintillaLexerLua(QObject *parent = 0,const char *name = 0); + QextScintillaLexerLua(TQObject *parent = 0,const char *name = 0); //! Destroys the QextScintillaLexerLua instance. virtual ~QextScintillaLexerLua(); @@ -112,28 +113,28 @@ public: //! \a style. //! //! \sa paper() - QColor color(int style) const; + TQColor color(int style) const; //! Returns the end-of-line fill for style number \a style. bool eolFill(int style) const; //! Returns the font for style number \a style. - QFont font(int style) const; + TQFont font(int style) const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. const char *keywords(int set) const; //! Returns the descriptive name for style number \a style. If the - //! style is invalid for this language then QString::null is returned. + //! style is invalid for this language then TQString() is returned. //! This is intended to be used in user preference dialogs. - QString description(int style) const; + TQString description(int style) const; //! Returns the background colour of the text for style number //! \a style. //! //! \sa color() - QColor paper(int style) const; + TQColor paper(int style) const; //! Causes all properties to be refreshed by emitting the //! propertyChanged() signal as required. @@ -156,20 +157,20 @@ protected: //! (which has a trailing '/') should be used as a prefix to the key of //! each setting. TRUE is returned if there is no error. //! - bool readProperties(QSettings &qs,const QString &prefix); + bool readProperties(TQSettings &qs,const TQString &prefix); //! The lexer's properties are written to the settings \a qs. //! \a prefix (which has a trailing '/') should be used as a prefix to //! the key of each setting. TRUE is returned if there is no error. //! - bool writeProperties(QSettings &qs,const QString &prefix) const; + bool writeProperties(TQSettings &qs,const TQString &prefix) const; private: void setCompactProp(); bool fold_compact; -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaLexerLua(const QextScintillaLexerLua &); QextScintillaLexerLua &operator=(const QextScintillaLexerLua &); #endif diff --git a/qt/qextscintillalexermakefile.cpp b/qt/qextscintillalexermakefile.cpp index 10e219b..5cb68f3 100644 --- a/qt/qextscintillalexermakefile.cpp +++ b/qt/qextscintillalexermakefile.cpp @@ -3,32 +3,32 @@ // 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 <qcolor.h> -#include <qfont.h> -#include <qsettings.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqsettings.h> -#include "qextscintillalexermakefile.h" +#include "tqextscintillalexermakefile.h" // The ctor. -QextScintillaLexerMakefile::QextScintillaLexerMakefile(QObject *parent,const char *name) +QextScintillaLexerMakefile::QextScintillaLexerMakefile(TQObject *parent,const char *name) : QextScintillaLexer(parent,name) { } @@ -57,33 +57,33 @@ const char *QextScintillaLexerMakefile::lexer() const // Return the string of characters that comprise a word. const char *QextScintillaLexerMakefile::wordCharacters() const { - return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-"; + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPTQRSTUVWXYZ-"; } // Returns the foreground colour of the text for a style. -QColor QextScintillaLexerMakefile::color(int style) const +TQColor QextScintillaLexerMakefile::color(int style) const { switch (style) { case Default: case Operator: - return QColor(0x00,0x00,0x00); + return TQColor(0x00,0x00,0x00); case Comment: - return QColor(0x00,0x7f,0x00); + return TQColor(0x00,0x7f,0x00); case Preprocessor: - return QColor(0x7f,0x7f,0x00); + return TQColor(0x7f,0x7f,0x00); case Variable: - return QColor(0x00,0x00,0x80); + return TQColor(0x00,0x00,0x80); case Target: - return QColor(0xa0,0x00,0x00); + return TQColor(0xa0,0x00,0x00); case Error: - return QColor(0xff,0xff,0x00); + return TQColor(0xff,0xff,0x00); } return QextScintillaLexer::color(style); @@ -98,15 +98,15 @@ bool QextScintillaLexerMakefile::eolFill(int style) const // Returns the font of the text for a style. -QFont QextScintillaLexerMakefile::font(int style) const +TQFont QextScintillaLexerMakefile::font(int style) const { - QFont f; + TQFont f; if (style == Comment) #if defined(Q_OS_WIN) - f = QFont("Comic Sans MS",9); + f = TQFont("Comic Sans MS",9); #else - f = QFont("Bitstream Vera Serif",9); + f = TQFont("Bitstream Vera Serif",9); #endif else f = QextScintillaLexer::font(style); @@ -116,7 +116,7 @@ QFont QextScintillaLexerMakefile::font(int style) const // Returns the user name of a style. -QString QextScintillaLexerMakefile::description(int style) const +TQString QextScintillaLexerMakefile::description(int style) const { switch (style) { @@ -142,15 +142,15 @@ QString QextScintillaLexerMakefile::description(int style) const return tr("Error"); } - return QString::null; + return TQString(); } // Returns the background colour of the text for a style. -QColor QextScintillaLexerMakefile::paper(int style) const +TQColor QextScintillaLexerMakefile::paper(int style) const { if (style == Error) - return QColor(0xff,0x00,0x00); + return TQColor(0xff,0x00,0x00); return QextScintillaLexer::paper(style); } diff --git a/qt/qextscintillalexermakefile.h b/qt/qextscintillalexermakefile.h index 34b2e6a..8f4d14d 100644 --- a/qt/qextscintillalexermakefile.h +++ b/qt/qextscintillalexermakefile.h @@ -3,38 +3,39 @@ // 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. -#ifndef QEXTSCINTILLALEXERMAKEFILE_H -#define QEXTSCINTILLALEXERMAKEFILE_H +#ifndef TQEXTSCINTILLALEXERMAKEFILE_H +#define TQEXTSCINTILLALEXERMAKEFILE_H -#include <qobject.h> +#include <tqobject.h> -#include <qextscintillaglobal.h> -#include <qextscintillalexer.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillalexer.h> //! \brief The QextScintillaLexerMakefile class encapsulates the Scintilla //! Makefile lexer. -class QEXTSCINTILLA_EXPORT QextScintillaLexerMakefile : public QextScintillaLexer +class TQEXTSCINTILLA_EXPORT QextScintillaLexerMakefile : public QextScintillaLexer { Q_OBJECT + TQ_OBJECT public: //! This enum defines the meanings of the different styles used by the @@ -64,7 +65,7 @@ public: //! Construct a QextScintillaLexerMakefile with parent \a parent and //! name \a name. \a parent is typically the QextScintilla instance. - QextScintillaLexerMakefile(QObject *parent = 0,const char *name = 0); + QextScintillaLexerMakefile(TQObject *parent = 0,const char *name = 0); //! Destroys the QextScintillaLexerMakefile instance. virtual ~QextScintillaLexerMakefile(); @@ -83,27 +84,27 @@ public: //! \a style. //! //! \sa paper() - QColor color(int style) const; + TQColor color(int style) const; //! Returns the end-of-line fill for style number \a style. bool eolFill(int style) const; //! Returns the font for style number \a style. - QFont font(int style) const; + TQFont font(int style) const; //! Returns the descriptive name for style number \a style. If the - //! style is invalid for this language then QString::null is returned. + //! style is invalid for this language then TQString() is returned. //! This is intended to be used in user preference dialogs. - QString description(int style) const; + TQString description(int style) const; //! Returns the background colour of the text for style number //! \a style. //! //! \sa color() - QColor paper(int style) const; + TQColor paper(int style) const; private: -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaLexerMakefile(const QextScintillaLexerMakefile &); QextScintillaLexerMakefile &operator=(const QextScintillaLexerMakefile &); #endif diff --git a/qt/qextscintillalexerperl.cpp b/qt/qextscintillalexerperl.cpp index 1d5c15b..380b9a9 100644 --- a/qt/qextscintillalexerperl.cpp +++ b/qt/qextscintillalexerperl.cpp @@ -3,32 +3,32 @@ // 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 <qcolor.h> -#include <qfont.h> -#include <qsettings.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqsettings.h> -#include "qextscintillalexerperl.h" +#include "tqextscintillalexerperl.h" // The ctor. -QextScintillaLexerPerl::QextScintillaLexerPerl(QObject *parent, +QextScintillaLexerPerl::QextScintillaLexerPerl(TQObject *parent, const char *name) : QextScintillaLexer(parent,name), fold_comments(FALSE), fold_compact(TRUE) @@ -66,35 +66,35 @@ int QextScintillaLexerPerl::braceStyle() const // Return the string of characters that comprise a word. const char *QextScintillaLexerPerl::wordCharacters() const { - return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_$@%&"; + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPTQRSTUVWXYZ0123456789_$@%&"; } // Returns the foreground colour of the text for a style. -QColor QextScintillaLexerPerl::color(int style) const +TQColor QextScintillaLexerPerl::color(int style) const { switch (style) { case Default: - return QColor(0x80,0x80,0x80); + return TQColor(0x80,0x80,0x80); case Error: case Backticks: case QuotedStringQX: - return QColor(0xff,0xff,0x00); + return TQColor(0xff,0xff,0x00); case Comment: - return QColor(0x00,0x7f,0x00); + return TQColor(0x00,0x7f,0x00); case POD: case PODVerbatim: - return QColor(0x00,0x40,0x00); + return TQColor(0x00,0x40,0x00); case Number: - return QColor(0x00,0x7f,0x7f); + return TQColor(0x00,0x7f,0x7f); case Keyword: - return QColor(0x00,0x00,0x7f); + return TQColor(0x00,0x00,0x7f); case DoubleQuotedString: case SingleQuotedString: @@ -103,7 +103,7 @@ QColor QextScintillaLexerPerl::color(int style) const case BacktickHereDocument: case QuotedStringQ: case QuotedStringQQ: - return QColor(0x7f,0x00,0x7f); + return TQColor(0x7f,0x00,0x7f); case Operator: case Identifier: @@ -116,10 +116,10 @@ QColor QextScintillaLexerPerl::color(int style) const case HereDocumentDelimiter: case QuotedStringQR: case QuotedStringQW: - return QColor(0x00,0x00,0x00); + return TQColor(0x00,0x00,0x00); case DataSection: - return QColor(0x60,0x00,0x00); + return TQColor(0x60,0x00,0x00); } return QextScintillaLexer::color(style); @@ -145,25 +145,25 @@ bool QextScintillaLexerPerl::eolFill(int style) const // Returns the font of the text for a style. -QFont QextScintillaLexerPerl::font(int style) const +TQFont QextScintillaLexerPerl::font(int style) const { - QFont f; + TQFont f; switch (style) { case Comment: #if defined(Q_OS_WIN) - f = QFont("Comic Sans MS",9); + f = TQFont("Comic Sans MS",9); #else - f = QFont("Bitstream Vera Serif",9); + f = TQFont("Bitstream Vera Serif",9); #endif break; case POD: #if defined(Q_OS_WIN) - f = QFont("Times New Roman",11); + f = TQFont("Times New Roman",11); #else - f = QFont("Bitstream Charter",10); + f = TQFont("Bitstream Charter",10); #endif break; @@ -179,9 +179,9 @@ QFont QextScintillaLexerPerl::font(int style) const case QuotedStringQQ: case PODVerbatim: #if defined(Q_OS_WIN) - f = QFont("Courier New",10); + f = TQFont("Courier New",10); #else - f = QFont("Bitstream Vera Sans Mono",9); + f = TQFont("Bitstream Vera Sans Mono",9); #endif break; @@ -243,7 +243,7 @@ const char *QextScintillaLexerPerl::keywords(int set) const // Returns the user name of a style. -QString QextScintillaLexerPerl::description(int style) const +TQString QextScintillaLexerPerl::description(int style) const { switch (style) { @@ -332,53 +332,53 @@ QString QextScintillaLexerPerl::description(int style) const return tr("POD verbatim"); } - return QString::null; + return TQString(); } // Returns the background colour of the text for a style. -QColor QextScintillaLexerPerl::paper(int style) const +TQColor QextScintillaLexerPerl::paper(int style) const { switch (style) { case Error: - return QColor(0xff,0x00,0x00); + return TQColor(0xff,0x00,0x00); case POD: - return QColor(0xe0,0xff,0xe0); + return TQColor(0xe0,0xff,0xe0); case Scalar: - return QColor(0xff,0xe0,0xe0); + return TQColor(0xff,0xe0,0xe0); case Array: - return QColor(0xff,0xff,0xe0); + return TQColor(0xff,0xff,0xe0); case Hash: - return QColor(0xff,0xe0,0xff); + return TQColor(0xff,0xe0,0xff); case SymbolTable: - return QColor(0xe0,0xe0,0xe0); + return TQColor(0xe0,0xe0,0xe0); case Regex: - return QColor(0xa0,0xff,0xa0); + return TQColor(0xa0,0xff,0xa0); case Substitution: - return QColor(0xf0,0xe0,0x80); + return TQColor(0xf0,0xe0,0x80); case Backticks: - return QColor(0xa0,0x80,0x80); + return TQColor(0xa0,0x80,0x80); case DataSection: - return QColor(0xff,0xf0,0xd8); + return TQColor(0xff,0xf0,0xd8); case HereDocumentDelimiter: case SingleQuotedHereDocument: case DoubleQuotedHereDocument: case BacktickHereDocument: - return QColor(0xdd,0xd0,0xdd); + return TQColor(0xdd,0xd0,0xdd); case PODVerbatim: - return QColor(0xc0,0xff,0xc0); + return TQColor(0xc0,0xff,0xc0); } return QextScintillaLexer::paper(style); @@ -394,7 +394,7 @@ void QextScintillaLexerPerl::refreshProperties() // Read properties from the settings. -bool QextScintillaLexerPerl::readProperties(QSettings &qs,const QString &prefix) +bool QextScintillaLexerPerl::readProperties(TQSettings &qs,const TQString &prefix) { int rc = TRUE; bool ok, flag; @@ -420,7 +420,7 @@ bool QextScintillaLexerPerl::readProperties(QSettings &qs,const QString &prefix) // Write properties to the settings. -bool QextScintillaLexerPerl::writeProperties(QSettings &qs,const QString &prefix) const +bool QextScintillaLexerPerl::writeProperties(TQSettings &qs,const TQString &prefix) const { int rc = TRUE; diff --git a/qt/qextscintillalexerperl.h b/qt/qextscintillalexerperl.h index 0beb75a..f6e52e1 100644 --- a/qt/qextscintillalexerperl.h +++ b/qt/qextscintillalexerperl.h @@ -3,38 +3,39 @@ // 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. -#ifndef QEXTSCINTILLALEXERPERL_H -#define QEXTSCINTILLALEXERPERL_H +#ifndef TQEXTSCINTILLALEXERPERL_H +#define TQEXTSCINTILLALEXERPERL_H -#include <qobject.h> +#include <tqobject.h> -#include <qextscintillaglobal.h> -#include <qextscintillalexer.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillalexer.h> //! \brief The QextScintillaLexerPerl class encapsulates the Scintilla Perl //! lexer. -class QEXTSCINTILLA_EXPORT QextScintillaLexerPerl : public QextScintillaLexer +class TQEXTSCINTILLA_EXPORT QextScintillaLexerPerl : public QextScintillaLexer { Q_OBJECT + TQ_OBJECT public: //! This enum defines the meanings of the different styles used by the @@ -130,7 +131,7 @@ public: //! Construct a QextScintillaLexerPerl with parent \a parent and name //! \a name. \a parent is typically the QextScintilla instance. - QextScintillaLexerPerl(QObject *parent = 0,const char *name = 0); + QextScintillaLexerPerl(TQObject *parent = 0,const char *name = 0); //! Destroys the QextScintillaLexerPerl instance. virtual ~QextScintillaLexerPerl(); @@ -152,28 +153,28 @@ public: //! \a style. //! //! \sa paper() - QColor color(int style) const; + TQColor color(int style) const; //! Returns the end-of-line fill for style number \a style. bool eolFill(int style) const; //! Returns the font for style number \a style. - QFont font(int style) const; + TQFont font(int style) const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. const char *keywords(int set) const; //! Returns the descriptive name for style number \a style. If the - //! style is invalid for this language then QString::null is returned. + //! style is invalid for this language then TQString() is returned. //! This is intended to be used in user preference dialogs. - QString description(int style) const; + TQString description(int style) const; //! Returns the background colour of the text for style number //! \a style. //! //! \sa color() - QColor paper(int style) const; + TQColor paper(int style) const; //! Causes all properties to be refreshed by emitting the //! propertyChanged() signal as required. @@ -207,13 +208,13 @@ protected: //! (which has a trailing '/') should be used as a prefix to the key of //! each setting. TRUE is returned if there is no error. //! - bool readProperties(QSettings &qs,const QString &prefix); + bool readProperties(TQSettings &qs,const TQString &prefix); //! The lexer's properties are written to the settings \a qs. //! \a prefix (which has a trailing '/') should be used as a prefix to //! the key of each setting. TRUE is returned if there is no error. //! - bool writeProperties(QSettings &qs,const QString &prefix) const; + bool writeProperties(TQSettings &qs,const TQString &prefix) const; private: void setCommentProp(); @@ -222,7 +223,7 @@ private: bool fold_comments; bool fold_compact; -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaLexerPerl(const QextScintillaLexerPerl &); QextScintillaLexerPerl &operator=(const QextScintillaLexerPerl &); #endif diff --git a/qt/qextscintillalexerpov.cpp b/qt/qextscintillalexerpov.cpp index 1fabd0f..a9fe9a2 100644 --- a/qt/qextscintillalexerpov.cpp +++ b/qt/qextscintillalexerpov.cpp @@ -3,32 +3,32 @@ // 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 <qcolor.h> -#include <qfont.h> -#include <qsettings.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqsettings.h> -#include "qextscintillalexerpov.h" +#include "tqextscintillalexerpov.h" // The ctor. -QextScintillaLexerPOV::QextScintillaLexerPOV(QObject *parent,const char *name) +QextScintillaLexerPOV::QextScintillaLexerPOV(TQObject *parent,const char *name) : QextScintillaLexer(parent,name), fold_comments(FALSE), fold_compact(TRUE), fold_directives(FALSE) { @@ -65,36 +65,36 @@ int QextScintillaLexerPOV::braceStyle() const // Return the string of characters that comprise a word. const char *QextScintillaLexerPOV::wordCharacters() const { - return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_#"; + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPTQRSTUVWXYZ0123456789_#"; } // Returns the foreground colour of the text for a style. -QColor QextScintillaLexerPOV::color(int style) const +TQColor QextScintillaLexerPOV::color(int style) const { switch (style) { case Default: - return QColor(0xff,0x00,0x80); + return TQColor(0xff,0x00,0x80); case Comment: case CommentLine: - return QColor(0x00,0x7f,0x00); + return TQColor(0x00,0x7f,0x00); case Number: - return QColor(0x00,0x7f,0x7f); + return TQColor(0x00,0x7f,0x7f); case Operator: - return QColor(0x00,0x00,0x00); + return TQColor(0x00,0x00,0x00); case String: - return QColor(0x7f,0x00,0x7f); + return TQColor(0x7f,0x00,0x7f); case Directive: - return QColor(0x7f,0x7f,0x00); + return TQColor(0x7f,0x7f,0x00); case BadDirective: - return QColor(0x80,0x40,0x20); + return TQColor(0x80,0x40,0x20); case ObjectsCSGAppearance: case TypesModifiersItems: @@ -103,7 +103,7 @@ QColor QextScintillaLexerPOV::color(int style) const case KeywordSet6: case KeywordSet7: case KeywordSet8: - return QColor(0x00,0x00,0x7f); + return TQColor(0x00,0x00,0x7f); } return QextScintillaLexer::color(style); @@ -118,18 +118,18 @@ bool QextScintillaLexerPOV::eolFill(int style) const // Returns the font of the text for a style. -QFont QextScintillaLexerPOV::font(int style) const +TQFont QextScintillaLexerPOV::font(int style) const { - QFont f; + TQFont f; switch (style) { case Comment: case CommentLine: #if defined(Q_OS_WIN) - f = QFont("Comic Sans MS",9); + f = TQFont("Comic Sans MS",9); #else - f = QFont("Bitstream Vera Serif",9); + f = TQFont("Bitstream Vera Serif",9); #endif break; @@ -141,9 +141,9 @@ QFont QextScintillaLexerPOV::font(int style) const case BadDirective: #if defined(Q_OS_WIN) - f = QFont("Comic Sans MS",9); + f = TQFont("Comic Sans MS",9); #else - f = QFont("Bitstream Vera Serif",9); + f = TQFont("Bitstream Vera Serif",9); #endif f.setItalic(TRUE); break; @@ -264,7 +264,7 @@ const char *QextScintillaLexerPOV::keywords(int set) const // Returns the user name of a style. -QString QextScintillaLexerPOV::description(int style) const +TQString QextScintillaLexerPOV::description(int style) const { switch (style) { @@ -320,35 +320,35 @@ QString QextScintillaLexerPOV::description(int style) const return tr("User defined 3"); } - return QString::null; + return TQString(); } // Returns the background colour of the text for a style. -QColor QextScintillaLexerPOV::paper(int style) const +TQColor QextScintillaLexerPOV::paper(int style) const { switch (style) { case UnclosedString: - return QColor(0xe0,0xc0,0xe0); + return TQColor(0xe0,0xc0,0xe0); case ObjectsCSGAppearance: - return QColor(0xff,0xd0,0xd0); + return TQColor(0xff,0xd0,0xd0); case TypesModifiersItems: - return QColor(0xff,0xff,0xd0); + return TQColor(0xff,0xff,0xd0); case PredefinedFunctions: - return QColor(0xd0,0xd0,0xff); + return TQColor(0xd0,0xd0,0xff); case KeywordSet6: - return QColor(0xd0,0xff,0xd0); + return TQColor(0xd0,0xff,0xd0); case KeywordSet7: - return QColor(0xd0,0xd0,0xd0); + return TQColor(0xd0,0xd0,0xd0); case KeywordSet8: - return QColor(0xe0,0xe0,0xe0); + return TQColor(0xe0,0xe0,0xe0); } return QextScintillaLexer::paper(style); @@ -365,7 +365,7 @@ void QextScintillaLexerPOV::refreshProperties() // Read properties from the settings. -bool QextScintillaLexerPOV::readProperties(QSettings &qs,const QString &prefix) +bool QextScintillaLexerPOV::readProperties(TQSettings &qs,const TQString &prefix) { int rc = TRUE; bool ok, flag; @@ -399,7 +399,7 @@ bool QextScintillaLexerPOV::readProperties(QSettings &qs,const QString &prefix) // Write properties to the settings. -bool QextScintillaLexerPOV::writeProperties(QSettings &qs,const QString &prefix) const +bool QextScintillaLexerPOV::writeProperties(TQSettings &qs,const TQString &prefix) const { int rc = TRUE; diff --git a/qt/qextscintillalexerpov.h b/qt/qextscintillalexerpov.h index 6314fe0..24edd6d 100644 --- a/qt/qextscintillalexerpov.h +++ b/qt/qextscintillalexerpov.h @@ -3,38 +3,39 @@ // 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. -#ifndef QEXTSCINTILLALEXERPOV_H -#define QEXTSCINTILLALEXERPOV_H +#ifndef TQEXTSCINTILLALEXERPOV_H +#define TQEXTSCINTILLALEXERPOV_H -#include <qobject.h> +#include <tqobject.h> -#include <qextscintillaglobal.h> -#include <qextscintillalexer.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillalexer.h> //! \brief The QextScintillaLexerPOV class encapsulates the Scintilla POV //! lexer. -class QEXTSCINTILLA_EXPORT QextScintillaLexerPOV : public QextScintillaLexer +class TQEXTSCINTILLA_EXPORT QextScintillaLexerPOV : public QextScintillaLexer { Q_OBJECT + TQ_OBJECT public: //! This enum defines the meanings of the different styles used by the @@ -100,7 +101,7 @@ public: //! Construct a QextScintillaLexerPOV with parent \a parent and name //! \a name. \a parent is typically the QextScintilla instance. - QextScintillaLexerPOV(QObject *parent = 0,const char *name = 0); + QextScintillaLexerPOV(TQObject *parent = 0,const char *name = 0); //! Destroys the QextScintillaLexerPOV instance. virtual ~QextScintillaLexerPOV(); @@ -122,28 +123,28 @@ public: //! \a style. //! //! \sa paper() - QColor color(int style) const; + TQColor color(int style) const; //! Returns the end-of-line fill for style number \a style. bool eolFill(int style) const; //! Returns the font for style number \a style. - QFont font(int style) const; + TQFont font(int style) const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. const char *keywords(int set) const; //! Returns the descriptive name for style number \a style. If the - //! style is invalid for this language then QString::null is returned. + //! style is invalid for this language then TQString() is returned. //! This is intended to be used in user preference dialogs. - QString description(int style) const; + TQString description(int style) const; //! Returns the background colour of the text for style number //! \a style. //! //! \sa color() - QColor paper(int style) const; + TQColor paper(int style) const; //! Causes all properties to be refreshed by emitting the //! propertyChanged() signal as required. @@ -188,13 +189,13 @@ protected: //! (which has a trailing '/') should be used as a prefix to the key of //! each setting. TRUE is returned if there is no error. //! - bool readProperties(QSettings &qs,const QString &prefix); + bool readProperties(TQSettings &qs,const TQString &prefix); //! The lexer's properties are written to the settings \a qs. //! \a prefix (which has a trailing '/') should be used as a prefix to //! the key of each setting. TRUE is returned if there is no error. //! - bool writeProperties(QSettings &qs,const QString &prefix) const; + bool writeProperties(TQSettings &qs,const TQString &prefix) const; private: void setCommentProp(); @@ -205,7 +206,7 @@ private: bool fold_compact; bool fold_directives; -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaLexerPOV(const QextScintillaLexerPOV &); QextScintillaLexerPOV &operator=(const QextScintillaLexerPOV &); #endif diff --git a/qt/qextscintillalexerproperties.cpp b/qt/qextscintillalexerproperties.cpp index fb35123..914b1ff 100644 --- a/qt/qextscintillalexerproperties.cpp +++ b/qt/qextscintillalexerproperties.cpp @@ -3,32 +3,32 @@ // 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 <qcolor.h> -#include <qfont.h> -#include <qsettings.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqsettings.h> -#include "qextscintillalexerproperties.h" +#include "tqextscintillalexerproperties.h" // The ctor. -QextScintillaLexerProperties::QextScintillaLexerProperties(QObject *parent,const char *name) +QextScintillaLexerProperties::QextScintillaLexerProperties(TQObject *parent,const char *name) : QextScintillaLexer(parent,name), fold_compact(TRUE) { } @@ -57,26 +57,26 @@ const char *QextScintillaLexerProperties::lexer() const // Return the string of characters that comprise a word. const char *QextScintillaLexerProperties::wordCharacters() const { - return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-"; + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPTQRSTUVWXYZ-"; } // Returns the foreground colour of the text for a style. -QColor QextScintillaLexerProperties::color(int style) const +TQColor QextScintillaLexerProperties::color(int style) const { switch (style) { case Comment: - return QColor(0x00,0x7f,0x7f); + return TQColor(0x00,0x7f,0x7f); case Section: - return QColor(0x7f,0x00,0x7f); + return TQColor(0x7f,0x00,0x7f); case Assignment: - return QColor(0xb0,0x60,0x00); + return TQColor(0xb0,0x60,0x00); case DefaultValue: - return QColor(0x7f,0x7f,0x00); + return TQColor(0x7f,0x7f,0x00); } return QextScintillaLexer::color(style); @@ -91,15 +91,15 @@ bool QextScintillaLexerProperties::eolFill(int style) const // Returns the font of the text for a style. -QFont QextScintillaLexerProperties::font(int style) const +TQFont QextScintillaLexerProperties::font(int style) const { - QFont f; + TQFont f; if (style == Comment) #if defined(Q_OS_WIN) - f = QFont("Comic Sans MS",9); + f = TQFont("Comic Sans MS",9); #else - f = QFont("Bitstream Vera Serif",9); + f = TQFont("Bitstream Vera Serif",9); #endif else f = QextScintillaLexer::font(style); @@ -109,7 +109,7 @@ QFont QextScintillaLexerProperties::font(int style) const // Returns the user name of a style. -QString QextScintillaLexerProperties::description(int style) const +TQString QextScintillaLexerProperties::description(int style) const { switch (style) { @@ -129,15 +129,15 @@ QString QextScintillaLexerProperties::description(int style) const return tr("Default value"); } - return QString::null; + return TQString(); } // Returns the background colour of the text for a style. -QColor QextScintillaLexerProperties::paper(int style) const +TQColor QextScintillaLexerProperties::paper(int style) const { if (style == Section) - return QColor(0xe0,0xf0,0xf0); + return TQColor(0xe0,0xf0,0xf0); return QextScintillaLexer::paper(style); } @@ -151,7 +151,7 @@ void QextScintillaLexerProperties::refreshProperties() // Read properties from the settings. -bool QextScintillaLexerProperties::readProperties(QSettings &qs,const QString &prefix) +bool QextScintillaLexerProperties::readProperties(TQSettings &qs,const TQString &prefix) { int rc = TRUE; bool ok, flag; @@ -169,7 +169,7 @@ bool QextScintillaLexerProperties::readProperties(QSettings &qs,const QString &p // Write properties to the settings. -bool QextScintillaLexerProperties::writeProperties(QSettings &qs,const QString &prefix) const +bool QextScintillaLexerProperties::writeProperties(TQSettings &qs,const TQString &prefix) const { int rc = TRUE; diff --git a/qt/qextscintillalexerproperties.h b/qt/qextscintillalexerproperties.h index 466fe57..90f85a0 100644 --- a/qt/qextscintillalexerproperties.h +++ b/qt/qextscintillalexerproperties.h @@ -3,38 +3,39 @@ // 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. -#ifndef QEXTSCINTILLALEXERPROPERTIES_H -#define QEXTSCINTILLALEXERPROPERTIES_H +#ifndef TQEXTSCINTILLALEXERPROPERTIES_H +#define TQEXTSCINTILLALEXERPROPERTIES_H -#include <qobject.h> +#include <tqobject.h> -#include <qextscintillaglobal.h> -#include <qextscintillalexer.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillalexer.h> //! \brief The QextScintillaLexerProperties class encapsulates the Scintilla //! Properties lexer. -class QEXTSCINTILLA_EXPORT QextScintillaLexerProperties : public QextScintillaLexer +class TQEXTSCINTILLA_EXPORT QextScintillaLexerProperties : public QextScintillaLexer { Q_OBJECT + TQ_OBJECT public: //! This enum defines the meanings of the different styles used by the @@ -58,7 +59,7 @@ public: //! Construct a QextScintillaLexerProperties with parent \a parent and //! name \a name. \a parent is typically the QextScintilla instance. - QextScintillaLexerProperties(QObject *parent = 0,const char *name = 0); + QextScintillaLexerProperties(TQObject *parent = 0,const char *name = 0); //! Destroys the QextScintillaLexerProperties instance. virtual ~QextScintillaLexerProperties(); @@ -77,24 +78,24 @@ public: //! \a style. //! //! \sa paper() - QColor color(int style) const; + TQColor color(int style) const; //! Returns the end-of-line fill for style number \a style. bool eolFill(int style) const; //! Returns the font for style number \a style. - QFont font(int style) const; + TQFont font(int style) const; //! Returns the descriptive name for style number \a style. If the - //! style is invalid for this language then QString::null is returned. + //! style is invalid for this language then TQString() is returned. //! This is intended to be used in user preference dialogs. - QString description(int style) const; + TQString description(int style) const; //! Returns the background colour of the text for style number //! \a style. //! //! \sa color() - QColor paper(int style) const; + TQColor paper(int style) const; //! Causes all properties to be refreshed by emitting the //! propertyChanged() signal as required. @@ -118,21 +119,21 @@ protected: //! each setting. TRUE is returned if there is no error. //! //! \sa writeProperties() - bool readProperties(QSettings &qs,const QString &prefix); + bool readProperties(TQSettings &qs,const TQString &prefix); //! The lexer's properties are written to the settings \a qs. //! \a prefix (which has a trailing '/') should be used as a prefix to //! the key of each setting. TRUE is returned if there is no error. //! //! \sa readProperties() - bool writeProperties(QSettings &qs,const QString &prefix) const; + bool writeProperties(TQSettings &qs,const TQString &prefix) const; private: void setCompactProp(); bool fold_compact; -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaLexerProperties(const QextScintillaLexerProperties &); QextScintillaLexerProperties &operator=(const QextScintillaLexerProperties &); #endif diff --git a/qt/qextscintillalexerpython.cpp b/qt/qextscintillalexerpython.cpp index b6252ae..92b8d2e 100644 --- a/qt/qextscintillalexerpython.cpp +++ b/qt/qextscintillalexerpython.cpp @@ -3,28 +3,28 @@ // 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 <qcolor.h> -#include <qfont.h> -#include <qsettings.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqsettings.h> -#include "qextscintillalexerpython.h" +#include "tqextscintillalexerpython.h" // The list of Python keywords that can be used by other friendly lexers. @@ -35,7 +35,7 @@ const char *QextScintillaLexerPython::keywordClass = // The ctor. -QextScintillaLexerPython::QextScintillaLexerPython(QObject *parent, +QextScintillaLexerPython::QextScintillaLexerPython(TQObject *parent, const char *name) : QextScintillaLexer(parent,name), fold_comments(FALSE), fold_quotes(FALSE), indent_warn(NoWarning) @@ -97,51 +97,51 @@ int QextScintillaLexerPython::braceStyle() const // Returns the foreground colour of the text for a style. -QColor QextScintillaLexerPython::color(int style) const +TQColor QextScintillaLexerPython::color(int style) const { switch (style) { case Default: - return QColor(0x80,0x80,0x80); + return TQColor(0x80,0x80,0x80); case Comment: - return QColor(0x00,0x7f,0x00); + return TQColor(0x00,0x7f,0x00); case Number: - return QColor(0x00,0x7f,0x7f); + return TQColor(0x00,0x7f,0x7f); case DoubleQuotedString: case SingleQuotedString: - return QColor(0x7f,0x00,0x7f); + return TQColor(0x7f,0x00,0x7f); case Keyword: - return QColor(0x00,0x00,0x7f); + return TQColor(0x00,0x00,0x7f); case TripleSingleQuotedString: case TripleDoubleQuotedString: - return QColor(0x7f,0x00,0x00); + return TQColor(0x7f,0x00,0x00); case ClassName: - return QColor(0x00,0x00,0xff); + return TQColor(0x00,0x00,0xff); case FunctionMethodName: - return QColor(0x00,0x7f,0x7f); + return TQColor(0x00,0x7f,0x7f); case Operator: case Identifier: break; case CommentBlock: - return QColor(0x7f,0x7f,0x7f); + return TQColor(0x7f,0x7f,0x7f); case UnclosedString: - return QColor(0x00,0x00,0x00); + return TQColor(0x00,0x00,0x00); case HighlightedIdentifier: - return QColor(0x40,0x70,0x90); + return TQColor(0x40,0x70,0x90); case Decorator: - return QColor(0x80,0x50,0x00); + return TQColor(0x80,0x50,0x00); } return QextScintillaLexer::color(style); @@ -156,17 +156,17 @@ bool QextScintillaLexerPython::eolFill(int style) const // Returns the font of the text for a style. -QFont QextScintillaLexerPython::font(int style) const +TQFont QextScintillaLexerPython::font(int style) const { - QFont f; + TQFont f; switch (style) { case Comment: #if defined(Q_OS_WIN) - f = QFont("Comic Sans MS",9); + f = TQFont("Comic Sans MS",9); #else - f = QFont("Bitstream Vera Serif",9); + f = TQFont("Bitstream Vera Serif",9); #endif break; @@ -174,9 +174,9 @@ QFont QextScintillaLexerPython::font(int style) const case SingleQuotedString: case UnclosedString: #if defined(Q_OS_WIN) - f = QFont("Courier New",10); + f = TQFont("Courier New",10); #else - f = QFont("Bitstream Vera Sans Mono",9); + f = TQFont("Bitstream Vera Sans Mono",9); #endif break; @@ -207,7 +207,7 @@ const char *QextScintillaLexerPython::keywords(int set) const // Returns the user name of a style. -QString QextScintillaLexerPython::description(int style) const +TQString QextScintillaLexerPython::description(int style) const { switch (style) { @@ -260,15 +260,15 @@ QString QextScintillaLexerPython::description(int style) const return tr("Decorator"); } - return QString::null; + return TQString(); } // Returns the background colour of the text for a style. -QColor QextScintillaLexerPython::paper(int style) const +TQColor QextScintillaLexerPython::paper(int style) const { if (style == UnclosedString) - return QColor(0xe0,0xc0,0xe0); + return TQColor(0xe0,0xc0,0xe0); return QextScintillaLexer::paper(style); } @@ -284,7 +284,7 @@ void QextScintillaLexerPython::refreshProperties() // Read properties from the settings. -bool QextScintillaLexerPython::readProperties(QSettings &qs,const QString &prefix) +bool QextScintillaLexerPython::readProperties(TQSettings &qs,const TQString &prefix) { int rc = TRUE, num; bool ok, flag; @@ -318,7 +318,7 @@ bool QextScintillaLexerPython::readProperties(QSettings &qs,const QString &prefi // Write properties to the settings. -bool QextScintillaLexerPython::writeProperties(QSettings &qs,const QString &prefix) const +bool QextScintillaLexerPython::writeProperties(TQSettings &qs,const TQString &prefix) const { int rc = TRUE; @@ -403,5 +403,5 @@ void QextScintillaLexerPython::setIndentationWarning(IndentationWarning warn) // Set the "tab.timmy.whinge.level" property. void QextScintillaLexerPython::setTabWhingeProp() { - emit propertyChanged("tab.timmy.whinge.level",QString::number(indent_warn)); + emit propertyChanged("tab.timmy.whinge.level",TQString::number(indent_warn)); } diff --git a/qt/qextscintillalexerpython.h b/qt/qextscintillalexerpython.h index b5edb3e..3c13614 100644 --- a/qt/qextscintillalexerpython.h +++ b/qt/qextscintillalexerpython.h @@ -3,38 +3,39 @@ // 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. -#ifndef QEXTSCINTILLALEXERPYTHON_H -#define QEXTSCINTILLALEXERPYTHON_H +#ifndef TQEXTSCINTILLALEXERPYTHON_H +#define TQEXTSCINTILLALEXERPYTHON_H -#include <qobject.h> +#include <tqobject.h> -#include <qextscintillaglobal.h> -#include <qextscintillalexer.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillalexer.h> //! \brief The QextScintillaLexerPython class encapsulates the Scintilla Python //! lexer. -class QEXTSCINTILLA_EXPORT QextScintillaLexerPython : public QextScintillaLexer +class TQEXTSCINTILLA_EXPORT QextScintillaLexerPython : public QextScintillaLexer { Q_OBJECT + TQ_OBJECT public: //! This enum defines the meanings of the different styles used by the @@ -116,7 +117,7 @@ public: //! Construct a QextScintillaLexerPython with parent \a parent and name //! \a name. \a parent is typically the QextScintilla instance. - QextScintillaLexerPython(QObject *parent = 0,const char *name = 0); + QextScintillaLexerPython(TQObject *parent = 0,const char *name = 0); //! Destroys the QextScintillaLexerPython instance. virtual ~QextScintillaLexerPython(); @@ -147,28 +148,28 @@ public: //! \a style. //! //! \sa paper() - QColor color(int style) const; + TQColor color(int style) const; //! Returns the end-of-line fill for style number \a style. bool eolFill(int style) const; //! Returns the font for style number \a style. - QFont font(int style) const; + TQFont font(int style) const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. const char *keywords(int set) const; //! Returns the descriptive name for style number \a style. If the - //! style is invalid for this language then QString::null is returned. + //! style is invalid for this language then TQString() is returned. //! This is intended to be used in user preference dialogs. - QString description(int style) const; + TQString description(int style) const; //! Returns the background colour of the text for style number //! \a style. //! //! \sa color() - QColor paper(int style) const; + TQColor paper(int style) const; //! Causes all properties to be refreshed by emitting the //! propertyChanged() signal as required. @@ -214,13 +215,13 @@ protected: //! (which has a trailing '/') should be used as a prefix to the key of //! each setting. TRUE is returned if there is no error. //! - bool readProperties(QSettings &qs,const QString &prefix); + bool readProperties(TQSettings &qs,const TQString &prefix); //! The lexer's properties are written to the settings \a qs. //! \a prefix (which has a trailing '/') should be used as a prefix to //! the key of each setting. TRUE is returned if there is no error. //! - bool writeProperties(QSettings &qs,const QString &prefix) const; + bool writeProperties(TQSettings &qs,const TQString &prefix) const; private: void setCommentProp(); @@ -235,7 +236,7 @@ private: static const char *keywordClass; -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaLexerPython(const QextScintillaLexerPython &); QextScintillaLexerPython &operator=(const QextScintillaLexerPython &); #endif diff --git a/qt/qextscintillalexerruby.cpp b/qt/qextscintillalexerruby.cpp index 6ecce01..ef0ac2f 100644 --- a/qt/qextscintillalexerruby.cpp +++ b/qt/qextscintillalexerruby.cpp @@ -3,32 +3,32 @@ // 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 <qcolor.h> -#include <qfont.h> -#include <qsettings.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqsettings.h> -#include "qextscintillalexerruby.h" +#include "tqextscintillalexerruby.h" // The ctor. -QextScintillaLexerRuby::QextScintillaLexerRuby(QObject *parent, +QextScintillaLexerRuby::QextScintillaLexerRuby(TQObject *parent, const char *name) : QextScintillaLexer(parent, name) { @@ -93,64 +93,64 @@ int QextScintillaLexerRuby::braceStyle() const // Returns the foreground colour of the text for a style. -QColor QextScintillaLexerRuby::color(int style) const +TQColor QextScintillaLexerRuby::color(int style) const { switch (style) { case Default: - return QColor(0x80,0x80,0x80); + return TQColor(0x80,0x80,0x80); case Comment: - return QColor(0x00,0x7f,0x00); + return TQColor(0x00,0x7f,0x00); case POD: - return QColor(0x00,0x40,0x00); + return TQColor(0x00,0x40,0x00); case Number: case FunctionMethodName: - return QColor(0x00,0x7f,0x7f); + return TQColor(0x00,0x7f,0x7f); case Keyword: case DemotedKeyword: - return QColor(0x00,0x00,0x7f); + return TQColor(0x00,0x00,0x7f); case DoubleQuotedString: case SingleQuotedString: case HereDocument: case PercentStringq: case PercentStringQ: - return QColor(0x7f,0x00,0x7f); + return TQColor(0x7f,0x00,0x7f); case ClassName: - return QColor(0x00,0x00,0xff); + return TQColor(0x00,0x00,0xff); case Regex: case HereDocumentDelimiter: case PercentStringr: case PercentStringw: - return QColor(0x00,0x00,0x00); + return TQColor(0x00,0x00,0x00); case Global: - return QColor(0x80,0x00,0x80); + return TQColor(0x80,0x00,0x80); case Symbol: - return QColor(0xc0,0xa0,0x30); + return TQColor(0xc0,0xa0,0x30); case ModuleName: - return QColor(0xa0,0x00,0xa0); + return TQColor(0xa0,0x00,0xa0); case InstanceVariable: - return QColor(0xb0,0x00,0x80); + return TQColor(0xb0,0x00,0x80); case ClassVariable: - return QColor(0x80,0x00,0xb0); + return TQColor(0x80,0x00,0xb0); case Backticks: case PercentStringx: - return QColor(0xff,0xff,0x00); + return TQColor(0xff,0xff,0x00); case DataSection: - return QColor(0x60,0x00,0x00); + return TQColor(0x60,0x00,0x00); } return QextScintillaLexer::color(style); @@ -179,17 +179,17 @@ bool QextScintillaLexerRuby::eolFill(int style) const // Returns the font of the text for a style. -QFont QextScintillaLexerRuby::font(int style) const +TQFont QextScintillaLexerRuby::font(int style) const { - QFont f; + TQFont f; switch (style) { case Comment: #if defined(Q_OS_WIN) - f = QFont("Comic Sans MS",9); + f = TQFont("Comic Sans MS",9); #else - f = QFont("Bitstream Vera Serif",9); + f = TQFont("Bitstream Vera Serif",9); #endif break; @@ -199,9 +199,9 @@ QFont QextScintillaLexerRuby::font(int style) const case PercentStringq: case PercentStringQ: #if defined(Q_OS_WIN) - f = QFont("Courier New",10); + f = TQFont("Courier New",10); #else - f = QFont("Bitstream Vera Sans Mono",9); + f = TQFont("Bitstream Vera Sans Mono",9); #endif break; @@ -239,7 +239,7 @@ const char *QextScintillaLexerRuby::keywords(int set) const // Returns the user name of a style. -QString QextScintillaLexerRuby::description(int style) const +TQString QextScintillaLexerRuby::description(int style) const { switch (style) { @@ -337,43 +337,43 @@ QString QextScintillaLexerRuby::description(int style) const return tr("stderr"); } - return QString::null; + return TQString(); } // Returns the background colour of the text for a style. -QColor QextScintillaLexerRuby::paper(int style) const +TQColor QextScintillaLexerRuby::paper(int style) const { switch (style) { case Error: - return QColor(0xff,0x00,0x00); + return TQColor(0xff,0x00,0x00); case POD: - return QColor(0xc0,0xff,0xc0); + return TQColor(0xc0,0xff,0xc0); case Regex: case PercentStringr: - return QColor(0xa0,0xff,0xa0); + return TQColor(0xa0,0xff,0xa0); case Backticks: case PercentStringx: - return QColor(0xa0,0x80,0x80); + return TQColor(0xa0,0x80,0x80); case DataSection: - return QColor(0xff,0xf0,0xd8); + return TQColor(0xff,0xf0,0xd8); case HereDocumentDelimiter: case HereDocument: - return QColor(0xdd,0xd0,0xdd); + return TQColor(0xdd,0xd0,0xdd); case PercentStringw: - return QColor(0xff,0xff,0xe0); + return TQColor(0xff,0xff,0xe0); case Stdin: case Stdout: case Stderr: - return QColor(0xff,0x80,0x80); + return TQColor(0xff,0x80,0x80); } return QextScintillaLexer::paper(style); diff --git a/qt/qextscintillalexerruby.h b/qt/qextscintillalexerruby.h index 96918eb..9ad23f6 100644 --- a/qt/qextscintillalexerruby.h +++ b/qt/qextscintillalexerruby.h @@ -3,38 +3,39 @@ // 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. -#ifndef QEXTSCINTILLALEXERRUBY_H -#define QEXTSCINTILLALEXERRUBY_H +#ifndef TQEXTSCINTILLALEXERRUBY_H +#define TQEXTSCINTILLALEXERRUBY_H -#include <qobject.h> +#include <tqobject.h> -#include <qextscintillaglobal.h> -#include <qextscintillalexer.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillalexer.h> //! \brief The QextScintillaLexerRuby class encapsulates the Scintilla Ruby //! lexer. -class QEXTSCINTILLA_EXPORT QextScintillaLexerRuby : public QextScintillaLexer +class TQEXTSCINTILLA_EXPORT QextScintillaLexerRuby : public QextScintillaLexer { Q_OBJECT + TQ_OBJECT public: //! This enum defines the meanings of the different styles used by the @@ -136,7 +137,7 @@ public: //! Construct a QextScintillaLexerRuby with parent \a parent and name //! \a name. \a parent is typically the QextScintilla instance. - QextScintillaLexerRuby(QObject *parent = 0,const char *name = 0); + QextScintillaLexerRuby(TQObject *parent = 0,const char *name = 0); //! Destroys the QextScintillaLexerRuby instance. virtual ~QextScintillaLexerRuby(); @@ -170,31 +171,31 @@ public: //! \a style. //! //! \sa paper() - QColor color(int style) const; + TQColor color(int style) const; //! Returns the end-of-line fill for style number \a style. bool eolFill(int style) const; //! Returns the font for style number \a style. - QFont font(int style) const; + TQFont font(int style) const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. const char *keywords(int set) const; //! Returns the descriptive name for style number \a style. If the - //! style is invalid for this language then QString::null is returned. + //! style is invalid for this language then TQString() is returned. //! This is intended to be used in user preference dialogs. - QString description(int style) const; + TQString description(int style) const; //! Returns the background colour of the text for style number //! \a style. //! //! \sa color() - QColor paper(int style) const; + TQColor paper(int style) const; private: -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaLexerRuby(const QextScintillaLexerRuby &); QextScintillaLexerRuby &operator=(const QextScintillaLexerRuby &); #endif diff --git a/qt/qextscintillalexersql.cpp b/qt/qextscintillalexersql.cpp index 8b7092e..4ee26ab 100644 --- a/qt/qextscintillalexersql.cpp +++ b/qt/qextscintillalexersql.cpp @@ -3,32 +3,32 @@ // 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 <qcolor.h> -#include <qfont.h> -#include <qsettings.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqsettings.h> -#include "qextscintillalexersql.h" +#include "tqextscintillalexersql.h" // The ctor. -QextScintillaLexerSQL::QextScintillaLexerSQL(QObject *parent,const char *name) +QextScintillaLexerSQL::QextScintillaLexerSQL(TQObject *parent,const char *name) : QextScintillaLexer(parent,name), fold_comments(FALSE), fold_compact(TRUE), backslash_escapes(FALSE) { @@ -63,57 +63,57 @@ int QextScintillaLexerSQL::braceStyle() const // Returns the foreground colour of the text for a style. -QColor QextScintillaLexerSQL::color(int style) const +TQColor QextScintillaLexerSQL::color(int style) const { switch (style) { case Default: - return QColor(0x80,0x80,0x80); + return TQColor(0x80,0x80,0x80); case Comment: case CommentLine: case PlusPrompt: case PlusComment: case CommentLineHash: - return QColor(0x00,0x7f,0x00); + return TQColor(0x00,0x7f,0x00); case CommentDoc: - return QColor(0x7f,0x7f,0x7f); + return TQColor(0x7f,0x7f,0x7f); case Number: - return QColor(0x00,0x7f,0x7f); + return TQColor(0x00,0x7f,0x7f); case Keyword: - return QColor(0x00,0x00,0x7f); + return TQColor(0x00,0x00,0x7f); case DoubleQuotedString: case SingleQuotedString: - return QColor(0x7f,0x00,0x7f); + return TQColor(0x7f,0x00,0x7f); case PlusKeyword: - return QColor(0x7f,0x7f,0x00); + return TQColor(0x7f,0x7f,0x00); case Operator: case Identifier: break; case CommentDocKeyword: - return QColor(0x30,0x60,0xa0); + return TQColor(0x30,0x60,0xa0); case CommentDocKeywordError: - return QColor(0x80,0x40,0x20); + return TQColor(0x80,0x40,0x20); case KeywordSet5: - return QColor(0x4b,0x00,0x82); + return TQColor(0x4b,0x00,0x82); case KeywordSet6: - return QColor(0xb0,0x00,0x40); + return TQColor(0xb0,0x00,0x40); case KeywordSet7: - return QColor(0x8b,0x00,0x00); + return TQColor(0x8b,0x00,0x00); case KeywordSet8: - return QColor(0x80,0x00,0x80); + return TQColor(0x80,0x00,0x80); } return QextScintillaLexer::color(style); @@ -128,9 +128,9 @@ bool QextScintillaLexerSQL::eolFill(int style) const // Returns the font of the text for a style. -QFont QextScintillaLexerSQL::font(int style) const +TQFont QextScintillaLexerSQL::font(int style) const { - QFont f; + TQFont f; switch (style) { @@ -141,9 +141,9 @@ QFont QextScintillaLexerSQL::font(int style) const case CommentDocKeyword: case CommentDocKeywordError: #if defined(Q_OS_WIN) - f = QFont("Comic Sans MS",9); + f = TQFont("Comic Sans MS",9); #else - f = QFont("Bitstream Vera Serif",9); + f = TQFont("Bitstream Vera Serif",9); #endif break; @@ -157,9 +157,9 @@ QFont QextScintillaLexerSQL::font(int style) const case SingleQuotedString: case PlusPrompt: #if defined(Q_OS_WIN) - f = QFont("Courier New",10); + f = TQFont("Courier New",10); #else - f = QFont("Bitstream Vera Sans Mono",9); + f = TQFont("Bitstream Vera Sans Mono",9); #endif break; @@ -240,7 +240,7 @@ const char *QextScintillaLexerSQL::keywords(int set) const // Returns the user name of a style. -QString QextScintillaLexerSQL::description(int style) const +TQString QextScintillaLexerSQL::description(int style) const { switch (style) { @@ -305,15 +305,15 @@ QString QextScintillaLexerSQL::description(int style) const return tr("User defined 4"); } - return QString::null; + return TQString(); } // Returns the background colour of the text for a style. -QColor QextScintillaLexerSQL::paper(int style) const +TQColor QextScintillaLexerSQL::paper(int style) const { if (style == PlusPrompt) - return QColor(0xe0,0xff,0xe0); + return TQColor(0xe0,0xff,0xe0); return QextScintillaLexer::paper(style); } @@ -329,7 +329,7 @@ void QextScintillaLexerSQL::refreshProperties() // Read properties from the settings. -bool QextScintillaLexerSQL::readProperties(QSettings &qs,const QString &prefix) +bool QextScintillaLexerSQL::readProperties(TQSettings &qs,const TQString &prefix) { int rc = TRUE; bool ok, flag; @@ -363,7 +363,7 @@ bool QextScintillaLexerSQL::readProperties(QSettings &qs,const QString &prefix) // Write properties to the settings. -bool QextScintillaLexerSQL::writeProperties(QSettings &qs,const QString &prefix) const +bool QextScintillaLexerSQL::writeProperties(TQSettings &qs,const TQString &prefix) const { int rc = TRUE; diff --git a/qt/qextscintillalexersql.h b/qt/qextscintillalexersql.h index ca94825..8d9902d 100644 --- a/qt/qextscintillalexersql.h +++ b/qt/qextscintillalexersql.h @@ -3,38 +3,39 @@ // 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. -#ifndef QEXTSCINTILLALEXERSQL_H -#define QEXTSCINTILLALEXERSQL_H +#ifndef TQEXTSCINTILLALEXERSQL_H +#define TQEXTSCINTILLALEXERSQL_H -#include <qobject.h> +#include <tqobject.h> -#include <qextscintillaglobal.h> -#include <qextscintillalexer.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillalexer.h> //! \brief The QextScintillaLexerSQL class encapsulates the Scintilla SQL //! lexer. -class QEXTSCINTILLA_EXPORT QextScintillaLexerSQL : public QextScintillaLexer +class TQEXTSCINTILLA_EXPORT QextScintillaLexerSQL : public QextScintillaLexer { Q_OBJECT + TQ_OBJECT public: //! This enum defines the meanings of the different styles used by the @@ -114,7 +115,7 @@ public: //! Construct a QextScintillaLexerSQL with parent \a parent and name //! \a name. \a parent is typically the QextScintilla instance. - QextScintillaLexerSQL(QObject *parent = 0,const char *name = 0); + QextScintillaLexerSQL(TQObject *parent = 0,const char *name = 0); //! Destroys the QextScintillaLexerSQL instance. virtual ~QextScintillaLexerSQL(); @@ -133,28 +134,28 @@ public: //! \a style. //! //! \sa paper() - QColor color(int style) const; + TQColor color(int style) const; //! Returns the end-of-line fill for style number \a style. bool eolFill(int style) const; //! Returns the font for style number \a style. - QFont font(int style) const; + TQFont font(int style) const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. const char *keywords(int set) const; //! Returns the descriptive name for style number \a style. If the - //! style is invalid for this language then QString::null is returned. + //! style is invalid for this language then TQString() is returned. //! This is intended to be used in user preference dialogs. - QString description(int style) const; + TQString description(int style) const; //! Returns the background colour of the text for style number //! \a style. //! //! \sa color() - QColor paper(int style) const; + TQColor paper(int style) const; //! Causes all properties to be refreshed by emitting the //! propertyChanged() signal as required. @@ -199,13 +200,13 @@ protected: //! (which has a trailing '/') should be used as a prefix to the key of //! each setting. TRUE is returned if there is no error. //! - bool readProperties(QSettings &qs,const QString &prefix); + bool readProperties(TQSettings &qs,const TQString &prefix); //! The lexer's properties are written to the settings \a qs. //! \a prefix (which has a trailing '/') should be used as a prefix to //! the key of each setting. TRUE is returned if there is no error. //! - bool writeProperties(QSettings &qs,const QString &prefix) const; + bool writeProperties(TQSettings &qs,const TQString &prefix) const; private: void setCommentProp(); @@ -217,7 +218,7 @@ private: bool backslash_escapes; -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaLexerSQL(const QextScintillaLexerSQL &); QextScintillaLexerSQL &operator=(const QextScintillaLexerSQL &); #endif diff --git a/qt/qextscintillalexertex.cpp b/qt/qextscintillalexertex.cpp index 4cf2848..1e8a1c5 100644 --- a/qt/qextscintillalexertex.cpp +++ b/qt/qextscintillalexertex.cpp @@ -3,32 +3,32 @@ // 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 <qcolor.h> -#include <qfont.h> -#include <qsettings.h> +#include <tqcolor.h> +#include <tqfont.h> +#include <tqsettings.h> -#include "qextscintillalexertex.h" +#include "tqextscintillalexertex.h" // The ctor. -QextScintillaLexerTeX::QextScintillaLexerTeX(QObject *parent,const char *name) +QextScintillaLexerTeX::QextScintillaLexerTeX(TQObject *parent,const char *name) : QextScintillaLexer(parent,name) { } @@ -57,29 +57,29 @@ const char *QextScintillaLexerTeX::lexer() const // Return the string of characters that comprise a word. const char *QextScintillaLexerTeX::wordCharacters() const { - return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\\@"; + return "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPTQRSTUVWXYZ\\@"; } // Returns the foreground colour of the text for a style. -QColor QextScintillaLexerTeX::color(int style) const +TQColor QextScintillaLexerTeX::color(int style) const { switch (style) { case Default: - return QColor(0x3f,0x3f,0x3f); + return TQColor(0x3f,0x3f,0x3f); case Special: - return QColor(0x00,0x7f,0x7f); + return TQColor(0x00,0x7f,0x7f); case Group: - return QColor(0x7f,0x00,0x00); + return TQColor(0x7f,0x00,0x00); case Symbol: - return QColor(0x7f,0x7f,0x00); + return TQColor(0x7f,0x7f,0x00); case Command: - return QColor(0x00,0x7f,0x00); + return TQColor(0x00,0x7f,0x00); } return QextScintillaLexer::color(style); @@ -137,7 +137,7 @@ const char *QextScintillaLexerTeX::keywords(int set) const "overwithdelims pagedepth pagefilllstretch " "pagefillstretch pagefilstretch pagegoal pageshrink " "pagestretch pagetotal par parfillskip parindent " - "parshape parskip patterns pausing penalty " + "partqshape parskip patterns pausing penalty " "postdisplaypenalty predisplaypenalty predisplaysize " "pretolerance prevdepth prevgraf radical raise read " "relax relpenalty right righthyphenmin rightskip " @@ -179,7 +179,7 @@ const char *QextScintillaLexerTeX::keywords(int set) const // Returns the user name of a style. -QString QextScintillaLexerTeX::description(int style) const +TQString QextScintillaLexerTeX::description(int style) const { switch (style) { @@ -202,5 +202,5 @@ QString QextScintillaLexerTeX::description(int style) const return tr("Text"); } - return QString::null; + return TQString(); } diff --git a/qt/qextscintillalexertex.h b/qt/qextscintillalexertex.h index f46960c..250f92d 100644 --- a/qt/qextscintillalexertex.h +++ b/qt/qextscintillalexertex.h @@ -3,38 +3,39 @@ // 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. -#ifndef QEXTSCINTILLALEXERTEX_H -#define QEXTSCINTILLALEXERTEX_H +#ifndef TQEXTSCINTILLALEXERTEX_H +#define TQEXTSCINTILLALEXERTEX_H -#include <qobject.h> +#include <tqobject.h> -#include <qextscintillaglobal.h> -#include <qextscintillalexer.h> +#include <tqextscintillaglobal.h> +#include <tqextscintillalexer.h> //! \brief The QextScintillaLexerTeX class encapsulates the Scintilla TeX //! lexer. -class QEXTSCINTILLA_EXPORT QextScintillaLexerTeX : public QextScintillaLexer +class TQEXTSCINTILLA_EXPORT QextScintillaLexerTeX : public QextScintillaLexer { Q_OBJECT + TQ_OBJECT public: //! This enum defines the meanings of the different styles used by the @@ -61,7 +62,7 @@ public: //! Construct a QextScintillaLexerTeX with parent \a parent and name //! \a name. \a parent is typically the QextScintilla instance. - QextScintillaLexerTeX(QObject *parent = 0,const char *name = 0); + QextScintillaLexerTeX(TQObject *parent = 0,const char *name = 0); //! Destroys the QextScintillaLexerTeX instance. virtual ~QextScintillaLexerTeX(); @@ -80,19 +81,19 @@ public: //! \a style. //! //! \sa paper() - QColor color(int style) const; + TQColor color(int style) const; //! Returns the set of keywords for the keyword set \a set recognised //! by the lexer as a space separated string. const char *keywords(int set) const; //! Returns the descriptive name for style number \a style. If the - //! style is invalid for this language then QString::null is returned. + //! style is invalid for this language then TQString() is returned. //! This is intended to be used in user preference dialogs. - QString description(int style) const; + TQString description(int style) const; private: -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaLexerTeX(const QextScintillaLexerTeX &); QextScintillaLexerTeX &operator=(const QextScintillaLexerTeX &); #endif diff --git a/qt/qextscintillamacro.cpp b/qt/qextscintillamacro.cpp index 7d2d358..25555f7 100644 --- a/qt/qextscintillamacro.cpp +++ b/qt/qextscintillamacro.cpp @@ -3,46 +3,46 @@ // 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 <qstring.h> +#include <tqstring.h> -#include "qextscintillamacro.h" -#include "qextscintilla.h" +#include "tqextscintillamacro.h" +#include "tqextscintilla.h" -static QCString extract(const QCString &asc,int &start); +static TQCString extract(const TQCString &asc,int &start); static int fromHex(unsigned char ch); // The ctor. QextScintillaMacro::QextScintillaMacro(QextScintilla *parent,const char *name) - : QObject(parent,name), qsci(parent) + : TQObject(parent,name), qsci(parent) { } // The ctor that initialises the macro. -QextScintillaMacro::QextScintillaMacro(const QCString &asc, +QextScintillaMacro::QextScintillaMacro(const TQCString &asc, QextScintilla *parent,const char *name) - : QObject(parent,name), qsci(parent) + : TQObject(parent,name), qsci(parent) { load(asc); } @@ -62,7 +62,7 @@ void QextScintillaMacro::clear() // Read a macro from a string. -bool QextScintillaMacro::load(const QCString &asc) +bool QextScintillaMacro::load(const TQCString &asc) { bool rc = TRUE; @@ -72,7 +72,7 @@ bool QextScintillaMacro::load(const QCString &asc) while (pos < asc.length()) { - QCString fld; + TQCString fld; Macro cmd; unsigned len; @@ -154,17 +154,17 @@ bool QextScintillaMacro::load(const QCString &asc) // Write a macro to a string. -QCString QextScintillaMacro::save() const +TQCString QextScintillaMacro::save() const { - QCString ms; + TQCString ms; - for (QValueList<Macro>::const_iterator it = macro.begin(); it != macro.end(); ++it) + for (TQValueList<Macro>::const_iterator it = macro.begin(); it != macro.end(); ++it) { if (!ms.isEmpty()) ms += ' '; unsigned len = (*it).text.size(); - QCString m; + TQCString m; m.sprintf("%u %lu %u",(*it).msg,(*it).wParam,len); @@ -203,7 +203,7 @@ void QextScintillaMacro::play() if (!qsci) return; - for (QValueList<Macro>::const_iterator it = macro.begin(); it != macro.end(); ++it) + for (TQValueList<Macro>::const_iterator it = macro.begin(); it != macro.end(); ++it) qsci -> SendScintilla((*it).msg,(*it).wParam,(*it).text.data()); } @@ -217,8 +217,8 @@ void QextScintillaMacro::startRecording() macro.clear(); connect(qsci, - SIGNAL(SCN_MACRORECORD(unsigned int,unsigned long,long)), - SLOT(record(unsigned int,unsigned long,long))); + TQT_SIGNAL(SCN_MACRORECORD(unsigned int,unsigned long,long)), + TQT_SLOT(record(unsigned int,unsigned long,long))); qsci -> SendScintilla(QextScintillaBase::SCI_STARTRECORD); } @@ -260,7 +260,7 @@ void QextScintillaMacro::record(unsigned int msg,unsigned long wParam, // it's a signifacant space reduction to append it to // the previous command. - QByteArray &ba = macro.last().text; + TQByteArray &ba = macro.last().text; unsigned pos = ba.size() - 1; @@ -292,9 +292,9 @@ void QextScintillaMacro::record(unsigned int msg,unsigned long wParam, // Extract a macro field starting at the given position. -static QCString extract(const QCString &asc,int &fstart) +static TQCString extract(const TQCString &asc,int &fstart) { - QCString f; + TQCString f; if (fstart < asc.length()) { diff --git a/qt/qextscintillamacro.h b/qt/qextscintillamacro.h index 0c33968..b7dac63 100644 --- a/qt/qextscintillamacro.h +++ b/qt/qextscintillamacro.h @@ -3,35 +3,35 @@ // 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. -#ifndef QEXTSCINTILLAMACRO_H -#define QEXTSCINTILLAMACRO_H +#ifndef TQEXTSCINTILLAMACRO_H +#define TQEXTSCINTILLAMACRO_H -#include <qobject.h> -#include <qcstring.h> -#include <qvaluelist.h> +#include <tqobject.h> +#include <tqcstring.h> +#include <tqvaluelist.h> -#include <qextscintillaglobal.h> +#include <tqextscintillaglobal.h> -class QString; +class TQString; class QextScintilla; @@ -41,9 +41,10 @@ class QextScintilla; //! Methods are provided to convert convert a macro to and from a textual //! representation so that they can be easily written to and read from //! permanent storage. -class QEXTSCINTILLA_EXPORT QextScintillaMacro : public QObject +class TQEXTSCINTILLA_EXPORT QextScintillaMacro : public TQObject { Q_OBJECT + TQ_OBJECT public: //! Construct a QextScintillaMacro with parent \a parent and name @@ -52,7 +53,7 @@ public: //! Construct a QextScintillaMacro from the printable ASCII //! representation \a asc, with parent \a parent and name \a name. - QextScintillaMacro(const QCString &asc,QextScintilla *parent, + QextScintillaMacro(const TQCString &asc,QextScintilla *parent, const char *name = 0); //! Destroy the QextScintillaMacro instance. @@ -65,14 +66,14 @@ public: //! Returns TRUE if there was no error. //! //! \sa save() - bool load(const QCString &asc); + bool load(const TQCString &asc); //! Return a printable ASCII representation of the macro. It is //! guaranteed that only printable ASCII characters are used and that //! double quote characters will not be used. //! //! \sa load() - QCString save() const; + TQCString save() const; public slots: //! Play the macro. @@ -91,13 +92,13 @@ private: struct Macro { unsigned int msg; unsigned long wParam; - QByteArray text; + TQByteArray text; }; QextScintilla *qsci; - QValueList<Macro> macro; + TQValueList<Macro> macro; -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaMacro(const QextScintillaMacro &); QextScintillaMacro &operator=(const QextScintillaMacro &); #endif diff --git a/qt/qextscintillaprinter.cpp b/qt/qextscintillaprinter.cpp index 1aadb2d..ec97032 100644 --- a/qt/qextscintillaprinter.cpp +++ b/qt/qextscintillaprinter.cpp @@ -3,35 +3,35 @@ // 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 <qprinter.h> -#include <qpainter.h> -#include <qpaintdevicemetrics.h> -#include <qvaluestack.h> +#include <tqprinter.h> +#include <tqpainter.h> +#include <tqpaintdevicemetrics.h> +#include <tqvaluestack.h> -#include "qextscintillaprinter.h" -#include "qextscintillabase.h" +#include "tqextscintillaprinter.h" +#include "tqextscintillabase.h" // The ctor. -QextScintillaPrinter::QextScintillaPrinter(QPrinter::PrinterMode mode) : - QPrinter(mode), mag(0), +QextScintillaPrinter::QextScintillaPrinter(TQPrinter::PrinterMode mode) : + TQPrinter(mode), mag(0), wrap(QextScintilla::WrapWord) { } @@ -44,7 +44,7 @@ QextScintillaPrinter::~QextScintillaPrinter() // Format the page before the document text is drawn. -void QextScintillaPrinter::formatPage(QPainter &,bool,QRect &,int) +void QextScintillaPrinter::formatPage(TQPainter &,bool,TQRect &,int) { } @@ -57,8 +57,8 @@ int QextScintillaPrinter::printRange(QextScintillaBase *qsb,int from,int to) return FALSE; // Setup the printing area. - QPaintDeviceMetrics metrics(this); - QRect def_area; + TQPaintDeviceMetrics metrics(this); + TQRect def_area; def_area.setX(0); def_area.setY(0); @@ -89,7 +89,7 @@ int QextScintillaPrinter::printRange(QextScintillaBase *qsb,int from,int to) if (startPos >= endPos) return FALSE; - QPainter painter(this); + TQPainter painter(this); bool reverse = (pageOrder() == LastPageFirst); bool needNewPage = FALSE; @@ -100,7 +100,7 @@ int QextScintillaPrinter::printRange(QextScintillaBase *qsb,int from,int to) { // If we are printing in reverse page order then remember the // start position of each page. - QValueStack<long> pageStarts; + TQValueStack<long> pageStarts; int currPage = 1; long pos = startPos; @@ -133,7 +133,7 @@ int QextScintillaPrinter::printRange(QextScintillaBase *qsb,int from,int to) } } - QRect area = def_area; + TQRect area = def_area; formatPage(painter,render,area,currPage); pos = qsb -> SendScintilla(QextScintillaBase::SCI_FORMATRANGE,render,&painter,area,pos,endPos); @@ -161,7 +161,7 @@ int QextScintillaPrinter::printRange(QextScintillaBase *qsb,int from,int to) else needNewPage = TRUE; - QRect area = def_area; + TQRect area = def_area; formatPage(painter,TRUE,area,currPage); qsb -> SendScintilla(QextScintillaBase::SCI_FORMATRANGE,TRUE,&painter,area,pos,ePos); diff --git a/qt/qextscintillaprinter.h b/qt/qextscintillaprinter.h index 3eae387..8c0ab57 100644 --- a/qt/qextscintillaprinter.h +++ b/qt/qextscintillaprinter.h @@ -3,44 +3,44 @@ // 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. -#ifndef QEXTSCINTILLAPRINTER_H -#define QEXTSCINTILLAPRINTER_H +#ifndef TQEXTSCINTILLAPRINTER_H +#define TQEXTSCINTILLAPRINTER_H -#include <qprinter.h> +#include <tqprinter.h> -#include <qextscintillaglobal.h> -#include <qextscintilla.h> +#include <tqextscintillaglobal.h> +#include <tqextscintilla.h> -class QRect; -class QPainter; +class TQRect; +class TQPainter; class QextScintillaBase; -//! \brief The QextScintillaPrinter class is a sub-class of the Qt QPrinter +//! \brief The QextScintillaPrinter class is a sub-class of the TQt TQPrinter //! class that is able to print the text of a Scintilla document. //! -//! The class can be further sub-classed to alter to layout of the text, adding +//! The class can be further sub-classed to alter to tqlayout of the text, adding //! headers and footers for example. -class QEXTSCINTILLA_EXPORT QextScintillaPrinter : public QPrinter +class TQEXTSCINTILLA_EXPORT QextScintillaPrinter : public TQPrinter { public: //! Constructs a printer paint device with mode \a mode. @@ -58,10 +58,10 @@ public: //! the text. This should be modified if it is necessary to reserve //! space for any customised text or graphics. By default the area is //! relative to the printable area of the page. Use - //! QPrinter::setFullPage() because calling printRange() if you want to + //! TQPrinter::setFullPage() because calling printRange() if you want to //! try and print over the whole page. \a pagenr is the number of the //! page. The first page is numbered 1. - virtual void formatPage(QPainter &painter,bool drawing,QRect &area, + virtual void formatPage(TQPainter &painter,bool drawing,TQRect &area, int pagenr); //! Return the number of points to add to each font when printing. @@ -98,7 +98,7 @@ private: int mag; QextScintilla::WrapMode wrap; -#if defined(Q_DISABLE_COPY) +#if defined(TQ_DISABLE_COPY) QextScintillaPrinter(const QextScintillaPrinter &); QextScintillaPrinter &operator=(const QextScintillaPrinter &); #endif |