KDEUI
krichtextedit.cpp
Go to the documentation of this file.
110 if (!cursor.hasSelection() && cursor.position() != wordStart.position() && cursor.position() != wordEnd.position())
325 fmt.setVerticalAlignment(superscript ? QTextCharFormat::AlignSuperScript : QTextCharFormat::AlignNormal);
334 fmt.setVerticalAlignment(subscript ? QTextCharFormat::AlignSubScript : QTextCharFormat::AlignNormal);
446 format.setUnderlineColor(KColorScheme(QPalette::Active, KColorScheme::View).foreground(KColorScheme::LinkText).color());
447 format.setForeground(KColorScheme(QPalette::Active, KColorScheme::View).foreground(KColorScheme::LinkText).color());
556 // if you have three or more empty lines. It's best to replace empty <p> elements with <p> </p>.
int position() const
void alignCenter()
Sets the alignment of the current block to Centered.
Definition: krichtextedit.cpp:182
void setTextBold(bool bold)
Toggles the bold formatting of the current word or selection at the current cursor position...
Definition: krichtextedit.cpp:225
void setFontItalic(bool italic)
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:418
void alignJustify()
Sets the alignment of the current block to Justified.
Definition: krichtextedit.cpp:196
void setUnderlineStyle(UnderlineStyle style)
void setAnchor(bool anchor)
UnderlineStyle underlineStyle() const
void cursorPositionChanged()
QTextCharFormat charFormat() const
void selectLinkText() const
Convenience function to select the link text using the active cursor.
Definition: krichtextedit.cpp:378
void setTextStrikeOut(bool strikeOut)
Toggles the strikeout formatting of the current word or selection at the current cursor position...
Definition: krichtextedit.cpp:252
void insertHtml(const QString &html)
void setFontPointSize(qreal size)
void setTextBackgroundColor(const QColor &color)
Sets the background color of the current word or selection to color.
Definition: krichtextedit.cpp:270
QColor underlineColor() const
QString anchorHref() const
void setMinimal(bool minimal)
void setHtml(const QString &text)
void setTextUnderline(bool underline)
Toggles the underline formatting of the current word or selection at the current cursor position...
Definition: krichtextedit.cpp:243
QBrush foreground() const
void makeRightToLeft()
Sets the direction of the current block to Right-To-Left.
Definition: krichtextedit.cpp:203
bool canIndentList() const
Returns true if the list item at the current position can be indented.
Definition: krichtextedit.cpp:518
QString selectedText() const
void setFontSize(int size)
Sets the current word or selection to the font size size.
Definition: krichtextedit.cpp:288
void setLayoutDirection(Qt::LayoutDirection direction)
void setFontStrikeOut(bool strikeOut)
void setTextForegroundColor(const QColor &color)
Sets the foreground color of the current word or selection to color.
Definition: krichtextedit.cpp:261
QString toPlainText() const
void mergeBlockFormat(const QTextBlockFormat &modifier)
void alignRight()
Sets the alignment of the current block to Right Aligned.
Definition: krichtextedit.cpp:189
void setTextSubScript(bool subscript)
Toggles the subscript formatting of the current word or selection at the current cursor position...
Definition: krichtextedit.cpp:331
bool movePosition(MoveOperation operation, MoveMode mode, int n)
void select(SelectionType selection)
QTextBlock begin() const
int matchedLength() const
KRichTextEdit(const QString &text, QWidget *parent=0)
Constructs a KRichTextEdit object.
Definition: krichtextedit.cpp:118
void setForeground(const QBrush &brush)
int indexIn(const QString &str, int offset, CaretMode caretMode) const
void insertPlainTextImplementation()
Definition: krichtextedit.cpp:317
bool hasSelection() const
void insertBlock()
void setListStyle(int _styleIndex)
Sets the list style of the current list, or creates a new list using the current block.
Definition: krichtextedit.cpp:143
void setVerticalAlignment(VerticalAlignment alignment)
void setFocus()
void endEditBlock()
void insertText(const QString &text)
bool canDedentList() const
Returns true if the list item at the current position can be dedented.
Definition: krichtextedit.cpp:523
bool isEmpty() const
void setBackground(const QBrush &brush)
void switchToPlainText()
This will switch the editor to plain text mode.
Definition: krichtextedit.cpp:306
bool atStart() const
void setTextSuperScript(bool superscript)
Toggles the superscript formatting of the current word or selection at the current cursor position...
Definition: krichtextedit.cpp:322
void indentListMore()
Increases the nesting level of the current block or selected blocks.
Definition: krichtextedit.cpp:150
void setTextCursor(const QTextCursor &cursor)
void setPlainText(const QString &text)
void insertHorizontalRule()
Inserts a horizontal rule below the current block.
Definition: krichtextedit.cpp:161
static void setAutoHideCursor(QWidget *w, bool enable, bool customEventFilter=false)
Sets auto-hiding the cursor for widget w.
Definition: kcursor.cpp:202
QTextDocument * document() const
bool atBlockEnd() const
void setFont(const QFont &font)
void beginEditBlock()
void setAnchorHref(const QString &value)
bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType type, QGenericReturnArgument ret, QGenericArgument val0, QGenericArgument val1, QGenericArgument val2, QGenericArgument val3, QGenericArgument val4, QGenericArgument val5, QGenericArgument val6, QGenericArgument val7, QGenericArgument val8, QGenericArgument val9)
void mergeCharFormat(const QTextCharFormat &modifier)
void makeLeftToRight()
Sets the direction of the current block to Left-To-Right.
Definition: krichtextedit.cpp:214
void setFontWeight(int weight)
QString & replace(int position, int n, QChar after)
QTextCharFormat charFormat() const
The KRichTextEdit class provides a widget to edit and display rich text.
Definition: krichtextedit.h:65
void setFontFamily(const QString &family)
QColor color() const
int length() const
bool mightBeRichText(const QString &text)
void setFontUnderline(bool underline)
void setFont(const QFont &font)
Sets the current word or selection to the font font.
Definition: krichtextedit.cpp:297
bool isAnchor() const
void setTextOrHtml(const QString &text)
Replaces all the content of the text edit with the given string.
Definition: krichtextedit.cpp:358
void setUnderlineColor(const QColor &color)
void setCharFormat(const QTextCharFormat &format)
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:423
bool atEnd() const
virtual void keyPressEvent(QKeyEvent *)
Reimplemented for internal reasons.
Definition: ktextedit.cpp:1121
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:528
int selectionEnd() const
void setFontFamily(const QString &fontFamily)
Sets the current word or selection to the font family fontFamily.
Definition: krichtextedit.cpp:279
void alignLeft()
Sets the alignment of the current block to Left Aligned.
Definition: krichtextedit.cpp:175
void indentListLess()
Decreases the nesting level of the current block or selected blocks.
Definition: krichtextedit.cpp:156
void setAlignment(QFlags< Qt::AlignmentFlag > a)
void textModeChanged(KRichTextEdit::Mode mode)
Emitted whenever the text mode is changed.
QTextBlockFormat blockFormat() const
void setAcceptRichText(bool accept)
QTextCursor textCursor() const
void setTextItalic(bool italic)
Toggles the italic formatting of the current word or selection at the current cursor position...
Definition: krichtextedit.cpp:234
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:371
void setPosition(int pos, MoveMode m)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.