• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kopete/kopete

KRichTextEditPart Class Reference

#include <krichtexteditpart.h>

Inheritance diagram for KRichTextEditPart:

Inheritance graph
[legend]

List of all members.


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.

Author:
Michaƫl Larouche <larouche@kde.org>

Richard Moore <rich@kde.org>

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

enum KRichTextEditPart::RichTextSupportValues

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

Get the font currently used by the editor.

Definition at line 134 of file krichtexteditpart.cpp.

QColor KRichTextEditPart::textColor (  )  const

Get the current text color.

Definition at line 441 of file krichtexteditpart.cpp.

void KRichTextEditPart::clear (  ) 

Clear text inside the editor.

Definition at line 139 of file krichtexteditpart.cpp.

bool KRichTextEditPart::isRichTextEnabled (  )  const

Is rich text is currently enabled.

Definition at line 144 of file krichtexteditpart.cpp.

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]

Create the required actions for the part.

Definition at line 212 of file krichtexteditpart.cpp.

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:
  • krichtexteditpart.h
  • krichtexteditpart.cpp

kopete/kopete

Skip menu "kopete/kopete"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal