#ifndef _CONFIGURATION_H_ #define _CONFIGURATION_H_ /* * all read and saved data will have to be in a */ #include #include #include "simpleskycam.h" #include "videodev.h" #include "json.h" #define CONFIGURATION_DEFAULTFILE ".simpleskycam.config" #define BTN_PRESET_MAX 4 // number of preset buttons class Configuration { private: int histogram_log = 1; // logarithmic or linear scale JSONParse config; std::string GetDefaultFileName(); list presetbtn[BTN_PRESET_MAX]; public: char *debugpath; char *readdumppath; int debayer_mode = 0; // 0..simple mode, 1..bilinear Configuration(); ~Configuration(); void LoadDefault(); void SaveDefault(); void LoadConfig(std::string filename); void SaveConfig(std::string filename); void SetDebayerMode(int trueorfalse); void SetHistogramLog(int trueorfalse); int GetHistogramLog() { return histogram_log; }; void SetPresetButton (int btn, list *parameters); list GetPresetButton (int btn); }; extern Configuration config; #endif