kopete/kopete
KRichTextEditPart Class Reference
#include <krichtexteditpart.h>

Detailed Description
Simple WYSIWYG rich text editor part.Technicaly it just a wrapper around KTextEdit with a toolbar of actions. The action toolbar adds buttons to set text bold, italic or underline, set font size and font familly and set text color.
Definition at line 45 of file krichtexteditpart.h.
Public Types | |
| enum | RichTextSupportValues { DisableRichText = 0, SupportBold, SupportItalic, SupportUnderline, SupportAlignment, SupportFont, SupportTextColor, FormattingSupport = SupportBold | SupportItalic | SupportUnderline, FullSupport = FormattingSupport | SupportAlignment | SupportFont | SupportTextColor } |
Public Slots | |
| void | setTextColor () |
| void | setTextColor (const QColor &) |
| void | setFont () |
| void | setFont (const QFont &font) |
| void | setFont (const QString &familyName) |
| void | setFontSize (int size) |
| void | setFontUnderline (bool value) |
| void | setFontBold (bool value) |
| void | setFontItalic (bool value) |
| void | setAlignLeft (bool yes) |
| void | setAlignRight (bool yes) |
| void | setAlignCenter (bool yes) |
| void | setAlignJustify (bool yes) |
| void | checkToolbarEnabled () |
| void | reloadConfig () |
| void | setRichTextEnabled (bool enable) |
Signals | |
| void | toolbarToggled (bool enabled) |
Public Member Functions | |
| KRichTextEditPart (QWidget *parent, QObject *, const QStringList &) | |
| ~KRichTextEditPart () | |
| QString | text (Qt::TextFormat format=Qt::AutoText) const |
| QFont | font () const |
| QColor | textColor () const |
| void | clear () |
| bool | isRichTextEnabled () const |
| bool | isRichTextAvailable () const |
| virtual bool | openFile () |
| void | setRichTextSupport (const KRichTextEditPart::RichTextSupport &support) |
| RichTextSupport | richTextSupport () const |
| KTextEdit * | textEdit () |
Static Public Member Functions | |
| static KAboutData * | createAboutData () |
Protected Slots | |
| void | updateActions () |
| void | updateFont () |
| void | updateCharFormat () |
| void | updateAligment () |
Protected Member Functions | |
| virtual void | createActions () |
| bool | useRichText () const |
Member Enumeration Documentation
- Enumerator:
-
DisableRichText SupportBold SupportItalic SupportUnderline SupportAlignment SupportFont SupportTextColor FormattingSupport FullSupport
Definition at line 49 of file krichtexteditpart.h.
Constructor & Destructor Documentation
| KRichTextEditPart::KRichTextEditPart | ( | QWidget * | parent, | |
| QObject * | , | |||
| const QStringList & | ||||
| ) |
Definition at line 105 of file krichtexteditpart.cpp.
| KRichTextEditPart::~KRichTextEditPart | ( | ) |
Definition at line 124 of file krichtexteditpart.cpp.
Member Function Documentation
| QString KRichTextEditPart::text | ( | Qt::TextFormat | format = Qt::AutoText |
) | const |
Get the text in the editor in the given format.
By default if return the text using the most appropriate format.
- Parameters:
-
format A value in Qt::TextFormat enum.
- Returns:
- text using the given format
Definition at line 548 of file krichtexteditpart.cpp.
| QFont KRichTextEditPart::font | ( | ) | const |
| QColor KRichTextEditPart::textColor | ( | ) | const |
| void KRichTextEditPart::clear | ( | ) |
| bool KRichTextEditPart::isRichTextEnabled | ( | ) | const |
| bool KRichTextEditPart::isRichTextAvailable | ( | ) | const |
Definition at line 149 of file krichtexteditpart.cpp.
| KAboutData * KRichTextEditPart::createAboutData | ( | ) | [static] |
Definition at line 200 of file krichtexteditpart.cpp.
| virtual bool KRichTextEditPart::openFile | ( | ) | [inline, virtual] |
Disable file open, because it's not used by this part.
Definition at line 105 of file krichtexteditpart.h.
| void KRichTextEditPart::setRichTextSupport | ( | const KRichTextEditPart::RichTextSupport & | support | ) |
Definition at line 182 of file krichtexteditpart.cpp.
| RichTextSupport KRichTextEditPart::richTextSupport | ( | ) | const |
| KTextEdit * KRichTextEditPart::textEdit | ( | ) |
Get the inside KTextEdit.
- Returns:
- instance of KTextEdit
Definition at line 129 of file krichtexteditpart.cpp.
| void KRichTextEditPart::setTextColor | ( | ) | [slot] |
Definition at line 417 of file krichtexteditpart.cpp.
| void KRichTextEditPart::setTextColor | ( | const QColor & | newColor | ) | [slot] |
Definition at line 432 of file krichtexteditpart.cpp.
| void KRichTextEditPart::setFont | ( | ) | [slot] |
Definition at line 460 of file krichtexteditpart.cpp.
| void KRichTextEditPart::setFont | ( | const QFont & | font | ) | [slot] |
Definition at line 469 of file krichtexteditpart.cpp.
| void KRichTextEditPart::setFont | ( | const QString & | familyName | ) | [slot] |
Definition at line 478 of file krichtexteditpart.cpp.
| void KRichTextEditPart::setFontSize | ( | int | size | ) | [slot] |
Definition at line 448 of file krichtexteditpart.cpp.
| void KRichTextEditPart::setFontUnderline | ( | bool | value | ) | [slot] |
Definition at line 508 of file krichtexteditpart.cpp.
| void KRichTextEditPart::setFontBold | ( | bool | value | ) | [slot] |
Definition at line 490 of file krichtexteditpart.cpp.
| void KRichTextEditPart::setFontItalic | ( | bool | value | ) | [slot] |
Definition at line 499 of file krichtexteditpart.cpp.
| void KRichTextEditPart::setAlignLeft | ( | bool | yes | ) | [slot] |
Definition at line 518 of file krichtexteditpart.cpp.
| void KRichTextEditPart::setAlignRight | ( | bool | yes | ) | [slot] |
Definition at line 526 of file krichtexteditpart.cpp.
| void KRichTextEditPart::setAlignCenter | ( | bool | yes | ) | [slot] |
Definition at line 534 of file krichtexteditpart.cpp.
| void KRichTextEditPart::setAlignJustify | ( | bool | yes | ) | [slot] |
Definition at line 541 of file krichtexteditpart.cpp.
| void KRichTextEditPart::checkToolbarEnabled | ( | ) | [slot] |
Definition at line 190 of file krichtexteditpart.cpp.
| void KRichTextEditPart::reloadConfig | ( | ) | [slot] |
Definition at line 195 of file krichtexteditpart.cpp.
| void KRichTextEditPart::setRichTextEnabled | ( | bool | enable | ) | [slot] |
Definition at line 162 of file krichtexteditpart.cpp.
| void KRichTextEditPart::toolbarToggled | ( | bool | enabled | ) | [signal] |
| void KRichTextEditPart::createActions | ( | ) | [protected, virtual] |
| bool KRichTextEditPart::useRichText | ( | ) | const [protected] |
Definition at line 157 of file krichtexteditpart.cpp.
| void KRichTextEditPart::updateActions | ( | ) | [protected, slot] |
Definition at line 298 of file krichtexteditpart.cpp.
| void KRichTextEditPart::updateFont | ( | ) | [protected, slot] |
Definition at line 350 of file krichtexteditpart.cpp.
| void KRichTextEditPart::updateCharFormat | ( | ) | [protected, slot] |
Definition at line 320 of file krichtexteditpart.cpp.
| void KRichTextEditPart::updateAligment | ( | ) | [protected, slot] |
Definition at line 327 of file krichtexteditpart.cpp.
The documentation for this class was generated from the following files:
KDE 4.0 API Reference