Mercurial > hg > svcore
comparison base/Preferences.h @ 156:059b0322009c
* Replace all uses of ConfigFile with QSettings
author | Chris Cannam |
---|---|
date | Thu, 03 Aug 2006 16:04:00 +0000 |
parents | 82f529a08cf3 |
children | da3701a3953e |
comparison
equal
deleted
inserted
replaced
155:ae9be6b6b522 | 156:059b0322009c |
---|---|
18 | 18 |
19 #include "PropertyContainer.h" | 19 #include "PropertyContainer.h" |
20 | 20 |
21 #include "Window.h" | 21 #include "Window.h" |
22 | 22 |
23 class ConfigFile; | |
24 | |
25 class Preferences : public PropertyContainer | 23 class Preferences : public PropertyContainer |
26 { | 24 { |
27 Q_OBJECT | 25 Q_OBJECT |
28 | 26 |
29 public: | 27 public: |
30 static Preferences *getInstance() { return m_instance; } | 28 static Preferences *getInstance(); |
31 | 29 |
32 virtual PropertyList getProperties() const; | 30 virtual PropertyList getProperties() const; |
33 virtual QString getPropertyLabel(const PropertyName &) const; | 31 virtual QString getPropertyLabel(const PropertyName &) const; |
34 virtual PropertyType getPropertyType(const PropertyName &) const; | 32 virtual PropertyType getPropertyType(const PropertyName &) const; |
35 virtual int getPropertyRangeAndValue(const PropertyName &, int *, int *) const; | 33 virtual int getPropertyRangeAndValue(const PropertyName &, int *, int *) const; |
38 virtual QString getPropertyContainerIconName() const; | 36 virtual QString getPropertyContainerIconName() const; |
39 | 37 |
40 bool getSmoothSpectrogram() const { return m_smoothSpectrogram; } | 38 bool getSmoothSpectrogram() const { return m_smoothSpectrogram; } |
41 float getTuningFrequency() const { return m_tuningFrequency; } | 39 float getTuningFrequency() const { return m_tuningFrequency; } |
42 WindowType getWindowType() const { return m_windowType; } | 40 WindowType getWindowType() const { return m_windowType; } |
43 | |
44 ConfigFile *getConfigFile() { return m_configFile; } | |
45 | 41 |
46 //!!! harmonise with PaneStack | 42 //!!! harmonise with PaneStack |
47 enum PropertyBoxLayout { | 43 enum PropertyBoxLayout { |
48 VerticallyStacked, | 44 VerticallyStacked, |
49 Layered | 45 Layered |
66 | 62 |
67 bool m_smoothSpectrogram; | 63 bool m_smoothSpectrogram; |
68 float m_tuningFrequency; | 64 float m_tuningFrequency; |
69 PropertyBoxLayout m_propertyBoxLayout; | 65 PropertyBoxLayout m_propertyBoxLayout; |
70 WindowType m_windowType; | 66 WindowType m_windowType; |
71 ConfigFile *m_configFile; | |
72 }; | 67 }; |
73 | 68 |
74 #endif | 69 #endif |