FriendListItem Class Reference

FriendListItem shows friend data in expandable item. More...

#include "ui/friendlistitem.h"

Collaboration diagram for FriendListItem:
Collaboration graph
[legend]

List of all members.

Signals

void findFriend (const QPointF &coordinates)
 Signal for finding friend.

Public Member Functions

 FriendListItem (QWidget *parent=0)
 Construct FriendListItem.
void setData (User *user)
 Set data for this item.

Protected Member Functions

void mousePressEvent (QMouseEvent *event)
 Set current mouse position to mouse event position.
void mouseReleaseEvent (QMouseEvent *event)
 Call toggleHeight if mouse position is unchanged.
void paintEvent (QPaintEvent *event)
 Draws stylesheet used in this class.

Private Slots

void findButtonClicked ()
 Slot for find button click.

Private Member Functions

void setDistanceIcon (double value, const QString &unit)
 Set distance icon.
void setText (bool expanded)
 Set shortened or full-length text to labels.
void shortenTexts ()
 Set shortened texts from User data.

Private Attributes

QPixmap m_backgroundTopImage
 Top background image.
QPixmap m_backgroundMiddleImage
 Middle background image.
QPixmap m_backgroundBottomImage
 Bottom background image.
bool m_expanded
 Item expanded state.
QLabel * m_distanceImageLabel
 Distance image for friend label.
QLabel * m_distanceTextLabel
 Distance text for friend label.
ImageButtonm_findButton
 Friend find button.
QLabel * m_locationLabel
 Location label.
QPoint m_mousePosition
 Current mouse press position.
QLabel * m_nameLabel
 Name label.
QString m_shortenedLocation
 Shortened location text.
QString m_shortenedName
 Shortened name text.
QString m_shortenedStatusText
 Shortened status text.
QString m_shortenedUpdated
 Shortened updated text.
QLabel * m_statusTextLabel
 Status text label.
QLabel * m_updatedLabel
 Updated label.
Userm_user
 User data.

Detailed Description

FriendListItem shows friend data in expandable item.


Constructor & Destructor Documentation

FriendListItem::FriendListItem ( QWidget *  parent = 0  ) 

Construct FriendListItem.

Initializes layouts and member variables. Sets stylesheet for this class.

Parameters:
parent parent widget

Member Function Documentation

void FriendListItem::findFriend ( const QPointF &  coordinates  )  [signal]

Signal for finding friend.

Parameters:
coordinates friend's geo coordinates
void FriendListItem::mousePressEvent ( QMouseEvent *  event  )  [protected]

Set current mouse position to mouse event position.

Parameters:
event QMouseEvent mouse press event
void FriendListItem::mouseReleaseEvent ( QMouseEvent *  event  )  [protected]

Call toggleHeight if mouse position is unchanged.

Check if current mouse position is same as mouse release position.

Parameters:
event QMouseEvent mouse release event
void FriendListItem::paintEvent ( QPaintEvent *  event  )  [protected]

Draws stylesheet used in this class.

Parameters:
event QPaintEvent
void FriendListItem::setData ( User user  ) 

Set data for this item.

Parameters:
user User pointer
void FriendListItem::setDistanceIcon ( double  value,
const QString &  unit 
) [private]

Set distance icon.

Icon is selected by distance.

Parameters:
value distance value
unit distance unit
void FriendListItem::setText ( bool  expanded  )  [private]

Set shortened or full-length text to labels.

Parameters:
expanded true if full-length text is set, false otherwise
void FriendListItem::shortenTexts (  )  [private]

Set shortened texts from User data.

Text length is defined by MAXIMUM_CHARS.


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

Generated on Thu Jun 10 09:44:02 2010 for Situare client for Maemo by  doxygen 1.6.1