Commit Graph

52 Commits

Author SHA1 Message Date
Ladislav Michl
95b37fa806 Base: Do not use else before return 2024-01-21 16:14:12 +01:00
hasecilu
af6477205b [Base/Units] Change strings' description
Affect strings presented to the user on the combobox to select unit system.

- The symbol to represent angles on "degree" unit is '°'
- Change imperial velocity to "ft/s" to enforce the use of 's' symnbol as second
2023-12-19 16:35:22 -06:00
wmayer
f539138dd9 fix readability-*:
* readability-const-return-type
* readability-container-data-pointer
* readability-container-size-empty
* readability-delete-null-pointer
* readability-else-after-return
* readability-inconsistent-declaration-parameter-name
* readability-redundant-member-init
* readability-redundant-smartptr-get
* readability-redundant-string-cstr
* readability-use-anyofallof
* readability-static-definition-in-anonymous-namespace
* readability-static-accessed-through-instance
* readability-simplify-boolean-expr
2023-11-16 01:22:08 +01:00
pre-commit-ci[bot]
6a66034ce2 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-11-16 00:24:09 +01:00
wandererfan
7194c29a81 [Units]Add Meters-only schema (#7395)
- use correct unit for velocity

- typo in include guard
2023-11-16 00:24:09 +01:00
wmayer
e85c383bff Base: apply clang format 2023-11-13 12:01:26 -05:00
wmayer
010dca8303 Base: C++ core guidelines: init variables 2023-08-24 18:48:52 +02:00
Chris Hennes
001c79f459 Gui: Translate unit system UI 2023-05-15 20:16:46 -05:00
wmayer
0c2fdd64f4 Base: [skip ci] fix readability-identifier-length 2022-11-19 16:54:08 +01:00
wandererfan
7745a5aca0 [Units]Allow querying schema for unit of measure 2022-11-19 16:49:46 +01:00
wandererfan
16ff6dfbbb [Base]identify schemas which use multiple units
- allow querying a schema to determine if it uses multiple
  units for length (ex ft/in) or angles (ex DMS).
2022-08-31 16:31:27 -04:00
wmayer
6c1e940b69 Base: use forward declaration instead of including Python.h 2022-03-03 19:18:07 +01:00
Uwe
9ec0bcdcf2 [Base] Units and Uui: remove unused includes 2022-02-24 11:08:56 +01:00
wmayer
243f81fd94 Base: harmonize UnitsApi::toString/UnitsApi::toNumber with UnitsSchema::toLocale 2022-02-06 12:47:13 +01:00
wmayer
5f8bb65757 Base: [skip ci] fix inconsistency in overloaded UnitsApi::toNumber() 2022-02-06 08:49:50 +01:00
wmayer
cbc60a3f44 Base: clean-up code in UnitsApi 2022-01-25 00:26:47 +01:00
Syres916
e215c22519 [Base] Remove one unnecessary precision level 2021-08-12 11:13:29 +01:00
Syres916
463ff88a57 [Base] Increase precision 2021-08-12 10:55:50 +01:00
luz paz
142c2c2c4d Base: remove Py2 code 2021-04-26 09:23:58 +02:00
wmayer
e084df62b9 Base: add convenience functions to create a QString from quantity 2021-04-20 14:56:29 +02:00
wmayer
cd9319f125 Base: add convenience functions to create a QString from quantity or double 2021-04-20 14:07:20 +02:00
Benjamin Nauck
f6c9cc90ee [Base] Remove includes to StdStlTools.h as that's not needed anymore
std::make_unique was introduced in c++14, so no need to use the back
ported version
2021-03-06 21:20:32 +01:00
luz paz
d5f6c096b8 Base: Fix header uniformity, whitespace, and doxygen
[skip ci]
2020-11-22 18:12:16 +01:00
Bernd Hahnebach
7852957623 Base: add new unit schema for mm and N for use in FEM 2020-08-07 19:19:44 +02:00
luz.paz
6f11ed298a src/Base: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/Base` files
2019-12-25 11:38:58 +01:00
donovaly
ce56205ed0 more fixes for the UnitsCalculator
- we must read out the unit system description UTF8 to get the characters ² and ³
- update unit system description according to today's unit "cft" addition
- don't hardcode the unit system descriptions in the .ui file
- add acceleration to imperial schema
2019-12-24 13:31:13 +01:00
wmayer
04b54cd6a5 Base: [skip ci] replace raw pointers of UnitsSchema with unique_ptr 2019-12-21 10:45:22 +01:00
wmayer
4bcb43ebd2 Base: [skip ci] make UnitSystem an enum class 2019-12-21 10:10:19 +01:00
wandererfan
00e6e376c9 Add ImperialCivil Units Schema
- units for civil engineering - ft, ft2, ft3, mph,
  and angles as degrees/minutes/seconds
2018-12-06 08:57:17 -03:00
luz.paz
505488c4f9 Misc. typos
Found via `codespell`
2018-04-25 09:41:33 -03:00
Unknown
a8ecffb652 Misc. typo fixes
Various workbenches
2017-12-23 14:30:30 +01:00
wmayer
49d75f88be fix warning 2017-08-13 16:58:06 +02:00
wmayer
892e78d445 extend Python api of units:
+ get list of all available schemas
+ get currently set schema
+ translate a quantity to a given schema
2017-08-13 16:55:00 +02:00
Itai Nahshon
a91c5bbae7 Add UnitsSchemaMmMin - izes are only in mm, speed in mm/munute. 2017-07-18 17:41:36 +02:00
Yorik van Havre
0e9e49cbcc py3: Base: files R-Z ported to python3
issue 0000995
2017-05-21 12:35:41 +02:00
wmayer
1673ab801e use specialized exception classes 2017-04-28 18:49:11 +02:00
wmayer
f408f3180b fix -Wextra in FreeCADBase 2016-09-21 15:02:02 +02:00
wmayer
f39b89a54d add class QuantityFormat to control user string of Quantity
do some code refactoration to reduce duplicate code
2016-08-06 19:06:29 +02:00
Yorik van Havre
ad92a2df25 Added new units schema: US building (feet + inches + fraction) 2016-05-26 20:37:53 -03:00
Yorik van Havre
ee9452a8ee Added new units schema: Building Euro (everything in centimeters, areas/volumes in meters) 2016-05-25 19:10:48 -03:00
Mateusz Skowroński
cd2db00f22 QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:25 +01:00
wmayer
346e5c6a77 + fix more compiler warnings 2014-08-27 13:26:44 +02:00
wmayer
e8724884d0 + add further log messages at startup for better troubleshooting, fix possible crash, fix typos 2014-07-01 11:03:55 +02:00
jriegel
aa5a2e1b3f New Unit-Schema ImperialDecimal 2014-04-15 18:25:00 +02:00
jriegel
53f74153ea Imperial Sketcher grid in Dialog 2013-12-16 15:09:43 +01:00
jriegel
eb5cc8ed6c Implement the three major unit system schemas 2013-12-05 18:16:31 +01:00
jriegel
f58ea31b6a Some fixes in the unit system 2013-12-03 19:57:29 +01:00
jriegel
87c4741fac new userString methode 2013-12-03 19:03:12 +01:00
jriegel
3a3afa0783 Switching the UnitsApi to the new Quantity system 2013-12-03 19:03:08 +01:00
jriegel
44c07da571 integrate Quantities into PropertyView and activate preferences again 2013-09-25 21:59:24 +02:00