| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | #ifndef INCLUDE_CHANNELMARKER_H
 | 
					
						
							|  |  |  | #define INCLUDE_CHANNELMARKER_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <QObject>
 | 
					
						
							|  |  |  | #include <QColor>
 | 
					
						
							| 
									
										
										
										
											2017-08-26 09:58:07 +02:00
										 |  |  | #include <QByteArray>
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-01 16:52:23 +02:00
										 |  |  | #include "settings/serializable.h"
 | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | #include "util/export.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-01 16:52:23 +02:00
										 |  |  | class SDRANGEL_API ChannelMarker : public QObject, public Serializable { | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | 	Q_OBJECT | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | public: | 
					
						
							| 
									
										
										
										
											2015-05-11 03:27:31 +02:00
										 |  |  | 	typedef enum sidebands_e | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 		dsb, | 
					
						
							|  |  |  | 		lsb, | 
					
						
							| 
									
										
										
										
											2017-03-16 11:49:14 +01:00
										 |  |  | 		usb, | 
					
						
							|  |  |  | 		vusb, //!< USB with vestigial LSB
 | 
					
						
							|  |  |  | 		vlsb  //!< LSB with vestigial USB
 | 
					
						
							| 
									
										
										
										
											2015-05-11 03:27:31 +02:00
										 |  |  | 	} sidebands_t; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-26 06:38:28 +02:00
										 |  |  | 	typedef enum frequencyScaleDisplay_e | 
					
						
							|  |  |  | 	{ | 
					
						
							|  |  |  | 	    FScaleDisplay_freq, | 
					
						
							|  |  |  | 	    FScaleDisplay_title, | 
					
						
							|  |  |  | 	    FScaleDisplay_addressSend, | 
					
						
							|  |  |  | 	    FScaleDisplay_addressReceive, | 
					
						
							| 
									
										
										
										
											2017-08-26 09:58:07 +02:00
										 |  |  | 	    FScaleDisplay_none | 
					
						
							| 
									
										
										
										
											2017-08-26 06:38:28 +02:00
										 |  |  | 	} frequencyScaleDisplay_t; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | 	ChannelMarker(QObject* parent = NULL); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	void setTitle(const QString& title); | 
					
						
							|  |  |  | 	const QString& getTitle() const { return m_title; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	void setCenterFrequency(int centerFrequency); | 
					
						
							|  |  |  | 	int getCenterFrequency() const { return m_centerFrequency; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	void setBandwidth(int bandwidth); | 
					
						
							|  |  |  | 	int getBandwidth() const { return m_bandwidth; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-16 11:49:14 +01:00
										 |  |  |     void setOppositeBandwidth(int bandwidth); | 
					
						
							|  |  |  |     int getOppositeBandwidth() const { return m_oppositeBandwidth; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-12 21:50:02 +02:00
										 |  |  | 	void setLowCutoff(int lowCutoff); | 
					
						
							|  |  |  | 	int getLowCutoff() const { return m_lowCutoff; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-11 03:27:31 +02:00
										 |  |  | 	void setSidebands(sidebands_t sidebands); | 
					
						
							|  |  |  | 	sidebands_t getSidebands() const { return m_sidebands; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | 	void setVisible(bool visible); | 
					
						
							|  |  |  | 	bool getVisible() const { return m_visible; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-05-11 11:03:01 +02:00
										 |  |  | 	void setHighlighted(bool highlighted); | 
					
						
							|  |  |  | 	bool getHighlighted() const { return m_highlighted; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | 	void setColor(const QColor& color); | 
					
						
							|  |  |  | 	const QColor& getColor() const { return m_color; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-03-16 00:39:49 +01:00
										 |  |  | 	void setMovable(bool movable) { m_movable = movable; } | 
					
						
							|  |  |  | 	bool getMovable() const { return m_movable; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-23 23:43:11 +02:00
										 |  |  | 	void setUDPAddress(const QString& udpAddress); | 
					
						
							|  |  |  | 	const QString& getUDPAddress() const { return m_udpAddress; } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-24 02:26:47 +02:00
										 |  |  | 	void setUDPReceivePort(quint16 port); | 
					
						
							|  |  |  | 	quint16 getUDPReceivePort() const { return m_udpReceivePort; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     void setUDPSendPort(quint16 port); | 
					
						
							|  |  |  |     quint16 getUDPSendPort() const { return m_udpSendPort; } | 
					
						
							| 
									
										
										
										
											2017-08-23 23:43:11 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-26 06:38:28 +02:00
										 |  |  |     void setFrequencyScaleDisplayType(frequencyScaleDisplay_t type) { m_fScaleDisplayType = type; } | 
					
						
							|  |  |  |     frequencyScaleDisplay_t getFrequencyScaleDisplayType() const { return m_fScaleDisplayType; } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     const QString& getDisplayAddressSend() const { return m_displayAddressSend; } | 
					
						
							|  |  |  |     const QString& getDisplayAddressReceive() const { return m_displayAddressReceive; } | 
					
						
							| 
									
										
										
										
											2017-08-23 23:43:11 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-01 16:52:23 +02:00
										 |  |  |     virtual QByteArray serialize() const; | 
					
						
							|  |  |  |     virtual bool deserialize(const QByteArray& data); | 
					
						
							| 
									
										
										
										
											2017-08-26 09:58:07 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | protected: | 
					
						
							|  |  |  | 	static QRgb m_colorTable[]; | 
					
						
							|  |  |  | 	static int m_nextColor; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	QString m_title; | 
					
						
							| 
									
										
										
										
											2017-08-26 06:38:28 +02:00
										 |  |  | 	QString m_displayAddressSend; | 
					
						
							|  |  |  |     QString m_displayAddressReceive; | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | 	int m_centerFrequency; | 
					
						
							|  |  |  | 	int m_bandwidth; | 
					
						
							| 
									
										
										
										
											2017-03-16 11:49:14 +01:00
										 |  |  |     int m_oppositeBandwidth; | 
					
						
							| 
									
										
										
										
											2015-05-12 21:50:02 +02:00
										 |  |  | 	int m_lowCutoff; | 
					
						
							| 
									
										
										
										
											2015-05-11 03:27:31 +02:00
										 |  |  | 	sidebands_t m_sidebands; | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | 	bool m_visible; | 
					
						
							| 
									
										
										
										
											2015-05-11 11:03:01 +02:00
										 |  |  | 	bool m_highlighted; | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | 	QColor m_color; | 
					
						
							| 
									
										
										
										
											2017-03-16 00:39:49 +01:00
										 |  |  | 	bool m_movable; | 
					
						
							| 
									
										
										
										
											2017-08-23 23:43:11 +02:00
										 |  |  | 	QString m_udpAddress; | 
					
						
							| 
									
										
										
										
											2017-08-24 02:26:47 +02:00
										 |  |  | 	quint16 m_udpReceivePort; | 
					
						
							|  |  |  |     quint16 m_udpSendPort; | 
					
						
							| 
									
										
										
										
											2017-08-26 06:38:28 +02:00
										 |  |  |     frequencyScaleDisplay_t m_fScaleDisplayType; | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-08-26 09:58:07 +02:00
										 |  |  |     void resetToDefaults(); | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-05-18 16:52:39 +01:00
										 |  |  | signals: | 
					
						
							|  |  |  | 	void changed(); | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif // INCLUDE_CHANNELMARKER_H
 |