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

MLabelView Class Reference

Standard view class for MLabel. More...

Inherits MWidgetView.

List of all members.

Public Member Functions

 MLabelView (MLabel *controller)
virtual ~MLabelView ()
QString renderedText () const

Protected Member Functions

virtual void mousePressEvent (QGraphicsSceneMouseEvent *event)
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
void longPressEvent (QGraphicsSceneContextMenuEvent *event)

Properties

QString renderedText

Detailed Description

Standard view class for MLabel.

Overview

Label view class that supports rendering of simple unformatted text and rich html formatted text.

label_simple.png
Default simple label.
label_simple_custom.png
Simple label with custom font and color.
label_simple_elided.png
Simple label with eliding enabled.
label_rich.png
Rich label with html styling.

Interactions

Links in rich text can be opened by clicking them. Simple unformatted label is totally non-interactive.

Open issues

See also:
MLabelStyle MWidgetView

Constructor & Destructor Documentation

MLabelView::MLabelView ( MLabel controller  ) 

Constructs label view.

Parameters:
Pointer to the controller.
MLabelView::~MLabelView (  )  [virtual]

Destructs label view.


Member Function Documentation

void MLabelView::longPressEvent ( QGraphicsSceneContextMenuEvent event  )  [protected]
void MLabelView::mousePressEvent ( QGraphicsSceneMouseEvent event  )  [protected, virtual]

Mouse press event handler.

Accepted when displaying rich text and when clicking an anchor. Ignored if displaying simple text or clicking outside anchor.

Reimplemented from MWidgetView.

void MLabelView::mouseReleaseEvent ( QGraphicsSceneMouseEvent event  )  [protected, virtual]

Mouse release event handler.

If released over an anchor MLabelModel::linkActivated() signal is emitted.

Reimplemented from MWidgetView.

QString MLabelView::renderedText (  )  const

Returns the text that is rendered on the display. The rendered text might differ from MLabel::text e.g. because the rendered text got elided or got line breaks.

Returns:
rendered text

Property Documentation

MLabelView::renderedText [read]

Text that is rendered on the display.

See MLabelView::renderedText for details.


Copyright © 2010 Nokia Corporation
MeeGo Touch