A simple rich-text editor. More...
#include <mrichtextedit.h>
Public Slots | |
void | setText (const QString &text) |
Signals | |
void | editorFinished () |
void | saveText (QString revText) |
Public Member Functions | |
QTextDocument * | document () |
QFont | getDefFont (void) |
QString | getDefFontSize (void) |
int | getDefFontSizeNum (void) |
MRichTextEdit (QWidget *parent=0, QString textIn=QString()) | |
void | setDefFont (QString f) |
void | setDefFontSize (int fs) |
void | setMaxWidth (double w) |
void | setTextCursor (const QTextCursor &cursor) |
QTextCursor | textCursor () const |
QString | toHtml () const |
QString | toPlainText () const |
Protected Types | |
enum | ParagraphItems { ParagraphStandard = 0, ParagraphHeading1, ParagraphHeading2, ParagraphHeading3, ParagraphHeading4, ParagraphMonospace } |
Protected Slots | |
void | decreaseIndentation () |
void | increaseIndentation () |
void | insertImage () |
void | listBullet (bool checked) |
void | listOrdered (bool checked) |
void | onExit (void) |
void | onSave (void) |
void | onSelectionChanged () |
void | setHtml (const QString &text) |
void | setPlainText (const QString &text) |
void | slotClipboardDataChanged () |
void | slotCurrentCharFormatChanged (const QTextCharFormat &format) |
void | slotCursorPositionChanged () |
void | textBgColor () |
void | textBold () |
void | textFgColor () |
void | textItalic () |
void | textLink (bool checked) |
void | textRemoveAllFormat () |
void | textRemoveFormat () |
void | textSize (const QString &p) |
void | textSource () |
void | textStrikeout () |
void | textStyle (int index) |
void | textUnderline () |
Protected Member Functions | |
void | addFontSize (QString fs) |
void | bgColorChanged (const QColor &c) |
void | fgColorChanged (const QColor &c) |
void | focusInEvent (QFocusEvent *event) |
void | fontChanged (const QFont &f) |
bool | hasMultipleSizes (void) |
void | indent (int delta) |
void | list (bool checked, QTextListFormat::Style style) |
void | mergeFormatOnWordOrSelection (const QTextCharFormat &format) |
Protected Attributes | |
QString | m_defFont |
int | m_defFontSize |
int | m_fontsize_h1 |
int | m_fontsize_h2 |
int | m_fontsize_h3 |
int | m_fontsize_h4 |
QPointer< QTextList > | m_lastBlockList |
QStringList | m_paragraphItems |
Detailed Description
A simple rich-text editor.
Member Enumeration Documentation
◆ ParagraphItems
|
protected |
Constructor & Destructor Documentation
◆ MRichTextEdit()
MRichTextEdit::MRichTextEdit | ( | QWidget * | parent = 0 , |
QString | textIn = QString() |
||
) |
References addFontSize(), bgColorChanged(), decreaseIndentation(), fontChanged(), getDefFont(), getDefFontSize(), getDefFontSizeNum(), increaseIndentation(), insertImage(), TechDrawGui::PreferencesGui::labelFontSizePX(), listBullet(), listOrdered(), m_defFont, m_defFontSize, m_fontsize_h1, m_fontsize_h2, m_fontsize_h3, m_fontsize_h4, m_lastBlockList, m_paragraphItems, onExit(), onSave(), onSelectionChanged(), setDefFontSize(), slotClipboardDataChanged(), slotCurrentCharFormatChanged(), slotCursorPositionChanged(), textBgColor(), textBold(), textFgColor(), textItalic(), textLink(), textRemoveAllFormat(), textRemoveFormat(), textSize(), textSource(), textStrikeout(), textStyle(), and textUnderline().
Member Function Documentation
◆ addFontSize()
|
protected |
Referenced by MRichTextEdit().
◆ bgColorChanged()
|
protected |
Referenced by MRichTextEdit().
◆ decreaseIndentation
|
protectedslot |
Referenced by MRichTextEdit().
◆ document()
QTextDocument* MRichTextEdit::document | ( | ) |
◆ editorFinished
|
signal |
◆ fgColorChanged()
|
protected |
◆ focusInEvent()
|
protected |
◆ fontChanged()
|
protected |
Referenced by MRichTextEdit().
◆ getDefFont()
QFont MRichTextEdit::getDefFont | ( | void | ) |
References Base::Tools::fromStdString().
Referenced by MRichTextEdit().
◆ getDefFontSize()
QString MRichTextEdit::getDefFontSize | ( | void | ) |
Referenced by MRichTextEdit().
◆ getDefFontSizeNum()
int MRichTextEdit::getDefFontSizeNum | ( | void | ) |
References TechDraw::Preferences::dimFontSizeMM().
Referenced by MRichTextEdit().
◆ hasMultipleSizes()
|
protected |
◆ increaseIndentation
|
protectedslot |
Referenced by MRichTextEdit().
◆ indent()
|
protected |
◆ insertImage
|
protectedslot |
Referenced by MRichTextEdit().
◆ list()
|
protected |
◆ listBullet
|
protectedslot |
Referenced by MRichTextEdit().
◆ listOrdered
|
protectedslot |
Referenced by MRichTextEdit().
◆ mergeFormatOnWordOrSelection()
|
protected |
◆ onExit
|
protectedslot |
Referenced by MRichTextEdit().
◆ onSave
|
protectedslot |
Referenced by MRichTextEdit().
◆ onSelectionChanged
|
protectedslot |
Referenced by MRichTextEdit().
◆ saveText
|
signal |
◆ setDefFont()
void MRichTextEdit::setDefFont | ( | QString | f | ) |
◆ setDefFontSize()
void MRichTextEdit::setDefFontSize | ( | int | fs | ) |
Referenced by MRichTextEdit().
◆ setHtml
|
protectedslot |
◆ setMaxWidth()
void MRichTextEdit::setMaxWidth | ( | double | w | ) |
◆ setPlainText
|
protectedslot |
◆ setText
|
slot |
◆ setTextCursor()
void MRichTextEdit::setTextCursor | ( | const QTextCursor & | cursor | ) |
◆ slotClipboardDataChanged
|
protectedslot |
Referenced by MRichTextEdit().
◆ slotCurrentCharFormatChanged
|
protectedslot |
Referenced by MRichTextEdit().
◆ slotCursorPositionChanged
|
protectedslot |
Referenced by MRichTextEdit().
◆ textBgColor
|
protectedslot |
Referenced by MRichTextEdit().
◆ textBold
|
protectedslot |
Referenced by MRichTextEdit().
◆ textCursor()
QTextCursor MRichTextEdit::textCursor | ( | ) | const |
◆ textFgColor
|
protectedslot |
Referenced by MRichTextEdit().
◆ textItalic
|
protectedslot |
Referenced by MRichTextEdit().
◆ textLink
|
protectedslot |
Referenced by MRichTextEdit().
◆ textRemoveAllFormat
|
protectedslot |
Referenced by MRichTextEdit().
◆ textRemoveFormat
|
protectedslot |
Referenced by MRichTextEdit().
◆ textSize
|
protectedslot |
Referenced by MRichTextEdit().
◆ textSource
|
protectedslot |
Referenced by MRichTextEdit().
◆ textStrikeout
|
protectedslot |
Referenced by MRichTextEdit().
◆ textStyle
|
protectedslot |
Referenced by MRichTextEdit().
◆ textUnderline
|
protectedslot |
Referenced by MRichTextEdit().
◆ toHtml()
QString MRichTextEdit::toHtml | ( | ) | const |
◆ toPlainText()
QString MRichTextEdit::toPlainText | ( | ) | const |
Member Data Documentation
◆ m_defFont
|
protected |
Referenced by MRichTextEdit().
◆ m_defFontSize
|
protected |
Referenced by MRichTextEdit().
◆ m_fontsize_h1
|
protected |
Referenced by MRichTextEdit().
◆ m_fontsize_h2
|
protected |
Referenced by MRichTextEdit().
◆ m_fontsize_h3
|
protected |
Referenced by MRichTextEdit().
◆ m_fontsize_h4
|
protected |
Referenced by MRichTextEdit().
◆ m_lastBlockList
|
protected |
Referenced by MRichTextEdit().
◆ m_paragraphItems
|
protected |
Referenced by MRichTextEdit().
The documentation for this class was generated from the following files:
- src/Mod/TechDraw/Gui/mrichtextedit.h
- src/Mod/TechDraw/Gui/mrichtextedit.cpp