KPIMTextEdit::RichTextComposer

Search for usage in LXR

#include <richtextcomposer.h>

Inheritance diagram for KPIMTextEdit::RichTextComposer:

Public Types

enum  Mode { Plain , Rich }
 

Signals

void externalEditorClosed ()
 
void externalEditorStarted ()
 
void focusUp ()
 
void insertEmoticon (const QString &str)
 
void insertModeChanged ()
 
void textModeChanged (KPIMTextEdit::RichTextComposer::Mode mode)
 

Public Slots

void insertPlainTextImplementation ()
 
void slotChangeInsertMode ()
 

Public Member Functions

 RichTextComposer (QWidget *parent=nullptr)
 
void activateRichText ()
 
bool checkExternalEditorFinished ()
 
int columnNumber () const
 
KPIMTextEdit::RichTextComposerActionscomposerActions () const
 
KPIMTextEdit::RichTextComposerControlercomposerControler () const
 
void createActions (KActionCollection *ac)
 
void createHighlighter () override
 
const QString defaultQuoteSign () const
 
void disableWordWrap ()
 
void enableWordWrap (int wrapColumn)
 
KPIMTextEdit::RichTextExternalComposerexternalComposer () const
 
void forcePlainTextMarkup (bool force)
 
bool isLineQuoted (const QString &line) const
 
void killExternalEditor ()
 
int linePosition () const
 
virtual bool processModifyText (QKeyEvent *event)
 
int quoteLength (const QString &line, bool oneQuote=false) const
 
QString quotePrefixName () const
 
QList< QAction * > richTextActionList () const
 
void setCursorPositionFromStart (unsigned int pos)
 
void setEnableActions (bool state)
 
void setExternalEditorPath (const QString &path)
 
virtual void setHighlighterColors (KPIMTextEdit::RichTextComposerEmailQuoteHighlighter *highlighter)
 
void setQuotePrefixName (const QString &quotePrefix)
 
void setTextOrHtml (const QString &text)
 
void setUseExternalEditor (bool use)
 
virtual QString smartQuote (const QString &msg)
 
void switchToPlainText ()
 
Mode textMode () const
 
QString textOrHtml () const
 

Protected Member Functions

bool canInsertFromMimeData (const QMimeData *source) const override
 
void clearDecorator () override
 
Sonnet::SpellCheckDecoratorcreateSpellCheckDecorator () override
 
void insertFromMimeData (const QMimeData *source) override
 
void keyPressEvent (QKeyEvent *event) override
 
void mouseReleaseEvent (QMouseEvent *event) override
 
bool processKeyEvent (QKeyEvent *e)
 
void updateHighLighter () override
 

Detailed Description

The RichTextComposer class.

Author
Laurent Montel monte.nosp@m.l@kd.nosp@m.e.org

Definition at line 24 of file richtextcomposer.h.

Member Enumeration Documentation

◆ Mode

Enumerator
Plain 

Plain text mode.

Rich 

Rich text mode.

Definition at line 31 of file richtextcomposer.h.

Constructor & Destructor Documentation

◆ RichTextComposer()

RichTextComposer::RichTextComposer ( QWidget * parent = nullptr)
explicit

Definition at line 69 of file richtextcomposer.cpp.

◆ ~RichTextComposer()

RichTextComposer::~RichTextComposer ( )
override

Definition at line 83 of file richtextcomposer.cpp.

Member Function Documentation

◆ activateRichText()

void RichTextComposer::activateRichText ( )

Definition at line 263 of file richtextcomposer.cpp.

◆ canInsertFromMimeData()

bool RichTextComposer::canInsertFromMimeData ( const QMimeData * source) const
overrideprotected

Definition at line 570 of file richtextcomposer.cpp.

◆ checkExternalEditorFinished()

bool RichTextComposer::checkExternalEditorFinished ( )

Definition at line 154 of file richtextcomposer.cpp.

◆ clearDecorator()

void RichTextComposer::clearDecorator ( )
overrideprotected

Definition at line 126 of file richtextcomposer.cpp.

◆ columnNumber()

int RichTextComposer::columnNumber ( ) const
Returns
the column number where the cursor is.

Definition at line 230 of file richtextcomposer.cpp.

◆ composerActions()

KPIMTextEdit::RichTextComposerActions * RichTextComposer::composerActions ( ) const

Definition at line 98 of file richtextcomposer.cpp.

◆ composerControler()

KPIMTextEdit::RichTextComposerControler * RichTextComposer::composerControler ( ) const

Definition at line 93 of file richtextcomposer.cpp.

◆ createActions()

void RichTextComposer::createActions ( KActionCollection * ac)

Definition at line 113 of file richtextcomposer.cpp.

◆ createHighlighter()

void RichTextComposer::createHighlighter ( )
override

Definition at line 131 of file richtextcomposer.cpp.

◆ createSpellCheckDecorator()

Sonnet::SpellCheckDecorator * RichTextComposer::createSpellCheckDecorator ( )
overrideprotected

Definition at line 455 of file richtextcomposer.cpp.

◆ defaultQuoteSign()

const QString RichTextComposer::defaultQuoteSign ( ) const

Definition at line 524 of file richtextcomposer.cpp.

◆ disableWordWrap()

void RichTextComposer::disableWordWrap ( )

Disables word wrap.

Note that words are still wrapped at the end of the editor; no scrollbar will appear.

Definition at line 176 of file richtextcomposer.cpp.

◆ enableWordWrap()

void RichTextComposer::enableWordWrap ( int wrapColumn)

Enables word wrap.

Words will be wrapped at the specified column.

Parameters
wrapColumnthe column where words will be wrapped

Definition at line 169 of file richtextcomposer.cpp.

◆ externalComposer()

KPIMTextEdit::RichTextExternalComposer * RichTextComposer::externalComposer ( ) const

Definition at line 88 of file richtextcomposer.cpp.

◆ focusUp

void KPIMTextEdit::RichTextComposer::focusUp ( )
signal

Emitted when the user uses the up arrow in the first line.

The application should then put the focus on the widget above the text edit.

◆ forcePlainTextMarkup()

void RichTextComposer::forcePlainTextMarkup ( bool force)

Definition at line 236 of file richtextcomposer.cpp.

◆ insertFromMimeData()

void RichTextComposer::insertFromMimeData ( const QMimeData * source)
overrideprotected

Definition at line 533 of file richtextcomposer.cpp.

◆ insertPlainTextImplementation

void RichTextComposer::insertPlainTextImplementation ( )
slot

Definition at line 241 of file richtextcomposer.cpp.

◆ isLineQuoted()

bool RichTextComposer::isLineQuoted ( const QString & line) const

Definition at line 519 of file richtextcomposer.cpp.

◆ keyPressEvent()

void RichTextComposer::keyPressEvent ( QKeyEvent * event)
overrideprotected

Definition at line 450 of file richtextcomposer.cpp.

◆ killExternalEditor()

void RichTextComposer::killExternalEditor ( )

Definition at line 159 of file richtextcomposer.cpp.

◆ linePosition()

int RichTextComposer::linePosition ( ) const
Returns
the line number where the cursor is. This takes word-wrapping into account. Line numbers start at 0.

Definition at line 181 of file richtextcomposer.cpp.

◆ mouseReleaseEvent()

void RichTextComposer::mouseReleaseEvent ( QMouseEvent * event)
overrideprotected

Definition at line 587 of file richtextcomposer.cpp.

◆ processKeyEvent()

bool RichTextComposer::processKeyEvent ( QKeyEvent * e)
protected

Definition at line 418 of file richtextcomposer.cpp.

◆ processModifyText()

bool RichTextComposer::processModifyText ( QKeyEvent * event)
virtual

Definition at line 444 of file richtextcomposer.cpp.

◆ quoteLength()

int RichTextComposer::quoteLength ( const QString & line,
bool oneQuote = false ) const

Definition at line 479 of file richtextcomposer.cpp.

◆ quotePrefixName()

QString RichTextComposer::quotePrefixName ( ) const

Definition at line 470 of file richtextcomposer.cpp.

◆ richTextActionList()

QList< QAction * > RichTextComposer::richTextActionList ( ) const

Definition at line 103 of file richtextcomposer.cpp.

◆ setCursorPositionFromStart()

void RichTextComposer::setCursorPositionFromStart ( unsigned int pos)

Definition at line 514 of file richtextcomposer.cpp.

◆ setEnableActions()

void RichTextComposer::setEnableActions ( bool state)

Definition at line 108 of file richtextcomposer.cpp.

◆ setExternalEditorPath()

void RichTextComposer::setExternalEditorPath ( const QString & path)

Definition at line 149 of file richtextcomposer.cpp.

◆ setHighlighterColors()

void RichTextComposer::setHighlighterColors ( KPIMTextEdit::RichTextComposerEmailQuoteHighlighter * highlighter)
virtual

Definition at line 139 of file richtextcomposer.cpp.

◆ setQuotePrefixName()

void RichTextComposer::setQuotePrefixName ( const QString & quotePrefix)

Definition at line 465 of file richtextcomposer.cpp.

◆ setTextOrHtml()

void RichTextComposer::setTextOrHtml ( const QString & text)

Definition at line 305 of file richtextcomposer.cpp.

◆ setUseExternalEditor()

void RichTextComposer::setUseExternalEditor ( bool use)

Definition at line 144 of file richtextcomposer.cpp.

◆ slotChangeInsertMode

void RichTextComposer::slotChangeInsertMode ( )
slot

Definition at line 257 of file richtextcomposer.cpp.

◆ smartQuote()

QString RichTextComposer::smartQuote ( const QString & msg)
virtual

Definition at line 460 of file richtextcomposer.cpp.

◆ switchToPlainText()

void RichTextComposer::switchToPlainText ( )

Definition at line 281 of file richtextcomposer.cpp.

◆ textMode()

RichTextComposer::Mode RichTextComposer::textMode ( ) const
Returns
The current text mode

Definition at line 164 of file richtextcomposer.cpp.

◆ textModeChanged

void KPIMTextEdit::RichTextComposer::textModeChanged ( KPIMTextEdit::RichTextComposer::Mode mode)
signal

Emitted whenever the text mode is changed.

Parameters
modeThe new text mode

◆ textOrHtml()

QString RichTextComposer::textOrHtml ( ) const

Definition at line 296 of file richtextcomposer.cpp.

◆ updateHighLighter()

void RichTextComposer::updateHighLighter ( )
overrideprotected

Definition at line 118 of file richtextcomposer.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:45 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.