1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-24 19:00:36 -05:00

HackRF input plugin: GUI cosmetic changes

This commit is contained in:
f4exb 2016-03-29 16:39:05 +02:00
parent 39d5ecf6de
commit d59c9e5a95
3 changed files with 128 additions and 92 deletions

View File

@ -120,8 +120,7 @@ void HackRFGui::displaySettings()
ui->biasT->setChecked(m_settings.m_biasT); ui->biasT->setChecked(m_settings.m_biasT);
ui->decimText->setText(tr("%1").arg(1<<m_settings.m_log2Decim)); ui->decim->setCurrentIndex(m_settings.m_log2Decim);
ui->decim->setValue(m_settings.m_log2Decim);
ui->fcPos->setCurrentIndex((int) m_settings.m_fcPos); ui->fcPos->setCurrentIndex((int) m_settings.m_fcPos);
@ -236,12 +235,11 @@ void HackRFGui::on_lnaExt_stateChanged(int state)
sendSettings(); sendSettings();
} }
void HackRFGui::on_decim_valueChanged(int value) void HackRFGui::on_decim_currentIndexChanged(int index)
{ {
if ((value <0) || (value > 6)) if ((index <0) || (index > 6))
return; return;
ui->decimText->setText(tr("%1").arg(1<<value)); m_settings.m_log2Decim = index;
m_settings.m_log2Decim = value;
sendSettings(); sendSettings();
} }

View File

@ -76,7 +76,7 @@ private slots:
void on_iqImbalance_toggled(bool checked); void on_iqImbalance_toggled(bool checked);
void on_sampleRate_currentIndexChanged(int index); void on_sampleRate_currentIndexChanged(int index);
void on_biasT_stateChanged(int state); void on_biasT_stateChanged(int state);
void on_decim_valueChanged(int value); void on_decim_currentIndexChanged(int index);
void on_fcPos_currentIndexChanged(int index); void on_fcPos_currentIndexChanged(int index);
void on_lnaExt_stateChanged(int state); void on_lnaExt_stateChanged(int state);
void on_lna_valueChanged(int value); void on_lna_valueChanged(int value);

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>307</width> <width>260</width>
<height>270</height> <height>299</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy"> <property name="sizePolicy">
@ -16,6 +16,12 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<property name="minimumSize">
<size>
<width>260</width>
<height>0</height>
</size>
</property>
<property name="font"> <property name="font">
<font> <font>
<family>Sans Serif</family> <family>Sans Serif</family>
@ -29,16 +35,7 @@
<property name="spacing"> <property name="spacing">
<number>3</number> <number>3</number>
</property> </property>
<property name="leftMargin"> <property name="margin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<number>2</number> <number>2</number>
</property> </property>
<item> <item>
@ -160,7 +157,7 @@
<string>DC Offset auto correction</string> <string>DC Offset auto correction</string>
</property> </property>
<property name="text"> <property name="text">
<string>DC Offset</string> <string>DC</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -170,17 +167,56 @@
<string>IQ Imbalance auto correction</string> <string>IQ Imbalance auto correction</string>
</property> </property>
<property name="text"> <property name="text">
<string>IQ Imbalance</string> <string>IQ</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QLabel" name="corrLabel"> <widget class="QLabel" name="corrLabel">
<property name="text"> <property name="text">
<string>Auto corr</string> <string>Auto</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="4">
<widget class="QCheckBox" name="biasT">
<property name="toolTip">
<string>Activate antenna bias tee</string>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>Bias T</string>
</property>
</widget>
</item>
<item row="0" column="5">
<widget class="QCheckBox" name="lnaExt">
<property name="toolTip">
<string>Extra LNA +14dB</string>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>RF Amp</string>
</property>
</widget>
</item>
<item row="0" column="3">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</item> </item>
<item> <item>
@ -215,21 +251,21 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="2"> <item row="0" column="3">
<widget class="QLabel" name="bbFiltLabel"> <widget class="QLabel" name="bbFiltLabel">
<property name="text"> <property name="text">
<string>BBF</string> <string>BBF</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="3"> <item row="0" column="4">
<widget class="QComboBox" name="bbFilter"> <widget class="QComboBox" name="bbFilter">
<property name="toolTip"> <property name="toolTip">
<string>RF bandpas filter</string> <string>RF bandpas filter</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="4"> <item row="0" column="2">
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -245,7 +281,7 @@
</layout> </layout>
</item> </item>
<item> <item>
<layout class="QGridLayout" name="gridLayout_decim" columnstretch="0,0,0"> <layout class="QGridLayout" name="gridLayout_decim" columnstretch="0,0,0,0,0,0">
<property name="spacing"> <property name="spacing">
<number>3</number> <number>3</number>
</property> </property>
@ -256,49 +292,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="3">
<widget class="QSlider" name="decim">
<property name="toolTip">
<string>Decimation factor</string>
</property>
<property name="maximum">
<number>6</number>
</property>
<property name="pageStep">
<number>1</number>
</property>
<property name="value">
<number>0</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="decimText">
<property name="minimumSize">
<size>
<width>40</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>1</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_fcPos" columnstretch="0,0,0,0">
<property name="spacing">
<number>3</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_fcPos"> <widget class="QLabel" name="label_fcPos">
<property name="text"> <property name="text">
<string>Fc pos</string> <string>Fc pos</string>
@ -306,7 +300,64 @@
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
<widget class="QComboBox" name="decim">
<property name="maximumSize">
<size>
<width>55</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Decimation factor</string>
</property>
<property name="currentIndex">
<number>3</number>
</property>
<item>
<property name="text">
<string>1</string>
</property>
</item>
<item>
<property name="text">
<string>2</string>
</property>
</item>
<item>
<property name="text">
<string>4</string>
</property>
</item>
<item>
<property name="text">
<string>8</string>
</property>
</item>
<item>
<property name="text">
<string>16</string>
</property>
</item>
<item>
<property name="text">
<string>32</string>
</property>
</item>
<item>
<property name="text">
<string>64</string>
</property>
</item>
</widget>
</item>
<item row="0" column="4">
<widget class="QComboBox" name="fcPos"> <widget class="QComboBox" name="fcPos">
<property name="maximumSize">
<size>
<width>55</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Relative position of device center frequency</string> <string>Relative position of device center frequency</string>
</property> </property>
@ -322,36 +373,23 @@
</item> </item>
<item> <item>
<property name="text"> <property name="text">
<string>Cent</string> <string>Cen</string>
</property> </property>
</item> </item>
</widget> </widget>
</item> </item>
<item row="0" column="2"> <item row="0" column="2">
<widget class="QCheckBox" name="biasT"> <spacer name="horizontalSpacer_3">
<property name="toolTip"> <property name="orientation">
<string>Activate antenna bias tee</string> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="layoutDirection"> <property name="sizeHint" stdset="0">
<enum>Qt::RightToLeft</enum> <size>
<width>40</width>
<height>20</height>
</size>
</property> </property>
<property name="text"> </spacer>
<string>Bias T</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QCheckBox" name="lnaExt">
<property name="toolTip">
<string>Extra LNA +14dB</string>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
</property>
<property name="text">
<string>RF Amp</string>
</property>
</widget>
</item> </item>
</layout> </layout>
</item> </item>