Widget class that generates time and frequency domain plots and 3D plots for the snBlocks. More...
#include <snWidget.h>
Public Types | |
enum | WindowType { INLINE, SEPARATE } |
Public Member Functions | |
snWidget (QWidget *parent, QString ptit, WindowType ptype) | |
snWidget constructor. More... | |
~snWidget () | |
QString | getTitle () const |
WindowType | getWindowType () |
void | replotWidgets () |
called by main() to redraw all plots. More... | |
int | requestPlotFlag () |
has to be called befor a snBlock can write new plot data. More... | |
void | pushData () |
Push mode for data. snBlock writes data to snWidget. More... | |
void | releasePlotFlag () |
has to be called after a snBlock wrote new plot data to snWidget. More... | |
void | addPlot (snPlot *plot) |
Protected Attributes | |
std::vector< snPlot * > | plots |
Private Attributes | |
QString | tit |
WindowType | type |
int | fCurveStyle |
int | PlotXSize |
int | fVis |
set to 1 if new plots are requested More... | |
QMutex * | m |
Mutex to protect fVis. More... | |
Widget class that generates time and frequency domain plots and 3D plots for the snBlocks.
Since threads must never access widgets that were created in the main thread, snWidget serves as agent for plotting to windows created by the main thread. Threads can request time and frequency domain plots or 3D plots from it and main() can request snWidget to replot all plots. The snBlocks directly write to snWidget's member data to spped up the plotting process. A snBlock can request the following plot types from snWidget:
enum snWidget::WindowType |
snWidget::snWidget | ( | QWidget * | parent, |
QString | ptit, | ||
WindowType | ptype | ||
) |
snWidget constructor.
parent | |
ptit |
snWidget::~snWidget | ( | ) |
void snWidget::addPlot | ( | snPlot * | plot | ) |
|
inline |
|
inline |
void snWidget::releasePlotFlag | ( | ) |
void snWidget::replotWidgets | ( | ) |
called by main() to redraw all plots.
int snWidget::requestPlotFlag | ( | ) |
has to be called befor a snBlock can write new plot data.
|
private |
|
private |
set to 1 if new plots are requested
|
private |
Mutex to protect fVis.
|
protected |
|
private |
|
private |
|
private |