UserInfo Class Reference

UserInfo shows user's data in expandable item. More...

#include <userinfo.h>

Collaboration diagram for UserInfo:
Collaboration graph
[legend]

List of all members.

Public Slots

void backupUpdateLocationDialogData (const QString &status, bool publish)
 Saves status message and Facebook publish setting.
void clearUpdateLocationDialogData ()
 Clears backups of message and publish on Facebook setting.
void setMessageText (const QString &text)
 Sets the message text.

Signals

void findUser (const GeoCoordinate &coordinates)
 Signal for finding user.
void notificateUpdateFailing (const QString &message, bool modal)
 Signal that used to inform user that his message/location update tp Situare server was failed. This signal is originally sended from UserInfo.
void requestReverseGeo ()
 Signal for requesting reverseGeo from SituareEngine.
void reverseGeoReady (const QString &address)
 Signals, when address data is ready.
void statusUpdate (const QString &status, const bool &publish)
 Signal for requestLocationUpdate from SituareEngine via MainWindow class.

Public Member Functions

 UserInfo (QWidget *parent=0)
 Constructor.
 ~UserInfo ()
 Desctructor saves unsend user message to settings.
void setAddress (const QString &address)
 Sets the users current address.
void setCoordinates (const GeoCoordinate &coordinates)
 Sets the users current coordinates.
void setProfileImage (const QPixmap &image)
 Sets the user picture.
void setTime (const QString &time)
 Sets the time of updated message.
void setUserName (const QString &name)
 Sets the user name.

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)
 This function is called when the widget is drawn.

Private Slots

void collapse ()
 Slot for collapse user info.
void findButtonClicked ()
 Slot for find button click.
void messageUpdate ()
 Slot function to forward messageUpdate launch signal.
void updateLocationDialogFinished (int reason)
 Slot function to get indication when dialog is finished.

Private Member Functions

void restoreUnsendMessage ()
 reads Unsend message from settings at startup
void setExpanded (bool expanded)
 Set shortened or full-length text to labels.

Private Attributes

bool m_backupFacebookPublishPolicity
 Backup of publish on Facebook checkbox value.
bool m_expanded
 Item expanded state.
QLabel * m_locationLabel
 Location label.
QLabel * m_nameLabel
 Name label.
QLabel * m_statusTextLabel
 Status text label.
QLabel * m_updatedLabel
 Updated label.
QPixmap m_backgroundBottomImage
 Bottom background image.
QPixmap m_backgroundMiddleImage
 Middle background image.
QPixmap m_backgroundTopImage
 Top background image.
QPoint m_mousePosition
 Current mouse press position.
QString m_address
 Address from where the new message was sent.
QString m_backupMessage
 Backup of users message.
QString m_messageText
 User's message.
QString m_time
 Time when the new message was sent.
QString m_userName
 User's name.
GeoCoordinate m_coordinates
 User current coordinates.
ImageButtonm_avatar
 User find button.
UpdateLocationDialogm_updateLocation
 Update location dialog.

Detailed Description

UserInfo shows user's data in expandable item.


Constructor & Destructor Documentation

UserInfo::UserInfo ( QWidget *  parent = 0  ) 

Constructor.

Parameters:
parent Parent

Member Function Documentation

void UserInfo::backupUpdateLocationDialogData ( const QString &  status,
bool  publish 
) [slot]

Saves status message and Facebook publish setting.

Parameters:
status message that user sends. Message is stored to m_backupMessage data member
publish setting that determines whether the user status message is published on Facebook. This value is stored to m_backupFacebookPublishPolicity data member.
void UserInfo::findUser ( const GeoCoordinate coordinates  )  [signal]

Signal for finding user.

Parameters:
coordinates user geo coordinates
void UserInfo::mousePressEvent ( QMouseEvent *  event  )  [protected]

Set current mouse position to mouse event position.

Parameters:
event QMouseEvent mouse press event
void UserInfo::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 UserInfo::notificateUpdateFailing ( const QString &  message,
bool  modal 
) [signal]

Signal that used to inform user that his message/location update tp Situare server was failed. This signal is originally sended from UserInfo.

Parameters:
message message for notification
modal true if modal notification otherwice false
void UserInfo::paintEvent ( QPaintEvent *  event  )  [protected]

This function is called when the widget is drawn.

Parameters:
event Pointer to paint event
void UserInfo::reverseGeoReady ( const QString &  address  )  [signal]

Signals, when address data is ready.

Parameters:
address Street address
void UserInfo::setAddress ( const QString &  address  ) 

Sets the users current address.

Parameters:
address Reference to users current address
void UserInfo::setCoordinates ( const GeoCoordinate coordinates  ) 

Sets the users current coordinates.

Parameters:
coordinates Reference to users current coordinates
void UserInfo::setExpanded ( bool  expanded  )  [private]

Set shortened or full-length text to labels.

Parameters:
expanded true if full-length text is set, false otherwise
void UserInfo::setMessageText ( const QString &  text  )  [slot]

Sets the message text.

Parameters:
text Reference to user message
void UserInfo::setProfileImage ( const QPixmap &  image  ) 

Sets the user picture.

Parameters:
image Reference to user picture
void UserInfo::setTime ( const QString &  time  ) 

Sets the time of updated message.

Parameters:
time Reference to time when message was sent.
void UserInfo::setUserName ( const QString &  name  ) 

Sets the user name.

Parameters:
name Reference to user name
void UserInfo::statusUpdate ( const QString &  status,
const bool &  publish 
) [signal]

Signal for requestLocationUpdate from SituareEngine via MainWindow class.

Parameters:
status Status message
publish Publish on Facebook

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

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