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

Method SetEffect

src/RealtimeEffectPanel.cpp:571–601  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

569 }
570
571 void SetEffect(AudacityProject& project,
572 const std::shared_ptr<EffectListUIDelegate>& delegate,
573 const std::shared_ptr<RealtimeEffectState> &pState)
574 {
575 mProject = &project;
576 mDelegate = delegate;
577 mEffectState = pState;
578
579 mSubscription = mEffectState->Subscribe([this](RealtimeEffectStateChange state) {
580 state == RealtimeEffectStateChange::EffectOn
581 ? mEnableButton->PushDown()
582 : mEnableButton->PopUp();
583 });
584
585 TranslatableString label;
586 if (pState) {
587 label = GetEffectName(*mEffectState);
588 mSettingsAccess = pState->GetAccess();
589 }
590 else
591 mSettingsAccess.reset();
592 if (mEnableButton)
593 mSettingsAccess && mSettingsAccess->Get().extra.GetActive()
594 ? mEnableButton->PushDown()
595 : mEnableButton->PopUp();
596 if (mOptionsButton)
597 {
598 mOptionsButton->SetTranslatableLabel(label);
599 mOptionsButton->SetEnabled(pState && GetPlugin(pState->GetID()));
600 }
601 }
602
603 void RemoveFromList()
604 {

Callers 1

InsertEffectRowMethod · 0.80

Calls 11

GetEffectNameFunction · 0.85
GetPluginFunction · 0.85
SubscribeMethod · 0.45
PushDownMethod · 0.45
PopUpMethod · 0.45
GetAccessMethod · 0.45
resetMethod · 0.45
GetMethod · 0.45
SetTranslatableLabelMethod · 0.45
SetEnabledMethod · 0.45
GetIDMethod · 0.45

Tested by

no test coverage detected