| 134 | } |
| 135 | |
| 136 | void ClientCompApplet::buildUI() |
| 137 | { |
| 138 | setStyleSheet("QWidget { background: transparent; }"); |
| 139 | |
| 140 | auto* outer = new QVBoxLayout(this); |
| 141 | outer->setContentsMargins(4, 4, 4, 4); |
| 142 | outer->setSpacing(4); |
| 143 | |
| 144 | m_curve = new ClientCompCurveWidget; |
| 145 | m_curve->setCompactMode(true); |
| 146 | m_curve->setMinimumHeight(90); |
| 147 | outer->addWidget(m_curve, 1); |
| 148 | |
| 149 | m_grBar = new ClientCompGrBar; |
| 150 | outer->addWidget(m_grBar); |
| 151 | |
| 152 | // Enable / Edit buttons removed — CHAIN widget handles bypass |
| 153 | // (single-click) and editor-open (double-click). |
| 154 | |
| 155 | // Five-knob tuning row — Thresh, Ratio, Attack, Release, Makeup. |
| 156 | // Mappings match ClientCompEditor. |
| 157 | { |
| 158 | auto* row = new QHBoxLayout; |
| 159 | row->setSpacing(4); |
| 160 | |
| 161 | auto makeKnob = [](const QString& label) { |
| 162 | auto* k = new ClientCompKnob; |
| 163 | k->setLabel(label); |
| 164 | k->setCenterLabelMode(true); |
| 165 | k->setInlineEditEnabled(false); |
| 166 | k->setFixedSize(38, 48); |
| 167 | return k; |
| 168 | }; |
| 169 | |
| 170 | m_thresh = makeKnob("Thresh"); |
| 171 | m_thresh->setRange(-60.0f, 0.0f); |
| 172 | m_thresh->setDefault(-18.0f); |
| 173 | m_thresh->setValueFromNorm([](float n) { return -60.0f + n * 60.0f; }); |
| 174 | m_thresh->setNormFromValue([](float v) { return (v + 60.0f) / 60.0f; }); |
| 175 | m_thresh->setLabelFormat([](float v) { |
| 176 | return QString::number(v, 'f', 1) + " dB"; |
| 177 | }); |
| 178 | row->addWidget(m_thresh); |
| 179 | |
| 180 | m_ratio = makeKnob("Ratio"); |
| 181 | m_ratio->setRange(1.0f, 20.0f); |
| 182 | m_ratio->setDefault(3.0f); |
| 183 | m_ratio->setValueFromNorm([](float n) { |
| 184 | return 1.0f * std::pow(20.0f, n); |
| 185 | }); |
| 186 | m_ratio->setNormFromValue([](float v) { |
| 187 | if (v <= 1.0f) return 0.0f; |
| 188 | return std::log(v) / std::log(20.0f); |
| 189 | }); |
| 190 | m_ratio->setLabelFormat([](float v) { |
| 191 | return QString::number(v, 'f', 2) + ":1"; |
| 192 | }); |
| 193 | row->addWidget(m_ratio); |
nothing calls this directly
no test coverage detected