|
OpenHantek
|
OpenGL accelerated widget that displays the oscilloscope screen. More...
#include <glscope.h>
Data Structures | |
| struct | Vertices |
Signals | |
| void | markerMoved (unsigned cursorIndex, unsigned marker) |
Public Member Functions | |
| void | showData (std::shared_ptr< PPresult > newData) |
| void | updateCursor (unsigned index=0) |
| void | cursorSelected (unsigned index) |
Static Public Member Functions | |
| static GlScope * | createNormal (DsoSettingsScope *scope, DsoSettingsView *view, QWidget *parent=nullptr) |
| static GlScope * | createZoomed (DsoSettingsScope *scope, DsoSettingsView *view, QWidget *parent=nullptr) |
| static void | fixOpenGLversion (QSurfaceFormat::RenderableType t=QSurfaceFormat::DefaultRenderableType) |
Protected Member Functions | |
| GlScope (DsoSettingsScope *scope, DsoSettingsView *view, QWidget *parent=nullptr) | |
| Initializes the scope widget. More... | |
| ~GlScope () override | |
| GlScope (const GlScope &)=delete | |
| void | initializeGL () override |
| Initializes OpenGL output. More... | |
| void | paintGL () override |
| Draw the graphs, marker and the grid. More... | |
| void | resizeGL (int width, int height) override |
| Resize the widget. More... | |
| void | mousePressEvent (QMouseEvent *event) override |
| void | mouseMoveEvent (QMouseEvent *event) override |
| void | mouseReleaseEvent (QMouseEvent *event) override |
| void | paintEvent (QPaintEvent *event) override |
| void | drawGrid () |
| Draw the grid. More... | |
| void | drawMarkers () |
| Draw vertical lines at marker positions. More... | |
| void | generateVertices (unsigned marker, const DsoSettingsScopeCursor &cursor) |
| void | drawVertices (QOpenGLFunctions *gl, unsigned marker, QColor color) |
| void | drawVoltageChannelGraph (ChannelID channel, Graph &graph, int historyIndex) |
| void | drawHistogramChannelGraph (ChannelID channel, Graph &graph, int historyIndex) |
| void | drawSpectrumChannelGraph (ChannelID channel, Graph &graph, int historyIndex) |
| QPointF | eventToPosition (QMouseEvent *event) |
Private Member Functions | |
| void | generateGrid (QOpenGLShaderProgram *program) |
| void | draw4Cross (std::vector< QVector3D > &va, int section, float x, float y) |
Private Attributes | |
| DsoSettingsScope * | scope |
| DsoSettingsView * | view |
| bool | zoomed = false |
| const unsigned | NO_MARKER = UINT_MAX |
| const unsigned | VERTICES_ARRAY_SIZE = sizeof(Vertices) / sizeof(QVector3D) |
| std::vector< Vertices > | vaMarker |
| unsigned | selectedMarker = NO_MARKER |
| QOpenGLBuffer | m_marker |
| QOpenGLVertexArrayObject | m_vaoMarker |
| std::vector< DsoSettingsScopeCursor * > | cursorInfo |
| unsigned | selectedCursor = 0 |
| QOpenGLBuffer | m_grid |
| QOpenGLVertexArrayObject | m_vaoGrid [3] |
| GLsizei | gridDrawCounts [3] |
| std::list< Graph > | m_GraphHistory |
| unsigned | currentGraphInHistory = 0 |
| unsigned int | GLSLversion = 150 |
| bool | shaderCompileSuccess = false |
| QString | errorMessage |
| std::unique_ptr< QOpenGLShaderProgram > | m_program |
| QMatrix4x4 | pmvMatrix |
| projection, view matrix More... | |
| int | colorLocation |
| int | vertexLocation |
| int | matrixLocation |
| int | selectionLocation |
OpenGL accelerated widget that displays the oscilloscope screen.
|
protected |
Initializes the scope widget.
| settings | The settings that should be used. |
| parent | The parent widget. |
|
overrideprotected |
|
protecteddelete |
|
static |
|
static |
|
inline |
|
private |
|
protected |
Draw the grid.
|
protected |
|
protected |
Draw vertical lines at marker positions.
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
We need at least OpenGL 3.2 with shader version 150 or OpenGL ES 2.0 with shader version 100.
|
private |
|
protected |
|
overrideprotected |
Initializes OpenGL output.
|
signal |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
Draw the graphs, marker and the grid.
|
overrideprotected |
Resize the widget.
| width | The new width of the widget. |
| height | The new height of the widget. |
| void GlScope::showData | ( | std::shared_ptr< PPresult > | newData | ) |
Show new post processed data
| data |
| void GlScope::updateCursor | ( | unsigned | index = 0 | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
projection, view matrix
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |