强大的QTextEdit功能

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

QTextEdit窗口部件提供了强大的单页面的多信息文本编辑器。详情请见……#includeqtextedit.h继承了QScrollView。被QMultiLineEdit、QTextBrowser和QTextView继承。所有成员函数的列表。公有成员enumWordWrap{NoWrap,WidgetWidth,FixedPixelWidth,FixedColumnWidth}enumWrapPolicy{AtWordBoundary,Anywhere,AtWhiteSpace=AtWordBoundary}enumKeyboardAction{ActionBackspace,ActionDelete,ActionReturn,ActionKill}enumCursorAction{MoveBackward,MoveForward,MoveWordBackward,MoveWordForward,MoveUp,MoveDown,MoveLineStart,MoveLineEnd,MoveHome,MoveEnd,MovePgUp,MovePgDown}enumVerticalAlignment{AlignNormal,AlignSuperScript,AlignSubScript}QTextEdit(constQString&text,constQString&context=QString::null,QWidget*parent=0,constchar*name=0)QTextEdit(QWidget*parent=0,constchar*name=0)QStringtext()constQStringtext(intpara)constTextFormattextFormat()constQStringcontext()constQStringdocumentTitle()constvoidgetSelection(int*paraFrom,int*indexFrom,int*paraTo,int*indexTo,intselNum=0)constvirtualboolfind(constQString&expr,boolcs,boolwo,boolforward=TRUE,int*para=0,int*index=0)intparagraphs()constintlines()constintlinesOfParagraph(intpara)constintlineOfChar(intpara,intindex)intlength()constQRectparagraphRect(intpara)constintparagraphAt(constQPoint&pos)constintcharAt(constQPoint&pos,int*para)constintparagraphLength(intpara)constQStyleSheet*styleSheet()constQMimeSourceFactory*mimeSourceFactory()constQBrushpaper()constboollinkUnderline()constvirtualintheightForWidth(intw)constboolhasSelectedText()constQStringselectedText()constboolisUndoAvailable()constboolisRedoAvailable()constWordWrapwordWrap()constintwrapColumnOrWidth()constWrapPolicywrapPolicy()constinttabStopWidth()constQStringanchorAt(constQPoint&pos)boolisReadOnly()constvoidgetCursorPosition(int*para,int*index)constboolisModified()constboolitalic()constboolbold()constboolunderline()constQStringfamily()constintpointSize()constQColorcolor()constQFontfont()constintalignment()constintundoDepth()constboolisOverwriteMode()constQColorparagraphBackgroundColor(intpara)constboolisUndoRedoEnabled()const公有槽virtualvoidsetMimeSourceFactory(QMimeSourceFactory*factory)virtualvoidsetStyleSheet(QStyleSheet*styleSheet)virtualvoidscrollToAnchor(constQString&name)virtualvoidsetPaper(constQBrush&pap)virtualvoidsetLinkUnderline(bool)virtualvoidsetWordWrap(WordWrapmode)virtualvoidsetWrapColumnOrWidth(int)virtualvoidsetWrapPolicy(WrapPolicypolicy)virtualvoidcopy()virtualvoidappend(constQString&text)voidsetText(constQString&txt)virtualvoidsetText(constQString&text,constQString&context)virtualvoidsetTextFormat(TextFormatf)virtualvoidselectAll(boolselect=TRUE)virtualvoidsetTabStopWidth(intts)virtualvoidzoomIn(intrange)virtualvoidzoomIn()virtualvoidzoomOut(intrange)virtualvoidzoomOut()virtualvoidzoomTo(intsize)virtualvoidsetReadOnly(boolb)virtualvoidundo()virtualvoidredo()virtualvoidcut()virtualvoidpaste()virtualvoidpasteSubType(constQCString&subtype)virtualvoidclear()virtualvoiddel()virtualvoidindent()virtualvoidsetItalic(boolb)virtualvoidsetBold(boolb)virtualvoidsetUnderline(boolb)virtualvoidsetFamily(constQString&fontFamily)virtualvoidsetPointSize(ints)virtualvoidsetColor(constQColor&c)virtualvoidsetVerticalAlignment(VerticalAlignmenta)virtualvoidsetAlignment(inta)virtualvoidsetCursorPosition(intpara,intindex)virtualvoidsetSelection(intparaFrom,intindexFrom,intparaTo,intindexTo,intselNum=0)virtualvoidsetSelectionAttributes(intselNum,constQColor&back,boolinvertText)virtualvoidsetModified(boolm)virtualvoidsetUndoDepth(intd)virtualvoidensureCursorVisible()virtualvoidplaceCursor(constQPoint&pos,QTextCursor*c=0)virtualvoidmoveCursor(CursorActionaction,boolselect)virtualvoiddoKeyboardAction(KeyboardActionaction)virtualvoidremoveSelectedText(intselNum=0)virtualvoidremoveSelection(intselNum=0)virtualvoidsetCurrentFont(constQFont&f)virtualvoidsetOverwriteMode(boolb)virtualvoidscrollToBottom()virtualvoidinsert(constQString&text,boolindent=FALSE,boolcheckNewLine=TRUE,boolremoveSelected=TRUE)virtualvoidinsertAt(constQString&text,intpara,intindex)virtualvoidremoveParagraph(intpara)virtualvoidinsertParagraph(constQString&text,intpara)virtualvoidsetParagraphBackgroundColor(intpara,constQColor&bg)virtualvoidclearParagraphBackground(intpara)virtualvoidsetUndoRedoEnabled(boolb)信号voidtextChanged()voidselectionChanged()voidcopyAvailable(boolyes)voidundoAvailable(boolyes)voidredoAvailable(boolyes)voidcurrentFontChanged(constQFont&f)voidcurrentColorChanged(constQColor&c)voidcurrentAlignmentChanged(inta)voidcurrentVerticalAlignmentChanged(VerticalAlignmenta)voidcursorPositionChanged(QTextCursor*c)voidcursorPositionChanged(intpara,intpos)voidreturnPressed()voidmodificationChanged(boolm)属性QStringdocumentTitle-从文本中分析出的文档标题(只读)boolhasSelectedText-是否有文本被选择到选择区0中(只读)intlength-文本的字符数(只读)boollinkUnderline-超文本链接是否使用下划线boolmodified-文档是否已经被用户修改booloverwriteMode-文本编辑的覆盖模式QBrushpaper-背景(纸)的画刷boolreadOnly-文本编辑是否只读QStringselectedText-被选择的文本(在选择区0中)或者如果当前没有被选择的文本(在选择区0中)就是空字符串(只读)inttabStopWidt

1 / 35
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功