summaryrefslogtreecommitdiff
path: root/navit/gui/qt5_qml/qml_search.cpp
diff options
context:
space:
mode:
authorPierre GRANDIN <pgrandin@users.noreply.github.com>2017-06-04 19:56:30 -0700
committerGitHub <noreply@github.com>2017-06-04 19:56:30 -0700
commit825a26d1a3740a7d160bda468fd0a21dcd3d32b7 (patch)
tree2a16e57dffda5a66af99574d45a9b315066a85d0 /navit/gui/qt5_qml/qml_search.cpp
parentd4173e24f4d29988516fc08cb3ccbd7d796005d4 (diff)
downloadnavit-825a26d1a3740a7d160bda468fd0a21dcd3d32b7.tar.gz
Qt5 qml gui - POC update (#263)R7602
* Adding qt5/qml2 UI proof of concept * Code cleanup * Minor cleanup * Apply coding style by clang-format -style=WebKit For better diff tracking, I applied coding style once more. * Removed useless QtQuick.Controls dependency * QML2 : Minor work around POIs * QML2 : Use real POIs icons * More minor work around POIs. This commit adds a draft of POI display, and the possibility to set a POI as destination. Also sets the current position to wherever we clicked on the map, to simulate routing using the Demo vehicle * Renamed default skin to 'modern' This will allow us to easily create other skins and make the skin to load configurable * Added town search capability * Resize the QNavitQuick object when exiting the menu * Minor work on the qml2 gui * Implemented street search * Disabled virtual keyboard until it's ready * More modular default country code * Block draw operations when displaying the menu * Removed useless QML ressources
Diffstat (limited to 'navit/gui/qt5_qml/qml_search.cpp')
-rw-r--r--navit/gui/qt5_qml/qml_search.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/navit/gui/qt5_qml/qml_search.cpp b/navit/gui/qt5_qml/qml_search.cpp
new file mode 100644
index 000000000..0a82e37d3
--- /dev/null
+++ b/navit/gui/qt5_qml/qml_search.cpp
@@ -0,0 +1,42 @@
+#include "qml_search.h"
+
+SearchObject::SearchObject(QObject *parent)
+ : QObject(parent)
+{
+}
+
+SearchObject::SearchObject(const QString &name, const QString &icon, struct pcoord *c, QObject *parent)
+ : QObject(parent), m_name(name), m_icon(icon), m_c(c)
+{
+}
+
+QString SearchObject::name() const
+{
+ return m_name;
+}
+
+void SearchObject::setName(const QString &name)
+{
+ if (name != m_name) {
+ m_name = name;
+ emit nameChanged();
+ }
+}
+
+QString SearchObject::icon() const
+{
+ return m_icon;
+}
+
+void SearchObject::setIcon(const QString &icon)
+{
+ if (icon != m_icon) {
+ m_icon = icon;
+ emit iconChanged();
+ }
+}
+
+struct pcoord * SearchObject::getCoords() const
+{
+ return m_c;
+}