OpenHantek
Data Structures | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions
GlScope Class Reference

OpenGL accelerated widget that displays the oscilloscope screen. More...

#include <glscope.h>

Inheritance diagram for GlScope:

Signals

void markerMoved (unsigned cursorIndex, unsigned marker)
 

Public Member Functions

void showData (std::shared_ptr< PPresult > data)
 
void updateCursor (unsigned index=0)
 
void cursorSelected (unsigned index)
 

Static Public Member Functions

static GlScopecreateNormal (DsoSettingsScope *scope, DsoSettingsView *view, QWidget *parent=0)
 
static GlScopecreateZoomed (DsoSettingsScope *scope, DsoSettingsView *view, QWidget *parent=0)
 
static void fixOpenGLversion (QSurfaceFormat::RenderableType t=QSurfaceFormat::DefaultRenderableType)
 

Protected Member Functions

 GlScope (DsoSettingsScope *scope, DsoSettingsView *view, QWidget *parent=0)
 Initializes the scope widget. More...
 
 GlScope (const GlScope &)=delete
 
virtual void initializeGL () override
 Initializes OpenGL output.
 
virtual void paintGL () override
 Draw the graphs, marker and the grid.
 
virtual void resizeGL (int width, int height) override
 Resize the widget. More...
 
virtual void mousePressEvent (QMouseEvent *event) override
 
virtual void mouseMoveEvent (QMouseEvent *event) override
 
virtual void mouseReleaseEvent (QMouseEvent *event) override
 
virtual void paintEvent (QPaintEvent *event) override
 
void drawGrid ()
 Draw the grid.
 
void drawMarkers ()
 Draw vertical lines at marker positions.
 
void generateVertices (unsigned marker, const DsoSettingsScopeCursor &cursor)
 
void drawVertices (QOpenGLFunctions *gl, unsigned marker, QColor color)
 
void drawVoltageChannelGraph (ChannelID channel, Graph &graph, int historyIndex)
 
void drawSpectrumChannelGraph (ChannelID channel, Graph &graph, int historyIndex)
 
QPointF eventToPosition (QMouseEvent *event)
 

Detailed Description

OpenGL accelerated widget that displays the oscilloscope screen.

Constructor & Destructor Documentation

◆ GlScope()

GlScope::GlScope ( DsoSettingsScope scope,
DsoSettingsView view,
QWidget *  parent = 0 
)
protected

Initializes the scope widget.

Parameters
settingsThe settings that should be used.
parentThe parent widget.

Member Function Documentation

◆ fixOpenGLversion()

void GlScope::fixOpenGLversion ( QSurfaceFormat::RenderableType  t = QSurfaceFormat::DefaultRenderableType)
static

We need at least OpenGL 3.2 with shader version 150 or OpenGL ES 2.0 with shader version 100.

◆ resizeGL()

void GlScope::resizeGL ( int  width,
int  height 
)
overrideprotectedvirtual

Resize the widget.

Parameters
widthThe new width of the widget.
heightThe new height of the widget.

◆ showData()

void GlScope::showData ( std::shared_ptr< PPresult data)

Show new post processed data

Parameters
data

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