Home · All Classes · Main Classes · Deprecated
Signals | Public Member Functions | Properties

MLabelModel Class Reference

Model class for MLabel. More...

Inherits MWidgetModel.

List of all members.

Signals

void linkActivated (const QString &link) const

Public Member Functions

void emitLinkActivated (const QString &link) const
void addHighlighter (MLabelHighlighter *highlighter)
void removeHighlighter (MLabelHighlighter *highlighter)

Properties

QString text
bool wordWrap
QTextOption::WrapMode wrapMode
Qt::Alignment alignment
bool alignmentFromStyle
Qt::LayoutDirection textDirection
bool textElide
int preferredLineCount
int preferredLineCountBehavior
bool useModelFont
QFont font
QColor color
QList< MLabelHighlighter * > highlighters
Qt::TextFormat textFormat

Detailed Description

Model class for MLabel.

See also:
MLabel

Member Function Documentation

void MLabelModel::addHighlighter ( MLabelHighlighter highlighter  ) 

Add highlighter to list.

void MLabelModel::emitLinkActivated ( const QString link  )  const [inline]
void MLabelModel::linkActivated ( const QString link  )  const [signal]

A signal which is emitted when URL in this widget is clicked.

void MLabelModel::removeHighlighter ( MLabelHighlighter highlighter  ) 

Remove highlighter from list.


Property Documentation

MLabelModel::alignment [read, write]

Alignmentation of the label.

MLabelModel::alignmentFromStyle [read, write]

Alignment of the label is done by style.

MLabelModel::color [read, write]

Default color for the label.

Defines the default color to be used in label. This coor is used only if it has been set set to a valid value (color.isValid() == true) otherwise the color defined in CSS is used.

MLabelModel::font [read, write]

Default font for the label.

Defines the default font to be used in label. This font is used only if MLabelModel::useModelFont is set to true otherwise the font defined in CSS is used.

MLabelModel::highlighters [read, write]

List of active text highlighter objects for the label.

Highlighter objects are used for highlighting different types of text fragments like urls, email addresses etc. Objects also receive callbacks when the highlighted items are interacted by the user.

MLabelModel::preferredLineCount [read, write]

Limits or sets the preferred height returned MLabel::sizeHint() to the given number of lines of text.

MLabelModel::preferredLineCountBehavior [read, write]

Describes how the preferredLineCount affects preferred height of the MLabel.

MLabelModel::text [read, write]

The text of the label.

MLabelModel::textDirection [read, write]

Text direction of the label.

The default text direction is autodetected from the text contents

MLabelModel::textElide [read, write]

Text eliding mode of the label.

When set to true, the label automatically elides text with three dots if the whole text does not fit into one line.

Qt::TextFormat MLabelModel::textFormat [read, write]
MLabelModel::useModelFont [read, write]

Boolean value which defines whether to use the font from model or CSS.

If true the font defined by MLabelModel::font property is used, if false font defined in CSS is used.

MLabelModel::wordWrap [read, write]

Is Word wrapping active.

When set to true, the label wraps the text into multiple lines. This is done depending on which wrap mode is active.

MLabelModel::wrapMode [read, write]

If 'wordwrap' is set, describes how text is wrapped in the label.


Copyright © 2010 Nokia Corporation
MeeGo Touch