MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / getSelectedSampleRate

Method getSelectedSampleRate

Settings/ProfileConfigTab.cpp:1024–1043  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1022}
1023
1024unsigned int
1025ProfileConfigTab::getSelectedSampleRate(void) const
1026{
1027 unsigned int sampRate = 0;
1028
1029 if (this->ui->sampRateStack->currentIndex() == 0) {
1030 // Index 0: Sample Rate Combo
1031 if (this->ui->sampleRateCombo->currentIndex() != -1) {
1032 qreal selectedValue =
1033 this->ui->sampleRateCombo->currentData().value<qreal>();
1034 sampRate = static_cast<unsigned>(selectedValue);
1035 }
1036 } else {
1037 // Index 1: Sample Rate Spin
1038 sampRate = static_cast<unsigned>(
1039 this->ui->sampleRateSpinBox->value());
1040 }
1041
1042 return sampRate;
1043}
1044
1045void
1046ProfileConfigTab::setSelectedSampleRate(unsigned int rate)

Callers 3

refreshTrueSampleRateMethod · 0.95
onDeviceChangedMethod · 0.95
onSpinsChangedMethod · 0.95

Calls 1

valueMethod · 0.80

Tested by

no test coverage detected