#include <backend.h>
◆ Backend()
Backend::Backend |
( |
QObject * |
parent = 0 | ) |
|
|
explicit |
◆ activePoi()
◆ activePoiChanged
void Backend::activePoiChanged |
( |
| ) |
|
|
signal |
◆ block_draw
void Backend::block_draw |
( |
| ) |
|
|
slot |
◆ bookmarksChanged
void Backend::bookmarksChanged |
( |
| ) |
|
|
signal |
◆ currentBookmark()
◆ currentBookmarkChanged
void Backend::currentBookmarkChanged |
( |
| ) |
|
|
signal |
◆ currentCountry()
QString Backend::currentCountry |
( |
| ) |
|
◆ currentCountryChanged
void Backend::currentCountryChanged |
( |
| ) |
|
|
signal |
◆ currentCountryIso2()
QString Backend::currentCountryIso2 |
( |
| ) |
|
◆ currentCountryIso2Changed
void Backend::currentCountryIso2Changed |
( |
| ) |
|
|
signal |
◆ currentStreet()
QString Backend::currentStreet |
( |
| ) |
|
◆ currentStreetChanged
void Backend::currentStreetChanged |
( |
| ) |
|
|
signal |
◆ currentTown()
QString Backend::currentTown |
( |
| ) |
|
◆ currentTownChanged
void Backend::currentTownChanged |
( |
| ) |
|
|
signal |
◆ currentVehicle()
◆ currentVehicleChanged
void Backend::currentVehicleChanged |
( |
| ) |
|
|
signal |
◆ displayMenu
void Backend::displayMenu |
( |
QString |
source | ) |
|
|
signal |
◆ filter_pois()
int Backend::filter_pois |
( |
struct item * |
item | ) |
|
|
private |
apply search filters on one specific item
- Parameters
-
struct | item * the item to filter |
- Returns
- 0 if the item should be discarded, 1 otherwise
References item::type, and type.
Referenced by get_pois().
◆ get_bookmarks
void Backend::get_bookmarks |
( |
| ) |
|
|
slot |
update the private m_bookmarks list. Expected to be called from QML
- Parameters
-
- Returns
- nothing
References _bookmarks, attr::bookmarks, bookmarks_get_item(), bookmarks_item_rewind(), bookmarksChanged(), c, dbg, item, 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.
◆ get_country_icon
QString Backend::get_country_icon |
( |
char * |
country_iso_code | ) |
|
|
slot |
get the icon that matches the country currently used for searches
- Parameters
-
- Returns
- an absolute path for the country icon
Referenced by updateSearch().
◆ get_icon_path
QString Backend::get_icon_path |
( |
| ) |
|
|
slot |
returns the icon absolute path
- Parameters
-
- Returns
- the icon absolute path as a QString
◆ get_maps
void Backend::get_maps |
( |
| ) |
|
|
slot |
update the private m_maps list. Expected to be called from QML
- Parameters
-
- Returns
- nothing
References _maps, active, data, description(), attr_iter::iter, label, attr::map, map_get_attr(), mapsChanged(), nav, navit_attr_iter_new(), navit_get_attr(), attr::num, type, and attr::u.
◆ get_pois
void Backend::get_pois |
( |
| ) |
|
|
slot |
update the private m_pois list. Expected to be called from QML
- Parameters
-
- Returns
- nothing
References _pois, c, map_selection::c_rect, center, coord_rect_contains(), dbg, filter_pois(), get_icon(), attr::icon, item, 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.
◆ get_vehicles
void Backend::get_vehicles |
( |
| ) |
|
|
slot |
update the private m_vehicles list. Expected to be called from QML
- Parameters
-
- Returns
- nothing
References _vehicles, dbg, attr_iter::iter, 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().
◆ getBookmarks()
QQmlListProperty< QObject > Backend::getBookmarks |
( |
| ) |
|
get the Bookmarks as a QList
- Parameters
-
- Returns
- the bookmarks QList
References _bookmarks.
◆ getMaps()
QQmlListProperty< QObject > Backend::getMaps |
( |
| ) |
|
get the maps as a QList
- Parameters
-
- Returns
- the maps QList
References _maps.
◆ getPois()
QQmlListProperty< QObject > Backend::getPois |
( |
| ) |
|
get the POIs as a QList
- Parameters
-
- Returns
- the pois QList
References _pois.
◆ getSearchResults()
QQmlListProperty< QObject > Backend::getSearchResults |
( |
| ) |
|
get the search results as a QList
- Parameters
-
- Returns
- the search results QList
References _search_results.
◆ getVehicles()
QQmlListProperty< QObject > Backend::getVehicles |
( |
| ) |
|
get the vehicles as a QList
- Parameters
-
- Returns
- the vehicles QList
References _vehicles.
◆ hideMenu
void Backend::hideMenu |
( |
| ) |
|
|
signal |
◆ mapsChanged
void Backend::mapsChanged |
( |
| ) |
|
|
signal |
◆ poisChanged
void Backend::poisChanged |
( |
| ) |
|
|
signal |
◆ resize
void Backend::resize |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
|
slot |
◆ searchResultsChanged
void Backend::searchResultsChanged |
( |
| ) |
|
|
signal |
◆ searchValidateResult
void Backend::searchValidateResult |
( |
int |
index | ) |
|
|
slot |
save the search result for the next search step
- Parameters
-
int | index the index of the result in the m_search_results list |
- Returns
- nothing
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.
◆ set_default_country()
void Backend::set_default_country |
( |
| ) |
|
|
private |
◆ set_engine()
void Backend::set_engine |
( |
QQmlApplicationEngine * |
engine | ) |
|
◆ set_navit()
void Backend::set_navit |
( |
struct navit * |
nav | ) |
|
◆ setActivePoi
void Backend::setActivePoi |
( |
int |
index | ) |
|
|
slot |
◆ setActivePoiAsDestination
void Backend::setActivePoiAsDestination |
( |
| ) |
|
|
slot |
set the destination using the currently active POI's coordinates
- Parameters
-
- Returns
- nothing
References c, PoiObject::coords, dbg, hideMenu(), lvl_debug, m_activePoi, PoiObject::name, nav, navit_set_destination(), pcoord::pro, pcoord::x, and pcoord::y.
◆ setCurrentBookmark
void Backend::setCurrentBookmark |
( |
int |
index | ) |
|
|
slot |
◆ setCurrentVehicle
void Backend::setCurrentVehicle |
( |
int |
index | ) |
|
|
slot |
set the current vehicle. Used when clicking on a vehicle list to display one single vehicle
- Parameters
-
int | index the index of the vehicle in the m_vehicles list |
- Returns
- nothing
References _vehicles, currentVehicleChanged(), and m_currentVehicle.
◆ setSearchContext
void Backend::setSearchContext |
( |
QString |
text | ) |
|
|
slot |
◆ showMenu()
void Backend::showMenu |
( |
struct point * |
p | ) |
|
Set some variables and display the main menu.
- Parameters
-
struct | point *p the point coordinate where we clicked on the screen |
- Returns
- nothing
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().
◆ updateSearch
void Backend::updateSearch |
( |
QString |
text | ) |
|
|
slot |
update the current search results according to new inputs. Currently only works to search for towns
- Parameters
-
QString | text the text to search for |
- Returns
- nothing
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(), search_param, searchResultsChanged(), search_param::sl, attr::str, search_list_result::street, attr::text, search_list_result::town, search_list_common::town_name, attr::type, and attr::u.
◆ vehiclesChanged
void Backend::vehiclesChanged |
( |
| ) |
|
|
signal |
◆ _bookmarks
QList<QObject *> Backend::_bookmarks |
|
private |
◆ _country_iso2
const char* Backend::_country_iso2 |
|
private |
◆ _current_country
const char* Backend::_current_country |
|
private |
◆ _current_street
const char* Backend::_current_street |
|
private |
◆ _current_town
const char* Backend::_current_town |
|
private |
◆ _maps
QList<QObject *> Backend::_maps |
|
private |
◆ _pois
QList<QObject *> Backend::_pois |
|
private |
◆ _search_context
◆ _search_results
QList<QObject *> Backend::_search_results |
|
private |
◆ _vehicles
QList<QObject *> Backend::_vehicles |
|
private |
◆ bookmarks
◆ engine
QQmlApplicationEngine* Backend::engine |
|
private |
◆ m_activePoi
◆ m_currentBookmark
◆ m_currentVehicle
◆ maps
◆ nav
struct navit* Backend::nav |
|
private |
Referenced by block_draw(), get_bookmarks(), get_maps(), get_pois(), get_vehicles(), resize(), set_navit(), setActivePoi(), setActivePoiAsDestination(), setCurrentBookmark(), showMenu(), and updateSearch().
◆ pois
◆ search
◆ vehicles
◆ activePoi
get the active POI. Used when displaying the relevant menu
- Parameters
-
- Returns
- the active POI
◆ bookmarks
QQmlListProperty<QObject> Backend::bookmarks |
|
read |
◆ currentBookmark
get the current bookmark. Used when displaying the relevant menu
- Parameters
-
- Returns
- the current bookmark
◆ currentCountry
QString Backend::currentCountry |
|
read |
◆ currentCountryIso2
QString Backend::currentCountryIso2 |
|
read |
◆ currentStreet
QString Backend::currentStreet |
|
read |
◆ currentTown
QString Backend::currentTown |
|
read |
◆ currentVehicle
get the currently selected vehicle. Used when displaying the relevant menu
- Parameters
-
- Returns
- the active POI
◆ maps
QQmlListProperty<QObject> Backend::maps |
|
read |
◆ pois
QQmlListProperty<QObject> Backend::pois |
|
read |
◆ searchresults
QQmlListProperty<QObject> Backend::searchresults |
|
read |
◆ vehicles
QQmlListProperty<QObject> Backend::vehicles |
|
read |
The documentation for this class was generated from the following files: