99 void setMode( Mode mode );
106 QString toPlainText()
const;
113 QString toHtml()
const;
135 QTextDocument *
document() {
return mTextEdit->document(); }
142 QTextCursor
textCursor()
const {
return mTextEdit->textCursor(); }
149 void setTextCursor(
const QTextCursor &cursor ) { mTextEdit->setTextCursor( cursor ); }
158 void setText(
const QString &text );
178 void textRemoveFormat();
179 void textRemoveAllFormat();
181 void textUnderline();
182 void textStrikeout();
184 void textSize(
const QString &p );
185 void textLink(
bool checked );
186 void textStyle(
int index );
189 void listBullet(
bool checked );
190 void listOrdered(
bool checked );
191 void slotCurrentCharFormatChanged(
const QTextCharFormat &format );
192 void slotCursorPositionChanged();
193 void slotClipboardDataChanged();
194 void increaseIndentation();
195 void decreaseIndentation();
197 void insertImageFromUrl();
198 void editSource(
bool enabled );
201 void mergeFormatOnWordOrSelection(
const QTextCharFormat &format );
202 void fontChanged(
const QFont &f );
203 void fgColorChanged(
const QColor &
c );
204 void bgColorChanged(
const QColor &
c );
205 void list(
bool checked, QTextListFormat::Style style );
206 void indent(
int delta );
210 int mFontSizeH1 = 18;
211 int mFontSizeH2 = 16;
212 int mFontSizeH3 = 14;
213 int mFontSizeH4 = 12;
217 ParagraphStandard = 0,
225 QComboBox *mParagraphStyleCombo =
nullptr;
226 QComboBox *mFontSizeCombo =
nullptr;
232 QPointer<QTextList> mLastBlockList;
233 QString mMonospaceFontFamily;
A widget for editing rich text documents, with support for user controlled formatting of text and ins...
QTextCursor textCursor() const
Returns a reference to the text cursor.
QgsRichTextEditor(QWidget *parent=nullptr)
Constructor for QgsRichTextEditor, with the specified parent widget.
Mode mode() const
Returns the widget's mode, which defines which formatting options are exposed in the widget.
@ QTextDocument
Default mode, exposes the Qt supported HTML/CSS subset.
void setTextCursor(const QTextCursor &cursor)
Sets the current text cursor.
void textChanged()
Emitted when the text contents are changed.
void focusInEvent(QFocusEvent *event) override
QTextEdit * textEdit()
Returns the widget's QTextEditor control.
QTextDocument * document()
Returns a reference to the QTextDocument shown in the widget.
QToolBar * toolBar()
Returns the widget's toolbar.
Handles rendering text using rich formatting options, including drop shadows, buffers and background ...