73 QString toPlainText()
const;
80 QString toHtml()
const;
85 QTextDocument *
document() {
return mTextEdit->document(); }
92 QTextCursor
textCursor()
const {
return mTextEdit->textCursor(); }
99 void setTextCursor(
const QTextCursor &cursor ) { mTextEdit->setTextCursor( cursor ); }
108 void setText(
const QString &text );
125 void focusInEvent( QFocusEvent *event )
override;
128 void setPlainText(
const QString &text ) { mTextEdit->setPlainText( text ); }
129 void setHtml(
const QString &text ) { mTextEdit->setHtml( text ); }
130 void textRemoveFormat();
131 void textRemoveAllFormat();
133 void textUnderline();
134 void textStrikeout();
136 void textSize(
const QString &p );
137 void textLink(
bool checked );
138 void textStyle(
int index );
141 void listBullet(
bool checked );
142 void listOrdered(
bool checked );
143 void slotCurrentCharFormatChanged(
const QTextCharFormat &format );
144 void slotCursorPositionChanged();
145 void slotClipboardDataChanged();
146 void increaseIndentation();
147 void decreaseIndentation();
149 void editSource(
bool enabled );
152 void mergeFormatOnWordOrSelection(
const QTextCharFormat &format );
153 void fontChanged(
const QFont &f );
154 void fgColorChanged(
const QColor &
c );
155 void bgColorChanged(
const QColor &
c );
156 void list(
bool checked, QTextListFormat::Style style );
157 void indent(
int delta );
159 int mFontSizeH1 = 18;
160 int mFontSizeH2 = 16;
161 int mFontSizeH3 = 14;
162 int mFontSizeH4 = 12;
166 ParagraphStandard = 0,
174 QComboBox *mParagraphStyleCombo =
nullptr;
175 QComboBox *mFontSizeCombo =
nullptr;
181 QPointer<QTextList> mLastBlockList;
182 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.
void setTextCursor(const QTextCursor &cursor)
Sets the current text cursor.
void textChanged()
Emitted when the text contents are changed.
QTextDocument * document()
Returns a reference to the QTextDocument shown in the widget.