UserInfo shows user's data in expandable item. More...
#include "ui/userinfo.h"

Public Slots | |
| void | clearUpdateLocationDialogData () |
| Clears backups of message and publish on Facebook setting. | |
| void | backupUpdateLocationDialogData (const QString &status, bool publish) |
| Saves status message and Facebook publish setting. | |
| void | setMessageText (const QString &text) |
| Sets the message text. | |
| void | verifyMessageUpdateFailure (const QString &errorMessage) |
| Emits signal to inform user about failed message/location update. Contains logic to send signal only after failed message/location update. | |
Signals | |
| void | findUser (const QPointF &coordinates) |
| Signal for finding user. | |
| void | messageSendingFailed (const QString &error) |
| Signal that informs that user's message/location failed to update on Situare server This signal is originally sended from SituareService with name error Signal is renamed on MainWindow. | |
| void | notificateUpdateFailing (const QString &message) |
| Signal that used to inform user that his message/location update tp Situare server was failed. This signal is originally sended from UserInfo. | |
| void | refreshUserData () |
| Signal for refreshing user data. | |
| 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 QPointF &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 *aPaintEvent) |
| This function is called when the widget is drawn. | |
Private Slots | |
| 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 | setText (bool expanded) |
| Set shortened or full-length text to labels. | |
| QString | shortenText (const QLabel *label, const QString &text, int textMaxWidth) |
| Set shortened texts from User data. | |
Private Attributes | |
| bool | m_backupFacebookPublishPolicity |
| Backup of publish on Facebook checkbox value. | |
| bool | m_expanded |
| Item expanded state. | |
| bool | m_messageUpdateVerified |
| Place for message/location update check. | |
| 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. | |
| QPointF | m_coordinates |
| User current coordinates. | |
| 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. | |
| ImageButton * | m_findButton |
| User find button. | |
| UpdateLocationDialog * | m_updateLocation |
| Update location dialog. | |
UserInfo shows user's data in expandable item.
| UserInfo::UserInfo | ( | QWidget * | parent = 0 |
) |
Constructor.
| parent | Parent |
| void UserInfo::backupUpdateLocationDialogData | ( | const QString & | status, | |
| bool | publish | |||
| ) | [slot] |
Saves status message and Facebook publish setting.
| 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 QPointF & | coordinates | ) | [signal] |
Signal for finding user.
| coordinates | user geo coordinates |
| void UserInfo::mousePressEvent | ( | QMouseEvent * | event | ) | [protected] |
Set current mouse position to mouse event position.
| 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.
| event | QMouseEvent mouse release event |
| void UserInfo::paintEvent | ( | QPaintEvent * | aPaintEvent | ) | [protected] |
This function is called when the widget is drawn.
| aPaintEvent | Pointer to paint event |
| void UserInfo::reverseGeoReady | ( | const QString & | address | ) | [signal] |
Signals, when address data is ready.
| address | Street address |
| void UserInfo::setAddress | ( | const QString & | address | ) |
Sets the users current address.
| address | Reference to users current address |
| void UserInfo::setCoordinates | ( | const QPointF & | coordinates | ) |
Sets the users current coordinates.
| coordinates | Reference to users current coordinates |
| void UserInfo::setMessageText | ( | const QString & | text | ) | [slot] |
Sets the message text.
| text | Reference to user message |
| void UserInfo::setProfileImage | ( | const QPixmap & | image | ) |
Sets the user picture.
| image | Reference to user picture |
| void UserInfo::setText | ( | bool | expanded | ) | [private] |
Set shortened or full-length text to labels.
| expanded | true if full-length text is set, false otherwise |
| void UserInfo::setTime | ( | const QString & | time | ) |
Sets the time of updated message.
| time | Reference to time when message was sent. |
| void UserInfo::setUserName | ( | const QString & | name | ) |
Sets the user name.
| name | Reference to user name |
| QString UserInfo::shortenText | ( | const QLabel * | label, | |
| const QString & | text, | |||
| int | textMaxWidth | |||
| ) | [private] |
Set shortened texts from User data.
Text length is defined by MAXIMUM_CHARS.
| void UserInfo::statusUpdate | ( | const QString & | status, | |
| const bool & | publish | |||
| ) | [signal] |
Signal for requestLocationUpdate from SituareEngine via MainWindow class.
| status | Status message | |
| publish | Publish on Facebook |
| void UserInfo::verifyMessageUpdateFailure | ( | const QString & | errorMessage | ) | [slot] |
Emits signal to inform user about failed message/location update. Contains logic to send signal only after failed message/location update.
| errorMessage | from Situare server. Message is not used in this function |
1.6.1