class KRichTextWidget |
|
A KRichTextEdit with common actions
This class implements common actions which are often used with KRichTextEdit. All you need to do is to call createActions(), and the actions will be added to your KXMLGUIWindow. Remember to also add the chosen actions to your application ui.rc file. See the KRichTextWidget.RichTextSupportValues enum for an overview of supported actions.
Author Stephen Kelly @since 4.1 |
|
Constructor
parent - the parent widget |
|
Constructs a KRichTextWidget object
text - The initial text of the text edit, which is interpreted as HTML. parent - The parent widget |
|
Creates the actions and adds them to the given action collection.
Call this before calling setupGUI() in your application, but after calling setRichTextSupport(). The XML file of your KXmlGuiWindow needs to have the action names in them, so that the actions actually appear in the menu and in the toolbars. Below is a list of actions that are created,depending on the supported rich text subset set by setRichTextSupport(). The list contains action names. Those names need to be the same in your XML file. See the KRichTextWidget.RichTextSupportValues enum documentation for a detailed explaination of each action.
actionCollection - the actions will be added to this action collection |
|
Reimplemented. Catches mouse release events. Used to know when a selection has been completed. |
|
Returns the supported rich text subset available. Returns The supported subset. |
|
Disables or enables all of the actions created by
createActions().
This may be useful in cases where rich text mode may be set on or off.
enabled - Whether to enable or disable the actions. |
|
Sets the supported rich text subset available.
The default is KRichTextWidget.FullSupport and will be set in the constructor. You need to call createActions() afterwards. support - The supported subset. |
|
Tells KRichTextWidget to update the state of the actions created by
createActions().
This is normally automatically done, but there might be a few cases where
you'll need to manually call this function.
Call this function only after calling createActions(). |
No rich text support at all, no actions will be created. Do not use in combination with other flags.
DisableRichText | - 0x00 | - | ||
SupportBold | - 0x01 | - | ||
SupportItalic | - 0x02 | - | ||
SupportUnderline | - 0x04 | - | ||
SupportStrikeOut | - 0x08 | - | ||
SupportFontFamily | - 0x10 | - | ||
SupportFontSize | - 0x20 | - | ||
SupportTextForegroundColor | - 0x40 | - | ||
SupportTextBackgroundColor | - 0x80 | - | ||
FullTextFormattingSupport | - 0xff | - | ||
SupportChangeListStyle | - 0x100 | - | ||
SupportIndentLists | - 0x200 | - | ||
SupportDedentLists | - 0x400 | - | ||
FullListSupport | - 0xf00 | - | ||
SupportAlignment | - 0x100000 | - | ||
SupportRuleLine | - 0x400000 | - | ||
SupportHyperlinks | - 0x800000 | - | ||
SupportFormatPainting | - 0x1000000 | - | ||
SupportToPlainText | - 0x2000000 | - | ||
FullSupport | - 0xffffffff | - |