98 void setMode( Mode mode );
105 QString toPlainText()
const;
112 QString toHtml()
const;
124 QTextDocument *
document() {
return mTextEdit->document(); }
131 QTextCursor
textCursor()
const {
return mTextEdit->textCursor(); }
138 void setTextCursor(
const QTextCursor &cursor ) { mTextEdit->setTextCursor( cursor ); }
147 void setText(
const QString &text );
167 void textRemoveFormat();
168 void textRemoveAllFormat();
170 void textUnderline();
171 void textStrikeout();
173 void textSize(
const QString &p );
174 void textLink(
bool checked );
175 void textStyle(
int index );
178 void listBullet(
bool checked );
179 void listOrdered(
bool checked );
180 void slotCurrentCharFormatChanged(
const QTextCharFormat &format );
181 void slotCursorPositionChanged();
182 void slotClipboardDataChanged();
183 void increaseIndentation();
184 void decreaseIndentation();
186 void editSource(
bool enabled );
189 void mergeFormatOnWordOrSelection(
const QTextCharFormat &format );
190 void fontChanged(
const QFont &f );
191 void fgColorChanged(
const QColor &
c );
192 void bgColorChanged(
const QColor &
c );
193 void list(
bool checked, QTextListFormat::Style style );
194 void indent(
int delta );
198 int mFontSizeH1 = 18;
199 int mFontSizeH2 = 16;
200 int mFontSizeH3 = 14;
201 int mFontSizeH4 = 12;
205 ParagraphStandard = 0,
213 QComboBox *mParagraphStyleCombo =
nullptr;
214 QComboBox *mFontSizeCombo =
nullptr;
220 QPointer<QTextList> mLastBlockList;
221 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.
Handles rendering text using rich formatting options, including drop shadows, buffers and background ...