KTextWidgets
krichtextedit.h
365 KTEXTWIDGETS_NO_EXPORT KRichTextEdit(KRichTextEditPrivate &dd, const QString &text, QWidget *parent);
The KRichTextEdit class provides a widget to edit and display rich text.
Definition krichtextedit.h:51
void insertPlainTextImplementation()
Definition krichtextedit.cpp:315
void setTextStrikeOut(bool strikeOut)
Toggles the strikeout formatting of the current word or selection at the current cursor position.
Definition krichtextedit.cpp:233
void setTextSubScript(bool subscript)
Toggles the subscript formatting of the current word or selection at the current cursor position.
Definition krichtextedit.cpp:331
void alignRight()
Sets the alignment of the current block to Right Aligned.
Definition krichtextedit.cpp:156
void setTextForegroundColor(const QColor &color)
Sets the foreground color of the current word or selection to color.
Definition krichtextedit.cpp:244
void insertHorizontalRule()
Inserts a horizontal rule below the current block.
Definition krichtextedit.cpp:122
bool canDedentList() const
Returns true if the list item at the current position can be dedented.
Definition krichtextedit.cpp:615
QString currentLinkText() const
Returns the text of the link at the current position or an empty string if the cursor is not on a lin...
Definition krichtextedit.cpp:425
void selectLinkText(QTextCursor *cursor) const
If the cursor is on a link, sets the cursor to a selection of the text of the link.
Definition krichtextedit.cpp:443
void alignJustify()
Sets the alignment of the current block to Justified.
Definition krichtextedit.cpp:165
void switchToPlainText()
This will switch the editor to plain text mode.
Definition krichtextedit.cpp:299
void setTextOrHtml(const QString &text)
Replaces all the content of the text edit with the given string.
Definition krichtextedit.cpp:409
void setTextUnderline(bool underline)
Toggles the underline formatting of the current word or selection at the current cursor position.
Definition krichtextedit.cpp:222
void textModeChanged(KRichTextEdit::Mode mode)
Emitted whenever the text mode is changed.
void setHeadingLevel(int level)
Sets the heading level of a current block or selection.
Definition krichtextedit.cpp:342
QString toCleanHtml() const
This will clean some of the bad html produced by the underlying QTextEdit It walks over all lines and...
Definition krichtextedit.cpp:622
void setFontSize(int size)
Sets the current word or selection to the font size size.
Definition krichtextedit.cpp:277
void indentListLess()
Decreases the nesting level of the current block or selected blocks.
Definition krichtextedit.cpp:115
void makeLeftToRight()
Sets the direction of the current block to Left-To-Right.
Definition krichtextedit.cpp:187
KRichTextEdit(const QString &text, QWidget *parent=nullptr)
Constructs a KRichTextEdit object.
Definition krichtextedit.cpp:60
QString currentLinkUrl() const
Returns the URL target (href) of the link at the current position or an empty string if the cursor is...
Definition krichtextedit.cpp:479
void setListStyle(int _styleIndex)
Sets the list style of the current list, or creates a new list using the current block.
Definition krichtextedit.cpp:98
void indentListMore()
Increases the nesting level of the current block or selected blocks.
Definition krichtextedit.cpp:107
void alignLeft()
Sets the alignment of the current block to Left Aligned.
Definition krichtextedit.cpp:138
void setTextSuperScript(bool superscript)
Toggles the superscript formatting of the current word or selection at the current cursor position.
Definition krichtextedit.cpp:320
void setTextBold(bool bold)
Toggles the bold formatting of the current word or selection at the current cursor position.
Definition krichtextedit.cpp:200
void setTextItalic(bool italic)
Toggles the italic formatting of the current word or selection at the current cursor position.
Definition krichtextedit.cpp:211
void makeRightToLeft()
Sets the direction of the current block to Right-To-Left.
Definition krichtextedit.cpp:174
bool canIndentList() const
Returns true if the list item at the current position can be indented.
Definition krichtextedit.cpp:608
void alignCenter()
Sets the alignment of the current block to Centered.
Definition krichtextedit.cpp:147
void updateLink(const QString &linkUrl, const QString &linkText)
Replaces the current selection with a hyperlink with the link URL linkUrl and the link text linkText.
Definition krichtextedit.cpp:484
KTextEdit(const QString &text, QWidget *parent=nullptr)
Constructs a KTextEdit object.
Definition ktextedit.cpp:230
bool event(QEvent *) override
Reimplemented to catch "delete word" shortcut events.
Definition ktextedit.cpp:298
void keyPressEvent(QKeyEvent *) override
Reimplemented for internal reasons.
Definition ktextedit.cpp:1031
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
QString fontFamily() const const
void setFontFamily(const QString &fontFamily)
void setTextBackgroundColor(const QColor &c)
cursor
void setFont(const QFont &)
size
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri May 2 2025 11:58:19 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri May 2 2025 11:58:19 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.