| 205 | } |
| 206 | |
| 207 | void FrequencyPlotDialog::Populate() |
| 208 | { |
| 209 | SetTitle(FrequencyAnalysisTitle); |
| 210 | |
| 211 | TranslatableStrings algChoices{ |
| 212 | XO("Spectrum") , |
| 213 | XO("Standard Autocorrelation") , |
| 214 | XO("Cuberoot Autocorrelation") , |
| 215 | XO("Enhanced Autocorrelation") , |
| 216 | /* i18n-hint: This is a technical term, derived from the word |
| 217 | * "spectrum". Do not translate it unless you are sure you |
| 218 | * know the correct technical word in your language. */ |
| 219 | XO("Cepstrum") , |
| 220 | }; |
| 221 | |
| 222 | TranslatableStrings sizeChoices{ |
| 223 | Verbatim( "128" ) , |
| 224 | Verbatim( "256" ) , |
| 225 | Verbatim( "512" ) , |
| 226 | Verbatim( "1024" ) , |
| 227 | Verbatim( "2048" ) , |
| 228 | Verbatim( "4096" ) , |
| 229 | Verbatim( "8192" ) , |
| 230 | Verbatim( "16384" ) , |
| 231 | Verbatim( "32768" ) , |
| 232 | Verbatim( "65536" ) , |
| 233 | Verbatim( "131072" ) , |
| 234 | }; |
| 235 | |
| 236 | TranslatableStrings funcChoices; |
| 237 | for (int i = 0, cnt = NumWindowFuncs(); i < cnt; i++) |
| 238 | { |
| 239 | funcChoices.push_back( |
| 240 | /* i18n-hint: This refers to a "window function", |
| 241 | * such as Hann or Rectangular, used in the |
| 242 | * Frequency analyze dialog box. */ |
| 243 | XO("%s window").Format( WindowFuncName(i) ) ); |
| 244 | } |
| 245 | |
| 246 | TranslatableStrings axisChoices{ |
| 247 | XO("Linear frequency") , |
| 248 | XO("Log frequency") , |
| 249 | }; |
| 250 | |
| 251 | mFreqFont = wxFont(fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL); |
| 252 | mArrowCursor = std::make_unique<wxCursor>(wxCURSOR_ARROW); |
| 253 | mCrossCursor = std::make_unique<wxCursor>(wxCURSOR_CROSS); |
| 254 | |
| 255 | long size; |
| 256 | // reinterpret one of the verbatim strings above as a number |
| 257 | sizeChoices[mSize].MSGID().GET().ToLong(&size); |
| 258 | mWindowSize = size; |
| 259 | |
| 260 | dBRange = DecibelScaleCutoff.Read(); |
| 261 | if(dBRange < 90.) |
| 262 | dBRange = 90.; |
| 263 | |
| 264 | ShuttleGui S(this, eIsCreating); |
no test coverage detected