Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Qt3::QTextEdit Class Reference

#include </home/clem/local/src/opie/noncore/apps/opie-write/qtextedit.h>

Collaboration diagram for Qt3::QTextEdit:

Collaboration graph
[legend]
List of all members.

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
QStyleSheetstyleSheet () 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)
QTextDocumentdocument () const
QTextCursortextCursor () 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

QTextDocumentdoc
QTextCursorcursor
QTimer * formatTimer
QTimer * scrollTimer
QTimer * changeIntervalTimer
QTimer * blinkTimer
QTimer * dragStartTimer
QTextParagraphlastFormatted
int interval
UndoRedoInfo undoRedoInfo
QTextFormatcurrentFormat
int currentAlignment
QPoint oldMousePos
QPoint mousePos
QPoint dragStartPos
QString onLink
WordWrap wrapMode
WrapPolicy wPolicy
int wrapWidth
QString pressedLink
QTextEditPrivated
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

Member Enumeration Documentation

enum Qt3::QTextEdit::CursorAction
 

Enumeration values:
MoveBackward 
MoveForward 
MoveWordBackward 
MoveWordForward 
MoveUp 
MoveDown 
MoveLineStart 
MoveLineEnd 
MoveHome 
MoveEnd 
MovePgUp 
MovePgDown 

Definition at line 116 of file qtextedit.h.

enum Qt3::QTextEdit::KeyboardAction
 

Enumeration values:
ActionBackspace 
ActionDelete 
ActionReturn 
ActionKill 

Definition at line 109 of file qtextedit.h.

enum Qt3::QTextEdit::VerticalAlignment
 

Enumeration values:
AlignNormal 
AlignSuperScript 
AlignSubScript 

Definition at line 131 of file qtextedit.h.

enum Qt3::QTextEdit::WordWrap
 

Enumeration values:
NoWrap 
WidgetWidth 
FixedPixelWidth 
FixedColumnWidth 

Definition at line 96 of file qtextedit.h.

enum Qt3::QTextEdit::WrapPolicy
 

Enumeration values:
AtWordBoundary 
Anywhere 
AtWhiteSpace 

Definition at line 103 of file qtextedit.h.


Constructor & Destructor Documentation

QTextEdit::QTextEdit const QString text,
const QString context = QString::null,
QWidget *  parent = 0,
const char *  name = 0
 

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, {

image.png
}, and the context is "path/to/look/in", the QMimeSourceFactory will try to load the image from "path/to/look/in/image.png". If the tag was {
image.png
}, the context will not be used (because QMimeSourceFactory recognizes that we have used an absolute path) and will try to load "/image.png". The context is applied in exactly the same way to hrefs, for example, {Target}, would resolve to "path/to/look/in/target.html".

Definition at line 653 of file qtextedit.cpp.

References init(), and setText().

QTextEdit::QTextEdit QWidget *  parent = 0,
const char *  name = 0
 

Constructs an empty QTextEdit with parent parent and name name.

Definition at line 625 of file qtextedit.cpp.

References init().

QTextEdit::~QTextEdit  )  [virtual]
 

Definition at line 664 of file qtextedit.cpp.

References cursor, d, Qt3::QTextEdit::UndoRedoInfo::d, doc, and undoRedoInfo.


Member Function Documentation

int QTextEdit::alignment  )  const
 

Returns the alignment of the current paragraph.

See also:
setAlignment()

Definition at line 3253 of file qtextedit.cpp.

References currentAlignment.

QString QTextEdit::anchorAt const QPoint &  pos  ) 
 

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().

void QTextEdit::append const QString text  )  [virtual, slot]
 

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().

void QTextEdit::autoScrollTimerDone  )  [private, slot]
 

Definition at line 1877 of file qtextedit.cpp.

References handleMouseMove(), mousePressed, and pos.

Referenced by init().

void QTextEdit::blinkCursor  )  [private, slot]
 

Definition at line 2898 of file qtextedit.cpp.

References blinkCursorVisible, cursorVisible, and drawCursor().

Referenced by init().

bool QTextEdit::bold  )  const
 

Returns TRUE if the current format is bold; otherwise returns FALSE.

See also:
setBold()

Definition at line 3184 of file qtextedit.cpp.

References currentFormat, and Qt3::QTextFormat::font().

int QTextEdit::charAt const QPoint &  pos,
int *  para
const
 

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().

void QTextEdit::checkUndoRedoInfo UndoRedoInfo::Type  t  )  [private]
 

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().

void QTextEdit::clear  )  [virtual, slot]
 

Deletes all the text in the text edit.

See also:
cut() removeSelectedText() setText()

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.

void QTextEdit::clearParagraphBackground int  para  )  [virtual, slot]
 

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().

void QTextEdit::clearUndoRedo  )  [private]
 

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().

QColor QTextEdit::color  )  const
 

Returns the color of the current format.

See also:
setColor() setPaper()

Definition at line 3230 of file qtextedit.cpp.

References Qt3::QTextFormat::color(), and currentFormat.

Referenced by init().

void QTextEdit::contentsDragEnterEvent QDragEnterEvent *  e  )  [protected]
 

Definition at line 1775 of file qtextedit.cpp.

References inDnD, isReadOnly(), and TRUE.

void QTextEdit::contentsDragLeaveEvent QDragLeaveEvent *  e  )  [protected]
 

Definition at line 1801 of file qtextedit.cpp.

References FALSE, and inDnD.

void QTextEdit::contentsDragMoveEvent QDragMoveEvent *  e  )  [protected]
 

Definition at line 1787 of file qtextedit.cpp.

References cursor, drawCursor(), FALSE, isReadOnly(), placeCursor(), and TRUE.

void QTextEdit::contentsDropEvent QDropEvent *  e  )  [protected]
 

Definition at line 1808 of file qtextedit.cpp.

References cursor, doc, drawCursor(), FALSE, Qt3::QTextDocument::hasSelection(), Qt3::QTextCursor::index(), inDnD, insert(), isReadOnly(), Qt3::QTextCursor::nestedDepth(), Qt3::QTextCursor::paragraph(), removeSelectedText(), Qt3::QTextDocument::removeSelection(), Qt3::QTextCursor::restoreState(), Qt3::QTextDocument::selectionEndCursor(), Qt3::QTextDocument::selectionStartCursor(), Qt3::QTextCursor::setIndex(), Qt3::QTextCursor::setParagraph(), Qt3::QTextDocument::Standard, text(), TRUE, and undo().

void QTextEdit::contentsMouseDoubleClickEvent QMouseEvent *  e  )  [protected]
 

Definition at line 1751 of file qtextedit.cpp.

References Qt3::QTextCursor::atParagEnd(), cursor, doc, Qt3::QTextCursor::gotoNextWord(), Qt3::QTextCursor::gotoPreviousWord(), Qt3::QTextCursor::index(), inDoubleClick, mousePressed, Qt3::QTextCursor::paragraph(), repaintChanged(), Qt3::QTextDocument::setSelectionEnd(), Qt3::QTextDocument::setSelectionStart(), Qt3::QTextDocument::Standard, and TRUE.

void QTextEdit::contentsMouseMoveEvent QMouseEvent *  e  )  [protected]
 

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().

void QTextEdit::contentsMousePressEvent QMouseEvent *  e  )  [protected]
 

Definition at line 1595 of file qtextedit.cpp.

References clearUndoRedo(), cursor, doc, dragStartPos, dragStartTimer, drawCursor(), ensureCursorVisible(), FALSE, Qt3::QTextDocument::hasSelection(), i, Qt3::QTextCursor::index(), Qt3::QTextDocument::inSelection(), isReadOnly(), linksEnabled(), mightStartDrag, mousePos, mousePressed, QString::null, Qt3::QTextCursor::paragraph(), placeCursor(), pressedLink, redraw(), Qt3::QTextDocument::removeSelection(), repaintChanged(), Qt3::QTextDocument::setSelectionEnd(), Qt3::QTextDocument::setSelectionStart(), Qt3::QTextDocument::Standard, TRUE, and updateCurrentFormat().

void QTextEdit::contentsMouseReleaseEvent QMouseEvent *  e  )  [protected]
 

Definition at line 1708 of file qtextedit.cpp.

References Qt3::QTextDocument::context(), copyAvailable(), cursor, cursorPositionChanged(), doc, dragStartTimer, drawCursor(), emitLinkClicked(), FALSE, Qt3::QTextDocument::hasSelection(), inDoubleClick, QString::isEmpty(), linksEnabled(), mightStartDrag, mousePressed, onLink, pressedLink, Qt3::QTextDocument::removeSelection(), scrollTimer, selectAll(), selectionChanged(), Qt3::QTextDocument::Standard, TRUE, u, updateCurrentFormat(), and updateCursor().

void QTextEdit::contentsWheelEvent QWheelEvent *  e  )  [protected]
 

Definition at line 1578 of file qtextedit.cpp.

References isReadOnly(), zoomIn(), and zoomOut().

QString QTextEdit::context  )  const
 

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.

See also:
text

Definition at line 3609 of file qtextedit.cpp.

void QTextEdit::copy  )  [virtual, slot]
 

Copies any selected text (from selection 0) to the clipboard.

See also:
hasSelectedText() copyAvailable()

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().

void QTextEdit::copyAvailable bool  yes  )  [signal]
 

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.

See also:
selectionChanged()

Referenced by contentsMouseReleaseEvent(), moveCursor(), and selectAll().

QPopupMenu * QTextEdit::createPopupMenu  )  [protected, virtual]
 

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.

QPopupMenu * QTextEdit::createPopupMenu const QPoint &  pos  )  [protected, virtual]
 

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.

void QTextEdit::currentAlignmentChanged int  a  )  [signal]
 

This signal is emitted if the alignment of the current paragraph has changed.

The new alignment is a.

See also:
setAlignment()

Referenced by handleMouseMove(), setAlignment(), and updateCurrentFormat().

void QTextEdit::currentColorChanged const QColor &  c  )  [signal]
 

This signal is emitted if the color of the current format has changed.

The new color is c.

See also:
setColor()

Referenced by handleMouseMove(), setFormat(), and updateCurrentFormat().

void QTextEdit::currentFontChanged const QFont &  f  )  [signal]
 

This signal is emitted if the font of the current format has changed.

The new font is f.

See also:
setCurrentFont()

Referenced by handleMouseMove(), setFormat(), and updateCurrentFormat().

void QTextEdit::currentVerticalAlignmentChanged VerticalAlignment  a  )  [signal]
 

This signal is emitted if the vertical alignment of the current format has changed.

The new vertical alignment is a.

See also:
setVerticalAlignment()

Referenced by handleMouseMove(), setFormat(), and updateCurrentFormat().

void QTextEdit::cursorPositionChanged int  para,
int  pos
[signal]
 

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.

See also:
setCursorPosition()

void QTextEdit::cursorPositionChanged QTextCursor c  )  [signal]
 

This signal is emitted if the position of the cursor changed. c points to the text cursor object.

See also:
setCursorPosition()

Referenced by clear(), contentsMouseReleaseEvent(), keyPressEvent(), and setCursorPosition().

void QTextEdit::cut  )  [virtual, slot]
 

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.

See also:
QTextEdit::copy() paste() pasteSubType()

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().

void QTextEdit::del  )  [virtual, slot]
 

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.

See also:
removeSelectedText() cut()

Definition at line 3326 of file qtextedit.cpp.

References ActionDelete, doKeyboardAction(), removeSelectedText(), and Qt3::QTextDocument::Standard.

Referenced by keyPressEvent().

void QTextEdit::doChangeInterval  )  [protected, virtual, slot]
 

For internal use only.

Definition at line 2049 of file qtextedit.cpp.

References interval.

Referenced by init().

QTextDocument * Qt3::QTextEdit::document  )  const [inline, protected]
 

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().

QString Qt3::QTextEdit::documentTitle  )  const
 

void QTextEdit::documentWidthChanged int  w  )  [private, slot]
 

Definition at line 3678 of file qtextedit.cpp.

Referenced by init().

void QTextEdit::doKeyboardAction KeyboardAction  action  )  [virtual, slot]
 

Executes keyboard action action. This is normally called by a key event handler.

Definition at line 1156 of file qtextedit.cpp.

References ActionBackspace, ActionDelete, ActionKill, ActionReturn, Qt3::QTextCursor::atParagEnd(), Qt3::QTextCursor::atParagStart(), checkUndoRedoInfo(), clearUndoRedo(), cursor, Qt3::QTextEdit::UndoRedoInfo::d, Qt3::QTextEdit::UndoRedoInfo::Delete, doc, drawCursor(), Qt3::QTextEdit::UndoRedoInfo::eid, ensureCursorVisible(), FALSE, formatMore(), Qt3::QTextCursor::gotoNextLetter(), Qt3::QTextCursor::gotoPreviousLetter(), Qt3::QTextEdit::UndoRedoInfo::id, Qt3::QTextCursor::index(), Qt3::QTextEdit::UndoRedoInfo::index, Qt3::QTextString::insert(), Qt3::QTextParagraph::invalidate(), isReadOnly(), lastFormatted, Qt3::QTextString::length(), Qt3::QTextCursor::nestedDepth(), QString::null, Qt3::QTextCursor::paragraph(), QTextStyleCommand::readStyleInformation(), Qt3::QTextCursor::remove(), removeSelectedText(), repaintChanged(), Qt3::QTextEdit::UndoRedoInfo::Return, Qt::RichText, Qt3::QTextCursor::setIndex(), setModified(), Qt3::QTextDocument::setSelectionEnd(), Qt3::QTextDocument::setSelectionStart(), Qt3::QTextCursor::splitAndInsertEmptyParagraph(), Qt3::QTextEdit::UndoRedoInfo::Style, Qt3::QTextEdit::UndoRedoInfo::styleInformation, Qt3::QTextDocument::Temp, QUndoRedoInfoPrivate::text, textChanged(), textFormat(), TRUE, Qt3::QTextEdit::UndoRedoInfo::type, undoRedoInfo, updateCurrentFormat(), updateMicroFocusHint(), and Qt3::QTextEdit::UndoRedoInfo::valid().

Referenced by del(), and keyPressEvent().

void QTextEdit::doResize  )  [private, slot]
 

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().

void QTextEdit::drawContents QPainter *   )  [private]
 

Definition at line 797 of file qtextedit.cpp.

void QTextEdit::drawContents QPainter *  p,
int  cx,
int  cy,
int  cw,
int  ch
[protected]
 

Definition at line 780 of file qtextedit.cpp.

References document(), l, pageSize, paintDocument(), TRUE, and v.

void QTextEdit::drawCursor bool  visible  )  [protected]
 

For internal use only.

Definition at line 1524 of file qtextedit.cpp.

References Qt3::AlignJustify, cursor, cursorVisible, doc, Qt3::QTextDocument::drawParagraph(), Qt3::QTextCursor::index(), inDnD, isReadOnly(), Qt3::QTextCursor::nestedDepth(), p, Qt3::QTextDocument::paper(), Qt3::QTextCursor::paragraph(), pix, selectedText(), Qt3::QTextCursor::topParagraph(), Qt3::QTextCursor::totalOffsetX(), Qt3::QTextCursor::totalOffsetY(), TRUE, Qt3::QTextCursor::x(), Opie::MM::x, and Qt3::QTextCursor::y().

Referenced by append(), blinkCursor(), contentsDragMoveEvent(), contentsDropEvent(), contentsMousePressEvent(), contentsMouseReleaseEvent(), doKeyboardAction(), eventFilter(), find(), handleMouseMove(), indent(), insert(), keyPressEvent(), moveCursor(), redo(), removeParagraph(), removeSelectedText(), setAlignment(), setCursorPosition(), setEnabled(), setFormat(), setParagType(), setSelection(), and undo().

virtual void Qt3::QTextEdit::emitHighlighted const QString  )  [inline, private, virtual]
 

Definition at line 396 of file qtextedit.h.

Referenced by updateCursor().

virtual void Qt3::QTextEdit::emitLinkClicked const QString  )  [inline, private, virtual]
 

Definition at line 397 of file qtextedit.h.

Referenced by contentsMouseReleaseEvent(), and handleReadOnlyKeyEvent().

void QTextEdit::ensureCursorVisible  )  [virtual, slot]
 

Ensures that the cursor is visible by scrolling the text edit if necessary.

See also:
setCursorPosition()

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().

void QTextEdit::ensureFormatted QTextParagraph p  )  [private]
 

Definition at line 4532 of file qtextedit.cpp.

References formatMore(), Qt3::QTextParagraph::isValid(), and lastFormatted.

Referenced by append(), and moveCursor().

bool QTextEdit::event QEvent *  e  )  [protected]
 

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().

bool QTextEdit::eventFilter QObject *  o,
QEvent *  e
 

Definition at line 2056 of file qtextedit.cpp.

References blinkTimer, drawCursor(), FALSE, TRUE, and updateMicroFocusHint().

QString QTextEdit::family  )  const
 

Returns the font family of the current format.

See also:
setFamily() setCurrentFont() setPointSize()

Definition at line 3207 of file qtextedit.cpp.

References currentFormat, and Qt3::QTextFormat::font().

bool QTextEdit::find const QString expr,
bool  cs,
bool  wo,
bool  forward = TRUE,
int *  para = 0,
int *  index = 0
[virtual]
 

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.

bool QTextEdit::focusNextPrevChild bool  n  )  [protected]
 

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().

QFont QTextEdit::font  )  const
 

Returns the font of the current format.

See also:
setCurrentFont() setFamily() setPointSize()

Definition at line 3242 of file qtextedit.cpp.

References currentFormat, and Qt3::QTextFormat::font().

void QTextEdit::formatMore  )  [private, slot]
 

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().

void QTextEdit::getCursorPosition int *  para,
int *  index
const
 

This function sets the *para and *index parameters to the current cursor position. para and index must be non-null int pointers.

See also:
setCursorPosition()

Definition at line 2941 of file qtextedit.cpp.

References cursor, Qt3::QTextCursor::index(), and Qt3::QTextCursor::paragraph().

bool QTextEdit::getFormat int  para,
int  index,
QFont *  font,
QColor *  color,
VerticalAlignment verticalAlignment
[virtual]
 

For internal use only.

Warning:
In Qt 3.1 we will provide a cleaer API for the functionality which is provided by this function and in Qt 4.0 this function will go away.
This function gets the format of the character at position index in paragraph para. Sets font to the character's font, color to the character's color and verticalAlignment to the character's vertical alignment.

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.

bool QTextEdit::getParagraphFormat int  para,
QFont *  font,
QColor *  color,
VerticalAlignment verticalAlignment,
int *  alignment,
QStyleSheetItem::DisplayMode displayMode,
QStyleSheetItem::ListStyle listStyle,
int *  listDepth
[virtual]
 

For internal use only.

Warning:
In Qt 3.1 we will provide a cleaer API for the functionality which is provided by this function and in Qt 4.0 this function will go away.
This function gets the format of the paragraph para. Sets font to the paragraphs's font, color to the paragraph's color, verticalAlignment to the paragraph's vertical alignment, alignment to the paragraph's alignment, displayMode to the paragraph's display mode, listStyle to the paragraph's list style (if the display mode is QStyleSheetItem::DisplayListItem) and listDepth to the depth of the list (if the display mode is QStyleSheetItem::DisplayListItem).

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.

void QTextEdit::getSelection int *  paraFrom,
int *  indexFrom,
int *  paraTo,
int *  indexTo,
int  selNum = 0
const
 

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).

See also:
setSelection() selectedText

Definition at line 3021 of file qtextedit.cpp.

References doc, Qt3::QTextDocument::hasSelection(), Qt3::QTextDocument::selectionEnd(), and Qt3::QTextDocument::selectionStart().

void QTextEdit::handleMouseMove const QPoint &  pos  )  [private]
 

Definition at line 1883 of file qtextedit.cpp.

References block_set_alignment, Qt3::QTextFormat::color(), currentAlignment, currentAlignmentChanged(), currentColorChanged(), currentFontChanged(), currentFormat, currentVerticalAlignmentChanged(), cursor, diff(), doc, drawCursor(), ensureCursorVisible(), FALSE, Qt3::QTextFormat::font(), Qt3::QTextDocument::formatCollection(), Qt3::QTextCursor::gotoNextWord(), Qt3::QTextCursor::gotoPreviousWord(), Qt3::QTextDocument::hasSelection(), Qt3::QTextCursor::index(), inDoubleClick, Qt3::QTextFormat::isMisspelled(), Qt3::QTextFormat::key(), mousePos, mousePressed, Qt3::QTextCursor::paragraph(), placeCursor(), redraw(), Qt3::QTextFormat::removeRef(), repaintChanged(), scrollTimer, Qt3::QTextDocument::setSelectionEnd(), Qt3::QTextDocument::Standard, TRUE, and Qt3::QTextFormat::vAlign().

Referenced by autoScrollTimerDone(), and contentsMouseMoveEvent().

bool QTextEdit::handleReadOnlyKeyEvent QKeyEvent *  e  )  [private]
 

Definition at line 3546 of file qtextedit.cpp.

References copy(), emitLinkClicked(), FALSE, isReadOnly(), Key_C, Key_F16, TRUE, and u.

Referenced by keyPressEvent().

bool Qt3::QTextEdit::hasSelectedText  )  const
 

Referenced by paintDocument().

int QTextEdit::heightForWidth int  w  )  const
 

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.

void QTextEdit::indent  )  [virtual, slot]
 

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().

void QTextEdit::init  )  [private]
 

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().

void QTextEdit::insert const QString text,
bool  indent,
bool  checkNewLine,
bool  removeSelected
[virtual, slot]
 

Inserts text at the current cursor position. If indent is TRUE, the paragraph is re-indented. If checkNewLine is TRUE, newline characters in text result in hard line breaks (i.e. new paragraphs). If checkNewLine is FALSE and there are newlines in text, the behavior is undefined. If checkNewLine is FALSE the behaviour of the editor is undefined if the text contains newlines. If removeSelected is TRUE, any selected text (in selection 0) is removed before the text is inserted.

See also:
paste() pasteSubType()

Definition at line 2084 of file qtextedit.cpp.

References checkUndoRedoInfo(), currentFormat, cursor, Qt3::QTextEdit::UndoRedoInfo::d, doc, drawCursor(), ensureCursorVisible(), FALSE, Qt3::QTextFormat::Format, formatMore(), Qt3::QTextCursor::gotoNextLetter(), Qt3::QTextDocument::hasSelection(), i, Qt3::QTextEdit::UndoRedoInfo::id, Qt3::QTextCursor::indent(), Qt3::QTextCursor::index(), Qt3::QTextEdit::UndoRedoInfo::index, Qt3::QTextCursor::insert(), Qt3::QTextEdit::UndoRedoInfo::Insert, isReadOnly(), lastFormatted, QString::length(), Qt3::QTextString::length(), Qt3::QTextCursor::nestedDepth(), QString::null, Qt3::QTextCursor::paragraph(), Qt3::QTextDocument::preProcessor(), removeSelectedText(), Qt3::QTextDocument::removeSelection(), repaintChanged(), Qt3::QTextString::setFormat(), Qt3::QTextDocument::setFormat(), setModified(), Qt3::QTextDocument::setSelectionEnd(), Qt3::QTextDocument::setSelectionStart(), Qt3::QTextDocument::Standard, Qt3::QTextDocument::Temp, QUndoRedoInfoPrivate::text, textChanged(), TRUE, undoEnabled, undoRedoInfo, updateMicroFocusHint(), Qt3::QTextDocument::useFormatCollection(), and Qt3::QTextEdit::UndoRedoInfo::valid().

Referenced by contentsDropEvent(), insertAt(), keyPressEvent(), and pasteSubType().

void QTextEdit::insertAt const QString text,
int  para,
int  index
[virtual, slot]
 

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.

void QTextEdit::insertParagraph const QString text,
int  para
[virtual, slot]
 

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.

bool QTextEdit::isModified  )  const
 

Definition at line 3156 of file qtextedit.cpp.

References modified.

Referenced by setModified(), and setText().

bool Qt3::QTextEdit::isOverwriteMode  )  const [inline]
 

Definition at line 212 of file qtextedit.h.

bool Qt3::QTextEdit::isReadOnly  )  const [inline]
 

Definition at line 187 of file qtextedit.h.

Referenced by append(), contentsDragEnterEvent(), contentsDragMoveEvent(), contentsDropEvent(), contentsMouseMoveEvent(), contentsMousePressEvent(), contentsWheelEvent(), createPopupMenu(), cut(), doKeyboardAction(), drawCursor(), event(), find(), focusNextPrevChild(), handleReadOnlyKeyEvent(), indent(), init(), insert(), keyPressEvent(), moveCursor(), paintDocument(), paste(), pasteSubType(), redo(), removeSelectedText(), selectAll(), setAlignment(), setParagType(), setText(), startDrag(), undo(), and updateCursor().

bool QTextEdit::isRedoAvailable  )  const
 

Returns whether redo is available

Definition at line 4527 of file qtextedit.cpp.

bool QTextEdit::isUndoAvailable  )  const
 

Returns whether undo is available

Definition at line 4520 of file qtextedit.cpp.

References undoRedoInfo, and Qt3::QTextEdit::UndoRedoInfo::valid().

bool QTextEdit::isUndoRedoEnabled  )  const
 

Definition at line 4513 of file qtextedit.cpp.

References undoEnabled.

bool QTextEdit::italic  )  const
 

Returns TRUE if the current format is italic; otherwise returns FALSE.

See also:
setItalic()

Definition at line 3173 of file qtextedit.cpp.

References currentFormat, and Qt3::QTextFormat::font().

void QTextEdit::keyPressEvent QKeyEvent *  e  )  [protected]
 

Processes the key event, e. By default key events are used to provide keyboard navigation and text editing.

Definition at line 890 of file qtextedit.cpp.

References ActionBackspace, ActionDelete, ActionKill, ActionReturn, Qt3::QTextCursor::atParagEnd(), Qt3::QTextCursor::atParagStart(), changeIntervalTimer, clearUndoRedo(), copy(), cursor, cursorPositionChanged(), cut(), del(), Qt3::QStyleSheetItem::DisplayListItem, doc, doKeyboardAction(), drawCursor(), Qt3::QTextEdit::UndoRedoInfo::eid, FALSE, handleReadOnlyKeyEvent(), Qt3::QTextDocument::hasSelection(), i, Qt3::QTextEdit::UndoRedoInfo::id, indent(), Qt3::QTextCursor::index(), insert(), interval, isReadOnly(), Key_A, Key_B, Key_C, Key_D, Key_E, Key_F, Key_F16, Key_F18, Key_F20, Key_H, Key_I, Key_K, Key_N, Key_P, Key_T, Key_V, Key_X, Key_Y, Key_Z, l, QString::length(), Qt3::QStyleSheetItem::ListDisc, QChar::mirrored(), QChar::mirroredChar(), MoveBackward, moveCursor(), MoveDown, MoveEnd, MoveForward, MoveHome, MoveLineEnd, MoveLineStart, MovePgDown, MovePgUp, MoveUp, MoveWordBackward, MoveWordForward, overWrite, p, Qt3::QTextCursor::paragraph(), paste(), QTextStyleCommand::readStyleInformation(), redo(), Qt3::QTextCursor::remove(), removeSelectedText(), Qt3::QTextDocument::removeSelection(), repaintChanged(), returnPressed(), Qt::RichText, selectAll(), setParagType(), Qt3::QTextDocument::Standard, Qt3::QTextParagraph::string(), Qt3::QTextEdit::UndoRedoInfo::Style, Qt3::QTextEdit::UndoRedoInfo::styleInformation, t, textFormat(), TRUE, Qt3::QTextEdit::UndoRedoInfo::type, undo(), undoRedoInfo, and QString::unicode().

int Qt3::QTextEdit::length  )  const
 

Referenced by createPopupMenu(), and readFormats().

int QTextEdit::lineOfChar int  para,
int  index
 

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().

int QTextEdit::lines  )  const
 

Returns the number of lines in the text edit; this could be 0.

Warning:
This function may be slow. Lines change all the time during word wrapping, so this function has to iterate over all the paragraphs and get the number of lines from each one individually.

Definition at line 3108 of file qtextedit.cpp.

References doc, Qt3::QTextDocument::firstParagraph(), l, Qt3::QTextParagraph::lines(), Qt3::QTextParagraph::next(), and p.

int QTextEdit::linesOfParagraph int  para  )  const
 

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().

virtual bool Qt3::QTextEdit::linksEnabled  )  const [inline, private, virtual]
 

Definition at line 382 of file qtextedit.h.

References FALSE.

Referenced by contentsMousePressEvent(), contentsMouseReleaseEvent(), focusNextPrevChild(), and updateCursor().

bool Qt3::QTextEdit::linkUnderline  )  const
 

void QTextEdit::makeParagVisible QTextParagraph p  )  [private]
 

Definition at line 3628 of file qtextedit.cpp.

References Qt3::QTextParagraph::rect().

Referenced by focusNextPrevChild().

QMimeSourceFactory * QTextEdit::mimeSourceFactory  )  const
 

Returns the QMimeSourceFactory which is currently used by this text edit.

See also:
setMimeSourceFactory()

Definition at line 3447 of file qtextedit.cpp.

void QTextEdit::modificationChanged bool  m  )  [signal]
 

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.

See also:
modified

Referenced by setModified().

void QTextEdit::moveCursor CursorAction  action  )  [private]
 

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().

void QTextEdit::moveCursor CursorAction  action,
bool  select
[virtual, slot]
 

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().

void QTextEdit::paintDocument bool  drawAll,
QPainter *  p,
int  cx = -1,
int  cy = -1,
int  cw = -1,
int  ch = -1
[private]
 

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().

QBrush Qt3::QTextEdit::paper  )  const
 

int QTextEdit::paragraphAt const QPoint &  pos  )  const
 

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().

QColor QTextEdit::paragraphBackgroundColor int  para  )  const
 

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.

int QTextEdit::paragraphLength int  para  )  const
 

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().

QRect QTextEdit::paragraphRect int  para  )  const
 

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().

int QTextEdit::paragraphs  )  const
 

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().

void QTextEdit::paste  )  [virtual, slot]
 

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.

See also:
pasteSubType() cut() QTextEdit::copy()

Definition at line 2315 of file qtextedit.cpp.

References isReadOnly(), pasteSubType(), and updateMicroFocusHint().

Referenced by keyPressEvent().

void QTextEdit::pasteSpecial const QPoint &  pt  )  [private]
 

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.

void QTextEdit::pasteSubType const QCString subtype  )  [virtual, slot]
 

Pastes the text with format subtype from the clipboard into the text edit at the current cursor position. The subtype can be "plain" or "html".

If there is no text with format subtype in the clipboard nothing happens.

See also:
paste() cut() QTextEdit::copy()

Definition at line 3716 of file qtextedit.cpp.

References checkUndoRedoInfo(), Qt3::QTextEdit::UndoRedoInfo::clear(), cursor, Qt3::QTextEdit::UndoRedoInfo::d, ensureCursorVisible(), FALSE, QString::find(), formatMore(), QString::fromLatin1(), Qt3::QTextCursor::gotoNextLetter(), i, Qt3::QTextEdit::UndoRedoInfo::id, Qt3::QTextCursor::index(), Qt3::QTextEdit::UndoRedoInfo::index, insert(), Qt3::QTextEdit::UndoRedoInfo::Insert, QString::isEmpty(), isReadOnly(), lastFormatted, QString::length(), Qt3::QTextString::length(), QString::null, Qt3::QTextCursor::paragraph(), Qt3::QTextParagraph::prev(), QString::remove(), removeSelectedText(), removeSelection(), repaintChanged(), QString::replace(), setFormat(), setModified(), Qt3::QTextDocument::Standard, QString::startsWith(), t, Qt3::QTextDocument::Temp, QUndoRedoInfoPrivate::text, textChanged(), TRUE, undoEnabled, undoRedoInfo, and Qt3::QTextEdit::UndoRedoInfo::valid().

Referenced by paste(), and pasteSpecial().

QCString QTextEdit::pickSpecial QMimeSource *  ms,
bool  always_ask,
const QPoint & 
[private]
 

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().

void QTextEdit::placeCursor const QPoint &  pos,
QTextCursor c,
bool  link
[private]
 

Definition at line 1964 of file qtextedit.cpp.

References cursor, doc, Qt3::QTextDocument::firstParagraph(), Qt3::QTextCursor::place(), Qt3::QTextCursor::restoreState(), s, and updateMicroFocusHint().

void QTextEdit::placeCursor const QPoint &  pos,
QTextCursor c = 0
[virtual, slot]
 

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.

See also:
setCursorPosition()

Definition at line 4573 of file qtextedit.cpp.

References FALSE.

Referenced by anchorAt(), contentsDragMoveEvent(), contentsMousePressEvent(), handleMouseMove(), and updateCursor().

int QTextEdit::pointSize  )  const
 

Returns the point size of the font of the current format.

See also:
setFamily() setCurrentFont() setPointSize()

Definition at line 3219 of file qtextedit.cpp.

References currentFormat, and Qt3::QTextFormat::font().

void QTextEdit::readFormats QTextCursor c1,
QTextCursor c2,
QTextString text,
bool  fillStyles = FALSE
[private]
 

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().

void QTextEdit::redo  )  [virtual, slot]
 

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.

See also:
redoAvailable() undo() undoDepth()

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().

void QTextEdit::redoAvailable bool  yes  )  [signal]
 

This signal is emitted when the availability of redo changes. If yes is TRUE, then redo() will work until redoAvailable( FALSE ) is next emitted.

See also:
redo() undoDepth()

Referenced by clearUndoRedo(), and setText().

void QTextEdit::removeParagraph int  para  )  [virtual, slot]
 

Removes the paragraph para

Definition at line 2183 of file qtextedit.cpp.

References cursor, doc, drawCursor(), FALSE, Qt3::QTextDocument::firstParagraph(), i, Qt3::QTextParagraph::invalidate(), Qt3::QTextDocument::lastParagraph(), Qt3::QTextParagraph::length(), Qt3::QTextParagraph::move(), Qt3::QTextParagraph::next(), p, Qt3::QTextDocument::paragAt(), Qt3::QTextCursor::paragraph(), Qt3::QTextParagraph::prev(), Qt3::QTextParagraph::rect(), Qt3::QTextParagraph::remove(), Qt3::QTextDocument::removeSelection(), repaintChanged(), Qt3::QTextParagraph::setEndState(), Qt3::QTextDocument::setFirstParagraph(), Qt3::QTextCursor::setIndex(), Qt3::QTextDocument::setLastParagraph(), Qt3::QTextParagraph::setParagId(), Qt3::QTextCursor::setParagraph(), start, and TRUE.

void QTextEdit::removeSelectedText int  selNum = 0  )  [virtual, slot]
 

Deletes the selected text (i.e. the default selection's text) of the selection selNum (by default, 0). If there is no selected text nothing happens.

See also:
selectedText removeSelection()

Definition at line 1318 of file qtextedit.cpp.

References checkUndoRedoInfo(), clearUndoRedo(), cursor, Qt3::QTextEdit::UndoRedoInfo::d, doc, drawCursor(), ensureCursorVisible(), FALSE, formatMore(), i, Qt3::QTextEdit::UndoRedoInfo::id, Qt3::QTextEdit::UndoRedoInfo::index, isReadOnly(), Qt3::QTextCursor::isValid(), lastFormatted, Qt3::QTextCursor::nestedDepth(), QString::null, Qt3::QTextCursor::paragraph(), readFormats(), Qt3::QTextEdit::UndoRedoInfo::RemoveSelected, Qt3::QTextDocument::removeSelectedText(), Qt3::QTextDocument::removeSelection(), repaintChanged(), Qt3::QTextCursor::restoreState(), selectionChanged(), Qt3::QTextDocument::selectionEndCursor(), Qt3::QTextDocument::selectionStart(), Qt3::QTextDocument::selectionStartCursor(), setModified(), QUndoRedoInfoPrivate::text, textChanged(), TRUE, undoRedoInfo, updateMicroFocusHint(), and Qt3::QTextEdit::UndoRedoInfo::valid().

Referenced by clear(), contentsDropEvent(), cut(), del(), doKeyboardAction(), insert(), keyPressEvent(), pasteSubType(), and startDrag().

void QTextEdit::removeSelection int  selNum = 0  )  [virtual, slot]
 

Removes the selection selNum (by default 0). This does not remove the selected text.

See also:
removeSelectedText()

Definition at line 1305 of file qtextedit.cpp.

References doc, Qt3::QTextDocument::removeSelection(), and repaintChanged().

Referenced by find(), insertAt(), and pasteSubType().

void QTextEdit::repaintChanged  )  [protected]
 

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().

void QTextEdit::resetFormat  )  [virtual, slot]
 

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().

void QTextEdit::resizeEvent QResizeEvent *  e  )  [protected]
 

Definition at line 1475 of file qtextedit.cpp.

References doc, doResize(), and Qt3::QTextDocument::visibleWidth().

void QTextEdit::returnPressed  )  [signal]
 

This signal is emitted if the user pressed the Return or the Enter key.

Referenced by keyPressEvent().

void QTextEdit::scrollToAnchor const QString name  )  [virtual, slot]
 

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().

void QTextEdit::scrollToBottom  )  [virtual, slot]
 

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().

void QTextEdit::selectAll bool  select = TRUE  )  [virtual, slot]
 

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.

See also:
selectedText

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().

QString Qt3::QTextEdit::selectedText  )  const
 

Referenced by drawCursor().

void QTextEdit::selectionChanged  )  [signal]
 

This signal is emitted whenever the selection changes.

See also:
setSelection() copyAvailable()

Referenced by contentsMouseReleaseEvent(), moveCursor(), removeSelectedText(), and selectAll().

void QTextEdit::setAlignment int  a  )  [virtual, slot]
 

Sets the alignment of the current paragraph to a. Valid alignments are Qt::AlignLeft, Qt::AlignRight, Qt::AlignJustify and Qt::AlignCenter (which centers horizontally).

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().

void QTextEdit::setBold bool  b  )  [virtual, slot]
 

If b is TRUE sets the current format to bold; otherwise sets the current format to non-bold.

See also:
bold()

Definition at line 2638 of file qtextedit.cpp.

References Qt3::QTextFormat::Bold, currentFormat, doc, f, Qt3::QTextDocument::formatCollection(), Qt3::QTextFormat::setBold(), and setFormat().

void QTextEdit::setColor const QColor &  c  )  [virtual, slot]
 

Sets the color of the current format, i.e. of the text, to c.

See also:
color() setPaper()

Definition at line 2698 of file qtextedit.cpp.

References Qt3::QTextFormat::Color, currentFormat, doc, f, Qt3::QTextDocument::formatCollection(), Qt3::QTextFormat::setColor(), and setFormat().

void Qt3::QTextEdit::setCurrentFont const QFont &  f  )  [inline, virtual, slot]
 

Sets the font of the current format to f.

See also:
font() setPointSize() setFamily()

Definition at line 447 of file qtextedit.h.

void QTextEdit::setCursorPosition int  para,
int  index
[virtual, slot]
 

Sets the cursor to position index in paragraph para.

See also:
getCursorPosition()

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().

void QTextEdit::setDocument QTextDocument dc  )  [protected]
 

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.

void QTextEdit::setEnabled bool  b  )  [slot]
 

Definition at line 4346 of file qtextedit.cpp.

References blinkTimer, drawCursor(), f, FALSE, Qt3::QTextFormat::setColor(), text(), textFormat(), and TRUE.

void QTextEdit::setFamily const QString fontFamily  )  [virtual, slot]
 

Sets the font family of the current format to fontFamily.

See also:
family() setCurrentFont()

Definition at line 2667 of file qtextedit.cpp.

References currentFormat, doc, f, Qt3::QTextFormat::Family, Qt3::QTextDocument::formatCollection(), Qt3::QTextFormat::setFamily(), and setFormat().

void QTextEdit::setFont const QFont &  f  )  [virtual, slot]
 

Definition at line 4245 of file qtextedit.cpp.

References formatMore(), lastFormatted, and repaintChanged().

Referenced by zoomIn(), zoomOut(), and zoomTo().

void QTextEdit::setFontInternal const QFont &  f  )  [private]
 

Definition at line 2720 of file qtextedit.cpp.

References currentFormat, doc, f, Qt3::QTextFormat::Font, Qt3::QTextDocument::formatCollection(), Qt3::QTextFormat::setFont(), and setFormat().

void QTextEdit::setFormat QTextFormat f,
int  flags
[virtual, slot]
 

For internal use only.

This functions sets the current format to f. Only the fields of f which are specified by the flags are used.

Definition at line 2430 of file qtextedit.cpp.

References Qt3::QTextFormat::addRef(), clearUndoRedo(), Qt3::QTextFormat::color(), currentColorChanged(), currentFontChanged(), currentFormat, currentVerticalAlignmentChanged(), cursor, Qt3::QTextEdit::UndoRedoInfo::d, doc, drawCursor(), Qt3::QTextEdit::UndoRedoInfo::eid, Qt3::QTextEdit::UndoRedoInfo::eindex, FALSE, Qt3::QTextEdit::UndoRedoInfo::flags, Qt3::QTextFormat::font(), Qt3::QTextEdit::UndoRedoInfo::format, Qt3::QTextEdit::UndoRedoInfo::Format, Qt3::QTextDocument::formatCollection(), formatMore(), Qt3::QTextDocument::hasSelection(), Qt3::QTextEdit::UndoRedoInfo::id, Qt3::QTextCursor::index(), Qt3::QTextEdit::UndoRedoInfo::index, Qt3::QTextFormat::isMisspelled(), Qt3::QTextFormat::key(), Qt3::QTextCursor::paragraph(), readFormats(), Qt3::QTextFormat::removeRef(), repaintChanged(), Qt3::QTextCursor::restoreState(), Qt3::QTextDocument::selectionEndCursor(), Qt3::QTextDocument::selectionStartCursor(), Qt3::QTextDocument::setFormat(), setModified(), Qt3::QTextDocument::Standard, QUndoRedoInfoPrivate::text, textChanged(), TRUE, Qt3::QTextEdit::UndoRedoInfo::type, undoRedoInfo, and Qt3::QTextFormat::vAlign().

Referenced by pasteSubType(), resetFormat(), setBold(), setColor(), setFamily(), setFontInternal(), setItalic(), setPointSize(), setUnderline(), and setVerticalAlignment().

void QTextEdit::setItalic bool  b  )  [virtual, slot]
 

If b is TRUE sets the current format to italic; otherwise sets the current format to non-italic.

See also:
italic()

Definition at line 2623 of file qtextedit.cpp.

References currentFormat, doc, f, Qt3::QTextDocument::formatCollection(), Qt3::QTextFormat::Italic, setFormat(), and Qt3::QTextFormat::setItalic().

void QTextEdit::setLinkUnderline bool   )  [virtual, slot]
 

Definition at line 3420 of file qtextedit.cpp.

void QTextEdit::setMimeSourceFactory QMimeSourceFactory *  factory  )  [virtual, slot]
 

Sets the text edit's mimesource factory to factory. See QMimeSourceFactory for further details.

See also:
mimeSourceFactory()

Definition at line 3436 of file qtextedit.cpp.

void QTextEdit::setModified  )  [private, slot]
 

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().

void QTextEdit::setModified bool  m  )  [virtual, slot]
 

Definition at line 3142 of file qtextedit.cpp.

References doc, Qt3::QTextDocument::invalidateOriginalText(), modificationChanged(), modified, and Qt3::QTextDocument::oTextValid.

virtual void Qt3::QTextEdit::setOverwriteMode bool  b  )  [inline, virtual, slot]
 

Definition at line 285 of file qtextedit.h.

void QTextEdit::setPalette const QPalette &  p  ) 
 

Definition at line 2479 of file qtextedit.cpp.

References doc, f, Qt3::QTextDocument::formatCollection(), Qt3::QTextFormat::setColor(), text(), and textFormat().

void QTextEdit::setPaper const QBrush &  pap  )  [virtual, slot]
 

Definition at line 3398 of file qtextedit.cpp.

void QTextEdit::setParagraphBackgroundColor int  para,
const QColor &  bg
[virtual, slot]
 

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().

void QTextEdit::setParagType QStyleSheetItem::DisplayMode  dm,
QStyleSheetItem::ListStyle  listStyle
[virtual, slot]
 

For internal use only.

Warning:
In Qt 3.1 we will provide a cleaer API for the functionality which is provided by this function and in Qt 4.0 this function will go away.
Sets the paragraph style of the current paragraph to dm. If dm is QStyleSheetItem::DisplayListItem, the type of the list item is set to listStyle.

See also:
setAlignment()

Definition at line 2502 of file qtextedit.cpp.

References clearUndoRedo(), cursor, Qt3::QStyleSheetItem::DisplayListItem, doc, drawCursor(), Qt3::QTextEdit::UndoRedoInfo::eid, end, FALSE, formatMore(), Qt3::QTextDocument::hasSelection(), Qt3::QTextEdit::UndoRedoInfo::id, Qt3::QTextParagraph::isListItem(), isReadOnly(), Qt3::QTextParagraph::listDepth(), Qt3::QTextParagraph::next(), Qt3::QTextParagraph::paragId(), Qt3::QTextCursor::paragraph(), QTextStyleCommand::readStyleInformation(), repaintChanged(), Qt3::QTextDocument::selectionEndCursor(), Qt3::QTextDocument::selectionStartCursor(), Qt3::QTextParagraph::setListDepth(), Qt3::QTextParagraph::setListItem(), Qt3::QTextParagraph::setListStyle(), setModified(), Qt3::QTextDocument::Standard, start, Qt3::QTextEdit::UndoRedoInfo::Style, Qt3::QTextEdit::UndoRedoInfo::styleInformation, textChanged(), TRUE, Qt3::QTextEdit::UndoRedoInfo::type, and undoRedoInfo.

Referenced by keyPressEvent(), and resetFormat().

void QTextEdit::setPointSize int  s  )  [virtual, slot]
 

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.

See also:
pointSize() setCurrentFont() setFamily()

Definition at line 2684 of file qtextedit.cpp.

References currentFormat, doc, f, Qt3::QTextDocument::formatCollection(), setFormat(), Qt3::QTextFormat::setPointSize(), and Qt3::QTextFormat::Size.

void QTextEdit::setReadOnly bool  b  )  [virtual, slot]
 

Definition at line 4393 of file qtextedit.cpp.

References readonly.

Referenced by init().

void QTextEdit::setSelection int  paraFrom,
int  indexFrom,
int  paraTo,
int  indexTo,
int  selNum = 0
[virtual, slot]
 

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.

See also:
getSelection() selectedText

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.

void QTextEdit::setSelectionAttributes int  selNum,
const QColor &  back,
bool  invertText
[virtual, slot]
 

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.

void QTextEdit::setStyleSheet QStyleSheet styleSheet  )  [virtual, slot]
 

Sets the stylesheet to use with this text edit to styleSheet. Changes will only take effect for new text added with setText() or append().

See also:
styleSheet()

Definition at line 3385 of file qtextedit.cpp.

void QTextEdit::setTabStopWidth int  ts  )  [virtual, slot]
 

Definition at line 4082 of file qtextedit.cpp.

References document(), formatMore(), interval, and lastFormatted.

void QTextEdit::setText const QString text,
const QString context
[virtual, slot]
 

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 AutoText, i.e. the text edit autodetects the format from text.

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.

See also:
text(), setTextFormat()

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.

void Qt3::QTextEdit::setText const QString txt  )  [inline, slot]
 

Definition at line 233 of file qtextedit.h.

References QString::null.

Referenced by QTextEdit().

void QTextEdit::setTextFormat TextFormat  f  )  [virtual, slot]
 

Definition at line 3055 of file qtextedit.cpp.

References doc, and Qt3::QTextDocument::setTextFormat().

void QTextEdit::setUnderline bool  b  )  [virtual, slot]
 

If b is TRUE sets the current format to underline; otherwise sets the current format to non-underline.

See also:
underline()

Definition at line 2653 of file qtextedit.cpp.

References currentFormat, doc, f, Qt3::QTextDocument::formatCollection(), setFormat(), Qt3::QTextFormat::setUnderline(), and Qt3::QTextFormat::Underline.

void QTextEdit::setUndoDepth int  d  )  [virtual, slot]
 

Definition at line 4077 of file qtextedit.cpp.

References document().

void QTextEdit::setUndoRedoEnabled bool  b  )  [virtual, slot]
 

Definition at line 4508 of file qtextedit.cpp.

References undoEnabled.

void QTextEdit::setVerticalAlignment VerticalAlignment  a  )  [virtual, slot]
 

Sets the vertical alignment of the current format, i.e. of the text, to a.

See also:
color() setPaper()

Definition at line 2712 of file qtextedit.cpp.

References currentFormat, doc, f, Qt3::QTextDocument::formatCollection(), setFormat(), Qt3::QTextFormat::setVAlign(), and Qt3::QTextFormat::VAlign.

void QTextEdit::setWordWrap WordWrap  mode  )  [virtual, slot]
 

Definition at line 3887 of file qtextedit.cpp.

References document(), doResize(), FALSE, FixedColumnWidth, FixedPixelWidth, formatMore(), interval, lastFormatted, NoWrap, setWrapColumnOrWidth(), TRUE, WidgetWidth, wrapMode, and wrapWidth.

void QTextEdit::setWrapColumnOrWidth int   )  [virtual, slot]
 

Definition at line 3943 of file qtextedit.cpp.

References document(), FixedColumnWidth, FixedPixelWidth, formatMore(), interval, lastFormatted, wrapMode, and wrapWidth.

Referenced by setWordWrap().

void QTextEdit::setWrapPolicy WrapPolicy  policy  )  [virtual, slot]
 

Definition at line 3999 of file qtextedit.cpp.

References AtWhiteSpace, document(), formatMore(), formatter, interval, lastFormatted, Qt3::QTextFormatter::setWrapAtColumn(), Qt3::QTextFormatter::setWrapEnabled(), and wPolicy.

QSize QTextEdit::sizeHint  )  const
 

Definition at line 4094 of file qtextedit.cpp.

void QTextEdit::startDrag  )  [private, slot]
 

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().

QStyleSheet * QTextEdit::styleSheet  )  const
 

Returns the QStyleSheet which is currently used in this text edit.

See also:
setStyleSheet()

Definition at line 3374 of file qtextedit.cpp.

void QTextEdit::sync  )  [virtual, slot]
 

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().

int Qt3::QTextEdit::tabStopWidth  )  const
 

QString QTextEdit::text int  para  )  const
 

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 RichText the text will contain HTML formatting tags.

Definition at line 2744 of file qtextedit.cpp.

References doc, and Qt3::QTextDocument::text().

QString Qt3::QTextEdit::text  )  const
 

Referenced by contentsDropEvent(), createPopupMenu(), setEnabled(), setPalette(), and setText().

void QTextEdit::textChanged  )  [signal]
 

This signal is emitted whenever the text in the text edit changes.

See also:
setText() append()

Referenced by append(), doKeyboardAction(), indent(), insert(), pasteSubType(), redo(), removeSelectedText(), setAlignment(), setFormat(), setParagType(), setText(), and undo().

QTextCursor * Qt3::QTextEdit::textCursor  )  const [inline, protected]
 

Returns the text edit's text cursor.

Warning:
QTextCursor is not in the public API, but in special circumstances you might wish to use it.

Definition at line 442 of file qtextedit.h.

TextFormat Qt3::QTextEdit::textFormat  )  const
 

Referenced by doKeyboardAction(), keyPressEvent(), setEnabled(), and setPalette().

bool QTextEdit::underline  )  const
 

Returns TRUE if the current format is underlined; otherwise returns FALSE.

See also:
setUnderline()

Definition at line 3196 of file qtextedit.cpp.

References currentFormat, and Qt3::QTextFormat::font().

void QTextEdit::undo  )  [virtual, slot]
 

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.

See also:
undoAvailable() redo() undoDepth()

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().

void QTextEdit::undoAvailable bool  yes  )  [signal]
 

This signal is emitted when the availability of undo changes. If yes is TRUE, then undo() will work until undoAvailable( FALSE ) is next emitted.

See also:
undo() undoDepth()

Referenced by clearUndoRedo(), and setText().

int Qt3::QTextEdit::undoDepth  )  const
 

void QTextEdit::updateCurrentFormat  )  [private]
 

Definition at line 2589 of file qtextedit.cpp.

References block_set_alignment, currentAlignment, currentAlignmentChanged(), currentColorChanged(), currentFontChanged(), currentFormat, currentVerticalAlignmentChanged(), cursor, doc, FALSE, Qt3::QTextDocument::formatCollection(), i, Qt3::QTextCursor::index(), Qt3::QTextFormat::key(), Qt3::QTextCursor::paragraph(), TRUE, and Qt3::QTextDocument::useFormatCollection().

Referenced by contentsMousePressEvent(), contentsMouseReleaseEvent(), doKeyboardAction(), moveCursor(), setCursorPosition(), and setText().

void QTextEdit::updateCursor const QPoint &  pos  )  [private]
 

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().

void QTextEdit::updateMicroFocusHint  )  [private]
 

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().

void QTextEdit::updateStyles  )  [protected]
 

For internal use only.

This function does nothing

Definition at line 3688 of file qtextedit.cpp.

void QTextEdit::viewportResizeEvent QResizeEvent *  e  )  [protected]
 

Definition at line 1484 of file qtextedit.cpp.

References doc, doResize(), Qt3::QTextDocument::height(), and scrollToBottom().

void QTextEdit::windowActivationChange bool   )  [protected]
 

Definition at line 4384 of file qtextedit.cpp.

References active, and inactive.

WordWrap Qt3::QTextEdit::wordWrap  )  const
 

int Qt3::QTextEdit::wrapColumnOrWidth  )  const
 

WrapPolicy Qt3::QTextEdit::wrapPolicy  )  const
 

QTextEdit::zoomIn  )  [inline, virtual, slot]
 

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.

See also:
zoomOut()

Definition at line 240 of file qtextedit.h.

Referenced by contentsWheelEvent().

void QTextEdit::zoomIn int  range  )  [virtual, slot]
 

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.

See also:
zoomOut()

Definition at line 4288 of file qtextedit.cpp.

References f, and setFont().

QTextEdit::zoomOut  )  [inline, virtual, slot]
 

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.

See also:
zoomIn()

Definition at line 242 of file qtextedit.h.

Referenced by contentsWheelEvent().

void QTextEdit::zoomOut int  range  )  [virtual, slot]
 

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.

See also:
zoomIn()

Definition at line 4302 of file qtextedit.cpp.

References f, and setFont().

void QTextEdit::zoomTo int  size  )  [virtual, slot]
 

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.

References f, and setFont().


Friends And Related Function Documentation

friend class QTextBrowser [friend]
 

Definition at line 73 of file qtextedit.h.


Member Data Documentation

bool Qt3::QTextEdit::blinkCursorVisible [private]
 

Definition at line 427 of file qtextedit.h.

Referenced by blinkCursor(), and init().

QTimer * Qt3::QTextEdit::blinkTimer [private]
 

Definition at line 410 of file qtextedit.h.

Referenced by eventFilter(), init(), and setEnabled().

QTimer * Qt3::QTextEdit::changeIntervalTimer [private]
 

Definition at line 410 of file qtextedit.h.

Referenced by init(), and keyPressEvent().

int Qt3::QTextEdit::currentAlignment [private]
 

Definition at line 415 of file qtextedit.h.

Referenced by alignment(), handleMouseMove(), init(), setAlignment(), and updateCurrentFormat().

QTextFormat* Qt3::QTextEdit::currentFormat [private]
 

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().

QTextCursor* Qt3::QTextEdit::cursor [private]
 

Definition at line 409 of file qtextedit.h.

Referenced by append(), clear(), contentsDragMoveEvent(), contentsDropEvent(), contentsMouseDoubleClickEvent(), contentsMousePressEvent(), contentsMouseReleaseEvent(), doKeyboardAction(), drawCursor(), ensureCursorVisible(), find(), getCursorPosition(), handleMouseMove(), indent(), init(), insert(), insertAt(), keyPressEvent(), moveCursor(), paintDocument(), pasteSubType(), placeCursor(), redo(), removeParagraph(), removeSelectedText(), scrollToAnchor(), setAlignment(), setCursorPosition(), setDocument(), setFormat(), setParagType(), setSelection(), setText(), undo(), updateCurrentFormat(), updateCursor(), updateMicroFocusHint(), and ~QTextEdit().

bool Qt3::QTextEdit::cursorVisible [private]
 

Definition at line 426 of file qtextedit.h.

Referenced by append(), blinkCursor(), drawCursor(), init(), and paintDocument().

QTextEditPrivate* Qt3::QTextEdit::d [private]
 

Definition at line 423 of file qtextedit.h.

Referenced by createPopupMenu(), ensureCursorVisible(), event(), init(), scrollToAnchor(), setText(), updateMicroFocusHint(), and ~QTextEdit().

QTextDocument* Qt3::QTextEdit::doc [private]
 

Definition at line 408 of file qtextedit.h.

Referenced by contentsDropEvent(), contentsMouseDoubleClickEvent(), contentsMouseMoveEvent(), contentsMousePressEvent(), contentsMouseReleaseEvent(), copy(), cut(), doKeyboardAction(), doResize(), drawCursor(), find(), focusNextPrevChild(), formatMore(), getSelection(), handleMouseMove(), indent(), init(), insert(), insertAt(), insertParagraph(), keyPressEvent(), lineOfChar(), lines(), linesOfParagraph(), moveCursor(), paintDocument(), paragraphLength(), paragraphs(), placeCursor(), redo(), removeParagraph(), removeSelectedText(), removeSelection(), resizeEvent(), selectAll(), setAlignment(), setBold(), setColor(), setCursorPosition(), setFamily(), setFontInternal(), setFormat(), setItalic(), setModified(), setPalette(), setParagType(), setPointSize(), setSelection(), setText(), setTextFormat(), setUnderline(), setVerticalAlignment(), startDrag(), text(), undo(), updateCurrentFormat(), viewportResizeEvent(), and ~QTextEdit().

QPoint Qt3::QTextEdit::dragStartPos [private]
 

Definition at line 417 of file qtextedit.h.

Referenced by contentsMouseMoveEvent(), and contentsMousePressEvent().

QTimer * Qt3::QTextEdit::dragStartTimer [private]
 

Definition at line 410 of file qtextedit.h.

Referenced by contentsMouseMoveEvent(), contentsMousePressEvent(), contentsMouseReleaseEvent(), and init().

QTimer* Qt3::QTextEdit::formatTimer [private]
 

Definition at line 410 of file qtextedit.h.

Referenced by formatMore(), and init().

bool Qt3::QTextEdit::inDnD [private]
 

Definition at line 431 of file qtextedit.h.

Referenced by contentsDragEnterEvent(), contentsDragLeaveEvent(), contentsDropEvent(), drawCursor(), and init().

bool Qt3::QTextEdit::inDoubleClick [private]
 

Definition at line 424 of file qtextedit.h.

Referenced by contentsMouseDoubleClickEvent(), contentsMouseReleaseEvent(), handleMouseMove(), init(), and startDrag().

int Qt3::QTextEdit::interval [private]
 

Definition at line 412 of file qtextedit.h.

Referenced by doChangeInterval(), doResize(), formatMore(), init(), keyPressEvent(), setTabStopWidth(), setWordWrap(), setWrapColumnOrWidth(), and setWrapPolicy().

QTextParagraph* Qt3::QTextEdit::lastFormatted [private]
 

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().

bool Qt3::QTextEdit::mightStartDrag [private]
 

Definition at line 430 of file qtextedit.h.

Referenced by contentsMouseMoveEvent(), contentsMousePressEvent(), and contentsMouseReleaseEvent().

QPoint Qt3::QTextEdit::mousePos [private]
 

Definition at line 416 of file qtextedit.h.

Referenced by contentsMouseMoveEvent(), contentsMousePressEvent(), and handleMouseMove().

bool Qt3::QTextEdit::mousePressed [private]
 

Definition at line 425 of file qtextedit.h.

Referenced by autoScrollTimerDone(), contentsMouseDoubleClickEvent(), contentsMouseMoveEvent(), contentsMousePressEvent(), contentsMouseReleaseEvent(), handleMouseMove(), init(), and startDrag().

QPoint Qt3::QTextEdit::oldMousePos [private]
 

Definition at line 416 of file qtextedit.h.

Referenced by contentsMouseMoveEvent().

QString Qt3::QTextEdit::onLink [private]
 

Definition at line 418 of file qtextedit.h.

Referenced by contentsMouseReleaseEvent(), init(), and updateCursor().

bool Qt3::QTextEdit::overWrite [private]
 

Definition at line 434 of file qtextedit.h.

Referenced by init(), and keyPressEvent().

QString Qt3::QTextEdit::pressedLink [private]
 

Definition at line 422 of file qtextedit.h.

Referenced by contentsMousePressEvent(), and contentsMouseReleaseEvent().

bool Qt3::QTextEdit::readonly [private]
 

Definition at line 432 of file qtextedit.h.

Referenced by init(), setReadOnly(), and updateMicroFocusHint().

QTimer * Qt3::QTextEdit::scrollTimer [private]
 

Definition at line 410 of file qtextedit.h.

Referenced by contentsMouseReleaseEvent(), handleMouseMove(), and init().

bool Qt3::QTextEdit::undoEnabled [private]
 

Definition at line 433 of file qtextedit.h.

Referenced by init(), insert(), isUndoRedoEnabled(), pasteSubType(), redo(), setUndoRedoEnabled(), and undo().

UndoRedoInfo Qt3::QTextEdit::undoRedoInfo [private]
 

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().

WrapPolicy Qt3::QTextEdit::wPolicy [private]
 

Definition at line 420 of file qtextedit.h.

Referenced by init(), and setWrapPolicy().

WordWrap Qt3::QTextEdit::wrapMode [private]
 

Definition at line 419 of file qtextedit.h.

Referenced by doResize(), init(), setText(), setWordWrap(), and setWrapColumnOrWidth().

int Qt3::QTextEdit::wrapWidth [private]
 

Definition at line 421 of file qtextedit.h.

Referenced by init(), setText(), setWordWrap(), and setWrapColumnOrWidth().


Property Documentation

QString QTextEdit::documentTitle [read]
 

the title of the document parsed from the text.

For PlainText the title will be an empty string. For RichText the title will be the text between the {<title>} tags, if present, otherwise an empty string.

Definition at line 81 of file qtextedit.h.

bool QTextEdit::hasSelectedText [read]
 

whether some text is selected in selection 0

Definition at line 86 of file qtextedit.h.

int QTextEdit::length [read]
 

the number of characters in the text

Definition at line 82 of file qtextedit.h.

bool QTextEdit::linkUnderline [read, write]
 

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.

bool Qt3::QTextEdit::modified [read, write]
 

whether the document has been modified by the user

Definition at line 90 of file qtextedit.h.

Referenced by init(), isModified(), and setModified().

QTextEdit::overwriteMode [read, write]
 

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.

QBrush QTextEdit::paper [read, write]
 

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.

bool Qt3::QTextEdit::readOnly [read, write]
 

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.

QString QTextEdit::selectedText [read]
 

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 PlainText regardless of the text format. In a future version of Qt an HTML subset may be returned depending on the text format.

See also:
hasSelectedText

Definition at line 87 of file qtextedit.h.

int QTextEdit::tabStopWidth [read, write]
 

the tab stop width in pixels

Definition at line 93 of file qtextedit.h.

QTextEdit::text [read, write]
 

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 AutoText, i.e. the text edit autodetects the format of the text.

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.

See also:
textFormat

Definition at line 78 of file qtextedit.h.

Qt::TextFormat QTextEdit::textFormat [read, write]
 

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, PlainText or RichText. This is done by using the QStyleSheet::mightBeRichText() function.

Definition at line 75 of file qtextedit.h.

int QTextEdit::undoDepth [read, write]
 

the depth of the undo history

The maximum number of steps in the undo/redo history. The default is 100.

See also:
undo() redo()

Definition at line 88 of file qtextedit.h.

QTextEdit::undoRedoEnabled [read, write]
 

whether undo/redo is enabled

The default is TRUE.

Definition at line 92 of file qtextedit.h.

QTextEdit::WordWrap QTextEdit::wordWrap [read, write]
 

the word wrap mode

The default mode is WidgetWidth which causes words to be wrapped at the right edge of the text edit. Wrapping occurs at whitespace, keeping whole words intact. If you want wrapping to occur within words use setWrapPolicy(). If you set a wrap mode of FixedPixelWidth or FixedColumnWidth you should also call setWrapColumnOrWidth() with the width you want.

See also:
WordWrap, wrapColumnOrWidth, wrapPolicy,

Definition at line 83 of file qtextedit.h.

int QTextEdit::wrapColumnOrWidth [read, write]
 

the position (in pixels or columns depending on the wrap mode) where text will be wrapped

If the wrap mode is FixedPixelWidth, the value is the number of pixels from the left edge of the text edit at which text should be wrapped. If the wrap mode is FixedColumnWidth, the value is the column number (in character columns) from the left edge of the text edit at which text should be wrapped.

See also:
wordWrap

Definition at line 84 of file qtextedit.h.

QTextEdit::WrapPolicy QTextEdit::wrapPolicy [read, write]
 

the word wrap policy, at whitespace or anywhere

Defines where text can be wrapped when word wrap mode is not NoWrap. The choices are AtWhiteSpace (the default) and Anywhere.

See also:
wordWrap

Definition at line 85 of file qtextedit.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 18:03:47 2005 for OPIE by  doxygen 1.4.2