mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
Compare commits
No commits in common. "33c45f845a233b831563c2a6b22caf1a70767f82" and "55de85579c31c3205109506bf3bdf391fa67033d" have entirely different histories.
33c45f845a
...
55de85579c
@ -1,4 +1,4 @@
|
|||||||
version: 13.20.{build}
|
version: 13.19.{build}
|
||||||
|
|
||||||
configuration:
|
configuration:
|
||||||
- Release
|
- Release
|
||||||
|
@ -3,7 +3,7 @@ unix:!macx:!android {
|
|||||||
} else {
|
} else {
|
||||||
TARGET = GPXSee
|
TARGET = GPXSee
|
||||||
}
|
}
|
||||||
VERSION = 13.20
|
VERSION = 13.19
|
||||||
|
|
||||||
|
|
||||||
QT += core \
|
QT += core \
|
||||||
|
@ -37,7 +37,7 @@ Unicode true
|
|||||||
; The name of the installer
|
; The name of the installer
|
||||||
Name "GPXSee"
|
Name "GPXSee"
|
||||||
; Program version
|
; Program version
|
||||||
!define VERSION "13.20"
|
!define VERSION "13.19"
|
||||||
|
|
||||||
; The file to write
|
; The file to write
|
||||||
OutFile "GPXSee-${VERSION}_x64.exe"
|
OutFile "GPXSee-${VERSION}_x64.exe"
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
using namespace Garmin;
|
using namespace Garmin;
|
||||||
using namespace IMG;
|
using namespace IMG;
|
||||||
|
|
||||||
|
enum Charset {Normal, Symbol, Special};
|
||||||
|
|
||||||
static bool isAllUpperCase(const QString &str)
|
static bool isAllUpperCase(const QString &str)
|
||||||
{
|
{
|
||||||
if (str.isEmpty())
|
if (str.isEmpty())
|
||||||
@ -161,7 +163,6 @@ Label LBLFile::str2label(const QVector<quint8> &str, bool capitalize,
|
|||||||
Label LBLFile::label6b(const SubFile *file, Handle &fileHdl, quint32 size,
|
Label LBLFile::label6b(const SubFile *file, Handle &fileHdl, quint32 size,
|
||||||
bool capitalize, bool convert) const
|
bool capitalize, bool convert) const
|
||||||
{
|
{
|
||||||
enum Charset {Normal, Symbol, Special};
|
|
||||||
static const quint8 NORMAL_CHARS[] = {
|
static const 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',
|
||||||
@ -189,7 +190,7 @@ Label LBLFile::label6b(const SubFile *file, Handle &fileHdl, quint32 size,
|
|||||||
Shield::Type shieldType = Shield::None;
|
Shield::Type shieldType = Shield::None;
|
||||||
QByteArray label, shieldLabel;
|
QByteArray label, shieldLabel;
|
||||||
QByteArray *bap = &label;
|
QByteArray *bap = &label;
|
||||||
Charset charset = Normal;
|
Charset curCharSet = Normal;
|
||||||
quint8 b1, b2, b3;
|
quint8 b1, b2, b3;
|
||||||
int split = -1;
|
int split = -1;
|
||||||
|
|
||||||
@ -201,7 +202,7 @@ Label LBLFile::label6b(const SubFile *file, Handle &fileHdl, quint32 size,
|
|||||||
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 || (charset == Normal && c[cpt] == 0x1d)) {
|
if (c[cpt] > 0x2f || (curCharSet == Normal && c[cpt] == 0x1d)) {
|
||||||
if (split >= 0)
|
if (split >= 0)
|
||||||
label = label.left(split) + ft2m(label.mid(split));
|
label = label.left(split) + ft2m(label.mid(split));
|
||||||
else if (convert)
|
else if (convert)
|
||||||
@ -210,12 +211,12 @@ Label LBLFile::label6b(const SubFile *file, Handle &fileHdl, quint32 size,
|
|||||||
return Label(capitalize && isAllUpperCase(text)
|
return Label(capitalize && isAllUpperCase(text)
|
||||||
? capitalized(text) : text, Shield(shieldType, shieldLabel));
|
? capitalized(text) : text, Shield(shieldType, shieldLabel));
|
||||||
}
|
}
|
||||||
switch (charset) {
|
switch (curCharSet) {
|
||||||
case Normal:
|
case Normal:
|
||||||
if (c[cpt] == 0x1c)
|
if (c[cpt] == 0x1c)
|
||||||
charset = Symbol;
|
curCharSet = Symbol;
|
||||||
else if (c[cpt] == 0x1b)
|
else if (c[cpt] == 0x1b)
|
||||||
charset = Special;
|
curCharSet = Special;
|
||||||
else if (c[cpt] >= 0x1e && c[cpt] <= 0x1f) {
|
else if (c[cpt] >= 0x1e && c[cpt] <= 0x1f) {
|
||||||
if (bap == &shieldLabel)
|
if (bap == &shieldLabel)
|
||||||
bap = &label;
|
bap = &label;
|
||||||
@ -236,11 +237,11 @@ Label LBLFile::label6b(const SubFile *file, Handle &fileHdl, quint32 size,
|
|||||||
break;
|
break;
|
||||||
case Symbol:
|
case Symbol:
|
||||||
bap->append(SYMBOL_CHARS[c[cpt]]);
|
bap->append(SYMBOL_CHARS[c[cpt]]);
|
||||||
charset = Normal;
|
curCharSet = Normal;
|
||||||
break;
|
break;
|
||||||
case Special:
|
case Special:
|
||||||
bap->append(SPECIAL_CHARS[c[cpt]]);
|
bap->append(SPECIAL_CHARS[c[cpt]]);
|
||||||
charset = Normal;
|
curCharSet = Normal;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user