1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-12-24 10:50:29 -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->decimText->setText(tr("%1").arg(1<<m_settings.m_log2Decim));
ui->decim->setValue(m_settings.m_log2Decim);
ui->decim->setCurrentIndex(m_settings.m_log2Decim);
ui->fcPos->setCurrentIndex((int) m_settings.m_fcPos);
@ -236,12 +235,11 @@ void HackRFGui::on_lnaExt_stateChanged(int state)
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;
ui->decimText->setText(tr("%1").arg(1<<value));
m_settings.m_log2Decim = value;
m_settings.m_log2Decim = index;
sendSettings();
}

View File

@ -76,7 +76,7 @@ private slots:
void on_iqImbalance_toggled(bool checked);
void on_sampleRate_currentIndexChanged(int index);
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_lnaExt_stateChanged(int state);
void on_lna_valueChanged(int value);

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>307</width>
<height>270</height>
<width>260</width>
<height>299</height>
</rect>
</property>
<property name="sizePolicy">
@ -16,6 +16,12 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>260</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<family>Sans Serif</family>
@ -29,16 +35,7 @@
<property name="spacing">
<number>3</number>
</property>
<property name="leftMargin">
<number>2</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<property name="rightMargin">
<number>2</number>
</property>
<property name="bottomMargin">
<property name="margin">
<number>2</number>
</property>
<item>
@ -160,7 +157,7 @@
<string>DC Offset auto correction</string>
</property>
<property name="text">
<string>DC Offset</string>
<string>DC</string>
</property>
</widget>
</item>
@ -170,17 +167,56 @@
<string>IQ Imbalance auto correction</string>
</property>
<property name="text">
<string>IQ Imbalance</string>
<string>IQ</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="corrLabel">
<property name="text">
<string>Auto corr</string>
<string>Auto</string>
</property>
</widget>
</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>
</item>
<item>
@ -215,21 +251,21 @@
</property>
</widget>
</item>
<item row="0" column="2">
<item row="0" column="3">
<widget class="QLabel" name="bbFiltLabel">
<property name="text">
<string>BBF</string>
</property>
</widget>
</item>
<item row="0" column="3">
<item row="0" column="4">
<widget class="QComboBox" name="bbFilter">
<property name="toolTip">
<string>RF bandpas filter</string>
</property>
</widget>
</item>
<item row="0" column="4">
<item row="0" column="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@ -245,7 +281,7 @@
</layout>
</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">
<number>3</number>
</property>
@ -256,49 +292,7 @@
</property>
</widget>
</item>
<item row="0" column="1">
<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">
<item row="0" column="3">
<widget class="QLabel" name="label_fcPos">
<property name="text">
<string>Fc pos</string>
@ -306,7 +300,64 @@
</widget>
</item>
<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">
<property name="maximumSize">
<size>
<width>55</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>Relative position of device center frequency</string>
</property>
@ -322,36 +373,23 @@
</item>
<item>
<property name="text">
<string>Cent</string>
<string>Cen</string>
</property>
</item>
</widget>
</item>
<item row="0" column="2">
<widget class="QCheckBox" name="biasT">
<property name="toolTip">
<string>Activate antenna bias tee</string>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="layoutDirection">
<enum>Qt::RightToLeft</enum>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
<property name="text">
<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>
</spacer>
</item>
</layout>
</item>