summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViktor Verebelyi <vviktor2@gmail.com>2020-09-17 01:17:15 +0100
committerViktor Verebelyi <vviktor2@gmail.com>2020-09-22 02:16:58 +0100
commit511922ab794579d151c8559479ae715c90720a64 (patch)
tree146d8a5f5ec057ad727ebf25f945bb5b1fedac32
parentf56395fa421b758f41224f359ed3518898bfbd1c (diff)
downloadnavit-511922ab794579d151c8559479ae715c90720a64.tar.gz
Add:core:Add Current WIP
-rw-r--r--navit/item.h21
-rw-r--r--navit/navit.c6
-rw-r--r--navit/navit_layout_th_shipped.xml2
-rw-r--r--navit/navit_qt_icons.xml163
-rw-r--r--navit/navit_shipped.xml16
-rw-r--r--navit/route.c2
-rw-r--r--navit/start_real.c8
7 files changed, 195 insertions, 23 deletions
diff --git a/navit/item.h b/navit/item.h
index 32ef35dec..d8f38a69b 100644
--- a/navit/item.h
+++ b/navit/item.h
@@ -68,15 +68,18 @@ extern int default_flags[];
* @return Returns true if the item is a POI type otherwise returns false
*/
#define item_is_poi(item) (((item).type >= type_poi_lake && (item).type <= type_poi) \
- || ((item).type >= type_poi_land_feature && (item).type <= type_poi_zoo) \
- || ((item).type >= type_poi_gc_multi && (item).type <= type_poi_cafe) \
- || ((item).type >= type_poi_peak && (item).type <= type_poi_image) \
- || ((item).type >= type_poi_townhall && (item).type <= type_poi_ruins) \
- || ((item).type >= type_poi_post_box && (item).type <= type_poi_tennis) \
- || ((item).type >= type_poi_vending_machine && (item).type <= type_poi_shop_shoes) \
- || ((item).type >= type_poi_tree && (item).type <= type_poi_shop_photo) \
- || ((item).type >= type_poi_pub && (item).type <= type_poi_bahai) \
- || ((item).type >= type_poi_customh && (item).type <= type_poi_customf))
+ || ((item).type >= type_poi_land_feature && (item).type <= type_poi_zoo) \
+ || ((item).type >= type_poi_gc_multi && (item).type <= type_poi_cafe) \
+ || ((item).type >= type_poi_peak && (item).type <= type_poi_image) \
+ || ((item).type >= type_poi_townhall && (item).type <= type_poi_ruins) \
+ || ((item).type >= type_poi_post_box && (item).type <= type_poi_tennis) \
+ || ((item).type >= type_poi_vending_machine && (item).type <= type_poi_shop_shoes) \
+ || ((item).type >= type_poi_tree && (item).type <= type_poi_shop_photo) \
+ || ((item).type >= type_poi_pub && (item).type <= type_poi_bahai) \
+ || ((item).type >= type_poi_customh && (item).type <= type_poi_customf))
+
+#define item_is_house_number(item) ((item).type == type_house_number \
+ || ((item).type >= type_house_number_interpolation_even && (item).type <= type_house_number_interpolation_alphabetic))
#define item_is_equal_id(a,b) ((a).id_hi == (b).id_hi && (a).id_lo == (b).id_lo)
#define item_is_equal(a,b) (item_is_equal_id(a,b) && (a).map == (b).map)
diff --git a/navit/navit.c b/navit/navit.c
index 6c22ebadb..c6e467a22 100644
--- a/navit/navit.c
+++ b/navit/navit.c
@@ -1613,7 +1613,6 @@ void navit_set_destination(struct navit *this_, struct pcoord *c, const char *de
}
g_free(destination_file);
- callback_list_call_attr_0(this_->attr_cbl, attr_destination);
if (this_->route) {
struct attr attr;
@@ -1641,6 +1640,8 @@ void navit_set_destination(struct navit *this_, struct pcoord *c, const char *de
if (this_->ready == 3 && !(this_->flags & 4))
navit_draw(this_);
}
+
+ callback_list_call_attr_0(this_->attr_cbl, attr_destination);
}
/**
@@ -1667,6 +1668,7 @@ void navit_add_destination_description(struct navit *this_, struct pcoord *c, co
*
* @param this_ The navit instance
* @param c The coordinate to start routing to
+ * @param count Number of items in {@code dst}
* @param description A label which allows the user to later identify this destination in the former destinations selection
* @param async If routing should be done asynchronously
* @returns nothing
@@ -1683,13 +1685,13 @@ void navit_set_destinations(struct navit *this_, struct pcoord *c, int count, co
g_free(destination_file);
} else
this_->destination_valid=0;
- callback_list_call_attr_0(this_->attr_cbl, attr_destination);
if (this_->route) {
route_set_destinations(this_->route, c, count, async);
if (this_->ready == 3)
navit_draw(this_);
}
+ callback_list_call_attr_0(this_->attr_cbl, attr_destination);
}
int navit_get_destinations(struct navit *this_, struct pcoord *pc, int count) {
diff --git a/navit/navit_layout_th_shipped.xml b/navit/navit_layout_th_shipped.xml
index dda59cc54..d51a781b2 100644
--- a/navit/navit_layout_th_shipped.xml
+++ b/navit/navit_layout_th_shipped.xml
@@ -524,7 +524,7 @@
</itemgra>
<!-- amenity=parking -->
<itemgra item_types="poi_car_parking" order="14-">
- <icon src="parking.png"/>
+ <icon src="assets/osmic/transport/parking-car-14.svg"/>
</itemgra>
<!-- amenity=police -->
<itemgra item_types="poi_police" order="14-">
diff --git a/navit/navit_qt_icons.xml b/navit/navit_qt_icons.xml
new file mode 100644
index 000000000..91cc33454
--- /dev/null
+++ b/navit/navit_qt_icons.xml
@@ -0,0 +1,163 @@
+{
+"mini_roundabout" : "",
+"turning_circle" : "",
+"poi_airport" : "assets/osmic/transport/airport-14.svg",
+"town_ghost" : "",
+"poi_hotel" : "assets/osmic/accommodation/hotel-14.svg",
+"poi_car_parking" : "assets/osmic/transport/parking-car-14.svg",
+"poi_car_dealer_parts" : "assets/osmic/shop/car-parts-14.svg",
+"poi_car_sharing" : "assets/osmic/transport/shared-car-14.svg",
+"poi_fuel" : "assets/osmic/transport/fuel-14.svg",
+"poi_shopping" : "assets/osmic/shop/supermarket-14.svg",
+"poi_attraction" : "assets/osmic/tourism/castle-fortress-14.svg",
+"poi_cafe" : "assets/osmic/eat-drink/cafe-14.svg",
+"poi_bar" : "assets/osmic/eat-drink/bar-14.svg",
+"poi_pub" : "assets/osmic/eat-drink/pub-14.svg",
+"poi_bridge" : "",
+"highway_exit" : "",
+"poi_camp_rv" : "assets/osmic/outdoor/camping-14.svg",
+"poi_museum_history" : "assets/osmic/tourism/museum-14.svg",
+"poi_hospital" : "assets/osmic/health/hospital-14.svg",
+"poi_dining" : "assets/osmic/eat-drink/restaurant-14.svg",
+"poi_fastfood" : "assets/osmic/eat-drink/fast-food-14.svg",
+"poi_police" : "assets/osmic/emergency/police-14.svg",
+"poi_auto_club" : "assets/osmic/shop/car-14.svg",
+"poi_autoservice" : "assets/osmic/shop/repair-car-14.svg",
+"poi_bank" : "assets/osmic/money/bank-14.svg",
+"poi_atm" : "assets/osmic/money/atm-14.svg",
+"poi_bay" : "",
+"poi_bend" : "",
+"poi_boat_ramp" : "",
+"poi_border_station" : "",
+"poi_bowling" : "",
+"poi_bus_station" : "assets/osmic/transport/bus-station-14.svg",
+"poi_bus_stop" : "assets/osmic/transport/bus-stop-14.svg",
+"poi_business_service" : "",
+"poi_car_rent" : "assets/osmic/transport/rental-car-14.svg",
+"poi_car_wash" : "",
+"poi_casino" : "",
+"poi_cemetery" : "assets/osmic/amenity/cemetery-14.svg",
+"poi_church" : "assets/osmic/religious/christian-14.svg",
+"poi_bahai" : "",
+"poi_buddhist" : "assets/osmic/religious/buddhist-14.svg",
+"poi_hindu" : "assets/osmic/religious/hinduist-14.svg",
+"poi_islamic" : "assets/osmic/religious/muslim-14.svg",
+"poi_jain" : "",
+"poi_jewish" : "assets/osmic/religious/jewish-14.svg",
+"poi_pagan" : "",
+"poi_pastafarian" : "",
+"poi_shinto" : "assets/osmic/religious/shintoist-14.svg",
+"poi_sikh" : "assets/osmic/religious/sikhist-14.svg",
+"poi_taoist" : "assets/osmic/religious/taoist-14.svg",
+"poi_cinema" : "assets/osmic/amenity/cinema-14.svg",
+"poi_communication" : "",
+"poi_concert" : "",
+"poi_cove" : "",
+"poi_crossing" : "",
+"poi_dam" : "",
+"poi_danger_area" : "danger_16_16.png",
+"poi_danger_sea_wreck" : "",
+"poi_daymark" : "",
+"poi_diving" : "",
+"poi_drinking_water" : "",
+"poi_emergency" : "assets/osmic/emergency/emergency-phone-14.svg",
+"poi_fair" : "",
+"poi_firebrigade" : "assets/osmic/emergency/fire-station-14.svg",
+"poi_fish" : "",
+"poi_forbidden_area" : "",
+"poi_shop_bicycle" : "assets/osmic/shop/bicycle-14.svg",
+"poi_shop_gps" : "",
+"poi_golf" : "",
+"poi_government_building" : "assets/osmic/administration/government-14.svg",
+"poi_height" : "",
+"poi_heliport" : "",
+"poi_hotspring" : "",
+"poi_icesport" : "",
+"poi_information" : "assets/osmic/tourism/information-14.svg",
+"poi_justice" : "",
+"poi_landmark" : "",
+"poi_levee" : "",
+"poi_level_crossing" : "",
+"poi_library" : "assets/osmic/amenity/library-14.svg",
+"poi_locale" : "",
+"poi_loudspeaker" : "",
+"poi_mall" : "",
+"poi_manmade_feature" : "",
+"poi_marine" : "",
+"poi_marine_type" : "",
+"poi_mark" : "",
+"poi_military" : "",
+"poi_mine" : "",
+"poi_nondangerous" : "",
+"poi_oil_field" : "",
+"poi_peak" : "",
+"poi_personal_service" : "",
+"poi_pharmacy" : "assets/osmic/health/pharmacy-14.svg",
+"poi_post_office,poi_post_box" : "assets/osmic/amenity/post-office-14.svg",
+"poi_public_office" : "",
+"poi_repair_service" : "",
+"poi_resort" : "",
+"poi_restaurant" : "assets/osmic/eat-drink/restaurant-14.svg",
+"poi_restricted_area" : "",
+"poi_restroom" : "assets/osmic/amenity/toilets-14.svg",
+"poi_sailing" : "",
+"poi_scenic_area" : "",
+"poi_school" : "",
+"poi_service" : "",
+"poi_shop_apparel" : "assets/osmic/shop/clothes-14.svg",
+"poi_shop_computer" : "assets/osmic/shop/computer-14.svg",
+"poi_shop_department" : "assets/osmic/shop/supermarket-14.svg",
+"poi_shop_furniture" : "assets/osmic/shop/furniture-14.svg",
+"poi_shop_grocery" : "assets/osmic/shop/convenience-14.svg",
+"poi_shop_handg" : "assets/osmic/shop/doityourself-14.svg",
+"poi_shop_merchandise" : "assets/osmic/shop/computer-14.svg",
+"poi_shop_retail" : "assets/osmic/shop/supermarket-14.svg",
+"poi_shower" : "",
+"poi_skiing" : "",
+"poi_social_service" : "",
+"poi_sounding" : "",
+"poi_sport" : "",
+"poi_stadium" : "",
+"poi_swimming" : "assets/osmic/sports/swimming-14.svg",
+"poi_telephone" : "",
+"poi_theater" : "",
+"poi_tide" : "",
+"poi_tower" : "",
+"poi_townhall" : "assets/osmic/administration/town-hall-14.svg",
+"poi_trail" : "",
+"poi_truck_stop" : "",
+"poi_tunnel" : "",
+"poi_wine" : "",
+"poi_worship" : "assets/osmic/religious/place-of-worship-14.svg",
+"poi_wrecker" : "",
+"poi_zoo" : "",
+"poi_picnic" : "",
+"poi_playground" : "assets/osmic/amenity/playground-14.svg",
+"poi_gc_multi" : "",
+"poi_gc_tradi" : "",
+"poi_gc_event" : "",
+"poi_gc_mystery" : "",
+"poi_gc_question" : "",
+"poi_gc_stages" : "",
+"poi_gc_reference" : "",
+"poi_gc_webcam" : "",
+"traffic_signals" : "",
+"poi_wifi" : "",
+"poi_taxi" : "assets/osmic/transport/taxi-14.svg",
+"poi_bench" : "assets/osmic/outdoor/bench-14.svg",
+"poi_biergarten" : "assets/osmic/eat-drink/biergarten-14.svg",
+"poi_boundary_stone" : "",
+"poi_castle" : "assets/osmic/tourism/castle-palace-14.svg",
+"poi_ruins" : "",
+"poi_hunting_stand" : "assets/osmic/outdoor/hunting-stand-14.svg",
+"poi_memorial" : "assets/osmic/tourism/memorial-14.svg",
+"poi_monument" : "assets/osmic/tourism/monument-14.svg",
+"poi_shelter" : "assets/osmic/tourism/shelter-14.svg",
+"poi_fountain" : "assets/osmic/outdoor/fountain-14.svg",
+"poi_potable_water" : "assets/osmic/outdoor/drinking-water-14.svg",
+"poi_toilets" : "assets/osmic/amenity/toilets-14.svg",
+"poi_viewpoint" : "",
+"tec_common" : "",
+"vehicle" : "",
+"vehicle_pedestrian" : "gui_vehicle_pedestrian_16_16.png"
+} \ No newline at end of file
diff --git a/navit/navit_shipped.xml b/navit/navit_shipped.xml
index 5473349c7..9c0364498 100644
--- a/navit/navit_shipped.xml
+++ b/navit/navit_shipped.xml
@@ -19,6 +19,8 @@
<debug name="global" dbg_level="error"/>
<!-- Example of setting the debug level for a single function. -->
<debug name="navit:do_draw" dbg_level="error"/>
+ <debug name="navit" dbg_level="warning"/>
+
<!-- Example for logging timing/profiling information. Note the prefix "profile:".
<debug name="profile:navit:do_draw" dbg_level="debug"/>
-->
@@ -27,6 +29,9 @@
<!-- timestamps 0/1 - prefix log messages with a timestamp -->
<debug name="timestamps" level="0"/>
+ <!-- <debug name="gui_qt5_qml" dbg_level="debug"/> -->
+ <!-- <debug name="graphics_qt5" dbg_level="debug"/> -->
+ <!-- <debug name="event_qt5" dbg_level="debug"/> -->
<!--
center= defines which map location Navit will show after first start.
It will only be used for the first start; subsequent starts will remember the
@@ -35,14 +40,12 @@
For other formats see http://wiki.navit-project.org/index.php/Coordinate_format.
-->
<navit center="11.5666 48.1333" zoom="256" tracking="1" orientation="-1" recent_dest="250" drag_bitmap="0" default_layout="Car">
- <!-- Use one of gtk_drawing_area, qt_qpainter or sdl. On windows systems, use win32 -->
- <graphics type="gtk_drawing_area"/>
<!--
The following line let you select which graphical user interface you'd like to use.
Options include internal (optimized for touch screen devices), gtk (useful for desktop computers).
If you don't like the internal gui, set enabled=yes for the following tag and enabled=no for the gui internal tag
-->
- <gui type="gtk" enabled="no" menubar="1" toolbar="1" statusbar="1"/>
+ <graphics type="qt5"/>
<!--
In case of the internal GUI, you can even influence the size of the text and of the icons in the toolbar and the viewport.
Here's an example for a freerunner:
@@ -53,7 +56,8 @@
The action that appears on map click is configurable with the attribute "on_map_click".
To get the previous behaviour of showing the map point menu use on_map_click='menu("#Map Point")'
-->
- <gui type="internal" enabled="yes"><![CDATA[
+ <gui type="qt5_qml" enabled="yes" />
+ <gui type="internal" enabled="no"><![CDATA[
<html>
<a name='Main Menu'><text>Main menu</text>
<a href='#Actions'><img src='gui_actions'>Actions</img></a>
@@ -189,7 +193,7 @@ Waypoint</text></img>
<traffic type="null"/>
<!-- Vehicle with GPS enabled for gpsd on unix -->
- <vehicle name="Local GPS" profilename="car" enabled="yes" active="1" source="gpsd://localhost" gpsd_query="w+xj">
+ <vehicle name="Local GPS" profilename="car" enabled="no" source="gpsd://localhost" gpsd_query="w+xj">
<!-- Vehicle with GPS enabled for direct communication on windows. Remove the line above if you use this. -->
<!-- <vehicle name="Local GPS" profilename="car" follow="1" enabled="yes" active="1"
source="serial:COM4 baudrate=4800 parity=N data=8 stop=1" > -->
@@ -201,7 +205,7 @@ Waypoint</text></img>
<!-- For SDL, you should add follow="1" to have the view centered on your position -->
<!-- <vehicle name="Meins" enabled="yes" source="gpsd://localhost" color="#0000ff" follow="1"/> -->
- <vehicle name="Demo" profilename="car" enabled="no" source="demo://"/>
+ <vehicle name="Demo" profilename="car" enabled="yes" active="1" source="demo://"/>
<!-- For the cumulative displacement filter to be enabled, set cdf_histsize="x" here, with x being an integer somewhere around 4 -->
<tracking cdf_histsize="0"/>
diff --git a/navit/route.c b/navit/route.c
index 858e51406..94717d007 100644
--- a/navit/route.c
+++ b/navit/route.c
@@ -1117,8 +1117,8 @@ void route_set_destinations(struct route *this, struct pcoord *dst, int count, i
this->reached_destinations_count=0;
route_status.u.num=route_status_no_destination;
}
- callback_list_call_attr_1(this->cbl2, attr_destination, this);
route_set_attr(this, &route_status);
+ callback_list_call_attr_1(this->cbl2, attr_destination, this);
profile(1,"find_nearest_street");
/* The graph has to be destroyed and set to NULL, otherwise route_path_update() doesn't work */
diff --git a/navit/start_real.c b/navit/start_real.c
index a29d558bf..53542abac 100644
--- a/navit/start_real.c
+++ b/navit/start_real.c
@@ -148,10 +148,10 @@ int main_real(int argc, char * const* argv) {
print_usage();
exit(2);
break;
- case '?':
- fprintf(stderr, "navit: Error - No such option: `%c'\n", optopt);
- print_usage();
- exit(3);
+// case '?':
+// fprintf(stderr, "navit: Error - No such option: `%c'\n", optopt);
+// print_usage();
+// exit(3);
#endif
}
}