#include </home/clem/local/src/opie/noncore/apps/opie-write/qtextedit.h>
Collaboration diagram for Qt3::QTextEdit:

Public Types | |
| enum | WordWrap { NoWrap, WidgetWidth, FixedPixelWidth, FixedColumnWidth } |
| enum | WrapPolicy { AtWordBoundary, Anywhere, AtWhiteSpace = AtWordBoundary } |
| enum | KeyboardAction { ActionBackspace, ActionDelete, ActionReturn, ActionKill } |
| enum | CursorAction { MoveBackward, MoveForward, MoveWordBackward, MoveWordForward, MoveUp, MoveDown, MoveLineStart, MoveLineEnd, MoveHome, MoveEnd, MovePgUp, MovePgDown } |
| enum | VerticalAlignment { AlignNormal, AlignSuperScript, AlignSubScript } |
Public Slots | |
| void | setEnabled (bool) |
| virtual void | setMimeSourceFactory (QMimeSourceFactory *factory) |
| virtual void | setStyleSheet (QStyleSheet *styleSheet) |
| virtual void | scrollToAnchor (const QString &name) |
| virtual void | setPaper (const QBrush &pap) |
| virtual void | setLinkUnderline (bool) |
| virtual void | setWordWrap (WordWrap mode) |
| virtual void | setWrapColumnOrWidth (int) |
| virtual void | setWrapPolicy (WrapPolicy policy) |
| virtual void | copy () |
| virtual void | append (const QString &text) |
| void | setText (const QString &txt) |
| virtual void | setText (const QString &txt, const QString &context) |
| virtual void | setTextFormat (TextFormat f) |
| virtual void | selectAll (bool select=TRUE) |
| virtual void | setTabStopWidth (int ts) |
| virtual void | zoomIn (int range) |
| virtual void | zoomIn () |
| virtual void | zoomOut (int range) |
| virtual void | zoomOut () |
| virtual void | zoomTo (int size) |
| virtual void | sync () |
| virtual void | setReadOnly (bool b) |
| virtual void | undo () |
| virtual void | redo () |
| virtual void | cut () |
| virtual void | paste () |
| virtual void | pasteSubType (const QCString &subtype) |
| virtual void | clear () |
| virtual void | del () |
| virtual void | indent () |
| virtual void | setItalic (bool b) |
| virtual void | setBold (bool b) |
| virtual void | setUnderline (bool b) |
| virtual void | setFamily (const QString &f) |
| virtual void | setPointSize (int s) |
| virtual void | setColor (const QColor &c) |
| virtual void | setFont (const QFont &f) |
| virtual void | setVerticalAlignment (VerticalAlignment a) |
| virtual void | setAlignment (int a) |
| virtual void | setParagType (QStyleSheetItem::DisplayMode dm, QStyleSheetItem::ListStyle listStyle) |
| virtual void | setCursorPosition (int parag, int index) |
| virtual void | setSelection (int parag_from, int index_from, int parag_to, int index_to, int selNum=0) |
| virtual void | setSelectionAttributes (int selNum, const QColor &back, bool invertText) |
| virtual void | setModified (bool m) |
| virtual void | resetFormat () |
| virtual void | setUndoDepth (int d) |
| virtual void | setFormat (QTextFormat *f, int flags) |
| virtual void | ensureCursorVisible () |
| virtual void | placeCursor (const QPoint &pos, QTextCursor *c=0) |
| virtual void | moveCursor (CursorAction action, bool select) |
| virtual void | doKeyboardAction (KeyboardAction action) |
| virtual void | removeSelectedText (int selNum=0) |
| virtual void | removeSelection (int selNum=0) |
| virtual void | setCurrentFont (const QFont &f) |
| virtual void | setOverwriteMode (bool b) |
| virtual void | scrollToBottom () |
| virtual void | insert (const QString &text, bool indent, bool checkNewLine, bool removeSelected) |
| virtual void | insertAt (const QString &text, int para, int index) |
| virtual void | removeParagraph (int para) |
| virtual void | insertParagraph (const QString &text, int para) |
| virtual void | setParagraphBackgroundColor (int para, const QColor &bg) |
| virtual void | clearParagraphBackground (int para) |
| virtual void | setUndoRedoEnabled (bool b) |
Signals | |
| void | textChanged () |
| void | selectionChanged () |
| void | copyAvailable (bool) |
| void | undoAvailable (bool yes) |
| void | redoAvailable (bool yes) |
| void | currentFontChanged (const QFont &f) |
| void | currentColorChanged (const QColor &c) |
| void | currentAlignmentChanged (int a) |
| void | currentVerticalAlignmentChanged (VerticalAlignment a) |
| void | cursorPositionChanged (QTextCursor *c) |
| void | cursorPositionChanged (int para, int pos) |
| void | returnPressed () |
| void | modificationChanged (bool m) |
Public Member Functions | |
| QTextEdit (const QString &text, const QString &context=QString::null, QWidget *parent=0, const char *name=0) | |
| QTextEdit (QWidget *parent=0, const char *name=0) | |
| virtual | ~QTextEdit () |
| void | setPalette (const QPalette &) |
| QString | text () const |
| QString | text (int para) const |
| TextFormat | textFormat () const |
| QString | context () const |
| QString | documentTitle () const |
| void | getSelection (int *paraFrom, int *indexFrom, int *paraTo, int *indexTo, int selNum=0) const |
| virtual bool | find (const QString &expr, bool cs, bool wo, bool forward=TRUE, int *para=0, int *index=0) |
| int | paragraphs () const |
| int | lines () const |
| int | linesOfParagraph (int para) const |
| int | lineOfChar (int para, int chr) |
| int | length () const |
| QRect | paragraphRect (int para) const |
| int | paragraphAt (const QPoint &pos) const |
| int | charAt (const QPoint &pos, int *para) const |
| int | paragraphLength (int para) const |
| QStyleSheet * | styleSheet () const |
| QMimeSourceFactory * | mimeSourceFactory () const |
| QBrush | paper () const |
| bool | linkUnderline () const |
| int | heightForWidth (int w) const |
| bool | hasSelectedText () const |
| QString | selectedText () const |
| bool | isUndoAvailable () const |
| bool | isRedoAvailable () const |
| WordWrap | wordWrap () const |
| int | wrapColumnOrWidth () const |
| WrapPolicy | wrapPolicy () const |
| int | tabStopWidth () const |
| QString | anchorAt (const QPoint &pos) |
| QSize | sizeHint () const |
| bool | isReadOnly () const |
| void | getCursorPosition (int *parag, int *index) const |
| bool | isModified () const |
| bool | italic () const |
| bool | bold () const |
| bool | underline () const |
| QString | family () const |
| int | pointSize () const |
| QColor | color () const |
| QFont | font () const |
| int | alignment () const |
| int | undoDepth () const |
| virtual bool | getFormat (int para, int index, QFont *font, QColor *color, VerticalAlignment *verticalAlignment) |
| virtual bool | getParagraphFormat (int para, QFont *font, QColor *color, VerticalAlignment *verticalAlignment, int *alignment, QStyleSheetItem::DisplayMode *displayMode, QStyleSheetItem::ListStyle *listStyle, int *listDepth) |
| bool | isOverwriteMode () const |
| QColor | paragraphBackgroundColor (int para) const |
| bool | isUndoRedoEnabled () const |
| bool | eventFilter (QObject *o, QEvent *e) |
Protected Slots | |
| virtual void | doChangeInterval () |
Protected Member Functions | |
| void | repaintChanged () |
| void | updateStyles () |
| void | drawContents (QPainter *p, int cx, int cy, int cw, int ch) |
| bool | event (QEvent *e) |
| void | keyPressEvent (QKeyEvent *e) |
| void | resizeEvent (QResizeEvent *e) |
| void | viewportResizeEvent (QResizeEvent *) |
| void | contentsMousePressEvent (QMouseEvent *e) |
| void | contentsMouseMoveEvent (QMouseEvent *e) |
| void | contentsMouseReleaseEvent (QMouseEvent *e) |
| void | contentsMouseDoubleClickEvent (QMouseEvent *e) |
| void | contentsWheelEvent (QWheelEvent *e) |
| void | contentsDragEnterEvent (QDragEnterEvent *e) |
| void | contentsDragMoveEvent (QDragMoveEvent *e) |
| void | contentsDragLeaveEvent (QDragLeaveEvent *e) |
| void | contentsDropEvent (QDropEvent *e) |
| bool | focusNextPrevChild (bool next) |
| QTextDocument * | document () const |
| QTextCursor * | textCursor () const |
| void | setDocument (QTextDocument *doc) |
| virtual QPopupMenu * | createPopupMenu (const QPoint &pos) |
| virtual QPopupMenu * | createPopupMenu () |
| void | drawCursor (bool visible) |
| void | windowActivationChange (bool) |
Properties | |
| TextFormat | textFormat |
| the text format: rich text, plain text or auto text | |
| QString | text |
| the text edit's text | |
| QBrush | paper |
| the background (paper) brush. | |
| bool | linkUnderline |
| whether hypertext links will be underlined | |
| QString | documentTitle |
| the title of the document parsed from the text. | |
| int | length |
| the number of characters in the text | |
| WordWrap | wordWrap |
| the word wrap mode | |
| int | wrapColumnOrWidth |
| the position (in pixels or columns depending on the wrap mode) where text will be wrapped | |
| WrapPolicy | wrapPolicy |
| the word wrap policy, at whitespace or anywhere | |
| bool | hasSelectedText |
| whether some text is selected in selection 0 | |
| QString | selectedText |
| The selected text (from selection 0) or an empty string if there is no currently selected text (in selection 0). | |
| int | undoDepth |
| the depth of the undo history | |
| bool | overwriteMode |
| the text edit's overwrite mode | |
| bool | modified |
| whether the document has been modified by the user | |
| bool | readOnly |
| whether the text edit is read-only | |
| bool | undoRedoEnabled |
| whether undo/redo is enabled | |
| int | tabStopWidth |
| the tab stop width in pixels | |
Private Slots | |
| void | formatMore () |
| void | doResize () |
| void | autoScrollTimerDone () |
| void | blinkCursor () |
| void | setModified () |
| void | startDrag () |
| void | documentWidthChanged (int w) |
Private Member Functions | |
| void | updateCursor (const QPoint &pos) |
| void | handleMouseMove (const QPoint &pos) |
| void | drawContents (QPainter *) |
| virtual bool | linksEnabled () const |
| void | init () |
| void | checkUndoRedoInfo (UndoRedoInfo::Type t) |
| void | updateCurrentFormat () |
| bool | handleReadOnlyKeyEvent (QKeyEvent *e) |
| void | makeParagVisible (QTextParagraph *p) |
| QCString | pickSpecial (QMimeSource *ms, bool always_ask, const QPoint &) |
| void | pasteSpecial (const QPoint &) |
| void | setFontInternal (const QFont &f) |
| virtual void | emitHighlighted (const QString &) |
| virtual void | emitLinkClicked (const QString &) |
| void | readFormats (QTextCursor &c1, QTextCursor &c2, QTextString &text, bool fillStyles=FALSE) |
| void | clearUndoRedo () |
| void | paintDocument (bool drawAll, QPainter *p, int cx=-1, int cy=-1, int cw=-1, int ch=-1) |
| void | moveCursor (CursorAction action) |
| void | ensureFormatted (QTextParagraph *p) |
| void | placeCursor (const QPoint &pos, QTextCursor *c, bool link) |
| void | updateMicroFocusHint () |
Private Attributes | |
| QTextDocument * | doc |
| QTextCursor * | cursor |
| QTimer * | formatTimer |
| QTimer * | scrollTimer |
| QTimer * | changeIntervalTimer |
| QTimer * | blinkTimer |
| QTimer * | dragStartTimer |
| QTextParagraph * | lastFormatted |
| int | interval |
| UndoRedoInfo | undoRedoInfo |
| QTextFormat * | currentFormat |
| int | currentAlignment |
| QPoint | oldMousePos |
| QPoint | mousePos |
| QPoint | dragStartPos |
| QString | onLink |
| WordWrap | wrapMode |
| WrapPolicy | wPolicy |
| int | wrapWidth |
| QString | pressedLink |
| QTextEditPrivate * | d |
| bool | inDoubleClick: 1 |
| bool | mousePressed: 1 |
| bool | cursorVisible: 1 |
| bool | blinkCursorVisible: 1 |
| bool | mightStartDrag: 1 |
| bool | inDnD: 1 |
| bool | readonly: 1 |
| bool | undoEnabled: 1 |
| bool | overWrite: 1 |
Friends | |
| class | QTextBrowser |
Classes | |
| struct | UndoRedoInfo |
|
|
Definition at line 116 of file qtextedit.h. |
|
|
Definition at line 109 of file qtextedit.h. |
|
|
Definition at line 131 of file qtextedit.h. |
|
|
Definition at line 96 of file qtextedit.h. |
|
|
Definition at line 103 of file qtextedit.h. |
|
||||||||||||||||||||
|
Constructs a QTextEdit with parent parent and name name. The text edit will display the text text using context context. The context is a path which the text edit's QMimeSourceFactory uses to resolve the locations of files and images. It is passed to the mimeSourceFactory() when quering data.
For example if the text contains an image tag,
{
{Target}, would resolve to "path/to/look/in/target.html".
Definition at line 653 of file qtextedit.cpp. |
|
||||||||||||
|
Constructs an empty QTextEdit with parent parent and name name. Definition at line 625 of file qtextedit.cpp. References init(). |
|
|
Definition at line 664 of file qtextedit.cpp. References cursor, d, Qt3::QTextEdit::UndoRedoInfo::d, doc, and undoRedoInfo. |
|
|
Returns the alignment of the current paragraph.
Definition at line 3253 of file qtextedit.cpp. References currentAlignment. |
|
|
If there is an anchor at position pos (in contents coordinates), its name is returned, otherwise an empty string is returned. Definition at line 3671 of file qtextedit.cpp. References Qt3::QTextCursor::index(), Qt3::QTextCursor::paragraph(), and placeCursor(). |
|
|
Appends the text text to the end of the text edit. Note that the undo/redo history is cleared by this function. Definition at line 3472 of file qtextedit.cpp. References Qt3::QTextEdit::UndoRedoInfo::clear(), currentFormat, cursor, cursorVisible, drawCursor(), ensureFormatted(), f, FALSE, Qt3::QTextFormat::Format, formatMore(), Qt3::QTextCursor::gotoEnd(), Qt3::QTextCursor::index(), Qt3::QTextCursor::insert(), isReadOnly(), Qt3::QStyleSheet::mightBeRichText(), Qt3::QTextCursor::paragraph(), Qt::PlainText, repaintChanged(), scrollToBottom(), setModified(), Qt3::QTextCursor::splitAndInsertEmptyParagraph(), Qt3::QTextDocument::Standard, Qt3::QTextDocument::Temp, textChanged(), TRUE, and undoRedoInfo. Referenced by insertParagraph(). |
|
|
Definition at line 1877 of file qtextedit.cpp. References handleMouseMove(), mousePressed, and pos. Referenced by init(). |
|
|
Definition at line 2898 of file qtextedit.cpp. References blinkCursorVisible, cursorVisible, and drawCursor(). Referenced by init(). |
|
|
Returns TRUE if the current format is bold; otherwise returns FALSE.
Definition at line 3184 of file qtextedit.cpp. References currentFormat, and Qt3::QTextFormat::font(). |
|
||||||||||||
|
Returns the index of the character (relative to its paragraph) at position pos (in contents coordinates). If para is not null, *para is set to this paragraph. If there is no character at pos, -1 is returned. Definition at line 4450 of file qtextedit.cpp. References Qt3::QTextCursor::index(), Qt3::QTextCursor::paragraph(), and Qt3::QTextCursor::place(). |
|
|
Definition at line 2325 of file qtextedit.cpp. References clearUndoRedo(), Qt3::QTextEdit::UndoRedoInfo::type, undoRedoInfo, and Qt3::QTextEdit::UndoRedoInfo::valid(). Referenced by doKeyboardAction(), insert(), pasteSubType(), and removeSelectedText(). |
|
|
Deletes all the text in the text edit.
Definition at line 4031 of file qtextedit.cpp. References cursor, cursorPositionChanged(), Qt3::QTextCursor::index(), Qt3::QTextCursor::isValid(), lastFormatted, Qt3::QTextCursor::paragraph(), removeSelectedText(), Qt3::QTextCursor::restoreState(), Qt3::QTextDocument::Temp, and TRUE. |
|
|
Clears the background color of the paragraph para, so that the default color is used again. Definition at line 4477 of file qtextedit.cpp. References Qt3::QTextParagraph::clearBackgroundColor(), p, and repaintChanged(). |
|
|
Definition at line 4100 of file qtextedit.cpp. References Qt3::QTextEdit::UndoRedoInfo::clear(), redoAvailable(), undoAvailable(), and undoRedoInfo. Referenced by checkUndoRedoInfo(), contentsMousePressEvent(), doKeyboardAction(), keyPressEvent(), redo(), removeSelectedText(), setAlignment(), setDocument(), setFormat(), setParagType(), and undo(). |
|
|
Returns the color of the current format.
Definition at line 3230 of file qtextedit.cpp. References Qt3::QTextFormat::color(), and currentFormat. Referenced by init(). |
|
|
Definition at line 1775 of file qtextedit.cpp. References inDnD, isReadOnly(), and TRUE. |
|
|
Definition at line 1801 of file qtextedit.cpp. |
|
|
Definition at line 1787 of file qtextedit.cpp. References cursor, drawCursor(), FALSE, isReadOnly(), placeCursor(), and TRUE. |
|
|
|
|
Definition at line 1675 of file qtextedit.cpp. References doc, dragStartPos, dragStartTimer, handleMouseMove(), Qt3::QTextDocument::hasSelection(), Qt3::QTextDocument::inSelection(), isReadOnly(), mightStartDrag, mousePos, mousePressed, oldMousePos, Qt3::QTextDocument::Standard, startDrag(), and updateCursor(). |
|
|
|
|
Definition at line 1578 of file qtextedit.cpp. References isReadOnly(), zoomIn(), and zoomOut(). |
|
|
Returns the context of the edit. The context is a path which the text edit's QMimeSourceFactory uses to resolve the locations of files and images.
Definition at line 3609 of file qtextedit.cpp. |
|
|
Copies any selected text (from selection 0) to the clipboard.
Definition at line 2376 of file qtextedit.cpp. References doc, Qt3::QTextDocument::hasSelection(), QString::isEmpty(), qt_enable_richtext_copy, Qt3::QTextDocument::selectedText(), QString::simplifyWhiteSpace(), Qt3::QTextDocument::Standard, and t. Referenced by handleReadOnlyKeyEvent(), and keyPressEvent(). |
|
|
This signal is emitted when text is selected or de-selected in the text edit. When text is selected this signal will be emitted with yes set to TRUE. If no text has been selected or if the selected text is de-selected this signal is emitted with yes set to FALSE. If yes is TRUE then copy() can be used to copy the selection to the clipboard. If yes is FALSE then copy() does nothing.
Referenced by contentsMouseReleaseEvent(), moveCursor(), and selectAll(). |
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This function is called to create a right mouse button popup menu. If you want to create a custom popup menu, reimplement this function and return the created popup menu. Ownership of the popup menu is transferred to the caller. This function is only called if createPopupMenu( const QPoint & ) returns 0. Definition at line 4238 of file qtextedit.cpp. |
|
|
This function is called to create a right mouse button popup menu at the document position pos. If you want to create a custom popup menu, reimplement this function and return the created popup menu. Ownership of the popup menu is transferred to the caller. Definition at line 4187 of file qtextedit.cpp. References ACCEL_KEY, d, Qt3::QTextEditPrivate::id, IdClear, IdCopy, IdCut, IdPaste, IdRedo, IdSelectAll, IdUndo, isReadOnly(), length(), Qt3::QTextDocument::Standard, text(), tr, TRUE, and X. |
|
|
This signal is emitted if the alignment of the current paragraph has changed. The new alignment is a.
Referenced by handleMouseMove(), setAlignment(), and updateCurrentFormat(). |
|
|
This signal is emitted if the color of the current format has changed. The new color is c.
Referenced by handleMouseMove(), setFormat(), and updateCurrentFormat(). |
|
|
This signal is emitted if the font of the current format has changed. The new font is f.
Referenced by handleMouseMove(), setFormat(), and updateCurrentFormat(). |
|
|
This signal is emitted if the vertical alignment of the current format has changed. The new vertical alignment is a.
Referenced by handleMouseMove(), setFormat(), and updateCurrentFormat(). |
|
||||||||||||
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. This signal is emitted if the position of the cursor changed. para contains the paragraph index and pos contains the character position within the paragraph.
|
|
|
This signal is emitted if the position of the cursor changed. c points to the text cursor object.
Referenced by clear(), contentsMouseReleaseEvent(), keyPressEvent(), and setCursorPosition(). |
|
|
Copies the selected text (from selection 0) to the clipboard and deletes it from the text edit. If there is no selected text (in selection 0) nothing happens.
Definition at line 2357 of file qtextedit.cpp. References doc, Qt3::QTextDocument::hasSelection(), isReadOnly(), qt_enable_richtext_copy, removeSelectedText(), Qt3::QTextDocument::selectedText(), Qt3::QTextDocument::Standard, t, and updateMicroFocusHint(). Referenced by keyPressEvent(). |
|
|
If there is some selected text (in selection 0) it is deleted. If there is no selected text (in selection 0) the character to the right of the text cursor is deleted.
Definition at line 3326 of file qtextedit.cpp. References ActionDelete, doKeyboardAction(), removeSelectedText(), and Qt3::QTextDocument::Standard. Referenced by keyPressEvent(). |
|
|
For internal use only.
Definition at line 2049 of file qtextedit.cpp. References interval. Referenced by init(). |
|
|
For internal use only. This function returns the QTextDocument which is used by the text edit. Definition at line 437 of file qtextedit.h. Referenced by drawContents(), setTabStopWidth(), setUndoDepth(), setWordWrap(), setWrapColumnOrWidth(), and setWrapPolicy(). |
|
|
|
|
|
Definition at line 3678 of file qtextedit.cpp. Referenced by init(). |
|
|
|
Definition at line 2033 of file qtextedit.cpp. References doc, FALSE, Qt3::QTextDocument::firstParagraph(), FixedPixelWidth, formatMore(), interval, Qt3::QTextDocument::invalidate(), lastFormatted, Qt3::QTextDocument::setMinimumWidth(), Qt3::QTextDocument::setWidth(), and wrapMode. Referenced by resizeEvent(), setWordWrap(), and viewportResizeEvent(). |
|
|
Definition at line 797 of file qtextedit.cpp. |
|
||||||||||||||||||||||||
|
Definition at line 780 of file qtextedit.cpp. References document(), l, pageSize, paintDocument(), TRUE, and v. |
|
|
|
Definition at line 396 of file qtextedit.h. Referenced by updateCursor(). |
|
|
Definition at line 397 of file qtextedit.h. Referenced by contentsMouseReleaseEvent(), and handleReadOnlyKeyEvent(). |
|
|
Ensures that the cursor is visible by scrolling the text edit if necessary.
Definition at line 1503 of file qtextedit.cpp. References cursor, d, Qt3::QTextEditPrivate::ensureCursorVisibleInShowEvent, formatMore(), Qt3::QTextCursor::index(), lastFormatted, Qt3::QTextCursor::offsetX(), Qt3::QTextCursor::offsetY(), Qt3::QTextCursor::paragraph(), TRUE, Qt3::QTextStringChar::x, Opie::MM::x, and Opie::MM::y. Referenced by contentsMousePressEvent(), doKeyboardAction(), event(), find(), handleMouseMove(), insert(), moveCursor(), pasteSubType(), redo(), removeSelectedText(), setCursorPosition(), setSelection(), and undo(). |
|
|
Definition at line 4532 of file qtextedit.cpp. References formatMore(), Qt3::QTextParagraph::isValid(), and lastFormatted. Referenced by append(), and moveCursor(). |
|
|
Definition at line 803 of file qtextedit.cpp. References d, ensureCursorVisible(), Qt3::QTextEditPrivate::ensureCursorVisibleInShowEvent, FALSE, QString::isEmpty(), isReadOnly(), Key_C, Key_V, Key_X, Key_Y, Key_Z, QString::null, scrollToAnchor(), Qt3::QTextEditPrivate::scrollToAnchor, and sync(). |
|
||||||||||||
|
Definition at line 2056 of file qtextedit.cpp. References blinkTimer, drawCursor(), FALSE, TRUE, and updateMicroFocusHint(). |
|
|
Returns the font family of the current format.
Definition at line 3207 of file qtextedit.cpp. References currentFormat, and Qt3::QTextFormat::font(). |
|
||||||||||||||||||||||||||||
|
Finds the next occurrence of the string, expr. Returns TRUE if expr is found; otherwise returns FALSE. If para and index are both null the search begins from the current cursor position. If para and index are both not null, the search begins from the *index character position in the *para paragraph. If cs is TRUE the search is case sensitive, otherwise it is case insensitive. If wo is TRUE the search looks for whole word matches only; otherwise it searches for any matching text. If forward is TRUE (the default) the search works forward from the starting position to the end of the text, otherwise it works backwards to the beginning of the text. If expr is found the function returns TRUE. If index and para are not null, the number of the paragraph in which the first character of the match was found is put into *para, and the index position of that character within the paragraph is put into *index. If expr is not found the function returns FALSE. If index and para are not null and expr is not found, *index and *para are undefined. Definition at line 2863 of file qtextedit.cpp. References cursor, doc, drawCursor(), ensureCursorVisible(), FALSE, Qt3::QTextDocument::find(), Qt3::QTextCursor::gotoEnd(), Qt3::QTextCursor::gotoNextLetter(), Qt3::QTextCursor::gotoPosition(), Qt3::QTextCursor::gotoPreviousLetter(), Qt3::QTextDocument::hasSelection(), Qt3::QTextCursor::index(), isReadOnly(), Qt3::QTextDocument::paragAt(), Qt3::QTextCursor::paragraph(), removeSelection(), repaintChanged(), Qt3::QTextDocument::Standard, and TRUE. |
|
|
Reimplemented to allow tabbing through links. If n is TRUE the tab moves the focus to the next child; if n is FALSE the tab moves the focus to the previous child. Returns TRUE if the focus was moved; otherwise returns FALSE. Definition at line 2410 of file qtextedit.cpp. References doc, FALSE, Qt3::QTextDocument::focusIndicator, Qt3::QTextDocument::focusNextPrevChild(), isReadOnly(), linksEnabled(), makeParagVisible(), and repaintChanged(). |
|
|
Returns the font of the current format.
Definition at line 3242 of file qtextedit.cpp. References currentFormat, and Qt3::QTextFormat::font(). |
|
|
Definition at line 1994 of file qtextedit.cpp. References doc, FALSE, Qt3::QTextParagraph::format(), formatTimer, Qt3::QTextDocument::height(), i, interval, lastFormatted, Qt3::QTextParagraph::next(), Qt3::QTextParagraph::rect(), and TRUE. Referenced by append(), doKeyboardAction(), doResize(), ensureCursorVisible(), ensureFormatted(), init(), insert(), pasteSubType(), removeSelectedText(), setAlignment(), setFont(), setFormat(), setParagType(), setTabStopWidth(), setText(), setWordWrap(), setWrapColumnOrWidth(), and setWrapPolicy(). |
|
||||||||||||
|
This function sets the *para and *index parameters to the current cursor position. para and index must be non-null int pointers.
Definition at line 2941 of file qtextedit.cpp. References cursor, Qt3::QTextCursor::index(), and Qt3::QTextCursor::paragraph(). |
|
||||||||||||||||||||||||
|
For internal use only.
Returns FALSE if para or index is out of range otherwise returns TRUE. Definition at line 4122 of file qtextedit.cpp. References Qt3::QTextParagraph::at(), FALSE, Qt3::QTextParagraph::length(), p, and TRUE. |
|
||||||||||||||||||||||||||||||||||||
|
For internal use only.
Returns FALSE if para is out of range otherwise returns TRUE. Definition at line 4155 of file qtextedit.cpp. References Qt3::QTextParagraph::alignment(), Qt3::QTextParagraph::at(), Qt3::QStyleSheetItem::DisplayBlock, Qt3::QStyleSheetItem::DisplayListItem, FALSE, Qt3::QTextParagraph::isListItem(), Qt3::QTextParagraph::listDepth(), Qt3::QTextParagraph::listStyle(), p, and TRUE. |
|
||||||||||||||||||||||||
|
If there is a selection, *paraFrom is set to the number of the paragraph in which the selection begins and *paraTo is set to the number of the paragraph in which the selection ends. (They could be the same.) *indexFrom is set to the index at which the selection begins within *paraFrom, and *indexTo is set to the index at which the selection ends within *paraTo. If there is no selection, *paraFrom, *indexFrom, *paraTo and *indexTo are all set to -1. paraFrom, indexFrom, paraTo and indexTo must be non-null int pointers. The selNum is the number of the selection (multiple selections are supported). It defaults to 0 (the default selection).
Definition at line 3021 of file qtextedit.cpp. References doc, Qt3::QTextDocument::hasSelection(), Qt3::QTextDocument::selectionEnd(), and Qt3::QTextDocument::selectionStart(). |
|
|
|
Definition at line 3546 of file qtextedit.cpp. References copy(), emitLinkClicked(), FALSE, isReadOnly(), Key_C, Key_F16, TRUE, and u. Referenced by keyPressEvent(). |
|
|
Referenced by paintDocument(). |
|
|
Returns how many pixels high the text edit needs to be to display all the text if the text edit is w pixels wide. Definition at line 3457 of file qtextedit.cpp. |
|
|
Re-indents the current paragraph. Definition at line 2388 of file qtextedit.cpp. References cursor, doc, drawCursor(), FALSE, Qt3::QTextDocument::hasSelection(), Qt3::QTextCursor::indent(), Qt3::QTextDocument::indentSelection(), isReadOnly(), repaintChanged(), setModified(), Qt3::QTextDocument::Standard, textChanged(), and TRUE. Referenced by keyPressEvent(). |
|
|
Definition at line 673 of file qtextedit.cpp. References Qt3::AlignAuto, AtWhiteSpace, autoScrollTimerDone(), blinkCursor(), blinkCursorVisible, blinkTimer, changeIntervalTimer, color(), currentAlignment, currentFormat, cursor, cursorVisible, d, doc, doChangeInterval(), documentWidthChanged(), dragStartTimer, FALSE, Qt3::QTextDocument::formatCollection(), formatMore(), formatTimer, inDnD, inDoubleClick, interval, isReadOnly(), lastFormatted, Qt3::QTextDocument::lastParagraph(), modified, mousePressed, QString::null, onLink, overWrite, readonly, scrollTimer, Qt3::QTextDocument::setFormatter(), setReadOnly(), startDrag(), TRUE, undoEnabled, WidgetWidth, wPolicy, wrapMode, and wrapWidth. Referenced by QTextEdit(). |
|
||||||||||||||||||||
|
||||||||||||||||
|
Inserts text in the paragraph para and position index Definition at line 2148 of file qtextedit.cpp. References cursor, doc, FALSE, insert(), p, Qt3::QTextDocument::paragAt(), removeSelection(), Qt3::QTextCursor::setIndex(), Qt3::QTextCursor::setParagraph(), Qt3::QTextDocument::Standard, and TRUE. |
|
||||||||||||
|
Inserts text as the paragraph at position para. If para is -1, the text is appended. Definition at line 2166 of file qtextedit.cpp. References append(), doc, Qt3::QTextCursor::insert(), p, Qt3::QTextDocument::paragAt(), repaintChanged(), Qt3::QTextCursor::setIndex(), Qt3::QTextCursor::setParagraph(), Qt3::QTextCursor::splitAndInsertEmptyParagraph(), and TRUE. |
|
|
Definition at line 3156 of file qtextedit.cpp. References modified. Referenced by setModified(), and setText(). |
|
|
Definition at line 212 of file qtextedit.h. |
|
|
|
Returns whether redo is available Definition at line 4527 of file qtextedit.cpp. |
|
|
Returns whether undo is available Definition at line 4520 of file qtextedit.cpp. References undoRedoInfo, and Qt3::QTextEdit::UndoRedoInfo::valid(). |
|
|
Definition at line 4513 of file qtextedit.cpp. References undoEnabled. |
|
|
Returns TRUE if the current format is italic; otherwise returns FALSE.
Definition at line 3173 of file qtextedit.cpp. References currentFormat, and Qt3::QTextFormat::font(). |
|
|
|
Referenced by createPopupMenu(), and readFormats(). |
|
||||||||||||
|
Returns the line number of the line in paragraph para in which the character at position index appears. The index position is relative to the beginning of the paragraph. If there is no such paragraph or no such character at the index position (e.g. the index is out of range) -1 is returned. Definition at line 3128 of file qtextedit.cpp. References doc, Qt3::QTextParagraph::lineStartOfChar(), p, and Qt3::QTextDocument::paragAt(). |
|
|
Returns the number of lines in the text edit; this could be 0.
Definition at line 3108 of file qtextedit.cpp. References doc, Qt3::QTextDocument::firstParagraph(), l, Qt3::QTextParagraph::lines(), Qt3::QTextParagraph::next(), and p. |
|
|
Returns the number of lines in paragraph para, or -1 if there is no paragraph with index para. Definition at line 3079 of file qtextedit.cpp. References doc, Qt3::QTextParagraph::lines(), p, and Qt3::QTextDocument::paragAt(). |
|
|
Definition at line 382 of file qtextedit.h. References FALSE. Referenced by contentsMousePressEvent(), contentsMouseReleaseEvent(), focusNextPrevChild(), and updateCursor(). |
|
|
|
|
|
Definition at line 3628 of file qtextedit.cpp. References Qt3::QTextParagraph::rect(). Referenced by focusNextPrevChild(). |
|
|
Returns the QMimeSourceFactory which is currently used by this text edit.
Definition at line 3447 of file qtextedit.cpp. |
|
|
This signal is emitted when the modification of the document changed. If m is TRUE, the document was modified, otherwise the modification state has been reset to unmodified.
Referenced by setModified(). |
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Definition at line 1428 of file qtextedit.cpp. References cursor, doc, ensureFormatted(), Qt3::QTextCursor::gotoDown(), Qt3::QTextCursor::gotoEnd(), Qt3::QTextCursor::gotoHome(), Qt3::QTextCursor::gotoLineEnd(), Qt3::QTextCursor::gotoLineStart(), Qt3::QTextCursor::gotoNextLetter(), Qt3::QTextCursor::gotoNextWord(), Qt3::QTextCursor::gotoPageDown(), Qt3::QTextCursor::gotoPageUp(), Qt3::QTextCursor::gotoPreviousLetter(), Qt3::QTextCursor::gotoPreviousWord(), Qt3::QTextCursor::gotoUp(), Qt3::QTextDocument::lastParagraph(), MoveBackward, MoveDown, MoveEnd, MoveForward, MoveHome, MoveLineEnd, MoveLineStart, MovePgDown, MovePgUp, MoveUp, MoveWordBackward, MoveWordForward, updateCurrentFormat(), and updateMicroFocusHint(). |
|
||||||||||||
|
Moves the text cursor according to action. This is normally used by some key event handler. select specifies whether the text between the current cursor position and the new position should be selected. Definition at line 1383 of file qtextedit.cpp. References copyAvailable(), cursor, doc, drawCursor(), ensureCursorVisible(), FALSE, Qt3::QTextDocument::hasSelection(), isReadOnly(), Qt3::QTextCursor::paragraph(), redraw(), Qt3::QTextDocument::removeSelection(), repaintChanged(), selectionChanged(), Qt3::QTextDocument::setSelectionEnd(), Qt3::QTextDocument::setSelectionStart(), Qt3::QTextDocument::Standard, TRUE, updateCurrentFormat(), and updateMicroFocusHint(). Referenced by keyPressEvent(). |
|
||||||||||||||||||||||||||||
|
Definition at line 748 of file qtextedit.cpp. References cursor, cursorVisible, doc, Qt3::QTextDocument::draw(), FALSE, g, hasSelectedText(), Qt3::QTextDocument::height(), isReadOnly(), lastFormatted, Qt3::QTextDocument::lastParagraph(), Qt3::QTextDocument::paper(), Qt3::QTextDocument::width(), and Qt3::QTextDocument::y(). Referenced by drawContents(), and repaintChanged(). |
|
|
|
|
|
Returns the paragraph which is at position pos (in contents coordinates), or -1 if there is no paragraph with index pos. Definition at line 4434 of file qtextedit.cpp. References Qt3::QTextCursor::paragraph(), and Qt3::QTextCursor::place(). |
|
|
Returns the background color of the paragraph para or an invalid color if para is out of range or the paragraph has no background set Definition at line 4491 of file qtextedit.cpp. References Qt3::QTextParagraph::backgroundColor(), and p. |
|
|
Returns the length of the paragraph para (number of characters), or -1 if there is no paragraph with index para Definition at line 3092 of file qtextedit.cpp. References doc, Qt3::QTextParagraph::length(), p, and Qt3::QTextDocument::paragAt(). |
|
|
Returns the rectangle of the paragraph para in contents coordinates, or an invalid rectangle if para is out of range. Definition at line 4419 of file qtextedit.cpp. References p, Qt3::QTextParagraph::rect(), and sync(). |
|
|
Returns the number of paragraphs in the text; this could be 0. Definition at line 3069 of file qtextedit.cpp. References doc, and Qt3::QTextDocument::lastParagraph(). |
|
|
Pastes the text from the clipboard into the text edit at the current cursor position. Only plain text is pasted. If there is no text in the clipboard nothing happens.
Definition at line 2315 of file qtextedit.cpp. References isReadOnly(), pasteSubType(), and updateMicroFocusHint(). Referenced by keyPressEvent(). |
|
|
Prompts the user to choose a type from a list of text types available, then copies text from the clipboard (if there is any) into the text edit at the current text cursor position. Any selected text (in selection 0) is first deleted. Definition at line 3795 of file qtextedit.cpp. References data, QCString::isEmpty(), pasteSubType(), pickSpecial(), and TRUE. |
|
|
||||||||||||||||
|
Definition at line 3803 of file qtextedit.cpp. References QDict< type >::find(), QString::find(), fmt(), i, QDict< type >::insert(), QString::latin1(), QString::left(), and QString::mid(). Referenced by pasteSpecial(). |
|
||||||||||||||||
|
Definition at line 1964 of file qtextedit.cpp. References cursor, doc, Qt3::QTextDocument::firstParagraph(), Qt3::QTextCursor::place(), Qt3::QTextCursor::restoreState(), s, and updateMicroFocusHint(). |
|
||||||||||||
|
Places the cursor c at the character which is closest to position pos (in contents coordinates). If c is 0, the default text cursor is used.
Definition at line 4573 of file qtextedit.cpp. References FALSE. Referenced by anchorAt(), contentsDragMoveEvent(), contentsMousePressEvent(), handleMouseMove(), and updateCursor(). |
|
|
Returns the point size of the font of the current format.
Definition at line 3219 of file qtextedit.cpp. References currentFormat, and Qt3::QTextFormat::font(). |
|
||||||||||||||||||||
|
Definition at line 1263 of file qtextedit.cpp. References Qt3::QTextParagraph::at(), i, Qt3::QTextCursor::index(), Qt3::QTextString::insert(), IO_WriteOnly, length(), Qt3::QTextString::length(), Qt3::QTextParagraph::next(), p, Qt3::QTextCursor::paragraph(), Qt3::QTextCursor::restoreState(), Qt3::QTextEdit::UndoRedoInfo::styleInformation, TRUE, undoRedoInfo, and Qt3::QTextParagraph::writeStyleInformation(). Referenced by removeSelectedText(), and setFormat(). |
|
|
Redoes the last operation. If there is no operation to redo, e.g. there is no redo step in the undo/redo history, nothing happens.
Definition at line 2277 of file qtextedit.cpp. References clearUndoRedo(), Qt3::QTextDocument::commands(), cursor, doc, drawCursor(), ensureCursorVisible(), FALSE, i, isReadOnly(), lastFormatted, Qt3::QTextDocument::redo(), Qt3::QTextDocument::removeSelection(), repaintChanged(), setModified(), textChanged(), TRUE, undoEnabled, and updateMicroFocusHint(). Referenced by keyPressEvent(). |
|
|
This signal is emitted when the availability of redo changes. If yes is TRUE, then redo() will work until redoAvailable( FALSE ) is next emitted.
Referenced by clearUndoRedo(), and setText(). |
|
|
|
|
Removes the selection selNum (by default 0). This does not remove the selected text.
Definition at line 1305 of file qtextedit.cpp. References doc, Qt3::QTextDocument::removeSelection(), and repaintChanged(). Referenced by find(), insertAt(), and pasteSubType(). |
|
|
Repaints any paragraphs that have changed. Although used extensively internally you shouldn't need to call this yourself. Definition at line 2339 of file qtextedit.cpp. References FALSE, p, and paintDocument(). Referenced by append(), clearParagraphBackground(), contentsMouseDoubleClickEvent(), contentsMousePressEvent(), doKeyboardAction(), find(), focusNextPrevChild(), handleMouseMove(), indent(), insert(), insertParagraph(), keyPressEvent(), moveCursor(), pasteSubType(), redo(), removeParagraph(), removeSelectedText(), removeSelection(), selectAll(), setAlignment(), setFont(), setFormat(), setParagraphBackgroundColor(), setParagType(), setSelection(), and undo(). |
|
|
For internal use only. Resets the current format to the default format. Definition at line 3362 of file qtextedit.cpp. References Qt3::AlignAuto, Qt3::QStyleSheetItem::DisplayBlock, Qt3::QTextFormat::Format, Qt3::QStyleSheetItem::ListDisc, setAlignment(), setFormat(), and setParagType(). |
|
|
Definition at line 1475 of file qtextedit.cpp. References doc, doResize(), and Qt3::QTextDocument::visibleWidth(). |
|
|
This signal is emitted if the user pressed the Return or the Enter key. Referenced by keyPressEvent(). |
|
|
Scrolls the text edit to make the text at the anchor called name visible, if it can be found in the document. If the anchor isn't found no scrolling will occur. An anchor is defined using the HTML anchor tag, e.g. Definition at line 3639 of file qtextedit.cpp. References Qt3::QTextStringChar::anchorName(), Qt3::QTextCursor::atParagEnd(), QString::contains(), cursor, d, Qt3::QTextCursor::gotoNextLetter(), Qt3::QTextCursor::index(), Qt3::QTextStringChar::isAnchor(), QString::isEmpty(), Qt3::QTextCursor::paragraph(), Qt3::QTextEditPrivate::scrollToAnchor, QStringList::split(), sync(), and Qt3::QTextCursor::totalOffsetY(). Referenced by event(). |
|
|
Scrolls to the bottom of the document and does formatting if required Definition at line 4409 of file qtextedit.cpp. References sync(). Referenced by append(), and viewportResizeEvent(). |
|
|
If select is TRUE (the default), all the text is selected as selection 0. If select is FALSE any selected text is unselected, i.e., the default selection (selection 0) is cleared.
Definition at line 3282 of file qtextedit.cpp. References copyAvailable(), doc, Qt3::QTextDocument::hasSelection(), isReadOnly(), Qt3::QTextDocument::removeSelection(), repaintChanged(), Qt3::QTextDocument::selectAll(), selectionChanged(), and Qt3::QTextDocument::Standard. Referenced by contentsMouseReleaseEvent(), and keyPressEvent(). |
|
|
Referenced by drawCursor(). |
|
|
This signal is emitted whenever the selection changes.
Referenced by contentsMouseReleaseEvent(), moveCursor(), removeSelectedText(), and selectAll(). |
|
|
Sets the alignment of the current paragraph to a. Valid alignments are Definition at line 2551 of file qtextedit.cpp. References block_set_alignment, clearUndoRedo(), currentAlignment, currentAlignmentChanged(), cursor, doc, drawCursor(), Qt3::QTextEdit::UndoRedoInfo::eid, end, FALSE, formatMore(), Qt3::QTextDocument::hasSelection(), Qt3::QTextEdit::UndoRedoInfo::id, isReadOnly(), Qt3::QTextParagraph::next(), Qt3::QTextParagraph::paragId(), Qt3::QTextCursor::paragraph(), QTextStyleCommand::readStyleInformation(), repaintChanged(), Qt3::QTextDocument::selectionEndCursor(), Qt3::QTextDocument::selectionStartCursor(), Qt3::QTextParagraph::setAlignment(), setModified(), Qt3::QTextDocument::Standard, start, Qt3::QTextEdit::UndoRedoInfo::Style, Qt3::QTextEdit::UndoRedoInfo::styleInformation, textChanged(), TRUE, Qt3::QTextEdit::UndoRedoInfo::type, and undoRedoInfo. Referenced by resetFormat(). |
|
|
If b is TRUE sets the current format to bold; otherwise sets the current format to non-bold.
Definition at line 2638 of file qtextedit.cpp. References Qt3::QTextFormat::Bold, currentFormat, doc, f, Qt3::QTextDocument::formatCollection(), Qt3::QTextFormat::setBold(), and setFormat(). |
|
|
Sets the color of the current format, i.e. of the text, to c.
Definition at line 2698 of file qtextedit.cpp. References Qt3::QTextFormat::Color, currentFormat, doc, f, Qt3::QTextDocument::formatCollection(), Qt3::QTextFormat::setColor(), and setFormat(). |
|
|
Sets the font of the current format to f.
Definition at line 447 of file qtextedit.h. |
|
||||||||||||
|
Sets the cursor to position index in paragraph para.
Definition at line 2914 of file qtextedit.cpp. References cursor, cursorPositionChanged(), doc, drawCursor(), ensureCursorVisible(), FALSE, Qt3::QTextCursor::index(), Qt3::QTextParagraph::length(), p, Qt3::QTextDocument::paragAt(), Qt3::QTextCursor::paragraph(), Qt3::QTextCursor::setIndex(), Qt3::QTextCursor::setParagraph(), TRUE, and updateCurrentFormat(). |
|
|
For internal use only. This function sets the QTextDocument which should be used by the text edit to doc. This can be used, for example, if you want to display a document using multiple views. You would create a QTextDocument and set it to the text edits which should display it. You would need to connect to the textChanged() and selectionChanged() signals of all the text edits and update them all accordingly (preferably with a slight delay for efficiency reasons). Definition at line 3692 of file qtextedit.cpp. References clearUndoRedo(), cursor, Qt3::QTextEdit::UndoRedoInfo::doc, lastFormatted, and undoRedoInfo. |
|
|
Definition at line 4346 of file qtextedit.cpp. References blinkTimer, drawCursor(), f, FALSE, Qt3::QTextFormat::setColor(), text(), textFormat(), and TRUE. |
|
|
Sets the font family of the current format to fontFamily.
Definition at line 2667 of file qtextedit.cpp. References currentFormat, doc, f, Qt3::QTextFormat::Family, Qt3::QTextDocument::formatCollection(), Qt3::QTextFormat::setFamily(), and setFormat(). |
|
|
Definition at line 4245 of file qtextedit.cpp. References formatMore(), lastFormatted, and repaintChanged(). |
|
|
Definition at line 2720 of file qtextedit.cpp. References currentFormat, doc, f, Qt3::QTextFormat::Font, Qt3::QTextDocument::formatCollection(), Qt3::QTextFormat::setFont(), and setFormat(). |
|
||||||||||||
|
|
If b is TRUE sets the current format to italic; otherwise sets the current format to non-italic.
Definition at line 2623 of file qtextedit.cpp. References currentFormat, doc, f, Qt3::QTextDocument::formatCollection(), Qt3::QTextFormat::Italic, setFormat(), and Qt3::QTextFormat::setItalic(). |
|
|
Definition at line 3420 of file qtextedit.cpp. |
|
|
Sets the text edit's mimesource factory to factory. See QMimeSourceFactory for further details.
Definition at line 3436 of file qtextedit.cpp. |
|
|
Definition at line 3161 of file qtextedit.cpp. References isModified(), and TRUE. Referenced by append(), doKeyboardAction(), indent(), insert(), pasteSubType(), redo(), removeSelectedText(), setAlignment(), setFormat(), setParagType(), setText(), and undo(). |
|
|
Definition at line 3142 of file qtextedit.cpp. References doc, Qt3::QTextDocument::invalidateOriginalText(), modificationChanged(), modified, and Qt3::QTextDocument::oTextValid. |
|
|
Definition at line 285 of file qtextedit.h. |
|
|
Definition at line 2479 of file qtextedit.cpp. References doc, f, Qt3::QTextDocument::formatCollection(), Qt3::QTextFormat::setColor(), text(), and textFormat(). |
|
|
Definition at line 3398 of file qtextedit.cpp. |
|
||||||||||||
|
Sets the background color of the paragraph para to bg Definition at line 4464 of file qtextedit.cpp. References p, repaintChanged(), and Qt3::QTextParagraph::setBackgroundColor(). |
|
||||||||||||
|
|
Sets the point size of the current format to s. Note that if s is zero or negative, the behaviour of this function is not defined.
Definition at line 2684 of file qtextedit.cpp. References currentFormat, doc, f, Qt3::QTextDocument::formatCollection(), setFormat(), Qt3::QTextFormat::setPointSize(), and Qt3::QTextFormat::Size. |
|
|
Definition at line 4393 of file qtextedit.cpp. References readonly. Referenced by init(). |
|
||||||||||||||||||||||||
|
Sets a selection which starts at position indexFrom in paragraph paraFrom and ends at position indexTo in paragraph paraTo. Existing selections which have a different id (selNum) are not removed, existing selections which have the same id as selNum are removed. Uses the selection settings of selection selNum. If selNum is 0, this is the default selection. The cursor is moved to the end of the selection if selNum is 0, otherwise the cursor position remains unchanged.
Definition at line 2964 of file qtextedit.cpp. References Qt3::QTextDocument::addSelection(), cursor, doc, drawCursor(), ensureCursorVisible(), FALSE, Qt3::QTextDocument::hasSelection(), Qt3::QTextParagraph::length(), Qt3::QTextDocument::numSelections(), Qt3::QTextDocument::paragAt(), Qt3::QTextDocument::removeSelection(), repaintChanged(), Qt3::QTextCursor::setIndex(), Qt3::QTextCursor::setParagraph(), Qt3::QTextDocument::setSelectionEnd(), Qt3::QTextDocument::setSelectionStart(), Qt3::QTextDocument::Standard, and TRUE. |
|
||||||||||||||||
|
Sets the background color of selection number selNum to back and specifies whether the text of this selection should be inverted with invertText. This only works for selNum > 0. The default selection (selNum == 0) gets its attributes from the colorGroup() of this widget. Definition at line 4373 of file qtextedit.cpp. |
|
|
Sets the stylesheet to use with this text edit to styleSheet. Changes will only take effect for new text added with setText() or append().
Definition at line 3385 of file qtextedit.cpp. |
|
|
Definition at line 4082 of file qtextedit.cpp. References document(), formatMore(), interval, and lastFormatted. |
|
||||||||||||
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Changes the text of the text edit to the string text and the context to context. Any previous text is removed.
text may be interpreted either as plain text or as rich text, depending on the textFormat(). The default setting is The optional context is a path which the text edit's QMimeSourceFactory uses to resolve the locations of files and images. (See {QTextEdit::QTextEdit()}.) It is passed to the text edit's QMimeSourceFactory when quering data. Note that the undo/redo history is cleared by this function.
Definition at line 2769 of file qtextedit.cpp. References Qt3::QTextEdit::UndoRedoInfo::clear(), Qt3::QTextDocument::commands(), cursor, d, doc, FALSE, Qt3::QTextDocument::firstParagraph(), FixedPixelWidth, formatMore(), isModified(), isReadOnly(), lastFormatted, QString::null, redoAvailable(), Qt3::QTextCursor::restoreState(), Qt3::QTextEditPrivate::scrollToAnchor, Qt3::QTextDocument::setMinimumWidth(), setModified(), Qt3::QTextDocument::setText(), Qt3::QTextDocument::setWidth(), text(), textChanged(), undoAvailable(), undoRedoInfo, updateCurrentFormat(), wrapMode, and wrapWidth. |
|
|
Definition at line 233 of file qtextedit.h. References QString::null. Referenced by QTextEdit(). |
|
|
Definition at line 3055 of file qtextedit.cpp. References doc, and Qt3::QTextDocument::setTextFormat(). |
|
|
If b is TRUE sets the current format to underline; otherwise sets the current format to non-underline.
Definition at line 2653 of file qtextedit.cpp. References currentFormat, doc, f, Qt3::QTextDocument::formatCollection(), setFormat(), Qt3::QTextFormat::setUnderline(), and Qt3::QTextFormat::Underline. |
|
|
Definition at line 4077 of file qtextedit.cpp. References document(). |
|
|
Definition at line 4508 of file qtextedit.cpp. References undoEnabled. |
|
|
Sets the vertical alignment of the current format, i.e. of the text, to a.
Definition at line 2712 of file qtextedit.cpp. References currentFormat, doc, f, Qt3::QTextDocument::formatCollection(), setFormat(), Qt3::QTextFormat::setVAlign(), and Qt3::QTextFormat::VAlign. |
|
|
Definition at line 3887 of file qtextedit.cpp. References document(), doResize(), FALSE, FixedColumnWidth, FixedPixelWidth, formatMore(), interval, lastFormatted, NoWrap, setWrapColumnOrWidth(), TRUE, WidgetWidth, wrapMode, and wrapWidth. |
|
|
Definition at line 3943 of file qtextedit.cpp. References document(), FixedColumnWidth, FixedPixelWidth, formatMore(), interval, lastFormatted, wrapMode, and wrapWidth. Referenced by setWordWrap(). |
|
|
Definition at line 3999 of file qtextedit.cpp. References AtWhiteSpace, document(), formatMore(), formatter, interval, lastFormatted, Qt3::QTextFormatter::setWrapAtColumn(), Qt3::QTextFormatter::setWrapEnabled(), and wPolicy. |
|
|
Definition at line 4094 of file qtextedit.cpp. |
|
|
Definition at line 3258 of file qtextedit.cpp. References doc, FALSE, inDoubleClick, isReadOnly(), mousePressed, qt_enable_richtext_copy, removeSelectedText(), Qt3::QTextDocument::selectedText(), and Qt3::QTextDocument::Standard. Referenced by contentsMouseMoveEvent(), and init(). |
|
|
Returns the QStyleSheet which is currently used in this text edit.
Definition at line 3374 of file qtextedit.cpp. |
|
|
For internal use only. QTextEdit is optimized for large amounts text. One of its optimizations is to format only the visible text, formatting the rest on demand, e.g. as the user scrolls, so you don't usually need to call this function. In some situations you may want to force the whole text to be formatted. For example, if after calling setText(), you wanted to know the height of the document (using contentsHeight()), you would call this function first. Definition at line 4335 of file qtextedit.cpp. References Qt3::QTextParagraph::format(), lastFormatted, and Qt3::QTextParagraph::next(). Referenced by event(), paragraphRect(), scrollToAnchor(), and scrollToBottom(). |
|
|
|
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns the text of paragraph para.
If textFormat() is Definition at line 2744 of file qtextedit.cpp. References doc, and Qt3::QTextDocument::text(). |
|
|
Referenced by contentsDropEvent(), createPopupMenu(), setEnabled(), setPalette(), and setText(). |
|
|
This signal is emitted whenever the text in the text edit changes.
Referenced by append(), doKeyboardAction(), indent(), insert(), pasteSubType(), redo(), removeSelectedText(), setAlignment(), setFormat(), setParagType(), setText(), and undo(). |
|
|
Returns the text edit's text cursor.
Definition at line 442 of file qtextedit.h. |
|
|
Referenced by doKeyboardAction(), keyPressEvent(), setEnabled(), and setPalette(). |
|
|
Returns TRUE if the current format is underlined; otherwise returns FALSE.
Definition at line 3196 of file qtextedit.cpp. References currentFormat, and Qt3::QTextFormat::font(). |
|
|
Undoes the last operation. If there is no operation to undo, e.g. there is no undo step in the undo/redo history, nothing happens.
Definition at line 2236 of file qtextedit.cpp. References clearUndoRedo(), Qt3::QTextDocument::commands(), cursor, doc, drawCursor(), ensureCursorVisible(), FALSE, i, isReadOnly(), lastFormatted, Qt3::QTextDocument::removeSelection(), repaintChanged(), setModified(), textChanged(), TRUE, Qt3::QTextDocument::undo(), undoEnabled, and updateMicroFocusHint(). Referenced by contentsDropEvent(), and keyPressEvent(). |
|
|
This signal is emitted when the availability of undo changes. If yes is TRUE, then undo() will work until undoAvailable( FALSE ) is next emitted.
Referenced by clearUndoRedo(), and setText(). |
|
|
|
|
|
|
For internal use only.
Definition at line 4542 of file qtextedit.cpp. References cursor, emitHighlighted(), FALSE, Qt3::QTextCursor::index(), QString::isEmpty(), isReadOnly(), linksEnabled(), QString::null, onLink, Qt3::QTextCursor::paragraph(), placeCursor(), TRUE, and u. Referenced by contentsMouseMoveEvent(), and contentsMouseReleaseEvent(). |
|
|
Definition at line 1976 of file qtextedit.cpp. References cursor, d, f, Qt3::QTextCursor::index(), Qt3::QTextCursor::paragraph(), Qt3::QTextEditPrivate::preeditStart, readonly, Qt3::QTextCursor::setIndex(), TRUE, Qt3::QTextCursor::x(), and Qt3::QTextCursor::y(). Referenced by cut(), doKeyboardAction(), eventFilter(), insert(), moveCursor(), paste(), placeCursor(), redo(), removeSelectedText(), and undo(). |
|
|
For internal use only. This function does nothing Definition at line 3688 of file qtextedit.cpp. |
|
|
Definition at line 1484 of file qtextedit.cpp. References doc, doResize(), Qt3::QTextDocument::height(), and scrollToBottom(). |
|
|
Definition at line 4384 of file qtextedit.cpp. |
|
|
|
|
|
|
|
|
|
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Zooms in on the text by by making the base font size one point larger and recalculating all font sizes. This does not change the size of any images.
Definition at line 240 of file qtextedit.h. Referenced by contentsWheelEvent(). |
|
|
Zooms in on the text by by making the base font size range points larger and recalculating all font sizes. This does not change the size of any images.
Definition at line 4288 of file qtextedit.cpp. |
|
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Zooms out on the text by by making the base font size one point smaller and recalculating all font sizes. This does not change the size of any images.
Definition at line 242 of file qtextedit.h. Referenced by contentsWheelEvent(). |
|
|
Zooms out on the text by making the base font size range points smaller and recalculating all font sizes. This does not change the size of any images.
Definition at line 4302 of file qtextedit.cpp. |
|
|
Zooms the text by making the base font size size points and recalculating all font sizes. This does not change the size of any images. Definition at line 4314 of file qtextedit.cpp. |
|
|
Definition at line 73 of file qtextedit.h. |
|
|
Definition at line 427 of file qtextedit.h. Referenced by blinkCursor(), and init(). |
|
|
Definition at line 410 of file qtextedit.h. Referenced by eventFilter(), init(), and setEnabled(). |
|
|
Definition at line 410 of file qtextedit.h. Referenced by init(), and keyPressEvent(). |
|
|
Definition at line 415 of file qtextedit.h. Referenced by alignment(), handleMouseMove(), init(), setAlignment(), and updateCurrentFormat(). |
|
|
Definition at line 414 of file qtextedit.h. Referenced by append(), bold(), color(), family(), font(), handleMouseMove(), init(), insert(), italic(), pointSize(), setBold(), setColor(), setFamily(), setFontInternal(), setFormat(), setItalic(), setPointSize(), setUnderline(), setVerticalAlignment(), underline(), and updateCurrentFormat(). |
|
|
|
Definition at line 426 of file qtextedit.h. Referenced by append(), blinkCursor(), drawCursor(), init(), and paintDocument(). |
|
|
Definition at line 423 of file qtextedit.h. Referenced by createPopupMenu(), ensureCursorVisible(), event(), init(), scrollToAnchor(), setText(), updateMicroFocusHint(), and ~QTextEdit(). |
|
|
|
Definition at line 417 of file qtextedit.h. Referenced by contentsMouseMoveEvent(), and contentsMousePressEvent(). |
|
|
Definition at line 410 of file qtextedit.h. Referenced by contentsMouseMoveEvent(), contentsMousePressEvent(), contentsMouseReleaseEvent(), and init(). |
|
|
Definition at line 410 of file qtextedit.h. Referenced by formatMore(), and init(). |
|
|
Definition at line 431 of file qtextedit.h. Referenced by contentsDragEnterEvent(), contentsDragLeaveEvent(), contentsDropEvent(), drawCursor(), and init(). |
|
|
Definition at line 424 of file qtextedit.h. Referenced by contentsMouseDoubleClickEvent(), contentsMouseReleaseEvent(), handleMouseMove(), init(), and startDrag(). |
|
|
Definition at line 412 of file qtextedit.h. Referenced by doChangeInterval(), doResize(), formatMore(), init(), keyPressEvent(), setTabStopWidth(), setWordWrap(), setWrapColumnOrWidth(), and setWrapPolicy(). |
|
|
Definition at line 411 of file qtextedit.h. Referenced by clear(), doKeyboardAction(), doResize(), ensureCursorVisible(), ensureFormatted(), formatMore(), init(), insert(), paintDocument(), pasteSubType(), redo(), removeSelectedText(), setDocument(), setFont(), setTabStopWidth(), setText(), setWordWrap(), setWrapColumnOrWidth(), setWrapPolicy(), sync(), and undo(). |
|
|
Definition at line 430 of file qtextedit.h. Referenced by contentsMouseMoveEvent(), contentsMousePressEvent(), and contentsMouseReleaseEvent(). |
|
|
Definition at line 416 of file qtextedit.h. Referenced by contentsMouseMoveEvent(), contentsMousePressEvent(), and handleMouseMove(). |
|
|
Definition at line 425 of file qtextedit.h. Referenced by autoScrollTimerDone(), contentsMouseDoubleClickEvent(), contentsMouseMoveEvent(), contentsMousePressEvent(), contentsMouseReleaseEvent(), handleMouseMove(), init(), and startDrag(). |
|
|
Definition at line 416 of file qtextedit.h. Referenced by contentsMouseMoveEvent(). |
|
|
Definition at line 418 of file qtextedit.h. Referenced by contentsMouseReleaseEvent(), init(), and updateCursor(). |
|
|
Definition at line 434 of file qtextedit.h. Referenced by init(), and keyPressEvent(). |
|
|
Definition at line 422 of file qtextedit.h. Referenced by contentsMousePressEvent(), and contentsMouseReleaseEvent(). |
|
|
Definition at line 432 of file qtextedit.h. Referenced by init(), setReadOnly(), and updateMicroFocusHint(). |
|
|
Definition at line 410 of file qtextedit.h. Referenced by contentsMouseReleaseEvent(), handleMouseMove(), and init(). |
|
|
Definition at line 433 of file qtextedit.h. Referenced by init(), insert(), isUndoRedoEnabled(), pasteSubType(), redo(), setUndoRedoEnabled(), and undo(). |
|
|
Definition at line 413 of file qtextedit.h. Referenced by append(), checkUndoRedoInfo(), clearUndoRedo(), doKeyboardAction(), insert(), isUndoAvailable(), keyPressEvent(), pasteSubType(), readFormats(), removeSelectedText(), setAlignment(), setDocument(), setFormat(), setParagType(), setText(), and ~QTextEdit(). |
|
|
Definition at line 420 of file qtextedit.h. Referenced by init(), and setWrapPolicy(). |
|
|
Definition at line 419 of file qtextedit.h. Referenced by doResize(), init(), setText(), setWordWrap(), and setWrapColumnOrWidth(). |
|
|
Definition at line 421 of file qtextedit.h. Referenced by init(), setText(), setWordWrap(), and setWrapColumnOrWidth(). |
|
|
the title of the document parsed from the text.
For Definition at line 81 of file qtextedit.h. |
|
|
whether some text is selected in selection 0
Definition at line 86 of file qtextedit.h. |
|
|
the number of characters in the text
Definition at line 82 of file qtextedit.h. |
|
|
whether hypertext links will be underlined If TRUE (the default) hypertext links will be displayed underlined. If FALSE links will not be displayed underlined. Definition at line 80 of file qtextedit.h. |
|
|
whether the document has been modified by the user
Definition at line 90 of file qtextedit.h. Referenced by init(), isModified(), and setModified(). |
|
|
the text edit's overwrite mode If FALSE (the default) characters entered by the user are inserted with any characters to the right being moved out of the way. If TRUE, the editor is in overwrite mode, i.e. characters entered by the user overwrite any characters to the right of the cursor position. Definition at line 89 of file qtextedit.h. |
|
|
the background (paper) brush. The brush that is currently used to draw the background of the text edit. The initial setting is an empty brush. Definition at line 79 of file qtextedit.h. |
|
|
whether the text edit is read-only In a read-only text edit the user can only navigate through the text and select text; modifying the text is not possible. This property's default is FALSE. Definition at line 91 of file qtextedit.h. |
|
|
The selected text (from selection 0) or an empty string if there is no currently selected text (in selection 0).
The text is always returned as
Definition at line 87 of file qtextedit.h. |
|
|
the tab stop width in pixels
Definition at line 93 of file qtextedit.h. |
|
|
the text edit's text There is no default text. On setting, any previous text is deleted.
The text may be interpreted either as plain text or as rich text, depending on the textFormat(). The default setting is For richtext, calling text() on an editable QTextEdit will cause the text to be regenerated from the textedit. This may mean that the QString returned may not be exactly the same as the one that was set.
Definition at line 78 of file qtextedit.h. |
|
|
the text format: rich text, plain text or auto text
The text format is one of the following: PlainText - all characters, except newlines, are displayed verbatim, including spaces. Whenever a newline appears in the text the text edit inserts a hard line break and begins a new paragraph. RichText - rich text rendering. The available styles are defined in the default stylesheet QStyleSheet::defaultSheet(). AutoText - this is the default. The text edit autodetects which rendering style is best, Definition at line 75 of file qtextedit.h. |
|
|
the depth of the undo history The maximum number of steps in the undo/redo history. The default is 100.
Definition at line 88 of file qtextedit.h. |
|
|
whether undo/redo is enabled The default is TRUE. Definition at line 92 of file qtextedit.h. |
|
|
the word wrap mode
The default mode is
Definition at line 83 of file qtextedit.h. |
|
|
the position (in pixels or columns depending on the wrap mode) where text will be wrapped
If the wrap mode is
Definition at line 84 of file qtextedit.h. |
|
|
the word wrap policy, at whitespace or anywhere
Defines where text can be wrapped when word wrap mode is not
Definition at line 85 of file qtextedit.h. |
1.4.2