Eneboo - Documentación para desarrolladores
|
00001 /**************************************************************************** 00002 ** $Id: qt/qtextedit.h 3.3.8 edited Jan 11 14:39 $ 00003 ** 00004 ** Definition of the QTextEdit class 00005 ** 00006 ** Created : 990101 00007 ** 00008 ** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved. 00009 ** 00010 ** This file is part of the widgets module of the Qt GUI Toolkit. 00011 ** 00012 ** This file may be distributed under the terms of the Q Public License 00013 ** as defined by Trolltech ASA of Norway and appearing in the file 00014 ** LICENSE.QPL included in the packaging of this file. 00015 ** 00016 ** This file may be distributed and/or modified under the terms of the 00017 ** GNU General Public License version 2 as published by the Free Software 00018 ** Foundation and appearing in the file LICENSE.GPL included in the 00019 ** packaging of this file. 00020 ** 00021 ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition 00022 ** licenses may use this file in accordance with the Qt Commercial License 00023 ** Agreement provided with the Software. 00024 ** 00025 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00026 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00027 ** 00028 ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for 00029 ** information about Qt Commercial License Agreements. 00030 ** See http://www.trolltech.com/qpl/ for QPL licensing information. 00031 ** See http://www.trolltech.com/gpl/ for GPL licensing information. 00032 ** 00033 ** Contact info@trolltech.com if any conditions of this licensing are 00034 ** not clear to you. 00035 ** 00036 **********************************************************************/ 00037 00038 #ifndef QTEXTEDIT_H 00039 #define QTEXTEDIT_H 00040 00041 #ifndef QT_H 00042 #include "qscrollview.h" 00043 #include "qstylesheet.h" 00044 #include "qptrvector.h" 00045 #include "qvaluelist.h" 00046 #include "qptrlist.h" 00047 #endif // QT_H 00048 00049 #ifndef QT_NO_TEXTEDIT 00050 // uncomment below to enable optimization mode - also uncomment the 00051 // optimDoAutoScroll() private slot since moc ignores #ifdefs.. 00052 #define QT_TEXTEDIT_OPTIMIZATION 00053 00054 class QPainter; 00055 class QTextDocument; 00056 class QTextCursor; 00057 class QKeyEvent; 00058 class QResizeEvent; 00059 class QMouseEvent; 00060 class QTimer; 00061 class QTextString; 00062 class QTextCommand; 00063 class QTextParagraph; 00064 class QTextFormat; 00065 class QFont; 00066 class QColor; 00067 class QTextEdit; 00068 class QTextBrowser; 00069 class QTextString; 00070 struct QUndoRedoInfoPrivate; 00071 class QPopupMenu; 00072 class QTextEditPrivate; 00073 class QSyntaxHighlighter; 00074 00075 #ifdef QT_TEXTEDIT_OPTIMIZATION 00076 class QTextEditOptimPrivate 00077 { 00078 public: 00079 // Note: no left-tag has any value for leftTag or parent, and 00080 // no right-tag has any formatting flags set. 00081 enum TagType { Color = 0, Format = 1 }; 00082 struct Tag { 00083 TagType type:2; 00084 bool bold:1; 00085 bool italic:1; 00086 bool underline:1; 00087 int line; 00088 int index; 00089 Tag * leftTag; // ptr to left-tag in a left-right tag pair 00090 Tag * parent; // ptr to parent left-tag in a nested tag 00091 Tag * prev; 00092 Tag * next; 00093 QString tag; 00094 }; 00095 QTextEditOptimPrivate() 00096 { 00097 len = numLines = maxLineWidth = 0; 00098 selStart.line = selStart.index = -1; 00099 selEnd.line = selEnd.index = -1; 00100 search.line = search.index = 0; 00101 tags = lastTag = 0; 00102 } 00103 void clearTags() 00104 { 00105 Tag * itr = tags; 00106 while ( tags ) { 00107 itr = tags; 00108 tags = tags->next; 00109 delete itr; 00110 } 00111 tags = lastTag = 0; 00112 tagIndex.clear(); 00113 } 00114 ~QTextEditOptimPrivate() 00115 { 00116 clearTags(); 00117 } 00118 int len; 00119 int numLines; 00120 int maxLineWidth; 00121 struct Selection { 00122 int line; 00123 int index; 00124 }; 00125 Selection selStart, selEnd, search; 00126 Tag * tags, * lastTag; 00127 QMap<int, QString> lines; 00128 QMap<int, Tag *> tagIndex; 00129 }; 00130 #endif 00131 00132 class Q_EXPORT QTextEdit : public QScrollView 00133 { 00134 friend class QTextBrowser; 00135 friend class QSyntaxHighlighter; 00136 00137 Q_OBJECT 00138 Q_ENUMS( WordWrap WrapPolicy ) 00139 Q_SETS( AutoFormatting ) 00140 Q_PROPERTY( TextFormat textFormat READ textFormat WRITE setTextFormat ) 00141 Q_PROPERTY( QString text READ text WRITE setText ) 00142 Q_PROPERTY( QBrush paper READ paper WRITE setPaper ) 00143 Q_PROPERTY( bool linkUnderline READ linkUnderline WRITE setLinkUnderline ) 00144 Q_PROPERTY( QString documentTitle READ documentTitle ) 00145 Q_PROPERTY( int length READ length ) 00146 Q_PROPERTY( WordWrap wordWrap READ wordWrap WRITE setWordWrap ) 00147 Q_PROPERTY( int wrapColumnOrWidth READ wrapColumnOrWidth WRITE setWrapColumnOrWidth ) 00148 Q_PROPERTY( WrapPolicy wrapPolicy READ wrapPolicy WRITE setWrapPolicy ) 00149 Q_PROPERTY( bool hasSelectedText READ hasSelectedText ) 00150 Q_PROPERTY( QString selectedText READ selectedText ) 00151 Q_PROPERTY( int undoDepth READ undoDepth WRITE setUndoDepth ) 00152 Q_PROPERTY( bool overwriteMode READ isOverwriteMode WRITE setOverwriteMode ) 00153 Q_PROPERTY( bool modified READ isModified WRITE setModified DESIGNABLE false ) 00154 Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly ) 00155 Q_PROPERTY( bool undoRedoEnabled READ isUndoRedoEnabled WRITE setUndoRedoEnabled ) 00156 Q_PROPERTY( int tabStopWidth READ tabStopWidth WRITE setTabStopWidth ) 00157 Q_PROPERTY( bool tabChangesFocus READ tabChangesFocus WRITE setTabChangesFocus ) 00158 Q_PROPERTY( AutoFormatting autoFormatting READ autoFormatting WRITE setAutoFormatting ) 00159 00160 public: 00161 enum WordWrap { 00162 NoWrap, 00163 WidgetWidth, 00164 FixedPixelWidth, 00165 FixedColumnWidth 00166 }; 00167 00168 enum WrapPolicy { 00169 AtWordBoundary, 00170 AtWhiteSpace = AtWordBoundary, // AtWhiteSpace is deprecated 00171 Anywhere, 00172 AtWordOrDocumentBoundary 00173 }; 00174 00175 enum AutoFormatting { 00176 AutoNone = 0, 00177 AutoBulletList = 0x00000001, 00178 AutoAll = 0xffffffff 00179 }; 00180 00181 enum KeyboardAction { 00182 ActionBackspace, 00183 ActionDelete, 00184 ActionReturn, 00185 ActionKill, 00186 ActionWordBackspace, 00187 ActionWordDelete 00188 }; 00189 00190 enum CursorAction { 00191 MoveBackward, 00192 MoveForward, 00193 MoveWordBackward, 00194 MoveWordForward, 00195 MoveUp, 00196 MoveDown, 00197 MoveLineStart, 00198 MoveLineEnd, 00199 MoveHome, 00200 MoveEnd, 00201 MovePgUp, 00202 MovePgDown 00203 }; 00204 00205 enum VerticalAlignment { 00206 AlignNormal, 00207 AlignSuperScript, 00208 AlignSubScript 00209 }; 00210 00211 enum TextInsertionFlags { 00212 RedoIndentation = 0x0001, 00213 CheckNewLines = 0x0002, 00214 RemoveSelected = 0x0004 00215 }; 00216 00217 QTextEdit( const QString& text, const QString& context = QString::null, 00218 QWidget* parent=0, const char* name=0); 00219 QTextEdit( QWidget* parent=0, const char* name=0 ); 00220 virtual ~QTextEdit(); 00221 void setPalette( const QPalette & ); 00222 00223 QString text() const; 00224 QString text( int para ) const; 00225 TextFormat textFormat() const; 00226 QString context() const; 00227 QString documentTitle() const; 00228 00229 void getSelection( int *paraFrom, int *indexFrom, 00230 int *paraTo, int *indexTo, int selNum = 0 ) const; 00231 virtual bool find( const QString &expr, bool cs, bool wo, bool forward = TRUE, 00232 int *para = 0, int *index = 0 ); 00233 00234 int paragraphs() const; 00235 int lines() const; 00236 int linesOfParagraph( int para ) const; 00237 int lineOfChar( int para, int chr ); 00238 int length() const; 00239 QRect paragraphRect( int para ) const; 00240 int paragraphAt( const QPoint &pos ) const; 00241 int charAt( const QPoint &pos, int *para ) const; 00242 int paragraphLength( int para ) const; 00243 00244 QStyleSheet* styleSheet() const; 00245 #ifndef QT_NO_MIME 00246 QMimeSourceFactory* mimeSourceFactory() const; 00247 #endif 00248 QBrush paper() const; 00249 bool linkUnderline() const; 00250 00251 int heightForWidth( int w ) const; 00252 00253 bool hasSelectedText() const; 00254 QString selectedText() const; 00255 bool isUndoAvailable() const; 00256 bool isRedoAvailable() const; 00257 00258 WordWrap wordWrap() const; 00259 int wrapColumnOrWidth() const; 00260 WrapPolicy wrapPolicy() const; 00261 00262 int tabStopWidth() const; 00263 00264 QString anchorAt( const QPoint& pos ); 00265 QString anchorAt( const QPoint& pos, AnchorAttribute a ); 00266 00267 QSize sizeHint() const; 00268 00269 bool isReadOnly() const { return readonly; } 00270 00271 void getCursorPosition( int *parag, int *index ) const; 00272 00273 bool isModified() const; 00274 bool italic() const; 00275 bool bold() const; 00276 bool underline() const; 00277 QString family() const; 00278 int pointSize() const; 00279 QColor color() const; 00280 QFont font() const; 00281 QFont currentFont() const; 00282 int alignment() const; 00283 int undoDepth() const; 00284 00285 // do not use, will go away 00286 virtual bool getFormat( int para, int index, QFont *font, QColor *color, VerticalAlignment *verticalAlignment ); 00287 // do not use, will go away 00288 virtual bool getParagraphFormat( int para, QFont *font, QColor *color, 00289 VerticalAlignment *verticalAlignment, int *alignment, 00290 QStyleSheetItem::DisplayMode *displayMode, 00291 QStyleSheetItem::ListStyle *listStyle, 00292 int *listDepth ); 00293 00294 00295 bool isOverwriteMode() const { return overWrite; } 00296 QColor paragraphBackgroundColor( int para ) const; 00297 00298 bool isUndoRedoEnabled() const; 00299 bool eventFilter( QObject *o, QEvent *e ); 00300 bool tabChangesFocus() const; 00301 00302 void setAutoFormatting( uint features ); 00303 uint autoFormatting() const; 00304 QSyntaxHighlighter *syntaxHighlighter() const; 00305 00306 public slots: 00307 void setEnabled( bool ); 00308 #ifndef QT_NO_MIME 00309 virtual void setMimeSourceFactory( QMimeSourceFactory* factory ); 00310 #endif 00311 virtual void setStyleSheet( QStyleSheet* styleSheet ); 00312 virtual void scrollToAnchor( const QString& name ); 00313 virtual void setPaper( const QBrush& pap ); 00314 virtual void setLinkUnderline( bool ); 00315 00316 virtual void setWordWrap( WordWrap mode ); 00317 virtual void setWrapColumnOrWidth( int ); 00318 virtual void setWrapPolicy( WrapPolicy policy ); 00319 00320 virtual void copy(); 00321 virtual void append( const QString& text ); 00322 00323 void setText( const QString &txt ) { setText( txt, QString::null ); } 00324 virtual void setText( const QString &txt, const QString &context ); 00325 virtual void setTextFormat( TextFormat f ); 00326 00327 virtual void selectAll( bool select = TRUE ); 00328 virtual void setTabStopWidth( int ts ); 00329 virtual void zoomIn( int range ); 00330 virtual void zoomIn() { zoomIn( 1 ); } 00331 virtual void zoomOut( int range ); 00332 virtual void zoomOut() { zoomOut( 1 ); } 00333 virtual void zoomTo( int size ); 00334 00335 virtual void sync(); 00336 virtual void setReadOnly( bool b ); 00337 00338 virtual void undo(); 00339 virtual void redo(); 00340 virtual void cut(); 00341 virtual void paste(); 00342 #ifndef QT_NO_CLIPBOARD 00343 virtual void pasteSubType( const QCString &subtype ); 00344 #endif 00345 virtual void clear(); 00346 virtual void del(); 00347 virtual void indent(); 00348 virtual void setItalic( bool b ); 00349 virtual void setBold( bool b ); 00350 virtual void setUnderline( bool b ); 00351 virtual void setFamily( const QString &f ); 00352 virtual void setPointSize( int s ); 00353 virtual void setColor( const QColor &c ); 00354 virtual void setFont( const QFont &f ); 00355 virtual void setVerticalAlignment( VerticalAlignment a ); 00356 virtual void setAlignment( int a ); 00357 00358 // do not use, will go away 00359 virtual void setParagType( QStyleSheetItem::DisplayMode dm, QStyleSheetItem::ListStyle listStyle ); 00360 00361 virtual void setCursorPosition( int parag, int index ); 00362 virtual void setSelection( int parag_from, int index_from, int parag_to, int index_to, int selNum = 0 ); 00363 virtual void setSelectionAttributes( int selNum, const QColor &back, bool invertText ); 00364 virtual void setModified( bool m ); 00365 virtual void resetFormat(); 00366 virtual void setUndoDepth( int d ); 00367 virtual void setFormat( QTextFormat *f, int flags ); 00368 virtual void ensureCursorVisible(); 00369 virtual void placeCursor( const QPoint &pos, QTextCursor *c = 0 ); 00370 virtual void moveCursor( CursorAction action, bool select ); 00371 virtual void doKeyboardAction( KeyboardAction action ); 00372 virtual void removeSelectedText( int selNum = 0 ); 00373 virtual void removeSelection( int selNum = 0 ); 00374 virtual void setCurrentFont( const QFont &f ); 00375 virtual void setOverwriteMode( bool b ) { overWrite = b; } 00376 00377 virtual void scrollToBottom(); 00378 00379 void insert( const QString &text, uint insertionFlags = CheckNewLines | RemoveSelected ); // ## virtual in 4.0 00380 00381 // obsolete 00382 virtual void insert( const QString &text, bool, bool = TRUE, bool = TRUE ); 00383 00384 virtual void insertAt( const QString &text, int para, int index ); 00385 virtual void removeParagraph( int para ); 00386 virtual void insertParagraph( const QString &text, int para ); 00387 00388 virtual void setParagraphBackgroundColor( int para, const QColor &bg ); 00389 virtual void clearParagraphBackground( int para ); 00390 00391 virtual void setUndoRedoEnabled( bool b ); 00392 void setTabChangesFocus( bool b ); // ### make virtual in 4.0 00393 00394 #ifdef QT_TEXTEDIT_OPTIMIZATION 00395 void polish(); 00396 void setMaxLogLines( int numLines ); 00397 int maxLogLines(); 00398 #endif 00399 00400 signals: 00401 void textChanged(); 00402 void selectionChanged(); 00403 void copyAvailable( bool ); 00404 void undoAvailable( bool yes ); 00405 void redoAvailable( bool yes ); 00406 void currentFontChanged( const QFont &f ); 00407 void currentColorChanged( const QColor &c ); 00408 void currentAlignmentChanged( int a ); 00409 void currentVerticalAlignmentChanged( VerticalAlignment a ); 00410 void cursorPositionChanged( QTextCursor *c ); 00411 void cursorPositionChanged( int para, int pos ); 00412 void returnPressed(); 00413 void modificationChanged( bool m ); 00414 void clicked( int parag, int index ); 00415 void doubleClicked( int parag, int index ); 00416 00417 protected: 00418 void repaintChanged(); 00419 void updateStyles(); 00420 void drawContents( QPainter *p, int cx, int cy, int cw, int ch ); 00421 bool event( QEvent *e ); 00422 void keyPressEvent( QKeyEvent *e ); 00423 void resizeEvent( QResizeEvent *e ); 00424 void viewportResizeEvent( QResizeEvent* ); 00425 void contentsMousePressEvent( QMouseEvent *e ); 00426 void contentsMouseMoveEvent( QMouseEvent *e ); 00427 void contentsMouseReleaseEvent( QMouseEvent *e ); 00428 void contentsMouseDoubleClickEvent( QMouseEvent *e ); 00429 #ifndef QT_NO_WHEELEVENT 00430 void contentsWheelEvent( QWheelEvent *e ); 00431 #endif 00432 void imStartEvent( QIMEvent * ); 00433 void imComposeEvent( QIMEvent * ); 00434 void imEndEvent( QIMEvent * ); 00435 #ifndef QT_NO_DRAGANDDROP 00436 void contentsDragEnterEvent( QDragEnterEvent *e ); 00437 void contentsDragMoveEvent( QDragMoveEvent *e ); 00438 void contentsDragLeaveEvent( QDragLeaveEvent *e ); 00439 void contentsDropEvent( QDropEvent *e ); 00440 #endif 00441 void contentsContextMenuEvent( QContextMenuEvent *e ); 00442 bool focusNextPrevChild( bool next ); 00443 QTextDocument *document() const; 00444 QTextCursor *textCursor() const; 00445 void setDocument( QTextDocument *doc ); 00446 virtual QPopupMenu *createPopupMenu( const QPoint& pos ); 00447 virtual QPopupMenu *createPopupMenu(); 00448 void drawCursor( bool visible ); 00449 00450 void windowActivationChange( bool ); 00451 00452 protected slots: 00453 virtual void doChangeInterval(); 00454 void sliderReleased(); // ### make virtual in 4.0 00455 #if (QT_VERSION >= 0x040000) 00456 #error "Some functions need to be changed to virtual for Qt 4.0" 00457 #endif 00458 00459 private slots: 00460 void formatMore(); 00461 void doResize(); 00462 void autoScrollTimerDone(); 00463 void blinkCursor(); 00464 void setModified(); 00465 void startDrag(); 00466 void documentWidthChanged( int w ); 00467 void clipboardChanged(); 00468 00469 private: 00470 struct Q_EXPORT UndoRedoInfo { 00471 enum Type { Invalid, Insert, Delete, Backspace, Return, RemoveSelected, Format, Style, IME }; 00472 00473 UndoRedoInfo( QTextDocument *dc ); 00474 ~UndoRedoInfo(); 00475 void clear(); 00476 bool valid() const; 00477 00478 QUndoRedoInfoPrivate *d; 00479 int id; 00480 int index; 00481 int eid; 00482 int eindex; 00483 QTextFormat *format; 00484 int flags; 00485 Type type; 00486 QTextDocument *doc; 00487 QByteArray styleInformation; 00488 }; 00489 00490 private: 00491 void updateCursor( const QPoint & pos ); 00492 void handleMouseMove( const QPoint& pos ); 00493 void drawContents( QPainter * ); 00494 virtual bool linksEnabled() const { return FALSE; } 00495 void init(); 00496 void checkUndoRedoInfo( UndoRedoInfo::Type t ); 00497 void updateCurrentFormat(); 00498 bool handleReadOnlyKeyEvent( QKeyEvent *e ); 00499 void makeParagVisible( QTextParagraph *p ); 00500 void normalCopy(); 00501 void copyToClipboard(); 00502 #ifndef QT_NO_MIME 00503 QCString pickSpecial(QMimeSource* ms, bool always_ask, const QPoint&); 00504 QTextDrag *dragObject( QWidget *parent = 0 ) const; 00505 #endif 00506 #ifndef QT_NO_MIMECLIPBOARD 00507 void pasteSpecial(const QPoint&); 00508 #endif 00509 void setFontInternal( const QFont &f ); 00510 00511 virtual void emitHighlighted( const QString & ) {} 00512 virtual void emitLinkClicked( const QString & ) {} 00513 00514 void readFormats( QTextCursor &c1, QTextCursor &c2, QTextString &text, bool fillStyles = FALSE ); 00515 void clearUndoRedo(); 00516 void paintDocument( bool drawAll, QPainter *p, int cx = -1, int cy = -1, int cw = -1, int ch = -1 ); 00517 void moveCursor( CursorAction action ); 00518 void ensureFormatted( QTextParagraph *p ); 00519 void placeCursor( const QPoint &pos, QTextCursor *c, bool link ); 00520 void updateMicroFocusHint(); 00521 00522 #ifdef QT_TEXTEDIT_OPTIMIZATION 00523 bool checkOptimMode(); 00524 QString optimText() const; 00525 void optimSetText( const QString &str ); 00526 void optimAppend( const QString &str ); 00527 void optimInsert( const QString &str, int line, int index ); 00528 void optimDrawContents( QPainter * p, int cx, int cy, int cw, int ch ); 00529 void optimMousePressEvent( QMouseEvent * e ); 00530 void optimMouseReleaseEvent( QMouseEvent * e ); 00531 void optimMouseMoveEvent( QMouseEvent * e ); 00532 int optimCharIndex( const QString &str, int mx ) const; 00533 void optimSelectAll(); 00534 void optimRemoveSelection(); 00535 void optimSetSelection( int startLine, int startIdx, int endLine, 00536 int endIdx ); 00537 bool optimHasSelection() const; 00538 QString optimSelectedText() const; 00539 bool optimFind( const QString & str, bool, bool, bool, int *, int * ); 00540 void optimParseTags( QString * str, int lineNo = -1, int indexOffset = 0 ); 00541 QTextEditOptimPrivate::Tag * optimPreviousLeftTag( int line ); 00542 void optimSetTextFormat( QTextDocument *, QTextCursor *, QTextFormat * f, 00543 int, int, QTextEditOptimPrivate::Tag * t ); 00544 QTextEditOptimPrivate::Tag * optimAppendTag( int index, const QString & tag ); 00545 QTextEditOptimPrivate::Tag * optimInsertTag( int line, int index, const QString & tag ); 00546 void optimCheckLimit( const QString& str ); 00547 bool optimHasBoldMetrics( int line ); 00548 00549 private slots: 00550 void optimDoAutoScroll(); 00551 #endif // QT_TEXTEDIT_OPTIMIZATION 00552 00553 private: 00554 #ifndef QT_NO_CLIPBOARD 00555 void pasteSubType( const QCString &subtype, QMimeSource *m ); 00556 #endif 00557 00558 private: 00559 QTextDocument *doc; 00560 QTextCursor *cursor; 00561 QTimer *formatTimer, *scrollTimer, *changeIntervalTimer, *blinkTimer, *dragStartTimer; 00562 QTextParagraph *lastFormatted; 00563 int interval; 00564 UndoRedoInfo undoRedoInfo; 00565 QTextFormat *currentFormat; 00566 int currentAlignment; 00567 QPoint oldMousePos, mousePos; 00568 QPoint dragStartPos; 00569 QString onLink; 00570 WordWrap wrapMode; 00571 WrapPolicy wPolicy; 00572 int wrapWidth; 00573 QString pressedLink; 00574 QTextEditPrivate *d; 00575 bool inDoubleClick : 1; 00576 bool mousePressed : 1; 00577 bool cursorVisible : 1; 00578 bool blinkCursorVisible : 1; 00579 bool readOnly : 1; 00580 bool modified : 1; 00581 bool mightStartDrag : 1; 00582 bool inDnD : 1; 00583 bool readonly : 1; 00584 bool undoEnabled : 1; 00585 bool overWrite : 1; 00586 00587 private: // Disabled copy constructor and operator= 00588 #if defined(Q_DISABLE_COPY) 00589 QTextEdit( const QTextEdit & ); 00590 QTextEdit &operator=( const QTextEdit & ); 00591 #endif 00592 }; 00593 00594 inline QTextDocument *QTextEdit::document() const 00595 { 00596 return doc; 00597 } 00598 00599 inline QTextCursor *QTextEdit::textCursor() const 00600 { 00601 return cursor; 00602 } 00603 00604 inline void QTextEdit::setCurrentFont( const QFont &f ) 00605 { 00606 QTextEdit::setFontInternal( f ); 00607 } 00608 00609 #endif //QT_NO_TEXTEDIT 00610 #endif //QTEXTVIEW_H