2626#include < QSpacerItem>
2727#include < QScrollArea>
2828#include < QLoggingCategory>
29+ #include < style.h>
2930
3031Q_LOGGING_CATEGORY (CAT_ORXSETTINGS, " ORXSettings" )
3132
@@ -90,6 +91,15 @@ QWidget *OrxSettingsWidget::createOrxProfileSection(QWidget *parent)
9091 MenuSectionCollapseWidget *orxProfileSection = new MenuSectionCollapseWidget (
9192 " ORX Profile" , MenuCollapseSection::MHCW_ARROW, MenuCollapseSection::MHW_BASEWIDGET, parent);
9293
94+ QWidget *widget = new QWidget (parent);
95+ QVBoxLayout *layout = new QVBoxLayout (widget);
96+ layout->setContentsMargins (10 , 10 , 10 , 10 );
97+ layout->setSpacing (10 );
98+
99+ orxProfileSection->contentLayout ()->addWidget (widget);
100+ Style::setBackgroundColor (widget, json::theme::background_primary);
101+ Style::setStyle (widget, style::properties::widget::border_interactive);
102+
93103 // RX FIR Decimation - Combobox [1,2,4]
94104 QMap<QString, QString> *firDecimationOptions = new QMap<QString, QString>();
95105 firDecimationOptions->insert (" 1" , " 1" );
@@ -98,7 +108,7 @@ QWidget *OrxSettingsWidget::createOrxProfileSection(QWidget *parent)
98108 auto firDecimation = Adrv9009WidgetFactory::createCustomComboWidget (
99109 m_device, " adi,orx-profile-rx-fir-decimation" , firDecimationOptions, " RX FIR Decimation" );
100110 if (firDecimation) {
101- orxProfileSection-> contentLayout () ->addWidget (firDecimation);
111+ layout ->addWidget (firDecimation);
102112 connect (this , &OrxSettingsWidget::readRequested, firDecimation, &IIOWidget::readAsync);
103113 }
104114
@@ -109,7 +119,7 @@ QWidget *OrxSettingsWidget::createOrxProfileSection(QWidget *parent)
109119 auto dec5Decimation = Adrv9009WidgetFactory::createCustomComboWidget (
110120 m_device, " adi,orx-profile-rx-dec5-decimation" , dec5DecimationOptions, " RX DEC5 Decimation" );
111121 if (dec5Decimation) {
112- orxProfileSection-> contentLayout () ->addWidget (dec5Decimation);
122+ layout ->addWidget (dec5Decimation);
113123 connect (this , &OrxSettingsWidget::readRequested, dec5Decimation, &IIOWidget::readAsync);
114124 }
115125
@@ -120,31 +130,31 @@ QWidget *OrxSettingsWidget::createOrxProfileSection(QWidget *parent)
120130 auto rhb1Decimation = Adrv9009WidgetFactory::createCustomComboWidget (
121131 m_device, " adi,orx-profile-rhb1-decimation" , rhb1DecimationOptions, " RHB1 Decimation" );
122132 if (rhb1Decimation) {
123- orxProfileSection-> contentLayout () ->addWidget (rhb1Decimation);
133+ layout ->addWidget (rhb1Decimation);
124134 connect (this , &OrxSettingsWidget::readRequested, rhb1Decimation, &IIOWidget::readAsync);
125135 }
126136
127137 // ORX Output Rate (kHz) - Range Widget
128138 auto outputRate = Adrv9009WidgetFactory::createRangeWidget (m_device, " adi,orx-profile-orx-output-rate_khz" ,
129139 " [30625 1 500000]" , " ORX Output Rate (kHz)" );
130140 if (outputRate) {
131- orxProfileSection-> contentLayout () ->addWidget (outputRate);
141+ layout ->addWidget (outputRate);
132142 connect (this , &OrxSettingsWidget::readRequested, outputRate, &IIOWidget::readAsync);
133143 }
134144
135145 // RF Bandwidth (Hz) - Range Widget
136146 auto rfBandwidth = Adrv9009WidgetFactory::createRangeWidget (m_device, " adi,orx-profile-rf-bandwidth_hz" ,
137147 " [5000000 1 450000000]" , " RF Bandwidth (Hz)" );
138148 if (rfBandwidth) {
139- orxProfileSection-> contentLayout () ->addWidget (rfBandwidth);
149+ layout ->addWidget (rfBandwidth);
140150 connect (this , &OrxSettingsWidget::readRequested, rfBandwidth, &IIOWidget::readAsync);
141151 }
142152
143153 // RX BBF3D BCorner (kHz) - Range Widget
144154 auto bbf3dCorner = Adrv9009WidgetFactory::createRangeWidget (m_device, " adi,orx-profile-rx-bbf3d-bcorner_khz" ,
145155 " [10000 1 400000]" , " RX BBF3D BCorner (kHz)" );
146156 if (bbf3dCorner) {
147- orxProfileSection-> contentLayout () ->addWidget (bbf3dCorner);
157+ layout ->addWidget (bbf3dCorner);
148158 connect (this , &OrxSettingsWidget::readRequested, bbf3dCorner, &IIOWidget::readAsync);
149159 }
150160
@@ -154,7 +164,7 @@ QWidget *OrxSettingsWidget::createOrxProfileSection(QWidget *parent)
154164 auto ddcMode = Adrv9009WidgetFactory::createCustomComboWidget (m_device, " adi,orx-profile-orx-ddc-mode" ,
155165 ddcModeOptions, " ORX DDC Mode" );
156166 if (ddcMode) {
157- orxProfileSection-> contentLayout () ->addWidget (ddcMode);
167+ layout ->addWidget (ddcMode);
158168 connect (this , &OrxSettingsWidget::readRequested, ddcMode, &IIOWidget::readAsync);
159169 }
160170
@@ -167,6 +177,15 @@ QWidget *OrxSettingsWidget::createOrxConfigSection(QWidget *parent)
167177 MenuSectionCollapseWidget *orxConfigSection = new MenuSectionCollapseWidget (
168178 " ORX Configuration" , MenuCollapseSection::MHCW_ARROW, MenuCollapseSection::MHW_BASEWIDGET, parent);
169179
180+ QWidget *widget = new QWidget (parent);
181+ QVBoxLayout *layout = new QVBoxLayout (widget);
182+ layout->setContentsMargins (10 , 10 , 10 , 10 );
183+ layout->setSpacing (10 );
184+
185+ orxConfigSection->contentLayout ()->addWidget (widget);
186+ Style::setBackgroundColor (widget, json::theme::background_primary);
187+ Style::setStyle (widget, style::properties::widget::border_interactive);
188+
170189 // ORX Channels Enable - Combobox [0,1,2,3] → [OFF,ORX1,ORX2,ORX1_and_ORX2]
171190 QMap<QString, QString> *orxChannelsOptions = new QMap<QString, QString>();
172191 orxChannelsOptions->insert (" 0" , " OFF" );
@@ -176,7 +195,7 @@ QWidget *OrxSettingsWidget::createOrxConfigSection(QWidget *parent)
176195 auto orxChannels = Adrv9009WidgetFactory::createCustomComboWidget (
177196 m_device, " adi,obs-settings-obs-rx-channels-enable" , orxChannelsOptions, " ORX Channels Enable" );
178197 if (orxChannels) {
179- orxConfigSection-> contentLayout () ->addWidget (orxChannels);
198+ layout ->addWidget (orxChannels);
180199 connect (this , &OrxSettingsWidget::readRequested, orxChannels, &IIOWidget::readAsync);
181200 }
182201
@@ -188,7 +207,7 @@ QWidget *OrxSettingsWidget::createOrxConfigSection(QWidget *parent)
188207 auto framerSel = Adrv9009WidgetFactory::createCustomComboWidget (m_device, " adi,obs-settings-framer-sel" ,
189208 framerSelOptions, " JESD204 Framer Selection" );
190209 if (framerSel) {
191- orxConfigSection-> contentLayout () ->addWidget (framerSel);
210+ layout ->addWidget (framerSel);
192211 connect (this , &OrxSettingsWidget::readRequested, framerSel, &IIOWidget::readAsync);
193212 }
194213
@@ -199,7 +218,7 @@ QWidget *OrxSettingsWidget::createOrxConfigSection(QWidget *parent)
199218 auto loSource = Adrv9009WidgetFactory::createCustomComboWidget (m_device, " adi,obs-settings-obs-rx-lo-source" ,
200219 loSourceOptions, " ORX LO Source" );
201220 if (loSource) {
202- orxConfigSection-> contentLayout () ->addWidget (loSource);
221+ layout ->addWidget (loSource);
203222 connect (this , &OrxSettingsWidget::readRequested, loSource, &IIOWidget::readAsync);
204223 }
205224
@@ -212,19 +231,29 @@ QWidget *OrxSettingsWidget::createAuxPllSection(QWidget *parent)
212231 MenuSectionCollapseWidget *auxPllSection = new MenuSectionCollapseWidget (
213232 " AUX PLL" , MenuCollapseSection::MHCW_ARROW, MenuCollapseSection::MHW_BASEWIDGET, parent);
214233
234+ QWidget *widget = new QWidget (parent);
235+ QVBoxLayout *layout = new QVBoxLayout (widget);
236+ layout->setContentsMargins (10 , 10 , 10 , 10 );
237+ layout->setSpacing (10 );
238+
239+ auxPllSection->contentLayout ()->addWidget (widget);
240+ Style::setBackgroundColor (widget, json::theme::background_primary);
241+ Style::setStyle (widget, style::properties::widget::border_interactive);
242+
215243 // GPIO Select - Range Widget
216244 auto gpioSelect = Adrv9009WidgetFactory::createRangeWidget (m_device, " adi,orx-lo-cfg-gpio-select" , " [0 1 19]" ,
217245 " GPIO Select" );
218246 if (gpioSelect) {
219- auxPllSection-> contentLayout () ->addWidget (gpioSelect);
247+ layout ->addWidget (gpioSelect);
220248 connect (this , &OrxSettingsWidget::readRequested, gpioSelect, &IIOWidget::readAsync);
221249 }
222250
223251 // Disable AUX PLL Relocking - Checkbox
224252 auto disableAuxPllRelock = Adrv9009WidgetFactory::createCheckboxWidget (
225253 m_device, " adi,orx-lo-cfg-disable-aux-pll-relocking" , " Disable AUX PLL Relocking" );
226254 if (disableAuxPllRelock) {
227- auxPllSection->contentLayout ()->addWidget (disableAuxPllRelock);
255+ layout->addWidget (disableAuxPllRelock);
256+ disableAuxPllRelock->setSizePolicy (QSizePolicy::Maximum, QSizePolicy::Maximum);
228257 connect (this , &OrxSettingsWidget::readRequested, disableAuxPllRelock, &IIOWidget::readAsync);
229258 }
230259
0 commit comments