SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
channelmarker.h
Go to the documentation of this file.
1 #ifndef INCLUDE_CHANNELMARKER_H
2 #define INCLUDE_CHANNELMARKER_H
3 
4 #include <QObject>
5 #include <QColor>
6 #include <QByteArray>
7 
9 #include "export.h"
10 
11 class SDRBASE_API ChannelMarker : public QObject, public Serializable {
12  Q_OBJECT
13 
14 public:
15  typedef enum sidebands_e
16  {
17  dsb,
18  lsb,
19  usb,
20  vusb,
21  vlsb
22  } sidebands_t;
23 
25  {
30  FScaleDisplay_none
32 
33  ChannelMarker(QObject* parent = NULL);
34 
35  void emitChangedByAPI();
36 
37  void setTitle(const QString& title);
38  const QString& getTitle() const { return m_title; }
39 
40  void setCenterFrequency(int centerFrequency);
41  void setCenterFrequencyByCursor(int centerFrequency);
42  int getCenterFrequency() const { return m_centerFrequency; }
43 
44  void setBandwidth(int bandwidth);
45  int getBandwidth() const { return m_bandwidth; }
46 
47  void setOppositeBandwidth(int bandwidth);
48  int getOppositeBandwidth() const { return m_oppositeBandwidth; }
49 
50  void setLowCutoff(int lowCutoff);
51  int getLowCutoff() const { return m_lowCutoff; }
52 
53  void setSidebands(sidebands_t sidebands);
54  sidebands_t getSidebands() const { return m_sidebands; }
55 
56  void setVisible(bool visible);
57  bool getVisible() const { return m_visible; }
58 
59  void setHighlighted(bool highlighted);
60  void setHighlightedByCursor(bool highlighted);
61  bool getHighlighted() const { return m_highlighted; }
62 
63  void setColor(const QColor& color);
64  const QColor& getColor() const { return m_color; }
65 
66  void setMovable(bool movable) { m_movable = movable; }
67  bool getMovable() const { return m_movable; }
68 
69  void setFrequencyScaleDisplayType(frequencyScaleDisplay_t type) { m_fScaleDisplayType = type; }
70  frequencyScaleDisplay_t getFrequencyScaleDisplayType() const { return m_fScaleDisplayType; }
71 
72  const QString& getDisplayAddressSend() const { return m_displayAddressSend; }
73  const QString& getDisplayAddressReceive() const { return m_displayAddressReceive; }
74 
75  void setSourceOrSinkStream(bool sourceOrSinkStream) { m_sourceOrSinkStream = sourceOrSinkStream; }
76  bool getSourceOrSinkStream() const { return m_sourceOrSinkStream; }
77  void setStreamIndex(int streamIndex) { m_streamIndex = streamIndex; }
78  int getStreamIndex() const { return m_streamIndex; }
79 
80  virtual QByteArray serialize() const;
81  virtual bool deserialize(const QByteArray& data);
82 
83 protected:
84  static QRgb m_colorTable[];
85  static int m_nextColor;
86 
87  QString m_title;
94  sidebands_t m_sidebands;
95  bool m_visible;
97  QColor m_color;
98  bool m_movable;
99  frequencyScaleDisplay_t m_fScaleDisplayType;
102 
103  void resetToDefaults();
104 
105 signals:
106  void changedByAPI();
107  void changedByCursor();
108  void highlightedByCursor();
109 };
110 
111 #endif // INCLUDE_CHANNELMARKER_H
enum ChannelMarker::frequencyScaleDisplay_e frequencyScaleDisplay_t
int getOppositeBandwidth() const
Definition: channelmarker.h:48
int getStreamIndex() const
Definition: channelmarker.h:78
int getCenterFrequency() const
Definition: channelmarker.h:42
int getLowCutoff() const
Definition: channelmarker.h:51
bool m_sourceOrSinkStream
sidebands_t getSidebands() const
Definition: channelmarker.h:54
sidebands_t m_sidebands
Definition: channelmarker.h:94
frequencyScaleDisplay_t getFrequencyScaleDisplayType() const
Definition: channelmarker.h:70
QString m_title
Definition: channelmarker.h:87
const QString & getDisplayAddressSend() const
Definition: channelmarker.h:72
void setFrequencyScaleDisplayType(frequencyScaleDisplay_t type)
Definition: channelmarker.h:69
const QString & getDisplayAddressReceive() const
Definition: channelmarker.h:73
bool getSourceOrSinkStream() const
Definition: channelmarker.h:76
QString m_displayAddressReceive
Definition: channelmarker.h:89
void setStreamIndex(int streamIndex)
Definition: channelmarker.h:77
void setSourceOrSinkStream(bool sourceOrSinkStream)
Definition: channelmarker.h:75
void setMovable(bool movable)
Definition: channelmarker.h:66
USB with vestigial LSB.
Definition: channelmarker.h:20
const QString & getTitle() const
Definition: channelmarker.h:38
enum ChannelMarker::sidebands_e sidebands_t
bool getHighlighted() const
Definition: channelmarker.h:61
virtual bool deserialize(const QByteArray &data)=0
static int m_nextColor
Definition: channelmarker.h:85
virtual QByteArray serialize() const =0
QString m_displayAddressSend
Definition: channelmarker.h:88
int getBandwidth() const
Definition: channelmarker.h:45
const QColor & getColor() const
Definition: channelmarker.h:64
int m_oppositeBandwidth
Definition: channelmarker.h:92
bool getVisible() const
Definition: channelmarker.h:57
#define SDRBASE_API
Definition: export.h:40
bool getMovable() const
Definition: channelmarker.h:67
frequencyScaleDisplay_t m_fScaleDisplayType
Definition: channelmarker.h:99