comparison base/Preferences.cpp @ 141:4f26f623a8bc

* Finish preferences dialog (as far as it's going at the moment) and connect it up * Fix Parzen window shape (was triangular!) * Various fixes to spectrogram draw coordinates in smoothing mode etc * Draw C keys in grey on the piano
author Chris Cannam
date Fri, 21 Jul 2006 16:03:42 +0000
parents a35098a9c814
children 0ba66b160a02
comparison
equal deleted inserted replaced
140:a35098a9c814 141:4f26f623a8bc
39 39
40 QString 40 QString
41 Preferences::getPropertyLabel(const PropertyName &name) const 41 Preferences::getPropertyLabel(const PropertyName &name) const
42 { 42 {
43 if (name == "Smooth Spectrogram") { 43 if (name == "Smooth Spectrogram") {
44 return tr("Spectrogram Display Smoothing"); 44 return tr("Smooth spectrogram display by zero padding FFT");
45 } 45 }
46 if (name == "Tuning Frequency") { 46 if (name == "Tuning Frequency") {
47 return tr("Tuning Frequency (concert A)"); 47 return tr("Frequency of concert A");
48 } 48 }
49 if (name == "Property Box Layout") { 49 if (name == "Property Box Layout") {
50 return tr("Arrangement of Layer Properties"); 50 return tr("Property box layout");
51 } 51 }
52 if (name == "Window Type") { 52 if (name == "Window Type") {
53 return tr("Spectral Analysis Window Shape"); 53 return tr("Spectral analysis window shape");
54 } 54 }
55 return name; 55 return name;
56 } 56 }
57 57
58 Preferences::PropertyType 58 Preferences::PropertyType
103 QString 103 QString
104 Preferences::getPropertyValueLabel(const PropertyName &name, 104 Preferences::getPropertyValueLabel(const PropertyName &name,
105 int value) const 105 int value) const
106 { 106 {
107 if (name == "Property Box Layout") { 107 if (name == "Property Box Layout") {
108 if (value == 0) return tr("Vertically Stacked"); 108 if (value == 0) return tr("Show boxes for all panes");
109 else return tr("Layered"); 109 else return tr("Show box for current pane only");
110 } 110 }
111 if (name == "Window Type") { 111 if (name == "Window Type") {
112 switch (WindowType(value)) { 112 switch (WindowType(value)) {
113 case RectangularWindow: return tr("Rectangular"); 113 case RectangularWindow: return tr("Rectangular");
114 case BartlettWindow: return tr("Bartlett"); 114 case BartlettWindow: return tr("Triangular");
115 case HammingWindow: return tr("Hamming"); 115 case HammingWindow: return tr("Hamming");
116 case HanningWindow: return tr("Hanning"); 116 case HanningWindow: return tr("Hanning");
117 case BlackmanWindow: return tr("Blackman"); 117 case BlackmanWindow: return tr("Blackman");
118 case GaussianWindow: return tr("Gaussian"); 118 case GaussianWindow: return tr("Gaussian");
119 case ParzenWindow: return tr("Parzen"); 119 case ParzenWindow: return tr("Parzen");
151 void 151 void
152 Preferences::setSmoothSpectrogram(bool smooth) 152 Preferences::setSmoothSpectrogram(bool smooth)
153 { 153 {
154 if (m_smoothSpectrogram != smooth) { 154 if (m_smoothSpectrogram != smooth) {
155 m_smoothSpectrogram = smooth; 155 m_smoothSpectrogram = smooth;
156 //!!! emit 156 emit propertyChanged("Smooth Spectrogram");
157 } 157 }
158 } 158 }
159 159
160 void 160 void
161 Preferences::setTuningFrequency(float freq) 161 Preferences::setTuningFrequency(float freq)
162 { 162 {
163 if (m_tuningFrequency != freq) { 163 if (m_tuningFrequency != freq) {
164 m_tuningFrequency = freq; 164 m_tuningFrequency = freq;
165 //!!! emit 165 emit propertyChanged("Tuning Frequency");
166 } 166 }
167 } 167 }
168 168
169 void 169 void
170 Preferences::setPropertyBoxLayout(PropertyBoxLayout layout) 170 Preferences::setPropertyBoxLayout(PropertyBoxLayout layout)
171 { 171 {
172 if (m_propertyBoxLayout != layout) { 172 if (m_propertyBoxLayout != layout) {
173 m_propertyBoxLayout = layout; 173 m_propertyBoxLayout = layout;
174 //!!! emit 174 emit propertyChanged("Property Box Layout");
175 } 175 }
176 } 176 }
177 177
178 void 178 void
179 Preferences::setWindowType(WindowType type) 179 Preferences::setWindowType(WindowType type)
180 { 180 {
181 if (m_windowType != type) { 181 if (m_windowType != type) {
182 m_windowType = type; 182 m_windowType = type;
183 //!!! emit 183 emit propertyChanged("Window Type");
184 } 184 }
185 } 185 }
186 186