MCPcopy Create free account
hub / github.com/audacity/audacity / TransferDataToWindow

Method TransferDataToWindow

src/effects/NoiseReduction.cpp:645–677  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

643}
644
645bool EffectNoiseReduction::Dialog::TransferDataToWindow()
646{
647 // Do the choice controls:
648 if (!EffectDialog::TransferDataToWindow())
649 return false;
650
651 for (int id = FIRST_SLIDER; id < END_OF_SLIDERS; id += 2) {
652 wxSlider* slider =
653 static_cast<wxSlider*>(wxWindow::FindWindowById(id, this));
654 wxTextCtrl* text =
655 static_cast<wxTextCtrl*>(wxWindow::FindWindowById(id + 1, this));
656 const ControlInfo &info = controlInfo()[(id - FIRST_SLIDER) / 2];
657 const double field = mTempSettings.*(info.field);
658 text->SetValue(info.Text(field));
659 slider->SetValue(info.SliderSetting(field));
660 }
661
662 mKeepSignal->SetValue(mTempSettings.mNoiseReductionChoice == NRC_REDUCE_NOISE);
663#ifdef ISOLATE_CHOICE
664 mKeepNoise->SetValue(mTempSettings.mNoiseReductionChoice == NRC_ISOLATE_NOISE);
665#endif
666#ifdef RESIDUE_CHOICE
667 mResidue->SetValue(mTempSettings.mNoiseReductionChoice == NRC_LEAVE_RESIDUE);
668#endif
669
670 // Set the enabled states of controls
671 DisableControlsIfIsolating();
672#ifdef ADVANCED_SETTINGS
673 EnableDisableSensitivityControls();
674#endif
675
676 return true;
677}
678
679bool EffectNoiseReduction::Dialog::TransferDataFromWindow()
680{

Callers

nothing calls this directly

Calls 4

controlInfoFunction · 0.85
TextMethod · 0.80
SliderSettingMethod · 0.80
SetValueMethod · 0.45

Tested by

no test coverage detected