diff options
author | Pierre GRANDIN <pgrandin@users.noreply.github.com> | 2017-10-04 09:36:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-04 09:36:26 -0700 |
commit | a3435121850201dc163c5f55153ea4bc9d91e179 (patch) | |
tree | a5bb229776f049633129e97bdd8d80fee689be9e /navit/gui/qt5_qml/qml_bookmark.cpp | |
parent | a381091a64f0d3305f2eb18e2dfd4801d5a5cdc8 (diff) | |
download | navit-a3435121850201dc163c5f55153ea4bc9d91e179.tar.gz |
Update:QML2:Various updates on the QML2 UI (#316)
* 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
* Prevents a segfault on country/town/street selection
* Prevents segfault when changing country
* Added bookmarks listing
* Added basic vehicles and bookmarks menu
* Removed useless QDebug
* Removed useless QDebug
* Added bookmarks list as a destination
* Code cleanup
* Switching to a reusable result list
* Added basic vehicles and bookmarks menu
* Added a basic bookmark QObject
* Added basic vehicles and bookmarks menu
* Added basic vehicles and bookmarks menu
* Code cleanup
* Use update path for icons assets
Diffstat (limited to 'navit/gui/qt5_qml/qml_bookmark.cpp')
-rw-r--r-- | navit/gui/qt5_qml/qml_bookmark.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/navit/gui/qt5_qml/qml_bookmark.cpp b/navit/gui/qt5_qml/qml_bookmark.cpp new file mode 100644 index 000000000..e215bcd11 --- /dev/null +++ b/navit/gui/qt5_qml/qml_bookmark.cpp @@ -0,0 +1,32 @@ +#include "qml_bookmark.h" + +BookmarkObject::BookmarkObject(QObject *parent) + : QObject(parent) +{ +} + +BookmarkObject::BookmarkObject( + const QString &name, + struct pcoord &coords, + QObject *parent) + : QObject(parent), m_name(name), m_coords(coords) +{ +} + +QString BookmarkObject::name() const +{ + return m_name; +} + +void BookmarkObject::setName(const QString &name) +{ + if (name != m_name) { + m_name = name; + emit nameChanged(); + } +} + +struct pcoord BookmarkObject::coords() const +{ + return m_coords; +} |