// // Created by tangchao on 2023/3/25. // #ifndef XIMEAIMAGERECORDER_CONFIGFILE_H #define XIMEAIMAGERECORDER_CONFIGFILE_H #include #include #include #include #include #include #include #include #include #include "utility_tc.h" using namespace std; using namespace libconfig; class Configfile { public: Configfile(); void setConfigfilePath(string configfilePath); bool isConfigfileExist(); bool parseConfigfile(); bool getSN(string& SN); bool getPositionRestriction(int& max, int& min); bool getTuningStepSize(int& coarse, int& fine); bool getFitParams(float& fa, float& fb); bool getAutoFocusRange(int& max, int& min); bool getXMotorParm(float& StepAnglemar, float& Lead, int& SubdivisionMultiples, float& ScaleFactor, float& MaxRange); bool getYMotorParm(float& StepAnglemar, float& Lead, int& SubdivisionMultiples, float& ScaleFactor, float& MaxRange); bool setMaxRange(float maxRange, QString x_y); bool writeConfig2File(); bool createConfigFile(); bool updateConfigFile(); private: string m_configfilePath; Config cfg; }; #endif //XIMEAIMAGERECORDER_CONFIGFILE_H