KTextWidgets
krichtextwidget.cpp
207 d->action_text_foreground_color = new QAction(QIcon::fromTheme(QStringLiteral("format-stroke-color")), i18nc("@action", "Text &Color…"), this);
221 d->action_text_background_color = new QAction(QIcon::fromTheme(QStringLiteral("format-fill-color")), i18nc("@action", "Text &Highlight…"), this);
237 connect(d->action_font_family, &KSelectAction::textTriggered, this, &KRichTextWidget::setFontFamily);
247 connect(d->action_font_size, &KFontSizeAction::fontSizeChanged, this, &KRichTextEdit::setFontSize);
253 d->action_text_bold = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-bold")), i18nc("@action boldify selected text", "&Bold"), this);
267 new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-italic")), i18nc("@action italicize selected text", "&Italic"), this);
281 new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-underline")), i18nc("@action underline selected text", "&Underline"), this);
294 d->action_text_strikeout = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-strikethrough")), i18nc("@action", "&Strike Out"), this);
308 d->action_align_left = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-justify-left")), i18nc("@action", "Align &Left"), this);
314 d->action_align_center = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-justify-center")), i18nc("@action", "Align &Center"), this);
320 d->action_align_right = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-justify-right")), i18nc("@action", "Align &Right"), this);
326 d->action_align_justify = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-justify-fill")), i18nc("@action", "&Justify"), this);
345 d->action_direction_ltr = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-direction-ltr")), i18nc("@action", "Left-to-Right"), this);
351 d->action_direction_rtl = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-direction-rtl")), i18nc("@action", "Right-to-Left"), this);
366 d->action_list_style = new KSelectAction(QIcon::fromTheme(QStringLiteral("format-list-unordered")), i18nc("@title:menu", "List Style"), this);
397 d->action_list_indent = new QAction(QIcon::fromTheme(QStringLiteral("format-indent-more")), i18nc("@action", "Increase Indent"), this);
409 d->action_list_dedent = new QAction(QIcon::fromTheme(QStringLiteral("format-indent-less")), i18nc("@action", "Decrease Indent"), this);
421 d->action_insert_horizontal_rule = new QAction(QIcon::fromTheme(QStringLiteral("insert-horizontal-rule")), i18nc("@action", "Insert Rule Line"), this);
424 connect(d->action_insert_horizontal_rule, &QAction::triggered, this, &KRichTextEdit::insertHorizontalRule);
430 d->action_manage_link = new QAction(QIcon::fromTheme(QStringLiteral("insert-link")), i18nc("@action", "Link"), this);
442 d->action_format_painter = new KToggleAction(QIcon::fromTheme(QStringLiteral("draw-brush")), i18nc("@action", "Format Painter"), this);
463 d->action_text_subscript = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-subscript")), i18nc("@action", "Subscript"), this);
468 d->action_text_superscript = new KToggleAction(QIcon::fromTheme(QStringLiteral("format-text-superscript")), i18nc("@action", "Superscript"), this);
471 connect(d->action_text_superscript, &QAction::triggered, this, &KRichTextEdit::setTextSuperScript);
635 const QColor defaultColor = KColorScheme(QPalette::Active, KColorScheme::View).foreground().color();
637 const QColor selectedColor = QColorDialog::getColor(currentColor.isValid() ? currentColor : defaultColor, q);
652 const QColor defaultColor = KColorScheme(QPalette::Active, KColorScheme::View).foreground().color();
654 const QColor selectedColor = QColorDialog::getColor(currentColor.isValid() ? currentColor : defaultColor, q);
706 q->viewport()->setCursor(QCursor(QIcon::fromTheme(QStringLiteral("draw-brush")).pixmap(32, 32), 0, 32));
QBrush foreground(ForegroundRole=NormalText) const
The KRichTextEdit class provides a widget to edit and display rich text.
Definition krichtextedit.h:51
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 insertHorizontalRule()
Inserts a horizontal rule below the current block.
Definition krichtextedit.cpp:123
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 setTextUnderline(bool underline)
Toggles the underline formatting of the current word or selection at the current cursor position.
Definition krichtextedit.cpp:223
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
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
void alignCenter()
Sets the alignment of the current block to Centered.
Definition krichtextedit.cpp:148
void setActionsEnabled(bool enabled)
Disables or enables all of the actions created by createActions().
Definition krichtextwidget.cpp:516
void updateActionStates()
Tells KRichTextWidget to update the state of the actions created by createActions().
Definition krichtextwidget.cpp:714
void setRichTextSupport(const KRichTextWidget::RichTextSupport &support)
Sets the supported rich text subset available.
@ SupportTextBackgroundColor
Action to change the background color of the currently selected text.
Definition krichtextwidget.h:121
@ SupportFontFamily
Action to change the font family of the currently selected text.
Definition krichtextwidget.h:96
@ SupportDirection
Action to change direction of text to Right-To-Left or Left-To-Right.
Definition krichtextwidget.h:214
@ SupportHeading
Action to make the current line a heading (up to six levels, corresponding to HTML h1....
Definition krichtextwidget.h:225
@ SupportDedentLists
Action to decrease the current list nesting level.
Definition krichtextwidget.h:147
@ SupportHyperlinks
Action to convert the current text to a hyperlink.
Definition krichtextwidget.h:186
@ SupportChangeListStyle
Action to make the current line a list element, change the list style or remove list formatting.
Definition krichtextwidget.h:136
@ SupportToPlainText
Action to change the text of the whole text edit to plain text.
Definition krichtextwidget.h:199
@ SupportFontSize
Action to change the font size of the currently selected text.
Definition krichtextwidget.h:105
@ SupportTextForegroundColor
Action to change the text color of the currently selected text.
Definition krichtextwidget.h:113
@ SupportFormatPainting
Action to make the mouse cursor a format painter.
Definition krichtextwidget.h:193
@ SupportAlignment
Actions to align the current paragraph left, righ, center or justify.
Definition krichtextwidget.h:172
@ SupportSuperScriptAndSubScript
Actions to format text as superscript or subscript.
Definition krichtextwidget.h:207
@ SupportIndentLists
Action to increase the current list nesting level.
Definition krichtextwidget.h:142
virtual QList< QAction * > createActions()
Creates the actions and adds them to the given action collection.
void indexTriggered(int index)
void textTriggered(const QString &text)
bool event(QEvent *) override
Reimplemented to catch "delete word" shortcut events.
Definition ktextedit.cpp:298
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QCA_EXPORT void init()
virtual void mouseReleaseEvent(QMouseEvent *e) override
void toggled(bool checked)
void triggered(bool checked)
QAction * addAction(QAction *action)
const QColor & color() const const
bool isValid() const const
QColor getColor(const QColor &initial, QWidget *parent, const QString &title, ColorDialogOptions options)
void accepted()
bool bold() const const
QString family() const const
bool italic() const const
int pointSize() const const
void setBold(bool enable)
void setItalic(bool enable)
void setStrikeOut(bool enable)
void setUnderline(bool enable)
bool strikeOut() const const
bool underline() const const
QIcon fromTheme(const QString &name)
void append(QList< T > &&value)
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
Active
typedef Alignment
IBeamCursor
Key_B
LayoutDirection
CTRL
WA_DeleteOnClose
VerticalAlignment
QFont font() const const
VerticalAlignment verticalAlignment() const const
void setCharFormat(const QTextCharFormat &format)
QTextCharFormat currentCharFormat() const const
void currentCharFormatChanged(const QTextCharFormat &f)
void cursorPositionChanged()
void setFontFamily(const QString &fontFamily)
void setTextCursor(const QTextCursor &cursor)
QTextCursor textCursor() const const
QBrush background() const const
enabled
QStyle * style() const const
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:15 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.