Base class for extended list items. More...
#include <extendedlistitem.h>


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. | |
Base class for extended list items.
| 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.
| void ExtendedListItem::addSubItem | ( | const QString & | text, | |
| const QPixmap & | icon = QPixmap() | |||
| ) |
Adds sub item.
Sub item area is defined by sub item text width.
| 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.
| 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.
| text | text which rect is calculated |
| 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] |
| void ExtendedListItem::setSubitemTextWidth | ( | int | width | ) |
Sets sub items' text width.
| width | sub item width |
| bool ExtendedListItem::toggleSelection | ( | ) | [virtual] |
1.6.1