From 9d5211a35905f2cf3caa194edb2570729946e8c7 Mon Sep 17 00:00:00 2001 From: Daniel Guramulta Date: Mon, 22 Jan 2018 14:21:36 +0200 Subject: [PATCH] NetworkAnalyzer: add buttons for zooming and enable it Signed-off-by: Daniel Guramulta --- src/network_analyzer.cpp | 3 + ui/network_analyzer.ui | 183 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 179 insertions(+), 7 deletions(-) diff --git a/src/network_analyzer.cpp b/src/network_analyzer.cpp index 0c296c689e..7bdb34b26c 100644 --- a/src/network_analyzer.cpp +++ b/src/network_analyzer.cpp @@ -124,6 +124,9 @@ NetworkAnalyzer::NetworkAnalyzer(struct iio_context *ctx, Filter *filt, api->setObjectName(QString::fromStdString(Filter::tool_name( TOOL_NETWORK_ANALYZER))); + + ui->xygraph->enableZooming(ui->btnZoomIn, ui->btnZoomOut); + api->load(*settings); api->js_register(engine); } diff --git a/ui/network_analyzer.ui b/ui/network_analyzer.ui index 1dcdaa3175..714f64c5e0 100644 --- a/ui/network_analyzer.ui +++ b/ui/network_analyzer.ui @@ -325,6 +325,174 @@ QPushButton:!checked { 14 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 3 + + + 20 + + + 20 + + + 10 + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + 0 + 0 + + + + + 48 + 100 + + + + + 48 + 16777215 + + + + QFrame { + + border: 1px solid rgba(255, 255, 255, 120); + border-radius: 4px; + +} + + + QFrame::Box + + + QFrame::Plain + + + 1 + + + + 3 + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 0 + 0 + + + + + 32 + 32 + + + + QPushButton:hover { +border-image: url(:/icons/sba_up_btn_hover.svg); +} +QPushButton { +border-image: url(:/icons/sba_up_btn.svg); +border: 5px solid white; +} + + + + + + + 32 + 32 + + + + true + + + + + + + + 32 + 32 + + + + QPushButton:hover { +border-image: url(:/icons/sba_dn_btn_hover.svg); +} +QPushButton { +border-image: url(:/icons/sba_dn_btn.svg); +border: 5px solid white; +} + + + + + + + 32 + 32 + + + + true + + + + + + + + + @@ -830,12 +998,6 @@ QPushButton:!checked {
menu_anim.hpp
1 - - adiscope::dBgraph - QFrame -
dbgraph.hpp
- 1 -
adiscope::ScaleSpinButton QWidget @@ -848,6 +1010,12 @@ QPushButton:!checked {
spinbox_a.hpp
1
+ + adiscope::dBgraph + QFrame +
dbgraph.hpp
+ 1 +
adiscope::NyquistGraph QFrame @@ -857,6 +1025,7 @@ QPushButton:!checked { + @@ -1277,7 +1446,7 @@ QPushButton:!checked { - +