qstring-h.html

来自「QT 下载资料仅供参考」· HTML 代码 · 共 959 行 · 第 1/3 页

HTML
959
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/reggie/tmp/qt-3.0-reggie-5401/qt-x11-commercial-3.0.5/include/qstring.h:1 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta name="Translator" content="Cavendish"><meta name="Qt zh_CN Documents Website" content="http://www.qiliang.net/qt"><title>qstring.h包含文件</title><style type="text/css"><!--h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }a:link { color: #004faf; text-decoration: none }a:visited { color: #672967; text-decoration: none }body { background: #ffffff; color: black; font-family: "Times New Roman" }--></style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr bgcolor="#E5E5E5"><td valign=center> <a href="index.html"><font color="#004faf">主页</font></a> | <a href="classes.html"><font color="#004faf">所有的类</font></a> | <a href="mainclasses.html"><font color="#004faf">主要的类</font></a> | <a href="annotated.html"><font color="#004faf">注释的类</font></a> | <a href="groups.html"><font color="#004faf">分组的类</font></a> | <a href="functions.html"><font color="#004faf">函数</font></a></td><td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>qstring.h</h1><p>这里是qstring.h包含文件的所有文本,一字不差。它仅仅用来说明,版权由Trolltech保留。<hr><pre>/****************************************************************************** $Id$**** Definition of the QString class, and related Unicode** functions.**** Created : 920609**** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.**** This file is part of the tools module of the Qt GUI Toolkit.**** This file may be distributed under the terms of the Q Public License** as defined by Trolltech AS of Norway and appearing in the file** LICENSE.QPL included in the packaging of this file.**** This file may be distributed and/or modified under the terms of the** GNU General Public License version 2 as published by the Free Software** Foundation and appearing in the file LICENSE.GPL included in the** packaging of this file.**** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition** licenses may use this file in accordance with the Qt Commercial License** Agreement provided with the Software.**** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.**** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for**   information about Qt Commercial License Agreements.** See http://www.trolltech.com/qpl/ for QPL licensing information.** See http://www.trolltech.com/gpl/ for GPL licensing information.**** Contact info@trolltech.com if any conditions of this licensing are** not clear to you.************************************************************************/#ifndef QSTRING_H#define QSTRING_H#ifndef QT_H#include "qcstring.h"#endif // QT_H/*****************************************************************************  QString class *****************************************************************************/class QRegExp;class QString;class QCharRef;class Q_EXPORT QChar {public:    QChar();    QChar( char c );    QChar( uchar c );    QChar( uchar c, uchar r );    QChar( const QChar&amp; c );    QChar( ushort rc );    QChar( short rc );    QChar( uint rc );    QChar( int rc );    QT_STATIC_CONST QChar null;            // 0000    QT_STATIC_CONST QChar replacement;     // FFFD    QT_STATIC_CONST QChar byteOrderMark;     // FEFF    QT_STATIC_CONST QChar byteOrderSwapped;     // FFFE    QT_STATIC_CONST QChar nbsp;            // 00A0    // Unicode information    enum Category    {        NoCategory,        Mark_NonSpacing,          //   Mn        Mark_SpacingCombining,    //   Mc        Mark_Enclosing,           //   Me        Number_DecimalDigit,      //   Nd        Number_Letter,            //   Nl        Number_Other,             //   No        Separator_Space,          //   Zs        Separator_Line,           //   Zl        Separator_Paragraph,      //   Zp        Other_Control,            //   Cc        Other_Format,             //   Cf        Other_Surrogate,          //   Cs        Other_PrivateUse,         //   Co        Other_NotAssigned,        //   Cn        Letter_Uppercase,         //   Lu        Letter_Lowercase,         //   Ll        Letter_Titlecase,         //   Lt        Letter_Modifier,          //   Lm        Letter_Other,             //   Lo        Punctuation_Connector,    //   Pc        Punctuation_Dash,         //   Pd        Punctuation_Dask = Punctuation_Dash, // oops        Punctuation_Open,         //   Ps        Punctuation_Close,        //   Pe        Punctuation_InitialQuote, //   Pi        Punctuation_FinalQuote,   //   Pf        Punctuation_Other,        //   Po        Symbol_Math,              //   Sm        Symbol_Currency,          //   Sc        Symbol_Modifier,          //   Sk        Symbol_Other              //   So    };    enum Direction    {        DirL, DirR, DirEN, DirES, DirET, DirAN, DirCS, DirB, DirS, DirWS, DirON,        DirLRE, DirLRO, DirAL, DirRLE, DirRLO, DirPDF, DirNSM, DirBN    };    enum Decomposition    {        Single, Canonical, Font, NoBreak, Initial, Medial,        Final, Isolated, Circle, Super, Sub, Vertical,        Wide, Narrow, Small, Square, Compat, Fraction    };    enum Joining    {        OtherJoining, Dual, Right, Center    };    enum CombiningClass    {        Combining_BelowLeftAttached       = 200,        Combining_BelowAttached           = 202,        Combining_BelowRightAttached      = 204,        Combining_LeftAttached            = 208,        Combining_RightAttached           = 210,        Combining_AboveLeftAttached       = 212,        Combining_AboveAttached           = 214,        Combining_AboveRightAttached      = 216,        Combining_BelowLeft               = 218,        Combining_Below                   = 220,        Combining_BelowRight              = 222,        Combining_Left                    = 224,        Combining_Right                   = 226,        Combining_AboveLeft               = 228,        Combining_Above                   = 230,        Combining_AboveRight              = 232,        Combining_DoubleBelow             = 233,        Combining_DoubleAbove             = 234,        Combining_IotaSubscript           = 240    };    // ****** WHEN ADDING FUNCTIONS, CONSIDER ADDING TO QCharRef TOO    int digitValue() const;    QChar lower() const;    QChar upper() const;    Category category() const;    Direction direction() const;    Joining joining() const;    bool mirrored() const;    QChar mirroredChar() const;    const QString &amp;decomposition() const;    Decomposition decompositionTag() const;    unsigned char combiningClass() const;    char latin1() const { return ucs &gt; 0xff ? 0 : (char) ucs; }    ushort unicode() const { return ucs; }    ushort &amp;unicode() { return ucs; }#ifndef QT_NO_CAST_ASCII    // like all ifdef'd code this is undocumented    operator char() const { return latin1(); }#endif    bool isNull() const { return unicode()==0; }    bool isPrint() const;    bool isPunct() const;    bool isSpace() const;    bool isMark() const;    bool isLetter() const;    bool isNumber() const;    bool isLetterOrNumber() const;    bool isDigit() const;    bool isSymbol() const;    uchar cell() const { return ((uchar) ucs &amp; 0xff); }    uchar row() const { return ((uchar) (ucs&gt;&gt;8)&amp;0xff); }    void setCell( uchar cell ) { ucs = (ucs &amp; 0xff00) + cell; }    void setRow( uchar row ) { ucs = (((ushort) row)&lt;&lt;8) + (ucs&amp;0xff); }    static bool networkOrdered() {	int wordSize;	bool bigEndian = FALSE;	qSysInfo( &amp;wordSize, &amp;bigEndian );	return bigEndian;    }    friend inline bool operator==( char ch, QChar c );    friend inline bool operator==( QChar c, char ch );    friend inline bool operator==( QChar c1, QChar c2 );    friend inline bool operator!=( QChar c1, QChar c2 );    friend inline bool operator!=( char ch, QChar c );    friend inline bool operator!=( QChar c, char ch );    friend inline bool operator&lt;=( QChar c, char ch );    friend inline bool operator&lt;=( char ch, QChar c );    friend inline bool operator&lt;=( QChar c1, QChar c2 );private:    ushort ucs;#if defined(QT_QSTRING_UCS_4)    ushort grp;#endif} Q_PACKED;inline QChar::QChar(){    ucs = 0;#ifdef QT_QSTRING_UCS_4    grp = 0;#endif}inline QChar::QChar( char c ){    ucs = (uchar)c;#ifdef QT_QSTRING_UCS_4    grp = 0;#endif}inline QChar::QChar( uchar c ){    ucs = c;#ifdef QT_QSTRING_UCS_4    grp = 0;#endif}inline QChar::QChar( uchar c, uchar r ){    ucs = (r &lt;&lt; 8) | c;#ifdef QT_QSTRING_UCS_4    grp = 0;#endif}inline QChar::QChar( const QChar&amp; c ){    ucs = c.ucs;#ifdef QT_QSTRING_UCS_4    grp = c.grp;#endif}inline QChar::QChar( ushort rc ){    ucs = rc;#ifdef QT_QSTRING_UCS_4    grp = 0;#endif}inline QChar::QChar( short rc ){    ucs = (ushort) rc;#ifdef QT_QSTRING_UCS_4    grp = 0;#endif}inline QChar::QChar( uint rc ){    ucs = (ushort ) (rc &amp; 0xffff);#ifdef QT_QSTRING_UCS_4    grp = (ushort) ((rc &gt;&gt; 16) &amp; 0xffff);#endif}inline QChar::QChar( int rc ){

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?