Numworks Epsilon  1.4.1
Graphing Calculator Operating System
preferences.cpp
Go to the documentation of this file.
1 #include <poincare/preferences.h>
2 #include <poincare/complex.h>
3 
4 namespace Poincare {
5 
7  m_angleUnit(Expression::AngleUnit::Degree),
8  m_displayMode(PrintFloat::Mode::Decimal),
9  m_complexFormat(Expression::ComplexFormat::Cartesian),
10  m_numberOfSignificantDigits(PrintFloat::k_numberOfPrintedSignificantDigits)
11 {
12 }
13 
15  static Preferences preferences;
16  return &preferences;
17 }
18 
20  return m_angleUnit;
21 }
22 
24  m_angleUnit = angleUnit;
25 }
26 
28  return m_displayMode;
29 }
30 
32  m_displayMode = mode;
33 }
34 
36  return m_complexFormat;
37 }
38 
40  m_complexFormat = complexFormat;
41 }
42 
44  return m_numberOfSignificantDigits;
45 }
46 
47 void Preferences::setNumberOfSignificantDigits(char numberOfSignificantDigits) {
48  m_numberOfSignificantDigits = numberOfSignificantDigits;
49 }
50 
51 }
static Preferences * sharedPreferences()
Definition: preferences.cpp:14
Expression::AngleUnit angleUnit() const
Definition: preferences.cpp:19
Expression::ComplexFormat complexFormat() const
Definition: preferences.cpp:35
constexpr Expression::ComplexFormat Cartesian
void setAngleUnit(Expression::AngleUnit angleUnit)
Definition: preferences.cpp:23
void setComplexFormat(Expression::ComplexFormat complexFormat)
Definition: preferences.cpp:39
void setNumberOfSignificantDigits(char numberOfSignificantDigits)
Definition: preferences.cpp:47
char numberOfSignificantDigits() const
Definition: preferences.cpp:43
PrintFloat::Mode displayMode() const
Definition: preferences.cpp:27
constexpr Poincare::Expression::AngleUnit Degree
Definition: helper.h:3
void setDisplayMode(PrintFloat::Mode mode)
Definition: preferences.cpp:31