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:316
void setTextStrikeOut(bool strikeOut)
Toggles the strikeout formatting of the current word or selection at the current cursor position.
Definition krichtextedit.cpp:234
void setTextSubScript(bool subscript)
Toggles the subscript formatting of the current word or selection at the current cursor position.
Definition krichtextedit.cpp:332
void alignRight()
Sets the alignment of the current block to Right Aligned.
Definition krichtextedit.cpp:157
void setTextForegroundColor(const QColor &color)
Sets the foreground color of the current word or selection to color.
Definition krichtextedit.cpp:245
void insertHorizontalRule()
Inserts a horizontal rule below the current block.
Definition krichtextedit.cpp:123
bool canDedentList() const
Returns true if the list item at the current position can be dedented.
Definition krichtextedit.cpp:616
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:426
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:444
void alignJustify()
Sets the alignment of the current block to Justified.
Definition krichtextedit.cpp:166
void switchToPlainText()
This will switch the editor to plain text mode.
Definition krichtextedit.cpp:300
void setTextOrHtml(const QString &text)
Replaces all the content of the text edit with the given string.
Definition krichtextedit.cpp:410
void setTextUnderline(bool underline)
Toggles the underline formatting of the current word or selection at the current cursor position.
Definition krichtextedit.cpp:223
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:343
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:623
void setFontSize(int size)
Sets the current word or selection to the font size size.
Definition krichtextedit.cpp:278
void indentListLess()
Decreases the nesting level of the current block or selected blocks.
Definition krichtextedit.cpp:116
void makeLeftToRight()
Sets the direction of the current block to Left-To-Right.
Definition krichtextedit.cpp:188
KRichTextEdit(const QString &text, QWidget *parent=nullptr)
Constructs a KRichTextEdit object.
Definition krichtextedit.cpp:61
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:480
void setListStyle(int _styleIndex)
Sets the list style of the current list, or creates a new list using the current block.
Definition krichtextedit.cpp:99
void indentListMore()
Increases the nesting level of the current block or selected blocks.
Definition krichtextedit.cpp:108
void alignLeft()
Sets the alignment of the current block to Left Aligned.
Definition krichtextedit.cpp:139
void setTextSuperScript(bool superscript)
Toggles the superscript formatting of the current word or selection at the current cursor position.
Definition krichtextedit.cpp:321
void setTextBold(bool bold)
Toggles the bold formatting of the current word or selection at the current cursor position.
Definition krichtextedit.cpp:201
void setTextItalic(bool italic)
Toggles the italic formatting of the current word or selection at the current cursor position.
Definition krichtextedit.cpp:212
void makeRightToLeft()
Sets the direction of the current block to Right-To-Left.
Definition krichtextedit.cpp:175
bool canIndentList() const
Returns true if the list item at the current position can be indented.
Definition krichtextedit.cpp:609
void alignCenter()
Sets the alignment of the current block to Centered.
Definition krichtextedit.cpp:148
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:485
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 Jan 24 2025 11:48:44 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:48:44 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.