mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-29 23:28:39 -05:00
41 lines
664 B
C++
41 lines
664 B
C++
#pragma once
|
|
|
|
#include <wx/stdpaths.h>
|
|
#include <wx/dir.h>
|
|
#include <wx/filename.h>
|
|
|
|
#include "DataTree.h"
|
|
|
|
|
|
class DeviceConfig {
|
|
public:
|
|
DeviceConfig();
|
|
DeviceConfig(std::string deviceId);
|
|
|
|
void setPPM(int ppm);
|
|
int getPPM();
|
|
|
|
void setDeviceId(std::string deviceId);
|
|
std::string getDeviceId();
|
|
|
|
void save(DataNode *node);
|
|
void load(DataNode *node);
|
|
|
|
private:
|
|
std::string deviceId;
|
|
int ppm;
|
|
};
|
|
|
|
class AppConfig {
|
|
public:
|
|
std::string getConfigDir();
|
|
DeviceConfig *getDevice(std::string deviceId);
|
|
|
|
bool save();
|
|
bool load();
|
|
bool reset();
|
|
|
|
private:
|
|
std::map<std::string, DeviceConfig> deviceConfig;
|
|
};
|