Commit Graph

141 Commits

Author SHA1 Message Date
Mat Sutcliffe
b1185eb541 Issue #77 toIcon returns a simple enum instead of a full object 2020-12-19 18:50:31 +00:00
Mat Sutcliffe
f2eba38282 Use QString::arg instead of std::sprintf 2020-12-15 23:35:57 +00:00
Mat Sutcliffe
40362c1f4a Use sprintf to decompose the degrees, minutes, and seconds
Instead of repeatedly multiplying by 100, which can cause
epsilon errors to grow to too significant magnitudes.
2020-12-08 21:02:19 +00:00
Mat Sutcliffe
515dc7fef1 Issue #77 Move QPair typedefs to their corresponding value type headers 2020-08-29 14:16:21 +01:00
Mat Sutcliffe
39e9e6f128 Issue #77 Break dependency of icon on angle 2020-08-29 14:16:20 +01:00
Mat Sutcliffe
b80114213d Issue #77 Move mixin classes to separate files
By separating them from unrelated code, their dependents
can use them without depending on unrelated code, which
in turn helps to reduce cyclic dependencies.
2020-08-29 14:16:17 +01:00
Mat Sutcliffe
4eb496c8e3 Issue #77 Remove pointless function 2020-08-29 14:16:13 +01:00
Mat Sutcliffe
2ae0352e75 [doxygen] Fix broken groupings 2020-08-01 19:48:37 +01:00
Lars Toenning
6cf7571dff Add user-defined literals for physical quantities
Fixes #14
2020-07-17 10:33:01 +02:00
Lars Toenning
368dd1f46d [PQ] Add unary minus operator 2020-07-17 10:33:01 +02:00
Klaus Basan
0a2b25e409 [PQ] Parsing with default unit, bug fixed 2020-06-12 18:42:51 +01:00
Klaus Basan
9b031bb582 [PQ] Allow to provide a default unit for parsing, e.g. "0" -> "0ft" 2020-06-12 18:42:47 +01:00
Klaus Basan
5bc09ed2c8 [PQ] added static "parsedFromString" 2020-06-12 18:42:41 +01:00
Klaus Basan
b9c6541a55 Add default unit for "rec.gnd.positions" radius
* utility functions
* append default unit to PQ string if needed
2020-06-12 18:42:25 +01:00
Mat Sutcliffe
4a0d8e9864 Fixed most Qt 5.14 deprecation warnings 2020-01-07 19:57:25 +00:00
Klaus Basan
ae5ede5667 [PQ] Rounding to int as discussed here https://discordapp.com/channels/539048679160676382/623947987822837779/642145431794745344 2020-01-07 19:46:18 +00:00
Klaus Basan
9b27041684 Ref T717, return "null" for null PQ 2019-09-16 22:41:36 +01:00
Mat Sutcliffe
35b0836754 Ref T696 Fix number formatting for CTime and CAngle.
- Removed the 'L' in the format strings, so the C locale is used.
- Added `1 + digits` to the `fieldWidth`, as this actually includes the
  decimal point and the digits after it.
2019-09-16 22:40:13 +01:00
Klaus Basan
693c94c87a Send FP altitude without unit
https://discordapp.com/channels/539048679160676382/539846348275449887/593211815559823367
https://discordapp.com/channels/539048679160676382/539846348275449887/593063154238619649
2019-09-16 22:40:01 +01:00
Klaus Basan
4ecd8a78ad Handled some potentially "dangerous" parsing issues for VATSIM file (no coordinate)
https://discordapp.com/channels/539048679160676382/539486489977946112/593081121512751116
2019-09-16 22:40:00 +01:00
Klaus Basan
daeea07090 Ref T683, style 2019-09-16 22:39:49 +01:00
Mat Sutcliffe
6d9f9a286d Ref T552 Using QDataStream marshalling mixins in value classes. 2019-04-12 13:30:55 +01:00
Mat Sutcliffe
980e1d7b80 Restored constexpr initialization and return-by-value of CMeasurementUnit constants
that were removed by commit 787b54108e.

For rationale, see the commits fef2bc528e, c8d78ada65, 07ec7e6bc1 where these
were originally introduced.
2019-04-12 13:30:48 +01:00
Mat Sutcliffe
e5e6c53c82 Fixed buggy implementation of CPhysicalQuantity::lessThan.
This bug could cause a variant containing a list containing a null PQ
to compare equal to a variant containing a list containing a non-null PQ.
2019-04-11 22:12:04 +01:00
Mat Sutcliffe
38fe2d1c49 Removed null check in CPhysicalQuantity::compareImpl as it was wrong and useless. 2019-04-11 22:12:04 +01:00
Mat Sutcliffe
798a0b8f06 Using friend function comparison and arithmetic operators, for parameter symmetry. 2019-04-11 22:12:03 +01:00
Klaus Basan
246d9abca8 Ref T578, CG null and DB key improvements 2019-04-11 22:12:02 +01:00
Mat Sutcliffe
83dec5408b Ref T557 Metaclass flag to preserve measurement unit when marshalling PQ's in flight plans. 2019-04-11 22:11:35 +01:00
Klaus Basan
3e0d318a48 Ref T554, PQ "valueRoundedAsString" 2019-04-11 22:11:33 +01:00
Mat Sutcliffe
e9a4c49d68 Ref T547 Update license masthead in all source code files. 2019-02-22 20:36:43 +00:00
Klaus Basan
d713e8a264 Angle, added 360deg functions + formatting 2019-02-22 20:35:55 +00:00
Mat Sutcliffe
1493106970 Style: removed outdated comments and includes. 2019-02-22 20:35:15 +00:00
Klaus Basan
d89b217e9b PQ parsing using "best guess" strategy as default plus renamings 2019-02-22 20:23:54 +00:00
Mat Sutcliffe
6c05c5249d When calling arg() on a QString constructed from a literal, use QStringLiteral. 2019-02-22 20:23:47 +00:00
Mat Sutcliffe
20d4575c55 Suppressed clazy false positive: qHash namespace. 2019-02-22 20:23:35 +00:00
Klaus Basan
7807a05f2a Ref T429, functions for angle, heading and situation
* normalize angle -180/+180 when set on situation
* clamp vector function
2018-11-16 02:49:53 +01:00
Klaus Basan
ef21ec67f3 Ref T424, PQ strings without (thousand) separators
* separator can cause issue when sending data (WebService, FSD)
* re-parsing (print and parse again) can cause to undesired results as the separator is mistaken as decimal separator with a different locale
* separator now a parameter so it can still be used
2018-11-06 01:41:48 +01:00
Klaus Basan
8a59aa5a3b Ref T415, parse/conversion functions for CTime 2018-11-04 17:42:46 +01:00
Klaus Basan
8f6b6229fb CLANG fixes for measurement unit 2018-09-12 17:40:22 +02:00
Klaus Basan
a9d728f451 Ref T338, utility functions / parsing
- nthIndexOf
- measurement unit can be parsed case insensitive
- CSimpleCommandParser::remainingStringAfter from n-th space
- improved frequency parsing
2018-09-12 17:01:41 +02:00
Klaus Basan
3d2d999f7a Ref T338, style 2018-09-09 02:55:16 +02:00
Roland Winklmeier
29f464189b Move template in-class function definitions out of class
Keeping them defined in-class caused linker issues with the extern template
declaration in a non-optimized MinGW debug build. Apparently it did not
inline them but instead relied on the extern declaration and expected
them defined somewhere else.
2018-08-31 20:08:14 +02:00
Roland Winklmeier
5e38936fd2 Fix weak vtables 2018-08-25 22:12:06 +02:00
Roland Winklmeier
ca9a2e5fd1 Fix floating point comparison 2018-08-25 22:12:03 +02:00
Roland Winklmeier
08e06c6ed1 Fix float to double conversion 2018-08-25 22:12:02 +02:00
Klaus Basan
ee181d6425 PQ string parsing improvements 2018-08-09 03:43:57 +02:00
Klaus Basan
1f17b49e6a Ref T297, allow "null" values as value 2018-08-07 20:41:08 +02:00
Klaus Basan
d489bed370 Ref T268, compare for PQs 2018-07-10 17:17:21 +02:00
Klaus Basan
c168262159 Ref T275, utility functions in simulated aircraft, sim object .. 2018-07-09 22:30:21 +02:00
Klaus Basan
fc1a2bbb0f Ref T275, Ref T280, avoid nan (not a number) values in PQs/elevation 2018-06-20 00:58:45 +02:00