| 89 | } |
| 90 | |
| 91 | void PhoneApplet::buildUI() |
| 92 | { |
| 93 | auto* outer = new QVBoxLayout(this); |
| 94 | outer->setContentsMargins(0, 0, 0, 0); |
| 95 | outer->setSpacing(0); |
| 96 | |
| 97 | auto* vbox = new QVBoxLayout; |
| 98 | vbox->setContentsMargins(4, 2, 8, 4); |
| 99 | vbox->setSpacing(4); |
| 100 | outer->addLayout(vbox); |
| 101 | |
| 102 | // ── AM Carrier row ─────────────────────────────────────────────────── |
| 103 | { |
| 104 | auto* rowW = new QWidget; |
| 105 | rowW->setFixedHeight(24); |
| 106 | auto* row = new QHBoxLayout(rowW); |
| 107 | row->setContentsMargins(0, 0, 0, 0); |
| 108 | row->setSpacing(4); |
| 109 | |
| 110 | auto* lbl = new QLabel("AM\nCarrier:"); |
| 111 | lbl->setAlignment(Qt::AlignRight | Qt::AlignVCenter); |
| 112 | AetherSDR::ThemeManager::instance().applyStyleSheet(lbl, "QLabel { color: {{color.text.secondary}}; font-size: 11px; }"); |
| 113 | lbl->setFixedWidth(52); |
| 114 | row->addWidget(lbl); |
| 115 | row->addSpacing(10); |
| 116 | |
| 117 | m_amCarrierSlider = new GuardedSlider(Qt::Horizontal); |
| 118 | m_amCarrierSlider->setRange(0, 100); |
| 119 | m_amCarrierSlider->setDragValueFormatter(percentText); |
| 120 | m_amCarrierSlider->setAccessibleName("AM carrier level"); |
| 121 | m_amCarrierSlider->setAccessibleDescription("AM carrier power level, 0 to 100 percent"); |
| 122 | applyPrimarySliderStyle(m_amCarrierSlider); |
| 123 | connect(m_amCarrierSlider, &QSlider::valueChanged, this, [this](int v) { |
| 124 | if (!m_updatingFromModel && m_model) m_model->setAmCarrierLevel(v); |
| 125 | m_amCarrierLabel->setText(QString::number(v)); |
| 126 | }); |
| 127 | row->addWidget(m_amCarrierSlider, 1); |
| 128 | |
| 129 | m_amCarrierLabel = new QLabel("48"); |
| 130 | m_amCarrierLabel->setFixedWidth(26); |
| 131 | m_amCarrierLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); |
| 132 | AetherSDR::ThemeManager::instance().applyStyleSheet(m_amCarrierLabel, "QLabel { color: {{color.text.primary}}; font-size: 11px; }"); |
| 133 | row->addWidget(m_amCarrierLabel); |
| 134 | |
| 135 | vbox->addWidget(rowW); |
| 136 | } |
| 137 | |
| 138 | // ── VOX row: toggle + level slider ─────────────────────────────────── |
| 139 | { |
| 140 | auto* rowW = new QWidget; |
| 141 | rowW->setFixedHeight(24); |
| 142 | auto* row = new QHBoxLayout(rowW); |
| 143 | row->setContentsMargins(0, 0, 0, 0); |
| 144 | row->setSpacing(4); |
| 145 | |
| 146 | m_voxBtn = new QPushButton("VOX"); |
| 147 | m_voxBtn->setCheckable(true); |
| 148 | m_voxBtn->setFixedSize(52, 22); |
nothing calls this directly
no test coverage detected