|
navit 0.5.3-trunk
|
#include <backend.h>
Public Slots | |
| void | get_maps () |
| update the private m_maps list. Expected to be called from QML | |
| void | get_pois () |
| update the private m_pois list. Expected to be called from QML | |
| void | get_bookmarks () |
| update the private m_bookmarks list. Expected to be called from QML | |
| void | get_vehicles () |
| update the private m_vehicles list. Expected to be called from QML | |
| QString | get_icon_path () |
| returns the icon absolute path | |
| QString | get_country_icon (char *country_iso_code) |
| get the icon that matches the country currently used for searches | |
| void | setActivePoi (int index) |
| set the active POI. Used when clicking on a POI list to display one single POI | |
| void | setCurrentBookmark (int index) |
| set the current bookmark. Used when clicking on a bookmark list to display one single bookmark | |
| void | setCurrentVehicle (int index) |
| set the current vehicle. Used when clicking on a vehicle list to display one single vehicle | |
| void | setActivePoiAsDestination () |
| set the destination using the currently active POI's coordinates | |
| void | updateSearch (QString text) |
| update the current search results according to new inputs. Currently only works to search for towns | |
| void | searchValidateResult (int index) |
| save the search result for the next search step | |
| void | resize (int width, int height) |
| set the canvas size to use when drawing the map | |
| void | setSearchContext (QString text) |
| void | block_draw () |
Signals | |
| void | displayMenu (QString source) |
| void | hideMenu () |
| void | poisChanged () |
| void | bookmarksChanged () |
| void | activePoiChanged () |
| void | currentBookmarkChanged () |
| void | currentVehicleChanged () |
| void | mapsChanged () |
| void | vehiclesChanged () |
| void | searchResultsChanged () |
| void | currentCountryChanged () |
| void | currentCountryIso2Changed () |
| void | currentTownChanged () |
| void | currentStreetChanged () |
Public Member Functions | |
| Backend (QObject *parent=0) | |
| void | showMenu (struct point *p) |
| Set some variables and display the main menu. | |
| void | set_navit (struct navit *nav) |
| set a pointer to the struct navit * for local use | |
| void | set_engine (QQmlApplicationEngine *engine) |
| set a pointer to the QQmlApplicationEngine * for local use | |
| QQmlListProperty< QObject > | getPois () |
| get the POIs as a QList | |
| QQmlListProperty< QObject > | getBookmarks () |
| get the Bookmarks as a QList | |
| QQmlListProperty< QObject > | getMaps () |
| get the maps as a QList | |
| QQmlListProperty< QObject > | getVehicles () |
| get the vehicles as a QList | |
| PoiObject * | activePoi () |
| BookmarkObject * | currentBookmark () |
| VehicleObject * | currentVehicle () |
| QQmlListProperty< QObject > | getSearchResults () |
| get the search results as a QList | |
| QString | currentCountry () |
| QString | currentCountryIso2 () |
| QString | currentTown () |
| QString | currentStreet () |
Data Fields | |
| QList< PoiObject * > | pois |
| QList< BookmarkObject * > | bookmarks |
| QList< MapObject * > | maps |
| QList< MapObject * > | vehicles |
Properties | |
| QQmlListProperty< QObject > | pois |
| QQmlListProperty< QObject > | bookmarks |
| QQmlListProperty< QObject > | maps |
| QQmlListProperty< QObject > | vehicles |
| PoiObject * | activePoi |
| get the active POI. Used when displaying the relevant menu | |
| BookmarkObject * | currentBookmark |
| get the current bookmark. Used when displaying the relevant menu | |
| VehicleObject * | currentVehicle |
| get the currently selected vehicle. Used when displaying the relevant menu | |
| QQmlListProperty< QObject > | searchresults |
| QString | currentCountry |
| QString | currentCountryIso2 |
| QString | currentTown |
| QString | currentStreet |
Private Member Functions | |
| int | filter_pois (struct item *item) |
| apply search filters on one specific item | |
| void | set_default_country () |
| set the default country | |
Private Attributes | |
| struct navit * | nav |
| struct point * | p |
| struct coord_geo | g |
| struct pcoord | c |
| QQmlApplicationEngine * | engine |
| QList< QObject * > | _pois |
| QList< QObject * > | _bookmarks |
| QList< QObject * > | _maps |
| QList< QObject * > | _vehicles |
| PoiObject * | m_activePoi |
| BookmarkObject * | m_currentBookmark |
| VehicleObject * | m_currentVehicle |
| QList< QObject * > | _search_results |
| const char * | _country_iso2 |
| const char * | _current_country |
| const char * | _current_town |
| const char * | _current_street |
| struct search_param * | search |
| enum attr_type | _search_context |
|
explicit |
References _current_street, _current_town, search, and set_default_country().
| PoiObject * Backend::activePoi | ( | ) |
|
signal |
Referenced by setActivePoi().
|
slot |
References dbg, lvl_debug, nav, and navit_block().
|
signal |
Referenced by get_bookmarks().
| BookmarkObject * Backend::currentBookmark | ( | ) |
|
signal |
Referenced by setCurrentBookmark().
| QString Backend::currentCountry | ( | ) |
|
signal |
| QString Backend::currentCountryIso2 | ( | ) |
|
signal |
| QString Backend::currentStreet | ( | ) |
|
signal |
| QString Backend::currentTown | ( | ) |
|
signal |
| VehicleObject * Backend::currentVehicle | ( | ) |
|
signal |
Referenced by setCurrentVehicle().
|
signal |
Referenced by searchValidateResult(), and showMenu().
|
private |
apply search filters on one specific item
| struct | item * the item to filter |
References item::type, and type.
Referenced by get_pois().
|
slot |
update the private m_bookmarks list. Expected to be called from QML
| none |
References _bookmarks, attr::bookmarks, bookmarks_get_item(), bookmarks_item_rewind(), bookmarksChanged(), c, dbg, item_attr_get(), item_coord_get(), lvl_debug, nav, navit_get_attr(), navit_get_trans(), pcoord::pro, attr::str, transform_get_projection(), attr::u, pcoord::x, and pcoord::y.
|
slot |
get the icon that matches the country currently used for searches
| none |
Referenced by updateSearch().
|
slot |
returns the icon absolute path
| none |
|
slot |
update the private m_maps list. Expected to be called from QML
| none |
References _maps, active, data, description(), label, attr::map, map_get_attr(), mapsChanged(), nav, navit_attr_iter_new(), navit_get_attr(), attr::num, type, and attr::u.
|
slot |
update the private m_pois list. Expected to be called from QML
| none |
References _pois, c, map_selection::c_rect, center, coord_rect_contains(), dbg, filter_pois(), get_icon(), item_attr_get(), item_coord_get_pro(), item_to_name(), label, lvl_debug, item::map, map_convert_string(), map_projection(), map_rect_destroy(), map_rect_get_item(), map_rect_new(), map_selection_destroy(), map_selection_dup_pro(), map_selection_rect_new(), mapset_close(), mapset_next(), mapset_open(), nav, navit_get_mapset(), navit_get_trans(), poisChanged(), pcoord::pro, attr::str, transform_distance(), transform_get_projection(), transform_scale(), item::type, attr::u, map_selection::u, coord::x, pcoord::x, coord::y, and pcoord::y.
|
slot |
update the private m_vehicles list. Expected to be called from QML
| none |
References _vehicles, dbg, lvl_debug, nav, navit_attr_iter_destroy(), navit_attr_iter_new(), navit_get_attr(), attr::str, attr::u, attr::vehicle, vehicle_get_attr(), and vehiclesChanged().
| QQmlListProperty< QObject > Backend::getBookmarks | ( | ) |
| QQmlListProperty< QObject > Backend::getMaps | ( | ) |
| QQmlListProperty< QObject > Backend::getPois | ( | ) |
| QQmlListProperty< QObject > Backend::getSearchResults | ( | ) |
get the search results as a QList
| none |
References _search_results.
| QQmlListProperty< QObject > Backend::getVehicles | ( | ) |
|
signal |
Referenced by setActivePoiAsDestination().
|
signal |
Referenced by get_maps().
|
signal |
Referenced by get_pois().
|
slot |
set the canvas size to use when drawing the map
| int | width |
| int | height |
References height, nav, navit_block(), and navit_handle_resize().
Referenced by setActivePoi(), and setCurrentBookmark().
|
signal |
Referenced by updateSearch().
|
slot |
save the search result for the next search step
| int | index the index of the result in the m_search_results list |
References _current_country, _current_street, _current_town, _search_context, _search_results, dbg, displayMenu(), SearchObject::getCoords(), lvl_debug, lvl_error, SearchObject::name, pcoord::x, and pcoord::y.
|
private |
set the default country
| none | returns nothing |
References _country_iso2, and _current_country.
Referenced by Backend().
| void Backend::set_engine | ( | QQmlApplicationEngine * | engine | ) |
set a pointer to the QQmlApplicationEngine * for local use
| none |
References engine.
Referenced by gui_qt5_qml_set_graphics().
| void Backend::set_navit | ( | struct navit * | nav | ) |
set a pointer to the struct navit * for local use
| none |
References nav.
Referenced by gui_qt5_qml_set_graphics().
|
slot |
set the active POI. Used when clicking on a POI list to display one single POI
| int | index the index of the POI in the m_pois list |
References _pois, activePoiChanged(), c, PoiObject::coords, m_activePoi, nav, navit_set_center(), and resize().
|
slot |
set the destination using the currently active POI's coordinates
| none |
References c, PoiObject::coords, dbg, hideMenu(), lvl_debug, m_activePoi, PoiObject::name, nav, navit_set_destination(), pcoord::pro, pcoord::x, and pcoord::y.
|
slot |
set the current bookmark. Used when clicking on a bookmark list to display one single bookmark
| int | index the index of the bookmark in the m_bookmarks list |
References _bookmarks, c, BookmarkObject::coords, currentBookmarkChanged(), m_currentBookmark, nav, navit_set_center(), and resize().
|
slot |
set the current vehicle. Used when clicking on a vehicle list to display one single vehicle
| int | index the index of the vehicle in the m_vehicles list |
References _vehicles, currentVehicleChanged(), and m_currentVehicle.
|
slot |
References _search_context, dbg, and lvl_error.
| void Backend::showMenu | ( | struct point * | p | ) |
Set some variables and display the main menu.
| struct | point *p the point coordinate where we clicked on the screen |
References c, dbg, displayMenu(), g, coord_geo::lat, lvl_debug, nav, navit_block(), navit_get_trans(), navit_set_position(), p, pcoord::pro, transform_get_projection(), transform_reverse(), transform_to_geo(), coord::x, pcoord::x, point::x, coord::y, pcoord::y, and point::y.
Referenced by gui_qt5_qml_button().
|
slot |
update the current search results according to new inputs. Currently only works to search for towns
| QString | text the text to search for |
References _country_iso2, _search_context, _search_results, search_param::attr, search_list_result::c, search_list_town::common, search_list_result::country, dbg, search_list_country::flag, get_country_icon(), label, lvl_debug, lvl_error, search_param::ms, search_list_country::name, search_list_street::name, search_param::nav, nav, navit_get_mapset(), search_param::partial, search, search_list_get_result(), search_list_new(), search_list_search(), searchResultsChanged(), search_param::sl, attr::str, search_list_result::street, search_list_result::town, search_list_common::town_name, attr::type, and attr::u.
|
signal |
Referenced by get_vehicles().
|
private |
Referenced by get_bookmarks(), getBookmarks(), and setCurrentBookmark().
|
private |
Referenced by set_default_country(), and updateSearch().
|
private |
Referenced by searchValidateResult(), and set_default_country().
|
private |
Referenced by Backend(), and searchValidateResult().
|
private |
Referenced by Backend(), and searchValidateResult().
|
private |
Referenced by get_maps(), and getMaps().
|
private |
Referenced by get_pois(), getPois(), and setActivePoi().
|
private |
Referenced by searchValidateResult(), setSearchContext(), and updateSearch().
|
private |
Referenced by getSearchResults(), searchValidateResult(), and updateSearch().
|
private |
Referenced by get_vehicles(), getVehicles(), and setCurrentVehicle().
| QList< BookmarkObject * > Backend::bookmarks |
|
private |
Referenced by get_bookmarks(), get_pois(), setActivePoi(), setActivePoiAsDestination(), setCurrentBookmark(), and showMenu().
|
private |
Referenced by set_engine().
|
private |
Referenced by showMenu().
|
private |
Referenced by setActivePoi(), and setActivePoiAsDestination().
|
private |
Referenced by setCurrentBookmark().
|
private |
Referenced by setCurrentVehicle().
| QList< MapObject * > Backend::maps |
|
private |
|
private |
Referenced by showMenu().
| QList< PoiObject * > Backend::pois |
|
private |
Referenced by Backend(), and updateSearch().
| QList< MapObject * > Backend::vehicles |
|
read |
get the active POI. Used when displaying the relevant menu
| none |
|
read |
|
read |
get the current bookmark. Used when displaying the relevant menu
| none |
|
read |
|
read |
|
read |
|
read |
|
read |
get the currently selected vehicle. Used when displaying the relevant menu
| none |
|
read |
|
read |
|
read |
|
read |