|
OpenHantek
|
OpenGL accelerated widget that displays the oscilloscope screen. More...
#include <glscope.h>
Data Structures | |
| struct | Vertices |
Signals | |
| void | markerMoved (int cursorIndex, int marker) |
| void | cursorMeasurement (QPointF measurePosition=QPointF(), QPoint globalPosition=QPoint(), bool status=false) |
Public Member Functions | |
| void | showData (std::shared_ptr< PPresult > newData) |
| void | selectCursor (int index) |
| void | updateCursor (int index=0) |
| void | generateGrid (int index=-1, double value=0.0, bool pressed=false) |
| void | setVisible (bool visible) override |
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 | useOpenGLSLversion (QString version=GLSL120) |
| static QString | getOpenGLversion () |
| static QString | getGLSLversion () |
Protected Member Functions | |
| GlScope (DsoSettingsScope *scope, DsoSettingsView *view, QWidget *parent=nullptr) | |
| Initializes the scope widget. | |
| ~GlScope () override | |
| GlScope (const GlScope &)=delete | |
| void | initializeGL () override |
| Initializes OpenGL output. | |
| void | paintGL () override |
| Draw the graphs, marker and the grid. | |
| void | resizeGL (int width, int height) override |
| Resize the widget. | |
| void | mousePressEvent (QMouseEvent *event) override |
| void | mouseMoveEvent (QMouseEvent *event) override |
| void | mouseReleaseEvent (QMouseEvent *event) override |
| void | mouseDoubleClickEvent (QMouseEvent *event) override |
| void | wheelEvent (QWheelEvent *event) override |
| void | paintEvent (QPaintEvent *event) override |
| void | drawGrid () |
| Draw the grid. | |
| void | drawMarkers () |
| Draw vertical lines at marker positions. | |
| void | generateVertices (int marker, const DsoSettingsScopeCursor &cursor) |
| void | drawVertices (QOpenGLFunctions *gl, int 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 | posToScopePos (QPointF pos) |
| void | rightMouseEvent (QMouseEvent *event) |
Private Member Functions | |
| void | draw4Cross (std::vector< QVector3D > &va, int section, float x, float y) |
Private Attributes | |
| DsoSettingsScope * | scope |
| DsoSettingsView * | view |
| bool | zoomed = false |
| const int | NO_MARKER = INT_MAX |
| const int | VERTICES_ARRAY_SIZE = sizeof( Vertices ) / sizeof( QVector3D ) |
| std::vector< Vertices > | vaMarker |
| int | selectedMarker = NO_MARKER |
| QOpenGLBuffer | m_marker |
| QOpenGLVertexArrayObject | m_vaoMarker |
| std::vector< DsoSettingsScopeCursor * > | cursorInfo |
| int | selectedCursor = 0 |
| bool | rightMouseInside = false |
| QOpenGLBuffer | m_grid |
| QOpenGLVertexArrayObject | m_vaoGrid [gridItems] |
| GLsizei | gridDrawCounts [gridItems] |
| QColor | triggerLineColor = QColor( "black" ) |
| std::list< Graph > | m_GraphHistory |
| unsigned | currentGraphInHistory = 0 |
| QString | renderInfo |
| bool | shaderCompileSuccess = false |
| QString | errorMessage |
| std::unique_ptr< QOpenGLShaderProgram > | m_program |
| QMatrix4x4 | pmvMatrix |
| projection, view matrix | |
| int | colorLocation |
| int | vertexLocation |
| int | matrixLocation |
| int | selectionLocation |
Static Private Attributes | |
| static const int | gridItems = 4 |
| static QString | OpenGLversion |
| static QString | GLSLversion |
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 |
|
signal |
|
private |
|
protected |
Draw the grid.
|
protected |
|
protected |
Draw vertical lines at marker positions.
|
protected |
|
protected |
|
protected |
| void GlScope::generateGrid | ( | int | index = -1, |
| double | value = 0.0, | ||
| bool | pressed = false ) |
|
protected |
|
inlinestatic |
|
static |
|
overrideprotected |
Initializes OpenGL output.
|
signal |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
Draw the graphs, marker and the grid.
|
protected |
|
overrideprotected |
Resize the widget.
| width | The new width of the widget. |
| height | The new height of the widget. |
|
protected |
| void GlScope::selectCursor | ( | int | index | ) |
|
override |
| void GlScope::showData | ( | std::shared_ptr< PPresult > | newData | ) |
Show new post processed data
| data |
| void GlScope::updateCursor | ( | int | index = 0 | ) |
|
static |
|
overrideprotected |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
private |
|
staticprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
staticprivate |
|
private |
projection, view matrix
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |