From 992d4b4b8d3f3a630a2cf00d593ee4ce4dfa7ce8 Mon Sep 17 00:00:00 2001 From: Christoph Berg Date: Thu, 9 Jan 2025 22:12:06 +0100 Subject: New upstream version 2.7.0~rc8+repack --- plots/mainwindow.cpp | 58 ---------------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100755 plots/mainwindow.cpp (limited to 'plots/mainwindow.cpp') diff --git a/plots/mainwindow.cpp b/plots/mainwindow.cpp deleted file mode 100755 index 1fc4e584..00000000 --- a/plots/mainwindow.cpp +++ /dev/null @@ -1,58 +0,0 @@ -#include "mainwindow.h" -#include "ui_mainwindow.h" -#include -#include -#include -#include -#include - -#include -#include - -using namespace std; -#define NPTS 3456 - -MainWindow::MainWindow(QWidget *parent) : - QMainWindow(parent), - ui(new Ui::MainWindow) -{ - ui->setupUi(this); - setGeometry(400, 250, 542, 390); - - setupPlot(); -} - -MainWindow::~MainWindow() -{ - delete ui; -} - -void MainWindow::setupPlot() -{ - plotspec(ui->customPlot); - setWindowTitle("Reference Spectrum"); - statusBar()->clearMessage(); - ui->customPlot->replot(); -} - -void MainWindow::plotspec(QCustomPlot *customPlot) -{ - QVector x(NPTS), y1(NPTS), y2(NPTS), y3(NPTS), y4(NPTS); - ifstream inFile; - double ymin=1.0e30; - double ymax=-ymin; - inFile.open("c:/users/joe/appdata/local/WSJT-X/refspec.dat"); - - for (int i = 0; i < NPTS; i++) { - inFile >> x[i] >> y1[i] >> y2[i] >> y3[3] >> y4[4]; - if(y2[i]>ymax) ymax=y2[i]; - if(y2[i]addGraph(); - customPlot->graph(0)->setData(x, y2); - customPlot->xAxis->setLabel("Frequency (Hz)"); - customPlot->yAxis->setLabel("Relative power (dB)"); - customPlot->xAxis->setRange(0, 6000); - customPlot->yAxis->setRange(ymin, ymax); -} -- cgit v1.2.3