2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Jukka Saastamoinen - jukka.saastamoinen@ixonos.com
7 Situare is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 version 2 as published by the Free Software Foundation.
11 Situare is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with Situare; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
29 * @brief InfoTab class.
30 * Composite custom widget class used to show user information
31 * @author Jukka Saastamoinen
34 class InfoTab : public QWidget
39 * @brief This function is called when the widget is drawn
41 * @param aPaintEvent Pointer to paint event
43 void paintEvent(QPaintEvent *aPaintEvent);
48 * @param parent Parent
50 InfoTab(QWidget *parent=0);
58 * @brief Sets the users current address
60 * @param addr Reference to users current address
62 void setAddress(const QString &addr);
64 * @brief Sets the user picture
66 * @param avat Reference to user picture
68 void setAvatar(const QPixmap &avat);
70 * @brief Sets the message text
72 * @param text Reference to user message
74 void setMessageText(const QString &text);
76 * @brief Sets the time of updated message
78 * @param tim Reference to time when message was sent.
80 void setTime(const QString &tim);
82 * @brief Sets the user name
84 * @param usernam Reference to user name
86 void setUserName(const QString &usernam);
88 QLabel *m_userPicture; ///< Shows the user's avatar
89 QLabel *m_userNameLabel; ///< Shows the user's name
90 QLabel *m_messageLabel; ///< Shows the Situare message icon
91 QLabel *m_addressLabel; ///< Shows the Situare address icon
92 QLabel *m_timeLabel; ///< Shows the Situare time icon
93 QGridLayout *m_layout; ///< Layout for shown items
94 QString m_messageText; ///< User's message
95 QString m_userName; ///< User's name
96 QString m_address; ///< Address from where the new message was sent.
97 QString m_time; ///< Time when the new message was sent
98 QPixmap m_avatar; ///< User's avatar