19 #ifndef INCLUDE_PRESET_H 20 #define INCLUDE_PRESET_H 36 m_channelIdURI(channelIdURI),
50 const QString& deviceSerial,
52 const QByteArray&
config) :
54 m_deviceSerial(deviceSerial),
55 m_deviceSequence(deviceSequence),
63 void resetToDefaults();
68 QByteArray serialize()
const;
69 bool deserialize(
const QByteArray& data);
71 void setGroup(
const QString& group) { m_group = group; }
72 const QString&
getGroup()
const {
return m_group; }
73 void setDescription(
const QString& description) { m_description = description; }
81 void setLayout(
const QByteArray& data) { m_layout = data; }
82 const QByteArray&
getLayout()
const {
return m_layout; }
89 void setDeviceConfig(
const QString& deviceId,
const QString& deviceSerial,
int deviceSequence,
const QByteArray&
config)
91 addOrUpdateDeviceConfig(deviceId, deviceSerial, deviceSequence, config);
94 void addOrUpdateDeviceConfig(
const QString& deviceId,
95 const QString& deviceSerial,
99 const QByteArray* findBestDeviceConfig(
const QString& deviceId,
100 const QString& deviceSerial,
101 int deviceSequence)
const;
146 const QByteArray* findBestDeviceConfigSoapy(
const QString& sourceId,
const QString& deviceSerial)
const;
152 #endif // INCLUDE_PRESET_H
int getChannelCount() const
void setCenterFrequency(const quint64 centerFrequency)
Q_DECLARE_METATYPE(const Preset *)
DeviceConfig(const QString &deviceId, const QString &deviceSerial, int deviceSequence, const QByteArray &config)
QList< ChannelConfig > ChannelConfigs
void setLayout(const QByteArray &data)
quint64 getCenterFrequency() const
quint64 m_centerFrequency
const ChannelConfig & getChannelConfig(int index) const
void setDeviceConfig(const QString &deviceId, const QString &deviceSerial, int deviceSequence, const QByteArray &config)
QString m_channelIdURI
Channel type ID in URI form.
bool isSourcePreset() const
QByteArray m_spectrumConfig
DeviceeConfigs m_deviceConfigs
const QByteArray & getLayout() const
void addChannel(const QString &channel, const QByteArray &config)
void setSpectrumConfig(const QByteArray &data)
const QByteArray & getSpectrumConfig() const
void setDescription(const QString &description)
void setGroup(const QString &group)
void setSourcePreset(bool isSourcePreset)
QString m_channelId
Channel type ID in short form from object name TODO: use in the future.
QList< DeviceConfig > DeviceeConfigs
static bool presetCompare(const Preset *p1, Preset *p2)
const QString & getDescription() const
bool m_dcOffsetCorrection
const QString & getGroup() const
bool m_iqImbalanceCorrection
ChannelConfigs m_channelConfigs
ChannelConfig(const QString &channelIdURI, const QByteArray &config)