38 lines
727 B
C++
38 lines
727 B
C++
#ifndef DIALOGCONFIG_H
|
|
#define DIALOGCONFIG_H
|
|
|
|
#include <QDialog>
|
|
#include "IVrConfig.h"
|
|
|
|
namespace Ui {
|
|
class DialogConfig;
|
|
}
|
|
|
|
class DialogConfig : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit DialogConfig(IVrConfig* devConfig, QWidget *parent = nullptr);
|
|
~DialogConfig();
|
|
|
|
private slots:
|
|
void on_btn_apply_clicked();
|
|
void on_btn_cancel_clicked();
|
|
|
|
private:
|
|
// 从配置文件加载数据到界面
|
|
void LoadConfigToUI();
|
|
|
|
// 从界面保存数据到配置文件
|
|
bool SaveConfigFromUI();
|
|
|
|
private:
|
|
Ui::DialogConfig *ui;
|
|
IVrConfig* m_vrConfig = nullptr;
|
|
ConfigResult m_configData;
|
|
QString m_configFilePath;
|
|
};
|
|
|
|
#endif // DIALOGCONFIG_H
|