QTextEdit窗口部件提供了强大的单页面的多信息文本编辑器。 详情请见……
#include <qtextedit.h>
继承了QScrollView
QMultiLineEditQTextBrowserQTextView继承。
所有成员函数的列表。
公有成员
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, Move
End, MovePgUp, MovePgDown }
enum VerticalAlignment { AlignNormal, AlignSuperScript, AlignSubScript }
QTextEdit ( const QString & text, const QString & context = QString::null, QWidget * parent = 0, const char * name = 0 )
QTextEdit ( QWidget * parent = 0, const char * name = 0 )
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 index )
int length () const
QRect paragraphRect ( int para ) const
int paragraphAt ( const QPoint & pos ) const
int 编辑器在线使用charAt ( const QPoint & pos, int * para ) const
int paragraphLength ( int para ) const
QStyleSheet * styleSheet () const
QMimeSourceFactory * mimeSourceFactory () const
QBrush paper () const
bool linkUnderline () const
virtual 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 )
bool isReadOnly () const
void getCursorPosition ( int * para, 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
bool isOverwriteMode () const
QColor paragraphBackgroundColor ( int para ) const
bool isUndoRedoEnabled () const
公有槽
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 & text, 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 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 & fontFamily )
virtual void setPointSize ( int s )
virtual void setColor ( const QColor & c )
virtual void setVerticalAlignment ( VerticalAlignment a )
virtual void setAlignment ( int a )
virtual void setCursorPosition ( int para, int index )
virtual void setSelection ( int paraFrom, int indexFrom, int paraTo, int indexTo, int selNum = 0 )
virtual void setSelectionAttributes ( int selNum, const QColor & back, bool invertText )
virtual void setModified ( bool m )
virtual void setUndoDepth ( int d )
virtual void ensureCursorVisible ()
virtual void placeCursor ( const QPoint & pos, QTextCursor * c = 0 )
virtual void moveCursor ( CursorAction action, bool select )

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。