提交 309c7f04 编写于 作者: M manjaro-xfce

界面可以单独控制比例。

上级 d62ad6ed
......@@ -282,6 +282,17 @@ void specWidget::loadSettings()
const double doubleSpinBox_spr_tx = settings.value("tx/doubleSpinBox_spr_tx",10).toDouble();
ui->doubleSpinBox_spr_tx->setValue(doubleSpinBox_spr_tx);
const int spinBox_ui_maxheight = settings.value("ui/spinBox_ui_maxheight",1080).toInt();
ui->spinBox_ui_maxheight->setValue(spinBox_ui_maxheight);
const int spinBox_ui_maxwidth = settings.value("ui/spinBox_ui_maxwidth",1920).toInt();
ui->spinBox_ui_maxwidth->setValue(spinBox_ui_maxwidth);
const int spinBox_ui_percent_top = settings.value("ui/spinBox_ui_percent_top",50).toInt();
ui->spinBox_ui_percent_top->setValue(spinBox_ui_percent_top);
ui->plotter->setMaxPixmapSize(QSize(spinBox_ui_maxwidth,spinBox_ui_maxheight));
}
void specWidget::saveSettings()
{
......@@ -330,8 +341,19 @@ void specWidget::saveSettings()
const bool checkBox_rxagc = ui->checkBox_rxagc->isChecked();
settings.setValue("spectrum/checkBox_rxagc",checkBox_rxagc);
const int spinBox_ui_maxheight = ui->spinBox_ui_maxheight->value();
settings.setValue("ui/spinBox_ui_maxheight",spinBox_ui_maxheight);
const int spinBox_ui_maxwidth = ui->spinBox_ui_maxwidth->value();
settings.setValue("ui/spinBox_ui_maxwidth",spinBox_ui_maxwidth);
const int spinBox_ui_percent_top = ui->spinBox_ui_percent_top->value();
settings.setValue("ui/spinBox_ui_percent_top",spinBox_ui_percent_top);
ui->plotter->setMaxPixmapSize(QSize(spinBox_ui_maxwidth,spinBox_ui_maxheight));
}
void specWidget::do_rx(bool start)
{
if (!usrp)
......@@ -827,3 +849,7 @@ void specWidget::on_checkBox_rxagc_toggled(bool checked)
set_rx_agc(checked);
}
void specWidget::on_spinBox_ui_percent_top_valueChanged(int arg1)
{
ui->plotter->setPercent2DScreen(arg1);
}
......@@ -78,8 +78,8 @@ private slots:
void on_checkBox_rx_toggled(bool checked);
void on_doubleSpinBox_spr_tx_valueChanged(double arg1);
void on_checkBox_tx_toggled(bool checked);
void on_checkBox_rxagc_toggled(bool checked);
void on_spinBox_ui_percent_top_valueChanged(int arg1);
private:
void loadSettings();
......
......@@ -220,8 +220,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>305</width>
<height>541</height>
<width>320</width>
<height>534</height>
</rect>
</property>
<attribute name="label">
......@@ -498,7 +498,7 @@
</property>
</widget>
</item>
<item row="7" column="0">
<item row="6" column="3">
<widget class="QCheckBox" name="checkBox_rxagc">
<property name="text">
<string>AGC</string>
......@@ -520,75 +520,6 @@
<string>View</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Ref Max</string>
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QSpinBox" name="spinBox_fftUpdate">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>30</number>
</property>
</widget>
</item>
<item row="2" column="2" colspan="2">
<widget class="QDoubleSpinBox" name="doubleSpinBox_range_max">
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>-150.000000000000000</double>
</property>
<property name="maximum">
<double>30.000000000000000</double>
</property>
<property name="singleStep">
<double>1.000000000000000</double>
</property>
<property name="value">
<double>0.000000000000000</double>
</property>
</widget>
</item>
<item row="3" column="0" colspan="2">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Ref Min</string>
</property>
</widget>
</item>
<item row="3" column="2" colspan="2">
<widget class="QDoubleSpinBox" name="doubleSpinBox_range_min">
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>-300.000000000000000</double>
</property>
<property name="maximum">
<double>0.000000000000000</double>
</property>
<property name="singleStep">
<double>1.000000000000000</double>
</property>
<property name="value">
<double>-150.000000000000000</double>
</property>
</widget>
</item>
<item row="1" column="0" colspan="3">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Update Interval</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
......@@ -596,7 +527,7 @@
</property>
</widget>
</item>
<item row="0" column="1" colspan="3">
<item row="0" column="1">
<widget class="QComboBox" name="comboBox_fftSize">
<property name="currentIndex">
<number>7</number>
......@@ -656,7 +587,193 @@
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Update Interval</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="spinBox_fftUpdate">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>30</number>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_7">
<property name="text">
<string>Ref Max</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBox_range_max">
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>-150.000000000000000</double>
</property>
<property name="maximum">
<double>30.000000000000000</double>
</property>
<property name="singleStep">
<double>1.000000000000000</double>
</property>
<property name="value">
<double>0.000000000000000</double>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string>Ref Min</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QDoubleSpinBox" name="doubleSpinBox_range_min">
<property name="decimals">
<number>1</number>
</property>
<property name="minimum">
<double>-300.000000000000000</double>
</property>
<property name="maximum">
<double>0.000000000000000</double>
</property>
<property name="singleStep">
<double>1.000000000000000</double>
</property>
<property name="value">
<double>-150.000000000000000</double>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_19">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Max Width</string>
</property>
</widget>
</item>
<item row="4" column="1">
<widget class="QSpinBox" name="spinBox_ui_maxwidth">
<property name="minimum">
<number>640</number>
</property>
<property name="maximum">
<number>4096</number>
</property>
<property name="value">
<number>1920</number>
</property>
</widget>
</item>
<item row="4" column="2">
<widget class="QLabel" name="label_39">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>pixels</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_33">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Max Height</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSpinBox" name="spinBox_ui_maxheight">
<property name="minimum">
<number>480</number>
</property>
<property name="maximum">
<number>3840</number>
</property>
<property name="value">
<number>1080</number>
</property>
</widget>
</item>
<item row="5" column="2">
<widget class="QLabel" name="label_40">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>pixels</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QLabel" name="label_42">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>UI Percentage</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QSpinBox" name="spinBox_ui_percent_top">
<property name="minimum">
<number>10</number>
</property>
<property name="maximum">
<number>90</number>
</property>
<property name="value">
<number>50</number>
</property>
</widget>
</item>
<item row="6" column="2">
<widget class="QLabel" name="label_43">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>%</string>
</property>
</widget>
</item>
<item row="7" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
......@@ -676,8 +793,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>320</width>
<height>534</height>
<width>135</width>
<height>180</height>
</rect>
</property>
<attribute name="label">
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册