KDEUI
krichtextwidget.cpp
Go to the documentation of this file.
232 d->action_text_foreground_color = new KAction(KIcon("format-stroke-color"), i18nc("@action", "Text &Color..."), actionCollection);
236 connect(d->action_text_foreground_color, SIGNAL(triggered()), this, SLOT(_k_setTextForegroundColor()));
244 d->action_text_background_color = new KAction(KIcon("format-fill-color"), i18nc("@action", "Text &Highlight..."), actionCollection);
247 connect(d->action_text_background_color, SIGNAL(triggered()), this, SLOT(_k_setTextBackgroundColor()));
276 d->action_text_bold = new KToggleAction(KIcon("format-text-bold"), i18nc("@action boldify selected text", "&Bold"), actionCollection);
290 d->action_text_italic = new KToggleAction(KIcon("format-text-italic"), i18nc("@action italicize selected text", "&Italic"), actionCollection);
305 d->action_text_underline = new KToggleAction(KIcon("format-text-underline"), i18nc("@action underline selected text", "&Underline"), actionCollection);
320 d->action_text_strikeout = new KToggleAction(KIcon("format-text-strikethrough"), i18nc("@action", "&Strike Out"), actionCollection);
333 d->action_align_left = new KToggleAction(KIcon("format-justify-left"), i18nc("@action", "Align &Left"), actionCollection);
340 d->action_align_center = new KToggleAction(KIcon("format-justify-center"), i18nc("@action", "Align &Center"), actionCollection);
347 d->action_align_right = new KToggleAction(KIcon("format-justify-right"), i18nc("@action", "Align &Right"), actionCollection);
354 d->action_align_justify = new KToggleAction(KIcon("format-justify-fill"), i18nc("@action", "&Justify"), actionCollection);
380 d->action_direction_ltr = new KToggleAction(KIcon("format-text-direction-ltr"), i18nc("@action", "Left-to-Right"), actionCollection);
387 d->action_direction_rtl = new KToggleAction(KIcon("format-text-direction-rtl"), i18nc("@action", "Right-to-Left"), actionCollection);
406 d->action_list_style = new KSelectAction(KIcon("format-list-unordered"), i18nc("@title:menu", "List Style"), actionCollection);
433 d->action_list_indent = new KAction(KIcon("format-indent-more"), i18nc("@action", "Increase Indent"), actionCollection);
446 d->action_list_dedent = new KAction(KIcon("format-indent-less"), i18nc("@action", "Decrease Indent"), actionCollection);
459 d->action_insert_horizontal_rule = new KAction(KIcon("insert-horizontal-rule"), i18nc("@action", "Insert Rule Line"), actionCollection);
470 d->action_manage_link = new KAction(KIcon("insert-link"), i18nc("@action", "Link"), actionCollection);
481 d->action_format_painter = new KToggleAction(KIcon("draw-brush"), i18nc("@action", "Format Painter"), actionCollection);
492 d->action_to_plain_text = new KToggleAction(i18nc("@action", "To Plain Text"), actionCollection);
503 d->action_text_subscript = new KToggleAction(KIcon("format-text-subscript"), i18nc("@action", "Subscript"), actionCollection);
510 d->action_text_superscript = new KToggleAction(KIcon("format-text-superscript"), i18nc("@action", "Superscript"), actionCollection);
641 const int result = KColorDialog::getColor(currentTextForegroundColor, KColorScheme(QPalette::Active, KColorScheme::View).foreground().color() , q);
645 currentTextForegroundColor = KColorScheme(QPalette::Active, KColorScheme::View).foreground().color() ;
656 const int result = KColorDialog::getColor(currentTextBackgroundColor, KColorScheme(QPalette::Active, KColorScheme::View).foreground().color() , q);
660 currentTextBackgroundColor = KColorScheme(QPalette::Active, KColorScheme::View).foreground().color() ;
void makeRightToLeft()
Sets the direction of the current block to Right-To-Left.
Definition: krichtextedit.cpp:203
@ SupportDedentLists
Action to decrease the current list nesting level.
Definition: krichtextwidget.h:154
void insertHorizontalRule()
Inserts a horizontal rule below the current block.
Definition: krichtextedit.cpp:161
void setTextUnderline(bool underline)
Toggles the underline formatting of the current word or selection at the current cursor position.
Definition: krichtextedit.cpp:243
@ SupportToPlainText
Action to change the text of the whole text edit to plain text.
Definition: krichtextwidget.h:206
@ SupportFontFamily
Action to change the font family of the currently selected text.
Definition: krichtextwidget.h:103
void indentListLess()
Decreases the nesting level of the current block or selected blocks.
Definition: krichtextedit.cpp:156
@ FullSupport
Includes all above actions for full rich text support.
Definition: krichtextwidget.h:226
QString i18nc(const char *ctxt, const char *text)
@ SupportAlignment
Actions to align the current paragraph left, righ, center or justify.
Definition: krichtextwidget.h:179
@ SupportSuperScriptAndSubScript
Actions to format text as superscript or subscript.
Definition: krichtextwidget.h:214
@ SupportIndentLists
Action to increase the current list nesting level.
Definition: krichtextwidget.h:149
void alignLeft()
Sets the alignment of the current block to Left Aligned.
Definition: krichtextedit.cpp:175
The KRichTextEdit class provides a widget to edit and display rich text.
Definition: krichtextedit.h:65
QAction * addAction(const QString &name, QAction *action)
Add an action under the given name to the collection.
Definition: kactioncollection.cpp:217
void makeLeftToRight()
Sets the direction of the current block to Left-To-Right.
Definition: krichtextedit.cpp:214
@ SupportTextForegroundColor
Action to change the text color of the currently selected text.
Definition: krichtextwidget.h:120
@ SupportChangeListStyle
Action to make the current line a list element, change the list style or remove list formatting.
Definition: krichtextwidget.h:143
void alignRight()
Sets the alignment of the current block to Right Aligned.
Definition: krichtextedit.cpp:189
void alignJustify()
Sets the alignment of the current block to Justified.
Definition: krichtextedit.cpp:196
void removeAction(QAction *action)
Removes an action from the collection and deletes it.
Definition: kactioncollection.cpp:316
void setActionsEnabled(bool enabled)
Disables or enables all of the actions created by createActions().
void setFontFamily(const QString &fontFamily)
Sets the current word or selection to the font family fontFamily.
Definition: krichtextedit.cpp:279
void setRichTextSupport(const KRichTextWidget::RichTextSupport &support)
Sets the supported rich text subset available.
void setFontSize(int size)
Sets the current word or selection to the font size size.
Definition: krichtextedit.cpp:288
void setTextBold(bool bold)
Toggles the bold formatting of the current word or selection at the current cursor position.
Definition: krichtextedit.cpp:225
void setTextStrikeOut(bool strikeOut)
Toggles the strikeout formatting of the current word or selection at the current cursor position.
Definition: krichtextedit.cpp:252
void alignCenter()
Sets the alignment of the current block to Centered.
Definition: krichtextedit.cpp:182
void updateActionStates()
Tells KRichTextWidget to update the state of the actions created by createActions().
@ SupportHyperlinks
Action to convert the current text to a hyperlink.
Definition: krichtextwidget.h:193
void setTextSuperScript(bool superscript)
Toggles the superscript formatting of the current word or selection at the current cursor position.
Definition: krichtextedit.cpp:322
QBrush foreground(ForegroundRole=NormalText) const
Retrieve the requested foreground brush.
Definition: kcolorscheme.cpp:459
void setTextItalic(bool italic)
Toggles the italic formatting of the current word or selection at the current cursor position.
Definition: krichtextedit.cpp:234
virtual void createActions(KActionCollection *actionCollection)
Creates the actions and adds them to the given action collection.
static int getColor(QColor &theColor, QWidget *parent=0L)
Creates a modal color dialog, let the user choose a color, and returns when the dialog is closed.
Definition: kcolordialog.cpp:1492
void switchToPlainText()
This will switch the editor to plain text mode.
Definition: krichtextedit.cpp:306
virtual bool event(QEvent *)
Reimplemented to catch "delete word" shortcut events.
Definition: ktextedit.cpp:371
void setTextSubScript(bool subscript)
Toggles the subscript formatting of the current word or selection at the current cursor position.
Definition: krichtextedit.cpp:331
@ SupportDirection
Action to change direction of text to Right-To-Left or Left-To-Right.
Definition: krichtextwidget.h:221
@ SupportFormatPainting
Action to make the mouse cursor a format painter.
Definition: krichtextwidget.h:200
@ SupportTextBackgroundColor
Action to change the background color of the currently selected text.
Definition: krichtextwidget.h:128
@ SupportFontSize
Action to change the font size of the currently selected text.
Definition: krichtextwidget.h:112
void indentListMore()
Increases the nesting level of the current block or selected blocks.
Definition: krichtextedit.cpp:150
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Jan 30 2020 00:00:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Jan 30 2020 00:00:00 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.