Compare commits
46 Commits
Author | SHA1 | Date | |
---|---|---|---|
86cc30433c | |||
a41e89053d | |||
63335aa004 | |||
3243179b32 | |||
b04388f776 | |||
53e960fabe | |||
c56e6c14d1 | |||
b4cc88446a | |||
2860530d3c | |||
863aa3f542 | |||
fa0a380839 | |||
03d5745da9 | |||
52cf7c4278 | |||
5c86fc4103 | |||
3ad8c58911 | |||
ce5a3be7ca | |||
83e6772de2 | |||
db0df92933 | |||
a3bc48c5d3 | |||
537b1c3716 | |||
561fadb4f2 | |||
a39f2bc2a9 | |||
ebb690673c | |||
7ee9ea0fa4 | |||
e10808fc7c | |||
255f4ca63c | |||
d2a65b4cb1 | |||
3a046af6b6 | |||
d8be4f8951 | |||
ee09b2e667 | |||
2811d7b2a3 | |||
811f5f869a | |||
d574710bf6 | |||
1e6d9efb3b | |||
74b6fbeba4 | |||
82b7fced53 | |||
3b6894814c | |||
3de0ed055a | |||
d4ad939978 | |||
06e1685f85 | |||
1b419c99f5 | |||
f2d32b30d3 | |||
56013c01fd | |||
e0e1cff13e | |||
b7f2eeab3b | |||
de3ea4e292 |
@ -1,4 +1,4 @@
|
|||||||
version: 7.8.{build}
|
version: 7.10.{build}
|
||||||
configuration: Release
|
configuration: Release
|
||||||
platform: Any CPU
|
platform: Any CPU
|
||||||
environment:
|
environment:
|
||||||
|
@ -3,7 +3,7 @@ GPXSee is a Qt-based GPS log file viewer and analyzer that supports all common G
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
* Opens GPX, TCX, FIT, KML, IGC, NMEA, SLF, LOC, GeoJSON, OziExplorer (PLT, RTE, WPT), Garmin CSV and geotagged JPEG files.
|
* Opens GPX, TCX, FIT, KML, IGC, NMEA, SLF, LOC, GeoJSON, OziExplorer (PLT, RTE, WPT), Garmin CSV and geotagged JPEG files.
|
||||||
* User-definable online maps (OpenStreetMap/Google tiles, WMTS, WMS, TMS).
|
* User-definable online maps (OpenStreetMap/Google tiles, WMTS, WMS, TMS, QuadTiles).
|
||||||
* Offline maps (MBTiles, OziExplorer maps, TrekBuddy maps/atlases, Garmin IMG & JNX maps, TwoNav RMaps, GeoTIFF images).
|
* Offline maps (MBTiles, OziExplorer maps, TrekBuddy maps/atlases, Garmin IMG & JNX maps, TwoNav RMaps, GeoTIFF images).
|
||||||
* Elevation, speed, heart rate, cadence, power, temperature and gear ratio/shifts graphs.
|
* Elevation, speed, heart rate, cadence, power, temperature and gear ratio/shifts graphs.
|
||||||
* Support for DEM files (SRTM HGT).
|
* Support for DEM files (SRTM HGT).
|
||||||
|
@ -3,7 +3,7 @@ unix:!macx {
|
|||||||
} else {
|
} else {
|
||||||
TARGET = GPXSee
|
TARGET = GPXSee
|
||||||
}
|
}
|
||||||
VERSION = 7.8
|
VERSION = 7.10
|
||||||
|
|
||||||
QT += core \
|
QT += core \
|
||||||
gui \
|
gui \
|
||||||
@ -179,7 +179,9 @@ HEADERS += src/common/config.h \
|
|||||||
src/map/IMG/style.h \
|
src/map/IMG/style.h \
|
||||||
src/map/IMG/netfile.h \
|
src/map/IMG/netfile.h \
|
||||||
src/GUI/limitedcombobox.h \
|
src/GUI/limitedcombobox.h \
|
||||||
src/GUI/pathtickitem.h
|
src/GUI/pathtickitem.h \
|
||||||
|
src/map/IMG/textitem.h \
|
||||||
|
src/map/IMG/label.h
|
||||||
SOURCES += src/main.cpp \
|
SOURCES += src/main.cpp \
|
||||||
src/common/coordinates.cpp \
|
src/common/coordinates.cpp \
|
||||||
src/common/rectc.cpp \
|
src/common/rectc.cpp \
|
||||||
@ -309,7 +311,8 @@ SOURCES += src/main.cpp \
|
|||||||
src/map/IMG/vectortile.cpp \
|
src/map/IMG/vectortile.cpp \
|
||||||
src/map/IMG/style.cpp \
|
src/map/IMG/style.cpp \
|
||||||
src/map/IMG/netfile.cpp \
|
src/map/IMG/netfile.cpp \
|
||||||
src/GUI/pathtickitem.cpp
|
src/GUI/pathtickitem.cpp \
|
||||||
|
src/map/IMG/textitem.cpp
|
||||||
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||||
HEADERS += src/data/geojsonparser.h
|
HEADERS += src/data/geojsonparser.h
|
||||||
|
79
gpxsee.qrc
@ -1,5 +1,6 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
|
<!-- GUI -->
|
||||||
<file alias="gpxsee.png">icons/gpxsee.png</file>
|
<file alias="gpxsee.png">icons/gpxsee.png</file>
|
||||||
<file alias="gpxsee@2x.png">icons/gpxsee@2x.png</file>
|
<file alias="gpxsee@2x.png">icons/gpxsee@2x.png</file>
|
||||||
<file alias="dialog-close.png">icons/GUI/dialog-close.png</file>
|
<file alias="dialog-close.png">icons/GUI/dialog-close.png</file>
|
||||||
@ -42,5 +43,83 @@
|
|||||||
<file alias="view-filter@2x.png">icons/GUI/view-filter@2x.png</file>
|
<file alias="view-filter@2x.png">icons/GUI/view-filter@2x.png</file>
|
||||||
<file alias="applications-internet_32.png">icons/GUI/applications-internet_32.png</file>
|
<file alias="applications-internet_32.png">icons/GUI/applications-internet_32.png</file>
|
||||||
<file alias="applications-internet_32@2x.png">icons/GUI/applications-internet_32@2x.png</file>
|
<file alias="applications-internet_32@2x.png">icons/GUI/applications-internet_32@2x.png</file>
|
||||||
|
|
||||||
|
<!-- POI -->
|
||||||
|
<file alias="airfield-11.png">icons/POI/airfield-11.png</file>
|
||||||
|
<file alias="airport-11.png">icons/POI/airport-11.png</file>
|
||||||
|
<file alias="amusement-park-11.png">icons/POI/amusement-park-11.png</file>
|
||||||
|
<file alias="bakery-11.png">icons/POI/bakery-11.png</file>
|
||||||
|
<file alias="bank-11.png">icons/POI/bank-11.png</file>
|
||||||
|
<file alias="bar-11.png">icons/POI/bar-11.png</file>
|
||||||
|
<file alias="bbq-11.png">icons/POI/bbq-11.png</file>
|
||||||
|
<file alias="beach-11.png">icons/POI/beach-11.png</file>
|
||||||
|
<file alias="bowling-alley-11.png">icons/POI/bowling-alley-11.png</file>
|
||||||
|
<file alias="building-alt1-11.png">icons/POI/building-alt1-11.png</file>
|
||||||
|
<file alias="bridge-11.png">icons/POI/bridge-11.png</file>
|
||||||
|
<file alias="bus-11.png">icons/POI/bus-11.png</file>
|
||||||
|
<file alias="cafe-11.png">icons/POI/cafe-11.png</file>
|
||||||
|
<file alias="campsite-11.png">icons/POI/campsite-11.png</file>
|
||||||
|
<file alias="car-11.png">icons/POI/car-11.png</file>
|
||||||
|
<file alias="car-rental-11.png">icons/POI/car-rental-11.png</file>
|
||||||
|
<file alias="car-repair-11.png">icons/POI/car-repair-11.png</file>
|
||||||
|
<file alias="casino-11.png">icons/POI/casino-11.png</file>
|
||||||
|
<file alias="cemetery-11.png">icons/POI/cemetery-11.png</file>
|
||||||
|
<file alias="cinema-11.png">icons/POI/cinema-11.png</file>
|
||||||
|
<file alias="clothing-store-11.png">icons/POI/clothing-store-11.png</file>
|
||||||
|
<file alias="communications-tower-11.png">icons/POI/communications-tower-11.png</file>
|
||||||
|
<file alias="dam-11.png">icons/POI/dam-11.png</file>
|
||||||
|
<file alias="danger-11.png">icons/POI/danger-11.png</file>
|
||||||
|
<file alias="drinking-water-11.png">icons/POI/drinking-water-11.png</file>
|
||||||
|
<file alias="fast-food-11.png">icons/POI/fast-food-11.png</file>
|
||||||
|
<file alias="fire-station-11.png">icons/POI/fire-station-11.png</file>
|
||||||
|
<file alias="fitness-centre-11.png">icons/POI/fitness-centre-11.png</file>
|
||||||
|
<file alias="fuel-11.png">icons/POI/fuel-11.png</file>
|
||||||
|
<file alias="furniture-11.png">icons/POI/furniture-11.png</file>
|
||||||
|
<file alias="garden-11.png">icons/POI/garden-11.png</file>
|
||||||
|
<file alias="garden-centre-11.png">icons/POI/garden-centre-11.png</file>
|
||||||
|
<file alias="golf-11.png">icons/POI/golf-11.png</file>
|
||||||
|
<file alias="grocery-11.png">icons/POI/grocery-11.png</file>
|
||||||
|
<file alias="hairdresser-11.png">icons/POI/hairdresser-11.png</file>
|
||||||
|
<file alias="harbor-11.png">icons/POI/harbor-11.png</file>
|
||||||
|
<file alias="hardware-11.png">icons/POI/hardware-11.png</file>
|
||||||
|
<file alias="heliport-11.png">icons/POI/heliport-11.png</file>
|
||||||
|
<file alias="hospital-11.png">icons/POI/hospital-11.png</file>
|
||||||
|
<file alias="information-11.png">icons/POI/information-11.png</file>
|
||||||
|
<file alias="landmark-11.png">icons/POI/landmark-11.png</file>
|
||||||
|
<file alias="library-11.png">icons/POI/library-11.png</file>
|
||||||
|
<file alias="lodging-11.png">icons/POI/lodging-11.png</file>
|
||||||
|
<file alias="mountain-11.png">icons/POI/mountain-11.png</file>
|
||||||
|
<file alias="museum-11.png">icons/POI/museum-11.png</file>
|
||||||
|
<file alias="park-11.png">icons/POI/park-11.png</file>
|
||||||
|
<file alias="parking-11.png">icons/POI/parking-11.png</file>
|
||||||
|
<file alias="pharmacy-11.png">icons/POI/pharmacy-11.png</file>
|
||||||
|
<file alias="picnic-site-11.png">icons/POI/picnic-site-11.png</file>
|
||||||
|
<file alias="place-of-worship-11.png">icons/POI/place-of-worship-11.png</file>
|
||||||
|
<file alias="police-11.png">icons/POI/police-11.png</file>
|
||||||
|
<file alias="post-11.png">icons/POI/post-11.png</file>
|
||||||
|
<file alias="prison-11.png">icons/POI/prison-11.png</file>
|
||||||
|
<file alias="religious-christian-11.png">icons/POI/religious-christian-11.png</file>
|
||||||
|
<file alias="religious-jewish-11.png">icons/POI/religious-jewish-11.png</file>
|
||||||
|
<file alias="religious-muslim-11.png">icons/POI/religious-muslim-11.png</file>
|
||||||
|
<file alias="restaurant-11.png">icons/POI/restaurant-11.png</file>
|
||||||
|
<file alias="restaurant-noodle-11.png">icons/POI/restaurant-noodle-11.png</file>
|
||||||
|
<file alias="restaurant-pizza-11.png">icons/POI/restaurant-pizza-11.png</file>
|
||||||
|
<file alias="restaurant-seafood-11.png">icons/POI/restaurant-seafood-11.png</file>
|
||||||
|
<file alias="roadblock-11.png">icons/POI/roadblock-11.png</file>
|
||||||
|
<file alias="school-11.png">icons/POI/school-11.png</file>
|
||||||
|
<file alias="shelter-11.png">icons/POI/shelter-11.png</file>
|
||||||
|
<file alias="shop-11.png">icons/POI/shop-11.png</file>
|
||||||
|
<file alias="skiing-11.png">icons/POI/skiing-11.png</file>
|
||||||
|
<file alias="soccer-11.png">icons/POI/soccer-11.png</file>
|
||||||
|
<file alias="swimming-11.png">icons/POI/swimming-11.png</file>
|
||||||
|
<file alias="theatre-11.png">icons/POI/theatre-11.png</file>
|
||||||
|
<file alias="telephone-11.png">icons/POI/telephone-11.png</file>
|
||||||
|
<file alias="toilet-11.png">icons/POI/toilet-11.png</file>
|
||||||
|
<file alias="town-hall-11.png">icons/POI/town-hall-11.png</file>
|
||||||
|
<file alias="viewpoint-11.png">icons/POI/viewpoint-11.png</file>
|
||||||
|
<file alias="village-11.png">icons/POI/village-11.png</file>
|
||||||
|
<file alias="waterfall-11.png">icons/POI/waterfall-11.png</file>
|
||||||
|
<file alias="wetland-11.png">icons/POI/wetland-11.png</file>
|
||||||
|
<file alias="zoo-11.png">icons/POI/zoo-11.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
BIN
icons/POI/airfield-11.png
Normal file
After Width: | Height: | Size: 380 B |
BIN
icons/POI/airport-11.png
Normal file
After Width: | Height: | Size: 402 B |
BIN
icons/POI/amusement-park-11.png
Normal file
After Width: | Height: | Size: 428 B |
BIN
icons/POI/bakery-11.png
Normal file
After Width: | Height: | Size: 383 B |
BIN
icons/POI/bank-11.png
Normal file
After Width: | Height: | Size: 363 B |
BIN
icons/POI/bar-11.png
Normal file
After Width: | Height: | Size: 374 B |
BIN
icons/POI/bbq-11.png
Normal file
After Width: | Height: | Size: 393 B |
BIN
icons/POI/beach-11.png
Normal file
After Width: | Height: | Size: 395 B |
BIN
icons/POI/bowling-alley-11.png
Normal file
After Width: | Height: | Size: 386 B |
BIN
icons/POI/bridge-11.png
Normal file
After Width: | Height: | Size: 365 B |
BIN
icons/POI/building-alt1-11.png
Normal file
After Width: | Height: | Size: 343 B |
BIN
icons/POI/bus-11.png
Normal file
After Width: | Height: | Size: 378 B |
BIN
icons/POI/cafe-11.png
Normal file
After Width: | Height: | Size: 351 B |
BIN
icons/POI/campsite-11.png
Normal file
After Width: | Height: | Size: 366 B |
BIN
icons/POI/car-11.png
Normal file
After Width: | Height: | Size: 368 B |
BIN
icons/POI/car-rental-11.png
Normal file
After Width: | Height: | Size: 390 B |
BIN
icons/POI/car-repair-11.png
Normal file
After Width: | Height: | Size: 381 B |
BIN
icons/POI/casino-11.png
Normal file
After Width: | Height: | Size: 369 B |
BIN
icons/POI/cemetery-11.png
Normal file
After Width: | Height: | Size: 357 B |
BIN
icons/POI/cinema-11.png
Normal file
After Width: | Height: | Size: 356 B |
BIN
icons/POI/clothing-store-11.png
Normal file
After Width: | Height: | Size: 351 B |
BIN
icons/POI/communications-tower-11.png
Normal file
After Width: | Height: | Size: 402 B |
BIN
icons/POI/dam-11.png
Normal file
After Width: | Height: | Size: 376 B |
BIN
icons/POI/danger-11.png
Normal file
After Width: | Height: | Size: 421 B |
BIN
icons/POI/drinking-water-11.png
Normal file
After Width: | Height: | Size: 367 B |
BIN
icons/POI/fast-food-11.png
Normal file
After Width: | Height: | Size: 344 B |
BIN
icons/POI/fire-station-11.png
Normal file
After Width: | Height: | Size: 403 B |
BIN
icons/POI/fitness-centre-11.png
Normal file
After Width: | Height: | Size: 326 B |
BIN
icons/POI/fuel-11.png
Normal file
After Width: | Height: | Size: 377 B |
BIN
icons/POI/furniture-11.png
Normal file
After Width: | Height: | Size: 348 B |
BIN
icons/POI/garden-11.png
Normal file
After Width: | Height: | Size: 402 B |
BIN
icons/POI/garden-centre-11.png
Normal file
After Width: | Height: | Size: 352 B |
BIN
icons/POI/golf-11.png
Normal file
After Width: | Height: | Size: 394 B |
BIN
icons/POI/grocery-11.png
Normal file
After Width: | Height: | Size: 355 B |
BIN
icons/POI/hairdresser-11.png
Normal file
After Width: | Height: | Size: 380 B |
BIN
icons/POI/harbor-11.png
Normal file
After Width: | Height: | Size: 404 B |
BIN
icons/POI/hardware-11.png
Normal file
After Width: | Height: | Size: 366 B |
BIN
icons/POI/heliport-11.png
Normal file
After Width: | Height: | Size: 390 B |
BIN
icons/POI/hospital-11.png
Normal file
After Width: | Height: | Size: 326 B |
BIN
icons/POI/information-11.png
Normal file
After Width: | Height: | Size: 359 B |
BIN
icons/POI/landmark-11.png
Normal file
After Width: | Height: | Size: 341 B |
BIN
icons/POI/library-11.png
Normal file
After Width: | Height: | Size: 410 B |
126
icons/POI/licence.txt
Normal file
@ -0,0 +1,126 @@
|
|||||||
|
The POI icons are Mapbox Maki icons (https://labs.mapbox.com/maki-icons/)
|
||||||
|
licensed under CC0.
|
||||||
|
|
||||||
|
-----
|
||||||
|
|
||||||
|
Creative Commons Legal Code
|
||||||
|
|
||||||
|
CC0 1.0 Universal
|
||||||
|
|
||||||
|
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||||
|
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
||||||
|
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||||
|
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||||
|
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
||||||
|
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
||||||
|
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
||||||
|
HEREUNDER.
|
||||||
|
|
||||||
|
Statement of Purpose
|
||||||
|
|
||||||
|
The laws of most jurisdictions throughout the world automatically confer
|
||||||
|
exclusive Copyright and Related Rights (defined below) upon the creator
|
||||||
|
and subsequent owner(s) (each and all, an "owner") of an original work of
|
||||||
|
authorship and/or a database (each, a "Work").
|
||||||
|
|
||||||
|
Certain owners wish to permanently relinquish those rights to a Work for
|
||||||
|
the purpose of contributing to a commons of creative, cultural and
|
||||||
|
scientific works ("Commons") that the public can reliably and without fear
|
||||||
|
of later claims of infringement build upon, modify, incorporate in other
|
||||||
|
works, reuse and redistribute as freely as possible in any form whatsoever
|
||||||
|
and for any purposes, including without limitation commercial purposes.
|
||||||
|
These owners may contribute to the Commons to promote the ideal of a free
|
||||||
|
culture and the further production of creative, cultural and scientific
|
||||||
|
works, or to gain reputation or greater distribution for their Work in
|
||||||
|
part through the use and efforts of others.
|
||||||
|
|
||||||
|
For these and/or other purposes and motivations, and without any
|
||||||
|
expectation of additional consideration or compensation, the person
|
||||||
|
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
||||||
|
is an owner of Copyright and Related Rights in the Work, voluntarily
|
||||||
|
elects to apply CC0 to the Work and publicly distribute the Work under its
|
||||||
|
terms, with knowledge of his or her Copyright and Related Rights in the
|
||||||
|
Work and the meaning and intended legal effect of CC0 on those rights.
|
||||||
|
|
||||||
|
1. Copyright and Related Rights. A Work made available under CC0 may be
|
||||||
|
protected by copyright and related or neighboring rights ("Copyright and
|
||||||
|
Related Rights"). Copyright and Related Rights include, but are not
|
||||||
|
limited to, the following:
|
||||||
|
|
||||||
|
i. the right to reproduce, adapt, distribute, perform, display,
|
||||||
|
communicate, and translate a Work;
|
||||||
|
ii. moral rights retained by the original author(s) and/or performer(s);
|
||||||
|
iii. publicity and privacy rights pertaining to a person's image or
|
||||||
|
likeness depicted in a Work;
|
||||||
|
iv. rights protecting against unfair competition in regards to a Work,
|
||||||
|
subject to the limitations in paragraph 4(a), below;
|
||||||
|
v. rights protecting the extraction, dissemination, use and reuse of data
|
||||||
|
in a Work;
|
||||||
|
vi. database rights (such as those arising under Directive 96/9/EC of the
|
||||||
|
European Parliament and of the Council of 11 March 1996 on the legal
|
||||||
|
protection of databases, and under any national implementation
|
||||||
|
thereof, including any amended or successor version of such
|
||||||
|
directive); and
|
||||||
|
vii. other similar, equivalent or corresponding rights throughout the
|
||||||
|
world based on applicable law or treaty, and any national
|
||||||
|
implementations thereof.
|
||||||
|
|
||||||
|
2. Waiver. To the greatest extent permitted by, but not in contravention
|
||||||
|
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
||||||
|
irrevocably and unconditionally waives, abandons, and surrenders all of
|
||||||
|
Affirmer's Copyright and Related Rights and associated claims and causes
|
||||||
|
of action, whether now known or unknown (including existing as well as
|
||||||
|
future claims and causes of action), in the Work (i) in all territories
|
||||||
|
worldwide, (ii) for the maximum duration provided by applicable law or
|
||||||
|
treaty (including future time extensions), (iii) in any current or future
|
||||||
|
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
||||||
|
including without limitation commercial, advertising or promotional
|
||||||
|
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
||||||
|
member of the public at large and to the detriment of Affirmer's heirs and
|
||||||
|
successors, fully intending that such Waiver shall not be subject to
|
||||||
|
revocation, rescission, cancellation, termination, or any other legal or
|
||||||
|
equitable action to disrupt the quiet enjoyment of the Work by the public
|
||||||
|
as contemplated by Affirmer's express Statement of Purpose.
|
||||||
|
|
||||||
|
3. Public License Fallback. Should any part of the Waiver for any reason
|
||||||
|
be judged legally invalid or ineffective under applicable law, then the
|
||||||
|
Waiver shall be preserved to the maximum extent permitted taking into
|
||||||
|
account Affirmer's express Statement of Purpose. In addition, to the
|
||||||
|
extent the Waiver is so judged Affirmer hereby grants to each affected
|
||||||
|
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
||||||
|
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
||||||
|
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
||||||
|
maximum duration provided by applicable law or treaty (including future
|
||||||
|
time extensions), (iii) in any current or future medium and for any number
|
||||||
|
of copies, and (iv) for any purpose whatsoever, including without
|
||||||
|
limitation commercial, advertising or promotional purposes (the
|
||||||
|
"License"). The License shall be deemed effective as of the date CC0 was
|
||||||
|
applied by Affirmer to the Work. Should any part of the License for any
|
||||||
|
reason be judged legally invalid or ineffective under applicable law, such
|
||||||
|
partial invalidity or ineffectiveness shall not invalidate the remainder
|
||||||
|
of the License, and in such case Affirmer hereby affirms that he or she
|
||||||
|
will not (i) exercise any of his or her remaining Copyright and Related
|
||||||
|
Rights in the Work or (ii) assert any associated claims and causes of
|
||||||
|
action with respect to the Work, in either case contrary to Affirmer's
|
||||||
|
express Statement of Purpose.
|
||||||
|
|
||||||
|
4. Limitations and Disclaimers.
|
||||||
|
|
||||||
|
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
||||||
|
surrendered, licensed or otherwise affected by this document.
|
||||||
|
b. Affirmer offers the Work as-is and makes no representations or
|
||||||
|
warranties of any kind concerning the Work, express, implied,
|
||||||
|
statutory or otherwise, including without limitation warranties of
|
||||||
|
title, merchantability, fitness for a particular purpose, non
|
||||||
|
infringement, or the absence of latent or other defects, accuracy, or
|
||||||
|
the present or absence of errors, whether or not discoverable, all to
|
||||||
|
the greatest extent permissible under applicable law.
|
||||||
|
c. Affirmer disclaims responsibility for clearing rights of other persons
|
||||||
|
that may apply to the Work or any use thereof, including without
|
||||||
|
limitation any person's Copyright and Related Rights in the Work.
|
||||||
|
Further, Affirmer disclaims responsibility for obtaining any necessary
|
||||||
|
consents, permissions or other rights required for any use of the
|
||||||
|
Work.
|
||||||
|
d. Affirmer understands and acknowledges that Creative Commons is not a
|
||||||
|
party to this document and has no duty or obligation with respect to
|
||||||
|
this CC0 or use of the Work.
|
BIN
icons/POI/lodging-11.png
Normal file
After Width: | Height: | Size: 345 B |
BIN
icons/POI/mountain-11.png
Normal file
After Width: | Height: | Size: 384 B |
BIN
icons/POI/museum-11.png
Normal file
After Width: | Height: | Size: 366 B |
BIN
icons/POI/park-11.png
Normal file
After Width: | Height: | Size: 399 B |
BIN
icons/POI/parking-11.png
Normal file
After Width: | Height: | Size: 369 B |
BIN
icons/POI/pharmacy-11.png
Normal file
After Width: | Height: | Size: 364 B |
BIN
icons/POI/picnic-site-11.png
Normal file
After Width: | Height: | Size: 377 B |
BIN
icons/POI/place-of-worship-11.png
Normal file
After Width: | Height: | Size: 344 B |
BIN
icons/POI/police-11.png
Normal file
After Width: | Height: | Size: 394 B |
BIN
icons/POI/post-11.png
Normal file
After Width: | Height: | Size: 365 B |
BIN
icons/POI/prison-11.png
Normal file
After Width: | Height: | Size: 323 B |
BIN
icons/POI/religious-christian-11.png
Normal file
After Width: | Height: | Size: 311 B |
BIN
icons/POI/religious-jewish-11.png
Normal file
After Width: | Height: | Size: 359 B |
BIN
icons/POI/religious-muslim-11.png
Normal file
After Width: | Height: | Size: 401 B |
BIN
icons/POI/restaurant-11.png
Normal file
After Width: | Height: | Size: 361 B |
BIN
icons/POI/restaurant-noodle-11.png
Normal file
After Width: | Height: | Size: 396 B |
BIN
icons/POI/restaurant-pizza-11.png
Normal file
After Width: | Height: | Size: 396 B |
BIN
icons/POI/restaurant-seafood-11.png
Normal file
After Width: | Height: | Size: 407 B |
BIN
icons/POI/roadblock-11.png
Normal file
After Width: | Height: | Size: 383 B |
BIN
icons/POI/school-11.png
Normal file
After Width: | Height: | Size: 333 B |
BIN
icons/POI/shelter-11.png
Normal file
After Width: | Height: | Size: 325 B |
BIN
icons/POI/shop-11.png
Normal file
After Width: | Height: | Size: 381 B |
BIN
icons/POI/skiing-11.png
Normal file
After Width: | Height: | Size: 399 B |
BIN
icons/POI/soccer-11.png
Normal file
After Width: | Height: | Size: 397 B |
BIN
icons/POI/swimming-11.png
Normal file
After Width: | Height: | Size: 404 B |
BIN
icons/POI/telephone-11.png
Normal file
After Width: | Height: | Size: 377 B |
BIN
icons/POI/theatre-11.png
Normal file
After Width: | Height: | Size: 428 B |
BIN
icons/POI/toilet-11.png
Normal file
After Width: | Height: | Size: 407 B |
BIN
icons/POI/town-hall-11.png
Normal file
After Width: | Height: | Size: 348 B |
BIN
icons/POI/viewpoint-11.png
Normal file
After Width: | Height: | Size: 383 B |
BIN
icons/POI/village-11.png
Normal file
After Width: | Height: | Size: 373 B |
BIN
icons/POI/waterfall-11.png
Normal file
After Width: | Height: | Size: 392 B |
BIN
icons/POI/wetland-11.png
Normal file
After Width: | Height: | Size: 427 B |
BIN
icons/POI/zoo-11.png
Normal file
After Width: | Height: | Size: 382 B |
@ -479,7 +479,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="352"/>
|
<location filename="../src/GUI/gui.cpp" line="352"/>
|
||||||
<source>km/mi markers</source>
|
<source>km/mi markers</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Bornes kilométriques ou milliaires</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="359"/>
|
<location filename="../src/GUI/gui.cpp" line="359"/>
|
||||||
@ -606,7 +606,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="670"/>
|
<location filename="../src/GUI/gui.cpp" line="670"/>
|
||||||
<source>GPXSee is distributed under the terms of the GNU General Public License version 3. For more info about GPXSee visit the project homepage at %1.</source>
|
<source>GPXSee is distributed under the terms of the GNU General Public License version 3. For more info about GPXSee visit the project homepage at %1.</source>
|
||||||
<translation>GPXSee est distribué selon les termes de la licence publique générale GNU (version 3). Pour plus d'information sur GPXSee, visiter le site du projet sur %1.</translation>
|
<translation>GPXSee est distribué selon les termes de la licence publique générale GNU (version 3). Pour plus d'information sur GPXSee, visiter le site du projet %1.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="697"/>
|
<location filename="../src/GUI/gui.cpp" line="697"/>
|
||||||
@ -666,7 +666,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="733"/>
|
<location filename="../src/GUI/gui.cpp" line="733"/>
|
||||||
<source>Styles directory:</source>
|
<source>Styles directory:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Dossier de styles :</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="1037"/>
|
<location filename="../src/GUI/gui.cpp" line="1037"/>
|
||||||
@ -1017,7 +1017,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/map/maplist.cpp" line="123"/>
|
<location filename="../src/map/maplist.cpp" line="123"/>
|
||||||
<source>Garmin IMG maps</source>
|
<source>Garmin IMG maps</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Cartes Garmin IMG</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/map/maplist.cpp" line="125"/>
|
<location filename="../src/map/maplist.cpp" line="125"/>
|
||||||
@ -1055,7 +1055,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="168"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="168"/>
|
||||||
<source>Palette shift:</source>
|
<source>Palette shift:</source>
|
||||||
<translation>Décalage de palette :</translation>
|
<translation>Incrément de palette :</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="112"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="112"/>
|
||||||
@ -1349,12 +1349,12 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="72"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="72"/>
|
||||||
<source>Projection:</source>
|
<source>Projection:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Projection :</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="94"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="94"/>
|
||||||
<source>Vector maps</source>
|
<source>Vector maps</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Cartes vectorielles</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/optionsdialog.cpp" line="147"/>
|
<location filename="../src/GUI/optionsdialog.cpp" line="147"/>
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
; The name of the installer
|
; The name of the installer
|
||||||
Name "GPXSee"
|
Name "GPXSee"
|
||||||
; Program version
|
; Program version
|
||||||
!define VERSION "7.8"
|
!define VERSION "7.10"
|
||||||
|
|
||||||
; The file to write
|
; The file to write
|
||||||
OutFile "GPXSee-${VERSION}.exe"
|
OutFile "GPXSee-${VERSION}.exe"
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
; The name of the installer
|
; The name of the installer
|
||||||
Name "GPXSee"
|
Name "GPXSee"
|
||||||
; Program version
|
; Program version
|
||||||
!define VERSION "7.8"
|
!define VERSION "7.10"
|
||||||
|
|
||||||
; The file to write
|
; The file to write
|
||||||
OutFile "GPXSee-${VERSION}_x64.exe"
|
OutFile "GPXSee-${VERSION}_x64.exe"
|
||||||
|
@ -75,8 +75,7 @@ GraphView::~GraphView()
|
|||||||
delete _grid;
|
delete _grid;
|
||||||
delete _message;
|
delete _message;
|
||||||
|
|
||||||
for (int i = 0; i < _graphs.count(); i++)
|
qDeleteAll(_graphs);
|
||||||
delete _graphs[i];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GraphView::createXLabel()
|
void GraphView::createXLabel()
|
||||||
@ -380,9 +379,7 @@ void GraphView::clear()
|
|||||||
_slider->clear();
|
_slider->clear();
|
||||||
_info->clear();
|
_info->clear();
|
||||||
|
|
||||||
for (int i = 0; i < _graphs.count(); i++)
|
qDeleteAll(_graphs);
|
||||||
delete _graphs[i];
|
|
||||||
|
|
||||||
_graphs.clear();
|
_graphs.clear();
|
||||||
_visible.clear();
|
_visible.clear();
|
||||||
_palette.reset();
|
_palette.reset();
|
||||||
|
@ -885,8 +885,7 @@ void GUI::closePOIFiles()
|
|||||||
{
|
{
|
||||||
_poiFilesMenu->clear();
|
_poiFilesMenu->clear();
|
||||||
|
|
||||||
for (int i = 0; i < _poiFilesActions.count(); i++)
|
qDeleteAll(_poiFilesActions);
|
||||||
delete _poiFilesActions[i];
|
|
||||||
_poiFilesActions.clear();
|
_poiFilesActions.clear();
|
||||||
|
|
||||||
_poi->clear();
|
_poi->clear();
|
||||||
@ -2216,6 +2215,8 @@ void GUI::show()
|
|||||||
connect(w, SIGNAL(screenChanged(QScreen*)), this,
|
connect(w, SIGNAL(screenChanged(QScreen*)), this,
|
||||||
SLOT(screenChanged(QScreen*)));
|
SLOT(screenChanged(QScreen*)));
|
||||||
#endif // ENABLE_HIDPI
|
#endif // ENABLE_HIDPI
|
||||||
|
|
||||||
|
_mapView->fitContentToSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GUI::screenChanged(QScreen *screen)
|
void GUI::screenChanged(QScreen *screen)
|
||||||
|
@ -39,6 +39,7 @@ MapView::MapView(Map *map, POI *poi, QWidget *parent)
|
|||||||
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
setRenderHint(QPainter::Antialiasing, true);
|
setRenderHint(QPainter::Antialiasing, true);
|
||||||
|
setResizeAnchor(QGraphicsView::AnchorViewCenter);
|
||||||
setAcceptDrops(false);
|
setAcceptDrops(false);
|
||||||
|
|
||||||
_mapScale = new ScaleItem();
|
_mapScale = new ScaleItem();
|
||||||
@ -901,17 +902,6 @@ void MapView::drawBackground(QPainter *painter, const QRectF &rect)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapView::resizeEvent(QResizeEvent *event)
|
|
||||||
{
|
|
||||||
QGraphicsView::resizeEvent(event);
|
|
||||||
|
|
||||||
int zoom = _map->zoom();
|
|
||||||
if (fitMapZoom() != zoom)
|
|
||||||
rescale();
|
|
||||||
|
|
||||||
centerOn(contentCenter());
|
|
||||||
}
|
|
||||||
|
|
||||||
void MapView::paintEvent(QPaintEvent *event)
|
void MapView::paintEvent(QPaintEvent *event)
|
||||||
{
|
{
|
||||||
QPointF scaleScenePos = mapToScene(rect().bottomRight() + QPoint(
|
QPointF scaleScenePos = mapToScene(rect().bottomRight() + QPoint(
|
||||||
@ -1042,3 +1032,12 @@ void MapView::setProjection(int id)
|
|||||||
rescale();
|
rescale();
|
||||||
centerOn(_map->ll2xy(center));
|
centerOn(_map->ll2xy(center));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MapView::fitContentToSize()
|
||||||
|
{
|
||||||
|
int zoom = _map->zoom();
|
||||||
|
if (fitMapZoom() != zoom)
|
||||||
|
rescale();
|
||||||
|
|
||||||
|
centerOn(contentCenter());
|
||||||
|
}
|
||||||
|
@ -85,6 +85,8 @@ public slots:
|
|||||||
void setDevicePixelRatio(qreal deviceRatio, qreal mapRatio);
|
void setDevicePixelRatio(qreal deviceRatio, qreal mapRatio);
|
||||||
void setProjection(int id);
|
void setProjection(int id);
|
||||||
|
|
||||||
|
void fitContentToSize();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updatePOI();
|
void updatePOI();
|
||||||
void reloadMap();
|
void reloadMap();
|
||||||
@ -111,7 +113,6 @@ private:
|
|||||||
void wheelEvent(QWheelEvent *event);
|
void wheelEvent(QWheelEvent *event);
|
||||||
void keyPressEvent(QKeyEvent *event);
|
void keyPressEvent(QKeyEvent *event);
|
||||||
void drawBackground(QPainter *painter, const QRectF &rect);
|
void drawBackground(QPainter *painter, const QRectF &rect);
|
||||||
void resizeEvent(QResizeEvent *event);
|
|
||||||
void paintEvent(QPaintEvent *event);
|
void paintEvent(QPaintEvent *event);
|
||||||
void scrollContentsBy(int dx, int dy);
|
void scrollContentsBy(int dx, int dy);
|
||||||
void mouseMoveEvent(QMouseEvent *event);
|
void mouseMoveEvent(QMouseEvent *event);
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
#include <QRadioButton>
|
#include <QRadioButton>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QSysInfo>
|
#include <QSysInfo>
|
||||||
#include <QInputDialog>
|
|
||||||
#include "map/pcs.h"
|
#include "map/pcs.h"
|
||||||
#include "icons.h"
|
#include "icons.h"
|
||||||
#include "colorbox.h"
|
#include "colorbox.h"
|
||||||
@ -35,7 +34,7 @@ static QFrame *line()
|
|||||||
|
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
#endif
|
#endif // Q_OS_MAC
|
||||||
|
|
||||||
QWidget *OptionsDialog::createMapPage()
|
QWidget *OptionsDialog::createMapPage()
|
||||||
{
|
{
|
||||||
|
@ -86,9 +86,6 @@ public slots:
|
|||||||
public:
|
public:
|
||||||
OptionsDialog(Options *options, QWidget *parent = 0);
|
OptionsDialog(Options *options, QWidget *parent = 0);
|
||||||
|
|
||||||
//private slots:
|
|
||||||
// void projectionChanged(int index);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QWidget *createMapPage();
|
QWidget *createMapPage();
|
||||||
QWidget *createAppearancePage();
|
QWidget *createAppearancePage();
|
||||||
|
@ -141,6 +141,10 @@ void PathItem::setColor(const QColor &color)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
_pen.setColor(color);
|
_pen.setColor(color);
|
||||||
|
|
||||||
|
for (int i = 0; i < _ticks.size(); i++)
|
||||||
|
_ticks[i]->setColor(color);
|
||||||
|
|
||||||
update();
|
update();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -317,8 +321,7 @@ unsigned PathItem::tickSize() const
|
|||||||
|
|
||||||
void PathItem::updateTicks()
|
void PathItem::updateTicks()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < _ticks.size(); i++)
|
qDeleteAll(_ticks);
|
||||||
delete _ticks[i];
|
|
||||||
_ticks.clear();
|
_ticks.clear();
|
||||||
|
|
||||||
if (!_showTicks)
|
if (!_showTicks)
|
||||||
|
@ -99,8 +99,11 @@ Track::Track(const TrackData &data) : _data(data), _pause(0)
|
|||||||
if (sd.at(j).timestamp() >= sd.at(j-1).timestamp())
|
if (sd.at(j).timestamp() >= sd.at(j-1).timestamp())
|
||||||
dt = sd.at(j-1).timestamp().msecsTo(
|
dt = sd.at(j-1).timestamp().msecsTo(
|
||||||
sd.at(j).timestamp()) / 1000.0;
|
sd.at(j).timestamp()) / 1000.0;
|
||||||
else
|
else {
|
||||||
dt = NAN;
|
qWarning("%s: %s: time skew detected", qPrintable(_data.name()),
|
||||||
|
qPrintable(sd.at(j).timestamp().toString(Qt::ISODate)));
|
||||||
|
dt = 0;
|
||||||
|
}
|
||||||
seg.time.append(seg.time.last() + dt);
|
seg.time.append(seg.time.last() + dt);
|
||||||
|
|
||||||
if (dt < 1e-3) {
|
if (dt < 1e-3) {
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
#include "img.h"
|
#include "img.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define CACHE_SIZE 8388608 /* 8MB */
|
||||||
|
|
||||||
#define CHECK(condition) \
|
#define CHECK(condition) \
|
||||||
if (!(condition)) { \
|
if (!(condition)) { \
|
||||||
_errorString = "Invalid/corrupted IMG file"; \
|
_errorString = "Invalid/corrupted IMG file"; \
|
||||||
@ -25,19 +27,8 @@ struct CTX
|
|||||||
QList<IMG::Point> *points;
|
QList<IMG::Point> *points;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef QT_NO_DEBUG
|
IMG::IMG(const QString &fileName)
|
||||||
static QDebug operator<<(QDebug dbg, const QMap<QString, VectorTile*> &map)
|
: _file(fileName), _typ(0), _style(0), _valid(false)
|
||||||
{
|
|
||||||
dbg.nospace() << "TileMap(";
|
|
||||||
for (QMap<QString, VectorTile*>::const_iterator it = map.constBegin();
|
|
||||||
it != map.constEnd(); ++it)
|
|
||||||
dbg << "(" << it.key() << ", " << *(*it) << ")";
|
|
||||||
dbg << ")";
|
|
||||||
return dbg.space();
|
|
||||||
}
|
|
||||||
#endif // QT_NO_DEBUG
|
|
||||||
|
|
||||||
IMG::IMG(const QString &fileName) : _file(fileName), _valid(false)
|
|
||||||
{
|
{
|
||||||
if (!_file.open(QFile::ReadOnly)) {
|
if (!_file.open(QFile::ReadOnly)) {
|
||||||
_errorString = _file.errorString();
|
_errorString = _file.errorString();
|
||||||
@ -62,6 +53,7 @@ IMG::IMG(const QString &fileName) : _file(fileName), _valid(false)
|
|||||||
QByteArray nba(QByteArray(d1, sizeof(d1)) + QByteArray(d2, sizeof(d2)));
|
QByteArray nba(QByteArray(d1, sizeof(d1)) + QByteArray(d2, sizeof(d2)));
|
||||||
_name = QString(nba).trimmed();
|
_name = QString(nba).trimmed();
|
||||||
_blockSize = 1 << (e1 + e2);
|
_blockSize = 1 << (e1 + e2);
|
||||||
|
_blockCache.setMaxCost(CACHE_SIZE / _blockSize);
|
||||||
|
|
||||||
// Read the FAT table
|
// Read the FAT table
|
||||||
quint8 flag;
|
quint8 flag;
|
||||||
@ -84,7 +76,7 @@ IMG::IMG(const QString &fileName) : _file(fileName), _valid(false)
|
|||||||
|
|
||||||
|
|
||||||
QMap<QString, VectorTile*> tileMap;
|
QMap<QString, VectorTile*> tileMap;
|
||||||
QMap<QString, SubFile*> TYPMap;
|
QString typFile;
|
||||||
|
|
||||||
// Read FAT blocks describing the IMG sub-files
|
// Read FAT blocks describing the IMG sub-files
|
||||||
for (int i = 0; i < cnt; i++) {
|
for (int i = 0; i < cnt; i++) {
|
||||||
@ -120,20 +112,22 @@ IMG::IMG(const QString &fileName) : _file(fileName), _valid(false)
|
|||||||
file->addBlock(block);
|
file->addBlock(block);
|
||||||
}
|
}
|
||||||
} else if (tt == SubFile::TYP) {
|
} else if (tt == SubFile::TYP) {
|
||||||
SubFile *typ;
|
SubFile *typ = 0;
|
||||||
QMap<QString, SubFile*>::iterator it = TYPMap.find(fn);
|
if (typFile.isNull()) {
|
||||||
if (it == TYPMap.end()) {
|
_typ = new SubFile(this, size);
|
||||||
typ = new SubFile(this, size);
|
typ = _typ;
|
||||||
TYPMap.insert(fn, typ);
|
typFile = fn;
|
||||||
} else
|
} else if (fn == typFile)
|
||||||
typ = *it;
|
typ = _typ;
|
||||||
|
|
||||||
_file.seek(offset + 0x20);
|
if (typ) {
|
||||||
for (int i = 0; i < 240; i++) {
|
_file.seek(offset + 0x20);
|
||||||
CHECK(readValue(block));
|
for (int i = 0; i < 240; i++) {
|
||||||
if (block == 0xFFFF)
|
CHECK(readValue(block));
|
||||||
break;
|
if (block == 0xFFFF)
|
||||||
typ->addBlock(block);
|
break;
|
||||||
|
typ->addBlock(block);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,7 +135,6 @@ IMG::IMG(const QString &fileName) : _file(fileName), _valid(false)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Create tile tree
|
// Create tile tree
|
||||||
QSet<int> bits;
|
|
||||||
for (QMap<QString, VectorTile*>::iterator it = tileMap.begin();
|
for (QMap<QString, VectorTile*>::iterator it = tileMap.begin();
|
||||||
it != tileMap.end(); ++it) {
|
it != tileMap.end(); ++it) {
|
||||||
CHECK((*it)->init());
|
CHECK((*it)->init());
|
||||||
@ -154,27 +147,6 @@ IMG::IMG(const QString &fileName) : _file(fileName), _valid(false)
|
|||||||
_tileTree.Insert(min, max, *it);
|
_tileTree.Insert(min, max, *it);
|
||||||
|
|
||||||
_bounds |= (*it)->bounds();
|
_bounds |= (*it)->bounds();
|
||||||
|
|
||||||
for (int i = 0; i < (*it)->bits().count(); i++)
|
|
||||||
bits.insert((*it)->bits().at(i));
|
|
||||||
}
|
|
||||||
_bits = bits.toList();
|
|
||||||
qSort(_bits);
|
|
||||||
|
|
||||||
// Read TYP file if any
|
|
||||||
if (!TYPMap.isEmpty()) {
|
|
||||||
if (TYPMap.size() > 1)
|
|
||||||
qWarning("%s: Multiple TYP files, using %s",
|
|
||||||
qPrintable(_file.fileName()), qPrintable(TYPMap.keys().first()));
|
|
||||||
SubFile *typ = TYPMap.values().first();
|
|
||||||
_style = Style(typ);
|
|
||||||
qDeleteAll(TYPMap);
|
|
||||||
} else {
|
|
||||||
QFile typFile(ProgramPaths::typFile());
|
|
||||||
if (typFile.exists()) {
|
|
||||||
SubFile typ(&typFile);
|
|
||||||
_style = Style(&typ);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_valid = true;
|
_valid = true;
|
||||||
@ -185,6 +157,37 @@ IMG::~IMG()
|
|||||||
TileTree::Iterator it;
|
TileTree::Iterator it;
|
||||||
for (_tileTree.GetFirst(it); !_tileTree.IsNull(it); _tileTree.GetNext(it))
|
for (_tileTree.GetFirst(it); !_tileTree.IsNull(it); _tileTree.GetNext(it))
|
||||||
delete _tileTree.GetAt(it);
|
delete _tileTree.GetAt(it);
|
||||||
|
|
||||||
|
delete _typ;
|
||||||
|
delete _style;
|
||||||
|
}
|
||||||
|
|
||||||
|
void IMG::load()
|
||||||
|
{
|
||||||
|
Q_ASSERT(!_style);
|
||||||
|
|
||||||
|
if (_typ && _typ->isValid())
|
||||||
|
_style = new Style(_typ);
|
||||||
|
else {
|
||||||
|
QFile typFile(ProgramPaths::typFile());
|
||||||
|
if (typFile.exists()) {
|
||||||
|
SubFile typ(&typFile);
|
||||||
|
_style = new Style(&typ);
|
||||||
|
} else
|
||||||
|
_style = new Style();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void IMG::clear()
|
||||||
|
{
|
||||||
|
TileTree::Iterator it;
|
||||||
|
for (_tileTree.GetFirst(it); !_tileTree.IsNull(it); _tileTree.GetNext(it))
|
||||||
|
_tileTree.GetAt(it)->clear();
|
||||||
|
|
||||||
|
delete _style;
|
||||||
|
_style = 0;
|
||||||
|
|
||||||
|
_blockCache.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool cb(VectorTile *tile, void *context)
|
static bool cb(VectorTile *tile, void *context)
|
||||||
@ -195,17 +198,9 @@ static bool cb(VectorTile *tile, void *context)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void IMG::objects(const RectC &rect, int bits, QList<Poly> *polygons,
|
void IMG::objects(const RectC &rect, int bits, QList<Poly> *polygons,
|
||||||
QList<Poly> *lines, QList<Point> *points) const
|
QList<Poly> *lines, QList<Point> *points)
|
||||||
{
|
{
|
||||||
int mb = _bits.first();
|
CTX ctx(rect, bits, polygons, lines, points);
|
||||||
for (int i = 0; i < _bits.size(); i++) {
|
|
||||||
if (_bits.at(i) > bits)
|
|
||||||
break;
|
|
||||||
else
|
|
||||||
mb = _bits.at(i);
|
|
||||||
}
|
|
||||||
|
|
||||||
CTX ctx(rect, mb, polygons, lines, points);
|
|
||||||
double min[2], max[2];
|
double min[2], max[2];
|
||||||
|
|
||||||
min[0] = rect.left();
|
min[0] = rect.left();
|
||||||
@ -255,3 +250,18 @@ bool IMG::readBlock(int blockNum, QByteArray &data)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef QT_NO_DEBUG
|
||||||
|
QDebug operator<<(QDebug dbg, const IMG::Point &point)
|
||||||
|
{
|
||||||
|
dbg.nospace() << "Point(" << hex << point.type << ", " << point.label
|
||||||
|
<< ", " << point.poi << ")";
|
||||||
|
return dbg.space();
|
||||||
|
}
|
||||||
|
|
||||||
|
QDebug operator<<(QDebug dbg, const IMG::Poly &poly)
|
||||||
|
{
|
||||||
|
dbg.nospace() << "Poly(" << hex << poly.type << ", " << poly.label << ")";
|
||||||
|
return dbg.space();
|
||||||
|
}
|
||||||
|
#endif // QT_NO_DEBUG
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
#include "common/rectc.h"
|
#include "common/rectc.h"
|
||||||
#include "common/range.h"
|
#include "common/range.h"
|
||||||
#include "style.h"
|
#include "style.h"
|
||||||
|
#include "label.h"
|
||||||
|
|
||||||
class VectorTile;
|
class VectorTile;
|
||||||
class SubFile;
|
class SubFile;
|
||||||
@ -23,7 +24,7 @@ public:
|
|||||||
ll2xy() the points in the IMG class as this can not be done in
|
ll2xy() the points in the IMG class as this can not be done in
|
||||||
parallel. */
|
parallel. */
|
||||||
QVector<QPointF> points;
|
QVector<QPointF> points;
|
||||||
QString label;
|
Label label;
|
||||||
quint32 type;
|
quint32 type;
|
||||||
|
|
||||||
bool operator<(const Poly &other) const
|
bool operator<(const Poly &other) const
|
||||||
@ -34,7 +35,7 @@ public:
|
|||||||
Point() : id(0) {}
|
Point() : id(0) {}
|
||||||
|
|
||||||
Coordinates coordinates;
|
Coordinates coordinates;
|
||||||
QString label;
|
Label label;
|
||||||
quint32 type;
|
quint32 type;
|
||||||
bool poi;
|
bool poi;
|
||||||
quint64 id;
|
quint64 id;
|
||||||
@ -47,12 +48,16 @@ public:
|
|||||||
IMG(const QString &fileName);
|
IMG(const QString &fileName);
|
||||||
~IMG();
|
~IMG();
|
||||||
|
|
||||||
|
void load();
|
||||||
|
void clear();
|
||||||
|
|
||||||
|
QString fileName() const {return _file.fileName();}
|
||||||
const QString &name() const {return _name;}
|
const QString &name() const {return _name;}
|
||||||
const RectC &bounds() const {return _bounds;}
|
const RectC &bounds() const {return _bounds;}
|
||||||
Range zooms() const {return Range(_bits.first(), _bits.last());}
|
|
||||||
void objects(const RectC &rect, int bits, QList<Poly> *polygons,
|
void objects(const RectC &rect, int bits, QList<Poly> *polygons,
|
||||||
QList<Poly> *lines, QList<Point> *points) const;
|
QList<Poly> *lines, QList<Point> *points);
|
||||||
const Style &style() const {return _style;}
|
const Style *style() const {return _style;}
|
||||||
|
|
||||||
bool isValid() const {return _valid;}
|
bool isValid() const {return _valid;}
|
||||||
const QString &errorString() const {return _errorString;}
|
const QString &errorString() const {return _errorString;}
|
||||||
@ -62,26 +67,30 @@ private:
|
|||||||
|
|
||||||
typedef RTree<VectorTile*, double, 2> TileTree;
|
typedef RTree<VectorTile*, double, 2> TileTree;
|
||||||
|
|
||||||
QString fileName() const {return _file.fileName();}
|
|
||||||
int blockSize() const {return _blockSize;}
|
int blockSize() const {return _blockSize;}
|
||||||
bool readBlock(int blockNum, QByteArray &data);
|
bool readBlock(int blockNum, QByteArray &data);
|
||||||
qint64 read(char *data, qint64 maxSize);
|
qint64 read(char *data, qint64 maxSize);
|
||||||
template<class T> bool readValue(T &val);
|
template<class T> bool readValue(T &val);
|
||||||
|
bool init();
|
||||||
|
|
||||||
QFile _file;
|
QFile _file;
|
||||||
quint8 _key;
|
quint8 _key;
|
||||||
int _blockSize;
|
int _blockSize;
|
||||||
QCache<int, QByteArray> _blockCache;
|
QCache<int, QByteArray> _blockCache;
|
||||||
|
|
||||||
TileTree _tileTree;
|
|
||||||
|
|
||||||
QString _name;
|
QString _name;
|
||||||
RectC _bounds;
|
RectC _bounds;
|
||||||
QList<int> _bits;
|
TileTree _tileTree;
|
||||||
Style _style;
|
SubFile *_typ;
|
||||||
|
Style *_style;
|
||||||
|
|
||||||
bool _valid;
|
bool _valid;
|
||||||
QString _errorString;
|
QString _errorString;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifndef QT_NO_DEBUG
|
||||||
|
QDebug operator<<(QDebug dbg, const IMG::Point &point);
|
||||||
|
QDebug operator<<(QDebug dbg, const IMG::Poly &poly);
|
||||||
|
#endif // QT_NO_DEBUG
|
||||||
|
|
||||||
#endif // IMG_H
|
#endif // IMG_H
|
||||||
|
74
src/map/IMG/label.h
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
#ifndef LABEL_H
|
||||||
|
#define LABEL_H
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
|
class Label {
|
||||||
|
public:
|
||||||
|
class Shield
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
enum Type {
|
||||||
|
None,
|
||||||
|
USInterstate,
|
||||||
|
USShield,
|
||||||
|
USRound,
|
||||||
|
Hbox,
|
||||||
|
Box,
|
||||||
|
Oval
|
||||||
|
};
|
||||||
|
|
||||||
|
Shield() : _type(None) {}
|
||||||
|
Shield(Type type, const QString &name) : _type(type), _text(name) {}
|
||||||
|
|
||||||
|
Type type() const {return _type;}
|
||||||
|
const QString &text() const {return _text;}
|
||||||
|
bool isValid() const {return _type > None && !_text.isEmpty();}
|
||||||
|
|
||||||
|
bool operator==(const Shield &other) const
|
||||||
|
{return _type == other._type && _text == other._text;}
|
||||||
|
|
||||||
|
private:
|
||||||
|
Type _type;
|
||||||
|
QString _text;
|
||||||
|
};
|
||||||
|
|
||||||
|
Label() {}
|
||||||
|
Label(const QString &text, const Shield &shield = Shield())
|
||||||
|
: _text(text), _shield(shield) {}
|
||||||
|
|
||||||
|
const Shield &shield() const {return _shield;}
|
||||||
|
const QString &text() const {return _text;}
|
||||||
|
bool isValid() const {return _shield.isValid() || !_text.isEmpty();}
|
||||||
|
|
||||||
|
void setText(const QString &text) {_text = text;}
|
||||||
|
|
||||||
|
private:
|
||||||
|
QString _text;
|
||||||
|
Shield _shield;
|
||||||
|
};
|
||||||
|
|
||||||
|
inline uint qHash(const Label::Shield &shield)
|
||||||
|
{
|
||||||
|
return qHash(shield.text()) ^ shield.type();
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef QT_NO_DEBUG
|
||||||
|
inline QDebug operator<<(QDebug dbg, const Label::Shield &shield)
|
||||||
|
{
|
||||||
|
dbg.nospace() << "Shield(" << shield.type() << ", " << shield.text() << ")";
|
||||||
|
return dbg.space();
|
||||||
|
}
|
||||||
|
|
||||||
|
inline QDebug operator<<(QDebug dbg, const Label &label)
|
||||||
|
{
|
||||||
|
dbg.nospace() << "Label(";
|
||||||
|
if (label.shield().isValid())
|
||||||
|
dbg << label.shield() << ", ";
|
||||||
|
dbg << label.text() << ")";
|
||||||
|
return dbg.space();
|
||||||
|
}
|
||||||
|
#endif // QT_NO_DEBUG
|
||||||
|
|
||||||
|
#endif // LABEL_H
|
@ -7,7 +7,7 @@ static quint8 NORMAL_CHARS[] = {
|
|||||||
' ', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
|
' ', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
|
||||||
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
|
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',
|
||||||
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
|
'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W',
|
||||||
'X', 'Y', 'Z', '~', '~', '~', '~', '~',
|
'X', 'Y', 'Z', '~', '~', '~', ' ', ' ',
|
||||||
'0', '1', '2', '3', '4', '5', '6', '7',
|
'0', '1', '2', '3', '4', '5', '6', '7',
|
||||||
'8', '9', '~', '~', '~', '~', '~', '~'
|
'8', '9', '~', '~', '~', '~', '~', '~'
|
||||||
};
|
};
|
||||||
@ -48,6 +48,7 @@ static QString capitalize(const QString &str)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool LBLFile::init()
|
bool LBLFile::init()
|
||||||
{
|
{
|
||||||
Handle hdl;
|
Handle hdl;
|
||||||
@ -73,45 +74,48 @@ bool LBLFile::init()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString LBLFile::label6b(Handle &hdl, quint32 offset) const
|
Label LBLFile::label6b(Handle &hdl, quint32 offset) const
|
||||||
{
|
{
|
||||||
QByteArray result;
|
Label::Shield::Type shieldType = Label::Shield::None;
|
||||||
|
QByteArray label, shieldLabel;
|
||||||
|
QByteArray *bap = &label;
|
||||||
Charset curCharSet = Normal;
|
Charset curCharSet = Normal;
|
||||||
quint8 b1, b2, b3;
|
quint8 b1, b2, b3;
|
||||||
|
|
||||||
if (!seek(hdl, offset))
|
if (!seek(hdl, offset))
|
||||||
return QString();
|
return Label();
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!(readByte(hdl, b1) && readByte(hdl, b2) && readByte(hdl, b3)))
|
if (!(readByte(hdl, b1) && readByte(hdl, b2) && readByte(hdl, b3)))
|
||||||
return QString();
|
return Label();
|
||||||
|
|
||||||
int c[]= {b1>>2, (b1&0x3)<<4|b2>>4, (b2&0xF)<<2|b3>>6, b3&0x3F};
|
int c[]= {b1>>2, (b1&0x3)<<4|b2>>4, (b2&0xF)<<2|b3>>6, b3&0x3F};
|
||||||
|
|
||||||
for (int cpt = 0; cpt < 4; cpt++) {
|
for (int cpt = 0; cpt < 4; cpt++) {
|
||||||
if (c[cpt] > 0x2F)
|
if (c[cpt] > 0x2f || (curCharSet == Normal && c[cpt] == 0x1d))
|
||||||
return QString::fromLatin1(result);
|
return Label(capitalize(QString::fromLatin1(label)),
|
||||||
|
Label::Shield(shieldType, shieldLabel));
|
||||||
switch (curCharSet) {
|
switch (curCharSet) {
|
||||||
case Normal:
|
case Normal:
|
||||||
if (c[cpt] == 0x1c)
|
if (c[cpt] == 0x1c)
|
||||||
curCharSet = Symbol;
|
curCharSet = Symbol;
|
||||||
else if (c[cpt] == 0x1b)
|
else if (c[cpt] == 0x1b)
|
||||||
curCharSet = Special;
|
curCharSet = Special;
|
||||||
else if(c[cpt] == 0x1d)
|
else if (c[cpt] >= 0x2a && c[cpt] <= 0x2f) {
|
||||||
result.append('|');
|
shieldType = (Label::Shield::Type)(c[cpt] - 0x29);
|
||||||
else if (c[cpt] == 0x1f)
|
bap = &shieldLabel;
|
||||||
result.append(' ');
|
} else if (bap == &shieldLabel
|
||||||
else if (c[cpt] == 0x1e)
|
&& NORMAL_CHARS[c[cpt]] == ' ')
|
||||||
result.append(' ');
|
bap = &label;
|
||||||
else
|
else
|
||||||
result.append(NORMAL_CHARS[c[cpt]]);
|
bap->append(NORMAL_CHARS[c[cpt]]);
|
||||||
break;
|
break;
|
||||||
case Symbol:
|
case Symbol:
|
||||||
result.append(SYMBOL_CHARS[c[cpt]]);
|
bap->append(SYMBOL_CHARS[c[cpt]]);
|
||||||
curCharSet = Normal;
|
curCharSet = Normal;
|
||||||
break;
|
break;
|
||||||
case Special:
|
case Special:
|
||||||
result.append(SPECIAL_CHARS[c[cpt]]);
|
bap->append(SPECIAL_CHARS[c[cpt]]);
|
||||||
curCharSet = Normal;
|
curCharSet = Normal;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -119,40 +123,51 @@ QString LBLFile::label6b(Handle &hdl, quint32 offset) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString LBLFile::label8b(Handle &hdl, quint32 offset) const
|
Label LBLFile::label8b(Handle &hdl, quint32 offset) const
|
||||||
{
|
{
|
||||||
QByteArray result;
|
Label::Shield::Type shieldType = Label::Shield::None;
|
||||||
|
QByteArray label, shieldLabel;
|
||||||
|
QByteArray *bap = &label;
|
||||||
quint8 c;
|
quint8 c;
|
||||||
|
|
||||||
if (!seek(hdl, offset))
|
if (!seek(hdl, offset))
|
||||||
return QString();
|
return Label();
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
if (!readByte(hdl, c))
|
if (!readByte(hdl, c))
|
||||||
return QString();
|
return Label();
|
||||||
if (!c)
|
if (!c || c == 0x1d)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (c >= 0x1B && c <= 0x1F)
|
if ((c >= 0x1e && c <= 0x1f)) {
|
||||||
result.append(' ');
|
if (bap == &shieldLabel)
|
||||||
else if (c > 0x07)
|
bap = &label;
|
||||||
result.append(c);
|
else
|
||||||
|
bap->append(' ');
|
||||||
|
} else if (c <= 0x07) {
|
||||||
|
shieldType = (Label::Shield::Type)c;
|
||||||
|
bap = &shieldLabel;
|
||||||
|
} else if (bap == &shieldLabel && QChar(c).isSpace()) {
|
||||||
|
bap = &label;
|
||||||
|
} else
|
||||||
|
bap->append(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
return _codec ? _codec->toUnicode(result) : QString::fromLatin1(result);
|
return Label(capitalize(_codec ? _codec->toUnicode(label)
|
||||||
|
: QString::fromLatin1(label)), Label::Shield(shieldType, _codec
|
||||||
|
? _codec->toUnicode(shieldLabel) : QString::fromLatin1(shieldLabel)));
|
||||||
}
|
}
|
||||||
|
|
||||||
QString LBLFile::label(Handle &hdl, quint32 offset, bool poi)
|
Label LBLFile::label(Handle &hdl, quint32 offset, bool poi)
|
||||||
{
|
{
|
||||||
if (!_init) {
|
if (!_size && !init())
|
||||||
if (!(_init = init()))
|
return QString();
|
||||||
return QString();
|
|
||||||
}
|
|
||||||
|
|
||||||
quint32 labelOffset;
|
quint32 labelOffset;
|
||||||
if (poi) {
|
if (poi) {
|
||||||
quint32 poiOffset;
|
quint32 poiOffset;
|
||||||
if (!(seek(hdl, _poiOffset + offset) && readUInt24(hdl, poiOffset)))
|
if (!(seek(hdl, _poiOffset + offset) && readUInt24(hdl, poiOffset)
|
||||||
|
&& (poiOffset & 0x3FFFFF)))
|
||||||
return QString();
|
return QString();
|
||||||
labelOffset = _offset + (poiOffset & 0x3FFFFF) * _multiplier;
|
labelOffset = _offset + (poiOffset & 0x3FFFFF) * _multiplier;
|
||||||
} else
|
} else
|
||||||
@ -163,11 +178,11 @@ QString LBLFile::label(Handle &hdl, quint32 offset, bool poi)
|
|||||||
|
|
||||||
switch (_encoding) {
|
switch (_encoding) {
|
||||||
case 6:
|
case 6:
|
||||||
return capitalize(label6b(hdl, labelOffset));
|
return label6b(hdl, labelOffset);
|
||||||
case 9:
|
case 9:
|
||||||
case 10:
|
case 10:
|
||||||
return capitalize(label8b(hdl, labelOffset));
|
return label8b(hdl, labelOffset);
|
||||||
default:
|
default:
|
||||||
return QString();
|
return Label();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,21 +2,24 @@
|
|||||||
#define LBLFILE_H
|
#define LBLFILE_H
|
||||||
|
|
||||||
#include "subfile.h"
|
#include "subfile.h"
|
||||||
|
#include "label.h"
|
||||||
|
|
||||||
class QTextCodec;
|
class QTextCodec;
|
||||||
|
|
||||||
class LBLFile : public SubFile
|
class LBLFile : public SubFile
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LBLFile(IMG *img, quint32 size) : SubFile(img, size), _init(false) {}
|
LBLFile(IMG *img, quint32 size)
|
||||||
|
: SubFile(img, size), _offset(0), _size(0), _poiOffset(0), _poiSize(0),
|
||||||
|
_multiplier(0), _encoding(0), _codec(0) {}
|
||||||
|
|
||||||
QString label(Handle &hdl, quint32 offset, bool poi = false);
|
Label label(Handle &hdl, quint32 offset, bool poi = false);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool init();
|
bool init();
|
||||||
|
|
||||||
QString label6b(Handle &hdl, quint32 offset) const;
|
Label label6b(Handle &hdl, quint32 offset) const;
|
||||||
QString label8b(Handle &hdl, quint32 offset) const;
|
Label label8b(Handle &hdl, quint32 offset) const;
|
||||||
|
|
||||||
quint32 _offset;
|
quint32 _offset;
|
||||||
quint32 _size;
|
quint32 _size;
|
||||||
@ -25,8 +28,6 @@ private:
|
|||||||
quint8 _multiplier;
|
quint8 _multiplier;
|
||||||
quint8 _encoding;
|
quint8 _encoding;
|
||||||
QTextCodec *_codec;
|
QTextCodec *_codec;
|
||||||
|
|
||||||
bool _init;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // LBLFILE_H
|
#endif // LBLFILE_H
|
||||||
|
@ -205,7 +205,8 @@ bool RGNFile::polyObjects(const RectC &rect, Handle &hdl, const SubDiv *subdiv,
|
|||||||
if (lbl && (labelPtr & 0x3FFFFF)) {
|
if (lbl && (labelPtr & 0x3FFFFF)) {
|
||||||
if (labelPtr & 0x800000) {
|
if (labelPtr & 0x800000) {
|
||||||
quint32 lblOff;
|
quint32 lblOff;
|
||||||
if (net && net->lblOffset(netHdl, labelPtr & 0x3FFFFF, lblOff))
|
if (net && net->lblOffset(netHdl, labelPtr & 0x3FFFFF, lblOff)
|
||||||
|
&& lblOff)
|
||||||
poly.label = lbl->label(lblHdl, lblOff);
|
poly.label = lbl->label(lblHdl, lblOff);
|
||||||
} else
|
} else
|
||||||
poly.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF);
|
poly.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF);
|
||||||
@ -289,7 +290,7 @@ bool RGNFile::extPolyObjects(const RectC &rect, Handle &hdl,
|
|||||||
if (subtype & 0x20) {
|
if (subtype & 0x20) {
|
||||||
if (!readUInt24(hdl, labelPtr))
|
if (!readUInt24(hdl, labelPtr))
|
||||||
return false;
|
return false;
|
||||||
if (lbl)
|
if (lbl && (labelPtr & 0x3FFFFF))
|
||||||
poly.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF);
|
poly.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -338,7 +339,8 @@ bool RGNFile::pointObjects(const RectC &rect, Handle &hdl, const SubDiv *subdiv,
|
|||||||
point.poi = labelPtr & 0x400000;
|
point.poi = labelPtr & 0x400000;
|
||||||
if (lbl && (labelPtr & 0x3FFFFF)) {
|
if (lbl && (labelPtr & 0x3FFFFF)) {
|
||||||
point.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF, point.poi);
|
point.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF, point.poi);
|
||||||
point.id = ((quint64)lbl->offset())<<24 | (labelPtr & 0x3FFFFF);
|
point.id = ((quint64)point.type)<<40 | ((quint64)lbl->offset())<<24
|
||||||
|
| (labelPtr & 0x3FFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
points->append(point);
|
points->append(point);
|
||||||
@ -383,7 +385,8 @@ bool RGNFile::extPointObjects(const RectC &rect, Handle &hdl,
|
|||||||
point.poi = labelPtr & 0x400000;
|
point.poi = labelPtr & 0x400000;
|
||||||
if (lbl && (labelPtr & 0x3FFFFF)) {
|
if (lbl && (labelPtr & 0x3FFFFF)) {
|
||||||
point.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF, point.poi);
|
point.label = lbl->label(lblHdl, labelPtr & 0x3FFFFF, point.poi);
|
||||||
point.id = ((quint64)lbl->offset())<<24 | (labelPtr & 0x3FFFFF);
|
point.id = ((quint64)point.type)<<40
|
||||||
|
| ((quint64)lbl->offset())<<24 | (labelPtr & 0x3FFFFF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -401,10 +404,8 @@ void RGNFile::objects(const RectC &rect, const SubDiv *subdiv, LBLFile *lbl,
|
|||||||
{
|
{
|
||||||
Handle rgnHdl, lblHdl, netHdl;
|
Handle rgnHdl, lblHdl, netHdl;
|
||||||
|
|
||||||
if (!_init) {
|
if (!_size && !init())
|
||||||
if (!(_init = init()))
|
return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
QVector<RGNFile::Segment> seg(segments(rgnHdl, subdiv));
|
QVector<RGNFile::Segment> seg(segments(rgnHdl, subdiv));
|
||||||
for (int i = 0; i < seg.size(); i++) {
|
for (int i = 0; i < seg.size(); i++) {
|
||||||
@ -435,10 +436,8 @@ void RGNFile::extObjects(const RectC &rect, const SubDiv *subdiv, LBLFile *lbl,
|
|||||||
{
|
{
|
||||||
Handle rgnHdl, lblHdl;
|
Handle rgnHdl, lblHdl;
|
||||||
|
|
||||||
if (!_init) {
|
if (!_size && !init())
|
||||||
if (!(_init = init()))
|
return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (polygons && subdiv->polygonsOffset() != subdiv->polygonsEnd()) {
|
if (polygons && subdiv->polygonsOffset() != subdiv->polygonsEnd()) {
|
||||||
quint32 start = _polygonsOffset + subdiv->polygonsOffset();
|
quint32 start = _polygonsOffset + subdiv->polygonsOffset();
|
||||||
|
@ -11,7 +11,10 @@ class NETFile;
|
|||||||
class RGNFile : public SubFile
|
class RGNFile : public SubFile
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RGNFile(IMG *img, quint32 size) : SubFile(img, size), _init(false) {}
|
RGNFile(IMG *img, quint32 size)
|
||||||
|
: SubFile(img, size), _offset(0), _size(0), _polygonsOffset(0),
|
||||||
|
_polygonsSize(), _linesOffset(), _linesSize(), _pointsOffset(),
|
||||||
|
_pointsSize() {}
|
||||||
|
|
||||||
void objects(const RectC &rect, const SubDiv *subdiv, LBLFile *lbl,
|
void objects(const RectC &rect, const SubDiv *subdiv, LBLFile *lbl,
|
||||||
NETFile *net, QList<IMG::Poly> *polygons, QList<IMG::Poly> *lines,
|
NETFile *net, QList<IMG::Poly> *polygons, QList<IMG::Poly> *lines,
|
||||||
@ -96,8 +99,6 @@ private:
|
|||||||
quint32 _linesSize;
|
quint32 _linesSize;
|
||||||
quint32 _pointsOffset;
|
quint32 _pointsOffset;
|
||||||
quint32 _pointsSize;
|
quint32 _pointsSize;
|
||||||
|
|
||||||
bool _init;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef QT_NO_DEBUG
|
#ifndef QT_NO_DEBUG
|
||||||
|
@ -75,10 +75,11 @@ void Style::defaultPolygonStyle()
|
|||||||
<< TYPE(0x42) << TYPE(0x43) << TYPE(0x44) << TYPE(0x45) << TYPE(0x46)
|
<< TYPE(0x42) << TYPE(0x43) << TYPE(0x44) << TYPE(0x45) << TYPE(0x46)
|
||||||
<< TYPE(0x47) << TYPE(0x48) << TYPE(0x49) << TYPE(0x4c) << TYPE(0x4d)
|
<< TYPE(0x47) << TYPE(0x48) << TYPE(0x49) << TYPE(0x4c) << TYPE(0x4d)
|
||||||
<< TYPE(0x4e) << TYPE(0x4f) << TYPE(0x50) << TYPE(0x51) << TYPE(0x52)
|
<< TYPE(0x4e) << TYPE(0x4f) << TYPE(0x50) << TYPE(0x51) << TYPE(0x52)
|
||||||
<< TYPE(0x14) << TYPE(0x15) << TYPE(0x1e) << TYPE(0x1f) << TYPE(0x04)
|
<< TYPE(0x14) << TYPE(0x15) << TYPE(0x16) << TYPE(0x1e) << TYPE(0x1f)
|
||||||
<< TYPE(0x05) << TYPE(0x06) << TYPE(0x07) << TYPE(0x08) << TYPE(0x09)
|
<< TYPE(0x04) << TYPE(0x05) << TYPE(0x06) << TYPE(0x07) << TYPE(0x08)
|
||||||
<< TYPE(0x0a) << TYPE(0x0b) << TYPE(0x0c) << TYPE(0x0d) << TYPE(0x0e)
|
<< TYPE(0x09) << TYPE(0x0a) << TYPE(0x0b) << TYPE(0x0c) << TYPE(0x0d)
|
||||||
<< TYPE(0x0f) << TYPE(0x10) << TYPE(0x11) << TYPE(0x12) << TYPE(0x13);
|
<< TYPE(0x0e) << TYPE(0x0f) << TYPE(0x10) << TYPE(0x11) << TYPE(0x12)
|
||||||
|
<< TYPE(0x13);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Style::defaultLineStyle()
|
void Style::defaultLineStyle()
|
||||||
@ -147,6 +148,143 @@ void Style::defaultLineStyle()
|
|||||||
_lines[TYPE(0x29)].setTextFontSize(Style::None);
|
_lines[TYPE(0x29)].setTextFontSize(Style::None);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Style::defaultPointStyle()
|
||||||
|
{
|
||||||
|
// Cities
|
||||||
|
_points[TYPE(0x01)].setTextFontSize(Style::Large);
|
||||||
|
_points[TYPE(0x02)].setTextFontSize(Style::Large);
|
||||||
|
_points[TYPE(0x03)].setTextFontSize(Style::Large);
|
||||||
|
|
||||||
|
// POI
|
||||||
|
_points[0x2a00] = Point(QImage(":/restaurant-11.png"));
|
||||||
|
_points[0x2a01] = Point(QImage(":/restaurant-11.png"));
|
||||||
|
_points[0x2a02] = Point(QImage(":/restaurant-noodle-11.png"));
|
||||||
|
_points[0x2a03] = Point(QImage(":/bbq-11.png"));
|
||||||
|
_points[0x2a04] = Point(QImage(":/restaurant-noodle-11.png"));
|
||||||
|
_points[0x2a05] = Point(QImage(":/bakery-11.png"));
|
||||||
|
_points[0x2a06] = Point(QImage(":/restaurant-11.png"));
|
||||||
|
_points[0x2a07] = Point(QImage(":/fast-food-11.png"));
|
||||||
|
_points[0x2a08] = Point(QImage(":/restaurant-pizza-11.png"));
|
||||||
|
_points[0x2a09] = Point(QImage(":/restaurant-11.png"));
|
||||||
|
_points[0x2a0a] = Point(QImage(":/restaurant-pizza-11.png"));
|
||||||
|
_points[0x2a0b] = Point(QImage(":/restaurant-seafood-11.png"));
|
||||||
|
_points[0x2a0c] = Point(QImage(":/restaurant-11.png"));
|
||||||
|
_points[0x2a0d] = Point(QImage(":/bakery-11.png"));
|
||||||
|
_points[0x2a0e] = Point(QImage(":/cafe-11.png"));
|
||||||
|
_points[0x2a0f] = Point(QImage(":/restaurant-11.png"));
|
||||||
|
_points[0x2a10] = Point(QImage(":/restaurant-11.png"));
|
||||||
|
_points[0x2a11] = Point(QImage(":/restaurant-11.png"));
|
||||||
|
_points[0x2a12] = Point(QImage(":/restaurant-11.png"));
|
||||||
|
_points[0x2a13] = Point(QImage(":/restaurant-11.png"));
|
||||||
|
|
||||||
|
_points[0x2b01] = Point(QImage(":/lodging-11.png"));
|
||||||
|
_points[0x2b02] = Point(QImage(":/lodging-11.png"));
|
||||||
|
_points[0x2b03] = Point(QImage(":/campsite-11.png"));
|
||||||
|
_points[0x2b04] = Point(QImage(":/village-11.png"));
|
||||||
|
_points[0x2b06] = Point(QImage(":/shelter-11.png"));
|
||||||
|
|
||||||
|
_points[0x2c01] = Point(QImage(":/amusement-park-11.png"));
|
||||||
|
_points[0x2c02] = Point(QImage(":/museum-11.png"));
|
||||||
|
_points[0x2c03] = Point(QImage(":/library-11.png"));
|
||||||
|
_points[0x2c04] = Point(QImage(":/landmark-11.png"));
|
||||||
|
_points[0x2c05] = Point(QImage(":/school-11.png"));
|
||||||
|
_points[0x2c06] = Point(QImage(":/garden-11.png"));
|
||||||
|
_points[0x2c07] = Point(QImage(":/zoo-11.png"));
|
||||||
|
_points[0x2c08] = Point(QImage(":/soccer-11.png"));
|
||||||
|
_points[0x2c0a] = Point(QImage(":/bar-11.png"));
|
||||||
|
_points[0x2c0b] = Point(QImage(":/place-of-worship-11.png"));
|
||||||
|
_points[0x2c0d] = Point(QImage(":/religious-muslim-11.png"));
|
||||||
|
_points[0x2c0e] = Point(QImage(":/religious-christian-11.png"));
|
||||||
|
_points[0x2c10] = Point(QImage(":/religious-jewish-11.png"));
|
||||||
|
_points[0x2d01] = Point(QImage(":/theatre-11.png"));
|
||||||
|
_points[0x2d02] = Point(QImage(":/bar-11.png"));
|
||||||
|
_points[0x2d03] = Point(QImage(":/cinema-11.png"));
|
||||||
|
_points[0x2d04] = Point(QImage(":/casino-11.png"));
|
||||||
|
_points[0x2d05] = Point(QImage(":/golf-11.png"));
|
||||||
|
_points[0x2d06] = Point(QImage(":/skiing-11.png"));
|
||||||
|
_points[0x2d07] = Point(QImage(":/bowling-alley-11.png"));
|
||||||
|
_points[0x2d09] = Point(QImage(":/swimming-11.png"));
|
||||||
|
_points[0x2d0a] = Point(QImage(":/fitness-centre-11.png"));
|
||||||
|
_points[0x2d0b] = Point(QImage(":/airfield-11.png"));
|
||||||
|
|
||||||
|
_points[0x2e02] = Point(QImage(":/grocery-11.png"));
|
||||||
|
_points[0x2e05] = Point(QImage(":/pharmacy-11.png"));
|
||||||
|
_points[0x2e07] = Point(QImage(":/clothing-store-11.png"));
|
||||||
|
_points[0x2e08] = Point(QImage(":/garden-centre-11.png"));
|
||||||
|
_points[0x2e09] = Point(QImage(":/furniture-11.png"));
|
||||||
|
_points[0x2e0c] = Point(QImage(":/shop-11.png"));
|
||||||
|
|
||||||
|
_points[0x2f01] = Point(QImage(":/fuel-11.png"));
|
||||||
|
_points[0x2f02] = Point(QImage(":/car-rental-11.png"));
|
||||||
|
_points[0x2f03] = Point(QImage(":/car-repair-11.png"));
|
||||||
|
_points[0x2f04] = Point(QImage(":/airport-11.png"));
|
||||||
|
_points[0x2f05] = Point(QImage(":/post-11.png"));
|
||||||
|
_points[0x2f06] = Point(QImage(":/bank-11.png"));
|
||||||
|
_points[0x2f07] = Point(QImage(":/car-11.png"));
|
||||||
|
_points[0x2f08] = Point(QImage(":/bus-11.png"));
|
||||||
|
_points[0x2f09] = Point(QImage(":/harbor-11.png"));
|
||||||
|
_points[0x2f0b] = Point(QImage(":/parking-11.png"));
|
||||||
|
_points[0x2f0b].setTextFontSize(None);
|
||||||
|
_points[0x2f0c] = Point(QImage(":/toilet-11.png"));
|
||||||
|
_points[0x2f0c].setTextFontSize(None);
|
||||||
|
_points[0x2f10] = Point(QImage(":/hairdresser-11.png"));
|
||||||
|
_points[0x2f12].setTextFontSize(None);
|
||||||
|
_points[0x2f13] = Point(QImage(":/hardware-11.png"));
|
||||||
|
_points[0x2f17] = Point(QImage(":/bus-11.png"));
|
||||||
|
|
||||||
|
_points[0x3001] = Point(QImage(":/police-11.png"));
|
||||||
|
_points[0x3002] = Point(QImage(":/hospital-11.png"));
|
||||||
|
_points[0x3003] = Point(QImage(":/town-hall-11.png"));
|
||||||
|
_points[0x3007] = Point(QImage(":/prison-11.png"));
|
||||||
|
_points[0x3008] = Point(QImage(":/fire-station-11.png"));
|
||||||
|
|
||||||
|
_points[0x4000] = Point(QImage(":/golf-11.png"));
|
||||||
|
_points[0x4300] = Point(QImage(":/harbor-11.png"));
|
||||||
|
_points[0x4400] = Point(QImage(":/fuel-11.png"));
|
||||||
|
_points[0x4500] = Point(QImage(":/restaurant-11.png"));
|
||||||
|
_points[0x4600] = Point(QImage(":/bar-11.png"));
|
||||||
|
_points[0x4900] = Point(QImage(":/park-11.png"));
|
||||||
|
_points[0x4a00] = Point(QImage(":/picnic-site-11.png"));
|
||||||
|
_points[0x4c00] = Point(QImage(":/information-11.png"));
|
||||||
|
_points[0x4800] = Point(QImage(":/campsite-11.png"));
|
||||||
|
_points[0x4a00] = Point(QImage(":/picnic-site-11.png"));
|
||||||
|
_points[0x4b00] = Point(QImage(":/hospital-11.png"));
|
||||||
|
_points[0x4c00] = Point(QImage(":/information-11.png"));
|
||||||
|
_points[0x4d00] = Point(QImage(":/parking-11.png"));
|
||||||
|
_points[0x4d00].setTextFontSize(None);
|
||||||
|
_points[0x4e00] = Point(QImage(":/toilet-11.png"));
|
||||||
|
_points[0x4e00].setTextFontSize(None);
|
||||||
|
_points[0x5000] = Point(QImage(":/drinking-water-11.png"));
|
||||||
|
_points[0x5000].setTextFontSize(None);
|
||||||
|
_points[0x5100] = Point(QImage(":/telephone-11.png"));
|
||||||
|
_points[0x5200] = Point(QImage(":/viewpoint-11.png"));
|
||||||
|
_points[0x5300] = Point(QImage(":/skiing-11.png"));
|
||||||
|
_points[0x5400] = Point(QImage(":/swimming-11.png"));
|
||||||
|
_points[0x5500] = Point(QImage(":/dam-11.png"));
|
||||||
|
_points[0x5700] = Point(QImage(":/danger-11.png"));
|
||||||
|
_points[0x5800] = Point(QImage(":/roadblock-11.png"));
|
||||||
|
_points[0x5900] = Point(QImage(":/airport-11.png"));
|
||||||
|
_points[0x5901] = Point(QImage(":/airport-11.png"));
|
||||||
|
_points[0x5904] = Point(QImage(":/heliport-11.png"));
|
||||||
|
|
||||||
|
_points[0x6401] = Point(QImage(":/bridge-11.png"));
|
||||||
|
_points[0x6402] = Point(QImage(":/building-alt1-11.png"));
|
||||||
|
_points[0x6403] = Point(QImage(":/cemetery-11.png"));
|
||||||
|
_points[0x6404] = Point(QImage(":/religious-christian-11.png"));
|
||||||
|
_points[0x6407] = Point(QImage(":/dam-11.png"));
|
||||||
|
_points[0x6408] = Point(QImage(":/hospital-11.png"));
|
||||||
|
_points[0x6409] = Point(QImage(":/dam-11.png"));
|
||||||
|
_points[0x640d] = Point(QImage(":/communications-tower-11.png"));
|
||||||
|
_points[0x640e] = Point(QImage(":/park-11.png"));
|
||||||
|
_points[0x640f] = Point(QImage(":/post-11.png"));
|
||||||
|
_points[0x6411] = Point(QImage(":/communications-tower-11.png"));
|
||||||
|
|
||||||
|
_points[0x6508] = Point(QImage(":/waterfall-11.png"));
|
||||||
|
_points[0x6513] = Point(QImage(":/wetland-11.png"));
|
||||||
|
_points[0x6604] = Point(QImage(":/beach-11.png"));
|
||||||
|
_points[0x6616] = Point(QImage(":/mountain-11.png"));
|
||||||
|
}
|
||||||
|
|
||||||
static bool readBitmap(SubFile *file, SubFile::Handle &hdl, QImage &img,
|
static bool readBitmap(SubFile *file, SubFile::Handle &hdl, QImage &img,
|
||||||
int bpp)
|
int bpp)
|
||||||
{
|
{
|
||||||
@ -248,6 +386,9 @@ bool Style::itemInfo(SubFile *file, SubFile::Handle &hdl,
|
|||||||
bool Style::parsePolygons(SubFile *file, SubFile::Handle &hdl,
|
bool Style::parsePolygons(SubFile *file, SubFile::Handle &hdl,
|
||||||
const Section §ion)
|
const Section §ion)
|
||||||
{
|
{
|
||||||
|
if (!section.arrayItemSize)
|
||||||
|
return section.arraySize ? false : true;
|
||||||
|
|
||||||
for (quint32 i = 0; i < section.arraySize / section.arrayItemSize; i++) {
|
for (quint32 i = 0; i < section.arraySize / section.arrayItemSize; i++) {
|
||||||
if (!file->seek(hdl, section.arrayOffset + i * section.arrayItemSize))
|
if (!file->seek(hdl, section.arrayOffset + i * section.arrayItemSize))
|
||||||
return false;
|
return false;
|
||||||
@ -361,6 +502,9 @@ bool Style::parsePolygons(SubFile *file, SubFile::Handle &hdl,
|
|||||||
bool Style::parseLines(SubFile *file, SubFile::Handle &hdl,
|
bool Style::parseLines(SubFile *file, SubFile::Handle &hdl,
|
||||||
const Section §ion)
|
const Section §ion)
|
||||||
{
|
{
|
||||||
|
if (!section.arrayItemSize)
|
||||||
|
return section.arraySize ? false : true;
|
||||||
|
|
||||||
for (quint32 i = 0; i < section.arraySize / section.arrayItemSize; i++) {
|
for (quint32 i = 0; i < section.arraySize / section.arrayItemSize; i++) {
|
||||||
if (!file->seek(hdl, section.arrayOffset + i * section.arrayItemSize))
|
if (!file->seek(hdl, section.arrayOffset + i * section.arrayItemSize))
|
||||||
return false;
|
return false;
|
||||||
@ -642,6 +786,9 @@ static bool readColorTable(SubFile *file, SubFile::Handle &hdl, QImage& img,
|
|||||||
bool Style::parsePoints(SubFile *file, SubFile::Handle &hdl,
|
bool Style::parsePoints(SubFile *file, SubFile::Handle &hdl,
|
||||||
const Section §ion)
|
const Section §ion)
|
||||||
{
|
{
|
||||||
|
if (!section.arrayItemSize)
|
||||||
|
return section.arraySize ? false : true;
|
||||||
|
|
||||||
for (quint32 i = 0; i < section.arraySize / section.arrayItemSize; i++) {
|
for (quint32 i = 0; i < section.arraySize / section.arrayItemSize; i++) {
|
||||||
if (!file->seek(hdl, section.arrayOffset + i * section.arrayItemSize))
|
if (!file->seek(hdl, section.arrayOffset + i * section.arrayItemSize))
|
||||||
return false;
|
return false;
|
||||||
@ -717,6 +864,9 @@ bool Style::parseDrawOrder(SubFile *file, SubFile::Handle &hdl,
|
|||||||
{
|
{
|
||||||
QList<quint32> drawOrder;
|
QList<quint32> drawOrder;
|
||||||
|
|
||||||
|
if (!order.arrayItemSize)
|
||||||
|
return order.arraySize ? false : true;
|
||||||
|
|
||||||
if (!file->seek(hdl, order.arrayOffset))
|
if (!file->seek(hdl, order.arrayOffset))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -790,6 +940,7 @@ Style::Style(SubFile *typ)
|
|||||||
{
|
{
|
||||||
defaultLineStyle();
|
defaultLineStyle();
|
||||||
defaultPolygonStyle();
|
defaultPolygonStyle();
|
||||||
|
defaultPointStyle();
|
||||||
|
|
||||||
if (typ && typ->isValid())
|
if (typ && typ->isValid())
|
||||||
parseTYPFile(typ);
|
parseTYPFile(typ);
|
||||||
@ -830,6 +981,42 @@ bool Style::isSpot(quint32 type)
|
|||||||
return (type == TYPE(0x62) || type == TYPE(0x63));
|
return (type == TYPE(0x62) || type == TYPE(0x63));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Style::isSummit(quint32 type)
|
||||||
|
{
|
||||||
|
return (type == 0x6616);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Style::isMajorRoad(quint32 type)
|
||||||
|
{
|
||||||
|
return (type <= TYPE(0x04));
|
||||||
|
}
|
||||||
|
|
||||||
|
Style::POIClass Style::poiClass(quint32 type)
|
||||||
|
{
|
||||||
|
if ((type >= 0x2a00 && type < 0x2b00) || type == 0x2c0a || type == 0x2d02)
|
||||||
|
return Food;
|
||||||
|
else if (type >= 0x2b00 && type < 0x2c00)
|
||||||
|
return Accommodation;
|
||||||
|
else if (type >= 0x2c00 && type < 0x2e00)
|
||||||
|
return Recreation;
|
||||||
|
else if (type >= 0x2e00 && type < 0x2f00)
|
||||||
|
return Shopping;
|
||||||
|
else if ((type >= 0x2f00 && type < 0x2f0f) || type == 0x2f17)
|
||||||
|
return Transport;
|
||||||
|
else if (type >= 0x2f0f && type < 0x3000)
|
||||||
|
return Services;
|
||||||
|
else if (type >= 0x3000 && type < 0x3100)
|
||||||
|
return Community;
|
||||||
|
else if (type >= 0x4000 && type < 0x6000)
|
||||||
|
return Elementary;
|
||||||
|
else if (type >= 0x6400 && type < 0x6500)
|
||||||
|
return ManmadePlaces;
|
||||||
|
else if (type >= 0x6500 && type < 0x6700)
|
||||||
|
return NaturePlaces;
|
||||||
|
else
|
||||||
|
return Unknown;
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_DEBUG
|
#ifndef QT_NO_DEBUG
|
||||||
static QString penColor(const QPen &pen)
|
static QString penColor(const QPen &pen)
|
||||||
{
|
{
|
||||||
|