Loading...
Searching...
No Matches
vectordisplayform.h
Go to the documentation of this file.
/* -*- c++ -*- */
/*
* Copyright 2014 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef VECTOR_DISPLAY_FORM_H
#define VECTOR_DISPLAY_FORM_H
#include <gnuradio/qtgui/VectorDisplayPlot.h>
#include <gnuradio/qtgui/spectrumUpdateEvents.h>
#include <QtGui/QtGui>
#include <vector>
#include <gnuradio/qtgui/displayform.h>
/*!
* \brief DisplayForm child for managing vector plots.
* \ingroup qtgui_blk
*/
class VectorDisplayForm : public DisplayForm
{
Q_OBJECT
public:
VectorDisplayForm(int nplots = 1, QWidget* parent = 0);
~VectorDisplayForm() override;
VectorDisplayPlot* getPlot() override;
int getVecSize() const;
float getVecAverage() const;
void setXAxisLabel(const QString& label);
void setYAxisLabel(const QString& label);
void setRefLevel(double refLevel);
// returns the x-Value that was last double-clicked on by the user
float getClickedXVal() const;
// checks if there was a double-click event; reset if there was
bool checkClicked();
public slots:
void customEvent(QEvent* e) override;
void setVecSize(const int);
void setVecAverage(const float);
void setXaxis(double start, double step);
void setYaxis(double min, double max);
void setYMax(const QString& m);
void setYMin(const QString& m);
void autoScale(bool en) override;
void clearMaxHold();
void clearMinHold();
private slots:
void newData(const QEvent* updateEvent) override;
void onPlotPointSelected(const QPointF p) override;
private:
uint64_t d_num_real_data_points;
QIntValidator* d_int_validator;
int d_vecsize;
float d_vecavg;
double d_ref_level;
// TODO do I keep these?
bool d_clicked;
double d_clicked_x_level;
AverageMenu* d_avgmenu;
QAction *d_clearmin_act, *d_clearmax_act;
};
#endif /* VECTOR_DISPLAY_FORM_H */
VectorDisplayPlot.h
DisplayForm::DisplayForm
DisplayForm(int nplots=1, QWidget *parent=0)
VectorDisplayForm::autoScale
void autoScale(bool en) override
VectorDisplayForm::getPlot
VectorDisplayPlot * getPlot() override
VectorDisplayForm::setYMax
void setYMax(const QString &m)
VectorDisplayForm::clearMaxHold
void clearMaxHold()
VectorDisplayForm::setRefLevel
void setRefLevel(double refLevel)
VectorDisplayForm::setXaxis
void setXaxis(double start, double step)
VectorDisplayForm::setYaxis
void setYaxis(double min, double max)
VectorDisplayForm::clearMinHold
void clearMinHold()
VectorDisplayForm::getClickedXVal
float getClickedXVal() const
VectorDisplayForm::setYAxisLabel
void setYAxisLabel(const QString &label)
VectorDisplayForm::setYMin
void setYMin(const QString &m)
VectorDisplayForm::getVecAverage
float getVecAverage() const
VectorDisplayForm::checkClicked
bool checkClicked()
VectorDisplayForm::customEvent
void customEvent(QEvent *e) override
VectorDisplayForm::setVecSize
void setVecSize(const int)
VectorDisplayForm::getVecSize
int getVecSize() const
VectorDisplayForm::~VectorDisplayForm
~VectorDisplayForm() override
VectorDisplayForm::VectorDisplayForm
VectorDisplayForm(int nplots=1, QWidget *parent=0)
VectorDisplayForm::setXAxisLabel
void setXAxisLabel(const QString &label)
VectorDisplayForm::setVecAverage
void setVecAverage(const float)
VectorDisplayPlot
QWidget for displaying 1D-vector plots.
Definition VectorDisplayPlot.h:24
displayform.h
spectrumUpdateEvents.h