CPowerSpectrumChannelDisplay Class Reference

List of all members.

Public Member Functions

 CPowerSpectrumChannelDisplay (CPowerSpectrumDisplayView *pParentDisplay, OpenViBE::uint32 ui32Channel, CPowerSpectrumDatabase &pDatabase, OpenViBE::int32 i32ChannelDisplayWidthRequest, OpenViBE::int32 i32ChannelDisplayHeightRequest, OpenViBE::int32 i32LeftRulerWidthRequest, OpenViBE::int32 i32LeftRulerHeightRequest)
 Constructor.
 ~CPowerSpectrumChannelDisplay ()
 Destructor.
::GtkWidget * getTopWidget () const
 Get channel top (main) widget.
GtkWidget * getSpectrumDisplayWidget () const
 Get spectrum display widget.
void toggle (OpenViBE::boolean bActive)
 Toggle channel visibility.
void toggleLeftRuler (OpenViBE::boolean bActive)
 Set left ruler visibility.
void drawSpectrum ()
 Draw channel spectrum.
void drawLeftRuler ()
 Draws left ruler (amplitude scale)
void drawBottomRuler ()
 Draws bottom ruler (frequency scale)
void update ()
 Compute spectrum.
void resizeRGBBuffer (OpenViBE::uint32 ui32Width, OpenViBE::uint32 ui32Height)
 Resize RGB buffer of this channel.
void drawBoxToBuffer (OpenViBE::uint32 ui32X, OpenViBE::uint32 ui32Y, OpenViBE::uint32 ui32Width, OpenViBE::uint32 ui32Height, OpenViBE::uint8 ui8Red, OpenViBE::uint8 ui8Green, OpenViBE::uint8 ui8Blue)
 Draw a box in a RGB buffer.

Detailed Description

Displays power spectrum of a given channel.


Constructor & Destructor Documentation

CPowerSpectrumChannelDisplay ( CPowerSpectrumDisplayView pParentDisplay,
OpenViBE::uint32  ui32Channel,
CPowerSpectrumDatabase pDatabase,
OpenViBE::int32  i32ChannelDisplayWidthRequest,
OpenViBE::int32  i32ChannelDisplayHeightRequest,
OpenViBE::int32  i32LeftRulerWidthRequest,
OpenViBE::int32  i32LeftRulerHeightRequest 
)

Constructor.

Parameters:
pParentDisplayPointer to object managing power spectrum widgets
ui32ChannelIndex of channel to display
pDatabaseObject holding signal data
i32ChannelDisplayWidthRequestWidth to be requested by widget
i32ChannelDisplayHeightRequestHeight to be requested by widget
i32LeftRulerWidthRequestWidth to be requested by left ruler
i32LeftRulerHeightRequestHeight to be requested by left ruler

Member Function Documentation

::GtkWidget* getTopWidget ( ) const

Get channel top (main) widget.

Returns:
Pointer to top GtkWidget
GtkWidget* getSpectrumDisplayWidget ( ) const

Get spectrum display widget.

Returns:
Pointer to spectrum display widget
void toggle ( OpenViBE::boolean  bActive)

Toggle channel visibility.

Parameters:
bActiveVisibility flag
void toggleLeftRuler ( OpenViBE::boolean  bActive)

Set left ruler visibility.

Parameters:
bActiveVisibility flag
void resizeRGBBuffer ( OpenViBE::uint32  ui32Width,
OpenViBE::uint32  ui32Height 
)

Resize RGB buffer of this channel.

Parameters:
ui32WidthBuffer width
ui32HeightBuffer height
void drawBoxToBuffer ( OpenViBE::uint32  ui32X,
OpenViBE::uint32  ui32Y,
OpenViBE::uint32  ui32Width,
OpenViBE::uint32  ui32Height,
OpenViBE::uint8  ui8Red,
OpenViBE::uint8  ui8Green,
OpenViBE::uint8  ui8Blue 
)

Draw a box in a RGB buffer.

Parameters:
ui32XBox left coordinate
ui32YBox top coordinate
ui32WidthBox width
ui32HeightBox height
ui8RedRed component of box color
ui8GreenGreen component of box color
ui8BlueBlue component of box color