m_locationDialog = new UpdateLocationDialog(this);
connect(this, SIGNAL(reverseGeoReady(QString)),
- m_locationDialog, SLOT(setAddress(QString)));
- connect(m_locationDialog, SIGNAL(statusUpdate(QString, bool)),
- this, SIGNAL(statusUpdate(QString, bool)));
+ m_mapViewScreen, SIGNAL(reverseGeoReady(QString)));
+ connect(m_mapViewScreen, SIGNAL(statusUpdate(QString,bool)),
+ this, SIGNAL(statusUpdate(QString,bool)));
connect(this, SIGNAL(userLocationReady(User*)),
m_mapViewScreen, SIGNAL(userLocationReady(User*)));
connect(this, SIGNAL(zoomOutKeyPressed()),
m_mapViewScreen, SIGNAL(zoomOutKeyPressed()));
+ connect(m_mapViewScreen, SIGNAL(requestReverseGeo()),
+ this, SIGNAL(requestReverseGeo()));
+
+ connect(m_mapViewScreen, SIGNAL(refreshUserData()),
+ this, SIGNAL(refreshUserData()));
+
this->toggleProgressIndicator(true);
grabZoomKeys(true);
m_viewMenu->setObjectName(tr("Menu"));
}
-void MainWindow::openLocationUpdateDialog()
-{
- qDebug() << __PRETTY_FUNCTION__;
-
- emit requestReverseGeo();
- m_locationDialog->exec();
-}
-
void MainWindow::openSettingsDialog()
{
qDebug() << __PRETTY_FUNCTION__;
*/
void loadDone(bool done);
- /**
- * @brief Private slot, which starts UpdateLocationDialog
- *
- */
- void openLocationUpdateDialog();
-
/*******************************************************************************
* SIGNALS
******************************************************************************/
this, SLOT(locationChanged()));
connect(this, SIGNAL(userLocationReady(User*)),
- m_userPanel, SLOT(receiveUserData(User*)));
+ m_userPanel, SLOT(userDataReceived(User*)));
+
+ connect(m_userPanel, SIGNAL(requestReverseGeo()),
+ this, SIGNAL(requestReverseGeo()));
+
+ connect(this, SIGNAL(reverseGeoReady(QString)),
+ m_userPanel, SIGNAL(reverseGeoReady(QString)));
+
+ connect(m_userPanel, SIGNAL(statusUpdate(QString,bool)),
+ this, SIGNAL(statusUpdate(QString,bool)));
+
+ connect(m_userPanel, SIGNAL(refreshUserData()),
+ this, SIGNAL(refreshUserData()));
QHBoxLayout *mapViewLayout = new QHBoxLayout;
*/
void zoomOutKeyPressed();
+ void requestReverseGeo();
+
+ /**
+ * @brief Signals, when address data is ready
+ *
+ * @param address Street address
+ */
+ void reverseGeoReady(const QString &address);
+
+ /**
+ * @brief Signal Signal for requestLocationUpdate from SituareEngine via MainWindow class
+ *
+ * @param status Status message
+ * @param publish Publish on Facebook
+ */
+ void statusUpdate(const QString &status, const bool &publish);
+
+ void refreshUserData();
+
/*******************************************************************************
* DATA MEMBERS
******************************************************************************/
m_nameLabel = new QLabel();
m_nameLabel->setFixedHeight(IMAGE_HEIGHT);
+ m_nameLabel->setAlignment(Qt::AlignHCenter);
m_updatedLabel = new QLabel();
m_updatedLabel->setWordWrap(true);
connect(updateStatusMessageButton,SIGNAL(clicked()),
this,SLOT(messageUpdate()));
connect(updateFriendsButton,SIGNAL(clicked()),
- this,SLOT(updateFriendsStatus()));
+ this, SIGNAL(refreshUserData()));
- setFont(NOKIA_FONT_SMALL);
+ this->setFont(NOKIA_FONT_SMALL);
m_nameLabel->setFont(NOKIA_FONT_NORMAL);
QPalette itemPalette = palette();
itemPalette.setColor(QPalette::Foreground, COLOR_GRAY);
namePalette.setColor(QPalette::Foreground, Qt::white);
m_nameLabel->setPalette(namePalette);
- m_nameLabel->setText("");
-
- this->setMaximumHeight(300);
+ this->setMinimumHeight(300);
m_backgroundTopImage.load(":/res/images/list_item_top.png");
m_backgroundMiddleImage.load(":/res/images/list_item_middle.png");
m_backgroundBottomImage.load(":/res/images/list_item_bottom.png");
}
-
-
void UserInfo::setUserName(const QString &name)
{
qDebug() << __PRETTY_FUNCTION__;
qDebug() << name;
- m_nameLabel->setText(name);
+// m_nameLabel->setText(name);
// shortenTexts();
}
if(m_messageText == text)
return;
m_messageText = text;
- m_statusTextLabel->setText(m_messageText);
+// m_statusTextLabel->setText(m_messageText);
// shortenTexts();
}
{
qDebug() << __PRETTY_FUNCTION__;
- m_locationLabel->setText(addr);
+// m_locationLabel->setText(addr);
// shortenTexts();
}
if(m_time == tim)
return;
m_time = tim;
- m_updatedLabel->setText(m_time);
+// m_updatedLabel->setText(m_time);
shortenTexts();
+ setText(false);
}
void UserInfo::shortenTexts()
if ((abs(m_mousePosition.y() - event->pos().y()) <= MOUSE_PRESS_AREA_WIDTH) &&
(abs(m_mousePosition.x() - event->pos().x()) <= MOUSE_PRESS_AREA_HEIGHT)) {
- if (m_expanded) {
- setText(false);
- m_expanded = false;
- }
- else {
- setText(true);
- m_expanded = true;
- }
+// if (m_expanded) {
+// setText(false);
+// m_expanded = false;
+// }
+// else {
+// setText(true);
+// m_expanded = true;
+// }
}
}
void UserInfo::paintEvent(QPaintEvent *aPaintEvent)
void UserInfo::messageUpdate()
{
qDebug() << __PRETTY_FUNCTION__;
+
m_locationDialog = new UpdateLocationDialog(this);
+ emit requestReverseGeo();
+
+ connect(this, SIGNAL(reverseGeoReady(QString)),
+ m_locationDialog, SLOT(setAddress(QString)));
+ connect(m_locationDialog, SIGNAL(statusUpdate(QString, bool)),
+ this, SIGNAL(statusUpdate(QString, bool)));
+
m_locationDialog->show();
}
-void UserInfo::updateFriendsStatus()
-{
- qDebug() << __PRETTY_FUNCTION__;
- //emit launchUpdateFriendsStatus();
-}
+//void UserInfo::updateFriendsStatus()
+//{
+// qDebug() << __PRETTY_FUNCTION__;
+// //emit launchUpdateFriendsStatus();
+//}
* Text length is defined by MAXIMUM_CHARS.
*/
void shortenTexts();
- /**
- * @brief Slot function to forward friends status update signal
- *
- */
- void updateFriendsStatus();
+// /**
+// * @brief Slot function to forward friends status update signal
+// *
+// */
+// void updateFriendsStatus();
signals:
/**
*/
void launchUpdateFriendsStatus();
+ void requestReverseGeo();
+
+ /**
+ * @brief Signals, when address data is ready
+ *
+ * @param address Street address
+ */
+ void reverseGeoReady(const QString &address);
+
+ /**
+ * @brief Signal Signal for requestLocationUpdate from SituareEngine via MainWindow class
+ *
+ * @param status Status message
+ * @param publish Publish on Facebook
+ */
+ void statusUpdate(const QString &status, const bool &publish);
+
+ void refreshUserData();
+
/******************************************************************************
* DATA MEMBERS
******************************************************************************/
m_userPanelSlidingBar, SIGNAL(clicked()), m_userPanelStateClosed);
m_userPanelTransitionClose->addAnimation(new QPropertyAnimation(this, "pos", this));
+ connect(m_userInfo,SIGNAL(requestReverseGeo()),
+ this, SIGNAL(requestReverseGeo()));
+
+ connect(this, SIGNAL(reverseGeoReady(QString)),
+ m_userInfo, SIGNAL(reverseGeoReady(QString)));
+
+ connect(m_userInfo, SIGNAL(statusUpdate(QString,bool)),
+ this, SIGNAL(statusUpdate(QString,bool)));
+
+ connect(m_userInfo, SIGNAL(refreshUserData()),
+ this, SIGNAL(refreshUserData()));
+
m_userPanelStateMachine->start();
setObjectName("UserPanel");
}
*/
void reDrawUserPanel(int width, int height);
+signals:
+
+ void requestReverseGeo();
+
+ /**
+ * @brief Signals, when address data is ready
+ *
+ * @param address Street address
+ */
+ void reverseGeoReady(const QString &address);
+
+ /**
+ * @brief Signal Signal for requestLocationUpdate from SituareEngine via MainWindow class
+ *
+ * @param status Status message
+ * @param publish Publish on Facebook
+ */
+ void statusUpdate(const QString &status, const bool &publish);
+
+ void refreshUserData();
+
/*******************************************************************************
* DATA MEMBERS
******************************************************************************/