ExtendedListItem Class Reference

Base class for extended list items. More...

#include <extendedlistitem.h>

Inheritance diagram for ExtendedListItem:
Inheritance graph
[legend]
Collaboration diagram for ExtendedListItem:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ExtendedListItem ()
 Constructor.
virtual ~ExtendedListItem ()
 Destructor.
void addSubItem (const QString &text, const QPixmap &icon=QPixmap())
 Adds sub item.
void clearSubItems ()
 Clears sub items.
void setSelected (bool selected)
 Sets item selected.
void setSubitemTextWidth (int width)
 Sets sub items' text width.
bool toggleSelection ()
 Toggles selection.

Private Member Functions

QRect boundingRect (const QString &text)
 Returns text's bounding rect.
QRect calculateExpandedTextRect (const QString &text)
 Calculates text rects.

Private Attributes

bool m_selected
 Selected flag.
int m_expandedHeight
 Item expanded height.
int m_normalHeight
 Item normal height.
int m_subItemTextWidth
 Sub items' text wdith.
QList< ExtendedListItemStore * > * m_subItemStoreList
 ExtendedListItemStore list.

Detailed Description

Base class for extended list items.

Author:
Jussi Laitinen - jussi.laitinen (at) ixonos.com

Constructor & Destructor Documentation

ExtendedListItem::ExtendedListItem (  ) 

Constructor.

Sets item size and creates sub item store list.

ExtendedListItem::~ExtendedListItem (  )  [virtual]

Destructor.

Deletes sub item stores and sub item store list.


Member Function Documentation

void ExtendedListItem::addSubItem ( const QString &  text,
const QPixmap &  icon = QPixmap() 
)

Adds sub item.

Sub item area is defined by sub item text width.

Parameters:
text sub item text
icon sub item icon, optional
QRect ExtendedListItem::boundingRect ( const QString &  text  )  [private]

Returns text's bounding rect.

Takes into account line breaks in text.

Parameters:
text text which rect is calculated
QRect ExtendedListItem::calculateExpandedTextRect ( const QString &  text  )  [private]

Calculates text rects.

Rect width is defined by sub item text width.

Parameters:
text text which rect is calculated
Returns:
text rect
void ExtendedListItem::clearSubItems (  ) 

Clears sub items.

Clears sub items' list and deletes items. Sets item default and extended height to default values.

void ExtendedListItem::setSelected ( bool  selected  )  [virtual]

Sets item selected.

Parameters:
selected true if selected, false otherwise

Implements ListItem.

void ExtendedListItem::setSubitemTextWidth ( int  width  ) 

Sets sub items' text width.

Parameters:
width sub item width
bool ExtendedListItem::toggleSelection (  )  [virtual]

Toggles selection.

Returns:
true if selection was toggled, false otherwise

Implements ListItem.


The documentation for this class was generated from the following files:

Generated on Fri Sep 3 12:05:41 2010 for Situare client for Maemo by  doxygen 1.6.1