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

KDEUI

  • sources
  • kde-4.14
  • kdelibs
  • 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 
36 #define HAVE_INSERTPLAINTEXT 1
37 
65 class KDEUI_EXPORT KRichTextEdit : public KTextEdit
66 {
67  Q_OBJECT
68 
69 public:
70 
74  enum Mode { Plain,
75  Rich
76  };
77 
85  explicit KRichTextEdit(const QString& text, QWidget *parent = 0);
86 
92  explicit KRichTextEdit(QWidget *parent = 0);
93 
97  virtual ~KRichTextEdit();
98 
103  void enableRichTextMode();
104 
108  Mode textMode() const;
109 
114  QString textOrHtml() const;
115 
123  void setTextOrHtml(const QString &text);
124 
125 
133  QString currentLinkText() const;
134 
142  QString currentLinkUrl() const;
143 
152  void selectLinkText(QTextCursor* cursor) const;
153 
159  void selectLinkText() const;
160 
172  void updateLink(const QString &linkUrl, const QString &linkText);
173 
179  bool canIndentList() const;
180 
186  bool canDedentList() const;
187 
188 public Q_SLOTS:
189 
193  void alignLeft();
194 
198  void alignCenter();
199 
203  void alignRight();
204 
208  void alignJustify();
209 
215  void makeRightToLeft();
216 
222  void makeLeftToRight();
223 
230  void setListStyle(int _styleIndex);
231 
237  void indentListMore();
238 
244  void indentListLess();
245 
251  void setFontFamily(const QString &fontFamily);
252 
258  void setFontSize(int size);
259 
265  void setFont(const QFont &font);
266 
273  void setTextBold(bool bold);
274 
281  void setTextItalic(bool italic);
282 
289  void setTextUnderline(bool underline);
290 
297  void setTextStrikeOut(bool strikeOut);
298 
304  void setTextForegroundColor(const QColor &color);
305 
311  void setTextBackgroundColor(const QColor &color);
312 
316  void insertHorizontalRule();
317 
322  void switchToPlainText();
323 
329  QString toCleanHtml() const;
330 
337  void setTextSuperScript(bool superscript);
338 
345  void setTextSubScript(bool subscript);
346 
352  void insertPlainTextImplementation();
353 
354 Q_SIGNALS:
355 
361  void textModeChanged(KRichTextEdit::Mode mode);
362 
366  void selectionFinished();
367 
368 protected:
369 
374  virtual void keyPressEvent(QKeyEvent *event);
375 
376 private:
377  //@cond PRIVATE
378  KRichTextEditPrivate *const d;
379  friend class KRichTextEditPrivate;
380  //@endcond
381 };
382 
383 
384 
385 #endif
QWidget
QTextCursor
KRichTextEdit::Plain
Plain text mode.
Definition: krichtextedit.h:74
QFont
QMouseEvent
QTextEdit::setFontFamily
void setFontFamily(const QString &fontFamily)
QString
QColor
QWidget::setFont
void setFont(const QFont &)
QKeyEvent
Rich
ktextedit.h
KRichTextEdit::Mode
Mode
The mode the edit widget is in.
Definition: krichtextedit.h:74
KRichTextEdit
The KRichTextEdit class provides a widget to edit and display rich text.
Definition: krichtextedit.h:65
kdeui_export.h
QTextEdit::setTextBackgroundColor
void setTextBackgroundColor(const QColor &c)
KTextEdit::keyPressEvent
virtual void keyPressEvent(QKeyEvent *)
Reimplemented for internal reasons.
Definition: ktextedit.cpp:1121
KTextEdit
A KDE'ified QTextEdit.
Definition: ktextedit.h:90
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:00 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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

Search



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