GrabBag/Tools/ControlApp/DialogConfig.h

51 lines
1.1 KiB
C
Raw Normal View History

2026-03-01 18:11:32 +08:00
#ifndef DIALOGCONFIG_H
#define DIALOGCONFIG_H
#include <QDialog>
#include <QSettings>
namespace Ui {
class DialogConfig;
}
class DemoControlPresenter;
/**
* @brief
*
* IPIP
*/
class DialogConfig : public QDialog
{
Q_OBJECT
public:
explicit DialogConfig(DemoControlPresenter* presenter, QWidget *parent = nullptr);
~DialogConfig();
// 静态方法从配置文件加载配置到Presenter
static void LoadConfigToPresenter(DemoControlPresenter* presenter);
private slots:
void on_btn_save_clicked();
void on_btn_cancel_clicked();
void on_btn_test_controller_clicked();
void on_btn_test_robot_clicked();
void on_btn_test_ready_clicked();
void on_btn_test_place_clicked();
void on_btn_read_ready_clicked();
void on_btn_read_place_clicked();
private:
void loadCurrentConfig();
void saveConfig();
void saveConfigToFile();
void loadConfigFromFile();
private:
Ui::DialogConfig *ui;
DemoControlPresenter* m_presenter;
};
#endif // DIALOGCONFIG_H