• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

krichtextedit.h

Go to the documentation of this file.
00001 
00024 #ifndef KRICHTEXTEDIT_H
00025 #define KRICHTEXTEDIT_H
00026 
00027 #include <ktextedit.h>
00028 
00029 class QMouseEvent;
00030 class QKeyEvent;
00031 
00032 class KRichTextEditPrivate;
00033 
00034 #include <kdeui_export.h>
00035 
00061 class KDEUI_EXPORT KRichTextEdit : public KTextEdit
00062 {
00063     Q_OBJECT
00064 
00065 public:
00066 
00070     enum Mode { Plain,    
00071                 Rich      
00072               };
00073 
00081     explicit KRichTextEdit(const QString& text, QWidget *parent = 0);
00082 
00088     explicit KRichTextEdit(QWidget *parent = 0);
00089 
00093     virtual ~KRichTextEdit();
00094 
00099     void enableRichTextMode();
00100 
00104     Mode textMode() const;
00105 
00110     QString textOrHtml() const;
00111 
00119     void setTextOrHtml(const QString &text);
00120 
00121 
00129     QString currentLinkText() const;
00130 
00138     QString currentLinkUrl() const;
00139 
00148     void selectLinkText(QTextCursor* cursor) const;
00149 
00155     void selectLinkText() const;
00156 
00168     void updateLink(const QString &linkUrl, const QString &linkText);
00169 
00175     bool canIndentList() const;
00176 
00182     bool canDedentList() const;
00183 
00184 public Q_SLOTS:
00185 
00189     void alignLeft();
00190 
00194     void alignCenter();
00195 
00199     void alignRight();
00200 
00204     void alignJustify();
00205 
00212     void setListStyle(int _styleIndex);
00213 
00219     void indentListMore();
00220 
00226     void indentListLess();
00227 
00233     void setFontFamily(const QString &fontFamily);
00234 
00240     void setFontSize(int size);
00241 
00247     void setFont(const QFont &font);
00248 
00255     void setTextBold(bool bold);
00256 
00263     void setTextItalic(bool italic);
00264 
00271     void setTextUnderline(bool underline);
00272 
00279     void setTextStrikeOut(bool strikeOut);
00280 
00286     void setTextForegroundColor(const QColor &color);
00287 
00293     void setTextBackgroundColor(const QColor &color);
00294 
00298     void insertHorizontalRule();
00299 
00304     void switchToPlainText();
00305 
00311     QString toCleanHtml() const;
00312 
00319     void setTextSuperScript(bool superscript);
00320 
00327     void setTextSubScript(bool subscript);
00328 
00329 Q_SIGNALS:
00330 
00336     void textModeChanged(KRichTextEdit::Mode mode);
00337 
00341     void selectionFinished();
00342 
00343 protected:
00344 
00349     virtual void keyPressEvent(QKeyEvent *event);
00350 
00351 private:
00352     //@cond PRIVATE
00353     KRichTextEditPrivate *const d;
00354     friend class KRichTextEditPrivate;
00355     //@endcond
00356 };
00357 
00358 
00359 
00360 #endif

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
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