| 
									
										
										
										
											2015-06-22 04:16:27 +02:00
										 |  |  | #ifndef INCLUDE_GLSCOPEGUI_H
 | 
					
						
							|  |  |  | #define INCLUDE_GLSCOPEGUI_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <QWidget>
 | 
					
						
							|  |  |  | #include "dsp/dsptypes.h"
 | 
					
						
							|  |  |  | #include "util/export.h"
 | 
					
						
							|  |  |  | #include "util/message.h"
 | 
					
						
							| 
									
										
										
										
											2015-11-05 01:34:21 +01:00
										 |  |  | #include "dsp/scopevis.h"
 | 
					
						
							| 
									
										
										
										
											2015-06-22 04:16:27 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | namespace Ui { | 
					
						
							|  |  |  | 	class GLScopeGUI; | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | class MessageQueue; | 
					
						
							|  |  |  | class GLScope; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-08-30 01:26:51 +02:00
										 |  |  | class SDRANGEL_API GLScopeGUI : public QWidget { | 
					
						
							| 
									
										
										
										
											2015-06-22 04:16:27 +02:00
										 |  |  | 	Q_OBJECT | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  | 	explicit GLScopeGUI(QWidget* parent = NULL); | 
					
						
							|  |  |  | 	~GLScopeGUI(); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	void setBuddies(MessageQueue* messageQueue, ScopeVis* scopeVis, GLScope* glScope); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-06-24 00:01:48 +02:00
										 |  |  | 	void setSampleRate(int sampleRate); | 
					
						
							| 
									
										
										
										
											2015-06-22 04:16:27 +02:00
										 |  |  | 	void resetToDefaults(); | 
					
						
							|  |  |  | 	QByteArray serialize() const; | 
					
						
							|  |  |  | 	bool deserialize(const QByteArray& data); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	bool handleMessage(Message* message); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  | 	Ui::GLScopeGUI* ui; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	MessageQueue* m_messageQueue; | 
					
						
							|  |  |  | 	ScopeVis* m_scopeVis; | 
					
						
							|  |  |  | 	GLScope* m_glScope; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	int m_sampleRate; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	qint32 m_displayData; | 
					
						
							|  |  |  | 	qint32 m_displayOrientation; | 
					
						
							| 
									
										
										
										
											2015-07-12 23:45:17 +02:00
										 |  |  | 	qint32 m_displays; | 
					
						
							| 
									
										
										
										
											2015-06-22 04:16:27 +02:00
										 |  |  | 	qint32 m_timeBase; | 
					
						
							|  |  |  | 	qint32 m_timeOffset; | 
					
						
							| 
									
										
										
										
											2015-10-31 12:33:59 +01:00
										 |  |  | 	qint32 m_amplification1; | 
					
						
							|  |  |  | 	qint32 m_amp1OffsetCoarse; | 
					
						
							|  |  |  | 	qint32 m_amp1OffsetFine; | 
					
						
							| 
									
										
										
										
											2015-11-01 06:27:39 +01:00
										 |  |  | 	qint32 m_amplification2; | 
					
						
							|  |  |  | 	qint32 m_amp2OffsetCoarse; | 
					
						
							|  |  |  | 	qint32 m_amp2OffsetFine; | 
					
						
							| 
									
										
										
										
											2015-06-23 22:52:27 +02:00
										 |  |  | 	int m_displayGridIntensity; | 
					
						
							| 
									
										
										
										
											2015-07-18 11:27:09 +02:00
										 |  |  | 	int m_displayTraceIntensity; | 
					
						
							| 
									
										
										
										
											2015-11-05 00:07:51 +01:00
										 |  |  | 	quint32 m_triggerIndex; | 
					
						
							| 
									
										
										
										
											2015-11-05 01:34:21 +01:00
										 |  |  | 	qint32 m_triggerChannel[ScopeVis::m_nbTriggers]; | 
					
						
							|  |  |  | 	qint32 m_triggerLevelCoarse[ScopeVis::m_nbTriggers]; // percent of full range
 | 
					
						
							|  |  |  | 	qint32 m_triggerLevelFine[ScopeVis::m_nbTriggers];   // percent of coarse
 | 
					
						
							|  |  |  | 	bool   m_triggerPositiveEdge[ScopeVis::m_nbTriggers]; | 
					
						
							|  |  |  | 	bool   m_triggerBothEdges[ScopeVis::m_nbTriggers]; | 
					
						
							| 
									
										
										
										
											2015-07-21 22:18:17 +02:00
										 |  |  | 	qint32 m_triggerPre; | 
					
						
							| 
									
										
										
										
											2015-11-05 01:34:21 +01:00
										 |  |  |     qint32 m_triggerDelay[ScopeVis::m_nbTriggers]; | 
					
						
							|  |  |  |     qint32 m_triggerCounts[ScopeVis::m_nbTriggers]; | 
					
						
							| 
									
										
										
										
											2015-07-22 01:06:42 +02:00
										 |  |  |     qint32 m_traceLenMult; | 
					
						
							| 
									
										
										
										
											2015-06-22 04:16:27 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-12 11:25:55 +02:00
										 |  |  | 	static const qreal amps[11]; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-06-22 04:16:27 +02:00
										 |  |  | 	void applySettings(); | 
					
						
							| 
									
										
										
										
											2015-07-13 12:58:32 +02:00
										 |  |  | 	void applyTriggerSettings(); | 
					
						
							| 
									
										
										
										
											2016-04-03 01:49:58 +02:00
										 |  |  | 	void applyAllTriggerSettings(); | 
					
						
							| 
									
										
										
										
											2015-07-07 01:17:16 +02:00
										 |  |  | 	void setTimeScaleDisplay(); | 
					
						
							| 
									
										
										
										
											2015-07-22 01:06:42 +02:00
										 |  |  | 	void setTraceLenDisplay(); | 
					
						
							| 
									
										
										
										
											2015-07-12 10:17:23 +02:00
										 |  |  | 	void setTimeOfsDisplay(); | 
					
						
							| 
									
										
										
										
											2015-10-31 12:33:59 +01:00
										 |  |  | 	void setAmp1ScaleDisplay(); | 
					
						
							|  |  |  | 	void setAmp1OfsDisplay(); | 
					
						
							| 
									
										
										
										
											2015-11-01 06:27:39 +01:00
										 |  |  | 	void setAmp2ScaleDisplay(); | 
					
						
							|  |  |  | 	void setAmp2OfsDisplay(); | 
					
						
							| 
									
										
										
										
											2015-07-13 12:58:32 +02:00
										 |  |  | 	void setTrigLevelDisplay(); | 
					
						
							| 
									
										
										
										
											2015-07-21 22:18:17 +02:00
										 |  |  | 	void setTrigPreDisplay(); | 
					
						
							| 
									
										
										
										
											2015-07-23 04:58:27 +02:00
										 |  |  | 	void setTrigDelayDisplay(); | 
					
						
							| 
									
										
										
										
											2015-11-05 01:34:21 +01:00
										 |  |  | 	void setTrigUI(uint index); | 
					
						
							| 
									
										
										
										
											2015-06-22 04:16:27 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | private slots: | 
					
						
							| 
									
										
										
										
											2015-10-31 12:33:59 +01:00
										 |  |  | 	void on_amp1_valueChanged(int value); | 
					
						
							|  |  |  | 	void on_amp1OfsCoarse_valueChanged(int value); | 
					
						
							|  |  |  | 	void on_amp1OfsFine_valueChanged(int value); | 
					
						
							| 
									
										
										
										
											2015-11-01 06:27:39 +01:00
										 |  |  | 	void on_amp2_valueChanged(int value); | 
					
						
							|  |  |  | 	void on_amp2OfsCoarse_valueChanged(int value); | 
					
						
							|  |  |  | 	void on_amp2OfsFine_valueChanged(int value); | 
					
						
							| 
									
										
										
										
											2015-06-22 04:16:27 +02:00
										 |  |  | 	void on_scope_traceSizeChanged(int value); | 
					
						
							| 
									
										
										
										
											2015-07-07 01:17:16 +02:00
										 |  |  | 	void on_scope_sampleRateChanged(int value); | 
					
						
							| 
									
										
										
										
											2015-06-22 04:16:27 +02:00
										 |  |  | 	void on_time_valueChanged(int value); | 
					
						
							| 
									
										
										
										
											2015-07-22 01:06:42 +02:00
										 |  |  | 	void on_traceLen_valueChanged(int value); | 
					
						
							| 
									
										
										
										
											2015-06-22 04:16:27 +02:00
										 |  |  | 	void on_timeOfs_valueChanged(int value); | 
					
						
							| 
									
										
										
										
											2015-06-22 09:01:25 +02:00
										 |  |  | 	void on_dataMode_currentIndexChanged(int index); | 
					
						
							| 
									
										
										
										
											2015-06-23 22:52:27 +02:00
										 |  |  | 	void on_gridIntensity_valueChanged(int index); | 
					
						
							| 
									
										
										
										
											2015-07-18 11:27:09 +02:00
										 |  |  | 	void on_traceIntensity_valueChanged(int index); | 
					
						
							| 
									
										
										
										
											2015-07-21 22:18:17 +02:00
										 |  |  | 	void on_trigPre_valueChanged(int value); | 
					
						
							| 
									
										
										
										
											2015-07-23 04:58:27 +02:00
										 |  |  | 	void on_trigDelay_valueChanged(int value); | 
					
						
							| 
									
										
										
										
											2015-11-07 05:43:59 +01:00
										 |  |  | 	void on_memIndex_valueChanged(int value); | 
					
						
							| 
									
										
										
										
											2015-11-05 00:07:51 +01:00
										 |  |  | 	void on_trigCount_valueChanged(int value); | 
					
						
							| 
									
										
										
										
											2015-11-05 09:16:42 +01:00
										 |  |  | 	void on_trigIndex_valueChanged(int value); | 
					
						
							| 
									
										
										
										
											2015-06-22 04:16:27 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	void on_horizView_clicked(); | 
					
						
							|  |  |  | 	void on_vertView_clicked(); | 
					
						
							| 
									
										
										
										
											2015-07-12 22:22:04 +02:00
										 |  |  | 	void on_onlyPrimeView_clicked(); | 
					
						
							|  |  |  | 	void on_onlySecondView_clicked(); | 
					
						
							| 
									
										
										
										
											2015-07-13 12:58:32 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	void on_trigMode_currentIndexChanged(int index); | 
					
						
							|  |  |  | 	void on_slopePos_clicked(); | 
					
						
							|  |  |  | 	void on_slopeNeg_clicked(); | 
					
						
							| 
									
										
										
										
											2015-07-23 06:52:12 +02:00
										 |  |  | 	void on_slopeBoth_clicked(); | 
					
						
							| 
									
										
										
										
											2015-07-14 02:18:55 +02:00
										 |  |  | 	void on_oneShot_clicked(); | 
					
						
							| 
									
										
										
										
											2015-07-26 18:58:59 +02:00
										 |  |  | 	void on_trigLevelCoarse_valueChanged(int value); | 
					
						
							|  |  |  | 	void on_trigLevelFine_valueChanged(int value); | 
					
						
							| 
									
										
										
										
											2015-06-22 04:16:27 +02:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif // INCLUDE_GLSCOPEGUI_H
 |