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

MGridItem Class Reference

MGridItem is a combiner class for displaying thumbnail, title and subTitle, used by MList, MGrid and MPopupList. More...

Inherits MWidgetController.

List of all members.

Public Slots

void setImage (const QString &id)
void setPixmap (const QPixmap &pixmap)
void setTitle (const QString &text)
void setSubtitle (const QString &text)
void setImageVisible (bool)
void setTitleVisible (bool)
void setSubtitleVisible (bool)

Signals

void pixmapChanged ()

Public Member Functions

 MGridItem (QGraphicsItem *parent=0)
virtual ~MGridItem ()
QString image () const
QPixmap pixmap () const
QString title () const
QString subtitle () const
bool isImageVisible () const
bool isTitleVisible () const
bool isSubtitleVisible () const
void setSelected (bool selected)

Properties

QString image
QPixmap pixmap
QString title
QString subtitle
bool imageVisible
bool titleVisible
bool subtitleVisible

Detailed Description

MGridItem is a combiner class for displaying thumbnail, title and subTitle, used by MList, MGrid and MPopupList.

Overview

Using this class it is possible to display one image and two text label. You can set image by id in theme system or QPixmap

There are 4 different look of MGridItem MImage, set imageVisible = true, titleVisible = false, subtitleVisible = false MLabel, set imageVisible = false, titleVisible = true, subtitleVisible = false MImage+MLabel, set imageVisible = true, titleVisible = true, subtitleVisible = false MImage+2 MLabel, set imageVisible = true, titleVisible = true, subtitleVisible = true

You can change the image alignment to LeftAlign/RightAlign by modify CSS

Deprecated:
Please use MContentItem, MBasicListItem, MAdvancedListItem, MDetailedListItem

Constructor & Destructor Documentation

MGridItem::MGridItem ( QGraphicsItem parent = 0  ) 

Constructs a GridItem with a parent.

Parameters:
parent Parent object.
MGridItem::~MGridItem (  )  [virtual]

Destructor.


Member Function Documentation

QString MGridItem::image (  )  const

Get the image name.

Returns:
image id in theme system
bool MGridItem::isImageVisible (  )  const

Returns true if the image is visible.

bool MGridItem::isSubtitleVisible (  )  const

Returns true if the subtitle is visible.

bool MGridItem::isTitleVisible (  )  const

Returns true if the title is visible.

QPixmap MGridItem::pixmap (  )  const

Get the thumbnail pixmap.

Returns:
thumbnail pixmap
void MGridItem::pixmapChanged (  )  [signal]

This signal is emitted when the pixmap is changed.

void MGridItem::setImage ( const QString id  )  [slot]

Sets image id.

Parameters:
id the image id in theme system
void MGridItem::setImageVisible ( bool  visible  )  [slot]

Set the visibility of the image.

void MGridItem::setPixmap ( const QPixmap pixmap  )  [slot]

Sets thumbnail pixmap.

Parameters:
pixmap QPixmap
void MGridItem::setSelected ( bool  selected  ) 

set GridItem be selected Override the base function in QGraphicsItem

void MGridItem::setSubtitle ( const QString text  )  [slot]

Set subtitle text.

Parameters:
text text.
void MGridItem::setSubtitleVisible ( bool  visible  )  [slot]

Set the visibility of the subtitle.

void MGridItem::setTitle ( const QString text  )  [slot]

Set title text.

Parameters:
text text.
void MGridItem::setTitleVisible ( bool  visible  )  [slot]

Set the visibility of the title.

QString MGridItem::subtitle (  )  const

Get the subtitle.

Returns:
subtitle text string.
QString MGridItem::title (  )  const

Get the title.

Returns:
title text string.

Property Documentation

MGridItem::image [read, write]
MGridItem::imageVisible [read, write]
MGridItem::pixmap [read, write]

pixmap which will be displayed

MGridItem::subtitle [read, write]
MGridItem::subtitleVisible [read, write]
MGridItem::title [read, write]
MGridItem::titleVisible [read, write]

Copyright © 2010 Nokia Corporation
MeeGo Touch