29 lines
690 B
C++
29 lines
690 B
C++
// File: host/src/GraphWidget.h
|
|
#pragma once
|
|
|
|
#include <QWidget>
|
|
#include <QVBoxLayout>
|
|
#include "qcustomplot.h"
|
|
|
|
class GraphWidget : public QWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit GraphWidget(QWidget *parent = nullptr);
|
|
|
|
// Data Handling
|
|
void addData(double freq, double val1, double val2);
|
|
void addHilbertData(const QVector<double>& freq, const QVector<double>& hilbertImag);
|
|
void clear();
|
|
|
|
// View Configurations
|
|
void configureRawPlot();
|
|
void configureNyquistPlot();
|
|
|
|
private:
|
|
QVBoxLayout *layout;
|
|
QCustomPlot *plot;
|
|
QCPGraph *graph1; // Real
|
|
QCPGraph *graph2; // Imaginary
|
|
QCPGraph *graph3; // Hilbert (Analytic Imaginary)
|
|
}; |