Eneboo - Documentación para desarrolladores
Clases | Tipos públicos | Slots públicos | Señales | Métodos públicos | Slots protegidos | Métodos protegidos | Propiedades | Amigas
Referencia de la Clase QTextEdit

The QTextEdit widget provides a powerful single-page rich text editor. Más...

#include <qtextedit.h>

Diagrama de herencias de QTextEdit
QScrollView QScrollView QFrame QFrame QFrame QFrame QWidget QWidget QWidget QWidget QWidget QWidget QWidget QWidget Editor Editor MED QIconViewItemLineEdit QMultiLineEdit QMultiLineEdit QTextBrowser QTextBrowser QTextView QTextView TextEdit

Lista de todos los miembros.

Clases

struct  UndoRedoInfo

Tipos públicos

enum  WordWrap {
  NoWrap, WidgetWidth, FixedPixelWidth, FixedColumnWidth,
  NoWrap, WidgetWidth, FixedPixelWidth, FixedColumnWidth
}
enum  WrapPolicy {
  AtWordBoundary, AtWhiteSpace = AtWordBoundary, Anywhere, AtWordOrDocumentBoundary,
  AtWordBoundary, AtWhiteSpace = AtWordBoundary, Anywhere, AtWordOrDocumentBoundary
}
enum  AutoFormatting {
  AutoNone = 0, AutoBulletList = 0x00000001, AutoAll = 0xffffffff, AutoNone = 0,
  AutoBulletList = 0x00000001, AutoAll = 0xffffffff
}
enum  KeyboardAction {
  ActionBackspace, ActionDelete, ActionReturn, ActionKill,
  ActionWordBackspace, ActionWordDelete, ActionBackspace, ActionDelete,
  ActionReturn, ActionKill, ActionWordBackspace, ActionWordDelete
}
enum  CursorAction {
  MoveBackward, MoveForward, MoveWordBackward, MoveWordForward,
  MoveUp, MoveDown, MoveLineStart, MoveLineEnd,
  MoveHome, MoveEnd, MovePgUp, MovePgDown,
  MoveBackward, MoveForward, MoveWordBackward, MoveWordForward,
  MoveUp, MoveDown, MoveLineStart, MoveLineEnd,
  MoveHome, MoveEnd, MovePgUp, MovePgDown
}
enum  VerticalAlignment {
  AlignNormal, AlignSuperScript, AlignSubScript, AlignNormal,
  AlignSuperScript, AlignSubScript
}
enum  TextInsertionFlags {
  RedoIndentation = 0x0001, CheckNewLines = 0x0002, RemoveSelected = 0x0004, RedoIndentation = 0x0001,
  CheckNewLines = 0x0002, RemoveSelected = 0x0004
}
enum  WordWrap {
  NoWrap, WidgetWidth, FixedPixelWidth, FixedColumnWidth,
  NoWrap, WidgetWidth, FixedPixelWidth, FixedColumnWidth
}
enum  WrapPolicy {
  AtWordBoundary, AtWhiteSpace = AtWordBoundary, Anywhere, AtWordOrDocumentBoundary,
  AtWordBoundary, AtWhiteSpace = AtWordBoundary, Anywhere, AtWordOrDocumentBoundary
}
enum  AutoFormatting {
  AutoNone = 0, AutoBulletList = 0x00000001, AutoAll = 0xffffffff, AutoNone = 0,
  AutoBulletList = 0x00000001, AutoAll = 0xffffffff
}
enum  KeyboardAction {
  ActionBackspace, ActionDelete, ActionReturn, ActionKill,
  ActionWordBackspace, ActionWordDelete, ActionBackspace, ActionDelete,
  ActionReturn, ActionKill, ActionWordBackspace, ActionWordDelete
}
enum  CursorAction {
  MoveBackward, MoveForward, MoveWordBackward, MoveWordForward,
  MoveUp, MoveDown, MoveLineStart, MoveLineEnd,
  MoveHome, MoveEnd, MovePgUp, MovePgDown,
  MoveBackward, MoveForward, MoveWordBackward, MoveWordForward,
  MoveUp, MoveDown, MoveLineStart, MoveLineEnd,
  MoveHome, MoveEnd, MovePgUp, MovePgDown
}
enum  VerticalAlignment {
  AlignNormal, AlignSuperScript, AlignSubScript, AlignNormal,
  AlignSuperScript, AlignSubScript
}
enum  TextInsertionFlags {
  RedoIndentation = 0x0001, CheckNewLines = 0x0002, RemoveSelected = 0x0004, RedoIndentation = 0x0001,
  CheckNewLines = 0x0002, RemoveSelected = 0x0004
}

Slots públicos

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 ()
void insert (const QString &text, uint insertionFlags=CheckNewLines|RemoveSelected)
virtual void insert (const QString &text, bool, bool=TRUE, bool=TRUE)
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)
void setTabChangesFocus (bool b)
void polish ()
void setMaxLogLines (int numLines)
int maxLogLines ()
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 ()
void insert (const QString &text, uint insertionFlags=CheckNewLines|RemoveSelected)
virtual void insert (const QString &text, bool, bool=TRUE, bool=TRUE)
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)
void setTabChangesFocus (bool b)

Señales

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)
void clicked (int parag, int index)
void doubleClicked (int parag, int index)
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)
void clicked (int parag, int index)
void doubleClicked (int parag, int index)

Métodos públicos

 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
QMimeSourceFactorymimeSourceFactory () 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)
QString anchorAt (const QPoint &pos, AnchorAttribute a)
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
QFont currentFont () 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)
bool tabChangesFocus () const
void setAutoFormatting (uint features)
uint autoFormatting () const
QSyntaxHighlightersyntaxHighlighter () const
 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
QMimeSourceFactorymimeSourceFactory () 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)
QString anchorAt (const QPoint &pos, AnchorAttribute a)
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
QFont currentFont () 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)
bool tabChangesFocus () const
void setAutoFormatting (uint features)
uint autoFormatting () const
QSyntaxHighlightersyntaxHighlighter () const

Slots protegidos

virtual void doChangeInterval ()
void sliderReleased ()
virtual void doChangeInterval ()
void sliderReleased ()

Métodos protegidos

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 imStartEvent (QIMEvent *)
void imComposeEvent (QIMEvent *)
void imEndEvent (QIMEvent *)
void contentsDragEnterEvent (QDragEnterEvent *e)
void contentsDragMoveEvent (QDragMoveEvent *e)
void contentsDragLeaveEvent (QDragLeaveEvent *e)
void contentsDropEvent (QDropEvent *e)
void contentsContextMenuEvent (QContextMenuEvent *e)
bool focusNextPrevChild (bool next)
QTextDocumentdocument () const
QTextCursortextCursor () const
void setDocument (QTextDocument *doc)
virtual QPopupMenucreatePopupMenu (const QPoint &pos)
virtual QPopupMenucreatePopupMenu ()
void drawCursor (bool visible)
void windowActivationChange (bool)
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 imStartEvent (QIMEvent *)
void imComposeEvent (QIMEvent *)
void imEndEvent (QIMEvent *)
void contentsDragEnterEvent (QDragEnterEvent *e)
void contentsDragMoveEvent (QDragMoveEvent *e)
void contentsDragLeaveEvent (QDragLeaveEvent *e)
void contentsDropEvent (QDropEvent *e)
void contentsContextMenuEvent (QContextMenuEvent *e)
bool focusNextPrevChild (bool next)
QTextDocumentdocument () const
QTextCursortextCursor () const
void setDocument (QTextDocument *doc)
virtual QPopupMenucreatePopupMenu (const QPoint &pos)
virtual QPopupMenucreatePopupMenu ()
void drawCursor (bool visible)
void windowActivationChange (bool)

Propiedades

TextFormat textFormat
 the text format: rich text, plain text, log 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
bool tabChangesFocus
 whether TAB changes focus or is accepted as input
AutoFormatting autoFormatting
 the enabled set of auto formatting features

Amigas

class QTextBrowser
class QSyntaxHighlighter

Descripción detallada

The QTextEdit widget provides a powerful single-page rich text editor.


Documentación de las enumeraciones miembro de la clase

AutoNone Do not perform any automatic formatting AutoBulletList Only automatically format bulletted lists AutoAll Apply all available autoformatting

Valores de enumeraciones:
AutoNone 
AutoBulletList 
AutoAll 
AutoNone 
AutoBulletList 
AutoAll 
Valores de enumeraciones:
AutoNone 
AutoBulletList 
AutoAll 
AutoNone 
AutoBulletList 
AutoAll 

This enum is used by moveCursor() to specify in which direction the cursor should be moved:

MoveBackward Moves the cursor one character backward

MoveWordBackward Moves the cursor one word backward

MoveForward Moves the cursor one character forward

MoveWordForward Moves the cursor one word forward

MoveUp Moves the cursor up one line

MoveDown Moves the cursor down one line

MoveLineStart Moves the cursor to the beginning of the line

MoveLineEnd Moves the cursor to the end of the line

MoveHome Moves the cursor to the beginning of the document

MoveEnd Moves the cursor to the end of the document

MovePgUp Moves the cursor one viewport page up

MovePgDown Moves the cursor one viewport page down

Valores de enumeraciones:
MoveBackward 
MoveForward 
MoveWordBackward 
MoveWordForward 
MoveUp 
MoveDown 
MoveLineStart 
MoveLineEnd 
MoveHome 
MoveEnd 
MovePgUp 
MovePgDown 
MoveBackward 
MoveForward 
MoveWordBackward 
MoveWordForward 
MoveUp 
MoveDown 
MoveLineStart 
MoveLineEnd 
MoveHome 
MoveEnd 
MovePgUp 
MovePgDown 
Valores de enumeraciones:
MoveBackward 
MoveForward 
MoveWordBackward 
MoveWordForward 
MoveUp 
MoveDown 
MoveLineStart 
MoveLineEnd 
MoveHome 
MoveEnd 
MovePgUp 
MovePgDown 
MoveBackward 
MoveForward 
MoveWordBackward 
MoveWordForward 
MoveUp 
MoveDown 
MoveLineStart 
MoveLineEnd 
MoveHome 
MoveEnd 
MovePgUp 
MovePgDown 

This enum is used by doKeyboardAction() to specify which action should be executed:

ActionBackspace Delete the character to the left of the cursor.

ActionDelete Delete the character to the right of the cursor.

ActionReturn Split the paragraph at the cursor position.

ActionKill If the cursor is not at the end of the paragraph, delete the text from the cursor position until the end of the paragraph. If the cursor is at the end of the paragraph, delete the hard line break at the end of the paragraph: this will cause this paragraph to be joined with the following paragraph.

ActionWordBackspace Delete the word to the left of the cursor position.

ActionWordDelete Delete the word to the right of the cursor position

Valores de enumeraciones:
ActionBackspace 
ActionDelete 
ActionReturn 
ActionKill 
ActionWordBackspace 
ActionWordDelete 
ActionBackspace 
ActionDelete 
ActionReturn 
ActionKill 
ActionWordBackspace 
ActionWordDelete 
Valores de enumeraciones:
ActionBackspace 
ActionDelete 
ActionReturn 
ActionKill 
ActionWordBackspace 
ActionWordDelete 
ActionBackspace 
ActionDelete 
ActionReturn 
ActionKill 
ActionWordBackspace 
ActionWordDelete 
Valores de enumeraciones:
RedoIndentation 
CheckNewLines 
RemoveSelected 
RedoIndentation 
CheckNewLines 
RemoveSelected 
Valores de enumeraciones:
RedoIndentation 
CheckNewLines 
RemoveSelected 
RedoIndentation 
CheckNewLines 
RemoveSelected 

This enum is used to set the vertical alignment of the text.

AlignNormal Normal alignment AlignSuperScript Superscript AlignSubScript Subscript

Valores de enumeraciones:
AlignNormal 
AlignSuperScript 
AlignSubScript 
AlignNormal 
AlignSuperScript 
AlignSubScript 
Valores de enumeraciones:
AlignNormal 
AlignSuperScript 
AlignSubScript 
AlignNormal 
AlignSuperScript 
AlignSubScript 
Valores de enumeraciones:
NoWrap 
WidgetWidth 
FixedPixelWidth 
FixedColumnWidth 
NoWrap 
WidgetWidth 
FixedPixelWidth 
FixedColumnWidth 

This enum defines the QTextEdit's word wrap modes.

NoWrap Do not wrap the text.

WidgetWidth Wrap the text at the current width of the widget (this is the default). Wrapping is at whitespace by default; this can be changed with setWrapPolicy().

FixedPixelWidth Wrap the text at a fixed number of pixels from the widget's left side. The number of pixels is set with wrapColumnOrWidth().

FixedColumnWidth Wrap the text at a fixed number of character columns from the widget's left side. The number of characters is set with wrapColumnOrWidth(). This is useful if you need formatted text that can also be displayed gracefully on devices with monospaced fonts, for example a standard VT100 terminal, where you might set wrapColumnOrWidth() to 80.

Ver también:
setWordWrap() wordWrap()
Valores de enumeraciones:
NoWrap 
WidgetWidth 
FixedPixelWidth 
FixedColumnWidth 
NoWrap 
WidgetWidth 
FixedPixelWidth 
FixedColumnWidth 

This enum defines where text can be wrapped in word wrap mode.

AtWhiteSpace Don't use this deprecated value (it is a synonym for AtWordBoundary which you should use instead). Anywhere Break anywhere, including within words. AtWordBoundary Break lines at word boundaries, e.g. spaces or newlines AtWordOrDocumentBoundary Break lines at whitespace, e.g. spaces or newlines if possible. Break it anywhere otherwise.

Ver también:
setWrapPolicy()
Valores de enumeraciones:
AtWordBoundary 
AtWhiteSpace 
Anywhere 
AtWordOrDocumentBoundary 
AtWordBoundary 
AtWhiteSpace 
Anywhere 
AtWordOrDocumentBoundary 
Valores de enumeraciones:
AtWordBoundary 
AtWhiteSpace 
Anywhere 
AtWordOrDocumentBoundary 
AtWordBoundary 
AtWhiteSpace 
Anywhere 
AtWordOrDocumentBoundary 

Documentación del constructor y destructor

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

Constructs a QTextEdit called name, with parent parent. 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".

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

Constructs an empty QTextEdit called name, with parent parent.

QTextEdit::~QTextEdit ( ) [virtual]
QTextEdit::QTextEdit ( const QString text,
const QString context = QString::null,
QWidget parent = 0,
const char *  name = 0 
)
QTextEdit::QTextEdit ( QWidget parent = 0,
const char *  name = 0 
)
virtual QTextEdit::~QTextEdit ( ) [virtual]

Documentación de las funciones miembro

int QTextEdit::alignment ( ) const

Returns the alignment of the current paragraph.

Ver también:
setAlignment()

Reimplementado en QMultiLineEdit y QMultiLineEdit.

int QTextEdit::alignment ( ) const

Reimplementado en QMultiLineEdit y QMultiLineEdit.

QString QTextEdit::anchorAt ( const QPoint pos)

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. If there is an anchor at position pos (in contents coordinates), its href is returned, otherwise QString::null is returned.

QString QTextEdit::anchorAt ( const QPoint pos,
AnchorAttribute  attr 
)

If there is an anchor at position pos (in contents coordinates), the text for attribute attr is returned, otherwise QString::null is returned.

QString QTextEdit::anchorAt ( const QPoint pos)
QString QTextEdit::anchorAt ( const QPoint pos,
AnchorAttribute  a 
)
void QTextEdit::append ( const QString text) [virtual, slot]

Appends a new paragraph with text to the end of the text edit. Note that the undo/redo history is cleared by this function, and no undo history is kept for appends which makes them faster than insert()s. If you want to append text which is added to the undo/redo history as well, use insertParagraph().

virtual void QTextEdit::append ( const QString text) [virtual, slot]
uint QTextEdit::autoFormatting ( ) const
uint QTextEdit::autoFormatting ( ) const
bool QTextEdit::bold ( ) const

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

Ver también:
setBold()
bool QTextEdit::bold ( ) const
int QTextEdit::charAt ( const QPoint pos,
int para 
) const
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 0, *para is set to the character's paragraph.

void QTextEdit::clear ( void  ) [virtual, slot]

Deletes all the text in the text edit.

Ver también:
cut() removeSelectedText() setText()
virtual void QTextEdit::clear ( ) [virtual, slot]
virtual void QTextEdit::clearParagraphBackground ( int  para) [virtual, slot]
void QTextEdit::clearParagraphBackground ( int  para) [virtual, slot]

Clears the background color of the paragraph para, so that the default color is used again.

void QTextEdit::clicked ( int  para,
int  pos 
) [signal]

This signal is emitted when the mouse is clicked on the paragraph para at character position pos.

Ver también:
doubleClicked()
void QTextEdit::clicked ( int  parag,
int  index 
) [signal]
QColor QTextEdit::color ( ) const

Returns the color of the current format.

Ver también:
setColor() setPaper()
QColor QTextEdit::color ( ) const
void QTextEdit::contentsContextMenuEvent ( QContextMenuEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QTextEdit::contentsContextMenuEvent ( QContextMenuEvent e) [protected, virtual]

This event handler is called whenever the QScrollView receives a contextMenuEvent() in {e}: the mouse position is translated to be a point on the contents.

Reimplementado de QScrollView.

void QTextEdit::contentsDragEnterEvent ( QDragEnterEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QTextEdit::contentsDragEnterEvent ( QDragEnterEvent ) [protected, virtual]

This event handler is called whenever the QScrollView receives a dragEnterEvent(): the drag position is translated to be a point on the contents.

Reimplementado de QScrollView.

void QTextEdit::contentsDragLeaveEvent ( QDragLeaveEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QTextEdit::contentsDragLeaveEvent ( QDragLeaveEvent ) [protected, virtual]

This event handler is called whenever the QScrollView receives a dragLeaveEvent(): the drag position is translated to be a point on the contents.

Reimplementado de QScrollView.

void QTextEdit::contentsDragMoveEvent ( QDragMoveEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QTextEdit::contentsDragMoveEvent ( QDragMoveEvent ) [protected, virtual]

This event handler is called whenever the QScrollView receives a dragMoveEvent(): the drag position is translated to be a point on the contents.

Reimplementado de QScrollView.

void QTextEdit::contentsDropEvent ( QDropEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QTextEdit::contentsDropEvent ( QDropEvent ) [protected, virtual]

This event handler is called whenever the QScrollView receives a dropEvent(): the drop position is translated to be a point on the contents.

Reimplementado de QScrollView.

void QTextEdit::contentsMouseDoubleClickEvent ( QMouseEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QTextEdit::contentsMouseDoubleClickEvent ( QMouseEvent e) [protected, virtual]

This event handler is called whenever the QScrollView receives a mouseDoubleClickEvent(): the click position in e is translated to be a point on the contents.

The default implementation generates a normal mouse press event.

Reimplementado de QScrollView.

void QTextEdit::contentsMouseMoveEvent ( QMouseEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QTextEdit::contentsMouseMoveEvent ( QMouseEvent e) [protected, virtual]

This event handler is called whenever the QScrollView receives a mouseMoveEvent(): the mouse position in e is translated to be a point on the contents.

Reimplementado de QScrollView.

void QTextEdit::contentsMousePressEvent ( QMouseEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QTextEdit::contentsMousePressEvent ( QMouseEvent e) [protected, virtual]

This event handler is called whenever the QScrollView receives a mousePressEvent(): the press position in e is translated to be a point on the contents.

Reimplementado de QScrollView.

void QTextEdit::contentsMouseReleaseEvent ( QMouseEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QTextEdit::contentsMouseReleaseEvent ( QMouseEvent e) [protected, virtual]

This event handler is called whenever the QScrollView receives a mouseReleaseEvent(): the release position in e is translated to be a point on the contents.

Reimplementado de QScrollView.

void QTextEdit::contentsWheelEvent ( QWheelEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QTextEdit::contentsWheelEvent ( QWheelEvent e) [protected, virtual]

This event handler is called whenever the QScrollView receives a wheelEvent() in {e}: the mouse position is translated to be a point on the contents.

Reimplementado de QScrollView.

QString QTextEdit::context ( ) const

Returns the context of the text edit. The context is a path which the text edit's QMimeSourceFactory uses to resolve the locations of files and images.

Ver también:
text
QString QTextEdit::context ( ) const
void QTextEdit::copy ( ) [virtual, slot]

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

Ver también:
hasSelectedText() copyAvailable()
virtual void QTextEdit::copy ( ) [virtual, slot]
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.

Ver también:
selectionChanged()
void QTextEdit::copyAvailable ( bool  ) [signal]
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.

Atención:
The QPopupMenu ID values 0-7 are reserved, and they map to the standard operations. When inserting items into your custom popup menu, be sure to specify ID values larger than 7.

Reimplementado en Editor, Editor y CppEditor.

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

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. 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.

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

Reimplementado en Editor, Editor y CppEditor.

virtual QPopupMenu* QTextEdit::createPopupMenu ( ) [protected, virtual]
void QTextEdit::currentAlignmentChanged ( int  a) [signal]

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

The new alignment is a.

Ver también:
setAlignment()
void QTextEdit::currentAlignmentChanged ( int  a) [signal]
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.

Ver también:
setColor()
void QTextEdit::currentColorChanged ( const QColor c) [signal]
QFont QTextEdit::currentFont ( ) const

Returns the font of the current format.

Ver también:
setCurrentFont() setFamily() setPointSize()
QFont QTextEdit::currentFont ( ) const
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.

Ver también:
setCurrentFont()
void QTextEdit::currentFontChanged ( const QFont f) [signal]
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.

Ver también:
setVerticalAlignment()
void QTextEdit::currentVerticalAlignmentChanged ( VerticalAlignment  a) [signal]
void QTextEdit::cursorPositionChanged ( QTextCursor c) [signal]
void QTextEdit::cursorPositionChanged ( int  para,
int  pos 
) [signal]

This signal is emitted if the position of the cursor has changed. para contains the paragraph index and pos contains the character position within the paragraph.

Ver también:
setCursorPosition()
void QTextEdit::cursorPositionChanged ( int  para,
int  pos 
) [signal]
void QTextEdit::cursorPositionChanged ( QTextCursor c) [signal]
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.

Ver también:
QTextEdit::copy() paste() pasteSubType()
virtual void QTextEdit::cut ( ) [virtual, slot]
virtual void QTextEdit::del ( ) [virtual, slot]
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.

Ver también:
removeSelectedText() cut()
void QTextEdit::doChangeInterval ( ) [protected, virtual, slot]
virtual void QTextEdit::doChangeInterval ( ) [protected, virtual, slot]
QTextDocument * QTextEdit::document ( ) const [inline, protected]

Reimplementado en Editor, TextEdit y Editor.

QTextDocument* QTextEdit::document ( ) const [protected]

Reimplementado en Editor, TextEdit y Editor.

QString QTextEdit::documentTitle ( ) const
QString QTextEdit::documentTitle ( ) const
virtual void QTextEdit::doKeyboardAction ( KeyboardAction  action) [virtual, slot]

Reimplementado en Editor y Editor.

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

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

Reimplementado en Editor y Editor.

void QTextEdit::doubleClicked ( int  para,
int  pos 
) [signal]

This signal is emitted when the mouse is double-clicked on the paragraph para at character position pos.

Ver también:
clicked()
void QTextEdit::doubleClicked ( int  parag,
int  index 
) [signal]
void QTextEdit::drawContents ( QPainter p,
int  cx,
int  cy,
int  cw,
int  ch 
) [protected, virtual]

Reimplementado de QScrollView.

void QTextEdit::drawContents ( QPainter p,
int  clipx,
int  clipy,
int  clipw,
int  cliph 
) [protected, virtual]

Reimplement this function if you are viewing a drawing area rather than a widget.

The function should draw the rectangle (clipx, clipy, clipw, cliph) of the contents using painter p. The clip rectangle is in the scrollview's coordinates.

For example:

    {
        // Fill a 40000 by 50000 rectangle at (100000,150000)

        // Calculate the coordinates...
        int x1 = 100000, y1 = 150000;
        int x2 = x1+40000-1, y2 = y1+50000-1;

        // Clip the coordinates so X/Windows will not have problems...
        if (x1 < clipx) x1=clipx;
        if (y1 < clipy) y1=clipy;
        if (x2 > clipx+clipw-1) x2=clipx+clipw-1;
        if (y2 > clipy+cliph-1) y2=clipy+cliph-1;

        // Paint using the small coordinates...
        if ( x2 >= x1 && y2 >= y1 )
            p->fillRect(x1, y1, x2-x1+1, y2-y1+1, red);
    }

The clip rectangle and translation of the painter p is already set appropriately.

Reimplementado de QScrollView.

void QTextEdit::drawCursor ( bool  visible) [protected]

Reimplementado en Editor y Editor.

void QTextEdit::drawCursor ( bool  visible) [protected]

Reimplementado en Editor y Editor.

virtual void QTextEdit::ensureCursorVisible ( ) [virtual, slot]
void QTextEdit::ensureCursorVisible ( ) [virtual, slot]

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

Ver también:
setCursorPosition()
bool QTextEdit::event ( QEvent e) [protected, virtual]

Reimplementado de QWidget.

bool QTextEdit::event ( QEvent e) [protected, virtual]

This is the main event handler; it handles event e. You can reimplement this function in a subclass, but we recommend using one of the specialized event handlers instead.

The main event handler first passes an event through all event filters that have been installed. If none of the filters intercept the event, it calls one of the specialized event handlers.

Key press and release events are treated differently from other events. event() checks for Tab and Shift+Tab and tries to move the focus appropriately. If there is no widget to move the focus to (or the key press is not Tab or Shift+Tab), event() calls keyPressEvent().

This function returns TRUE if it is able to pass the event over to someone (i.e. someone wanted the event); otherwise returns FALSE.

Ver también:
closeEvent(), focusInEvent(), focusOutEvent(), enterEvent(), keyPressEvent(), keyReleaseEvent(), leaveEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), moveEvent(), paintEvent(), resizeEvent(), QObject::event(), QObject::timerEvent()

Reimplementado de QWidget.

bool QTextEdit::eventFilter ( QObject o,
QEvent e 
) [virtual]

Reimplementado de QScrollView.

Reimplementado en Editor y Editor.

bool QTextEdit::eventFilter ( QObject obj,
QEvent e 
) [virtual]

This event filter ensures the scroll bars are updated when a single contents widget is resized, shown, hidden or destroyed; it passes mouse events to the QScrollView. The event is in e and the object is in obj.

Reimplementado de QScrollView.

Reimplementado en Editor y Editor.

QString QTextEdit::family ( ) const
QString QTextEdit::family ( ) const

Returns the font family of the current format.

Ver también:
setFamily() setCurrentFont() setPointSize()
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 was found; otherwise returns FALSE.

If para and index are both 0 the search begins from the current cursor position. If para and index are both not 0, 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 0, 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 0 and expr is not found, *index and *para are undefined.

Please note that this function will make the next occurrence of the string (if found) the current selection, and will thus modify the cursor position.

Using the para and index parameters will not work correctly in case the document contains tables.

virtual bool QTextEdit::find ( const QString expr,
bool  cs,
bool  wo,
bool  forward = TRUE,
int para = 0,
int index = 0 
) [virtual]
bool QTextEdit::focusNextPrevChild ( bool  n) [protected, virtual]

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.

Reimplementado de QScrollView.

bool QTextEdit::focusNextPrevChild ( bool  next) [protected, virtual]

Reimplementado de QScrollView.

QFont QTextEdit::font ( ) const

Returns QScrollView::font()

Atención:
In previous versions this function returned the font of the current format. This lead to confusion. Please use currentFont() instead.

Reimplementado de QWidget.

QFont QTextEdit::font ( ) const

Reimplementado de QWidget.

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 not be 0.

Ver también:
setCursorPosition()
void QTextEdit::getCursorPosition ( int parag,
int index 
) const
bool QTextEdit::getFormat ( int  para,
int  index,
QFont font,
QColor color,
VerticalAlignment verticalAlignment 
) [virtual]
virtual bool QTextEdit::getFormat ( int  para,
int  index,
QFont font,
QColor color,
VerticalAlignment verticalAlignment 
) [virtual]
bool QTextEdit::getParagraphFormat ( int  para,
QFont font,
QColor color,
VerticalAlignment verticalAlignment,
int alignment,
QStyleSheetItem::DisplayMode displayMode,
QStyleSheetItem::ListStyle listStyle,
int listDepth 
) [virtual]
virtual bool QTextEdit::getParagraphFormat ( int  para,
QFont font,
QColor color,
VerticalAlignment verticalAlignment,
int alignment,
QStyleSheetItem::DisplayMode displayMode,
QStyleSheetItem::ListStyle listStyle,
int listDepth 
) [virtual]
void QTextEdit::getSelection ( int paraFrom,
int indexFrom,
int paraTo,
int indexTo,
int  selNum = 0 
) const
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.

If paraFrom, indexFrom, paraTo or indexTo is 0 this function does nothing.

The selNum is the number of the selection (multiple selections are supported). It defaults to 0 (the default selection).

Ver también:
setSelection() selectedText
bool QTextEdit::hasSelectedText ( ) const
bool QTextEdit::hasSelectedText ( ) const
int QTextEdit::heightForWidth ( int  w) const [virtual]

Returns how many pixels high the text edit needs to be to display all the text if the text edit is w pixels wide.

Reimplementado de QWidget.

int QTextEdit::heightForWidth ( int  w) const [virtual]

Returns the preferred height for this widget, given the width w. The default implementation returns 0, indicating that the preferred height does not depend on the width.

Atención:
Does not look at the widget's layout.

Reimplementado de QWidget.

void QTextEdit::imComposeEvent ( QIMEvent e) [protected, virtual]

Reimplementado de QWidget.

void QTextEdit::imComposeEvent ( QIMEvent e) [protected, virtual]

This event handler, for event e, can be reimplemented in a subclass to receive Input Method composition events. This handler is called when the user has entered some text using an Input Method.

The default implementation calls e->ignore(), which rejects the Input Method event. See the QIMEvent documentation for more details.

Ver también:
event(), QIMEvent

Reimplementado de QWidget.

void QTextEdit::imEndEvent ( QIMEvent e) [protected, virtual]

Reimplementado de QWidget.

void QTextEdit::imEndEvent ( QIMEvent e) [protected, virtual]

This event handler, for event e, can be reimplemented in a subclass to receive Input Method composition events. This handler is called when the user has finished inputting text via an Input Method.

The default implementation calls e->ignore(), which rejects the Input Method event. See the QIMEvent documentation for more details.

Ver también:
event(), QIMEvent

Reimplementado de QWidget.

void QTextEdit::imStartEvent ( QIMEvent e) [protected, virtual]

Reimplementado de QWidget.

void QTextEdit::imStartEvent ( QIMEvent e) [protected, virtual]

This event handler, for event e, can be reimplemented in a subclass to receive Input Method composition events. This handler is called when the user begins entering text using an Input Method.

The default implementation calls e->ignore(), which rejects the Input Method event. See the QIMEvent documentation for more details.

Ver también:
event(), QIMEvent

Reimplementado de QWidget.

virtual void QTextEdit::indent ( ) [virtual, slot]
void QTextEdit::indent ( ) [virtual, slot]
void QTextEdit::insert ( const QString text,
uint  insertionFlags = CheckNewLines|RemoveSelected 
) [slot]
virtual void QTextEdit::insert ( const QString text,
bool  ,
bool  = TRUE,
bool  = TRUE 
) [virtual, slot]
void QTextEdit::insert ( const QString text,
uint  insertionFlags = CheckNewLines | RemoveSelected 
) [slot]

Inserts text at the current cursor position.

The insertionFlags define how the text is inserted. If RedoIndentation is set, the paragraph is re-indented. If CheckNewLines is set, newline characters in text result in hard line breaks (i.e. new paragraphs). If checkNewLine is not set, the behaviour of the editor is undefined if the text contains newlines. (It is not possible to change QTextEdit's newline handling behavior, but you can use QString::replace() to preprocess text before inserting it.) If RemoveSelected is set, any selected text (in selection 0) is removed before the text is inserted.

The default flags are CheckNewLines | RemoveSelected.

If the widget is in LogText mode this function will do nothing.

Ver también:
paste() pasteSubType()
void QTextEdit::insert ( const QString text,
bool  indent,
bool  checkNewLine = TRUE,
bool  removeSelected = TRUE 
) [virtual, slot]
virtual void QTextEdit::insertAt ( const QString text,
int  para,
int  index 
) [virtual, slot]

Reimplementado en QMultiLineEdit y QMultiLineEdit.

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

Inserts text in the paragraph para at position index.

Reimplementado en QMultiLineEdit y QMultiLineEdit.

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

Inserts text as a new paragraph at position para. If para is -1, the text is appended. Use append() if the append operation is performance critical.

bool QTextEdit::isModified ( ) const
bool QTextEdit::isModified ( ) const
bool QTextEdit::isOverwriteMode ( ) const [inline]
bool QTextEdit::isOverwriteMode ( ) const [inline]
bool QTextEdit::isReadOnly ( ) const [inline]
bool QTextEdit::isReadOnly ( ) const [inline]
bool QTextEdit::isRedoAvailable ( ) const

Returns TRUE if redo is available; otherwise returns FALSE.

bool QTextEdit::isRedoAvailable ( ) const
bool QTextEdit::isUndoAvailable ( ) const
bool QTextEdit::isUndoAvailable ( ) const

Returns TRUE if undo is available; otherwise returns FALSE.

bool QTextEdit::isUndoRedoEnabled ( ) const
bool QTextEdit::isUndoRedoEnabled ( ) const
bool QTextEdit::italic ( ) const

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

Ver también:
setItalic()
bool QTextEdit::italic ( ) const
void QTextEdit::keyPressEvent ( QKeyEvent e) [protected, virtual]

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

Reimplementado de QWidget.

Reimplementado en Editor, QTextBrowser, QIconViewItemLineEdit, QTextBrowser y Editor.

void QTextEdit::keyPressEvent ( QKeyEvent e) [protected, virtual]

This event handler, for event e, can be reimplemented in a subclass to receive key press events for the widget.

A widget must call setFocusPolicy() to accept focus initially and have focus in order to receive a key press event.

If you reimplement this handler, it is very important that you explicitly ignore the event if you do not understand it, so that the widget's parent can interpret it; otherwise, the event will be implicitly accepted. Although top-level widgets are able to choose whether to accept or ignore unknown events because they have no parent widgets that could otherwise handle them, it is good practice to explicitly ignore events to make widgets as reusable as possible.

The default implementation closes popup widgets if the user presses Esc. Otherwise the event is ignored.

Ver también:
keyReleaseEvent(), QKeyEvent::ignore(), setFocusPolicy(), focusInEvent(), focusOutEvent(), event(), QKeyEvent

Reimplementado de QWidget.

Reimplementado en Editor, QTextBrowser, QIconViewItemLineEdit, QTextBrowser y Editor.

int QTextEdit::length ( ) const
int QTextEdit::length ( ) const
int QTextEdit::lineOfChar ( int  para,
int  chr 
)
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.

int QTextEdit::lines ( ) const
int QTextEdit::lines ( ) const

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

Atención:
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.
int QTextEdit::linesOfParagraph ( int  para) const

Returns the number of lines in paragraph para, or -1 if there is no paragraph with index para.

int QTextEdit::linesOfParagraph ( int  para) const
bool QTextEdit::linkUnderline ( ) const
bool QTextEdit::linkUnderline ( ) const
int QTextEdit::maxLogLines ( ) [slot]
QMimeSourceFactory * QTextEdit::mimeSourceFactory ( ) const

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

Ver también:
setMimeSourceFactory()
QMimeSourceFactory* QTextEdit::mimeSourceFactory ( ) const
void QTextEdit::modificationChanged ( bool  m) [signal]

This signal is emitted when the modification status of the document has changed. If m is TRUE, the document was modified, otherwise the modification state has been reset to unmodified.

Ver también:
modified
void QTextEdit::modificationChanged ( bool  m) [signal]
virtual void QTextEdit::moveCursor ( CursorAction  action,
bool  select 
) [virtual, slot]
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.

QBrush QTextEdit::paper ( ) const
QBrush QTextEdit::paper ( ) const
int QTextEdit::paragraphAt ( const QPoint pos) const
int QTextEdit::paragraphAt ( const QPoint pos) const

Returns the paragraph which is at position pos (in contents coordinates).

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

QColor QTextEdit::paragraphBackgroundColor ( int  para) const
int QTextEdit::paragraphLength ( int  para) const

Returns the length of the paragraph para (i.e. the number of characters), or -1 if there is no paragraph with index para.

This function ignores newlines.

int QTextEdit::paragraphLength ( int  para) const
QRect QTextEdit::paragraphRect ( int  para) const
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.

int QTextEdit::paragraphs ( ) const

Returns the number of paragraphs in the text; an empty textedit is always considered to have one paragraph, so 1 is returned in this case.

int QTextEdit::paragraphs ( ) const
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.

Ver también:
pasteSubType() cut() QTextEdit::copy()

Reimplementado en QSAEditor y CppEditor.

virtual void QTextEdit::paste ( ) [virtual, slot]

Reimplementado en QSAEditor y CppEditor.

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.

Ver también:
paste() cut() QTextEdit::copy()
virtual void QTextEdit::pasteSubType ( const QCString subtype) [virtual, slot]
virtual void QTextEdit::placeCursor ( const QPoint pos,
QTextCursor c = 0 
) [virtual, slot]

Reimplementado en Editor y Editor.

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.

Ver también:
setCursorPosition()

Reimplementado en Editor y Editor.

int QTextEdit::pointSize ( ) const

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

Ver también:
setFamily() setCurrentFont() setPointSize()
int QTextEdit::pointSize ( ) const
void QTextEdit::polish ( ) [virtual, slot]

Delayed initialization of a widget.

This function will be called after a widget has been fully created and before it is shown the very first time.

Polishing is useful for final initialization which depends on having an instantiated widget. This is something a constructor cannot guarantee since the initialization of the subclasses might not be finished.

After this function, the widget has a proper font and palette and QApplication::polish() has been called.

Remember to call QWidget's implementation first when reimplementing this function to ensure that your program does not end up in infinite recursion.

Ver también:
constPolish(), QApplication::polish()

Reimplementado de QWidget.

void QTextEdit::redo ( ) [virtual, slot]

Redoes the last operation.

If there is no operation to redo, i.e. there is no redo step in the undo/redo history, nothing happens.

Ver también:
redoAvailable() undo() undoDepth()
virtual void QTextEdit::redo ( ) [virtual, slot]
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.

Ver también:
redo() undoDepth()
void QTextEdit::redoAvailable ( bool  yes) [signal]
virtual void QTextEdit::removeParagraph ( int  para) [virtual, slot]
void QTextEdit::removeParagraph ( int  para) [virtual, slot]

Removes the paragraph para.

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

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

Ver también:
selectedText removeSelection()
virtual void QTextEdit::removeSelection ( int  selNum = 0) [virtual, slot]
void QTextEdit::removeSelection ( int  selNum = 0) [virtual, slot]

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

Ver también:
removeSelectedText()
void QTextEdit::repaintChanged ( ) [protected]

Repaints any paragraphs that have changed.

Although used extensively internally you shouldn't need to call this yourself.

Reimplementado en Editor y Editor.

void QTextEdit::repaintChanged ( ) [protected]

Reimplementado en Editor y Editor.

virtual void QTextEdit::resetFormat ( ) [virtual, slot]
void QTextEdit::resetFormat ( ) [virtual, slot]
void QTextEdit::resizeEvent ( QResizeEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QTextEdit::resizeEvent ( QResizeEvent event) [protected, virtual]

Reimplementado de QScrollView.

void QTextEdit::returnPressed ( ) [signal]

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

void QTextEdit::returnPressed ( ) [signal]
virtual void QTextEdit::scrollToAnchor ( const QString name) [virtual, slot]
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. {}.

void QTextEdit::scrollToBottom ( ) [virtual, slot]

Scrolls to the bottom of the document and does formatting if required.

virtual void QTextEdit::scrollToBottom ( ) [virtual, slot]
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.

Ver también:
selectedText
virtual void QTextEdit::selectAll ( bool  select = TRUE) [virtual, slot]
QString QTextEdit::selectedText ( ) const
QString QTextEdit::selectedText ( ) const
void QTextEdit::selectionChanged ( ) [signal]
void QTextEdit::selectionChanged ( ) [signal]

This signal is emitted whenever the selection changes.

Ver también:
setSelection() copyAvailable()
virtual void QTextEdit::setAlignment ( int  a) [virtual, slot]

Reimplementado en QMultiLineEdit y QMultiLineEdit.

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

Reimplementado en QMultiLineEdit y QMultiLineEdit.

void QTextEdit::setAutoFormatting ( uint  features)
void QTextEdit::setAutoFormatting ( uint  features)
virtual void QTextEdit::setBold ( bool  b) [virtual, slot]
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.

Ver también:
bold()
virtual void QTextEdit::setColor ( const QColor c) [virtual, slot]
void QTextEdit::setColor ( const QColor c) [virtual, slot]

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

Ver también:
color() setPaper()
void QTextEdit::setCurrentFont ( const QFont f) [inline, virtual, slot]

Sets the font of the current format to f.

If the widget is in LogText mode this function will do nothing. Use setFont() instead.

Ver también:
currentFont() setPointSize() setFamily()
virtual void QTextEdit::setCurrentFont ( const QFont f) [virtual, slot]
virtual void QTextEdit::setCursorPosition ( int  parag,
int  index 
) [virtual, slot]

Reimplementado en QMultiLineEdit y QMultiLineEdit.

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

Sets the cursor to position index in paragraph para.

Ver también:
getCursorPosition()

Reimplementado en QMultiLineEdit y QMultiLineEdit.

void QTextEdit::setDocument ( QTextDocument doc) [protected]

Reimplementado en Editor y Editor.

void QTextEdit::setDocument ( QTextDocument doc) [protected]

Reimplementado en Editor y Editor.

void QTextEdit::setEnabled ( bool  b) [virtual, slot]

Reimplementado de QScrollView.

void QTextEdit::setEnabled ( bool  enable) [virtual, slot]

Reimplementado de QScrollView.

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

Sets the font family of the current format to fontFamily.

Ver también:
family() setCurrentFont()
virtual void QTextEdit::setFont ( const QFont f) [virtual, slot]

Reimplementado de QWidget.

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

Reimplementado de QWidget.

virtual void QTextEdit::setFormat ( QTextFormat f,
int  flags 
) [virtual, slot]
void QTextEdit::setFormat ( QTextFormat f,
int  flags 
) [virtual, slot]
virtual void QTextEdit::setItalic ( bool  b) [virtual, slot]
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.

Ver también:
italic()
void QTextEdit::setLinkUnderline ( bool  b) [virtual, slot]
virtual void QTextEdit::setLinkUnderline ( bool  ) [virtual, slot]
void QTextEdit::setMaxLogLines ( int  numLines) [slot]
virtual void QTextEdit::setMimeSourceFactory ( QMimeSourceFactory factory) [virtual, slot]
void QTextEdit::setMimeSourceFactory ( QMimeSourceFactory factory) [virtual, slot]

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

Ver también:
mimeSourceFactory()
void QTextEdit::setModified ( bool  m) [virtual, slot]
virtual void QTextEdit::setModified ( bool  m) [virtual, slot]
virtual void QTextEdit::setOverwriteMode ( bool  b) [inline, virtual, slot]
virtual void QTextEdit::setOverwriteMode ( bool  b) [inline, virtual, slot]
void QTextEdit::setPalette ( const QPalette p) [virtual]

Reimplementado de QWidget.

void QTextEdit::setPalette ( const QPalette ) [virtual]

Reimplementado de QWidget.

virtual void QTextEdit::setPaper ( const QBrush pap) [virtual, slot]
void QTextEdit::setPaper ( const QBrush pap) [virtual, slot]
virtual void QTextEdit::setParagraphBackgroundColor ( int  para,
const QColor bg 
) [virtual, slot]
void QTextEdit::setParagraphBackgroundColor ( int  para,
const QColor bg 
) [virtual, slot]

Sets the background color of the paragraph para to bg.

virtual void QTextEdit::setParagType ( QStyleSheetItem::DisplayMode  dm,
QStyleSheetItem::ListStyle  listStyle 
) [virtual, slot]
void QTextEdit::setParagType ( QStyleSheetItem::DisplayMode  dm,
QStyleSheetItem::ListStyle  listStyle 
) [virtual, slot]
virtual void QTextEdit::setPointSize ( int  s) [virtual, slot]
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.

Ver también:
pointSize() setCurrentFont() setFamily()
void QTextEdit::setReadOnly ( bool  b) [virtual, slot]
virtual void QTextEdit::setReadOnly ( bool  b) [virtual, slot]
virtual void QTextEdit::setSelection ( int  parag_from,
int  index_from,
int  parag_to,
int  index_to,
int  selNum = 0 
) [virtual, slot]
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.

Any existing selections which have a different id (selNum) are left alone, but if an existing selection has the same id as selNum it is removed and replaced by this selection.

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.

Ver también:
getSelection() selectedText
virtual void QTextEdit::setSelectionAttributes ( int  selNum,
const QColor back,
bool  invertText 
) [virtual, slot]
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 text edit's colorGroup().

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

Ver también:
styleSheet()
virtual void QTextEdit::setStyleSheet ( QStyleSheet styleSheet) [virtual, slot]
void QTextEdit::setTabChangesFocus ( bool  b) [slot]
void QTextEdit::setTabChangesFocus ( bool  b) [slot]
void QTextEdit::setTabStopWidth ( int  ts) [virtual, slot]
virtual void QTextEdit::setTabStopWidth ( int  ts) [virtual, slot]
void QTextEdit::setText ( const QString txt) [inline, slot]

Reimplementado en QTextBrowser y QTextBrowser.

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

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. 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 auto-detects the format from text.

For rich text the rendering style and available tags are defined by a styleSheet(); see QStyleSheet for details.

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.

Ver también:
text(), setTextFormat()

Reimplementado en QTextBrowser y QTextBrowser.

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

Reimplementado en QTextBrowser y QTextBrowser.

virtual void QTextEdit::setText ( const QString txt,
const QString context 
) [virtual, slot]

Reimplementado en QTextBrowser y QTextBrowser.

void QTextEdit::setTextFormat ( TextFormat  f) [virtual, slot]
virtual void QTextEdit::setTextFormat ( TextFormat  f) [virtual, slot]
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.

Ver también:
underline()
virtual void QTextEdit::setUnderline ( bool  b) [virtual, slot]
virtual void QTextEdit::setUndoDepth ( int  d) [virtual, slot]
void QTextEdit::setUndoDepth ( int  d) [virtual, slot]
void QTextEdit::setUndoRedoEnabled ( bool  b) [virtual, slot]
virtual void QTextEdit::setUndoRedoEnabled ( bool  b) [virtual, slot]
virtual void QTextEdit::setVerticalAlignment ( VerticalAlignment  a) [virtual, slot]
void QTextEdit::setVerticalAlignment ( VerticalAlignment  a) [virtual, slot]

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

Ver también:
color() setPaper()
void QTextEdit::setWordWrap ( WordWrap  mode) [virtual, slot]
virtual void QTextEdit::setWordWrap ( WordWrap  mode) [virtual, slot]
void QTextEdit::setWrapColumnOrWidth ( int  value) [virtual, slot]
virtual void QTextEdit::setWrapColumnOrWidth ( int  ) [virtual, slot]
void QTextEdit::setWrapPolicy ( WrapPolicy  policy) [virtual, slot]
virtual void QTextEdit::setWrapPolicy ( WrapPolicy  policy) [virtual, slot]
QSize QTextEdit::sizeHint ( ) const [virtual]

Reimplementado de QScrollView.

Reimplementado en QErrorMessageTextView.

QSize QTextEdit::sizeHint ( ) const [virtual]

Reimplementado de QScrollView.

Reimplementado en QErrorMessageTextView.

void QTextEdit::sliderReleased ( ) [protected, slot]
void QTextEdit::sliderReleased ( ) [protected, slot]
QStyleSheet * QTextEdit::styleSheet ( ) const

Returns the QStyleSheet which is being used by this text edit.

Ver también:
setStyleSheet()
QStyleSheet* QTextEdit::styleSheet ( ) const
void QTextEdit::sync ( ) [virtual, slot]

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.

virtual void QTextEdit::sync ( ) [virtual, slot]
QSyntaxHighlighter * QTextEdit::syntaxHighlighter ( ) const

Returns the QSyntaxHighlighter set on this QTextEdit. 0 is returned if no syntax highlighter is set.

QSyntaxHighlighter* QTextEdit::syntaxHighlighter ( ) const
bool QTextEdit::tabChangesFocus ( ) const
bool QTextEdit::tabChangesFocus ( ) const
int QTextEdit::tabStopWidth ( ) const
int QTextEdit::tabStopWidth ( ) const
QString QTextEdit::text ( int  para) const
QString QTextEdit::text ( int  para) const

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Returns the text of paragraph para.

If textFormat() is RichText the text will contain HTML formatting tags.

QString QTextEdit::text ( ) const
QString QTextEdit::text ( ) const
void QTextEdit::textChanged ( ) [signal]

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

Ver también:
setText() append()
void QTextEdit::textChanged ( ) [signal]
QTextCursor * QTextEdit::textCursor ( ) const [inline, protected]

Returns the text edit's text cursor.

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

Reimplementado en Editor y Editor.

QTextCursor* QTextEdit::textCursor ( ) const [protected]

Reimplementado en Editor y Editor.

TextFormat QTextEdit::textFormat ( ) const
TextFormat QTextEdit::textFormat ( ) const
bool QTextEdit::underline ( ) const

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

Ver también:
setUnderline()
bool QTextEdit::underline ( ) const
void QTextEdit::undo ( ) [virtual, slot]

Undoes the last operation.

If there is no operation to undo, i.e. there is no undo step in the undo/redo history, nothing happens.

Ver también:
undoAvailable() redo() undoDepth()
virtual void QTextEdit::undo ( ) [virtual, slot]
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.

Ver también:
undo() undoDepth()
void QTextEdit::undoAvailable ( bool  yes) [signal]
int QTextEdit::undoDepth ( ) const
int QTextEdit::undoDepth ( ) const
void QTextEdit::updateStyles ( ) [protected]
void QTextEdit::updateStyles ( ) [protected]
void QTextEdit::viewportResizeEvent ( QResizeEvent e) [protected, virtual]

Reimplementado de QScrollView.

void QTextEdit::viewportResizeEvent ( QResizeEvent ) [protected, virtual]

To provide simple processing of events on the contents, this function receives all resize events sent to the viewport.

Ver también:
QWidget::resizeEvent()

Reimplementado de QScrollView.

void QTextEdit::windowActivationChange ( bool  oldActive) [protected, virtual]

Reimplementado de QWidget.

void QTextEdit::windowActivationChange ( bool  oldActive) [protected, virtual]

This virtual function is called for a widget when its window is activated or deactivated by the window system. oldActive is the previous state; you can get the new setting from isActiveWindow().

Reimplement this function if your widget needs to know when its window becomes activated or deactivated.

The default implementation updates the visible part of the widget if the inactive and the active colorgroup are different for colors other than the highlight and link colors.

Ver también:
setActiveWindow(), isActiveWindow(), update(), palette()

Reimplementado de QWidget.

WordWrap QTextEdit::wordWrap ( ) const
WordWrap QTextEdit::wordWrap ( ) const
int QTextEdit::wrapColumnOrWidth ( ) const
int QTextEdit::wrapColumnOrWidth ( ) const
WrapPolicy QTextEdit::wrapPolicy ( ) const
WrapPolicy QTextEdit::wrapPolicy ( ) const
void QTextEdit::zoomIn ( int  range) [virtual, slot]

Zooms in on the text by making the base font size range points larger and recalculating all font sizes to be the new size. This does not change the size of any images.

Ver también:
zoomOut()
QTextEdit::zoomIn ( ) [inline, virtual, slot]

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Zooms in on the text by making the base font size one point larger and recalculating all font sizes to be the new size. This does not change the size of any images.

Ver también:
zoomOut()
virtual void QTextEdit::zoomIn ( int  range) [virtual, slot]
virtual void QTextEdit::zoomIn ( ) [inline, virtual, slot]
virtual void QTextEdit::zoomOut ( ) [inline, virtual, slot]
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 to be the new size. This does not change the size of any images.

Ver también:
zoomIn()
virtual void QTextEdit::zoomOut ( int  range) [virtual, slot]
QTextEdit::zoomOut ( ) [inline, virtual, slot]

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Zooms out on the text by making the base font size one point smaller and recalculating all font sizes to be the new size. This does not change the size of any images.

Ver también:
zoomIn()
virtual void QTextEdit::zoomTo ( int  size) [virtual, slot]
void QTextEdit::zoomTo ( int  size) [virtual, slot]

Zooms the text by making the base font size size points and recalculating all font sizes to be the new size. This does not change the size of any images.


Documentación de las funciones relacionadas y clases amigas

QTextBrowser [friend]

Documentación de propiedades

AutoFormatting QTextEdit::autoFormatting [read, write]

the enabled set of auto formatting features

The value can be any combination of the values in the AutoFormatting enum. The default is AutoAll. Choose AutoNone to disable all automatic formatting.

Currently, the only automatic formatting feature provided is AutoBulletList; future versions of Qt may offer more.

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.

bool QTextEdit::hasSelectedText [read]

whether some text is selected in selection 0

int QTextEdit::length [read]

the number of characters in the text

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.

bool QTextEdit::modified [read, write]

whether the document has been modified by the user

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

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.

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

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 if the textFormat() is PlainText or AutoText, otherwise it is returned as HTML.

Ver también:
hasSelectedText
bool QTextEdit::tabChangesFocus [read, write]

whether TAB changes focus or is accepted as input

In some occasions text edits should not allow the user to input tabulators or change indentation using the TAB key, as this breaks the focus chain. The default is FALSE.

int QTextEdit::tabStopWidth [read, write]

the tab stop width in pixels

QString 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 auto-detects 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.

Ver también:
textFormat
TextFormat QTextEdit::textFormat [read, write]

the text format: rich text, plain text, log 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(). LogText - optimized mode for very large texts. Supports a very limited set of formatting tags (color, bold, underline and italic settings). 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.

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.

Ver también:
undo() redo()
bool QTextEdit::undoRedoEnabled [read, write]

whether undo/redo is enabled

When changing this property, the undo/redo history is cleared.

The default is TRUE.

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.

Ver también:
WordWrap, wrapColumnOrWidth, wrapPolicy,
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.

Ver también:
wordWrap
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 AtWordBoundary (the default), Anywhere and AtWordOrDocumentBoundary

Ver también:
wordWrap

La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'