• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.8.5 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

  • kdeui
  • widgets
krichtextedit.h
Go to the documentation of this file.
1 
24 #ifndef KRICHTEXTEDIT_H
25 #define KRICHTEXTEDIT_H
26 
27 #include <ktextedit.h>
28 
29 class QMouseEvent;
30 class QKeyEvent;
31 
32 class KRichTextEditPrivate;
33 
34 #include <kdeui_export.h>
35 
63 class KDEUI_EXPORT KRichTextEdit : public KTextEdit
64 {
65  Q_OBJECT
66 
67 public:
68 
72  enum Mode { Plain,
73  Rich
74  };
75 
83  explicit KRichTextEdit(const QString& text, QWidget *parent = 0);
84 
90  explicit KRichTextEdit(QWidget *parent = 0);
91 
95  virtual ~KRichTextEdit();
96 
101  void enableRichTextMode();
102 
106  Mode textMode() const;
107 
112  QString textOrHtml() const;
113 
121  void setTextOrHtml(const QString &text);
122 
123 
131  QString currentLinkText() const;
132 
140  QString currentLinkUrl() const;
141 
150  void selectLinkText(QTextCursor* cursor) const;
151 
157  void selectLinkText() const;
158 
170  void updateLink(const QString &linkUrl, const QString &linkText);
171 
177  bool canIndentList() const;
178 
184  bool canDedentList() const;
185 
186 public Q_SLOTS:
187 
191  void alignLeft();
192 
196  void alignCenter();
197 
201  void alignRight();
202 
206  void alignJustify();
207 
213  void makeRightToLeft();
214 
220  void makeLeftToRight();
221 
228  void setListStyle(int _styleIndex);
229 
235  void indentListMore();
236 
242  void indentListLess();
243 
249  void setFontFamily(const QString &fontFamily);
250 
256  void setFontSize(int size);
257 
263  void setFont(const QFont &font);
264 
271  void setTextBold(bool bold);
272 
279  void setTextItalic(bool italic);
280 
287  void setTextUnderline(bool underline);
288 
295  void setTextStrikeOut(bool strikeOut);
296 
302  void setTextForegroundColor(const QColor &color);
303 
309  void setTextBackgroundColor(const QColor &color);
310 
314  void insertHorizontalRule();
315 
320  void switchToPlainText();
321 
327  QString toCleanHtml() const;
328 
335  void setTextSuperScript(bool superscript);
336 
343  void setTextSubScript(bool subscript);
344 
345 Q_SIGNALS:
346 
352  void textModeChanged(KRichTextEdit::Mode mode);
353 
357  void selectionFinished();
358 
359 protected:
360 
365  virtual void keyPressEvent(QKeyEvent *event);
366 
367 private:
368  //@cond PRIVATE
369  KRichTextEditPrivate *const d;
370  friend class KRichTextEditPrivate;
371  //@endcond
372 };
373 
374 
375 
376 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Thu Feb 21 2013 11:06:51 by doxygen 1.8.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs-4.8.5 API Reference

Skip menu "kdelibs-4.8.5 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal