| 431 | } |
| 432 | |
| 433 | void GlobalPanel::buttonClicked(juce::Button* clickedButton) |
| 434 | { |
| 435 | bool isSwitch = false; |
| 436 | if (clickedButton == &filterSwitch && filterSwitch.getToggleState()) |
| 437 | { |
| 438 | activeTabColour = FILTER_COLOUR; |
| 439 | setVisibility(filterComponents, true); |
| 440 | setVisibility(downsampleComponents, false); |
| 441 | setVisibility(graphComponents, false); |
| 442 | updateFilterKnobVisibility(); |
| 443 | isSwitch = true; |
| 444 | } |
| 445 | else if (clickedButton == &downsampleSwitch && downsampleSwitch.getToggleState()) |
| 446 | { |
| 447 | activeTabColour = DOWNSAMPLE_COLOUR; |
| 448 | setVisibility(downsampleComponents, true); |
| 449 | setVisibility(filterComponents, false); |
| 450 | setVisibility(graphComponents, false); |
| 451 | isSwitch = true; |
| 452 | } |
| 453 | else if (clickedButton == &graphSwitch && graphSwitch.getToggleState()) |
| 454 | { |
| 455 | activeTabColour = COLOUR1; |
| 456 | setVisibility(graphComponents, true); |
| 457 | setVisibility(filterComponents, false); |
| 458 | setVisibility(downsampleComponents, false); |
| 459 | isSwitch = true; |
| 460 | } |
| 461 | else if (clickedButton == &filterLowCutButton || clickedButton == &filterPeakButton || clickedButton == &filterHighCutButton) |
| 462 | { |
| 463 | updateFilterKnobVisibility(); |
| 464 | } |
| 465 | |
| 466 | if (isSwitch) |
| 467 | { |
| 468 | resized(); |
| 469 | repaint(); |
| 470 | } |
| 471 | } |
| 472 | |
| 473 | void GlobalPanel::updateFilterKnobVisibility() |
| 474 | { |
nothing calls this directly
no outgoing calls
no test coverage detected