7#include <QtGui/qtguiglobal.h>
8#include <QtCore/qobject.h>
9#include <QtCore/qsize.h>
10#include <QtCore/qrect.h>
11#include <QtCore/qvariant.h>
12#include <QtGui/qfont.h>
13#include <QtCore/qurl.h>
14#include <QtCore/qcontainerfwd.h>
38#if QT_GUI_REMOVED_SINCE(6, 7)
63 Q_PROPERTY(
bool undoRedoEnabled READ isUndoRedoEnabled WRITE setUndoRedoEnabled)
67 Q_PROPERTY(
bool useDesignMetrics READ useDesignMetrics WRITE setUseDesignMetrics)
68 Q_PROPERTY(
bool layoutEnabled READ isLayoutEnabled WRITE setLayoutEnabled)
73#ifndef QT_NO_CSSPARSER
76 Q_PROPERTY(
int maximumBlockCount READ maximumBlockCount WRITE setMaximumBlockCount)
91 void setUndoRedoEnabled(
bool enable);
92 bool isUndoRedoEnabled() const;
94 bool isUndoAvailable() const;
95 bool isRedoAvailable() const;
97 int availableUndoSteps() const;
98 int availableRedoSteps() const;
100 int revision() const;
111 void setMetaInformation(MetaInformation
info,
const QString &);
112 QString metaInformation(MetaInformation
info)
const;
114#ifndef QT_NO_TEXTHTMLPARSER
116 void setHtml(
const QString &html);
119#if QT_CONFIG(textmarkdownwriter) || QT_CONFIG(textmarkdownreader)
120 enum MarkdownFeature {
121 MarkdownNoHTML = 0x0020 | 0x0040,
122 MarkdownDialectCommonMark = 0,
123 MarkdownDialectGitHub = 0x0004 | 0x0008 | 0x0400 | 0x0100 | 0x0200 | 0x0800 | 0x4000 | 0x100000
129#if QT_CONFIG(textmarkdownwriter)
130 QString toMarkdown(MarkdownFeatures features = MarkdownDialectGitHub)
const;
133#if QT_CONFIG(textmarkdownreader)
134 void setMarkdown(
const QString &markdown, MarkdownFeatures features = MarkdownDialectGitHub);
145 FindBackward = 0x00001,
146 FindCaseSensitively = 0x00002,
147 FindWholeWords = 0x00004
151 QTextCursor find(
const QString &subString,
int from = 0, FindFlags options = FindFlags())
const;
154#if QT_CONFIG(regularexpression)
166 QTextBlock findBlockByNumber(
int blockNumber)
const;
167 QTextBlock findBlockByLineNumber(
int blockNumber)
const;
178 QFont defaultFont()
const;
180 void setSuperScriptBaseline(
qreal baseline);
181 qreal superScriptBaseline()
const;
183 void setSubScriptBaseline(
qreal baseline);
184 qreal subScriptBaseline()
const;
186 void setBaselineOffset(
qreal baseline);
187 qreal baselineOffset()
const;
189 int pageCount()
const;
191 bool isModified()
const;
201 StyleSheetResource = 3,
202 MarkdownResource = 4,
219 QList<QTextFormat> allFormats()
const;
221 void markContentsDirty(
int from,
int length);
223 void setUseDesignMetrics(
bool b);
224 bool useDesignMetrics()
const;
226 void setLayoutEnabled(
bool b);
227 bool isLayoutEnabled()
const;
232 qreal textWidth()
const;
234 qreal idealWidth()
const;
236 qreal indentWidth()
const;
239 qreal documentMargin()
const;
240 void setDocumentMargin(
qreal margin);
245 int blockCount()
const;
246 int lineCount()
const;
247 int characterCount()
const;
249#ifndef QT_NO_CSSPARSER
250 void setDefaultStyleSheet(
const QString &sheet);
251 QString defaultStyleSheet()
const;
260 UndoAndRedoStacks = UndoStack | RedoStack
262 void clearUndoRedoStacks(Stacks historyToClear = UndoAndRedoStacks);
264 int maximumBlockCount()
const;
265 void setMaximumBlockCount(
int maximum);
271 void setBaseUrl(
const QUrl &
url);
292 void setModified(
bool m =
true);
virtual ~QAbstractUndoItem()=0
The QPainter class performs low-level painting on widgets and other paint devices.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\inmodule QtCore \reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
\reentrant \inmodule QtGui
\reentrant \inmodule QtGui
ResourceType
This enum describes the types of resources that can be loaded by QTextDocument's loadResource() funct...
void contentsChange(int from, int charsRemoved, int charsAdded)
This signal is emitted whenever the document's content changes; for example, when text is inserted or...
FindFlag
This enum describes the options available to QTextDocument's find function.
MetaInformation
This enum describes the different types of meta information that can be added to a document.
Stacks
\value UndoStack The undo stack.
void redoAvailable(bool)
This signal is emitted whenever redo operations become available (available is true) or unavailable (...
void modificationChanged(bool m)
This signal is emitted whenever the content of the document changes in a way that affects the modific...
void baseUrlChanged(const QUrl &url)
void undoAvailable(bool)
This signal is emitted whenever undo operations become available (available is true) or unavailable (...
void cursorPositionChanged(const QTextCursor &cursor)
This signal is emitted whenever the position of a cursor changed due to an editing operation.
void contentsChanged()
This signal is emitted whenever the document's content changes; for example, when text is inserted or...
void documentLayoutChanged()
std::function< QVariant(const QUrl &)> ResourceProvider
void blockCountChanged(int newBlockCount)
Combined button and popup list for selecting options.
Q_GUI_EXPORT QString convertFromPlainText(const QString &plain, WhiteSpaceMode mode=WhiteSpacePre)
Converts the plain text string plain to an HTML-formatted paragraph while preserving most of its look...
Q_GUI_EXPORT bool mightBeRichText(QAnyStringView)
Returns true if the string text is likely to be rich text; otherwise returns false.
static QString toPlainText(const QString &text)
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
GLboolean GLboolean GLboolean b
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLenum GLsizei length
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)
QUrl url("example.com")
[constructor-url-reference]