-
- QSettings settings(DIRECTORY_NAME, FILE_NAME);
-
- if (!m_backupMessage.isEmpty()) {
- settings.setValue(USER_UNSEND_MESSAGE, m_backupMessage.toAscii());
- settings.setValue(USER_UNSEND_MESSAGE_PUBLISH, m_backupFacebookPublishPolicity);
- } else {
- settings.remove(USER_UNSEND_MESSAGE);
- settings.remove(USER_UNSEND_MESSAGE_PUBLISH);
- }
-}
-
-void UserInfo::setAddress(const QString &address)
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- m_locationLabel->setText(address);
-}
-
-void UserInfo::setCoordinates(const QPointF &coordinates)
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- m_coordinates = coordinates;
-}
-
-void UserInfo::setMessageText(const QString &text)
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- m_messageText = text;
- setText(false);
-}
-
-void UserInfo::setProfileImage(const QPixmap &image)
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- m_findButton->setButtonIcon(image);
-}
-
-void UserInfo::setTime(const QString &time)
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- m_updatedLabel->setText(time);
-}
-
-void UserInfo::setUserName(const QString &name)
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- m_userName = name;
- setText(false);
-}
-
-void UserInfo::setText(bool expanded)
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- if (expanded) {
- m_nameLabel->setText(m_userName);
- m_statusTextLabel->setText(m_messageText);
- }
- else {
- m_nameLabel->setText(shortenText(m_nameLabel, m_userName, LABEL_MAX_WIDTH));
- m_statusTextLabel->setText(shortenText(m_statusTextLabel, m_messageText,
- LABEL_MAX_WIDTH));
- }