55 lines
1.4 KiB
C++
55 lines
1.4 KiB
C++
#ifndef DIALOGALGOARG_H
|
|
#define DIALOGALGOARG_H
|
|
|
|
#include <QWidget>
|
|
#include <QDialog>
|
|
#include <QString>
|
|
#include "IVrBeltTearingConfig.h"
|
|
#include <QComboBox>
|
|
|
|
namespace Ui {
|
|
class DialogAlgoarg;
|
|
}
|
|
|
|
class DialogAlgoarg : public QDialog
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit DialogAlgoarg(IVrBeltTearingConfig* beltTearingConfig, const QMap<QString, ServerInfo>& serverInfos, QWidget *parent = nullptr);
|
|
~DialogAlgoarg();
|
|
|
|
void Init();
|
|
|
|
// 更新服务器列表
|
|
void updateServerInfos(const QMap<QString, ServerInfo>& serverInfos);
|
|
|
|
signals:
|
|
void parametersChanged(const QString& serverName, const QByteArray& paramData);
|
|
void requestServerData(const QString& serverName);
|
|
|
|
public slots:
|
|
void onServerDataReceived(const QString& serverName, const QJsonObject& data);
|
|
|
|
private slots:
|
|
void on_btn_camer_ok_clicked();
|
|
void on_btn_camer_cancel_clicked();
|
|
void on_serverComboBox_currentTextChanged(const QString &text);
|
|
|
|
private:
|
|
void setupServerComboBox();
|
|
void onServerSelectionChanged();
|
|
void requestParamFromServer();
|
|
void sendParametersToServer();
|
|
void updateUIWithServerData(const QJsonObject& serverData);
|
|
|
|
private:
|
|
Ui::DialogAlgoarg *ui;
|
|
IVrBeltTearingConfig* m_beltTearingConfig;
|
|
BeltTearingConfigResult m_configData;
|
|
QMap<QString, ServerInfo> m_serverInfos;
|
|
QComboBox* m_serverComboBox;
|
|
};
|
|
|
|
#endif // DIALOGALGOARG_H
|