diff --git a/specwidget.cpp b/specwidget.cpp index d57c55d7ffccec9cab758c9384399ce843e32b40..9fad435091ed1ca6782140a331cfe5d92b5b659b 100644 --- a/specwidget.cpp +++ b/specwidget.cpp @@ -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); +} diff --git a/specwidget.h b/specwidget.h index 944c7ca4cef43a180fd4c7ba277f07b3ad205680..4ea79d55f96395eafca9aac018174277d25f72dc 100644 --- a/specwidget.h +++ b/specwidget.h @@ -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(); diff --git a/specwidget.ui b/specwidget.ui index 756bf4ea8969d8dcf05e8d8eadc58df40572cd95..197edd1487b410b6a73c69e30263ae677e667bd5 100644 --- a/specwidget.ui +++ b/specwidget.ui @@ -220,8 +220,8 @@ 0 0 - 305 - 541 + 320 + 534 @@ -498,7 +498,7 @@ - + AGC @@ -520,75 +520,6 @@ View - - - - Ref Max - - - - - - - 1 - - - 30 - - - - - - - 1 - - - -150.000000000000000 - - - 30.000000000000000 - - - 1.000000000000000 - - - 0.000000000000000 - - - - - - - Ref Min - - - - - - - 1 - - - -300.000000000000000 - - - 0.000000000000000 - - - 1.000000000000000 - - - -150.000000000000000 - - - - - - - Update Interval - - - @@ -596,7 +527,7 @@ - + 7 @@ -656,7 +587,193 @@ + + + + Update Interval + + + + + + + 1 + + + 30 + + + + + + + Ref Max + + + + + + + 1 + + + -150.000000000000000 + + + 30.000000000000000 + + + 1.000000000000000 + + + 0.000000000000000 + + + + + + + Ref Min + + + + + + + 1 + + + -300.000000000000000 + + + 0.000000000000000 + + + 1.000000000000000 + + + -150.000000000000000 + + + + + + + 0 + 0 + + + + Max Width + + + + + + + 640 + + + 4096 + + + 1920 + + + + + + + + 0 + 0 + + + + pixels + + + + + + + + 0 + 0 + + + + Max Height + + + + + + + 480 + + + 3840 + + + 1080 + + + + + + + + 0 + 0 + + + + pixels + + + + + + + + 0 + 0 + + + + UI Percentage + + + + + + + 10 + + + 90 + + + 50 + + + + + + + + 0 + 0 + + + + % + + + + Qt::Vertical @@ -676,8 +793,8 @@ 0 0 - 320 - 534 + 135 + 180