diff options
author | Timothy Pearson <[email protected]> | 2011-11-29 01:11:08 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-11-29 01:11:08 -0600 |
commit | 8a055d66f43592c257cece2eb8cc021808062917 (patch) | |
tree | d0922f201bd5d24b62a33160d1d9baf9e89f9a70 /sip/qt/qstring.sip | |
parent | b388516ca2691303a076a0764fd40bf7116fe43d (diff) | |
download | pytqt-8a055d66f43592c257cece2eb8cc021808062917.tar.gz pytqt-8a055d66f43592c257cece2eb8cc021808062917.zip |
Initial TQt conversion
Diffstat (limited to 'sip/qt/qstring.sip')
-rw-r--r-- | sip/qt/qstring.sip | 664 |
1 files changed, 332 insertions, 332 deletions
diff --git a/sip/qt/qstring.sip b/sip/qt/qstring.sip index f0097f4..3b49341 100644 --- a/sip/qt/qstring.sip +++ b/sip/qt/qstring.sip @@ -1,27 +1,27 @@ -// This is the SIP interface definition for QChar and QString. +// This is the SIP interface definition for TQChar and TQString. // // Copyright (c) 2007 // Riverbank Computing Limited <[email protected]> // -// This file is part of PyQt. +// This file is part of PyTQt. // -// This copy of PyQt is free software; you can redistribute it and/or modify it +// This copy of PyTQt 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. // -// PyQt is supplied in the hope that it will be useful, but WITHOUT ANY +// PyTQt 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 -// PyQt; see the file LICENSE. If not, write to the Free Software Foundation, +// PyTQt; see the file LICENSE. If not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. %ExportedDoc -<Sect2><Title>QChar (Qt v2+)</Title> +<Sect2><Title>TQChar (TQt v2+)</Title> <FuncSynopsis> <FuncDef>uchar &<Function>cell</Function> const</FuncDef> <ParamDef></ParamDef> @@ -39,10 +39,10 @@ Not implemented. </Para> </Sect2> -<Sect2><Title>QString</Title> +<Sect2><Title>TQString</Title> <Para> A Python string object (or Unicode object) can be used whenever a -<Literal>QString</Literal> can be used. A <Literal>QString</Literal> can be +<Literal>TQString</Literal> can be used. A <Literal>TQString</Literal> can be converted to a Python string object using the Python <Literal>str()</Literal> function, and to a Python Unicode object using the Python <Literal>unicode()</Literal> function. @@ -56,40 +56,40 @@ comparison operators are supported. </Para> <FuncSynopsis> - <FuncDef>QCharRef <Function>at</Function></FuncDef> + <FuncDef>TQCharRef <Function>at</Function></FuncDef> <ParamDef>uint <Parameter>i</Parameter></ParamDef> </FuncSynopsis> <Para> -Not yet implemented. (Qt v2+) +Not yet implemented. (TQt v2+) </Para> <FuncSynopsis> - <FuncDef>QChar <Function>constref</Function> const</FuncDef> + <FuncDef>TQChar <Function>constref</Function> const</FuncDef> <ParamDef>uint <Parameter>i</Parameter></ParamDef> </FuncSynopsis> <Para> -Not yet implemented. (Qt v2+) +Not yet implemented. (TQt v2+) </Para> <FuncSynopsis> - <FuncDef>QChar &<Function>ref</Function></FuncDef> + <FuncDef>TQChar &<Function>ref</Function></FuncDef> <ParamDef>uint <Parameter>i</Parameter></ParamDef> </FuncSynopsis> <Para> -Not yet implemented. (Qt v2+) +Not yet implemented. (TQt v2+) </Para> <FuncSynopsis> - <FuncDef>QString &<Function>setUnicodeCodes</Function></FuncDef> + <FuncDef>TQString &<Function>setUnicodeCodes</Function></FuncDef> <ParamDef>const ushort *<Parameter>unicode_as_shorts</Parameter></ParamDef> <ParamDef>uint <Parameter>len</Parameter></ParamDef> </FuncSynopsis> <Para> -Not yet implemented. (Qt v2.1+) +Not yet implemented. (TQt v2.1+) </Para> <FuncSynopsis> - <FuncDef>QString &<Function>sprintf</Function></FuncDef> + <FuncDef>TQString &<Function>sprintf</Function></FuncDef> <ParamDef>const char *<Parameter>format</Parameter></ParamDef> <ParamDef>...</ParamDef> </FuncSynopsis> @@ -172,34 +172,34 @@ This returns a tuple of the <Literal>double</Literal> result and the %End -%If (Qt_2_00 -) +%If (TQt_2_00 -) -class QChar +class TQChar { %TypeHeaderCode #include <qstring.h> %End public: - QChar(); - QChar(char); -// QChar(uchar); - QChar(uchar,uchar); - QChar(const QChar &); -// QChar(ushort); -// QChar(short); -// QChar(uint); - QChar(int); - - static const QChar null; - static const QChar replacement; - static const QChar byteOrderMark; - static const QChar byteOrderSwapped; -%If (Qt_2_2_0 -) - static const QChar nbsp; -%End - -%If (- Qt_3_0_0) + TQChar(); + TQChar(char); +// TQChar(uchar); + TQChar(uchar,uchar); + TQChar(const TQChar &); +// TQChar(ushort); +// TQChar(short); +// TQChar(uint); + TQChar(int); + + static const TQChar null; + static const TQChar replacement; + static const TQChar byteOrderMark; + static const TQChar byteOrderSwapped; +%If (TQt_2_2_0 -) + static const TQChar nbsp; +%End + +%If (- TQt_3_0_0) enum Category { NoCategory, @@ -241,7 +241,7 @@ public: Symbol_Other }; %End -%If (Qt_3_0_0 -) +%If (TQt_3_0_0 -) enum Category { NoCategory, @@ -284,7 +284,7 @@ public: }; %End -%If (- Qt_3_0_0) +%If (- TQt_3_0_0) enum Direction { DirL, DirR, @@ -299,7 +299,7 @@ public: DirON }; %End -%If (Qt_3_0_0 -) +%If (TQt_3_0_0 -) enum Direction { DirL, DirR, @@ -351,7 +351,7 @@ public: Center }; -%If (Qt_3_0_0 -) +%If (TQt_3_0_0 -) enum CombiningClass { Combining_BelowLeftAttached, Combining_BelowAttached, @@ -378,24 +378,24 @@ public: %End int digitValue() const; - QChar lower() const; - QChar upper() const; + TQChar lower() const; + TQChar upper() const; Category category() const; Direction direction() const; Joining joining() const; bool mirrored() const; -%If (Qt_2_1_0 -) - QChar mirroredChar() const; +%If (TQt_2_1_0 -) + TQChar mirroredChar() const; %End -%If (- Qt_3_0_0) - QString decomposition() const; +%If (- TQt_3_0_0) + TQString decomposition() const; %End -%If (Qt_3_0_0 -) - const QString &decomposition() const; +%If (TQt_3_0_0 -) + const TQString &decomposition() const; %End Decomposition decompositionTag() const; -%If (Qt_3_0_0 -) +%If (TQt_3_0_0 -) unsigned char combiningClass() const; %End @@ -409,11 +409,11 @@ public: bool isMark() const; bool isLetter() const; bool isNumber() const; -%If (Qt_2_1_0 -) +%If (TQt_2_1_0 -) bool isLetterOrNumber() const; %End bool isDigit() const; -%If (Qt_3_0_0 -) +%If (TQt_3_0_0 -) bool isSymbol() const; %End @@ -421,7 +421,7 @@ public: // uchar& row(); uchar cell() const; uchar row() const; -%If (Qt_3_0_0 -) +%If (TQt_3_0_0 -) void setCell(uchar); void setRow(uchar); %End @@ -429,101 +429,101 @@ public: static bool networkOrdered(); }; -bool operator==(QChar,char); -bool operator==(QChar,QChar); -bool operator!=(QChar,QChar); -bool operator!=(QChar,char); -bool operator<=(QChar,char); -bool operator<=(QChar,QChar); -bool operator>=(QChar,char); -bool operator>=(QChar,QChar); -bool operator<(QChar,char); -bool operator<(QChar,QChar); -bool operator>(QChar,char); -bool operator>(QChar,QChar); - - -class QString +bool operator==(TQChar,char); +bool operator==(TQChar,TQChar); +bool operator!=(TQChar,TQChar); +bool operator!=(TQChar,char); +bool operator<=(TQChar,char); +bool operator<=(TQChar,TQChar); +bool operator>=(TQChar,char); +bool operator>=(TQChar,TQChar); +bool operator<(TQChar,char); +bool operator<(TQChar,TQChar); +bool operator>(TQChar,char); +bool operator>(TQChar,TQChar); + + +class TQString { %TypeHeaderCode #include <qstring.h> %End public: - QString(); - QString(QChar); - QString(const QString &); - QString(const QByteArray &); -// QString(const QChar *,uint); -// QString(const char *); + TQString(); + TQString(TQChar); + TQString(const TQString &); + TQString(const TQByteArray &); +// TQString(const TQChar *,uint); +// TQString(const char *); -%If (Qt_2_1_0 -) - // This is how we implement QUrl::operator QString() const. - QString(const QUrl &); +%If (TQt_2_1_0 -) + // This is how we implement TQUrl::operator TQString() const. + TQString(const TQUrl &); %End -%If (Qt_3_0_0 -) - // This is how we implement QKeySequence::operator QString() const. - QString(const QKeySequence &); +%If (TQt_3_0_0 -) + // This is how we implement TQKeySequence::operator TQString() const. + TQString(const TQKeySequence &); - // This is how we implement QUuid::operator QString() const. - QString(const QUuid &); + // This is how we implement TQUuid::operator TQString() const. + TQString(const TQUuid &); %End - static const QString null; + static const TQString null; bool isNull() const; bool isEmpty() const; uint length() const; void truncate(uint); -%If (- Qt_3_0_0) - void fill(QChar,int = -1); -%End -%If (Qt_3_0_0 -) - QString &fill(QChar,int = -1); -%End - QString copy() const; - - QString arg(int /Constrained/,int = 0,int = 10) const; - QString arg(double /Constrained/,int = 0,char = 'g',int = -1) const; -%If (Qt_3_2_0 -) -// QString arg(Q_LLONG,int = 0,int = 10) const; -// QString arg(Q_ULLONG,int = 0,int = 10) const; -%End - QString arg(long,int = 0,int = 10) const; - QString arg(ulong,int = 0,int = 10) const; -// QString arg(uint,int = 0,int = 10) const; -// QString arg(short,int = 0,int = 10) const; -// QString arg(ushort,int = 0,int = 10) const; - QString arg(char,int = 0) const; - QString arg(QChar,int = 0) const; - QString arg(const QString&,int = 0) const; -%If (Qt_3_2_0 -) - QString arg(const QString &,const QString &) const; - QString arg(const QString &,const QString &,const QString &) const; - QString arg(const QString &,const QString &,const QString &, - const QString &) const; -%End - -// QString &sprintf(const char *,...); - - int find(QChar,int = 0,bool = 1) const; +%If (- TQt_3_0_0) + void fill(TQChar,int = -1); +%End +%If (TQt_3_0_0 -) + TQString &fill(TQChar,int = -1); +%End + TQString copy() const; + + TQString arg(int /Constrained/,int = 0,int = 10) const; + TQString arg(double /Constrained/,int = 0,char = 'g',int = -1) const; +%If (TQt_3_2_0 -) +// TQString arg(Q_LLONG,int = 0,int = 10) const; +// TQString arg(Q_ULLONG,int = 0,int = 10) const; +%End + TQString arg(long,int = 0,int = 10) const; + TQString arg(ulong,int = 0,int = 10) const; +// TQString arg(uint,int = 0,int = 10) const; +// TQString arg(short,int = 0,int = 10) const; +// TQString arg(ushort,int = 0,int = 10) const; + TQString arg(char,int = 0) const; + TQString arg(TQChar,int = 0) const; + TQString arg(const TQString&,int = 0) const; +%If (TQt_3_2_0 -) + TQString arg(const TQString &,const TQString &) const; + TQString arg(const TQString &,const TQString &,const TQString &) const; + TQString arg(const TQString &,const TQString &,const TQString &, + const TQString &) const; +%End + +// TQString &sprintf(const char *,...); + + int find(TQChar,int = 0,bool = 1) const; int find(char,int = 0,bool = 1) const; - int find(const QString &,int = 0,bool = 1) const; - int find(const QRegExp &,int = 0) const; + int find(const TQString &,int = 0,bool = 1) const; + int find(const TQRegExp &,int = 0) const; // int find(const char *,int = 0) const; - int findRev(QChar,int = -1,bool = 1) const; + int findRev(TQChar,int = -1,bool = 1) const; int findRev(char,int = -1,bool = 1) const; - int findRev(const QString &,int = -1,bool = 1) const; - int findRev(const QRegExp &,int = -1) const; + int findRev(const TQString &,int = -1,bool = 1) const; + int findRev(const TQRegExp &,int = -1) const; // int findRev(const char *,int = -1) const; - int contains(QChar,bool = 1) const; + int contains(TQChar,bool = 1) const; int contains(char,bool = 1) const; // int contains(const char *,bool = 1) const; - int contains(const QString &,bool = 1) const; - int contains(const QRegExp &) const; + int contains(const TQString &,bool = 1) const; + int contains(const TQRegExp &) const; -%If (Qt_3_0_0 -) +%If (TQt_3_0_0 -) enum SectionFlags { SectionDefault, SectionSkipEmpty, @@ -532,76 +532,76 @@ public: SectionCaseInsensitiveSeps }; - QString section(QChar,int,int = 0xffffffff,int = SectionDefault) const; -// QString section(char,int,int = 0xffffffff,int = SectionDefault) const; -// QString section(const char *,int,int = 0xffffffff, + TQString section(TQChar,int,int = 0xffffffff,int = SectionDefault) const; +// TQString section(char,int,int = 0xffffffff,int = SectionDefault) const; +// TQString section(const char *,int,int = 0xffffffff, // int = SectionDefault) const; - QString section(const QString &,int,int = 0xffffffff, + TQString section(const TQString &,int,int = 0xffffffff, int = SectionDefault) const; - QString section(const QRegExp &,int,int = 0xffffffff, + TQString section(const TQRegExp &,int,int = 0xffffffff, int = SectionDefault) const; %End - QString left(uint) const; - QString right(uint) const; - QString mid(uint,uint = 0xffffffff) const; - QString leftJustify(uint,QChar = ' ',bool = 0) const; - QString rightJustify(uint,QChar = ' ',bool = 0) const; - QString lower() const; - QString upper() const; - QString stripWhiteSpace() const; - QString simplifyWhiteSpace() const; - - QString &insert(uint,const QString &); -%If (Qt_3_2_0 -) - QString &insert(uint,const QByteArray &); -// QString &insert(uint,const char *); -%End - QString &insert(uint,QChar *,uint); - QString &insert(uint,QChar); - QString &insert(uint,char); - - QString &append(char); -%If (Qt_2_2_0 -) - QString &append(QChar); -%End - QString &append(const QString &); - QString &prepend(char); -%If (Qt_2_2_0 -) - QString &prepend(QChar); -%End - QString &prepend(const QString &); - QString &remove(uint,uint); -%If (Qt_3_1_0 -) - QString &remove(const QString &); -%If (Qt_3_2_0 -) - QString &remove(const QString &,bool); -%End - QString &remove(QChar); - QString &remove(char); - QString &remove(const QRegExp &); -%End - QString &replace(uint,uint,const QString &); - QString &replace(uint,uint,const QChar *,uint); -%If (Qt_3_1_0 -) - QString &replace(uint,uint,QChar); - QString &replace(uint,uint,char); - QString &replace(QChar,const QString &); -%If (Qt_3_2_0 -) - QString &replace(QChar,const QString &,bool); -%End - QString &replace(char,const QString &); -%If (Qt_3_2_0 -) - QString &replace(char,const QString &,bool); -%End - QString &replace(const QString &,const QString &); -%If (Qt_3_2_0 -) - QString &replace(const QString &,const QString &,bool); -%End -%End - QString &replace(const QRegExp &,const QString &); -%If (Qt_3_1_0 -) - QString &replace(QChar,QChar); + TQString left(uint) const; + TQString right(uint) const; + TQString mid(uint,uint = 0xffffffff) const; + TQString leftJustify(uint,TQChar = ' ',bool = 0) const; + TQString rightJustify(uint,TQChar = ' ',bool = 0) const; + TQString lower() const; + TQString upper() const; + TQString stripWhiteSpace() const; + TQString simplifyWhiteSpace() const; + + TQString &insert(uint,const TQString &); +%If (TQt_3_2_0 -) + TQString &insert(uint,const TQByteArray &); +// TQString &insert(uint,const char *); +%End + TQString &insert(uint,TQChar *,uint); + TQString &insert(uint,TQChar); + TQString &insert(uint,char); + + TQString &append(char); +%If (TQt_2_2_0 -) + TQString &append(TQChar); +%End + TQString &append(const TQString &); + TQString &prepend(char); +%If (TQt_2_2_0 -) + TQString &prepend(TQChar); +%End + TQString &prepend(const TQString &); + TQString &remove(uint,uint); +%If (TQt_3_1_0 -) + TQString &remove(const TQString &); +%If (TQt_3_2_0 -) + TQString &remove(const TQString &,bool); +%End + TQString &remove(TQChar); + TQString &remove(char); + TQString &remove(const TQRegExp &); +%End + TQString &replace(uint,uint,const TQString &); + TQString &replace(uint,uint,const TQChar *,uint); +%If (TQt_3_1_0 -) + TQString &replace(uint,uint,TQChar); + TQString &replace(uint,uint,char); + TQString &replace(TQChar,const TQString &); +%If (TQt_3_2_0 -) + TQString &replace(TQChar,const TQString &,bool); +%End + TQString &replace(char,const TQString &); +%If (TQt_3_2_0 -) + TQString &replace(char,const TQString &,bool); +%End + TQString &replace(const TQString &,const TQString &); +%If (TQt_3_2_0 -) + TQString &replace(const TQString &,const TQString &,bool); +%End +%End + TQString &replace(const TQRegExp &,const TQString &); +%If (TQt_3_1_0 -) + TQString &replace(TQChar,TQChar); %End short toShort(bool * = 0,int = 10) const; @@ -610,56 +610,56 @@ public: uint toUInt(bool * = 0,int = 10) const; long toLong(bool * = 0,int = 10) const; ulong toULong(bool * = 0,int = 10) const; -%If (Qt_3_2_0 -) +%If (TQt_3_2_0 -) // Q_LLONG toLongLong(bool * = 0,int = 10) const; // Q_ULLONG toULongLong(bool * = 0,int = 10) const; %End float toFloat(bool * = 0) const; double toDouble(bool * = 0) const; - QString &setNum(int /Constrained/,int = 10); - QString &setNum(double /Constrained/,char = 'g',int = 6); -// QString &setNum(short,int = 10); -// QString &setNum(ushort,int = 10); -// QString &setNum(uint,int = 10); - QString &setNum(long,int = 10); - QString &setNum(ulong,int = 10); -%If (Qt_3_2_0 -) -// QString &setNum(Q_LLONG,int = 10); -// QString &setNum(Q_ULLONG,int = 10); + TQString &setNum(int /Constrained/,int = 10); + TQString &setNum(double /Constrained/,char = 'g',int = 6); +// TQString &setNum(short,int = 10); +// TQString &setNum(ushort,int = 10); +// TQString &setNum(uint,int = 10); + TQString &setNum(long,int = 10); + TQString &setNum(ulong,int = 10); +%If (TQt_3_2_0 -) +// TQString &setNum(Q_LLONG,int = 10); +// TQString &setNum(Q_ULLONG,int = 10); %End -// QString &setNum(float,char = 'g',int = 6); +// TQString &setNum(float,char = 'g',int = 6); - static QString number(int /Constrained/,int = 10); - static QString number(double /Constrained/,char = 'g',int = 6); - static QString number(long,int = 10); - static QString number(ulong,int = 10); -%If (Qt_3_2_0 -) -// static QString number(Q_LLONG,int = 10); -// static QString number(Q_ULLONG,int = 10); + static TQString number(int /Constrained/,int = 10); + static TQString number(double /Constrained/,char = 'g',int = 6); + static TQString number(long,int = 10); + static TQString number(ulong,int = 10); +%If (TQt_3_2_0 -) +// static TQString number(Q_LLONG,int = 10); +// static TQString number(Q_ULLONG,int = 10); %End -// static QString number(uint,int = 10); +// static TQString number(uint,int = 10); - void setExpand(uint,QChar); + void setExpand(uint,TQChar); - QString &operator+=(const QString &); -%If (Qt_3_3_0 -) - QString &operator+=(const QByteArray &); + TQString &operator+=(const TQString &); +%If (TQt_3_3_0 -) + TQString &operator+=(const TQByteArray &); %End - QString &operator+=(QChar); - //QString &operator+=(char); + TQString &operator+=(TQChar); + //TQString &operator+=(char); - QString operator*(int); + TQString operator*(int); %MethodCode - sipRes = new QString(); + sipRes = new TQString(); while (a0-- > 0) *sipRes += *sipCpp; %End - QString &operator*=(int); + TQString &operator*=(int); %MethodCode - QString orig(*sipCpp); + TQString orig(*sipCpp); sipCpp -> truncate(0); @@ -667,84 +667,84 @@ public: *sipCpp += orig; %End - QChar at(uint) const; -// QCharRef at(uint); -// QChar constref(uint) const; -// QChar &ref(uint); -// const QChar *unicode() const; + TQChar at(uint) const; +// TQCharRef at(uint); +// TQChar constref(uint) const; +// TQChar &ref(uint); +// const TQChar *unicode() const; const char *ascii() const; -%If (Qt_3_1_0 -) - static QString fromAscii(const char *,int = -1); +%If (TQt_3_1_0 -) + static TQString fromAscii(const char *,int = -1); %End const char *latin1() const; - static QString fromLatin1(const char *,int = -1); - QCString utf8() const; - static QString fromUtf8(const char *,int = -1); - QCString local8Bit() const; - static QString fromLocal8Bit(const char *,int = -1); - -%If (Qt_3_1_0 -) -// static QString fromUcs2(const unsigned short *); + static TQString fromLatin1(const char *,int = -1); + TQCString utf8() const; + static TQString fromUtf8(const char *,int = -1); + TQCString local8Bit() const; + static TQString fromLocal8Bit(const char *,int = -1); + +%If (TQt_3_1_0 -) +// static TQString fromUcs2(const unsigned short *); // const unsigned short *ucs2() const; %End -%If (Qt_2_1_0 -) -// QString &setUnicode(const QChar *,uint); -// QString &setUnicodeCodes(const ushort *,uint); +%If (TQt_2_1_0 -) +// TQString &setUnicode(const TQChar *,uint); +// TQString &setUnicodeCodes(const ushort *,uint); %End -%If (Qt_3_1_0 -) - QString &setAscii(const char *,int = -1); +%If (TQt_3_1_0 -) + TQString &setAscii(const char *,int = -1); %End -%If (Qt_2_1_0 -) - QString &setLatin1(const char *,int = -1); +%If (TQt_2_1_0 -) + TQString &setLatin1(const char *,int = -1); %End - int compare(const QString &) const; - static int compare(const QString &,const QString &); + int compare(const TQString &) const; + static int compare(const TQString &,const TQString &); -%If (Qt_3_0_0 -) - int localeAwareCompare(const QString &) const; - static int localeAwareCompare(const QString &,const QString &); +%If (TQt_3_0_0 -) + int localeAwareCompare(const TQString &) const; + static int localeAwareCompare(const TQString &,const TQString &); %End void compose(); -%If (- Qt_3_0_0) - QChar::Direction basicDirection(); - QString visual(int = 0,int = -1); +%If (- TQt_3_0_0) + TQChar::Direction basicDirection(); + TQString visual(int = 0,int = -1); %End -%If (Qt_2_2_0 -) - bool startsWith(const QString &) const; +%If (TQt_2_2_0 -) + bool startsWith(const TQString &) const; %End -%If (Qt_3_2_0 -) - bool startsWith(const QString &,bool) const; +%If (TQt_3_2_0 -) + bool startsWith(const TQString &,bool) const; %End -%If (Qt_3_0_0 -) - bool endsWith(const QString &) const; +%If (TQt_3_0_0 -) + bool endsWith(const TQString &) const; %End -%If (Qt_3_2_0 -) - bool endsWith(const QString &,bool) const; +%If (TQt_3_2_0 -) + bool endsWith(const TQString &,bool) const; %End -%If (Qt_3_0_0 -) +%If (TQt_3_0_0 -) void setLength(uint); %End -%If (Qt_3_2_0 -) +%If (TQt_3_2_0 -) uint capacity() const; void reserve(uint); void squeeze(); %End -%If (Qt_3_0_0 -) +%If (TQt_3_0_0 -) bool simpleText() const; bool isRightToLeft() const; %End - // Force the numeric interpretation so that str + QString gets handled + // Force the numeric interpretation so that str + TQString gets handled // as we want. - const QString operator+(const QString &) /Numeric/; + const TQString operator+(const TQString &) /Numeric/; - QString operator[](int) const; + TQString operator[](int) const; %MethodCode int len; @@ -753,10 +753,10 @@ public: if ((a0 = (int)sipConvertFromSequenceIndex(a0,len)) < 0) sipIsErr = 1; else - sipRes = new QString(sipCpp -> at(a0)); + sipRes = new TQString(sipCpp -> at(a0)); %End - QString operator[](SIP_PYSLICE) const; + TQString operator[](SIP_PYSLICE) const; %MethodCode #if PY_VERSION_HEX >= 0x02050000 Py_ssize_t len, start, stop, step, slicelength, i; @@ -770,7 +770,7 @@ public: sipIsErr = 1; else { - sipRes = new QString(); + sipRes = new TQString(); for (i = 0; i < slicelength; ++i) { @@ -785,7 +785,7 @@ public: sipRes = sipCpp -> length(); %End - int __contains__(const QString &) const; + int __contains__(const TQString &) const; %MethodCode sipRes = (sipCpp -> contains(*a0) > 0); %End @@ -793,7 +793,7 @@ public: SIP_PYOBJECT __unicode__(); %MethodCode #if PY_VERSION_HEX >= 0x01060000 - sipRes = QStringToPyUnicode(sipCpp); + sipRes = TQStringToPyUnicode(sipCpp); #else Py_INCREF(Py_None); sipRes = Py_None; @@ -803,7 +803,7 @@ public: SIP_PYOBJECT __str__(); %MethodCode #if PY_VERSION_HEX >= 0x01060000 - sipRes = QStringToPyUnicode(sipCpp); + sipRes = TQStringToPyUnicode(sipCpp); #else const char *s; @@ -822,8 +822,8 @@ public: #include <qtextcodec.h> #if PY_VERSION_HEX >= 0x01060000 -// Convenience function for converting a QString to a Python Unicode object. -static PyObject *QStringToPyUnicode(QString *qs) +// Convenience function for converting a TQString to a Python Unicode object. +static PyObject *TQStringToPyUnicode(TQString *qs) { PyObject *uobj; @@ -840,13 +840,13 @@ static PyObject *QStringToPyUnicode(QString *qs) #endif // Convenience function for converting a Python unicode or string object to a -// QString on the heap. -static QString *PyUnicodeStringToQString(PyObject *py) +// TQString on the heap. +static TQString *PyUnicodeStringToTQString(PyObject *py) { #if PY_VERSION_HEX >= 0x01060000 if (PyUnicode_Check(py)) { - QString *qs = new QString; + TQString *qs = new TQString; #if defined(Py_UNICODE_WIDE) PY_UNICODE_TYPE *ucode = PyUnicode_AS_UNICODE(py); @@ -863,14 +863,14 @@ static QString *PyUnicodeStringToQString(PyObject *py) #endif if (PyString_Check(py)) - return new QString(PyString_AS_STRING(py)); + return new TQString(PyString_AS_STRING(py)); return 0; } %End %ConvertToTypeCode - // Allow a Python string (or a unicode string) whenever a QString is + // Allow a Python string (or a unicode string) whenever a TQString is // expected. if (sipIsErr == NULL) @@ -880,12 +880,12 @@ static QString *PyUnicodeStringToQString(PyObject *py) #endif sipCanConvertToInstance(sipPy,sipClass_QString,SIP_NO_CONVERTORS)); - *sipCppPtr = PyUnicodeStringToQString(sipPy); + *sipCppPtr = PyUnicodeStringToTQString(sipPy); if (*sipCppPtr) return sipGetState(sipTransferObj); - *sipCppPtr = reinterpret_cast<QString *>(sipConvertToInstance(sipPy,sipClass_QString,sipTransferObj,SIP_NO_CONVERTORS,0,sipIsErr)); + *sipCppPtr = reinterpret_cast<TQString *>(sipConvertToInstance(sipPy,sipClass_QString,sipTransferObj,SIP_NO_CONVERTORS,0,sipIsErr)); return 0; %End @@ -893,7 +893,7 @@ static QString *PyUnicodeStringToQString(PyObject *py) %BIGetReadBufferCode if (sipSegment != 0) { - PyErr_SetString(PyExc_SystemError, "accessing non-existent QString segment"); + PyErr_SetString(PyExc_SystemError, "accessing non-existent TQString segment"); sipRes = -1; } else @@ -913,21 +913,21 @@ static QString *PyUnicodeStringToQString(PyObject *py) %BIGetCharBufferCode if (sipSegment != 0) { - PyErr_SetString(PyExc_SystemError, "accessing non-existent QString segment"); + PyErr_SetString(PyExc_SystemError, "accessing non-existent TQString segment"); sipRes = -1; } else { - static QTextCodec *codec = 0; + static TQTextCodec *codec = 0; static bool check_codec = TRUE; - // For the first time only, try and find a Qt codec that + // For the first time only, try and find a TQt codec that // corresponds to the default Python codec. If one wasn't // found then fall back to ASCII (which is actually the codec - // returned by QTextCodec::codecForCStrings()). + // returned by TQTextCodec::codecForCStrings()). if (check_codec) { - codec = QTextCodec::codecForName(PyUnicode_GetDefaultEncoding()); + codec = TQTextCodec::codecForName(PyUnicode_GetDefaultEncoding()); check_codec = FALSE; } @@ -936,7 +936,7 @@ static QString *PyUnicodeStringToQString(PyObject *py) // A Python string is the most convenient method to // save the encoded version on the heap. PyObject *encobj = ((sipSimpleWrapper *)sipSelf)->user; - QCString enc; + TQCString enc; Py_XDECREF(encobj); @@ -963,30 +963,30 @@ static QString *PyUnicodeStringToQString(PyObject *py) %End }; -bool operator==(const QString &,const QString &); -bool operator!=(const QString &,const QString &); -bool operator<(const QString &,const QString &); -bool operator<=(const QString &,const QString &); -bool operator>(const QString &,const QString &); -bool operator>=(const QString &,const QString &); +bool operator==(const TQString &,const TQString &); +bool operator!=(const TQString &,const TQString &); +bool operator<(const TQString &,const TQString &); +bool operator<=(const TQString &,const TQString &); +bool operator>(const TQString &,const TQString &); +bool operator>=(const TQString &,const TQString &); %End -%If (- Qt_2_00) +%If (- TQt_2_00) -class QString : QByteArray +class TQString : TQByteArray { %TypeHeaderCode #include <qstring.h> %End public: - QString(); - QString(int); - QString(const QString &); - QString(const char *); - QString(const char *,uint); + TQString(); + TQString(int); + TQString(const TQString &); + TQString(const char *); + TQString(const char *,uint); bool isNull() const; bool isEmpty() const; @@ -994,33 +994,33 @@ public: bool resize(uint); bool truncate(uint); bool fill(char,int = -1); - QString copy() const; -// QString &sprintf(const char *,...); + TQString copy() const; +// TQString &sprintf(const char *,...); int find(char,int = 0,bool = 1) const; int find(const char *,int = 0,bool = 1) const; - int find(const QRegExp &,int = 0) const; + int find(const TQRegExp &,int = 0) const; int findRev(char,int = -1,bool = 1) const; int findRev(const char *,int = -1,bool = 1) const; - int findRev(const QRegExp &,int = -1) const; + int findRev(const TQRegExp &,int = -1) const; int contains(char,bool = 1) const; int contains(const char *,bool = 1) const; - int contains(const QRegExp &) const; - QString left(uint) const; - QString right(uint) const; - QString mid(uint,uint) const; - QString leftJustify(uint,char = ' ',bool = 0) const; - QString rightJustify(uint,char = ' ',bool = 0) const; - QString lower() const; - QString upper() const; - QString stripWhiteSpace() const; - QString simplifyWhiteSpace() const; - QString &insert(uint,const char *); - QString &insert(uint,char); - QString &append(const char *); - QString &prepend(const char *); - QString &remove(uint,uint); - QString &replace(uint,uint,const char *); - QString &replace(const QRegExp &,const char *); + int contains(const TQRegExp &) const; + TQString left(uint) const; + TQString right(uint) const; + TQString mid(uint,uint) const; + TQString leftJustify(uint,char = ' ',bool = 0) const; + TQString rightJustify(uint,char = ' ',bool = 0) const; + TQString lower() const; + TQString upper() const; + TQString stripWhiteSpace() const; + TQString simplifyWhiteSpace() const; + TQString &insert(uint,const char *); + TQString &insert(uint,char); + TQString &append(const char *); + TQString &prepend(const char *); + TQString &remove(uint,uint); + TQString &replace(uint,uint,const char *); + TQString &replace(const TQRegExp &,const char *); short toShort(bool * = 0) const; ushort toUShort(bool * = 0) const; @@ -1031,15 +1031,15 @@ public: float toFloat(bool * = 0) const; double toDouble(bool * = 0) const; - QString &setStr(const char *); -// QString &setNum(short); -// QString &setNum(ushort); - QString &setNum(int /Constrained/); -// QString &setNum(uint); -// QString &setNum(long); -// QString &setNum(ulong); -// QString &setNum(float,char = 'g',int = 6); - QString &setNum(double,char = 'g',int = 6); + TQString &setStr(const char *); +// TQString &setNum(short); +// TQString &setNum(ushort); + TQString &setNum(int /Constrained/); +// TQString &setNum(uint); +// TQString &setNum(long); +// TQString &setNum(ulong); +// TQString &setNum(float,char = 'g',int = 6); + TQString &setNum(double,char = 'g',int = 6); bool setExpand(uint,char); SIP_PYOBJECT __str__(); @@ -1057,7 +1057,7 @@ public: %End %ConvertToTypeCode - // Allow a Python string whenever a QString is expected. + // Allow a Python string whenever a TQString is expected. if (sipIsErr == NULL) return (PyString_Check(sipPy) || @@ -1065,12 +1065,12 @@ public: if (PyString_Check(sipPy)) { - *sipCppPtr = new QString(PyString_AS_STRING(sipPy)); + *sipCppPtr = new TQString(PyString_AS_STRING(sipPy)); return sipGetState(sipTransferObj); } - *sipCppPtr = reinterpret_cast<QString *>(sipConvertToInstance(sipPy,sipClass_QString,sipTransferObj,SIP_NO_CONVERTORS,0,sipIsErr)); + *sipCppPtr = reinterpret_cast<TQString *>(sipConvertToInstance(sipPy,sipClass_QString,sipTransferObj,SIP_NO_CONVERTORS,0,sipIsErr)); return 0; %End |