mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-06-29 05:47:50 +02:00
Added option to show current list on FFT
This commit is contained in:
@ -88,7 +88,7 @@ void MainWindow::init() {
|
||||
|
||||
vfoCreatedHandler.handler = vfoAddedHandler;
|
||||
vfoCreatedHandler.ctx = this;
|
||||
sigpath::vfoManager.vfoCreatedEvent.bindHandler(vfoCreatedHandler);
|
||||
sigpath::vfoManager.vfoCreatedEvent.bindHandler(&vfoCreatedHandler);
|
||||
|
||||
spdlog::info("Loading modules");
|
||||
|
||||
|
@ -72,7 +72,7 @@ namespace vfo_color_menu {
|
||||
}
|
||||
|
||||
vfoAddHndl.handler = vfoAddHandler;
|
||||
sigpath::vfoManager.vfoCreatedEvent.bindHandler(vfoAddHndl);
|
||||
sigpath::vfoManager.vfoCreatedEvent.bindHandler(&vfoAddHndl);
|
||||
core::configManager.release(modified);
|
||||
}
|
||||
|
||||
|
@ -174,6 +174,16 @@ namespace ImGui {
|
||||
}
|
||||
}
|
||||
|
||||
FFTRedrawArgs args;
|
||||
args.min = ImVec2(widgetPos.x + 50, widgetPos.y + 9);
|
||||
args.max = ImVec2(widgetPos.x + dataWidth + 50, widgetPos.y + fftHeight + 10);
|
||||
args.lowFreq = lowerFreq;
|
||||
args.highFreq = upperFreq;
|
||||
args.freqToPixelRatio = horizScale;
|
||||
args.pixelToFreqRatio = viewBandwidth / (double)dataWidth;
|
||||
args.window = window;
|
||||
onFFTRedraw.emit(args);
|
||||
|
||||
// X Axis
|
||||
window->DrawList->AddLine(ImVec2(widgetPos.x + 50, widgetPos.y + fftHeight + 10),
|
||||
ImVec2(widgetPos.x + dataWidth + 50, widgetPos.y + fftHeight + 10),
|
||||
@ -182,8 +192,6 @@ namespace ImGui {
|
||||
window->DrawList->AddLine(ImVec2(widgetPos.x + 50, widgetPos.y + 9),
|
||||
ImVec2(widgetPos.x + 50, widgetPos.y + fftHeight + 9),
|
||||
text, 1.0);
|
||||
|
||||
|
||||
}
|
||||
|
||||
void WaterFall::drawWaterfall() {
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <imgui/imgui.h>
|
||||
#include <imgui/imgui_internal.h>
|
||||
#include <GL/glew.h>
|
||||
#include <utils/event.h>
|
||||
|
||||
#define WATERFALL_RESOLUTION 1000000
|
||||
|
||||
@ -141,6 +142,18 @@ namespace ImGui {
|
||||
std::string selectedVFO = "";
|
||||
bool selectedVFOChanged = false;
|
||||
|
||||
struct FFTRedrawArgs {
|
||||
ImVec2 min;
|
||||
ImVec2 max;
|
||||
double lowFreq;
|
||||
double highFreq;
|
||||
double freqToPixelRatio;
|
||||
double pixelToFreqRatio;
|
||||
ImGuiWindow* window;
|
||||
};
|
||||
|
||||
Event<FFTRedrawArgs> onFFTRedraw;
|
||||
|
||||
enum {
|
||||
REF_LOWER,
|
||||
REF_CENTER,
|
||||
|
Reference in New Issue
Block a user