Home · All Classes · Main Classes · Deprecated
Public Member Functions

MRichTextEdit Class Reference

Inherits MTextEdit.

List of all members.

Public Member Functions

 MRichTextEdit (MTextEditModel::LineMode type=MTextEditModel::SingleLine, const QString &text=QString(), QGraphicsItem *parent=0)
 MRichTextEdit (MTextEditModel *model, QGraphicsItem *parent)
virtual ~MRichTextEdit ()
bool setHtml (const QString &text)
QString toHtml () const
void setFontUnderline (bool underline)
void setFontItalic (bool italic)
void setFontBold (bool bold)
QFont currentFont ()

Constructor & Destructor Documentation

MRichTextEdit::MRichTextEdit ( MTextEditModel::LineMode  type = MTextEditModel::SingleLine,
const QString text = QString(),
QGraphicsItem parent = 0 
) [explicit]

Default constructor. Creates a textEdit field containing the specified text and line mode with rich text support.

Parameters:
type widget type (single line or multiline).
text optional text.
parent optional parent.
MRichTextEdit::MRichTextEdit ( MTextEditModel model,
QGraphicsItem parent 
)

Creates a textEdit field with a specified line mode, model and parent with rich text support.

Parameters:
model the model to be used.
parent the parent of the text edit.
MRichTextEdit::~MRichTextEdit (  )  [virtual]

  • Destructor


Member Function Documentation

QFont MRichTextEdit::currentFont (  ) 

Retrieves the font information of current selection Use the bold(),italic(),overline(), etc methods of font object to get more info about the selection.

Returns:
- Font properties of selection
void MRichTextEdit::setFontBold ( bool  bold  ) 

sets the bold style and apply the style to the current selection if any

void MRichTextEdit::setFontItalic ( bool  italic  ) 

sets the italic style and apply the style to the current selection if any

void MRichTextEdit::setFontUnderline ( bool  underline  ) 

sets the Underline style and apply the style to the current selection if any

bool MRichTextEdit::setHtml ( const QString text  ) 

Sets html text for this widget. This replaces the existing text.

Parameters:
text New html text for this text edit widget.
Returns:
false if text is not allowed to be set. On successful insertion, the cursor is moved to the end of the text
QString MRichTextEdit::toHtml (  )  const

Returns current text in html format.

Returns:
QString containing current widget text in html format

Copyright © 2010 Nokia Corporation
MeeGo Touch