wfview/freqmemory.h

54 wiersze
1.2 KiB
C
Czysty Zwykły widok Historia

2018-11-07 23:54:03 +00:00
#ifndef FREQMEMORY_H
#define FREQMEMORY_H
#include <QString>
#include <QDebug>
// 0 1 2 3 4
//modes << "LSB" << "USB" << "AM" << "CW" << "RTTY";
// 5 6 7 8 9
// modes << "FM" << "CW-R" << "RTTY-R" << "LSB-D" << "USB-D";
enum mode_kind {
modeLSB=0,
modeUSB,
modeAM,
modeCW,
modeRTTY,
modeFM,
modeCW_R,
modeRTTY_R,
modeLSB_D,
modeUSB_D
};
struct preset_kind {
// QString name;
// QString comment;
// unsigned int index; // channel number
2018-11-07 23:54:03 +00:00
double frequency;
mode_kind mode;
bool isSet;
};
class freqMemory
{
public:
freqMemory();
void setPreset(unsigned int index, double frequency, mode_kind mode);
void setPreset(unsigned int index, double frequency, mode_kind mode, QString name);
void setPreset(unsigned int index, double frequency, mode_kind mode, QString name, QString comment);
void dumpMemory();
unsigned int getNumPresets();
2018-11-07 23:54:03 +00:00
preset_kind getPreset(unsigned int index);
private:
void initializePresets();
unsigned int numPresets;
2018-11-07 23:54:03 +00:00
unsigned int maxIndex;
//QVector <preset_kind> presets;
preset_kind presets[100];
2018-11-07 23:54:03 +00:00
};
#endif // FREQMEMORY_H