81 lines
2.5 KiB
C++
81 lines
2.5 KiB
C++
#pragma once
|
||
|
||
#include <QtWidgets/QMainWindow>
|
||
|
||
#include "ui/Dialog.h"
|
||
|
||
#include "ui_DYTChart.h"
|
||
|
||
class FitCurveDialog;
|
||
class SurfaceDialog;
|
||
|
||
class DYTChart : public Dialog
|
||
{
|
||
Q_OBJECT
|
||
|
||
public:
|
||
DYTChart(int iType , QWidget *parent = Q_NULLPTR);
|
||
|
||
QVariant GetChart();
|
||
void InitChartData(QVariant var);
|
||
|
||
protected:
|
||
void InitChart(int iType); // 初始化绘图场景1二维曲线 2二维曲线(y轴对数)3三维曲线
|
||
void InitConnect(); // 信号槽连接
|
||
|
||
void ParseAnimationPath(const QString& strFile, std::vector<std::vector<float>>& vecAnimationPath); // 解析运动轨迹文件
|
||
void ParseTimeStep(const QString& strFile, std::vector<float>& vecTime); // 解析时间步长文件
|
||
void ParseAntennaPatternFile(const QString& strFile, std::vector<std::vector<float>>& vecAntennaPattern);
|
||
void ParseBeamPointFile(const QString& strFile, std::vector<std::vector<float>>& vecBeamPoint);
|
||
void ParseRD(const QString& strFile, std::vector<std::vector<float>>& vecRDPoint, int iRowCount=64);
|
||
void ParseWave(const QString& strFile, std::vector<std::vector<float>>& vecWavePoint, int iRowCount = 50);
|
||
|
||
void InitXTable(const QString& strFilePath);
|
||
void InitYTable(const QString& strFilePath);
|
||
void InitZTable(const QString& strFilePath);
|
||
|
||
void UpdateRDCurve(int iTime, int iSelRowCount = 64);
|
||
|
||
void Clear();
|
||
|
||
protected slots:
|
||
void slotSelXFile(); // 选择X数据文件
|
||
void slotSelYFile(); // 选择Y数据文件
|
||
void slotSelZFile(); // 选择Z数据文件
|
||
void slotCurveChanged(int iIndex); // 切换曲线图类型
|
||
void slotChangeAddedCurve(int iIndex); // 已添加的曲线
|
||
void slotChangedColor(); // 修改颜色
|
||
void slotAdd(); // 添加
|
||
void slotUpdate(); // 更新
|
||
void slotDel(); // 删除
|
||
|
||
void slotUpdateTime(double iTime);
|
||
|
||
signals:
|
||
void signalUpdateData(QVariant var); // 更新数据
|
||
void signalUpdateColor(QColor color); // 更新颜色
|
||
|
||
void signalAddCurve(QVariant varCurve); // 添加曲线
|
||
void signalDelCurve(int iID); // 删除曲线
|
||
|
||
void signalAddLgCurve(QVariant varCurve); // 添加曲线
|
||
void signalDelLgCurve(int iID); // 删除曲线
|
||
|
||
void signalAddSurfaceCurve(QVariant varCurve); // 添加曲线
|
||
|
||
private:
|
||
Ui::DYTChartClass ui;
|
||
|
||
int m_iCurveID = 0; // 曲线图ID
|
||
int m_iCurSelID = 0; // 当前选择的曲线ID
|
||
int m_iCurveType = 0; // 曲线类型 1二维曲线 2二维曲线(y轴对数)3三维曲线
|
||
|
||
FitCurveDialog* m_p2DCurve = NULL; // 二维曲线
|
||
FitCurveDialog* m_p2DLgCurve = NULL; // 二维曲线(y轴对数)
|
||
SurfaceDialog* m_p3DSuf = NULL; // 三维曲线
|
||
|
||
QVariantMap m_varCur3DParamMap;
|
||
|
||
int m_iCurTime = 0;
|
||
};
|