author | llornkcor <llornkcor> | 2003-07-10 02:40:10 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2003-07-10 02:40:10 (UTC) |
commit | 155d68c1e7d7dc0fed2534ac43d6d77ce2781f55 (patch) (unidiff) | |
tree | e6edaa5a7040fe6c224c3943d1094dcf02e4f74c /qmake/include/private/qrichtext_p.h | |
parent | 86703e8a5527ef114facd02c005b6b3a7e62e263 (diff) | |
download | opie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.zip opie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.tar.gz opie-155d68c1e7d7dc0fed2534ac43d6d77ce2781f55.tar.bz2 |
update qmake to 1.05a
Diffstat (limited to 'qmake/include/private/qrichtext_p.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | qmake/include/private/qrichtext_p.h | 59 |
1 files changed, 41 insertions, 18 deletions
diff --git a/qmake/include/private/qrichtext_p.h b/qmake/include/private/qrichtext_p.h index 8e29804..9ed87cf 100644 --- a/qmake/include/private/qrichtext_p.h +++ b/qmake/include/private/qrichtext_p.h | |||
@@ -153,12 +153,14 @@ public: | |||
153 | 153 | ||
154 | private: | 154 | private: |
155 | QTextStringChar &operator=( const QTextStringChar & ) { | 155 | QTextStringChar &operator=( const QTextStringChar & ) { |
156 | //abort(); | 156 | //abort(); |
157 | return *this; | 157 | return *this; |
158 | } | 158 | } |
159 | QTextStringChar( const QTextStringChar & ) { | ||
160 | } | ||
159 | friend class QComplexText; | 161 | friend class QComplexText; |
160 | friend class QTextParagraph; | 162 | friend class QTextParagraph; |
161 | }; | 163 | }; |
162 | 164 | ||
163 | #if defined(Q_TEMPLATEDLL) | 165 | #if defined(Q_TEMPLATEDLL) |
164 | // MOC_SKIP_BEGIN | 166 | // MOC_SKIP_BEGIN |
@@ -171,14 +173,14 @@ class Q_EXPORT QTextString | |||
171 | public: | 173 | public: |
172 | 174 | ||
173 | QTextString(); | 175 | QTextString(); |
174 | QTextString( const QTextString &s ); | 176 | QTextString( const QTextString &s ); |
175 | virtual ~QTextString(); | 177 | virtual ~QTextString(); |
176 | 178 | ||
177 | static QString toString( const QMemArray<QTextStringChar> &data ); | 179 | static QString toString( const QMemArray<QTextStringChar> &data, bool fixspaces = TRUE ); |
178 | QString toString() const; | 180 | QString toString( bool fixspaces = TRUE ) const; |
179 | 181 | ||
180 | QTextStringChar &at( int i ) const; | 182 | QTextStringChar &at( int i ) const; |
181 | #if defined(Q_STRICT_INLINING_RULES) | 183 | #if defined(Q_STRICT_INLINING_RULES) |
182 | // This is for the IRIX MIPSpro o32 ABI - it fails, claiming the | 184 | // This is for the IRIX MIPSpro o32 ABI - it fails, claiming the |
183 | // implementation to be a redefinition. | 185 | // implementation to be a redefinition. |
184 | inline int length() const; | 186 | inline int length() const; |
@@ -283,14 +285,14 @@ public: | |||
283 | void gotoLineEnd(); | 285 | void gotoLineEnd(); |
284 | void gotoLineStart(); | 286 | void gotoLineStart(); |
285 | void gotoHome(); | 287 | void gotoHome(); |
286 | void gotoEnd(); | 288 | void gotoEnd(); |
287 | void gotoPageUp( int visibleHeight ); | 289 | void gotoPageUp( int visibleHeight ); |
288 | void gotoPageDown( int visibleHeight ); | 290 | void gotoPageDown( int visibleHeight ); |
289 | void gotoNextWord(); | 291 | void gotoNextWord( bool onlySpace = FALSE ); |
290 | void gotoPreviousWord(); | 292 | void gotoPreviousWord( bool onlySpace = FALSE ); |
291 | void gotoWordLeft(); | 293 | void gotoWordLeft(); |
292 | void gotoWordRight(); | 294 | void gotoWordRight(); |
293 | 295 | ||
294 | void insert( const QString &s, bool checkNewLine, QMemArray<QTextStringChar> *formatting = 0 ); | 296 | void insert( const QString &s, bool checkNewLine, QMemArray<QTextStringChar> *formatting = 0 ); |
295 | void splitAndInsertEmptyParagraph( bool ind = TRUE, bool updateIds = TRUE ); | 297 | void splitAndInsertEmptyParagraph( bool ind = TRUE, bool updateIds = TRUE ); |
296 | bool remove(); | 298 | bool remove(); |
@@ -323,13 +325,13 @@ public: | |||
323 | 325 | ||
324 | private: | 326 | private: |
325 | enum Operation { EnterBegin, EnterEnd, Next, Prev, Up, Down }; | 327 | enum Operation { EnterBegin, EnterEnd, Next, Prev, Up, Down }; |
326 | 328 | ||
327 | void push(); | 329 | void push(); |
328 | void pop(); | 330 | void pop(); |
329 | void processNesting( Operation op ); | 331 | bool processNesting( Operation op ); |
330 | void invalidateNested(); | 332 | void invalidateNested(); |
331 | void gotoIntoNested( const QPoint &globalPos ); | 333 | void gotoIntoNested( const QPoint &globalPos ); |
332 | 334 | ||
333 | QTextParagraph *para; | 335 | QTextParagraph *para; |
334 | int idx, tmpIndex; | 336 | int idx, tmpIndex; |
335 | int ox, oy; | 337 | int ox, oy; |
@@ -700,12 +702,13 @@ class QTextParagraph; | |||
700 | #endif | 702 | #endif |
701 | 703 | ||
702 | struct Q_EXPORT QTextDocumentSelection | 704 | struct Q_EXPORT QTextDocumentSelection |
703 | { | 705 | { |
704 | QTextCursor startCursor, endCursor; | 706 | QTextCursor startCursor, endCursor; |
705 | bool swapped; | 707 | bool swapped; |
708 | Q_DUMMY_COMPARISON_OPERATOR(QTextDocumentSelection) | ||
706 | }; | 709 | }; |
707 | 710 | ||
708 | #if defined(Q_TEMPLATEDLL) | 711 | #if defined(Q_TEMPLATEDLL) |
709 | // MOC_SKIP_BEGIN | 712 | // MOC_SKIP_BEGIN |
710 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, QColor>; | 713 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, QColor>; |
711 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, bool>; | 714 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, bool>; |
@@ -836,12 +839,15 @@ public: | |||
836 | 839 | ||
837 | void setPaper( QBrush *brush ) { if ( backBrush ) delete backBrush; backBrush = brush; } | 840 | void setPaper( QBrush *brush ) { if ( backBrush ) delete backBrush; backBrush = brush; } |
838 | QBrush *paper() const { return backBrush; } | 841 | QBrush *paper() const { return backBrush; } |
839 | 842 | ||
840 | void doLayout( QPainter *p, int w ); | 843 | void doLayout( QPainter *p, int w ); |
841 | void draw( QPainter *p, const QRect& rect, const QColorGroup &cg, const QBrush *paper = 0 ); | 844 | void draw( QPainter *p, const QRect& rect, const QColorGroup &cg, const QBrush *paper = 0 ); |
845 | void eraseParagraphEmptyArea( QTextParagraph *parag, QPainter *p, const QColorGroup &cg ); | ||
846 | bool useDoubleBuffer( QTextParagraph *parag, QPainter *p ); | ||
847 | |||
842 | void drawParagraph( QPainter *p, QTextParagraph *parag, int cx, int cy, int cw, int ch, | 848 | void drawParagraph( QPainter *p, QTextParagraph *parag, int cx, int cy, int cw, int ch, |
843 | QPixmap *&doubleBuffer, const QColorGroup &cg, | 849 | QPixmap *&doubleBuffer, const QColorGroup &cg, |
844 | bool drawCursor, QTextCursor *cursor, bool resetChanged = TRUE ); | 850 | bool drawCursor, QTextCursor *cursor, bool resetChanged = TRUE ); |
845 | QTextParagraph *draw( QPainter *p, int cx, int cy, int cw, int ch, const QColorGroup &cg, | 851 | QTextParagraph *draw( QPainter *p, int cx, int cy, int cw, int ch, const QColorGroup &cg, |
846 | bool onlyChanged = FALSE, bool drawCursor = FALSE, QTextCursor *cursor = 0, | 852 | bool onlyChanged = FALSE, bool drawCursor = FALSE, QTextCursor *cursor = 0, |
847 | bool resetChanged = TRUE ); | 853 | bool resetChanged = TRUE ); |
@@ -1064,12 +1070,13 @@ private: | |||
1064 | 1070 | ||
1065 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | 1071 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1066 | 1072 | ||
1067 | struct Q_EXPORT QTextParagraphSelection | 1073 | struct Q_EXPORT QTextParagraphSelection |
1068 | { | 1074 | { |
1069 | int start, end; | 1075 | int start, end; |
1076 | Q_DUMMY_COMPARISON_OPERATOR(QTextParagraphSelection) | ||
1070 | }; | 1077 | }; |
1071 | 1078 | ||
1072 | struct Q_EXPORT QTextLineStart | 1079 | struct Q_EXPORT QTextLineStart |
1073 | { | 1080 | { |
1074 | QTextLineStart() : y( 0 ), baseLine( 0 ), h( 0 ) | 1081 | QTextLineStart() : y( 0 ), baseLine( 0 ), h( 0 ) |
1075 | #ifndef QT_NO_COMPLEXTEXT | 1082 | #ifndef QT_NO_COMPLEXTEXT |
@@ -1133,29 +1140,21 @@ class Q_EXPORT QTextParagraphData | |||
1133 | public: | 1140 | public: |
1134 | QTextParagraphData() {} | 1141 | QTextParagraphData() {} |
1135 | virtual ~QTextParagraphData(); | 1142 | virtual ~QTextParagraphData(); |
1136 | virtual void join( QTextParagraphData * ); | 1143 | virtual void join( QTextParagraphData * ); |
1137 | }; | 1144 | }; |
1138 | 1145 | ||
1139 | class Q_EXPORT QTextParagraphPseudoDocument | 1146 | class QTextParagraphPseudoDocument; |
1140 | { | 1147 | |
1141 | public: | 1148 | class QSyntaxHighlighter; |
1142 | QTextParagraphPseudoDocument(); | ||
1143 | ~QTextParagraphPseudoDocument(); | ||
1144 | QRect docRect; | ||
1145 | QTextFormatter *pFormatter; | ||
1146 | QTextCommandHistory *commandHistory; | ||
1147 | int minw; | ||
1148 | int wused; | ||
1149 | }; | ||
1150 | 1149 | ||
1151 | //nase | ||
1152 | class Q_EXPORT QTextParagraph | 1150 | class Q_EXPORT QTextParagraph |
1153 | { | 1151 | { |
1154 | friend class QTextDocument; | 1152 | friend class QTextDocument; |
1155 | friend class QTextCursor; | 1153 | friend class QTextCursor; |
1154 | friend class QSyntaxHighlighter; | ||
1156 | 1155 | ||
1157 | public: | 1156 | public: |
1158 | QTextParagraph( QTextDocument *d, QTextParagraph *pr = 0, QTextParagraph *nx = 0, bool updateIds = TRUE ); | 1157 | QTextParagraph( QTextDocument *d, QTextParagraph *pr = 0, QTextParagraph *nx = 0, bool updateIds = TRUE ); |
1159 | virtual ~QTextParagraph(); | 1158 | virtual ~QTextParagraph(); |
1160 | 1159 | ||
1161 | QTextString *string() const; | 1160 | QTextString *string() const; |
@@ -1173,13 +1172,19 @@ public: | |||
1173 | void setListDepth( int depth ); | 1172 | void setListDepth( int depth ); |
1174 | int listDepth() const { return ldepth; } | 1173 | int listDepth() const { return ldepth; } |
1175 | 1174 | ||
1176 | // void setFormat( QTextFormat *fm ); | 1175 | // void setFormat( QTextFormat *fm ); |
1177 | // QTextFormat *paragFormat() const; | 1176 | // QTextFormat *paragFormat() const; |
1178 | 1177 | ||
1178 | #if defined(Q_STRICT_INLINING_RULES) | ||
1179 | // This is for the IRIX MIPSpro o32 ABI - it fails, claiming the | ||
1180 | // implementation to be a redefinition. | ||
1181 | inline QTextDocument *document() const; | ||
1182 | #else | ||
1179 | QTextDocument *document() const; | 1183 | QTextDocument *document() const; |
1184 | #endif | ||
1180 | QTextParagraphPseudoDocument *pseudoDocument() const; | 1185 | QTextParagraphPseudoDocument *pseudoDocument() const; |
1181 | 1186 | ||
1182 | QRect rect() const; | 1187 | QRect rect() const; |
1183 | void setHeight( int h ) { r.setHeight( h ); } | 1188 | void setHeight( int h ) { r.setHeight( h ); } |
1184 | void show(); | 1189 | void show(); |
1185 | void hide(); | 1190 | void hide(); |
@@ -1593,13 +1598,12 @@ public: | |||
1593 | virtual QTextFormat *format( const QFont &f, const QColor &c ); | 1598 | virtual QTextFormat *format( const QFont &f, const QColor &c ); |
1594 | virtual void remove( QTextFormat *f ); | 1599 | virtual void remove( QTextFormat *f ); |
1595 | virtual QTextFormat *createFormat( const QTextFormat &f ) { return new QTextFormat( f ); } | 1600 | virtual QTextFormat *createFormat( const QTextFormat &f ) { return new QTextFormat( f ); } |
1596 | virtual QTextFormat *createFormat( const QFont &f, const QColor &c ) { return new QTextFormat( f, c, this ); } | 1601 | virtual QTextFormat *createFormat( const QFont &f, const QColor &c ) { return new QTextFormat( f, c, this ); } |
1597 | 1602 | ||
1598 | void updateDefaultFormat( const QFont &font, const QColor &c, QStyleSheet *sheet ); | 1603 | void updateDefaultFormat( const QFont &font, const QColor &c, QStyleSheet *sheet ); |
1599 | QDict<QTextFormat> dict() const { return cKey; } | ||
1600 | 1604 | ||
1601 | QPaintDevice *paintDevice() const { return paintdevice; } | 1605 | QPaintDevice *paintDevice() const { return paintdevice; } |
1602 | void setPaintDevice( QPaintDevice * ); | 1606 | void setPaintDevice( QPaintDevice * ); |
1603 | 1607 | ||
1604 | private: | 1608 | private: |
1605 | void updateKeys(); | 1609 | void updateKeys(); |
@@ -1613,12 +1617,25 @@ private: | |||
1613 | QString kof, knf; | 1617 | QString kof, knf; |
1614 | int cflags; | 1618 | int cflags; |
1615 | 1619 | ||
1616 | QPaintDevice *paintdevice; | 1620 | QPaintDevice *paintdevice; |
1617 | }; | 1621 | }; |
1618 | 1622 | ||
1623 | class Q_EXPORT QTextParagraphPseudoDocument | ||
1624 | { | ||
1625 | public: | ||
1626 | QTextParagraphPseudoDocument(); | ||
1627 | ~QTextParagraphPseudoDocument(); | ||
1628 | QRect docRect; | ||
1629 | QTextFormatter *pFormatter; | ||
1630 | QTextCommandHistory *commandHistory; | ||
1631 | int minw; | ||
1632 | int wused; | ||
1633 | QTextFormatCollection collection; | ||
1634 | }; | ||
1635 | |||
1619 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | 1636 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1620 | 1637 | ||
1621 | inline int QTextString::length() const | 1638 | inline int QTextString::length() const |
1622 | { | 1639 | { |
1623 | return data.size(); | 1640 | return data.size(); |
1624 | } | 1641 | } |
@@ -1825,12 +1842,18 @@ inline void QTextDocument::setFlow( QTextFlow *f ) | |||
1825 | 1842 | ||
1826 | inline void QTextDocument::takeFlow() | 1843 | inline void QTextDocument::takeFlow() |
1827 | { | 1844 | { |
1828 | flow_ = 0; | 1845 | flow_ = 0; |
1829 | } | 1846 | } |
1830 | 1847 | ||
1848 | inline bool QTextDocument::useDoubleBuffer( QTextParagraph *parag, QPainter *p ) | ||
1849 | { | ||
1850 | return ( !parag->document()->parent() || parag->document()->nextDoubleBuffered ) && | ||
1851 | ( !p || !p->device() || p->device()->devType() != QInternal::Printer ); | ||
1852 | } | ||
1853 | |||
1831 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | 1854 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
1832 | 1855 | ||
1833 | inline QColor QTextFormat::color() const | 1856 | inline QColor QTextFormat::color() const |
1834 | { | 1857 | { |
1835 | return col; | 1858 | return col; |
1836 | } | 1859 | } |