Public Types | Public Member Functions | Protected Attributes | Private Attributes | List of all members
snWidget Class Reference

Widget class that generates time and frequency domain plots and 3D plots for the snBlocks. More...

#include <snWidget.h>

Inheritance diagram for snWidget:

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...
 

Detailed Description

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:

Member Enumeration Documentation

Enumerator
INLINE 
SEPARATE 

Constructor & Destructor Documentation

snWidget::snWidget ( QWidget *  parent,
QString  ptit,
WindowType  ptype 
)

snWidget constructor.

Parameters
parent
ptit
snWidget::~snWidget ( )

Member Function Documentation

void snWidget::addPlot ( snPlot plot)
QString snWidget::getTitle ( ) const
inline
WindowType snWidget::getWindowType ( )
inline
void snWidget::pushData ( )

Push mode for data. snBlock writes data to snWidget.

void snWidget::releasePlotFlag ( )

has to be called after a snBlock wrote new plot data to snWidget.

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.

Returns
true: write new data. false: don't write

Member Data Documentation

int snWidget::fCurveStyle
private
int snWidget::fVis
private

set to 1 if new plots are requested

QMutex* snWidget::m
private

Mutex to protect fVis.

std::vector<snPlot *> snWidget::plots
protected
int snWidget::PlotXSize
private
QString snWidget::tit
private
WindowType snWidget::type
private

The documentation for this class was generated from the following files: