Utils::PlainTextDocumentLayout Class
class Utils::PlainTextDocumentLayoutPlainTextDocumentLayout 클래스는 QTextDocument 에 대한 일반 텍스트 레이아웃을 구현합니다. 더 보기...
| Header: | #include <PlainTextDocumentLayout> |
속성
- cursorWidth : int
공개 함수
| PlainTextDocumentLayout(QTextDocument *document) | |
| ~PlainTextDocumentLayout() | |
| int | cursorWidth() const |
| QSizeF | documentSize() const |
| void | draw(QPainter *, const int &) override |
| int | hitTest(const QPointF &, Qt::HitTestAccuracy) const |
| int | pageCount() const |
| void | requestUpdate() |
| void | setCursorWidth(int width) |
보호된 함수
| void | documentChanged(int from, int charsRemoved, int charsAdded) |
상세 설명
PlainTextEdit 에서 표시하거나 편집할 수 있는 텍스트 문서에는 PlainTextDocumentLayout이 필요합니다. QTextDocument::setDocumentLayout()을 참조하십시오.
PlainTextDocumentLayout은 QTextDocument 에서 요구하는 QAbstractTextDocumentLayout API를 사용하지만, 일반 텍스트를 더 잘 지원하기 위해 이를 부분적으로 재정의합니다. 예를 들어, 이 레이아웃은 세로 픽셀 단위가 아닌 단락(블록이라고 함)을 기준으로 작동합니다. 문서의 높이는 문서에 포함된 단락 수와 동일합니다. 또한 이 레이아웃은 표나 중첩된 프레임, 또는 구문 강조 표시가 적용된 단락 목록을 넘어서는 모든 종류의 고급 텍스트 레이아웃을 지원하지 않습니다.
속성 설명서
cursorWidth : int
이 속성은 커서의 너비를 픽셀 단위로 지정합니다. 기본값은 1입니다.
Access 함수:
| int | cursorWidth() const |
| void | setCursorWidth(int width) |
멤버 함수 설명서
PlainTextDocumentLayout::PlainTextDocumentLayout(QTextDocument *document)
document 라는 텍스트에 대한 일반 텍스트 문서 레이아웃을 생성합니다.
[noexcept] PlainTextDocumentLayout::~PlainTextDocumentLayout()
일반 텍스트 문서의 레이아웃을 제거합니다.
[protected] void PlainTextDocumentLayout::documentChanged(int from, int charsRemoved, int charsAdded)
QSizeF PlainTextDocumentLayout::documentSize() const
void PlainTextDocumentLayout::draw(QPainter *, const int &)
int PlainTextDocumentLayout::hitTest(const QPointF &, Qt::HitTestAccuracy) const
int PlainTextDocumentLayout::pageCount() const
void PlainTextDocumentLayout::requestUpdate()
모든 뷰에 대한 전체적인 최신 정보를 요청합니다.
Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.