QwwRichTextEdit Class
The QwwRichTextEdit widget provides a drop-in replacement for QTextEdit that contains a toolbar for editing rich text data. More...
Header: | #include <QwwRichTextEdit> |
Public Types
enum | Action { BoldAction, ItalicAction, UnderlineAction, LeftAlignAction, ..., FontSizeAction } |
enum | Option { NoOptions, Style, Alignment, FontFamily, FontSize, Color } |
flags | Options |
Properties
- options : Options
Public Functions
QwwRichTextEdit(QWidget * parent = 0) | |
Options | options() const |
QAction * | toolBarAction(Action act) const |
Public Slots
void | changeAlignment(QAction * a) |
void | setBold(bool v) |
void | setColor(const QColor & c) |
void | setFont(const QFont & f) |
void | setItalic(bool v) |
void | setList(bool v) |
void | setOptions(Options opt) |
void | setUnderline(bool v) |
void | updateCurrentBlockFormat() |
void | updateCurrentCharFormat(const QTextCharFormat & fmt) |
Detailed Description
The QwwRichTextEdit widget provides a drop-in replacement for QTextEdit that contains a toolbar for editing rich text data.
Member Type Documentation
enum QwwRichTextEdit::Action
Constant | Value | Description |
---|---|---|
QwwRichTextEdit::BoldAction | 0 | Makes the text bold |
QwwRichTextEdit::ItalicAction | 1 | Makes the text italic |
QwwRichTextEdit::UnderlineAction | 2 | Makes the text underlined |
QwwRichTextEdit::LeftAlignAction | 3 | Makes the text left aligned |
QwwRichTextEdit::RightAlignAction | 4 | Makes the text right aligned |
QwwRichTextEdit::AlignCenterAction | 5 | Makes the text aligned to the centre |
QwwRichTextEdit::JustifyAction | 6 | Makes the text justified |
QwwRichTextEdit::ColorAction | 7 | Changes the color of the text |
QwwRichTextEdit::FontFamilyAction | 8 | Changes the font family of the text |
QwwRichTextEdit::FontSizeAction | 9 | Changes the font size of the text |
enum QwwRichTextEdit::Option
flags QwwRichTextEdit::Options
Constant | Value | Description |
---|---|---|
QwwRichTextEdit::NoOptions | 0x0 | No options are set |
QwwRichTextEdit::Style | 0x01 | Text style |
QwwRichTextEdit::Alignment | 0x02 | Item alignment |
QwwRichTextEdit::FontFamily | 0x04 | Font family |
QwwRichTextEdit::FontSize | 0x08 | Font size |
QwwRichTextEdit::Color | 0x10 | Text color |
The Options type is a typedef for QFlags<Option>. It stores an OR combination of Option values.
Property Documentation
options : Options
This property holds this property holds the active set of options.
Access functions:
Options | options() const |
void | setOptions(Options opt) |
Member Function Documentation
QwwRichTextEdit::QwwRichTextEdit(QWidget * parent = 0)
Constructs a rich text edit with a given parent
void QwwRichTextEdit::changeAlignment(QAction * a) [slot]
Changes alignment of the text to the one specified by action a
void QwwRichTextEdit::setBold(bool v) [slot]
Changes the bold attribute of the selected text to v
void QwwRichTextEdit::setColor(const QColor & c) [slot]
Changes the color of the selected text to c
void QwwRichTextEdit::setFont(const QFont & f) [slot]
Changes the font of the selected text to f
void QwwRichTextEdit::setItalic(bool v) [slot]
Changes the italic attribute of the selected text to v
void QwwRichTextEdit::setList(bool v) [slot]
Changes the list attribute of the selected text to v
void QwwRichTextEdit::setUnderline(bool v) [slot]
Changes the underline attribute of the selected text to v
QAction * QwwRichTextEdit::toolBarAction(Action act) const
Returns the QAction object associated with action act
void QwwRichTextEdit::updateCurrentBlockFormat() [slot]
Updates the format of the selected text
void QwwRichTextEdit::updateCurrentCharFormat(const QTextCharFormat & fmt) [slot]
Updates actions to reflect the format specified by fmt