50 lines
1.0 KiB
C++
50 lines
1.0 KiB
C++
#ifndef CONFIGMANAGER_H
|
|
#define CONFIGMANAGER_H
|
|
|
|
#include <QSettings>
|
|
#include <QString>
|
|
#include <memory>
|
|
|
|
class ConfigManager
|
|
{
|
|
public:
|
|
ConfigManager();
|
|
~ConfigManager();
|
|
|
|
// 网络配置
|
|
QString getIpAddress() const;
|
|
void setIpAddress(const QString &ip);
|
|
|
|
int getControlPort() const;
|
|
void setControlPort(int port);
|
|
|
|
int getDataPort() const;
|
|
void setDataPort(int port);
|
|
|
|
// 相机配置
|
|
int getExposureTime() const;
|
|
void setExposureTime(int exposure);
|
|
|
|
// 拍照配置
|
|
QString getSavePath() const;
|
|
void setSavePath(const QString &path);
|
|
|
|
QString getDepthFormat() const;
|
|
void setDepthFormat(const QString &format);
|
|
|
|
QString getPointCloudFormat() const;
|
|
void setPointCloudFormat(const QString &format);
|
|
|
|
// 窗口配置
|
|
QByteArray getWindowGeometry() const;
|
|
void setWindowGeometry(const QByteArray &geometry);
|
|
|
|
QByteArray getWindowState() const;
|
|
void setWindowState(const QByteArray &state);
|
|
|
|
private:
|
|
std::unique_ptr<QSettings> m_settings;
|
|
};
|
|
|
|
#endif // CONFIGMANAGER_H
|