Compatibility Members for QTextEdit

以下成員源於類 QTextEdit are part of the Qt compatibility layer. We advise against using them in new code.

公共類型

enum CursorAction { MoveBackward, MoveForward, MoveWordBackward, MoveWordForward, ..., MovePageDown }
enum KeyboardAction { ActionBackspace, ActionDelete, ActionReturn, ActionKill, ActionWordBackspace, ActionWordDelete }

公共函數

QTextEdit (QWidget * parent , const char * name )
bool bold () const
QColor color () const
void doKeyboardAction (KeyboardAction action )
QString family () const
bool find (const QString & exp , bool cs , bool wo )
bool hasSelectedText () const
void insert (const QString & text )
bool isModified () const
bool isRedoAvailable () const
bool isUndoAvailable () const
bool italic () const
void moveCursor (CursorAction action , QTextCursor::MoveMode mode = QTextCursor::MoveAnchor)
void moveCursor (CursorAction action , bool select )
int pointSize () const
void redo () const
QString selectedText () const
void setBold (bool b )
void setFamily (const QString & family )
void setItalic (bool i )
void setPointSize (int size )
void setTextFormat (Qt::TextFormat f )
void setUnderline (bool b )
void sync ()
QString text () const
Qt::TextFormat textFormat () const
bool underline () const
void undo () const

公共槽

void setColor (const QColor & color )
void setModified (bool m = true)

信號

void currentColorChanged (const QColor & color )
void currentFontChanged (const QFont & font )

成員類型文檔編製

enum QTextEdit:: CursorAction

常量
QTextEdit::MoveBackward 0
QTextEdit::MoveForward 1
QTextEdit::MoveWordBackward 2
QTextEdit::MoveWordForward 3
QTextEdit::MoveUp 4
QTextEdit::MoveDown 5
QTextEdit::MoveLineStart 6
QTextEdit::MoveLineEnd 7
QTextEdit::MoveHome 8
QTextEdit::MoveEnd 9
QTextEdit::MovePageUp 10
QTextEdit::MovePageDown 11

enum QTextEdit:: KeyboardAction

常量
QTextEdit::ActionBackspace 0
QTextEdit::ActionDelete 1
QTextEdit::ActionReturn 2
QTextEdit::ActionKill 3
QTextEdit::ActionWordBackspace 4
QTextEdit::ActionWordDelete 5

成員函數文檔編製

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

Use one of the constructors that doesn't take the name argument and then use setObjectName () 代替。

bool QTextEdit:: bold () const

使用 fontWeight () >= QFont::Bold 代替。

另請參閱 setBold ().

QColor QTextEdit:: color () const

使用 textColor () 代替。

另請參閱 setColor ().

[signal] void QTextEdit:: currentColorChanged (const QColor & color )

使用 currentCharFormatChanged () 代替。

[signal] void QTextEdit:: currentFontChanged (const QFont & font )

使用 currentCharFormatChanged () 代替。

void QTextEdit:: doKeyboardAction ( KeyboardAction action )

Executes keyboard action action .

使用 QTextCursor class instead.

另請參閱 textCursor ().

QString QTextEdit:: family () const

使用 fontFamily () 代替。

另請參閱 setFamily ().

bool QTextEdit:: find (const QString & exp , bool cs , bool wo )

使用 find () 重載接受 QTextDocument::FindFlags 自變量。

bool QTextEdit:: hasSelectedText () const

使用 textCursor ().hasSelection() instead.

void QTextEdit:: insert (const QString & text )

使用 insertPlainText () 代替。

bool QTextEdit:: isModified () const

使用 document ()->isModified() instead.

bool QTextEdit:: isRedoAvailable () const

使用 document ()->isRedoAvailable() instead.

bool QTextEdit:: isUndoAvailable () const

使用 document ()->isUndoAvailable() instead.

bool QTextEdit:: italic () const

使用 fontItalic () 代替。

另請參閱 setItalic ().

void QTextEdit:: moveCursor ( CursorAction action , QTextCursor::MoveMode mode = QTextCursor::MoveAnchor)

使用 QTextCursor class instead.

void QTextEdit:: moveCursor ( CursorAction action , bool select )

使用 QTextCursor class instead.

int QTextEdit:: pointSize () const

Use int( fontPointSize ()+0.5) instead.

另請參閱 setPointSize ().

void QTextEdit:: redo () const

這是重載函數。

Use the non-const overload instead.

QString QTextEdit:: selectedText () const

使用 textCursor ().selectedText() instead.

void QTextEdit:: setBold ( bool b )

使用 setFontWeight () 代替。

另請參閱 bold ().

[slot] void QTextEdit:: setColor (const QColor & color )

使用 setTextColor () 代替。

另請參閱 color ().

void QTextEdit:: setFamily (const QString & family )

使用 setFontFamily () 代替。

另請參閱 family ().

void QTextEdit:: setItalic ( bool i )

使用 setFontItalic () 代替。

另請參閱 italic ().

[slot] void QTextEdit:: setModified ( bool m = true)

Use document->setModified() instead.

另請參閱 isModified ().

void QTextEdit:: setPointSize ( int size )

使用 setFontPointSize () 代替。

另請參閱 pointSize ().

void QTextEdit:: setTextFormat ( Qt::TextFormat f )

Sets the text format to format f .

另請參閱 textFormat ().

void QTextEdit:: setUnderline ( bool b )

使用 setFontUnderline () 代替。

另請參閱 underline ().

void QTextEdit:: sync ()

什麼都不做。

QString QTextEdit:: text () const

Returns all the text in the text edit as plain text.

另請參閱 setText ().

Qt::TextFormat QTextEdit:: textFormat () const

Returns the text format.

另請參閱 setTextFormat ().

bool QTextEdit:: underline () const

使用 fontUnderline () 代替。

另請參閱 setUnderline ().

void QTextEdit:: undo () const

這是重載函數。

Use the non-const overload instead.