#include <backend.h>
Backend::Backend |
( |
QObject * |
parent = 0 | ) |
|
|
explicit |
void Backend::activePoiChanged |
( |
| ) |
|
|
signal |
void Backend::block_draw |
( |
| ) |
|
|
slot |
void Backend::bookmarksChanged |
( |
| ) |
|
|
signal |
void Backend::currentBookmarkChanged |
( |
| ) |
|
|
signal |
QString Backend::currentCountry |
( |
| ) |
|
void Backend::currentCountryChanged |
( |
| ) |
|
|
signal |
QString Backend::currentCountryIso2 |
( |
| ) |
|
void Backend::currentCountryIso2Changed |
( |
| ) |
|
|
signal |
QString Backend::currentStreet |
( |
| ) |
|
void Backend::currentStreetChanged |
( |
| ) |
|
|
signal |
QString Backend::currentTown |
( |
| ) |
|
void Backend::currentTownChanged |
( |
| ) |
|
|
signal |
void Backend::currentVehicleChanged |
( |
| ) |
|
|
signal |
void Backend::displayMenu |
( |
QString |
source | ) |
|
|
signal |
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, type, and types.
Referenced by get_pois().
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(), 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, coord::x, pcoord::x, coord::y, and pcoord::y.
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().
QString Backend::get_icon_path |
( |
| ) |
|
|
slot |
returns the icon absolute path
- Parameters
-
- Returns
- the icon absolute path as a QString
void Backend::get_maps |
( |
| ) |
|
|
slot |
update the private m_maps list. Expected to be called from QML
- Parameters
-
- Returns
- nothing
References _maps, attr_iter::iter, label, attr::map, map_get_attr(), mapsChanged(), nav, navit_attr_iter_new(), navit_get_attr(), attr::num, attr::str, attr::type, and attr::u.
void Backend::get_pois |
( |
| ) |
|
|
slot |
update the private m_pois list. Expected to be called from QML
- Parameters
-
- Returns
- nothing
References _pois, map_selection::c_rect, 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, map_selection::u, attr::u, coord::x, pcoord::x, coord::y, and pcoord::y.
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().
QQmlListProperty< QObject > Backend::getBookmarks |
( |
| ) |
|
get the Bookmarks as a QList
- Parameters
-
- Returns
- the bookmarks QList
References _bookmarks.
QQmlListProperty< QObject > Backend::getMaps |
( |
| ) |
|
get the maps as a QList
- Parameters
-
- Returns
- the maps QList
References _maps.
QQmlListProperty< QObject > Backend::getPois |
( |
| ) |
|
get the POIs as a QList
- Parameters
-
- Returns
- the pois QList
References _pois.
QQmlListProperty< QObject > Backend::getSearchResults |
( |
| ) |
|
get the search results as a QList
- Parameters
-
- Returns
- the search results QList
References _search_results.
QQmlListProperty< QObject > Backend::getVehicles |
( |
| ) |
|
get the vehicles as a QList
- Parameters
-
- Returns
- the vehicles QList
References _vehicles.
void Backend::hideMenu |
( |
| ) |
|
|
signal |
void Backend::mapsChanged |
( |
| ) |
|
|
signal |
void Backend::poisChanged |
( |
| ) |
|
|
signal |
void Backend::resize |
( |
int |
width, |
|
|
int |
height |
|
) |
| |
|
slot |
void Backend::searchResultsChanged |
( |
| ) |
|
|
signal |
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.
void Backend::set_default_country |
( |
| ) |
|
|
private |
void Backend::set_engine |
( |
QQmlApplicationEngine * |
engine | ) |
|
void Backend::set_navit |
( |
struct navit * |
nav | ) |
|
void Backend::setActivePoi |
( |
int |
index | ) |
|
|
slot |
void Backend::setActivePoiAsDestination |
( |
| ) |
|
|
slot |
void Backend::setCurrentBookmark |
( |
int |
index | ) |
|
|
slot |
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.
void Backend::setSearchContext |
( |
QString |
text | ) |
|
|
slot |
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(), pcoord::pro, transform_get_projection(), transform_reverse(), transform_to_geo(), point::x, coord::x, pcoord::x, point::y, coord::y, and pcoord::y.
Referenced by gui_qt5_qml_button().
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, search_list_result::town, search_list_common::town_name, attr::type, and attr::u.
void Backend::vehiclesChanged |
( |
| ) |
|
|
signal |
QList<QObject *> Backend::_bookmarks |
|
private |
char* Backend::_country_iso2 |
|
private |
char* Backend::_current_country |
|
private |
char* Backend::_current_street |
|
private |
char* Backend::_current_town |
|
private |
QList<QObject *> Backend::_maps |
|
private |
QList<QObject *> Backend::_pois |
|
private |
QList<QObject *> Backend::_search_results |
|
private |
QList<QObject *> Backend::_vehicles |
|
private |
QQmlApplicationEngine* Backend::engine |
|
private |
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().
get the active POI. Used when displaying the relevant menu
- Parameters
-
- Returns
- the active POI
QQmlListProperty<QObject> Backend::bookmarks |
|
read |
get the current bookmark. Used when displaying the relevant menu
- Parameters
-
- Returns
- the current bookmark
QString Backend::currentCountry |
|
read |
QString Backend::currentCountryIso2 |
|
read |
QString Backend::currentStreet |
|
read |
QString Backend::currentTown |
|
read |
get the currently selected vehicle. Used when displaying the relevant menu
- Parameters
-
- Returns
- the active POI
QQmlListProperty<QObject> Backend::maps |
|
read |
QQmlListProperty<QObject> Backend::pois |
|
read |
QQmlListProperty<QObject> Backend::searchresults |
|
read |
QQmlListProperty<QObject> Backend::vehicles |
|
read |
The documentation for this class was generated from the following files: