Home · All Classes · Main Classes · Deprecated |
MBasicListItem implementation of a simple widget which can be used with MList. More...
Inherits MListItem.
Public Types | |
enum | ItemStyle { SingleTitle, TitleWithSubtitle, IconWithTitle, IconWithTitleAndSubtitle } |
Public Member Functions | |
MBasicListItem (MBasicListItem::ItemStyle style=SingleTitle, QGraphicsItem *parent=NULL) | |
virtual | ~MBasicListItem () |
void | initLayout () |
void | setItemStyle (ItemStyle itemStyle) |
ItemStyle | itemStyle () const |
void | setImageWidget (MImageWidget *imageWidget) |
MImageWidget * | imageWidget () |
void | setTitle (const QString &title) |
QString | title () |
void | setSubtitle (const QString &subtitle) |
QString | subtitle () |
Protected Member Functions | |
MLabel * | titleLabelWidget () |
MLabel * | subtitleLabelWidget () |
virtual QGraphicsLayout * | createLayout () |
virtual void | clearLayout () |
Properties | |
QString | title |
QString | subtitle |
MImageWidget | imageWidget |
MBasicListItem implementation of a simple widget which can be used with MList.
MBasicListItem can show several lines of text and an icon. Exact layout depends on the style and can be set in:
Text and icon can be set using following functions:
MBasicListItem appearance can be customized in 2 ways.
Title, subtitle and icon are using styles provided by common layout.
Another way is to inherit MBasicListItem and override:
Specifies layout of MBasicListItem.
MBasicListItem::MBasicListItem | ( | MBasicListItem::ItemStyle | style = SingleTitle , |
|
QGraphicsItem * | parent = NULL | |||
) |
MBasicListItem constructor.
style | The style of item to be initialized with, defaults to MBasicListItem::SingleTitle. | |
parent | The item parent. |
MBasicListItem::~MBasicListItem | ( | ) | [virtual] |
MBasicListItem destructor.
void MBasicListItem::clearLayout | ( | ) | [protected, virtual] |
Clears layout created by createLayout() function.
QGraphicsLayout * MBasicListItem::createLayout | ( | ) | [protected, virtual] |
Returns layout which will be assigned to MBasicListItem. Can be called several times, so it should clear layout which was already created.
MImageWidget* MBasicListItem::imageWidget | ( | ) |
Creates or returns already created pointer to an item icon widget.
void MBasicListItem::initLayout | ( | ) |
MBasicListItem::ItemStyle MBasicListItem::itemStyle | ( | ) | const |
Returns current item style.
void MBasicListItem::setImageWidget | ( | MImageWidget * | imageWidget | ) |
Sets item icon widget. Ownership is transfered to the item.
void MBasicListItem::setItemStyle | ( | ItemStyle | itemStyle | ) |
Sets item style.
void MBasicListItem::setSubtitle | ( | const QString & | subtitle | ) |
Sets the item subtitle text.
void MBasicListItem::setTitle | ( | const QString & | title | ) |
Sets the item title text.
QString MBasicListItem::subtitle | ( | ) |
Returns the item subtitle text.
MLabel * MBasicListItem::subtitleLabelWidget | ( | ) | [protected] |
Creates or returns already created subtitle widget.
QString MBasicListItem::title | ( | ) |
Returns the item title text.
MLabel * MBasicListItem::titleLabelWidget | ( | ) | [protected] |
Creates or returns already created title widget.
MBasicListItem::imageWidget [read, write] |
Contains pointer to MImageWidget.
MBasicListItem::subtitle [read, write] |
Contains subtitle text.
QString MBasicListItem::title [read, write] |
Copyright © 2010 Nokia Corporation | MeeGo Touch |