MeshLib C++ Docs
Loading...
Searching...
No Matches
MRUnitSettings.h
Go to the documentation of this file.
1#pragma once
2
3#include "exports.h"
4#include "MRUnits.h"
5
7
9{
10
12MRVIEWER_API void resetToDefaults();
13
15
17[[nodiscard]] MRVIEWER_API bool getShowLeadingZero();
18MRVIEWER_API void setShowLeadingZero( bool show );
19
22[[nodiscard]] MRVIEWER_API char getThousandsSeparator();
23MRVIEWER_API void setThousandsSeparator( char ch );
24
26
31[[nodiscard]] MRVIEWER_API std::optional<LengthUnit> getUiLengthUnit();
32MRVIEWER_API void setUiLengthUnit( std::optional<LengthUnit> unit, bool setPreferredLeadingZero );
33
37[[nodiscard]] MRVIEWER_API std::optional<LengthUnit> getModelLengthUnit();
38MRVIEWER_API void setModelLengthUnit( std::optional<LengthUnit> unit );
39
43[[nodiscard]] MRVIEWER_API std::optional<LengthUnit> getActualModelLengthUnit();
44
46
47[[nodiscard]] MRVIEWER_API DegreesMode getDegreesMode();
48MRVIEWER_API void setDegreesMode( DegreesMode mode, bool setPreferredPrecision );
49
51
54[[nodiscard]] MRVIEWER_API int getUiLengthPrecision();
55MRVIEWER_API void setUiLengthPrecision( int precision );
56
57[[nodiscard]] MRVIEWER_API int getUiAnglePrecision();
58MRVIEWER_API void setUiAnglePrecision( int precision );
59
60[[nodiscard]] MRVIEWER_API int getUiRatioPrecision();
61MRVIEWER_API void setUiRatioPrecision( int precision );
62
63}
DegreesMode
This controls how the degrees are printed.
Definition MRUnits.h:53
This abstracts away the UI measurement unit configuration. Internally this uses setDefaultUnitParams(...
Definition MRUnitSettings.h:9
MRVIEWER_API char getThousandsSeparator()
MRVIEWER_API void setThousandsSeparator(char ch)
MRVIEWER_API void setDegreesMode(DegreesMode mode, bool setPreferredPrecision)
MRVIEWER_API int getUiRatioPrecision()
MRVIEWER_API void setUiAnglePrecision(int precision)
MRVIEWER_API DegreesMode getDegreesMode()
Angle:
MRVIEWER_API void setShowLeadingZero(bool show)
MRVIEWER_API void setUiRatioPrecision(int precision)
MRVIEWER_API std::optional< LengthUnit > getUiLengthUnit()
Length:
MRVIEWER_API std::optional< LengthUnit > getActualModelLengthUnit()
MRVIEWER_API void setUiLengthPrecision(int precision)
MRVIEWER_API bool getShowLeadingZero()
Common:
MRVIEWER_API void setModelLengthUnit(std::optional< LengthUnit > unit)
MRVIEWER_API void setUiLengthUnit(std::optional< LengthUnit > unit, bool setPreferredLeadingZero)
MRVIEWER_API void resetToDefaults()
Reset to some sane default.
MRVIEWER_API std::optional< LengthUnit > getModelLengthUnit()
MRVIEWER_API int getUiAnglePrecision()
MRVIEWER_API int getUiLengthPrecision()
Precision: