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
std::optional< LengthUnit > getActualModelLengthUnit()
char getThousandsSeparator()
DegreesMode getDegreesMode()
Angle:
int getUiLengthPrecision()
Precision:
void resetToDefaults()
Reset to some sane default.
void setUiLengthPrecision(int precision)
void setShowLeadingZero(bool show)
int getUiAnglePrecision()
void setThousandsSeparator(char ch)
bool getShowLeadingZero()
Common:
void setModelLengthUnit(std::optional< LengthUnit > unit)
void setDegreesMode(DegreesMode mode, bool setPreferredPrecision)
void setUiLengthUnit(std::optional< LengthUnit > unit, bool setPreferredLeadingZero)
int getUiRatioPrecision()
std::optional< LengthUnit > getModelLengthUnit()
std::optional< LengthUnit > getUiLengthUnit()
Length:
void setUiRatioPrecision(int precision)
void setUiAnglePrecision(int precision)