summaryrefslogtreecommitdiffstats
path: root/app/navigation_client.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'app/navigation_client.cpp')
-rw-r--r--app/navigation_client.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/app/navigation_client.cpp b/app/navigation_client.cpp
index 426bbeb..a8682da 100644
--- a/app/navigation_client.cpp
+++ b/app/navigation_client.cpp
@@ -1,10 +1,11 @@
+#include <QDebug>
#include "navigation_client.h"
navigation_client::navigation_client(Navigation *navigation, QObject *parent) :
m_navigation(navigation)
{
- QObject::connect(m_navigation, &Navigation::statusEvent, this, &navigation_client::statusEvent);
- QObject::connect(m_navigation, &Navigation::positionEvent, this, &navigation_client::positionEvent);
+ QObject::connect(m_navigation, &Navigation::statusEvent, this, &navigation_client::onStatusEvent);
+ QObject::connect(m_navigation, &Navigation::positionEvent, this, &navigation_client::onPositionEvent);
// connect the signal to qml inside function(addRoutePointsQml -> do_addRoutePoint)
QObject::connect(this, SIGNAL(addRoutePointsQml(QVariant, QVariant, QVariant, QVariant)),
@@ -23,21 +24,21 @@ navigation_client::navigation_client(Navigation *navigation, QObject *parent) :
navigation_client::~navigation_client(){}
-void navigation_client::statusEvent(QVariantMap data)
+void navigation_client::onStatusEvent(QVariantMap data)
{
if (!data.contains("state"))
return;
QString state = data["state"].toString();
- if (state == "arrived")
+ if (state == "Arrived")
emit arrivedestQml();
- if (state == "stopped" || state == "stop")
+ if (state == "Stopped")
emit stopdemoQml();
}
-void navigation_client::positionEvent(QVariantMap data)
+void navigation_client::onPositionEvent(QVariantMap data)
{
if (!data.contains("position"))
return;;